create-egregore 0.19.21 → 0.19.22

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 (226) hide show
  1. package/assets/egregore-launcher.js +29 -3
  2. package/bin/cli.js +3 -4
  3. package/lib/auth.js +3 -4
  4. package/lib/path-lookup.js +59 -0
  5. package/lib/setup.js +52 -6
  6. package/package.json +2 -2
  7. package/runtime/codex/.claude/context/notification-consent.md +66 -0
  8. package/runtime/codex/.codex/hooks/branch-guard.js +14 -3
  9. package/runtime/codex/.codex/skills/add/SKILL.md +8 -4
  10. package/runtime/codex/.codex/skills/announce/SKILL.md +21 -8
  11. package/runtime/codex/.codex/skills/answer/SKILL.md +8 -4
  12. package/runtime/codex/.codex/skills/archive/SKILL.md +8 -4
  13. package/runtime/codex/.codex/skills/ask/SKILL.md +14 -6
  14. package/runtime/codex/.codex/skills/audit/SKILL.md +29 -0
  15. package/runtime/codex/.codex/skills/autosave/SKILL.md +29 -0
  16. package/runtime/codex/.codex/skills/branch/SKILL.md +8 -4
  17. package/runtime/codex/.codex/skills/checkup/SKILL.md +8 -4
  18. package/runtime/codex/.codex/skills/commit/SKILL.md +8 -4
  19. package/runtime/codex/.codex/skills/contribute/SKILL.md +8 -4
  20. package/runtime/codex/.codex/skills/dark-mode/SKILL.md +8 -4
  21. package/runtime/codex/.codex/skills/delete-user/SKILL.md +8 -4
  22. package/runtime/codex/.codex/skills/demo-mode/SKILL.md +29 -0
  23. package/runtime/codex/.codex/skills/deploy-bridge/SKILL.md +8 -4
  24. package/runtime/codex/.codex/skills/design/SKILL.md +29 -0
  25. package/runtime/codex/.codex/skills/egregore-voice/SKILL.md +8 -4
  26. package/runtime/codex/.codex/skills/emissary/SKILL.md +8 -4
  27. package/runtime/codex/.codex/skills/env/SKILL.md +8 -4
  28. package/runtime/codex/.codex/skills/handoff/SKILL.md +15 -6
  29. package/runtime/codex/.codex/skills/harvest/QUESTION_PALETTE.md +76 -0
  30. package/runtime/codex/.codex/skills/harvest/SKILL.md +30 -6
  31. package/runtime/codex/.codex/skills/ingest/SKILL.md +8 -4
  32. package/runtime/codex/.codex/skills/ingest-google/SKILL.md +8 -4
  33. package/runtime/codex/.codex/skills/ingest-user-interview/SKILL.md +8 -4
  34. package/runtime/codex/.codex/skills/invite/SKILL.md +6 -2
  35. package/runtime/codex/.codex/skills/issue/SKILL.md +8 -4
  36. package/runtime/codex/.codex/skills/me/SKILL.md +8 -4
  37. package/runtime/codex/.codex/skills/meeting/SKILL.md +8 -4
  38. package/runtime/codex/.codex/skills/minion/SKILL.md +8 -4
  39. package/runtime/codex/.codex/skills/mock/SKILL.md +29 -0
  40. package/runtime/codex/.codex/skills/note/SKILL.md +8 -4
  41. package/runtime/codex/.codex/skills/onboarding/SKILL.md +8 -4
  42. package/runtime/codex/.codex/skills/pr/SKILL.md +8 -4
  43. package/runtime/codex/.codex/skills/product-voice/SKILL.md +29 -0
  44. package/runtime/codex/.codex/skills/project/SKILL.md +8 -4
  45. package/runtime/codex/.codex/skills/pull/SKILL.md +8 -4
  46. package/runtime/codex/.codex/skills/push/SKILL.md +8 -4
  47. package/runtime/codex/.codex/skills/quest/SKILL.md +6 -3
  48. package/runtime/codex/.codex/skills/quest-suggest/SKILL.md +8 -4
  49. package/runtime/codex/.codex/skills/reflect/SKILL.md +8 -4
  50. package/runtime/codex/.codex/skills/review-pr/SKILL.md +8 -4
  51. package/runtime/codex/.codex/skills/save/SKILL.md +6 -4
  52. package/runtime/codex/.codex/skills/scroll/SKILL.md +92 -23
  53. package/runtime/codex/.codex/skills/scroll/assets/shell.html +381 -52
  54. package/runtime/codex/.codex/skills/session-view/SKILL.md +8 -4
  55. package/runtime/codex/.codex/skills/setup/SKILL.md +8 -4
  56. package/runtime/codex/.codex/skills/summon/SKILL.md +8 -4
  57. package/runtime/codex/.codex/skills/sync-repos/SKILL.md +8 -4
  58. package/runtime/codex/.codex/skills/task/SKILL.md +9 -5
  59. package/runtime/codex/.codex/skills/teams-connect/SKILL.md +29 -0
  60. package/runtime/codex/.codex/skills/telegram-connect/SKILL.md +8 -4
  61. package/runtime/codex/.codex/skills/telemetry/SKILL.md +8 -4
  62. package/runtime/codex/.codex/skills/test/SKILL.md +8 -4
  63. package/runtime/codex/.codex/skills/thread/SKILL.md +8 -4
  64. package/runtime/codex/.codex/skills/todo/SKILL.md +8 -4
  65. package/runtime/codex/.codex/skills/tui-design/SKILL.md +8 -4
  66. package/runtime/codex/.codex/skills/tutorial/SKILL.md +8 -4
  67. package/runtime/codex/.codex/skills/update/SKILL.md +8 -4
  68. package/runtime/codex/.codex/skills/visual-explain/SKILL.md +8 -4
  69. package/runtime/codex/.codex/spec-manifest.json +4 -4
  70. package/runtime/codex/AGENTS.md +36 -14
  71. package/runtime/codex/bin/activity-data.sh +1 -1
  72. package/runtime/codex/bin/agent.sh +38 -19
  73. package/runtime/codex/bin/attendant.sh +8 -2
  74. package/runtime/codex/bin/autosave.sh +1 -1
  75. package/runtime/codex/bin/capture-reconcile.sh +8 -6
  76. package/runtime/codex/bin/capture-run.sh +1 -1
  77. package/runtime/codex/bin/codex-install-skills.sh +1 -1
  78. package/runtime/codex/bin/codex-render-spec.mjs +12 -5
  79. package/runtime/codex/bin/codex-session-start.sh +1 -1
  80. package/runtime/codex/bin/codex-sync-skills.sh +9 -5
  81. package/runtime/codex/bin/dashboard-data.sh +1 -1
  82. package/runtime/codex/bin/graph-batch.sh +1 -1
  83. package/runtime/codex/bin/graph-op.sh +1 -1
  84. package/runtime/codex/bin/graph-wal.sh +1 -1
  85. package/runtime/codex/bin/graph.sh +1 -1
  86. package/runtime/codex/bin/handoff-pr-backfill.sh +1 -1
  87. package/runtime/codex/bin/handoff-run.sh +53 -39
  88. package/runtime/codex/bin/handoff-save-egregore.sh +62 -32
  89. package/runtime/codex/bin/index-handoff.sh +1 -1
  90. package/runtime/codex/bin/ingest-graph.sh +1 -1
  91. package/runtime/codex/bin/ingest.sh +1 -1
  92. package/runtime/codex/bin/lib/artifact-id.sh +1 -1
  93. package/runtime/codex/bin/lib/config.sh +56 -20
  94. package/runtime/codex/bin/lib/context.sh +7 -1
  95. package/runtime/codex/bin/lib/ensure-develop.sh +1 -1
  96. package/runtime/codex/bin/lib/git-sync.sh +145 -59
  97. package/runtime/codex/bin/lib/greeting.sh +14 -0
  98. package/runtime/codex/bin/lib/hash.sh +1 -1
  99. package/runtime/codex/bin/lib/noncode.sh +1 -1
  100. package/runtime/codex/bin/lib/time.sh +1 -1
  101. package/runtime/codex/bin/notify.sh +492 -153
  102. package/runtime/codex/bin/person.sh +1 -1
  103. package/runtime/codex/bin/publish-artifact.sh +39 -4
  104. package/runtime/codex/bin/publish-references.sh +1 -1
  105. package/runtime/codex/bin/repo-state.sh +7 -10
  106. package/runtime/codex/bin/search.sh +1 -1
  107. package/runtime/codex/bin/session-autosave.sh +1 -1
  108. package/runtime/codex/bin/session-log.sh +1 -1
  109. package/runtime/codex/bin/settings.sh +32 -2
  110. package/runtime/codex/bin/telemetry.sh +1 -1
  111. package/runtime/codex/bin/worktree-create.sh +14 -4
  112. package/runtime/codex/bin/worktree-remove.sh +1 -1
  113. package/runtime/codex/bin/worktree.sh +1 -1
  114. package/runtime/codex/manifest.json +18 -1
  115. package/runtime/pi/.claude/context/notification-consent.md +66 -0
  116. package/runtime/pi/.codex/hooks/branch-guard.js +14 -3
  117. package/runtime/pi/.codex/skills/add/SKILL.md +8 -4
  118. package/runtime/pi/.codex/skills/announce/SKILL.md +21 -8
  119. package/runtime/pi/.codex/skills/answer/SKILL.md +8 -4
  120. package/runtime/pi/.codex/skills/archive/SKILL.md +8 -4
  121. package/runtime/pi/.codex/skills/ask/SKILL.md +14 -6
  122. package/runtime/pi/.codex/skills/audit/SKILL.md +29 -0
  123. package/runtime/pi/.codex/skills/autosave/SKILL.md +29 -0
  124. package/runtime/pi/.codex/skills/branch/SKILL.md +8 -4
  125. package/runtime/pi/.codex/skills/checkup/SKILL.md +8 -4
  126. package/runtime/pi/.codex/skills/commit/SKILL.md +8 -4
  127. package/runtime/pi/.codex/skills/contribute/SKILL.md +8 -4
  128. package/runtime/pi/.codex/skills/dark-mode/SKILL.md +8 -4
  129. package/runtime/pi/.codex/skills/delete-user/SKILL.md +8 -4
  130. package/runtime/pi/.codex/skills/demo-mode/SKILL.md +29 -0
  131. package/runtime/pi/.codex/skills/deploy-bridge/SKILL.md +8 -4
  132. package/runtime/pi/.codex/skills/design/SKILL.md +29 -0
  133. package/runtime/pi/.codex/skills/egregore-voice/SKILL.md +8 -4
  134. package/runtime/pi/.codex/skills/emissary/SKILL.md +8 -4
  135. package/runtime/pi/.codex/skills/env/SKILL.md +8 -4
  136. package/runtime/pi/.codex/skills/handoff/SKILL.md +15 -6
  137. package/runtime/pi/.codex/skills/harvest/QUESTION_PALETTE.md +76 -0
  138. package/runtime/pi/.codex/skills/harvest/SKILL.md +30 -6
  139. package/runtime/pi/.codex/skills/ingest/SKILL.md +8 -4
  140. package/runtime/pi/.codex/skills/ingest-google/SKILL.md +8 -4
  141. package/runtime/pi/.codex/skills/ingest-user-interview/SKILL.md +8 -4
  142. package/runtime/pi/.codex/skills/invite/SKILL.md +6 -2
  143. package/runtime/pi/.codex/skills/issue/SKILL.md +8 -4
  144. package/runtime/pi/.codex/skills/me/SKILL.md +8 -4
  145. package/runtime/pi/.codex/skills/meeting/SKILL.md +8 -4
  146. package/runtime/pi/.codex/skills/minion/SKILL.md +8 -4
  147. package/runtime/pi/.codex/skills/mock/SKILL.md +29 -0
  148. package/runtime/pi/.codex/skills/note/SKILL.md +8 -4
  149. package/runtime/pi/.codex/skills/onboarding/SKILL.md +8 -4
  150. package/runtime/pi/.codex/skills/pr/SKILL.md +8 -4
  151. package/runtime/pi/.codex/skills/product-voice/SKILL.md +29 -0
  152. package/runtime/pi/.codex/skills/project/SKILL.md +8 -4
  153. package/runtime/pi/.codex/skills/pull/SKILL.md +8 -4
  154. package/runtime/pi/.codex/skills/push/SKILL.md +8 -4
  155. package/runtime/pi/.codex/skills/quest/SKILL.md +6 -3
  156. package/runtime/pi/.codex/skills/quest-suggest/SKILL.md +8 -4
  157. package/runtime/pi/.codex/skills/reflect/SKILL.md +8 -4
  158. package/runtime/pi/.codex/skills/review-pr/SKILL.md +8 -4
  159. package/runtime/pi/.codex/skills/save/SKILL.md +6 -4
  160. package/runtime/pi/.codex/skills/scroll/SKILL.md +92 -23
  161. package/runtime/pi/.codex/skills/scroll/assets/shell.html +381 -52
  162. package/runtime/pi/.codex/skills/session-view/SKILL.md +8 -4
  163. package/runtime/pi/.codex/skills/setup/SKILL.md +8 -4
  164. package/runtime/pi/.codex/skills/summon/SKILL.md +8 -4
  165. package/runtime/pi/.codex/skills/sync-repos/SKILL.md +8 -4
  166. package/runtime/pi/.codex/skills/task/SKILL.md +9 -5
  167. package/runtime/pi/.codex/skills/teams-connect/SKILL.md +29 -0
  168. package/runtime/pi/.codex/skills/telegram-connect/SKILL.md +8 -4
  169. package/runtime/pi/.codex/skills/telemetry/SKILL.md +8 -4
  170. package/runtime/pi/.codex/skills/test/SKILL.md +8 -4
  171. package/runtime/pi/.codex/skills/thread/SKILL.md +8 -4
  172. package/runtime/pi/.codex/skills/todo/SKILL.md +8 -4
  173. package/runtime/pi/.codex/skills/tui-design/SKILL.md +8 -4
  174. package/runtime/pi/.codex/skills/tutorial/SKILL.md +8 -4
  175. package/runtime/pi/.codex/skills/update/SKILL.md +8 -4
  176. package/runtime/pi/.codex/skills/visual-explain/SKILL.md +8 -4
  177. package/runtime/pi/.codex/spec-manifest.json +4 -4
  178. package/runtime/pi/.pi/APPEND_SYSTEM.md +34 -12
  179. package/runtime/pi/.pi/extensions/egregore.ts +8 -1
  180. package/runtime/pi/.pi/spec-manifest.json +2 -2
  181. package/runtime/pi/AGENTS.md +36 -14
  182. package/runtime/pi/bin/activity-data.sh +1 -1
  183. package/runtime/pi/bin/agent.sh +38 -19
  184. package/runtime/pi/bin/attendant.sh +8 -2
  185. package/runtime/pi/bin/autosave.sh +1 -1
  186. package/runtime/pi/bin/capture-reconcile.sh +8 -6
  187. package/runtime/pi/bin/capture-run.sh +1 -1
  188. package/runtime/pi/bin/codex-install-skills.sh +1 -1
  189. package/runtime/pi/bin/codex-render-spec.mjs +12 -5
  190. package/runtime/pi/bin/codex-session-start.sh +1 -1
  191. package/runtime/pi/bin/codex-sync-skills.sh +9 -5
  192. package/runtime/pi/bin/dashboard-data.sh +1 -1
  193. package/runtime/pi/bin/graph-batch.sh +1 -1
  194. package/runtime/pi/bin/graph-op.sh +1 -1
  195. package/runtime/pi/bin/graph-wal.sh +1 -1
  196. package/runtime/pi/bin/graph.sh +1 -1
  197. package/runtime/pi/bin/handoff-pr-backfill.sh +1 -1
  198. package/runtime/pi/bin/handoff-run.sh +53 -39
  199. package/runtime/pi/bin/handoff-save-egregore.sh +62 -32
  200. package/runtime/pi/bin/index-handoff.sh +1 -1
  201. package/runtime/pi/bin/ingest-graph.sh +1 -1
  202. package/runtime/pi/bin/ingest.sh +1 -1
  203. package/runtime/pi/bin/lib/artifact-id.sh +1 -1
  204. package/runtime/pi/bin/lib/config.sh +56 -20
  205. package/runtime/pi/bin/lib/context.sh +7 -1
  206. package/runtime/pi/bin/lib/ensure-develop.sh +1 -1
  207. package/runtime/pi/bin/lib/git-sync.sh +145 -59
  208. package/runtime/pi/bin/lib/greeting.sh +14 -0
  209. package/runtime/pi/bin/lib/hash.sh +1 -1
  210. package/runtime/pi/bin/lib/noncode.sh +1 -1
  211. package/runtime/pi/bin/lib/time.sh +1 -1
  212. package/runtime/pi/bin/notify.sh +492 -153
  213. package/runtime/pi/bin/person.sh +1 -1
  214. package/runtime/pi/bin/pi-session-start.sh +1 -1
  215. package/runtime/pi/bin/publish-artifact.sh +39 -4
  216. package/runtime/pi/bin/publish-references.sh +1 -1
  217. package/runtime/pi/bin/repo-state.sh +7 -10
  218. package/runtime/pi/bin/search.sh +1 -1
  219. package/runtime/pi/bin/session-autosave.sh +1 -1
  220. package/runtime/pi/bin/session-log.sh +1 -1
  221. package/runtime/pi/bin/settings.sh +32 -2
  222. package/runtime/pi/bin/telemetry.sh +1 -1
  223. package/runtime/pi/bin/worktree-create.sh +14 -4
  224. package/runtime/pi/bin/worktree-remove.sh +1 -1
  225. package/runtime/pi/bin/worktree.sh +1 -1
  226. package/runtime/pi/manifest.json +18 -1
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
4
  # One identity spine for .egregore-state.json, memory/people, Supabase, and
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  set -o pipefail
3
3
 
4
4
  # Pi's project extension invokes this during session_start so direct `pi`
@@ -1,11 +1,13 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
4
  # publish-artifact.sh — Generate HTML artifact + upload to API
5
5
  # Usage: publish-artifact.sh <type> <file> [--title "..."] [--author "..."] [--description "..."] [--id "..."] [--raw-html] [--no-references]
6
6
  #
7
7
  # Connected mode (API key present): publishes to /api/artifacts/publish (permanent, org-scoped)
8
- # OSS mode (no API key): publishes to /api/artifacts/share (ephemeral, 7-day TTL)
8
+ # OSS mode (no API key): publishes to /api/artifacts/share on a PUBLIC, UNAUTHENTICATED
9
+ # relay (ephemeral, 7-day TTL). OFF unless the instance opted in — see
10
+ # "Public-relay opt-in" below and `bin/settings.sh relay on`.
9
11
  #
10
12
  # --id <slug>: stable artifact ID — re-publishing with the same ID upserts the content
11
13
  # at the same URL (e.g. egregore.xyz/view/{org}/board). Connected mode only;
@@ -18,8 +20,13 @@ set -euo pipefail
18
20
  # Set automatically when publish-references.sh invokes us for a child,
19
21
  # preventing recursion.
20
22
  #
21
- # Outputs artifact URL on success, exits silently on failure.
23
+ # Outputs artifact URL on success, exits silently on soft failure.
22
24
  # Designed for fire-and-forget use: `bash bin/publish-artifact.sh handoff file.md &`
25
+ #
26
+ # Exit codes: 0 ok (or soft failure — no URL on stdout) · 1 usage/validation
27
+ # 3 hosting turned off (features.publishing=false)
28
+ # 4 nothing uploaded — public relay not enabled and no org API key,
29
+ # or egregore.json is missing/unreadable (fail closed)
23
30
 
24
31
  SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
25
32
  CONFIG="$SCRIPT_DIR/egregore.json"
@@ -77,6 +84,15 @@ if [ -f "$SCRIPT_DIR/.env" ]; then
77
84
  EGREGORE_USE_PUBLISHED="${EGREGORE_USE_PUBLISHED:-$(grep '^EGREGORE_USE_PUBLISHED=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2- || true)}"
78
85
  fi
79
86
 
87
+ # A config we cannot parse is a config we cannot trust. Every routing decision
88
+ # below — authenticated org upload vs. public relay, hosting on vs. off — is
89
+ # read out of this file, so an unreadable one means we cannot tell those apart.
90
+ if [ ! -f "$CONFIG" ] || ! jq -e 'type == "object"' "$CONFIG" >/dev/null 2>&1; then
91
+ echo "Not published — nothing left this machine." >&2
92
+ echo "egregore.json is missing or unreadable, so there is no way to tell an authenticated org upload from a public one." >&2
93
+ exit 4
94
+ fi
95
+
80
96
  API_URL="${EGREGORE_API_URL:-$(jq -r '.api_url // empty' "$CONFIG" 2>/dev/null)}"
81
97
  API_KEY="${EGREGORE_API_KEY:-}"
82
98
  ORG_SLUG="$(jq -r '.slug // empty' "$CONFIG" 2>/dev/null)"
@@ -92,7 +108,8 @@ if [ -z "${EGREGORE_USE_PUBLISHED:-}" ]; then
92
108
  fi
93
109
  fi
94
110
 
95
- # Public relay for OSS share endpoint
111
+ # Public relay for OSS share endpoint. Unauthenticated: anything posted here is
112
+ # readable by anyone holding the URL, for 7 days, with nothing in front of it.
96
113
  RELAY_URL="https://egregore-production-55f2.up.railway.app"
97
114
 
98
115
  # --- Artifact hosting off-switch (compliance / privacy) ---
@@ -109,6 +126,24 @@ if [ "$PUBLISHING_ENABLED" = "false" ]; then
109
126
  exit 3
110
127
  fi
111
128
 
129
+ # --- Public-relay opt-in (privacy) ---
130
+ # Without BOTH an api_url and an org API key there is exactly one upload route
131
+ # left: the unauthenticated public relay below. Content must not leave the
132
+ # machine for that route unless a person explicitly enabled it. The gate sits
133
+ # before rendering so the default path generates and uploads nothing.
134
+ #
135
+ # NOTE: use an explicit `== true` test, never jq's `// false`: `//` treats an
136
+ # explicit false like null and silently replaces it with the default.
137
+ if [ -z "$API_URL" ] || [ -z "$API_KEY" ]; then
138
+ PUBLIC_RELAY_ENABLED="$(jq -r 'if .features.public_relay == true then "true" else "false" end' "$CONFIG" 2>/dev/null || echo "false")"
139
+ if [ "$PUBLIC_RELAY_ENABLED" != "true" ]; then
140
+ echo "Not published — nothing left this machine." >&2
141
+ echo "Without an org API key the only sharing route is a public relay: no auth, anyone with the link can read it, expires after 7 days. It is off unless you turn it on." >&2
142
+ echo "Turn it on with: bin/settings.sh relay on" >&2
143
+ exit 4
144
+ fi
145
+ fi
146
+
112
147
  # --- Prepare HTML ---
113
148
  TMP_HTML="/tmp/egregore-artifacts/publish-$$.html"
114
149
  mkdir -p /tmp/egregore-artifacts
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  set -uo pipefail
3
3
 
4
4
  # publish-references.sh — Depth-1 auto-publish for referenced memory files.
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # repo-state.sh — Capture current branch state across all repos.
3
3
  # Outputs a markdown table (## Repo State) for handoff files.
4
4
  # Only includes repos on non-base branches or with uncommitted changes.
@@ -71,21 +71,18 @@ check_repo() {
71
71
  }
72
72
 
73
73
  # Check core repo
74
- CORE_BASE="develop"
75
- if [ -f "$CONFIG" ]; then
76
- # Core repo base: check if develop exists, otherwise main
77
- if git -C "$SCRIPT_DIR" show-ref --verify --quiet refs/remotes/origin/develop 2>/dev/null; then
78
- CORE_BASE="develop"
79
- else
80
- CORE_BASE="main"
81
- fi
74
+ if ! CORE_BASE=$(_get_base_branch); then
75
+ echo "repo-state: could not resolve the configured base branch" >&2
76
+ exit 1
82
77
  fi
83
78
  check_repo "$CORE_REPO" "$SCRIPT_DIR" "$CORE_BASE"
84
79
 
85
80
  # Check managed repos
86
81
  for REPO in $MANAGED_REPOS; do
87
82
  REPO_DIR="$PARENT_DIR/$REPO"
88
- BASE=$(_get_base_branch "$REPO" 2>/dev/null || echo "develop")
83
+ if ! BASE=$(_get_base_branch "$REPO"); then
84
+ continue
85
+ fi
89
86
  check_repo "$REPO" "$REPO_DIR" "$BASE"
90
87
  done
91
88
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Hybrid search over shared memory — powered by qmd (BM25 + vector + rerank, fully local).
3
3
  # Usage:
4
4
  # bash bin/search.sh query "text" [-n N] [--fast|--semantic] [--all]
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # session-autosave.sh — save non-coding session work without an explicit /save.
3
3
  #
4
4
  # Terminal-close is the design constraint: no single "session end" event is
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Graceful session-end adapter: write a structured session log to memory/sessions/.
3
3
  # Receives runtime-neutral JSON on stdin from Claude Code or Pi.
4
4
  # Runs BEFORE transcript-archive.sh (needs obs buffer + worktree intact).
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
4
  # settings.sh — deterministic config verbs for an Egregore instance.
@@ -10,6 +10,7 @@ set -euo pipefail
10
10
  #
11
11
  # Usage:
12
12
  # settings.sh hosting status|on|off
13
+ # settings.sh relay status|on|off
13
14
  # settings.sh repo list | add <name> [description] | remove <name>
14
15
  # settings.sh admin list | add <github-handle> | remove <github-handle>
15
16
  # settings.sh dump # full settings snapshot as JSON (for the launcher)
@@ -51,6 +52,7 @@ usage() {
51
52
  settings.sh — Egregore instance settings
52
53
 
53
54
  settings.sh hosting status|on|off
55
+ settings.sh relay status|on|off
54
56
  settings.sh repo list | add <name> [description] | remove <name>
55
57
  settings.sh admin list | add <github-handle> | remove <github-handle>
56
58
  settings.sh people list | add <github-handle> | remove <github-handle>
@@ -86,6 +88,32 @@ cmd_hosting() {
86
88
  esac
87
89
  }
88
90
 
91
+ # The public share relay is the only upload route when there is no org API
92
+ # key. It is unauthenticated, readable by anyone with the URL, and expires
93
+ # after 7 days, so it is OFF unless explicitly enabled.
94
+ cmd_relay() {
95
+ local action="${1:-status}"
96
+ local enabled; enabled="$(jq -r 'if .features.public_relay == true then "true" else "false" end' "$CONFIG" 2>/dev/null || echo "false")"
97
+ case "$action" in
98
+ status)
99
+ if [ "$JSON" = 1 ]; then
100
+ jq -n --argjson on "$enabled" '{domain:"relay", public_relay:$on}'
101
+ elif [ "$enabled" = "true" ]; then
102
+ echo "Public share relay: ON — artifacts published without an org API key upload to a public, unauthenticated URL (expires after 7 days)"
103
+ else
104
+ echo "Public share relay: OFF — without an org API key, nothing uploads anywhere"
105
+ fi ;;
106
+ on)
107
+ _save '.features.public_relay = true'
108
+ echo "Public share relay: ON"
109
+ echo " Artifacts published without an org API key now upload to a public, unauthenticated URL that anyone with the link can read for 7 days." ;;
110
+ off)
111
+ _save '.features.public_relay = false'
112
+ echo "Public share relay: OFF — without an org API key, nothing uploads anywhere" ;;
113
+ *) _die "usage: settings.sh relay status|on|off" 1 ;;
114
+ esac
115
+ }
116
+
89
117
  cmd_repo() {
90
118
  local action="${1:-list}"; shift || true
91
119
  case "$action" in
@@ -244,6 +272,7 @@ cmd_dump() {
244
272
  org: .org_name,
245
273
  slug: .slug,
246
274
  hosting: (.features.publishing != false),
275
+ public_relay: (.features.public_relay == true),
247
276
  repos: [.repos[]? | if type=="object" then . else {name:.} end],
248
277
  admins: (.admins // []),
249
278
  people: $people
@@ -265,10 +294,11 @@ set -- "${_args[@]+"${_args[@]}"}"
265
294
  DOMAIN="${1:-}"; shift || true
266
295
  case "$DOMAIN" in
267
296
  hosting) cmd_hosting "$@" ;;
297
+ relay) cmd_relay "$@" ;;
268
298
  repo) cmd_repo "$@" ;;
269
299
  admin) cmd_admin "$@" ;;
270
300
  people) cmd_people "$@" ;;
271
301
  dump) cmd_dump ;;
272
302
  ""|-h|--help|help) usage 0 ;;
273
- *) _die "unknown settings domain: '$DOMAIN' (try: hosting, repo, admin, people, dump)" 1 ;;
303
+ *) _die "unknown settings domain: '$DOMAIN' (try: hosting, relay, repo, admin, people, dump)" 1 ;;
274
304
  esac
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Egregore telemetry — privacy-respecting product analytics.
3
3
  # Mirrors bin/graph.sh and bin/notify.sh patterns.
4
4
  #
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # WorktreeCreate hook — replaces EnterWorktree's default behavior.
3
3
  # Receives {"name": "<slug>"} on stdin. Must print absolute worktree path to stdout.
4
4
  # All diagnostic output goes to stderr or /dev/null — stdout is ONLY for the path.
@@ -33,12 +33,22 @@ AUTHOR=$(jq -r '.github_username // .display_name // "unknown"' "$STATE_FILE" 2>
33
33
  BRANCH="dev/${AUTHOR}/${SLUG}"
34
34
  WT_PATH="$REPO_ROOT/.claude/worktrees/${SLUG}"
35
35
 
36
- # --- Ensure origin/develop is available ---
37
- git -C "$REPO_ROOT" fetch origin develop --quiet 2>/dev/null || true
36
+ # --- Resolve and fetch the configured base branch ---
37
+ SCRIPT_DIR="$REPO_ROOT"
38
+ CONFIG="$REPO_ROOT/egregore.json"
39
+ if [ -f "$REPO_ROOT/bin/lib/config.sh" ]; then
40
+ # shellcheck source=bin/lib/config.sh
41
+ source "$REPO_ROOT/bin/lib/config.sh"
42
+ fi
43
+ if ! BASE_BRANCH=$(_get_base_branch); then
44
+ echo "Error: could not resolve the configured base branch" >&2
45
+ exit 1
46
+ fi
47
+ git -C "$REPO_ROOT" fetch origin "$BASE_BRANCH" --quiet 2>/dev/null || true
38
48
 
39
49
  # --- Create branch (idempotent — skip if exists) ---
40
50
  if ! git -C "$REPO_ROOT" show-ref --verify --quiet "refs/heads/$BRANCH" 2>/dev/null; then
41
- git -C "$REPO_ROOT" branch "$BRANCH" origin/develop >/dev/null 2>&1 || {
51
+ git -C "$REPO_ROOT" branch "$BRANCH" "origin/$BASE_BRANCH" >/dev/null 2>&1 || {
42
52
  echo "Error: failed to create branch $BRANCH" >&2
43
53
  exit 1
44
54
  }
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # WorktreeRemove hook — handles cleanup when a worktree is removed.
3
3
  # Receives {"worktree_path": "<path>"} on stdin. Best-effort, always exit 0.
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Worktree lifecycle management for Egregore sessions.
3
3
  # Each session gets an isolated worktree so parallel sessions don't conflict.
4
4
  #
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "source": "egregore-pi-meta-harness",
3
3
  "policy": "Pi-native lifecycle layer over the public-safe portable Codex skill corpus",
4
- "skillCount": 58,
4
+ "skillCount": 65,
5
5
  "skills": [
6
6
  "activity",
7
7
  "add",
@@ -9,6 +9,8 @@
9
9
  "answer",
10
10
  "archive",
11
11
  "ask",
12
+ "audit",
13
+ "autosave",
12
14
  "branch",
13
15
  "checkup",
14
16
  "commit",
@@ -17,7 +19,9 @@
17
19
  "dashboard",
18
20
  "deep-reflect",
19
21
  "delete-user",
22
+ "demo-mode",
20
23
  "deploy-bridge",
24
+ "design",
21
25
  "egregore-voice",
22
26
  "emissary",
23
27
  "env",
@@ -31,9 +35,11 @@
31
35
  "me",
32
36
  "meeting",
33
37
  "minion",
38
+ "mock",
34
39
  "note",
35
40
  "onboarding",
36
41
  "pr",
42
+ "product-voice",
37
43
  "project",
38
44
  "pull",
39
45
  "push",
@@ -49,6 +55,7 @@
49
55
  "summon",
50
56
  "sync-repos",
51
57
  "task",
58
+ "teams-connect",
52
59
  "telegram-connect",
53
60
  "telemetry",
54
61
  "test",
@@ -63,6 +70,7 @@
63
70
  "wrap"
64
71
  ],
65
72
  "files": [
73
+ ".claude/context/notification-consent.md",
66
74
  ".codex/config.toml",
67
75
  ".codex/hooks.json",
68
76
  ".codex/hooks/branch-guard.js",
@@ -73,6 +81,8 @@
73
81
  ".codex/skills/answer/SKILL.md",
74
82
  ".codex/skills/archive/SKILL.md",
75
83
  ".codex/skills/ask/SKILL.md",
84
+ ".codex/skills/audit/SKILL.md",
85
+ ".codex/skills/autosave/SKILL.md",
76
86
  ".codex/skills/branch/SKILL.md",
77
87
  ".codex/skills/checkup/SKILL.md",
78
88
  ".codex/skills/commit/SKILL.md",
@@ -81,11 +91,14 @@
81
91
  ".codex/skills/dashboard/SKILL.md",
82
92
  ".codex/skills/deep-reflect/SKILL.md",
83
93
  ".codex/skills/delete-user/SKILL.md",
94
+ ".codex/skills/demo-mode/SKILL.md",
84
95
  ".codex/skills/deploy-bridge/SKILL.md",
96
+ ".codex/skills/design/SKILL.md",
85
97
  ".codex/skills/egregore-voice/SKILL.md",
86
98
  ".codex/skills/emissary/SKILL.md",
87
99
  ".codex/skills/env/SKILL.md",
88
100
  ".codex/skills/handoff/SKILL.md",
101
+ ".codex/skills/harvest/QUESTION_PALETTE.md",
89
102
  ".codex/skills/harvest/SKILL.md",
90
103
  ".codex/skills/ingest-google/SKILL.md",
91
104
  ".codex/skills/ingest-user-interview/SKILL.md",
@@ -95,9 +108,11 @@
95
108
  ".codex/skills/me/SKILL.md",
96
109
  ".codex/skills/meeting/SKILL.md",
97
110
  ".codex/skills/minion/SKILL.md",
111
+ ".codex/skills/mock/SKILL.md",
98
112
  ".codex/skills/note/SKILL.md",
99
113
  ".codex/skills/onboarding/SKILL.md",
100
114
  ".codex/skills/pr/SKILL.md",
115
+ ".codex/skills/product-voice/SKILL.md",
101
116
  ".codex/skills/project/SKILL.md",
102
117
  ".codex/skills/pull/SKILL.md",
103
118
  ".codex/skills/push/SKILL.md",
@@ -115,6 +130,7 @@
115
130
  ".codex/skills/summon/SKILL.md",
116
131
  ".codex/skills/sync-repos/SKILL.md",
117
132
  ".codex/skills/task/SKILL.md",
133
+ ".codex/skills/teams-connect/SKILL.md",
118
134
  ".codex/skills/telegram-connect/SKILL.md",
119
135
  ".codex/skills/telemetry/SKILL.md",
120
136
  ".codex/skills/test/SKILL.md",
@@ -138,6 +154,7 @@
138
154
  "bin/activity-data.sh",
139
155
  "bin/agent.sh",
140
156
  "bin/attendant.sh",
157
+ "bin/autosave.sh",
141
158
  "bin/capture-reconcile.sh",
142
159
  "bin/capture-run.sh",
143
160
  "bin/codex-install-skills.sh",