Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions LifeOS/install/LifeOS/PULSE/Observability/observability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface ObservabilityConfig {
// ── Path Construction ──

const HOME = process.env.HOME ?? ""
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const MEMORY_DIR = join(LIFEOS_DIR, "MEMORY")

const WORK_JSON_PATH = join(MEMORY_DIR, "STATE", "work.json")
Expand Down Expand Up @@ -142,7 +142,7 @@ function getDashboardDir(): string {
const dir = config.dashboard_dir ?? DEFAULT_DASHBOARD_DIR
// Resolve relative paths against Pulse directory
if (!dir.startsWith("/")) {
return join(HOME, ".claude", "LifeOS", "PULSE", dir)
return join(HOME, ".claude", "LIFEOS", "PULSE", dir)
}
return dir
}
Expand Down Expand Up @@ -1626,7 +1626,7 @@ function readDirMdFiles(dir: string): { name: string, content: string, sections:

function handleUserIndexApi(filter: string | null): Response {
try {
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(process.env.HOME || "", ".claude", "LifeOS")
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(process.env.HOME || "", ".claude", "LIFEOS")
const indexPath = join(LIFEOS_DIR, "PULSE", "state", "user-index.json")
const raw = Bun.file(indexPath)
if (!raw.size) {
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/Performance/cost-aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { join, basename, dirname } from "path"
import { existsSync, readFileSync, writeFileSync, appendFileSync, readdirSync, statSync, mkdirSync } from "fs"

const HOME = process.env.HOME ?? ""
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const PROJECTS_DIR = join(HOME, ".claude", "projects")
const OUTPUT_FILE = join(LIFEOS_DIR, "MEMORY", "OBSERVABILITY", "session-costs.jsonl")
const STATE_FILE = join(LIFEOS_DIR, "PULSE", "Performance", "aggregator-state.json")
Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/Performance/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { join } from "path"
import { existsSync, readFileSync } from "fs"

const HOME = process.env.HOME ?? ""
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const MEMORY_DIR = join(LIFEOS_DIR, "MEMORY")
const SESSION_COSTS_PATH = join(MEMORY_DIR, "OBSERVABILITY", "session-costs.jsonl")
const TOOL_FAILURES_PATH = join(MEMORY_DIR, "OBSERVABILITY", "tool-failures.jsonl")
Expand Down Expand Up @@ -278,7 +278,7 @@ async function handleAnthropicCostApi(): Promise<Response> {
const { readFileSync, existsSync } = await import("fs")
const { join } = await import("path")
const home = process.env.HOME ?? ""
const obsDir = join(home, ".claude", "LifeOS", "MEMORY", "OBSERVABILITY")
const obsDir = join(home, ".claude", "LIFEOS", "MEMORY", "OBSERVABILITY")
const ledgerPath = join(obsDir, "anthropic-cost.jsonl")
const sitesPath = join(obsDir, "anthropic-call-sites.json")

Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/Tools/SnapshotFromFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { PageData } from "../Schema/PulseSchema";
import { PageDataSchema } from "../Schema/PulseSchema";

const HOME = process.env.HOME!;
const FIX_DIR = resolve(HOME, ".claude", "LifeOS", "PULSE", "Schema", "Fixtures");
const OUT_DIR = resolve(HOME, ".claude", "LifeOS", "PULSE", "Schema", "Snapshots");
const FIX_DIR = resolve(HOME, ".claude", "LIFEOS", "PULSE", "Schema", "Fixtures");
const OUT_DIR = resolve(HOME, ".claude", "LIFEOS", "PULSE", "Schema", "Snapshots");
mkdirSync(OUT_DIR, { recursive: true });

const fixtures = readdirSync(FIX_DIR).filter((f) => f.endsWith(".json") && !f.startsWith("invalid"));
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/Tools/SnapshotPages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { readIndex, readPage } from "../lib/data-plane";
import { loadAllManifests } from "../lib/manifest-loader";

const HOME = process.env.HOME!;
const SNAP_DIR = resolve(HOME, ".claude", "LifeOS", "PULSE", "Schema", "Snapshots");
const SNAP_DIR = resolve(HOME, ".claude", "LIFEOS", "PULSE", "Schema", "Snapshots");
mkdirSync(SNAP_DIR, { recursive: true });

const idx = readIndex();
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/VoiceServer/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function escapeRegex(str: string): string {
}

function loadPronunciations(customPath?: string): void {
const paiDir = join(process.env.HOME ?? "~", ".claude", "LifeOS")
const paiDir = join(process.env.HOME ?? "~", ".claude", "LIFEOS")
const userPronPath = customPath ?? join(paiDir, "USER", "PRINCIPAL", "PRONUNCIATIONS.json")

try {
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/adapters/AdapterRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getProvenance } from "../lib/frontmatter";
import { inference, type InferenceLevel } from "../../TOOLS/Inference";

const HOME = process.env.HOME!;
const OBSERVABILITY_DIR = resolve(HOME, ".claude", "LifeOS", "MEMORY", "OBSERVABILITY");
const OBSERVABILITY_DIR = resolve(HOME, ".claude", "LIFEOS", "MEMORY", "OBSERVABILITY");
const RUNS_LOG = join(OBSERVABILITY_DIR, "adapter-runs.jsonl");

const ADAPTER_TIMEOUT_MS = 120_000;
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/checks/airgradient-poll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { join } from "node:path"
import { mkdirSync, writeFileSync, appendFileSync, readFileSync, existsSync } from "node:fs"

const HOME = process.env.HOME ?? ""
const CACHE_DIR = join(HOME, ".claude", "LifeOS", "MEMORY", "_AIRGRADIENT")
const CACHE_DIR = join(HOME, ".claude", "LIFEOS", "MEMORY", "_AIRGRADIENT")
const LATEST = join(CACHE_DIR, "latest.json")
const HISTORY = join(CACHE_DIR, "history.jsonl")

Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/checks/github-work.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { parse } from "smol-toml"
import { SignJWT, importPKCS8 } from "jose"

const HOME = process.env.HOME ?? ""
const PULSE_DIR = join(HOME, ".claude", "LifeOS", "PULSE")
const PULSE_DIR = join(HOME, ".claude", "LIFEOS", "PULSE")
const STATE_FILE = join(PULSE_DIR, "state", "work-token.json")

// ── Worker Config (from PULSE.toml [worker] section) ──
Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/checks/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, writeF
import { dirname, join } from "path"

const HOME = process.env.HOME ?? ""
const LEGACY_STATE_FILE = join(HOME, ".claude", "LifeOS", "PULSE", "state", "github-seen.json")
const STATE_FILE = join(HOME, ".claude", "LifeOS", "PULSE", "state", "github-seen.jsonl")
const LEGACY_STATE_FILE = join(HOME, ".claude", "LIFEOS", "PULSE", "state", "github-seen.json")
const STATE_FILE = join(HOME, ".claude", "LIFEOS", "PULSE", "state", "github-seen.jsonl")
// Repos to monitor for new issues / activity. Override via LIFEOS_PULSE_REPOS
// env var (comma-separated "owner/name" pairs). Empty default keeps fresh
// installs from polling repos the user hasn't opted into.
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/checks/life-morning-brief.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { join } from "path"
import { existsSync, readFileSync } from "fs"

const HOME = process.env.HOME ?? ""
const TELOS_DIR = join(HOME, ".claude", "LifeOS", "USER", "TELOS")
const TELOS_DIR = join(HOME, ".claude", "LIFEOS", "USER", "TELOS")

function readFile(name: string): string {
const p = join(TELOS_DIR, name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { join, dirname } from "path";
import { createHash } from "crypto";

const HOME = process.env.HOME || "";
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS");
const STATE_FILE = join(LIFEOS_DIR, "PULSE", "state", "notification-governor.json");
const LOG_FILE = join(LIFEOS_DIR, "MEMORY", "OBSERVABILITY", "notification-governor.jsonl");
const NOTIFY_URL = "http://localhost:31337/notify";
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/checks/poller-meta-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { readFileSync, existsSync } from "fs";
import { join } from "path";

const HOME = process.env.HOME || "";
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS");
const PULSE_STATE = join(LIFEOS_DIR, "PULSE", "state", "state.json");
const PULSE_TOML = join(LIFEOS_DIR, "PULSE", "PULSE.toml");

Expand Down
6 changes: 3 additions & 3 deletions LifeOS/install/LifeOS/PULSE/edit/edit-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { parseFrontmatter, serializeFrontmatter } from "../lib/frontmatter";
import { sha256Hex } from "../lib/cache";

const HOME = process.env.HOME!;
const USER_ROOT = resolve(HOME, ".claude", "LifeOS", "USER");
const EDITS_LOG = resolve(HOME, ".claude", "LifeOS", "MEMORY", "OBSERVABILITY", "pulse-edits.jsonl");
const USER_ROOT = resolve(HOME, ".claude", "LIFEOS", "USER");
const EDITS_LOG = resolve(HOME, ".claude", "LIFEOS", "MEMORY", "OBSERVABILITY", "pulse-edits.jsonl");
const CONTAINMENT_PREFIX_DENY = ["MEMORY/PULSE_DATA", "MEMORY/OBSERVABILITY"];

export interface EditRequest {
Expand All @@ -32,7 +32,7 @@ function isInUserTree(absPath: string): boolean {
}

function isContainmentPath(absPath: string): boolean {
const rel = absPath.replace(resolve(HOME, ".claude", "LifeOS") + "/", "");
const rel = absPath.replace(resolve(HOME, ".claude", "LIFEOS") + "/", "");
return CONTAINMENT_PREFIX_DENY.some((p) => rel.startsWith(p));
}

Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface DaemonConfig {

export const USER_CRON_PATH = join(
process.env.HOME ?? "~",
".claude", "LifeOS", "USER", "CONFIG", "PULSE.user.toml",
".claude", "LIFEOS", "USER", "CONFIG", "PULSE.user.toml",
)

export interface JobState {
Expand Down Expand Up @@ -319,7 +319,7 @@ export async function spawnScript(command: string, timeoutMs = 60_000): Promise<
const proc = Bun.spawn([BASH_PATH, "-c", command], {
stdout: "pipe",
stderr: "pipe",
cwd: join(process.env.HOME ?? "~", ".claude", "LifeOS", "PULSE"),
cwd: join(process.env.HOME ?? "~", ".claude", "LIFEOS", "PULSE"),
env: { ...process.env },
})

Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/lib/data-plane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { atomicWriteJSON } from "./atomic-write";
import type { PageData, PageMeta, Provenance } from "../Schema/PulseSchema";

const HOME = process.env.HOME!;
export const PULSE_DATA_DIR = resolve(HOME, ".claude", "LifeOS", "MEMORY", "PULSE_DATA");
export const PULSE_DATA_DIR = resolve(HOME, ".claude", "LIFEOS", "MEMORY", "PULSE_DATA");

export interface DataPlaneFile {
schemaVersion: string;
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/lib/provenance-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { atomicWriteText } from "./atomic-write";
import { parseFrontmatter, serializeFrontmatter } from "./frontmatter";

const HOME = process.env.HOME!;
const EDITS_LOG = resolve(HOME, ".claude", "LifeOS", "MEMORY", "OBSERVABILITY", "pulse-edits.jsonl");
const EDITS_LOG = resolve(HOME, ".claude", "LIFEOS", "MEMORY", "OBSERVABILITY", "pulse-edits.jsonl");
const PULSE_EDIT_GRACE_MS = 5_000;

export interface WatcherOptions {
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/lib/telegram-proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "../../TOOLS/MemoryTypes";

const HOME = process.env.HOME ?? homedir();
const OBS_DIR = join(HOME, ".claude", "LifeOS", "MEMORY", "OBSERVABILITY");
const OBS_DIR = join(HOME, ".claude", "LIFEOS", "MEMORY", "OBSERVABILITY");
const PROPOSAL_REPLIES_LOG_PATH = join(OBS_DIR, "proposal-replies.jsonl");
const IDENTITY_PROPOSALS_LOG_PATH = join(OBS_DIR, "identity-proposals.jsonl");

Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/modules/hypotheses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { existsSync, readFileSync, readdirSync, writeFileSync, unlinkSync, mkdir
import { join } from "path";

const HOME = process.env.HOME || "";
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS");
const FRAMES_DIR = join(LIFEOS_DIR, "MEMORY", "WISDOM", "FRAMES");
const HYPOTHESES_DIR = join(FRAMES_DIR, "_hypotheses");
const ARCHIVE_DIR = join(HYPOTHESES_DIR, "_archive");
Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/modules/imessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export interface IMessageHealth {

const HOME = process.env.HOME ?? ""
const CWD = join(HOME, ".claude")
const STATE_DIR = join(HOME, ".claude", "LifeOS", "PULSE", "state", "imessage")
const LOGS_DIR = join(HOME, ".claude", "LifeOS", "PULSE", "logs", "imessage")
const STATE_DIR = join(HOME, ".claude", "LIFEOS", "PULSE", "state", "imessage")
const LOGS_DIR = join(HOME, ".claude", "LIFEOS", "PULSE", "logs", "imessage")

let pollTimer: ReturnType<typeof setInterval> | null = null
let running = false
Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/modules/local-intelligence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const MODULE_NAME = "local-intelligence"

// Primary path: user-scoped customizations directory (per {{PRINCIPAL_NAME}} directive 2026-05-03).
// Fallback path: legacy MEMORY/DATA path (used when customizations file absent).
const CUSTOMIZATIONS_DIR = join(HOME, ".claude", "LifeOS", "USER", "CUSTOMIZATIONS", "SKILLS", "LocalIntelligence")
const LEGACY_DATA_DIR = join(HOME, ".claude", "LifeOS", "MEMORY", "DATA", "LocalIntelligence")
const CUSTOMIZATIONS_DIR = join(HOME, ".claude", "LIFEOS", "USER", "CUSTOMIZATIONS", "SKILLS", "LocalIntelligence")
const LEGACY_DATA_DIR = join(HOME, ".claude", "LIFEOS", "MEMORY", "DATA", "LocalIntelligence")
const LATEST_PATH = join(CUSTOMIZATIONS_DIR, "latest.json")
const LEGACY_LATEST_PATH = join(LEGACY_DATA_DIR, "latest.json")
const DATA_DIR = CUSTOMIZATIONS_DIR // alias for existing references in this file
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/modules/tab-freshness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { existsSync, statSync, readdirSync, readFileSync } from "fs"
import { join } from "path"

const HOME = process.env.HOME ?? "~"
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const USER_DIR = join(LIFEOS_DIR, "USER")
const TELOS_DIR = join(USER_DIR, "TELOS")

Expand Down
6 changes: 3 additions & 3 deletions LifeOS/install/LifeOS/PULSE/modules/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export interface TelegramConfig {

const HOME = process.env.HOME ?? ""
const CWD = join(HOME, ".claude")
const STATE_DIR = join(HOME, ".claude", "LifeOS", "PULSE", "state", "telegram")
const LOGS_DIR = join(HOME, ".claude", "LifeOS", "PULSE", "logs", "telegram")
const STATE_DIR = join(HOME, ".claude", "LIFEOS", "PULSE", "state", "telegram")
const LOGS_DIR = join(HOME, ".claude", "LIFEOS", "PULSE", "logs", "telegram")
const STALE_ACK_CACHE_DIR = join(STATE_DIR, "ack-cache")
const MAX_TELEGRAM_LENGTH = 4096
const CURSOR = " ▌"
Expand All @@ -76,7 +76,7 @@ const IDLE_TIMEOUT_MS = 60 * 60 * 1000 // 1 hour — gap of silence tha
const INFERENCE_HARD_BUDGET_MS = 10_000 // outer race cap on summarize; measured Sonnet subprocess cost is 4-6s, this gives slack without losing the voice trailing the text by too much
const MIN_FALLBACK_WORDS = 6 // a fallback summary shorter than this is presumed too thin to be worth voicing
const MEANINGFUL_REPLY_WORDS = 25 // when a reply is at least this long, a too-short fallback is a regression — skip voice rather than ship a "0:00" stub
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")

// Voice ID for outbound voice summaries. Read at module import from
// PaiConfig — `[da.voices.main] voice_id` in LIFEOS/USER/CONFIG/LIFEOS_CONFIG.toml.
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/modules/user-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { readFileSync, writeFileSync, statSync, readdirSync, mkdirSync, existsSy
import { join, relative, basename, dirname } from "path"

const HOME = process.env.HOME ?? ""
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS")
const USER_DIR = join(LIFEOS_DIR, "USER")
const STATE_DIR = join(LIFEOS_DIR, "PULSE", "state")
const INDEX_PATH = join(STATE_DIR, "user-index.json")
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/modules/wiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import MiniSearch from "minisearch"
// Path Construction

const HOME = process.env.HOME ?? "~"
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const DOCUMENTATION_DIR = join(LIFEOS_DIR, "DOCUMENTATION")
const KNOWLEDGE_DIR = join(LIFEOS_DIR, "MEMORY", "KNOWLEDGE")
const BOOKMARKS_DIR = join(LIFEOS_DIR, "MEMORY", "BOOKMARKS")
Expand Down
4 changes: 2 additions & 2 deletions LifeOS/install/LifeOS/PULSE/modules/work.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { join } from "path";
import { loadWorkConfig, type WorkConfig } from "../../../hooks/lib/work-config";

const HOME = process.env.HOME || "";
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS");
const PULSE_STATE_DIR = join(LIFEOS_DIR, "PULSE", "state");
const CACHE_PATH = join(PULSE_STATE_DIR, "work-cache.json");
const MODULE = "work";
Expand Down Expand Up @@ -145,7 +145,7 @@ function extractSlug(title: string): string | undefined {
// issues; the workload is bounded and the files are small.
function extractPrincipalGoal(slug: string | undefined): string | undefined {
if (!slug) return undefined;
const isaPath = join(HOME, ".claude", "LifeOS", "MEMORY", "WORK", slug, "ISA.md");
const isaPath = join(HOME, ".claude", "LIFEOS", "MEMORY", "WORK", slug, "ISA.md");
if (!existsSync(isaPath)) return undefined;
try {
const content = readFileSync(isaPath, "utf-8");
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/pulse-old.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {

// ── Constants ──

const PULSE_DIR = join(process.env.HOME ?? "~", ".claude", "LifeOS", "PULSE")
const PULSE_DIR = join(process.env.HOME ?? "~", ".claude", "LIFEOS", "PULSE")
const STATE_PATH = join(PULSE_DIR, "state", "state.json")
const PID_PATH = join(PULSE_DIR, "state", "pulse.pid")
const HOOK_PORT = parseInt(process.env.HOOK_SERVER_PORT || "8686", 10)
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/pulse-unified.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { parse } from "smol-toml"
// ── Load .env before anything else ──

const HOME = process.env.HOME ?? "~"
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const PULSE_DIR = join(LIFEOS_DIR, "PULSE")

const envPath = join(HOME, ".claude", ".env")
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/pulse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { parse } from "smol-toml"
// ── Load .env before anything else ──

const HOME = process.env.HOME ?? "~"
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const PULSE_DIR = join(LIFEOS_DIR, "PULSE")

const envPath = join(HOME, ".claude", ".env")
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/run-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (!jobName) {
process.exit(1)
}

const PULSE_DIR = join(process.env.HOME ?? "~", ".claude", "LifeOS", "PULSE")
const PULSE_DIR = join(process.env.HOME ?? "~", ".claude", "LIFEOS", "PULSE")
const config = await loadConfig(PULSE_DIR)
const job = config.jobs.find((j) => j.name === jobName)
if (!job) {
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/PULSE/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { join, resolve } from "path"
import { existsSync, mkdirSync } from "fs"

const HOME = process.env.HOME ?? "~"
const LIFEOS_DIR = join(HOME, ".claude", "LifeOS")
const LIFEOS_DIR = join(HOME, ".claude", "LIFEOS")
const PULSE_DIR = join(LIFEOS_DIR, "PULSE")

// ── Helpers ──
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/TOOLS/ActivityParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as path from "path";
// ============================================================================

const CLAUDE_DIR = path.join(process.env.HOME!, ".claude");
const MEMORY_DIR = path.join(CLAUDE_DIR, "LifeOS", "MEMORY");
const MEMORY_DIR = path.join(CLAUDE_DIR, "LIFEOS", "MEMORY");
const USERNAME = process.env.USER || require("os").userInfo().username;
const PROJECTS_DIR = path.join(CLAUDE_DIR, "projects", `-Users-${USERNAME}--claude`); // Claude Code native storage
const SYSTEM_UPDATES_DIR = path.join(MEMORY_DIR, "PAISYSTEMUPDATES"); // Canonical system change history
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/TOOLS/AgentWatchdog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { existsSync, readFileSync, statSync } from "fs";
import { join } from "path";

const LIFEOS_DIR = process.env.LIFEOS_DIR || join(process.env.HOME!, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(process.env.HOME!, ".claude", "LIFEOS");
const OBS_DIR = join(LIFEOS_DIR, "MEMORY", "OBSERVABILITY");
const ACTIVITY_FILE = join(OBS_DIR, "tool-activity.jsonl");
const STARTS_FILE = join(OBS_DIR, "subagent-starts.json");
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/TOOLS/AlgorithmPhaseReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { join } from "path";
import { homedir } from "os";
import { parseArgs } from "util";

const STATE_DIR = join(homedir(), ".claude", "LifeOS", "MEMORY", "STATE");
const STATE_DIR = join(homedir(), ".claude", "LIFEOS", "MEMORY", "STATE");
const STATE_FILE = join(STATE_DIR, "algorithm-phase.json");

interface AlgorithmState {
Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/TOOLS/ApproveCurrentStateEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { readFileSync, writeFileSync, existsSync } from "fs";
import { join } from "path";

const HOME = process.env.HOME || "";
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || join(HOME, ".claude", "LIFEOS");
const QUEUE_FILE = join(LIFEOS_DIR, "USER", "TELOS", "CURRENT_STATE", "proposals.jsonl");
const CURRENT_STATE_DIR = join(LIFEOS_DIR, "USER", "TELOS", "CURRENT_STATE");

Expand Down
2 changes: 1 addition & 1 deletion LifeOS/install/LifeOS/TOOLS/ArchDecisionHarvest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as os from "os";
// ============================================================================

const HOME = process.env.HOME || os.homedir();
const LIFEOS_DIR = process.env.LIFEOS_DIR || path.join(HOME, ".claude", "LifeOS");
const LIFEOS_DIR = process.env.LIFEOS_DIR || path.join(HOME, ".claude", "LIFEOS");
const DEFAULT_WORK_DIR = path.join(LIFEOS_DIR, "MEMORY", "WORK");
const DEFAULT_ARCH_DOC = path.join(LIFEOS_DIR, "DOCUMENTATION", "LifeosSystemArchitecture.md");
const ARCH_DECISIONS_HEADING = "## Architecture Decisions";
Expand Down
Loading
Loading