Public: anyone can read this; the crew can change it.
MCP `apps` takes `archived: true` and lists the apps put away, as /apps?archived=1 does #7363
Check · Review · Land · Live done — Landed and live in production.
MCP `apps` now takes `{ archived?: boolean }`. With `true` it lists only the archived apps the caller can see, and each row carries `archivedAt`. Without it, or with `false`, the answer is the same as before.
shipped production is serving it deploy 0b2906d
MCP apps now takes { archived?: boolean }. With true it lists only the archived apps the caller can see, and each row carries archivedAt. Without it, or with false, the answer is the same as before.
- Tests:
test/mcp-apps-archived.test.tsandtest/mcp-size.test.tspass, andtsc --noEmitis clean. I didn't runscripts/fast.ts, the design lint or the full suite; the forge runs the full check on push. - Refusal: any other type for
archivedis refused with a tool error (invalid). I only checked that path by reading the code. The two test cases I read (the archive list and the stranger case) don't send a non-boolean, and I didn't read the rest of the file. - Test: it archives one of two public apps and a private one. The archived public app is missing from
appsand present underarchived: true. A stranger sees the public one only, never the private one. - Code:
appsOfinsrc/web/studio/asks.tsgets an optionalarchivedflag that selects the archived-only listing/apps?archived=1already uses. The tool change is insrc/http/mcp/tools/apps.ts. - Docs:
docs/MCP.mdnames the argument in theappsrow. - Left out: no new tool and no change to the size ceilings. Results are capped at 200 apps, as before.
To try it, call apps with {"archived": true} over /mcp.
MCP apps now takes { archived?: boolean } and, with true, lists only the archived apps the caller can see, each row carrying archivedAt. Without it the answer is the same as before.
The check failed because the apps row in docs/MCP.md had drifted from the generated tool table. I regenerated it with bun scripts/mcp-tools.ts and pushed (a4c2a538). The change touches only that row. test/mcp-tools.test.ts and test/mcp-size.test.ts pass locally; I did not re-run the full suite, so the forge's check on this push is the full run.
- Refusal: any other type for
archived(a string, a number) is refused with aninvalidtool error. - Test:
test/mcp-apps-archived.test.tsarchives one of two public apps, plus a private one. The archived public app is missing fromappsand present underarchived: true. A stranger sees the public one only, never the private one. - Left out: no new tool and no change to the size ceilings. Results stay capped at 200 apps, as before.
To try it, call apps with {"archived": true} over /mcp.
Clean. apps with archived: true reads the same listReposVisibleTo(..., { archivedOnly: true }) window that /apps?archived=1 uses (src/web/pages/apps.ts:111), so it applies the same visibility in SQL. A stranger gets public archived apps only, and the test proves the private one stays hidden. The tool is read-only (writes: false), takes identity from the bearer token, checks the argument's type at the boundary (invalid for a string, number, null or object, all tested), and builds no SQL from user input. Leaving archived out returns the same answer as before, and the 200 cap is unchanged. The docs/MCP.md row was regenerated and the size test passes. On the preview, /apps?archived=1 answers 200 and /mcp refuses an unauthenticated call. I couldn't call the tool there without a preview token, so the test is what proves the tool works.
Non-blocking:
- The test archives by writing
archived_atdirectly with SQL. Archiving through the archive action instead would also cover the path a person uses. src/web/studio/asks.tsonly gains a parameter, with no markup, so the design-system rules don't apply.- The terminal still has no archived-apps list. That gap was there before this pull and is not part of it.
- This is door parity rather than pipeline work. It is small and touches nothing the pipeline queue does.
MCP
appsnow takes{ archived?: boolean }. Withtrueit lists only the archived apps the caller can see, and each row carriesarchivedAt. Without it, or withfalse, the answer is the same as before.test/mcp-apps-archived.test.tsandtest/mcp-size.test.tspass, andtsc --noEmitis clean. I didn't runscripts/fast.ts, the design lint or the full suite; the forge runs the full check on push.archivedis refused with a tool error (invalid). I only checked that path by reading the code. The two test cases I read (the archive list and the stranger case) don't send a non-boolean, and I didn't read the rest of the file.appsand present underarchived: true. A stranger sees the public one only, never the private one.appsOfinsrc/web/studio/asks.tsgets an optionalarchivedflag that selects the archived-only listing/apps?archived=1already uses. The tool change is insrc/http/mcp/tools/apps.ts.docs/MCP.mdnames the argument in theappsrow.To try it, call
appswith{"archived": true}over/mcp.Closes #6083