Skip to main content

Module paths

Module paths 

Source
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. agent0 keeps its historical path.
agent_hang_paged_marker
Per-agent hang page marker. agent0 keeps 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 root on the path to target.
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 escalate fails 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 by ensure_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 called netsky 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 sets NETSKY_PROMPT_FILE to this path so the tmux-spawned shell can cat it 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 ~/.netsky and 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 restart child writes <ts>-<pid>.json files here at known phase transitions.
state_dir
ticker_missing_count_file
walk_up_to_netsky_dir
Walk from start toward the filesystem root looking for a directory satisfying is_netsky_source_tree. Returns the first match. Used as the dev escape hatch when the user is in workspaces/<task>/repo (a valid netsky checkout deeper in the tree) and $NETSKY_DIR is 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