/** * Trigger-state file layout (SMI-5456 Wave 1 Step 5, QD-3). * * `~/.skillsmith/paywall-triggers/.json` — one file per trigger, * mirroring the per-resource-directory convention already used by * `journal/path.ts` (`~/.skillsmith/journal/`) and * `telemetry/agent-marker.ts` (`~/.skillsmith/agent-markers/`). Named * `paywall-triggers` (not `triggers`) both in the module path and the * on-disk directory to avoid any collision with the PRE-EXISTING, unrelated * `packages/core/src/triggers/` module (`TriggerDetector`/`ContextScorer` — * proactive skill-suggestion detection, nothing to do with PRD §8.1's T1-T4 * paywall triggers). * * Format compatibility with the SessionStart hook's nudge cooldown * (the per-harness `hooks//session-start.sh` script, generated by * the — locked for this step — `agent-pack/hooks.ts`): that hook writes a * PLAIN epoch-seconds integer to * `~/.skillsmith/agent-nudge.state` (`SKILLSMITH_AGENT_NUDGE_STATE` * override), because it is self-contained POSIX sh with no JSON tooling * available. This module's {@link getNudgeCooldownState} reads that EXACT * file/format/override so a future consumer (a report, a diagnostic) can * inspect the onboarding-nudge cooldown through the same TS surface as the * T1-T4 paywall triggers, without asking the hook to change its wire format. * The T1-T4 trigger files themselves are independent, JSON-shaped, and own * their own directory — see the module header of `store.ts` for why. * * @module @skillsmith/core/paywall-triggers/path */ import type { TriggerId } from './types.js'; /** Env var overriding the trigger-state directory (test isolation). */ export declare const TRIGGER_STATE_DIR_ENV_VAR = "SKILLSMITH_TRIGGER_STATE_DIR"; export declare function getTriggerStateFilePath(triggerId: TriggerId): string; export declare function getTriggerStateDirForTests(): string; /** * Read the onboarding SessionStart hook's nudge-cooldown stamp — the SAME * file (`~/.skillsmith/agent-nudge.state`, override * `SKILLSMITH_AGENT_NUDGE_STATE`) `hooks.ts`'s `renderSessionStartHook` * writes a bare epoch-seconds integer into. Read-only: this module never * writes this file — that stays the hook's job. * * @returns the last-nudge epoch-seconds, or null if the file is absent, * empty, or not a valid non-negative integer (matches the hook's own * tolerant `case "" | *[!0-9]*) last=0` parsing — malformed content is * treated as "no prior nudge", never an error). */ export declare function getNudgeCooldownState(): number | null; //# sourceMappingURL=path.d.ts.map