mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-05 00:33:27 +08:00
fix: narrow unicode cleanup scope
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
# Called by observer-loop.sh before spawning any Claude session.
|
||||
#
|
||||
# Config (env vars, all optional):
|
||||
# OBSERVER_INTERVAL_SECONDS default: 300 (per-project cooldown)
|
||||
# OBSERVER_LAST_RUN_LOG default: ~/.claude/observer-last-run.log
|
||||
# OBSERVER_ACTIVE_HOURS_START default: 800 (8:00 AM local, set to 0 to disable)
|
||||
# OBSERVER_ACTIVE_HOURS_END default: 2300 (11:00 PM local, set to 0 to disable)
|
||||
# OBSERVER_MAX_IDLE_SECONDS default: 1800 (30 min; set to 0 to disable)
|
||||
# OBSERVER_INTERVAL_SECONDS default: 300 (per-project cooldown)
|
||||
# OBSERVER_LAST_RUN_LOG default: ~/.claude/observer-last-run.log
|
||||
# OBSERVER_ACTIVE_HOURS_START default: 800 (8:00 AM local, set to 0 to disable)
|
||||
# OBSERVER_ACTIVE_HOURS_END default: 2300 (11:00 PM local, set to 0 to disable)
|
||||
# OBSERVER_MAX_IDLE_SECONDS default: 1800 (30 min; set to 0 to disable)
|
||||
#
|
||||
# Gate execution order (cheapest first):
|
||||
# Gate 1: Time window check (~0ms, string comparison)
|
||||
# Gate 2: Project cooldown log (~1ms, file read + mkdir lock)
|
||||
# Gate 3: Idle detection (~5-50ms, OS syscall; fail open)
|
||||
# Gate 1: Time window check (~0ms, string comparison)
|
||||
# Gate 2: Project cooldown log (~1ms, file read + mkdir lock)
|
||||
# Gate 3: Idle detection (~5-50ms, OS syscall; fail open)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
# and creates instincts. Uses Haiku model for cost efficiency.
|
||||
#
|
||||
# v2.1: Project-scoped — detects current project and analyzes
|
||||
# project-specific observations into project-scoped instincts.
|
||||
# project-specific observations into project-scoped instincts.
|
||||
#
|
||||
# Usage:
|
||||
# start-observer.sh # Start observer for current project (or global)
|
||||
# start-observer.sh --reset # Clear lock and restart observer for current project
|
||||
# start-observer.sh stop # Stop running observer
|
||||
# start-observer.sh status # Check if observer is running
|
||||
# start-observer.sh # Start observer for current project (or global)
|
||||
# start-observer.sh --reset # Clear lock and restart observer for current project
|
||||
# start-observer.sh stop # Stop running observer
|
||||
# start-observer.sh status # Check if observer is running
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Claude Code passes hook data via stdin as JSON.
|
||||
#
|
||||
# v2.1: Project-scoped observations — detects current project context
|
||||
# and writes observations to project-specific directory.
|
||||
# and writes observations to project-specific directory.
|
||||
#
|
||||
# Registered via plugin hooks/hooks.json (auto-loaded when plugin is enabled).
|
||||
# Can also be registered manually in ~/.claude/settings.json.
|
||||
@@ -92,9 +92,9 @@ if [ -n "${CLV2_CONFIG:-}" ] && [ -f "$(dirname "$CLV2_CONFIG")/disabled" ]; the
|
||||
fi
|
||||
|
||||
# Prevent observe.sh from firing on non-human sessions to avoid:
|
||||
# - ECC observing its own Haiku observer sessions (self-loop)
|
||||
# - ECC observing other tools' automated sessions
|
||||
# - automated sessions creating project-scoped homunculus metadata
|
||||
# - ECC observing its own Haiku observer sessions (self-loop)
|
||||
# - ECC observing other tools' automated sessions
|
||||
# - automated sessions creating project-scoped homunculus metadata
|
||||
|
||||
# Layer 1: entrypoint. Only interactive terminal sessions should continue.
|
||||
# sdk-ts: Agent SDK sessions can be human-interactive (e.g. via Happy).
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
# Sourced by observe.sh and start-observer.sh.
|
||||
#
|
||||
# Exports:
|
||||
# _CLV2_PROJECT_ID - Short hash identifying the project (or "global")
|
||||
# _CLV2_PROJECT_NAME - Human-readable project name
|
||||
# _CLV2_PROJECT_ROOT - Absolute path to project root
|
||||
# _CLV2_PROJECT_DIR - Project-scoped storage directory under homunculus
|
||||
# _CLV2_PROJECT_ID - Short hash identifying the project (or "global")
|
||||
# _CLV2_PROJECT_NAME - Human-readable project name
|
||||
# _CLV2_PROJECT_ROOT - Absolute path to project root
|
||||
# _CLV2_PROJECT_DIR - Project-scoped storage directory under homunculus
|
||||
#
|
||||
# Also sets unprefixed convenience aliases:
|
||||
# PROJECT_ID, PROJECT_NAME, PROJECT_ROOT, PROJECT_DIR
|
||||
# PROJECT_ID, PROJECT_NAME, PROJECT_ROOT, PROJECT_DIR
|
||||
#
|
||||
# Detection priority:
|
||||
# 1. CLAUDE_PROJECT_DIR env var (if set)
|
||||
# 2. git remote URL (hashed for uniqueness across machines)
|
||||
# 3. git repo root path (fallback, machine-specific)
|
||||
# 4. "global" (no project context detected)
|
||||
# 1. CLAUDE_PROJECT_DIR env var (if set)
|
||||
# 2. git remote URL (hashed for uniqueness across machines)
|
||||
# 3. git repo root path (fallback, machine-specific)
|
||||
# 4. "global" (no project context detected)
|
||||
|
||||
_CLV2_HOMUNCULUS_DIR="${HOME}/.claude/homunculus"
|
||||
_CLV2_PROJECTS_DIR="${_CLV2_HOMUNCULUS_DIR}/projects"
|
||||
|
||||
Reference in New Issue
Block a user