create-egregore 0.18.0 → 0.18.1

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 (38) hide show
  1. package/package.json +4 -3
  2. package/runtime/codex/AGENTS.md +4 -292
  3. package/runtime/codex/bin/activity-data.sh +3 -6
  4. package/runtime/codex/bin/agent.sh +0 -0
  5. package/runtime/codex/bin/codex-install-skills.sh +0 -0
  6. package/runtime/codex/bin/codex-render-spec.mjs +0 -0
  7. package/runtime/codex/bin/codex-session-start.sh +0 -0
  8. package/runtime/codex/bin/codex-skill-render.mjs +0 -0
  9. package/runtime/codex/bin/codex-sync-skills.sh +0 -0
  10. package/runtime/codex/bin/dashboard-data.sh +2 -6
  11. package/runtime/codex/bin/graph-batch.sh +0 -0
  12. package/runtime/codex/bin/graph-op.sh +5 -22
  13. package/runtime/codex/bin/graph-wal.sh +0 -0
  14. package/runtime/codex/bin/graph.sh +0 -0
  15. package/runtime/codex/bin/handoff-pr-backfill.sh +0 -0
  16. package/runtime/codex/bin/handoff-run.sh +6 -144
  17. package/runtime/codex/bin/handoff-save-egregore.sh +0 -0
  18. package/runtime/codex/bin/index-handoff.sh +0 -0
  19. package/runtime/codex/bin/lib/artifact-id.sh +0 -0
  20. package/runtime/codex/bin/lib/config.sh +0 -0
  21. package/runtime/codex/bin/lib/context.sh +0 -48
  22. package/runtime/codex/bin/lib/ensure-develop.sh +0 -0
  23. package/runtime/codex/bin/lib/greeting.sh +2 -20
  24. package/runtime/codex/bin/lib/hash.sh +0 -0
  25. package/runtime/codex/bin/lib/time.sh +0 -0
  26. package/runtime/codex/bin/notify.sh +0 -0
  27. package/runtime/codex/bin/publish-artifact.sh +1 -15
  28. package/runtime/codex/bin/publish-references.sh +0 -0
  29. package/runtime/codex/bin/repo-state.sh +0 -0
  30. package/runtime/codex/bin/telemetry.sh +0 -0
  31. package/runtime/codex/bin/worktree-create.sh +8 -5
  32. package/runtime/codex/bin/worktree-remove.sh +0 -0
  33. package/runtime/codex/bin/worktree.sh +4 -5
  34. package/runtime/codex/manifest.json +3 -10
  35. package/runtime/codex/.codex/skills/comment/SKILL.md +0 -25
  36. package/runtime/codex/.codex/skills/edit/SKILL.md +0 -25
  37. package/runtime/codex/.codex/skills/edit-process/SKILL.md +0 -25
  38. package/runtime/codex/bin/lib/edit-loopback.mjs +0 -652
@@ -364,54 +364,6 @@ fi
364
364
  echo "$RICH" > "$CTX_DIR/addressed_rich"
365
365
  ) &
366
366
 
367
- # 6.5. Pending questions addressed to user (background)
368
- (
369
- PENDING_JSON="[]"
370
- QDIR="$SCRIPT_DIR/memory/knowledge/questions"
371
- if [ -d "$QDIR" ]; then
372
- # Match against the same identity variants used for handoffs (display name,
373
- # github first-name, people-file name) so "to: oz" matches author "oguzhan".
374
- _DISPLAY_Q=$(jq -r '.display_name // empty' "$STATE_FILE" 2>/dev/null)
375
- _GH_NAME_Q=$(jq -r '.github_name // empty' "$STATE_FILE" 2>/dev/null)
376
- _FIRST_NAME_Q=$(echo "$_GH_NAME_Q" | awk '{print tolower($1)}')
377
- _PEOPLE_FILE_Q="$SCRIPT_DIR/memory/people/$(echo "$AUTHOR" | tr '[:upper:]' '[:lower:]').md"
378
- _PEOPLE_NAME_Q=""
379
- [ -f "$_PEOPLE_FILE_Q" ] && _PEOPLE_NAME_Q=$(sed -n 's/^# *//p' "$_PEOPLE_FILE_Q" 2>/dev/null | head -1 | awk '{print tolower($1)}')
380
-
381
- LINES=""
382
- for QF in "$QDIR"/*.md; do
383
- [ -f "$QF" ] || continue
384
- Q_TO=$(sed -n 's/^to:[[:space:]]*//p' "$QF" 2>/dev/null | head -1 | tr -d '"' | tr '[:upper:]' '[:lower:]' | awk '{print $1}')
385
- [ -z "$Q_TO" ] && continue
386
- _MATCH="false"
387
- for _V in "$AUTHOR" "$_DISPLAY_Q" "$_FIRST_NAME_Q" "$_PEOPLE_NAME_Q"; do
388
- [ -z "$_V" ] && continue
389
- _V_LC=$(echo "$_V" | tr '[:upper:]' '[:lower:]')
390
- [ "$Q_TO" = "$_V_LC" ] && _MATCH="true" && break
391
- done
392
- [ "$_MATCH" = "true" ] || continue
393
- Q_STATUS=$(sed -n 's/^status:[[:space:]]*//p' "$QF" 2>/dev/null | head -1 | tr -d '"')
394
- [ "$Q_STATUS" = "pending" ] || continue
395
- Q_FROM=$(sed -n 's/^from:[[:space:]]*//p' "$QF" 2>/dev/null | head -1 | tr -d '"')
396
- Q_TOPIC=$(sed -n 's/^topic:[[:space:]]*//p' "$QF" 2>/dev/null | head -1 | tr -d '"')
397
- Q_HID=$(sed -n 's/^harvest_id:[[:space:]]*//p' "$QF" 2>/dev/null | head -1 | tr -d '"')
398
- Q_REL="${QF#$SCRIPT_DIR/}"
399
- LINE=$(jq -nc \
400
- --arg from "$Q_FROM" \
401
- --arg topic "$Q_TOPIC" \
402
- --arg hid "$Q_HID" \
403
- --arg file "$Q_REL" \
404
- '{from:$from, topic:$topic, harvest_id:$hid, file:$file}' 2>/dev/null)
405
- [ -n "$LINE" ] && LINES="$LINES$LINE
406
- "
407
- done
408
- if [ -n "$LINES" ]; then
409
- PENDING_JSON=$(echo "$LINES" | jq -sc '.' 2>/dev/null || echo "[]")
410
- fi
411
- fi
412
- echo "$PENDING_JSON" > "$CTX_DIR/pending_questions"
413
- ) &
414
-
415
367
  # 7. Graph health (background — zero added latency, runs in parallel)
416
368
  (
417
369
  if [ "$LOCAL_MODE" = "true" ]; then
File without changes
@@ -112,26 +112,8 @@ if [ "$ADDRESSED_COUNT" -gt 0 ] 2>/dev/null && [ "$ADDRESSED_COUNT" != "0" ]; th
112
112
  done
113
113
  fi
114
114
 
115
- # Pending questions addressed to you (one summary line — /answer to engage)
116
- PENDING_Q=$(cat "$CTX_DIR/pending_questions" 2>/dev/null || echo "[]")
117
- PENDING_Q_COUNT=$(echo "$PENDING_Q" | jq 'length' 2>/dev/null || echo "0")
118
- if [ "$PENDING_Q_COUNT" -gt 0 ] 2>/dev/null && [ "$PENDING_Q_COUNT" != "0" ]; then
119
- PQ_SENDERS=$(echo "$PENDING_Q" | jq -r '[.[].from] | unique | join(", ")' 2>/dev/null)
120
- if [ "$PENDING_Q_COUNT" = "1" ]; then
121
- PQ_NOUN="question"
122
- else
123
- PQ_NOUN="questions"
124
- fi
125
- if [ -n "$PQ_SENDERS" ]; then
126
- printf " ◐ %s pending %s from %s — /answer to engage\n" "$PENDING_Q_COUNT" "$PQ_NOUN" "$PQ_SENDERS"
127
- else
128
- printf " ◐ %s pending %s — /answer to engage\n" "$PENDING_Q_COUNT" "$PQ_NOUN"
129
- fi
130
- fi
131
-
132
- # Fallback: last activity if no handoffs and no pending questions
133
- if { [ "$ADDRESSED_COUNT" = "0" ] || [ -z "$ADDRESSED_COUNT" ]; } \
134
- && { [ "$PENDING_Q_COUNT" = "0" ] || [ -z "$PENDING_Q_COUNT" ]; }; then
115
+ # Fallback: last activity if no handoffs
116
+ if [ "$ADDRESSED_COUNT" = "0" ] || [ -z "$ADDRESSED_COUNT" ]; then
135
117
  LAST_ACTIVITY=$(cat "$CTX_DIR/activity" 2>/dev/null || echo "")
136
118
  if [ -n "$LAST_ACTIVITY" ]; then
137
119
  LA_TIME=$(echo "$LAST_ACTIVITY" | cut -d'|' -f1)
File without changes
File without changes
File without changes
@@ -72,7 +72,6 @@ fi
72
72
  if [ -f "$SCRIPT_DIR/.env" ]; then
73
73
  EGREGORE_API_URL="${EGREGORE_API_URL:-$(grep '^EGREGORE_API_URL=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2- || true)}"
74
74
  EGREGORE_API_KEY="${EGREGORE_API_KEY:-$(grep '^EGREGORE_API_KEY=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2- || true)}"
75
- EGREGORE_USE_PUBLISHED="${EGREGORE_USE_PUBLISHED:-$(grep '^EGREGORE_USE_PUBLISHED=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2- || true)}"
76
75
  fi
77
76
 
78
77
  API_URL="${EGREGORE_API_URL:-$(jq -r '.api_url // empty' "$CONFIG" 2>/dev/null)}"
@@ -80,16 +79,6 @@ API_KEY="${EGREGORE_API_KEY:-}"
80
79
  ORG_SLUG="$(jq -r '.slug // empty' "$CONFIG" 2>/dev/null)"
81
80
  VIEW_BASE="https://egregore.xyz/view"
82
81
 
83
- # Resolve "use published renderer" from env first, then egregore.json. The
84
- # env var lets individuals override per-shell; egregore.json lets an
85
- # instance (e.g. the upstream dev repo) opt in for every teammate.
86
- if [ -z "${EGREGORE_USE_PUBLISHED:-}" ]; then
87
- CONFIG_USE_PUBLISHED="$(jq -r '.prefer_published_artifacts // empty' "$CONFIG" 2>/dev/null)"
88
- if [ "$CONFIG_USE_PUBLISHED" = "true" ]; then
89
- EGREGORE_USE_PUBLISHED=1
90
- fi
91
- fi
92
-
93
82
  # Public relay for OSS share endpoint
94
83
  RELAY_URL="https://egregore-production-55f2.up.railway.app"
95
84
 
@@ -114,11 +103,8 @@ else
114
103
  # have been installed — that way local edits to packages/egregore-artifacts
115
104
  # are exercised without waiting for an npm release. Fall back to the
116
105
  # published `npx egregore-artifacts` otherwise.
117
- # Set EGREGORE_USE_PUBLISHED=1 to force the npm-published renderer even
118
- # when a local install is present — useful in the upstream dev repo to
119
- # dogfood what teammates and OSS users actually run.
120
106
  LOCAL_CLI="$SCRIPT_DIR/packages/egregore-artifacts/bin/cli.js"
121
- if [ "${EGREGORE_USE_PUBLISHED:-0}" != "1" ] && [ -f "$LOCAL_CLI" ] && [ -d "$SCRIPT_DIR/packages/egregore-artifacts/node_modules/react" ]; then
107
+ if [ -f "$LOCAL_CLI" ] && [ -d "$SCRIPT_DIR/packages/egregore-artifacts/node_modules/react" ]; then
122
108
  if ! node "$LOCAL_CLI" "${RENDER_ARGS[@]}" >/dev/null 2>&1; then
123
109
  exit 0
124
110
  fi
File without changes
File without changes
File without changes
@@ -58,12 +58,15 @@ git -C "$REPO_ROOT" worktree add "$WT_PATH" "$BRANCH" --quiet 2>/dev/null || {
58
58
  }
59
59
 
60
60
  # --- Symlinks (same as worktree.sh setup) ---
61
- # Memory
62
- if [ -L "$REPO_ROOT/memory" ] || [ -d "$REPO_ROOT/memory" ]; then
61
+ # Memory — may be a symlink (follow to its target) or a real directory.
62
+ MEMORY_TARGET=""
63
+ if [ -L "$REPO_ROOT/memory" ]; then
63
64
  MEMORY_TARGET=$(realpath "$REPO_ROOT/memory" 2>/dev/null)
64
- if [ -n "$MEMORY_TARGET" ] && [ -d "$MEMORY_TARGET" ]; then
65
- ln -sfn "$MEMORY_TARGET" "$WT_PATH/memory"
66
- fi
65
+ elif [ -d "$REPO_ROOT/memory" ]; then
66
+ MEMORY_TARGET="$REPO_ROOT/memory"
67
+ fi
68
+ if [ -n "$MEMORY_TARGET" ] && [ -d "$MEMORY_TARGET" ]; then
69
+ ln -sfn "$MEMORY_TARGET" "$WT_PATH/memory"
67
70
  fi
68
71
 
69
72
  # .env
File without changes
@@ -41,11 +41,10 @@ case "$CMD" in
41
41
  SRC="$MAIN_DIR/$FILE"
42
42
  DST="$WT_PATH/$FILE"
43
43
  if [ "$FILE" = "memory" ]; then
44
- # Follow the shared memory symlink or direct directory to get an
45
- # absolute path. Most installs use a symlink; local/dev fixtures may
46
- # use a directory.
47
- [ -L "$SRC" ] || [ -d "$SRC" ] || continue
48
- SRC=$(realpath "$SRC" 2>/dev/null) || continue
44
+ # memory may be a symlink (follow to its target) or a real directory.
45
+ if [ -L "$SRC" ]; then
46
+ SRC=$(realpath "$SRC" 2>/dev/null) || continue
47
+ fi
49
48
  [ -d "$SRC" ] || continue
50
49
  else
51
50
  [ -f "$SRC" ] || continue
@@ -1,8 +1,7 @@
1
1
  {
2
- "generatedAt": "2026-06-15T13:36:14.132Z",
3
2
  "source": "egregore-runtime",
4
- "policy": "public-safe subset derived from .syncignore; internal .codex/skills exclusions omitted",
5
- "skillCount": 55,
3
+ "policy": "public-safe subset derived from .syncignore; built by scripts/build-runtime-bundle.mjs",
4
+ "skillCount": 52,
6
5
  "skills": [
7
6
  "activity",
8
7
  "add",
@@ -12,15 +11,12 @@
12
11
  "ask",
13
12
  "branch",
14
13
  "checkup",
15
- "comment",
16
14
  "commit",
17
15
  "contribute",
18
16
  "dark-mode",
19
17
  "dashboard",
20
18
  "deep-reflect",
21
19
  "delete-user",
22
- "edit",
23
- "edit-process",
24
20
  "egregore-voice",
25
21
  "emissary",
26
22
  "env",
@@ -61,6 +57,7 @@
61
57
  "wrap"
62
58
  ],
63
59
  "files": [
60
+ ".agents/skills",
64
61
  ".codex/config.toml",
65
62
  ".codex/hooks.json",
66
63
  ".codex/hooks/branch-guard.js",
@@ -72,15 +69,12 @@
72
69
  ".codex/skills/ask/SKILL.md",
73
70
  ".codex/skills/branch/SKILL.md",
74
71
  ".codex/skills/checkup/SKILL.md",
75
- ".codex/skills/comment/SKILL.md",
76
72
  ".codex/skills/commit/SKILL.md",
77
73
  ".codex/skills/contribute/SKILL.md",
78
74
  ".codex/skills/dark-mode/SKILL.md",
79
75
  ".codex/skills/dashboard/SKILL.md",
80
76
  ".codex/skills/deep-reflect/SKILL.md",
81
77
  ".codex/skills/delete-user/SKILL.md",
82
- ".codex/skills/edit-process/SKILL.md",
83
- ".codex/skills/edit/SKILL.md",
84
78
  ".codex/skills/egregore-voice/SKILL.md",
85
79
  ".codex/skills/emissary/SKILL.md",
86
80
  ".codex/skills/env/SKILL.md",
@@ -141,7 +135,6 @@
141
135
  "bin/lib/config.sh",
142
136
  "bin/lib/context.sh",
143
137
  "bin/lib/dashboard-artifact.sh",
144
- "bin/lib/edit-loopback.mjs",
145
138
  "bin/lib/ensure-develop.sh",
146
139
  "bin/lib/git-sync.sh",
147
140
  "bin/lib/greeting.sh",
@@ -1,25 +0,0 @@
1
- ---
2
- name: comment
3
- description: 'Fallback Codex adapter for the Egregore comment workflow.'
4
- ---
5
-
6
- <!-- generated-by: bin/codex-sync-skills.sh -->
7
-
8
- # Egregore comment Adapter
9
-
10
- This is fallback coverage for a long-tail Egregore workflow that has not been
11
- ported to a hand-written Codex-native skill yet.
12
-
13
- Use the project shell and filesystem directly. Do not invoke Claude Code
14
- commands. Translate interactive choices to structured Codex question tooling
15
- when it is available; otherwise render compact numbered choices with an
16
- `Other:` option and wait for the user.
17
-
18
- 1. Read `.claude/skills/comment/SKILL.md` for the workflow details.
19
- 2. Run the referenced `bin/` scripts directly from Codex.
20
- 3. Treat graph, publish, and notify steps as best-effort unless that workflow
21
- explicitly says they are required.
22
- 4. Keep local-mode behavior filesystem-first and avoid graph or notification
23
- calls when `egregore.json` declares `"mode": "local"`.
24
- 5. Never call the deprecated `egregore-handoff` CLI for Egregore project
25
- handoffs.
@@ -1,25 +0,0 @@
1
- ---
2
- name: edit
3
- description: 'Fallback Codex adapter for the Egregore edit workflow.'
4
- ---
5
-
6
- <!-- generated-by: bin/codex-sync-skills.sh -->
7
-
8
- # Egregore edit Adapter
9
-
10
- This is fallback coverage for a long-tail Egregore workflow that has not been
11
- ported to a hand-written Codex-native skill yet.
12
-
13
- Use the project shell and filesystem directly. Do not invoke Claude Code
14
- commands. Translate interactive choices to structured Codex question tooling
15
- when it is available; otherwise render compact numbered choices with an
16
- `Other:` option and wait for the user.
17
-
18
- 1. Read `.claude/skills/edit/SKILL.md` for the workflow details.
19
- 2. Run the referenced `bin/` scripts directly from Codex.
20
- 3. Treat graph, publish, and notify steps as best-effort unless that workflow
21
- explicitly says they are required.
22
- 4. Keep local-mode behavior filesystem-first and avoid graph or notification
23
- calls when `egregore.json` declares `"mode": "local"`.
24
- 5. Never call the deprecated `egregore-handoff` CLI for Egregore project
25
- handoffs.
@@ -1,25 +0,0 @@
1
- ---
2
- name: edit-process
3
- description: 'Fallback Codex adapter for the Egregore edit-process workflow.'
4
- ---
5
-
6
- <!-- generated-by: bin/codex-sync-skills.sh -->
7
-
8
- # Egregore edit-process Adapter
9
-
10
- This is fallback coverage for a long-tail Egregore workflow that has not been
11
- ported to a hand-written Codex-native skill yet.
12
-
13
- Use the project shell and filesystem directly. Do not invoke Claude Code
14
- commands. Translate interactive choices to structured Codex question tooling
15
- when it is available; otherwise render compact numbered choices with an
16
- `Other:` option and wait for the user.
17
-
18
- 1. Read `.claude/skills/edit-process/SKILL.md` for the workflow details.
19
- 2. Run the referenced `bin/` scripts directly from Codex.
20
- 3. Treat graph, publish, and notify steps as best-effort unless that workflow
21
- explicitly says they are required.
22
- 4. Keep local-mode behavior filesystem-first and avoid graph or notification
23
- calls when `egregore.json` declares `"mode": "local"`.
24
- 5. Never call the deprecated `egregore-handoff` CLI for Egregore project
25
- handoffs.