Public: anyone can read this; the crew can change it.

The MCP flow tool carries the warming files (src/crew/hot_history.ts warmingLine), cut to public repositories for an agent #16957

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The MCP flow tool and GET /api/v1/telemetry/flow now return warming: { says }: the files that gained open pulls in the last hour. It is the same warmingLine text the flow page and terminal show, one line per file, such as warming: src/a.ts 1 → 3 pulls in alice/shop. It is "" when nothing is warming.

Notes

opened this

The MCP flow tool and GET /api/v1/telemetry/flow now return warming: { says }: the files that gained open pulls in the last hour. It is the same warmingLine text the flow page and terminal show, one line per file, such as warming: src/a.ts 1 → 3 pulls in alice/shop. It is "" when nothing is warming.

The new flow field is built from warmingLine in src/system/telemetry.ts (flowBody). The owner sees every repository; an agent reader sees only public ones, so a file in a private repository is never named to an agent. I added no new function and no new export.

I tested flowFor for both readers. The agent gets the line while the repository is public and "" once it is private; the owner gets it either way. The test is in test/flow-hot-files.test.ts. That file, test/crew-hot-history.test.ts and test/mcp-size.test.ts pass, and so do the telemetry and flow-cache tests. bun x tsc --noEmit is clean. I did not run bun scripts/design-lint.ts, since no page changed.

  • Terminal door: the terminal's Flow dialog already shows warming, so the commit says No door: ….
  • Tool description: unchanged, because tools/list is at its size ceiling. An agent finds warming in the result, not the listing.
  • Docs: docs/REFERENCE.md now says the tool carries it.
  • Not done:
    • The OpenAPI route text is unchanged; the response body isn't described there.
    • I did not add a docs/features/ how-to.
  • Gate note: the gate flagged two files with a comment line over 100 columns; --fix rewrapped them, but I committed that before the note. The gate says the nightly rewrap handles it on main.

To try it: call the flow tool or GET /api/v1/telemetry/flow with a telemetry:read token after open pulls have touched the same file twice or more within the hour. Nothing is named until a sample at least 30 minutes old exists, so right after a restart it stays empty.

Closes #6569

commented

The MCP flow tool and GET /api/v1/telemetry/flow now return warming: { says }: the files that gained open pulls in the last hour. It is the same warmingLine text the flow page and terminal show, one line per file, such as warming: src/a.ts 1 → 3 pulls in alice/shop. It is "" when nothing is warming.

The new flow field is built from warmingLine in src/system/telemetry.ts (flowBody). The owner sees every repository; an agent reader sees only public ones, so a file in a private repository is never named to an agent. I added no new function and no new export.

I tested flowFor for both readers. The agent gets the line while the repository is public and "" once it is private; the owner gets it either way. The test is in test/flow-hot-files.test.ts. That file, test/crew-hot-history.test.ts and test/mcp-size.test.ts pass, and so do the telemetry and flow-cache tests. bun x tsc --noEmit is clean. I did not run bun scripts/design-lint.ts, since no page changed.

  • Terminal door: the terminal's Flow dialog already shows warming, so the commit says No door: ….
  • Tool description: unchanged, because tools/list is at its size ceiling. An agent finds warming in the result, not the listing.
  • Docs: docs/REFERENCE.md now says the tool carries it.
  • Not done:
    • The OpenAPI route text is unchanged; the response body isn't described there.
    • I did not add a docs/features/ how-to.
  • Gate note: the gate flagged two files with a comment line over 100 columns; --fix rewrapped them, but I committed that before the note. The gate says the nightly rewrap handles it on main.

To try it: call the flow tool or GET /api/v1/telemetry/flow with a telemetry:read token after open pulls have touched the same file twice or more within the hour. Nothing is named until a sample at least 30 minutes old exists, so right after a restart it stays empty.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs