1ccacad63281094de8a3372d5a507d38f9969e5c
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7c0a103eb1 |
sessions: a file's modification time is unix nanoseconds, 80 bytes a file (#2278)
A Sessions poll copies every session file's `file` into several slices (distinctOf, listedRollouts, listCCFiles, distinctCodexFiles), and rolloutsSeen keeps one of every Codex rollout. Its time.Time was 24 of its 96 bytes. mod is now a modTime (int64 nanoseconds, 0 for none) with the few methods the package used; a time.Time going in is modOf(t), one coming out is .Time(). UnixNano keeps the zero time's own value, so a parse kept on disk for a file with no time still matches. Run on mote (M5 Pro, macOS 27), with a copy of the real accounts: - go vet ./...; GOOS=linux and GOOS=windows go vet ./internal/sessions: ok. - go test ./internal/sessions ./internal/gui ./internal/usage: ok. - TestFileFitsEightyBytes (new) holds the size and the round trip of a time and of none. - /api/sessions and /api/sessions/stats?days=30 from a fresh start, real history (~23k files): byte-identical to v0.1.3499's code (8,068,574 and 623,801 bytes). - 40 /api/sessions polls with X-Magpie-Had: 208 MB allocated before, 185.5 MB with this. |
||
|
|
b78b1de003 |
library: magpie-image is behind the MCP hub, saving into the calling agent's project
magpie-image was the one MCP server the hub left out, because it saves what it makes on disk and needs to know whose project that is. The hub now serves its tools like any other server's and tells it where the caller works: 1. the hub answers a tools/call as SSE and asks the agent roots/list on that stream (3s), as Claude Code answers; 2. else Codex's _meta x-codex-turn-metadata.workspaces (git repos only); 3. else the Codex thread's cwd from its session file (sessions.CodexThreadCwd), only with session consent; 4. else none, and the image goes to ~/Pictures/Magpie as before. The hub passes `magpie/roots` and `magpie/client` in the call's _meta; imagemcp saves into the first root and names the agent on its usage row. Its result carries `magpie/model`, which the hub's own usage row takes, so the row says which image model drew it. A WSL agent keeps magpie-image as its own entry (the hub can't reach a path inside the distro). docs/subsystems/mcp-hub.md (mcp-router.md after the next commit), gateway-routing.md and gateway-sessions.md say so. It is rebased on #4382 ( |