Expand description
Filesystem paths used across the netsky runtime.
Functionsยง
- agent0_
crashloop_ marker - P0-1 crashloop marker. Presence = the watchdog has fired escalation for a sustained restart-failure pattern; cleared on the first healthy tick after recovery.
- agent0_
hang_ marker - agent0_
hang_ paged_ marker - agent0_
inbox_ dir - agent0_
pane_ hash_ file - agent0_
quiet_ sentinel_ for - Path for a quiet sentinel that expires at
epoch(unix seconds). The filename embeds the epoch so multiple arms can co-exist transiently and the watchdog picks the max.netsky quiet <seconds>writes one. - agent0_
quiet_ sentinel_ prefix - Filename prefix used by the watchdog to glob for quiet sentinels.
- agent0_
restart_ attempts_ file - P0-1 crashloop sliding-window attempts file. Newline-delimited unix ts; pruned by the watchdog on every append.
- agent_
hang_ marker - Per-agent hang marker.
agent0keeps its historical path. - agent_
hang_ paged_ marker - Per-agent hang page marker.
agent0keeps its historical path. - agent_
pane_ hash_ file - Per-agent pane-hash state for generalized hang detection.
- agentinfinity_
ready_ marker - agentinit_
escalation_ marker - agentinit_
failures_ file - assert_
no_ symlink_ under - Refuse to traverse any symlink under
rooton the path totarget. - crash_
handoff_ file_ for - Canonical crash-handoff path for a given pid under
crash_handoffs_dir. - crash_
handoffs_ dir - Directory holding crash-handoff drafts written by the watchdog on crash-recovery. Lives under the durable state dir so the macOS /tmp reaper does not eat pending handoffs after ~3 days.
- cron_
file_ path - ensure_
logs_ dir - ensure_
netsky_ dir - Ensure the netsky root + state subdirectory exist. Idempotent.
Creates
~/netsky/(the resolved root) and~/.netsky/state/(the durable state dir) so both binary-only and source-tree modes work. - ensure_
state_ dir - Ensure the state directory exists. Idempotent.
- escalate_
failed_ marker - Marker file written when
netsky escalatefails on both attempts (first osascript timed out or errored, retry also fell over). The timestamp plus subsecond/counter suffix in the filename makes markers dedupe-able and sortable; the body carries subject + last stderr for forensics. - handoff_
archive_ dir - home
- is_
netsky_ source_ tree - Advisory source-tree check. This is no longer a hard gate.
- launchd_
plist_ path - logs_
dir - Durable logs directory, sibling to
state_dir(). Auto-created on first write byensure_logs_dir(); the event-log append path also creates parents defensively in case this helper was not called. - loop_
resume_ file - netsky_
root_ or_ cwd - Resolve the netsky root for spawn pathways (
cmd::agent::run,cmd::up::run) so a clone always lands its tmux session on the netsky root, regardless of which random subdir agent0 happened to be in when it callednetsky agent N. - prompt_
file_ for - Path to the on-disk system-prompt file for
agent_name. The spawner atomically writes the rendered prompt here and setsNETSKY_PROMPT_FILEto this path so the tmux-spawned shell cancatit at exec time. - prompts_
dir - require_
netsky_ cwd - Hard-exit guard for side-effecting top-level commands. Returns Ok if
the current working directory matches the resolved netsky dir.
Binary-only mode treats the resolved dir as
~/.netskyand skips the cwd gate. - resolve_
netsky_ dir - Resolve the canonical netsky root. Resolution order:
- restart_
archive_ dir - P1-4 restart-archive directory. Forensic home for the detached restart log + archived stale-processing files. Out of the /tmp reaper window; swept on age by the watchdog tick preflight.
- restart_
detached_ log_ path - Canonical path for the detached restart subprocess stdout+stderr log.
- restart_
status_ dir - P0-2 restart-status directory. The detached
netsky restartchild writes<ts>-<pid>.jsonfiles here at known phase transitions. - state_
dir - ticker_
missing_ count_ file - walk_
up_ to_ netsky_ dir - Walk from
starttoward the filesystem root looking for a directory satisfyingis_netsky_source_tree. Returns the first match. Used as the dev escape hatch when the user is inworkspaces/<task>/repo(a valid netsky checkout deeper in the tree) and$NETSKY_DIRis unset. - watchdog_
event_ log_ for - Durable JSONL event log for watchdog events. One file per UTC day
under
~/.netsky/logs/. Backend-agnostic: written before any DB call so a meta.db outage does not eat forensics (H4 spec, briefs/vnext-overnight/wave1-harvest.md section 5). - watchdog_
event_ log_ path