@neikyun/ciel 6.9.0 → 6.9.2
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/assets/.claude/hooks/pre-agent-gate.sh +55 -0
- package/assets/.claude/hooks/pre-tool-write.sh +83 -0
- package/assets/.claude/hooks/session-start.sh +34 -1
- package/assets/.claude/hooks/session-version-check.sh +14 -0
- package/assets/.claude/hooks/user-prompt-submit.sh +19 -10
- package/assets/.claude/settings.json +5 -5
- package/assets/CLAUDE.md +19 -0
- package/assets/commands/ciel-audit.md +27 -3
- package/assets/commands/ciel-status.md +1 -1
- package/dist/cli/claude.d.ts +12 -0
- package/dist/cli/claude.d.ts.map +1 -1
- package/dist/cli/claude.js +69 -13
- package/dist/cli/claude.js.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.cjs +7 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Ciel — PreToolUse hook for Agent (subagent type gate)
|
|
3
|
+
# Trigger: PreToolUse on Agent
|
|
4
|
+
# Purpose: block Agent dispatches that don't use a ciel-* subagent_type.
|
|
5
|
+
# Generic agents bypass Haiku model, call caps, and researcher waterfall
|
|
6
|
+
# → cost 20K-160K tokens vs ~5K for a constrained Ciel agent.
|
|
7
|
+
#
|
|
8
|
+
# Escape hatch: include [CIEL_GATE_BYPASS] anywhere in the prompt to allow
|
|
9
|
+
# a non-ciel agent through (e.g. legitimate one-off native dispatch).
|
|
10
|
+
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
input_json=""
|
|
14
|
+
if [ ! -t 0 ]; then
|
|
15
|
+
input_json=$(cat)
|
|
16
|
+
fi
|
|
17
|
+
[ -z "$input_json" ] && exit 0
|
|
18
|
+
|
|
19
|
+
parsed=$(echo "$input_json" | python3 -c "
|
|
20
|
+
import json, sys
|
|
21
|
+
try:
|
|
22
|
+
d = json.load(sys.stdin)
|
|
23
|
+
tool_input = d.get('tool_input', {})
|
|
24
|
+
subagent_type = tool_input.get('subagent_type', '')
|
|
25
|
+
prompt = tool_input.get('prompt', '')
|
|
26
|
+
print(subagent_type + '\t' + prompt[:200])
|
|
27
|
+
except Exception:
|
|
28
|
+
print('\t')
|
|
29
|
+
" 2>/dev/null)
|
|
30
|
+
|
|
31
|
+
subagent_type="${parsed%%$'\t'*}"
|
|
32
|
+
prompt_head="${parsed#*$'\t'}"
|
|
33
|
+
|
|
34
|
+
# Allow explicit bypass
|
|
35
|
+
if echo "$prompt_head" | grep -q "\[CIEL_GATE_BYPASS\]"; then
|
|
36
|
+
exit 0
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Allow ciel-* subagent types
|
|
40
|
+
if [[ "$subagent_type" == ciel-* ]]; then
|
|
41
|
+
exit 0
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# Block everything else — generic or non-ciel subagent_type
|
|
45
|
+
label="${subagent_type:-<missing>}"
|
|
46
|
+
python3 -c "
|
|
47
|
+
import json
|
|
48
|
+
print(json.dumps({
|
|
49
|
+
'hookSpecificOutput': {
|
|
50
|
+
'hookEventName': 'PreToolUse',
|
|
51
|
+
'permissionDecision': 'deny',
|
|
52
|
+
'permissionDecisionReason': '[CIEL AGENT GATE] Blocked: subagent_type=\"${label}\" is not a Ciel agent. Re-dispatch with subagent_type=\"ciel-researcher\" | \"ciel-explorer\" | \"ciel-critic\" | \"ciel-improver\". Generic agents bypass Haiku model, call caps, and researcher waterfall early-exit. Add [CIEL_GATE_BYPASS] to prompt to force-allow a non-Ciel dispatch.'
|
|
53
|
+
}
|
|
54
|
+
}))"
|
|
55
|
+
exit 0
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Ciel — PreToolUse hook for Write/Edit
|
|
3
|
+
# Trigger: PreToolUse on Write|Edit
|
|
4
|
+
# Purpose: inject faire-gatekeeper + dispatch gate + pipeline reminders before code write
|
|
5
|
+
# Critical files get additional stride-analyzer hint
|
|
6
|
+
# Always exits 0 (never blocks), outputs reminders via stderr (reliable channel)
|
|
7
|
+
# Dispatch counter: /tmp/ciel_dispatched set by SubagentStart hooks (ciel-researcher/explorer)
|
|
8
|
+
|
|
9
|
+
INPUT=$(cat)
|
|
10
|
+
|
|
11
|
+
FILE_PATH=$(echo "$INPUT" | python3 -c "
|
|
12
|
+
import sys, json
|
|
13
|
+
try:
|
|
14
|
+
d = json.load(sys.stdin)
|
|
15
|
+
tip = d.get('tool_input', {})
|
|
16
|
+
print(tip.get('file_path', tip.get('path', '')))
|
|
17
|
+
except:
|
|
18
|
+
print('')
|
|
19
|
+
" 2>/dev/null || echo "")
|
|
20
|
+
|
|
21
|
+
[ -z "$FILE_PATH" ] && exit 0
|
|
22
|
+
|
|
23
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-}"
|
|
24
|
+
|
|
25
|
+
# === DISPATCH GATE CHECK ===
|
|
26
|
+
# /tmp/ciel_dispatched is created by SubagentStart hooks when ciel-researcher/explorer dispatch
|
|
27
|
+
DISPATCHED=0
|
|
28
|
+
DISPATCH_FLAG="/tmp/ciel_dispatched"
|
|
29
|
+
if [ -f "$DISPATCH_FLAG" ]; then
|
|
30
|
+
DISPATCHED=1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# === FILE TRACK COUNT (RELIRE GATE) ===
|
|
34
|
+
COUNT=0
|
|
35
|
+
if [ -n "$PROJECT_DIR" ] && [ -f "$PROJECT_DIR/.ciel/tracked-files.json" ]; then
|
|
36
|
+
COUNT=$(CIEL_PATH="$PROJECT_DIR/.ciel/tracked-files.json" python3 -c "
|
|
37
|
+
import json, os
|
|
38
|
+
try: print(len(json.load(open(os.environ['CIEL_PATH']))))
|
|
39
|
+
except: print(0)
|
|
40
|
+
" 2>/dev/null || echo "0")
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Build warnings
|
|
44
|
+
WARNINGS=""
|
|
45
|
+
|
|
46
|
+
# Dispatch gate warning (no dispatched agents on non-trivial write)
|
|
47
|
+
if [ "$DISPATCHED" -eq 0 ] && [ "$COUNT" -ge 1 ]; then
|
|
48
|
+
WARNINGS="${WARNINGS}[DISPATCH GATE] WARNING: Writing file ${FILE_PATH} without prior Task() dispatch (ciel-researcher + ciel-explorer). Was this classified as Trivial? If Standard+, dispatch subagents BEFORE writing code."
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# RELIRE gate warning
|
|
52
|
+
if [ "${COUNT:-0}" -ge 2 ] 2>/dev/null; then
|
|
53
|
+
PIPELINE_WARN=" | CIEL PIPELINE: ${COUNT} file(s) edited. Have researcher+explorer been dispatched? If 3+ files: ciel-critic MODE=RELIRE required before merge."
|
|
54
|
+
WARNINGS="${WARNINGS}${PIPELINE_WARN}"
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# If only dispatch gate fires, prefix to std err
|
|
58
|
+
if [ -n "$WARNINGS" ]; then
|
|
59
|
+
echo "[CIEL PRE-WRITE]" >&2
|
|
60
|
+
echo "$WARNINGS" | while IFS= read -r line; do
|
|
61
|
+
echo " $line" >&2
|
|
62
|
+
done
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# === FAIRE GATE REMINDER ===
|
|
66
|
+
# Skip non-code files
|
|
67
|
+
if ! echo "$FILE_PATH" | grep -qE '\.(kt|java|ts|tsx|js|jsx|py|go|rs|rb|php|cs|cpp|c|swift|scala|vue|svelte|sql|sh|json|yaml|yml|toml)$'; then
|
|
68
|
+
exit 0
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
# Check if file is critical path
|
|
72
|
+
CRITICAL=false
|
|
73
|
+
if echo "$FILE_PATH" | grep -qiE '(auth|Auth|security|Security|Token|Session|Password|Secret)'; then
|
|
74
|
+
CRITICAL=true
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
if $CRITICAL; then
|
|
78
|
+
echo " [CIEL] Critical path: invoke faire-gatekeeper, stride-analyzer must have run, test-first (RED)." >&2
|
|
79
|
+
else
|
|
80
|
+
echo " [CIEL] Standard path: invoke faire-gatekeeper (alternatives, idiomatic, quality, removal, test-first)." >&2
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
exit 0
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
INPUT=$(cat 2>/dev/null || echo "{}")
|
|
8
8
|
CWD=$(echo "$INPUT" | python3 -c "import sys, json; print(json.load(sys.stdin).get('cwd', ''))" 2>/dev/null || pwd)
|
|
9
|
+
# python3 succeeds with an empty string when stdin JSON lacks a 'cwd' key — fall through to pwd.
|
|
10
|
+
[ -z "$CWD" ] && CWD="$(pwd)"
|
|
9
11
|
|
|
10
12
|
# Detect overlay presence
|
|
11
13
|
OVERLAY=""
|
|
@@ -25,7 +27,38 @@ fi
|
|
|
25
27
|
TRACE_ID=$(date -u +%Y%m%dT%H%M%SZ)-$$
|
|
26
28
|
export CIEL_TRACE_ID="$TRACE_ID"
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
# Resolve Ciel version at runtime (single source of truth, no hardcoded drift).
|
|
31
|
+
# Fallback chain: project sentinel → user sentinel → npm package → marketplace plugin → repo VERSION → unknown.
|
|
32
|
+
# Note: $HOME/.ciel/version is "last writer wins" across npm installs from different projects —
|
|
33
|
+
# project sentinel ($CWD/.ciel/version) is authoritative when present.
|
|
34
|
+
_resolve_ciel_version() {
|
|
35
|
+
local v=""
|
|
36
|
+
for f in \
|
|
37
|
+
"$CWD/.ciel/version" \
|
|
38
|
+
"$HOME/.ciel/version" \
|
|
39
|
+
"$HOME/.claude/plugins/ciel/package.json" \
|
|
40
|
+
"$HOME/.claude/plugins/ciel/.claude-plugin/plugin.json" \
|
|
41
|
+
"$(dirname "$0")/../../VERSION" \
|
|
42
|
+
"$(dirname "$0")/../VERSION"; do
|
|
43
|
+
# Skip entries that resolved against an empty $CWD/$HOME (e.g., "/.ciel/version").
|
|
44
|
+
case "$f" in /.ciel/*|/.claude/*) continue ;; esac
|
|
45
|
+
[ -r "$f" ] || continue
|
|
46
|
+
case "$f" in
|
|
47
|
+
*.json)
|
|
48
|
+
# Anchor to line-start whitespace so we only match top-level "version",
|
|
49
|
+
# not nested keys like "schema_version" or `"version"` deeper in the doc.
|
|
50
|
+
v=$(sed -n 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$f" 2>/dev/null | head -1)
|
|
51
|
+
;;
|
|
52
|
+
*)
|
|
53
|
+
v=$(tr -d '[:space:]' <"$f" 2>/dev/null)
|
|
54
|
+
;;
|
|
55
|
+
esac
|
|
56
|
+
[ -n "$v" ] && { echo "$v"; return; }
|
|
57
|
+
done
|
|
58
|
+
echo "unknown"
|
|
59
|
+
}
|
|
60
|
+
CIEL_VERSION="$(_resolve_ciel_version)"
|
|
61
|
+
MSG="CIEL v${CIEL_VERSION} — Skills-first deep-reasoning active. "
|
|
29
62
|
if [[ -n "$OVERLAY" ]]; then
|
|
30
63
|
MSG+="Overlay loaded: $OVERLAY. "
|
|
31
64
|
else
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Ciel — Session-start version check
|
|
3
|
+
# Outputs to stderr so the user sees the notification.
|
|
4
|
+
# Non-blocking: silent on fetch failure (offline/proxy).
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
|
|
8
|
+
LOCAL_VERSION=$(cat "$PROJECT_DIR/VERSION" 2>/dev/null || echo "0.0.0")
|
|
9
|
+
|
|
10
|
+
REMOTE_VERSION=$(curl -fsSL --connect-timeout 3 "https://raw.githubusercontent.com/KaosKyun/Ciel/main/VERSION" 2>/dev/null || true)
|
|
11
|
+
|
|
12
|
+
if [ -n "$REMOTE_VERSION" ] && [ "$REMOTE_VERSION" != "$LOCAL_VERSION" ]; then
|
|
13
|
+
echo "[CIEL] Update available: v${LOCAL_VERSION} → v${REMOTE_VERSION}. Run /ciel-update to upgrade." >&2
|
|
14
|
+
fi
|
|
@@ -51,20 +51,29 @@ except: print(0)
|
|
|
51
51
|
fi
|
|
52
52
|
fi
|
|
53
53
|
|
|
54
|
-
# ─── Cued-recall: intervention
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
54
|
+
# ─── Cued-recall: intervention + explicit-save detection ─────────────────────
|
|
55
|
+
# Two narrow buckets, BOTH high-precision (POSIX-ERE, no PCRE lookahead):
|
|
56
|
+
# 1. Intervention regex — user corrections ("you forgot", "non en fait", …)
|
|
57
|
+
# 2. Explicit save-request regex — direct capture asks ("save this to memory", …)
|
|
58
|
+
# Bare verbs without an explicit memory noun (e.g. "remember to commit",
|
|
59
|
+
# "memorise this") are deliberately NOT triggers — an earlier draft used
|
|
60
|
+
# `remember (this|that|it|to)` and fired on every casual "I'll remember to X"
|
|
61
|
+
# prompt, polluting the cued-recall corpus. Each save-request branch REQUIRES
|
|
62
|
+
# the noun `memory`/`mémoire` OR the unambiguous verb+object pair
|
|
63
|
+
# `mémorise <ça/cela/ceci>` / `memorise <this/that/it>`. Anchored to sentence
|
|
64
|
+
# boundary so trailing "remember" never fires. See ADR-0001, skill `memoire`,
|
|
65
|
+
# and packages/ciel/test/hooks-regex.test.ts.
|
|
61
66
|
INTERVENTION_GATE=""
|
|
62
|
-
#
|
|
63
|
-
# to avoid false positives on generic words (wait/stop/actually). Each pattern
|
|
64
|
-
# is a clear signal of correction or "you missed something".
|
|
67
|
+
# Bucket 1: corrections / "you missed something" (unchanged from v6.2 — proven precise)
|
|
65
68
|
if echo "$PROMPT" | grep -qiE "(tu as oublié|t'as oublié|n'oublie pas (que|de)|non en fait|non,? en fait|attention que|rappelle-toi (que|de)|ici on (fait|utilise) plutôt|non on (fait|utilise) plutôt|en fait c'est pas|c'est pas comme ça|mauvaise approche|tu te trompes|you forgot (to|that)|don't forget (to|that)|that's not (right|correct|how)|that's wrong|no[,]? actually|actually,? no|wait[,—-] (no|don't|you forgot)|stop[,—-] (no|you forgot|don't))"; then
|
|
66
69
|
INTERVENTION_GATE=" | CAPTURE GATE: intervention pattern detected — propose AskUserQuestion to capture as memory under .ciel/memory/episodes/ (skill: memoire). Never silent-write."
|
|
67
70
|
fi
|
|
71
|
+
# Bucket 2: explicit save requests — every branch requires the memory noun or
|
|
72
|
+
# unambiguous mémorise/memorise+object. Anchored to start-of-prompt or
|
|
73
|
+
# sentence boundary so "I'll remember the memory of …" never fires.
|
|
74
|
+
if [ -z "$INTERVENTION_GATE" ] && echo "$PROMPT" | grep -qiE "(^|[[:space:].!?])(save (this|that|it) (to|in|into) (the )?memory|put (this|that|it) (in|into) (the )?memory|put (it|this|that) in (the )?memory of ciel|garde (ça|cela|ceci) en (mémoire|memoire)|mets (ça|cela|ceci) en (mémoire|memoire)|enregistre (ça|cela|ceci) (en|dans la|à la) (mémoire|memoire)|sauvegarde (ça|cela|ceci) (en|dans la|à la) (mémoire|memoire)|mémorise (ça|cela|ceci)|memorise (this|that|it))"; then
|
|
75
|
+
INTERVENTION_GATE=" | CAPTURE GATE: explicit save request detected — propose AskUserQuestion then capture as memory under .ciel/memory/episodes/ via memory-engine.py (skill: memoire). NEVER write to Claude Code auto-memory (~/.claude/projects/<slug>/memory/MEMORY.md) — that is a DIFFERENT system and invisible to /ciel-audit. Never silent-write."
|
|
76
|
+
fi
|
|
68
77
|
|
|
69
78
|
# ─── Cued-recall: query memory engine for matching memories ──────────────────
|
|
70
79
|
# Calls hooks/memory-engine.py if installed and a memory corpus exists. The
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"autoMemoryEnabled":
|
|
2
|
+
"autoMemoryEnabled": false,
|
|
3
3
|
"permissions": {
|
|
4
4
|
"allow": [
|
|
5
5
|
"Bash(npx ciel-init *)",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"hooks": [
|
|
21
21
|
{
|
|
22
22
|
"type": "command",
|
|
23
|
-
"command": "echo \"[CIEL v6] Session started — Pipeline: DOCS → QUOI → ASK → AVEC QUOI → DIVERGE → RECHERCHE → CODEBASE → EVALUER → ASK2 → FAIRE → RELIRE → PROUVER → MEMOIRE → META\" && \"$CLAUDE_PROJECT_DIR\"/hooks/session-version-check.sh"
|
|
23
|
+
"command": "echo \"[CIEL v6] Session started — Pipeline: DOCS → QUOI → ASK → AVEC QUOI → DIVERGE → RECHERCHE → CODEBASE → EVALUER → ASK2 → FAIRE → RELIRE → PROUVER → MEMOIRE → META\" && \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/session-version-check.sh"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"type": "command",
|
|
38
|
-
"command": "\"$CLAUDE_PROJECT_DIR\"/hooks/pre-tool-write.sh"
|
|
38
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-tool-write.sh"
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"hooks": [
|
|
55
55
|
{
|
|
56
56
|
"type": "command",
|
|
57
|
-
"command": "\"$CLAUDE_PROJECT_DIR\"/hooks/pre-agent-gate.sh"
|
|
57
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-agent-gate.sh"
|
|
58
58
|
}
|
|
59
59
|
]
|
|
60
60
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"type": "command",
|
|
72
|
-
"command": "COUNT=$(cat \"$CLAUDE_PROJECT_DIR/.ciel/tracked-files.json\" 2>/dev/null | python3 -c \"import sys,json; d=json.load(sys.stdin); print(len(d))\" 2>/dev/null || echo \"?\"); echo \"[CIEL] Tracked files: $COUNT — RELIRE recommended at 5+ files or on Critical paths\" >&2"
|
|
72
|
+
"command": "COUNT=$(cat \"${CLAUDE_PROJECT_DIR:-$PWD}/.ciel/tracked-files.json\" 2>/dev/null | python3 -c \"import sys,json; d=json.load(sys.stdin); print(len(d))\" 2>/dev/null || echo \"?\"); echo \"[CIEL] Tracked files: $COUNT — RELIRE recommended at 5+ files or on Critical paths\" >&2"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
}
|
package/assets/CLAUDE.md
CHANGED
|
@@ -151,6 +151,25 @@ The MEMOIRE step writes to a structured corpus that auto-replays when context cu
|
|
|
151
151
|
|
|
152
152
|
**Capture is never auto-silent** — the model surfaces a confirmation question to the user before writing a memory.
|
|
153
153
|
|
|
154
|
+
### Ciel memory ≠ Claude Code auto-memory (HARD ROUTING RULE)
|
|
155
|
+
|
|
156
|
+
Claude Code ships an independent **auto-memory** system (`~/.claude/projects/<slug>/memory/MEMORY.md`) that is **NOT** the Ciel cued-recall corpus. They are different stores with different scopes, formats, and consumers.
|
|
157
|
+
|
|
158
|
+
| | Ciel cued-recall | Claude Code auto-memory |
|
|
159
|
+
|--|--|--|
|
|
160
|
+
| Location | `.ciel/memory/episodes/` (in repo) | `~/.claude/projects/<slug>/memory/MEMORY.md` (per machine, outside repo) |
|
|
161
|
+
| Portable | ✅ ships with the project | ❌ machine-local, lost on `git clone` |
|
|
162
|
+
| Seen by `/ciel-audit` | ✅ Dim 9 reads `index.json` | ❌ invisible |
|
|
163
|
+
| Cued retrieval | ✅ auto-replays on path/symbol/intent match | ❌ broad context injection only |
|
|
164
|
+
| Write API | `python3 hooks/memory-engine.py capture …` | Internal Claude Code tool |
|
|
165
|
+
|
|
166
|
+
**Routing rule (mandatory)**: when the user says "save to memory", "remember this", "put it in memory", "mémoire", "retiens", "enregistre", "garde en mémoire", or any synonym in any language:
|
|
167
|
+
|
|
168
|
+
1. The target is **always** `.ciel/memory/episodes/` via `memory-engine.py capture` — never the Claude Code auto-memory.
|
|
169
|
+
2. Confirm with `AskUserQuestion` first (capture is never silent — see ADR-0001).
|
|
170
|
+
3. The `UserPromptSubmit` hook surfaces `CAPTURE GATE: …` when the phrasing matches — follow it.
|
|
171
|
+
4. If `autoMemoryEnabled` is `true` in `.claude/settings.json` and you find yourself tempted to write to `MEMORY.md`, **STOP**. That setting is opt-in and not used by Ciel. The Ciel template ships with it disabled.
|
|
172
|
+
|
|
154
173
|
## Common failures to avoid
|
|
155
174
|
|
|
156
175
|
These are the most frequently skipped pipeline steps. Do NOT fall into these traps:
|
|
@@ -103,7 +103,8 @@ Expected: at least 3 agent files + session-start.sh + settings.json
|
|
|
103
103
|
|
|
104
104
|
**OpenCode** — check for expected plugin, agent, and command files:
|
|
105
105
|
```bash
|
|
106
|
-
|
|
106
|
+
# Plugin file may be ciel.ts (legacy) or ciel.js (v6+ runtime); accept either.
|
|
107
|
+
OPENCODE_PLUGIN=$( ( test -f .opencode/plugins/ciel.ts || test -f .opencode/plugins/ciel.js ) && echo "1" || echo "0")
|
|
107
108
|
OPENCODE_AGENTS=$(ls .opencode/agents/ciel-*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
108
109
|
OPENCODE_COMMANDS=$(ls .opencode/commands/ciel*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
109
110
|
echo "OpenCode: plugin=$OPENCODE_PLUGIN agents=$OPENCODE_AGENTS commands=$OPENCODE_COMMANDS"
|
|
@@ -113,7 +114,7 @@ else
|
|
|
113
114
|
echo "OpenCode platform: INCOMPLETE"
|
|
114
115
|
fi
|
|
115
116
|
```
|
|
116
|
-
Expected: ciel.ts
|
|
117
|
+
Expected: ciel plugin (ciel.ts or ciel.js) + at least 3 agent files + at least 5 command files
|
|
117
118
|
|
|
118
119
|
Scoring:
|
|
119
120
|
- Both platforms fully present and valid: **0**
|
|
@@ -122,7 +123,7 @@ Scoring:
|
|
|
122
123
|
|
|
123
124
|
**Important**: Do NOT check for `.claude/plugins/ciel/platforms/` or `.opencode/platforms/` directories — these are not part of the v6 architecture. Platform files are installed directly into `.claude/` and `.opencode/` respectively. Do NOT check for codex, cursor, kilocode, lmstudio, ollama, or windsurf — these platforms are not yet implemented.
|
|
124
125
|
|
|
125
|
-
#### Dimension 9: Memory health — penalty up to -
|
|
126
|
+
#### Dimension 9: Memory health — penalty up to -15
|
|
126
127
|
|
|
127
128
|
Check the cued-recall memory system (see `docs/adrs/0001-cued-recall-memory.md`):
|
|
128
129
|
|
|
@@ -130,10 +131,12 @@ Check the cued-recall memory system (see `docs/adrs/0001-cued-recall-memory.md`)
|
|
|
130
131
|
- **index.json exists but episodes/ empty**: `.ciel/memory/episodes/` has no files. Bootstrap ran but no memories were ingested, or the directory structure is incomplete. **-5**
|
|
131
132
|
- **Low trigger ratio**: Count memories with `trigger_count > 0` vs total. If < 30% of memories have ever been triggered, the cue-matching system may be misconfigured or the memories are not relevant to actual usage. **-3**
|
|
132
133
|
- **Stale memories**: Any memory with `stale: true` or with `last_triggered` older than `stale_after_days` (default 90). Stale memories waste index space and should be cleaned up by `memory-engine.py rebuild-index`. **-2**
|
|
134
|
+
- **Auto-memory contamination**: Claude Code's built-in auto-memory (`~/.claude/projects/<slug>/memory/MEMORY.md`) exists for THIS project. This is a DIFFERENT memory store than the Ciel cued-recall corpus. If a user (or the model on their behalf) said "save to memory" and the write landed in `MEMORY.md` instead of `.ciel/memory/episodes/`, that knowledge is invisible to Ciel — not portable across machines, not seen by this audit's cue-matching checks, not replayed when context cues fire. **-5** if `MEMORY.md` is present AND newer than the most recent Ciel episode (suggests recent mis-routed capture).
|
|
133
135
|
|
|
134
136
|
Scoring:
|
|
135
137
|
- index.json missing: **-10** (blocks all other checks)
|
|
136
138
|
- index.json present but no episode files: **-5**
|
|
139
|
+
- Auto-memory contamination detected: **-5** (additive)
|
|
137
140
|
- All checks pass: **0**
|
|
138
141
|
|
|
139
142
|
Run these checks:
|
|
@@ -156,6 +159,27 @@ triggered = sum(1 for m in mems.values() if m.get('trigger_count', 0) > 0)
|
|
|
156
159
|
stale = sum(1 for m in mems.values() if m.get('stale'))
|
|
157
160
|
print(f'total: {total}, triggered: {triggered} ({0 if total==0 else triggered*100//total}%), stale: {stale}')
|
|
158
161
|
" 2>/dev/null || echo "memory check failed (no python3?)"
|
|
162
|
+
|
|
163
|
+
# Detect Claude Code auto-memory contamination
|
|
164
|
+
# The auto-memory slug is the cwd with / replaced by -. If this file exists
|
|
165
|
+
# AND is newer than the most recent Ciel episode, a recent capture was
|
|
166
|
+
# mis-routed to Claude Code auto-memory instead of Ciel's cued-recall store.
|
|
167
|
+
PROJECT_SLUG=$(pwd | sed 's|/|-|g')
|
|
168
|
+
AUTO_MEM="$HOME/.claude/projects/${PROJECT_SLUG}/memory/MEMORY.md"
|
|
169
|
+
if [ -f "$AUTO_MEM" ]; then
|
|
170
|
+
echo "auto-memory: present at $AUTO_MEM"
|
|
171
|
+
LATEST_EPISODE=$(ls -t .ciel/memory/episodes/*.md 2>/dev/null | head -1)
|
|
172
|
+
if [ -z "$LATEST_EPISODE" ] || [ "$AUTO_MEM" -nt "$LATEST_EPISODE" ]; then
|
|
173
|
+
echo "auto-memory: CONTAMINATION — auto-memory newer than latest Ciel episode (mis-routed capture suspected)"
|
|
174
|
+
echo " → root cause: 'autoMemoryEnabled' in .claude/settings.json is enabled."
|
|
175
|
+
echo " fix: set it to false, then migrate entries from $AUTO_MEM"
|
|
176
|
+
echo " to .ciel/memory/episodes/ via memory-engine.py capture"
|
|
177
|
+
else
|
|
178
|
+
echo "auto-memory: present but older than Ciel episodes — likely legacy, no penalty"
|
|
179
|
+
fi
|
|
180
|
+
else
|
|
181
|
+
echo "auto-memory: absent (clean)"
|
|
182
|
+
fi
|
|
159
183
|
```
|
|
160
184
|
|
|
161
185
|
---
|
package/dist/cli/claude.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export interface InstallResult {
|
|
|
8
8
|
installed: string[];
|
|
9
9
|
skipped: string[];
|
|
10
10
|
}
|
|
11
|
+
export declare const CIEL_HOOK_FILES: string[];
|
|
12
|
+
export declare const CIEL_LEGACY_HOOK_FILES: string[];
|
|
13
|
+
export declare const CIEL_OWNED_SETTINGS_KEYS: readonly ["autoMemoryEnabled"];
|
|
11
14
|
/**
|
|
12
15
|
* Detect if the project has Claude Code configuration.
|
|
13
16
|
*/
|
|
@@ -16,4 +19,13 @@ export declare function detectClaude(targetDir: string): boolean;
|
|
|
16
19
|
* Install Ciel files for Claude Code platform.
|
|
17
20
|
*/
|
|
18
21
|
export declare function installClaude(opts: ClaudeOptions): InstallResult;
|
|
22
|
+
/**
|
|
23
|
+
* Merge the hooks section of a Ciel settings.json template into an existing
|
|
24
|
+
* settings file. Replaces Ciel-managed hook entries (those whose inner
|
|
25
|
+
* hooks[].command references a known Ciel hook script basename, regardless
|
|
26
|
+
* of path) with the template entries; user-added wrappers are preserved.
|
|
27
|
+
* All other top-level keys (mcpServers, permissions, etc.) are kept from
|
|
28
|
+
* the existing file. Returns null if either file cannot be read or parsed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function mergeSettings(existingPath: string, templatePath: string): object | null;
|
|
19
31
|
//# sourceMappingURL=claude.d.ts.map
|
package/dist/cli/claude.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD,eAAO,MAAM,eAAe,UAa3B,CAAC;AAaF,eAAO,MAAM,sBAAsB,UAIlC,CAAC;AAMF,eAAO,MAAM,wBAAwB,gCAK3B,CAAC;AAEX;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAKvD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,CAuIhE;AA2BD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkEvF"}
|
package/dist/cli/claude.js
CHANGED
|
@@ -2,11 +2,57 @@
|
|
|
2
2
|
// Claude Code platform installer logic
|
|
3
3
|
// Handles detection, file copy, and config generation for Claude Code projects
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CIEL_OWNED_SETTINGS_KEYS = exports.CIEL_LEGACY_HOOK_FILES = exports.CIEL_HOOK_FILES = void 0;
|
|
5
6
|
exports.detectClaude = detectClaude;
|
|
6
7
|
exports.installClaude = installClaude;
|
|
8
|
+
exports.mergeSettings = mergeSettings;
|
|
7
9
|
const fs_1 = require("fs");
|
|
8
10
|
const path_1 = require("path");
|
|
9
11
|
const utils_1 = require("./utils");
|
|
12
|
+
// Hook scripts CURRENTLY shipped by Ciel. Used by BOTH the install copy loop
|
|
13
|
+
// AND mergeSettings() to recognize Ciel-managed wrappers. Anything in this
|
|
14
|
+
// list will be (re)installed on `--force` upgrade.
|
|
15
|
+
// Exported for test/merge-settings.test.ts — internal API, not for SDK consumers.
|
|
16
|
+
exports.CIEL_HOOK_FILES = [
|
|
17
|
+
"check-test-first.sh",
|
|
18
|
+
"block-destructive.sh",
|
|
19
|
+
"track-file.sh",
|
|
20
|
+
"meta-critiquer.sh",
|
|
21
|
+
"session-version-check.sh",
|
|
22
|
+
"pre-tool-write.sh",
|
|
23
|
+
"pre-agent-gate.sh",
|
|
24
|
+
// Cued-recall hooks — ship from `.claude/hooks/` to the same destination.
|
|
25
|
+
"session-start.sh",
|
|
26
|
+
"user-prompt-submit.sh",
|
|
27
|
+
"memory-bootstrap.sh",
|
|
28
|
+
"memory-engine.py",
|
|
29
|
+
];
|
|
30
|
+
// Legacy hook basenames from PRIOR Ciel versions. Used ONLY by mergeSettings()
|
|
31
|
+
// to evict stale wrappers on `--force` upgrade — NEVER iterated by the install
|
|
32
|
+
// copy loop (assets/ no longer ships these files).
|
|
33
|
+
//
|
|
34
|
+
// IMPORTANT: every entry here is a basename Ciel has owned at some point.
|
|
35
|
+
// Do NOT add basenames that may belong to USER-DEFINED custom hooks (the
|
|
36
|
+
// mergeSettings() filter uses a substring `cmd.includes(name)` check, so
|
|
37
|
+
// adding a user-owned basename here causes silent data loss on `--force`).
|
|
38
|
+
// Specifically: `post-edit-check.sh` is intentionally absent — it has never
|
|
39
|
+
// been a Ciel-shipped hook; it appears in some user settings as a custom
|
|
40
|
+
// post-edit linter wrapper. Preserve it.
|
|
41
|
+
exports.CIEL_LEGACY_HOOK_FILES = [
|
|
42
|
+
"pre-write-gate.sh", // renamed → pre-tool-write.sh in v2.0
|
|
43
|
+
"post-write-relire.sh", // renamed → post-tool-write.sh in v2.0
|
|
44
|
+
"post-tool-write.sh", // removed in v6.x (replaced by track-file + RELIRE gate)
|
|
45
|
+
];
|
|
46
|
+
// Top-level settings.json keys that Ciel OWNS and SHOULD overwrite on `--force`
|
|
47
|
+
// upgrade, even when the user already has a value. Everything else stays
|
|
48
|
+
// user-controlled (existing wins). Add with care — each entry here is a key
|
|
49
|
+
// the user cannot override via settings.json once they run `ciel-init --force`.
|
|
50
|
+
exports.CIEL_OWNED_SETTINGS_KEYS = [
|
|
51
|
+
// autoMemoryEnabled MUST be false on Ciel projects: Claude Code's auto-memory
|
|
52
|
+
// competes with the cued-recall corpus and is invisible to /ciel-audit.
|
|
53
|
+
// See ADR-0001 and CLAUDE.md "Ciel memory ≠ Claude Code auto-memory".
|
|
54
|
+
"autoMemoryEnabled",
|
|
55
|
+
];
|
|
10
56
|
/**
|
|
11
57
|
* Detect if the project has Claude Code configuration.
|
|
12
58
|
*/
|
|
@@ -50,13 +96,7 @@ function installClaude(opts) {
|
|
|
50
96
|
}
|
|
51
97
|
}
|
|
52
98
|
// Hook files
|
|
53
|
-
const
|
|
54
|
-
"check-test-first.sh",
|
|
55
|
-
"block-destructive.sh",
|
|
56
|
-
"track-file.sh",
|
|
57
|
-
"meta-critiquer.sh",
|
|
58
|
-
];
|
|
59
|
-
for (const hook of hookFiles) {
|
|
99
|
+
for (const hook of exports.CIEL_HOOK_FILES) {
|
|
60
100
|
const src = (0, path_1.join)(srcDir, ".claude/hooks", hook);
|
|
61
101
|
const dest = (0, path_1.join)(hooksDest, hook);
|
|
62
102
|
if ((0, fs_1.existsSync)(src)) {
|
|
@@ -80,6 +120,9 @@ function installClaude(opts) {
|
|
|
80
120
|
"ciel-eval.md",
|
|
81
121
|
"ciel-create-skill.md",
|
|
82
122
|
"ciel-audit.md",
|
|
123
|
+
"ciel-memory-bootstrap.md",
|
|
124
|
+
"ciel-migrate.md",
|
|
125
|
+
"ciel-status.md",
|
|
83
126
|
];
|
|
84
127
|
for (const cmd of commandFiles) {
|
|
85
128
|
const src = (0, path_1.join)(srcDir, "commands", cmd);
|
|
@@ -197,10 +240,10 @@ function mkdirSafe(dir, fence) {
|
|
|
197
240
|
/**
|
|
198
241
|
* Merge the hooks section of a Ciel settings.json template into an existing
|
|
199
242
|
* settings file. Replaces Ciel-managed hook entries (those whose inner
|
|
200
|
-
* hooks[].command references
|
|
201
|
-
* user-added wrappers are preserved.
|
|
202
|
-
* permissions, etc.) are kept from
|
|
203
|
-
* Returns null if either file cannot be read or parsed.
|
|
243
|
+
* hooks[].command references a known Ciel hook script basename, regardless
|
|
244
|
+
* of path) with the template entries; user-added wrappers are preserved.
|
|
245
|
+
* All other top-level keys (mcpServers, permissions, etc.) are kept from
|
|
246
|
+
* the existing file. Returns null if either file cannot be read or parsed.
|
|
204
247
|
*/
|
|
205
248
|
function mergeSettings(existingPath, templatePath) {
|
|
206
249
|
let existing;
|
|
@@ -232,16 +275,22 @@ function mergeSettings(existingPath, templatePath) {
|
|
|
232
275
|
...Object.keys(existingHooks),
|
|
233
276
|
...Object.keys(templateHooks),
|
|
234
277
|
]);
|
|
278
|
+
// A wrapper is Ciel-managed if any inner hook command references a
|
|
279
|
+
// currently-shipped or legacy Ciel basename. Substring match — catches
|
|
280
|
+
// both new `.claude/hooks/x.sh` and legacy `hooks/x.sh` / absolute paths.
|
|
281
|
+
const cielBasenames = [...exports.CIEL_HOOK_FILES, ...exports.CIEL_LEGACY_HOOK_FILES];
|
|
235
282
|
for (const event of allEvents) {
|
|
236
283
|
const templateEntries = templateHooks[event] ?? [];
|
|
237
284
|
const existingEntries = existingHooks[event] ?? [];
|
|
238
|
-
// A wrapper is Ciel-managed if any of its inner hooks reference .claude/hooks/
|
|
239
285
|
const userEntries = existingEntries.filter((e) => {
|
|
240
286
|
const wrapper = e;
|
|
241
287
|
const inner = Array.isArray(wrapper.hooks)
|
|
242
288
|
? wrapper.hooks
|
|
243
289
|
: [];
|
|
244
|
-
return !inner.some((h) =>
|
|
290
|
+
return !inner.some((h) => {
|
|
291
|
+
const cmd = String(h.command ?? "");
|
|
292
|
+
return cielBasenames.some((name) => cmd.includes(name));
|
|
293
|
+
});
|
|
245
294
|
});
|
|
246
295
|
const entries = [...templateEntries, ...userEntries];
|
|
247
296
|
// Omit event key if empty (avoids clobbering user events dropped from template)
|
|
@@ -250,6 +299,13 @@ function mergeSettings(existingPath, templatePath) {
|
|
|
250
299
|
}
|
|
251
300
|
merged.hooks = mergedHooks;
|
|
252
301
|
}
|
|
302
|
+
// Propagate Ciel-owned top-level keys from template — overwrites existing
|
|
303
|
+
// values on `--force`. Without this, flipping a setting in the template
|
|
304
|
+
// (e.g. autoMemoryEnabled false) never reaches users on upgrade.
|
|
305
|
+
for (const k of exports.CIEL_OWNED_SETTINGS_KEYS) {
|
|
306
|
+
if (k in template)
|
|
307
|
+
merged[k] = template[k];
|
|
308
|
+
}
|
|
253
309
|
return merged;
|
|
254
310
|
}
|
|
255
311
|
/**
|
package/dist/cli/claude.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,+EAA+E
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/cli/claude.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,+EAA+E;;;AAoE/E,oCAKC;AAKD,sCAuIC;AAmCD,sCAkEC;AAxTD,2BAAwH;AACxH,+BAAmD;AACnD,mCAAmC;AAcnC,6EAA6E;AAC7E,2EAA2E;AAC3E,mDAAmD;AACnD,kFAAkF;AACrE,QAAA,eAAe,GAAG;IAC7B,qBAAqB;IACrB,sBAAsB;IACtB,eAAe;IACf,mBAAmB;IACnB,0BAA0B;IAC1B,mBAAmB;IACnB,mBAAmB;IACnB,0EAA0E;IAC1E,kBAAkB;IAClB,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;CACnB,CAAC;AAEF,+EAA+E;AAC/E,+EAA+E;AAC/E,mDAAmD;AACnD,EAAE;AACF,0EAA0E;AAC1E,yEAAyE;AACzE,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,yEAAyE;AACzE,yCAAyC;AAC5B,QAAA,sBAAsB,GAAG;IACpC,mBAAmB,EAAO,sCAAsC;IAChE,sBAAsB,EAAI,uCAAuC;IACjE,oBAAoB,EAAM,yDAAyD;CACpF,CAAC;AAEF,gFAAgF;AAChF,yEAAyE;AACzE,4EAA4E;AAC5E,gFAAgF;A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WAAW,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;IAC7B,CAAC;IAED,0EAA0E;IAC1E,wEAAwE;IACxE,iEAAiE;IACjE,KAAK,MAAM,CAAC,IAAI,gCAAwB,EAAE,CAAC;QACzC,IAAI,CAAC,IAAI,QAAQ;YAAE,MAAM,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,GAAW,EAAE,IAAY,EAAE,KAAc;IAC5D,IAAI,CAAC,IAAA,eAAU,EAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACvC,IAAI,IAAA,eAAU,EAAC,IAAI,CAAC,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IACjD,IAAI,CAAC;QACH,IAAA,iBAAY,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neikyun/ciel",
|
|
3
|
-
"version": "6.9.
|
|
3
|
+
"version": "6.9.2",
|
|
4
4
|
"description": "Ciel — Deep-reasoning pipeline for LLM-assisted development. OpenCode plugin + multi-platform CLI (OpenCode, Claude Code, more).",
|
|
5
5
|
"main": "./dist/plugin/index.js",
|
|
6
6
|
"types": "./dist/plugin/index.d.ts",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -225,6 +225,13 @@ async function main() {
|
|
|
225
225
|
|
|
226
226
|
// Sauvegarder version
|
|
227
227
|
writeFileSync(join(targetDir, ".ciel/memory.json"), JSON.stringify({ cielVersion: CIEL_VERSION, lastUpdated: new Date().toISOString() }, null, 2), "utf-8");
|
|
228
|
+
// Version sentinel — read by hooks/session-start.sh at runtime (no hardcoded MSG to drift).
|
|
229
|
+
writeFileSync(join(targetDir, ".ciel/version"), CIEL_VERSION + "\n", "utf-8");
|
|
230
|
+
try {
|
|
231
|
+
const userCielDir = join(require("os").homedir(), ".ciel");
|
|
232
|
+
mkdirSync(userCielDir, { recursive: true });
|
|
233
|
+
writeFileSync(join(userCielDir, "version"), CIEL_VERSION + "\n", "utf-8");
|
|
234
|
+
} catch {}
|
|
228
235
|
|
|
229
236
|
console.error(`\n ${green("✓")} Ciel v${CIEL_VERSION} installé !`);
|
|
230
237
|
if (platforms.includes("OpenCode")) console.error(` → plugin ${cyan("@neikyun/ciel")} ajouté à opencode.json`);
|