MinerU
Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Cited knowledge graphs from local documents, extracted by small Ollama models on idle machines.
作者提供的原文
教 AI 做这类工作的 Skill,可与本项一起使用
Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Agent skills for Obsidian. Teach your agent to use Obsidian CLI and open formats including Markdown, Bases, JSON Canvas.
列表按使用分(满分 100)排序,由以下部分组成
| 热度 | 4/80 | GitHub 星标或每周下载量:较大的计 60,较小的计 20 |
|---|---|---|
| 新鲜度 | 12/12 | 30 天内有发布或代码更新得满分 |
| 仍在响应 | 0/8 | 上次检查时云端端点有响应 |
| 使用分 | 16/100 |
质量: 基础检查通过 3/3 项(仅展示,不用于排序) · 上升势头: 暂无数据 (只用于“上升中”标签)
选择你使用的 AI 应用,然后复制设置。
用一句话让 AI 帮你安装
请帮我安装 Nightshift Grid。按照 https://mcp.popnx.com/i/redd34-nightshift-grid.md 操作,先把命令给我看,等我同意后再运行。粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文
通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月15日
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude,但需要先准备
需要先在电脑上安装 Python (uv)(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Claude 安装 MCP server Nightshift Grid,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "nightshift-grid": { "command": "uvx", "args": [ "nightshift-grid" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Nightshift Grid 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
uv --versionMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version
安装一次,所有需要 uv 的工具都能用
SettingsDeveloperEdit Config
{
"mcpServers": {
"nightshift-grid": {
"command": "uvx",
"args": [
"nightshift-grid"
]
}
}
}用 Nightshift Grid 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 Nightshift Grid,或回答中出现 Nightshift Grid 的工具名称,就表示连接成功
上面的命令不填这些也能用。想调整时再按开发者的说明添加。
NIGHTSHIFT_URL Coordinator URL。保持未设置则使用本机通过 nightshift up 启动的网格。 NIGHTSHIFT_TOKEN_FILE 保存 coordinator 客户端令牌的文件(仅在使用 NIGHTSHIFT_URL 时需要)。 NIGHTSHIFT_MCP_ROOTS 服务器可读取文档的文件夹(默认:当前目录)。 说明为自动翻译,变量名保持原样;不确定时请查看原文。
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 Nightshift Grid
Nightshift Grid 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器
可连接 Claude Code,但需要先准备
需要先在电脑上安装 Python (uv)(只需一次)
把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Claude Code 安装 MCP server Nightshift Grid,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user nightshift-grid -- uvx nightshift-grid 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Nightshift Grid 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
uv --versionMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version
安装一次,所有需要 uv 的工具都能用
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
claude mcp add --scope user nightshift-grid -- uvx nightshift-grid应能看到 Nightshift Grid 在列表中并显示已连接
用 Nightshift Grid 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 Nightshift Grid,或回答中出现 Nightshift Grid 的工具名称,就表示连接成功
上面的命令不填这些也能用。想调整时再按开发者的说明添加。
NIGHTSHIFT_URL Coordinator URL。保持未设置则使用本机通过 nightshift up 启动的网格。 NIGHTSHIFT_TOKEN_FILE 保存 coordinator 客户端令牌的文件(仅在使用 NIGHTSHIFT_URL 时需要)。 NIGHTSHIFT_MCP_ROOTS 服务器可读取文档的文件夹(默认:当前目录)。 说明为自动翻译,变量名保持原样;不确定时请查看原文。
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor,但需要先准备
需要先在电脑上安装 Python (uv)(只需一次)
把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Cursor 安装 MCP server Nightshift Grid,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "nightshift-grid": { "command": "uvx", "args": [ "nightshift-grid" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Nightshift Grid 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
uv --versionMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version
安装一次,所有需要 uv 的工具都能用
用 Nightshift Grid 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 Nightshift Grid,或回答中出现 Nightshift Grid 的工具名称,就表示连接成功
上面的命令不填这些也能用。想调整时再按开发者的说明添加。
NIGHTSHIFT_URL Coordinator URL。保持未设置则使用本机通过 nightshift up 启动的网格。 NIGHTSHIFT_TOKEN_FILE 保存 coordinator 客户端令牌的文件(仅在使用 NIGHTSHIFT_URL 时需要)。 NIGHTSHIFT_MCP_ROOTS 服务器可读取文档的文件夹(默认:当前目录)。 说明为自动翻译,变量名保持原样;不确定时请查看原文。
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code,但需要先准备
需要先在电脑上安装 Python (uv)(只需一次)
把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 VS Code 安装 MCP server Nightshift Grid,按顺序:1) 用 uv --version 检查是否有 uv。没有的话,请让我从 https://docs.astral.sh/uv/getting-started/installation/ 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "nightshift-grid": { "type": "stdio", "command": "uvx", "args": [ "nightshift-grid" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Nightshift Grid 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
uv --versionMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: uv 没有点选式安装程序。从 uv 官方页面复制适合你系统(macOS 或 Windows)的一行命令,粘贴到终端 · 不需要单独安装 Python,uv 会在需要时自动下载
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: uv --version
安装一次,所有需要 uv 的工具都能用
用 Nightshift Grid 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 Nightshift Grid,或回答中出现 Nightshift Grid 的工具名称,就表示连接成功
上面的命令不填这些也能用。想调整时再按开发者的说明添加。
NIGHTSHIFT_URL Coordinator URL。保持未设置则使用本机通过 nightshift up 启动的网格。 NIGHTSHIFT_TOKEN_FILE 保存 coordinator 客户端令牌的文件(仅在使用 NIGHTSHIFT_URL 时需要)。 NIGHTSHIFT_MCP_ROOTS 服务器可读取文档的文件夹(默认:当前目录)。 说明为自动翻译,变量名保持原样;不确定时请查看原文。
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
Claude Code
claude mcp add --scope user nightshift-grid -- uvx nightshift-gridClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"nightshift-grid": {
"command": "uvx",
"args": [
"nightshift-grid"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"nightshift-grid": {
"command": "uvx",
"args": [
"nightshift-grid"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"nightshift-grid": {
"type": "stdio",
"command": "uvx",
"args": [
"nightshift-grid"
]
}
}
}NIGHTSHIFT_URL envNIGHTSHIFT_TOKEN_FILE envNIGHTSHIFT_MCP_ROOTS env说明为自动翻译,变量名保持原样;不确定时请查看原文。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月20日
注册名称已通过 GitHub 账户 redd34 验证,该账户拥有此仓库
代码最后更新于5天前
使用 Apache-2.0
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
OSV.dev 中没有 nightshift-grid@0.1.3 的记录
只检查这个版本的包本身,不包括所有依赖 · 检查于 2026年11月15日
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/servers/redd34-nightshift-grid)提问、分享技巧或报告无法使用。按“有帮助”数量排序。
还没有评价
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于5天前,最新版本(0.1.3)于5天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Puter MCP, XcodeBuildMCP, Vexa, Atlassian Rovo MCP Server, Anki MCP Server
同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Puter MCP enables AI tools to interact with Puter: manage files, websites, workers, and more
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Meeting bot and transcripts for Google Meet, Teams and Zoom. Live or after, speakers labelled.
Connect to Atlassian Jira, Confluence, Loom, and more to search, create, and manage your work.
MCP server for Anki flashcards: adaptive review, notes, media, and deck management via AnkiConnect.
| 本项 Nightshift Grid | Puter MCP | XcodeBuildMCP | Vexa | Atlassian Rovo MCP Server | Anki MCP Server | |
|---|---|---|---|---|---|---|
| 运行位置 | 需要安装在电脑上 | 在云端运行,无需安装 | 需要安装在电脑上 | 在云端运行,无需安装 | 在云端运行,无需安装 | 需要安装在电脑上 |
| 需要密钥 | 否 | 否 | 否 | 是 | 否 | 否 |
| 可在 Claude 中按 + 添加 | 否 | 否 | 否 | 否 | 是 | 否 |
| 基础检查 | 3/3 | 4/4 | 3/3 | 2/4 | 4/4 | 3/3 |
| 许可证 | Apache-2.0 | AGPL-3.0 | MIT | Apache-2.0 | Apache-2.0 | MIT |
| 价格 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 |
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Turn idle laptops, office PCs and legacy mini-PCs into a zero-CapEx, fault-tolerant local AI batch and GraphRAG cluster.
pipx install nightshift-grid # or: uv tool install nightshift-grid
nightshift up --mock --workers 3 # coordinator + 3 workers + live dashboard
A real (mock-inference) run recorded with scripts/record_demo.py. Benchmarks so far are from a single Mac; see Known limitations.
Nightshift Grid is a lightweight distributed compute engine ("SETI@home meets local enterprise MapReduce"). It harvests idle cycles across mixed local machines without slowing down the people using them.
It doesn't slice one giant model across slow LAN links, where Wi-Fi jitter destroys token throughput and one closed laptop lid kills the forward pass. Instead, every machine is a preemptible, fenced micro-worker running its own quantized small model (qwen3:4b, qwen2.5:3b, phi4-mini) via Ollama. A central coordinator hands out leased chunks. When a human touches the machine, the node yields immediately and its chunk moves to another node.
submit 24 chunks output_graph.jsonl
client ──────────────────────▶ Coordinator ───────────────────────▶ (1 record / chunk) │ ▲ lease(task_id, lease_id) / heartbeat 3s / complete / preempt ┌───────────────┼──┼────────────────┐ ▼ ▼ │ ▼ node-office-pc node-legacy-laptop node-mac-studio each: worker_daemon.py (Tier 2) (Tier 1) (Tier 3) + local Ollama
Most teams have gigabytes to terabytes of unstructured PDFs, logs and tickets that can't go to cloud APIs for cost or privacy reasons. Meanwhile the office PCs, laptops and mini-PCs that could process them sit mostly idle all day and fully idle overnight.
The common ways to pool local machines leave a gap for batch pipelines:
| Approach | Typical failure mode for batch work | Nightshift Grid |
|---|---|---|
| Tensor/layer splitting (one big model sharded across machines) | Bound by LAN serialization. One node dropping mid-pass stalls the whole request. | Each node runs a whole small model on independent chunks. A dropped node costs one chunk retry. |
| Stateless request routing (load-balance chat requests across nodes) | No durable job state, so a node dying mid-request fails that request. | Stateful MapReduce queue with fenced leases. Every chunk completes or is explicitly dead-lettered. |
| Dedicated inference pools | Machines must be handed over to the cluster. | Good-citizen harvesting: the human always wins and the grid backs off in milliseconds. |
Capability tiers decide what each node gets: Tier 1 (<8GB free) does embeddings and chunking, Tier 2 (8–24GB) does 3B–8B INT4 entity/relationship extraction, and Tier 3 (>24GB, or Apple Silicon with ≥16GB free) does heavy verification and synthesis.
A common trap when wrapping Ollama or llama.cpp in Python is breaking out of the token loop without closing the underlying socket. The server keeps generating, and the GPU stays pegged until the response finishes. A second trap is checking for user activity only when a token arrives. That leaves a blind spot while the model is loading weights or evaluating a long prompt.
Nightshift runs inference in its own asyncio task. An out-of-band activity watcher polls the chaos trigger file every 100ms and OS HID idle time every 500ms: IOKit HIDIdleTime read in-process on macOS (ioreg -c IOHIDSystem as a fallback), GetLastInputInfo on Windows, D-Bus or xprintidle on Linux. On activity it calls task.cancel(), which unwinds async with client.stream(...) and closes the connection, so Ollama stops generating.
Measured with qwen3:4b on Apple Silicon (GPU utilisation from IOKit, 250ms samples):
| Worker cancellation method | GPU utilisation afterwards |
|---|---|
| Stop the read loop, leave the response open | 84–94% until the model finishes |
Error raised inside async with client.stream | 0% by the first sample; next request ready in 0.04s |
Out-of-band task.cancel() (also covers model load and prompt eval) | 0% by the first sample |
Three workers (qwen3:4b, about 130 tok/s decode) processed a 24-chunk industrial-maintenance GraphRAG extraction job per phase, with auth enabled (python nightshift.py chaos-test --model qwen3:4b). All three workers ran on one Mac sharing one Ollama instance. Multi-machine runs are still to do.
| Chaos scenario / metric | Measured result |
|---|---|
Live human preemption (user returns mid-job on node-legacy-laptop) | 24/24 chunks in 47.3s, 0 failures |
| Activity → coordinator reclaims the lease (trigger file, 100ms poll) | 0.01–0.10s across runs (0.011s in the final run) |
| Lease reclaimed → re-assigned to another node | 0.8s |
| Activity → preempted chunk finished on the backup node | 5.2s |
| Work sent to the paused node while the human is active | 0 chunks |
Worker crash (SIGKILL node-office-pc mid-chunk) | 24/24 chunks in 45.8s |
SIGKILL → lease expiry (12s TTL) → re-assigned → done | 11.9s → +1.1s → 16.8s total |
Coordinator crash (SIGKILL coordinator mid-job, 3s outage, restart on same SQLite file) | 24/24 chunks in 46.4s, 24 attempts for 24 chunks (0 wasted) |
| Restart → ready; in-flight leases finished by their original holders | 0.23s; 2/2 |
Host CPU spike (busy-loop on all 16 cores mid-job, --max-host-cpu-pct 65) | 24/24 chunks in 54.4s; all 3 workers yielded (cpu_busy) in 1.9–2.7s, 0 leases while loaded, all resumed 2.1s after the load stopped |
| Unintended preemptions from the grid's own Ollama load (phases 1–3) | 0 |
| Auth (anonymous submit / worker token on client API / forged completion) | 401 / 401 / 401 |
| Output integrity (4 jobs) | 96/96 records, 0 missing, 0 duplicates, 434 triples |
With --native-idle-seconds, detection latency is bounded by the 500ms HID poll rather than the 100ms file poll. The HID path is covered by unit tests and live IOKit and ioreg reads. An end-to-end benchmark with real keyboard input is still to do, because synthesising HID events needs macOS Accessibility permission.
| Guarantee | Mechanism |
|---|---|
| No chunk lost | Every lease has a 12s TTL, extended by 3s heartbeats, and a reaper re-queues expired leases. Preemption and graceful SIGTERM hand leases back immediately. A worker can hold only one lease at a time. |
| Fenced leases (no split-brain) | Each assignment carries a unique lease_id. A partitioned or stalled worker can't heartbeat or complete a lease that was re-issued. The heartbeat reply (lease_valid: false) tells it to abort the zombie compute. |
| Race-free pull and pause | If a human returns while a pull is in flight, the new lease goes straight back. Preempt messages name their lease, so a late one can't revoke a newer lease. A paused node gets no work until it reports idle. |
| Dead-letter protection | Errors and lease expiries count toward MAX_FAILURES=3, after which the chunk is parked as FAILED. Human preemptions don't count as failures. |
| Clean graph output | Ollama structured outputs (a JSON schema) constrain decoding. normalize_extraction() coerces the output to [subject, RELATION, object] and canonicalises relation names (exceeded during → EXCEEDED_DURING) so edges merge across chunks. Reasoning tokens are disabled on thinking models (qwen3). Invalid output is a retryable failure. |
| Idempotent sink | output_graph.jsonl is fsynced per record and deduplicated by task_id, including across a coordinator restart or a failed fsync. Retried completions are no-ops. |
| Capability-aware scheduling | A worker serves the highest tier it's capable of first, so Tier 3 nodes aren't spent on Tier 1 work while Tier 3 work waits. Recovered chunks go to the front of the queue. |
| Survives coordinator crashes | Every state transition is journaled to SQLite (WAL) in one transaction. On restart, queue order, results and dead letters are recovered, and in-flight leases get a fresh TTL so workers that kept computing can still complete them. Workers retry completions for 30s to ride out the restart. About 11k durable transitions/s; a 50k-task job recovers in 0.3s. |
| Least-privilege auth | Separate bearer tokens for workers (/worker/*) and clients (/v1/*), so a compromised laptop can lease work but can't submit jobs or read results. Each worker registration gets a session secret (X-Nightshift-Session), so a live worker's id can't be hijacked. Constant-time comparison. Tokens come from files or env, never argv. Reused token files must be regular, owned by you and 0600 (no symlinks). The coordinator binds loopback by default and refuses a LAN bind without tokens. Browser Origin requests are refused, and in no-auth loopback mode untrusted Host headers are refused too (DNS-rebinding protection). |
| Good citizen beyond the keyboard | Workers also pause on battery power (--allow-battery to opt out) and under thermal throttling (macOS pmset, Linux sensors). They pause when *other* processes push host CPU over --max-host-cpu-pct (default 65; Ollama and co-located workers are excluded; sustain and hysteresis prevent flapping; the full process table is walked only every 30s, with new processes picked up on every 1s poll). They pause when free RAM drops under --min-free-ram-gb (default 2.0), evicting the model with keep_alive: 0; the resume threshold includes the model's size, so unloading can't cause a pause/reload loop. |
| Fail-closed idle sensing | With --native-idle-seconds, a worker that can't read HID idle time refuses to start (--allow-no-idle-sensor overrides). Sensors: macOS IOKit HIDIdleTime in-process (falling back to ioreg), Windows GetLastInputInfo, GNOME/Wayland Mutter and freedesktop ScreenSaver over D-Bus, X11 xprintidle. If a sensor dies at runtime, the worker pauses (idle_sensor_lost) rather than guessing. |
| Zero-config LAN discovery | worker_daemon.py --discover finds the coordinator over UDP broadcast. The reply carries an HMAC proof keyed by the worker token, so a rogue host can't impersonate the coordinator and harvest tokens. Replays fail (fresh nonce), two valid coordinators are an error, and responses are size-capped and rate-limited (not an amplifier). |
| Live vector index (optional) | --qdrant-url adds a Qdrant sink alongside the always-on JSONL. Writes are queued off the event loop, batched, embedded (nomic-embed-text, or a deterministic hash embedder) and upserted idempotently into nightshift_graph. Failures spool to disk and replay, and never fail a completion. One embedder per collection is enforced. |
| Preemption without lost work (Baton relay, opt-in) | With coordinator.py --relay