Files
reverse-engineering-anything/docs/specs/agent-environments/environment-serve/plan.md
T
a67525cdf1 docs: organize canonical documentation layout and verify new pages (#2791)
* docs: organize canonical documentation layout (URGENTE)

Group all existing authored guides by domain and ownership, expose complete navigation, and preserve their public routes. Update physical path consumers and release configuration while retaining historical records. Document domain-based specs and ADR slugs without global numbering.

Co-Authored-By: Codex <noreply@openai.com>

* fix(docs): honor home layout in all-page route verification

* style: format reviewed source changes

* fix(docs): preserve routes and navigation cache inputs

* fix: repair the static-check failures on the default branch (#2895)

* fix: repair the static-check failures on the default branch

The default branch fails its own required `Static checks` job three ways, so
every pull request reports that job as failed regardless of its own change.

- `npm run format:check` reports `src/domain/functionComparison.test.ts` and
  `src/ida/IdaOperationRunner.ts`.
- `npm run lint` reports a duplicate `import { join } from "node:path"` in
  `tests/boundary/mcp/ghidraInventoryMcp.test.ts` (lines 4 and 17).
- `npm run typecheck` reports `format: "devin"` missing from the client format
  union in `src/application/SupportedClients.ts`, and an unchecked index in
  `tests/boundary/cli/clientProfileLifecycle.test.ts`, whose pair array is
  inferred as `string[][]`.

Apply the pinned formatter, drop the duplicate import, list the `"devin"` format
that its own definition already uses, and mark the pair array `as const`.

Validation: `npm run check:fast` and `npm run format:check` pass.

* fix(setup): keep Devin on the JSON configuration dialect

---------

Co-authored-by: 吴佳浩 <wujiahao@supremind.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>

* fix(docs): update links after guide relocation

* docs: correct verified documentation route counts

* fix(docs): update browser capture guide link after move (#2820)

Refresh gettext protected-link comments alongside the authored href.

Co-authored-by: Codex <noreply@openai.com>

* fix(docs): include http3 lab in stable routes

* fix(docs): preserve historical release evidence and links

* fix(ghidra): restore Windows verifier identity import

* docs(wakaru): preserve pinned upstream policy link

* docs(index): retain recently added guide links

* docs(mcp): preserve parent retention clarification

* fix(cli): preserve standalone import guidance

* fix(test): preserve translated guide link drift coverage

---------

Co-authored-by: Matheus Breguêz <matbrgz@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: morluto <17176810+morluto@users.noreply.github.com>
Co-authored-by: 吴佳浩Alben <35291372+XiaoBinGan@users.noreply.github.com>
Co-authored-by: 吴佳浩 <wujiahao@supremind.com>
2026-11-08 01:42:28 +08:00

2.3 KiB

Implementation plan

  1. Add src/application/environment/environmentSource.ts to authenticate the two Evidence files, require the manifest view kind and the capture operation, refuse a parent mismatch, and reduce every cited record to its request line, status, content type and retained response text through the slice-1 request-line reader, so the server holds only what replay returns.
  2. Add environmentTools.ts to map manifest tools to MCP tool definitions with one hand-built JSON Schema per tool that both registerTool (through the SDK's fromJsonSchema) and the card consume, and to build the card in the echo example's key order.
  3. Add environmentReplay.ts to score cited records by path-segment matches, then query matches, keep manifest order on ties, and shape the replay result with JSON-like parsing, UTF-8-safe truncation and the replay provenance block; export the slice-1 JSON-like predicate instead of restating it.
  4. Add src/server/environment/serveEnvironment.ts to build the McpServer whose handlers attach REA's target-content _meta, the card and /agentenv routes (the latter reading its body through the SDK's bounded reader), and to serve them through the slice-2 serveStreamableHttp with its routes and onerror seams; add src/config/environmentName.ts for ENVIRONMENT_NAME.
  5. Add src/cli/environmentCommands.ts registering environment-serve through withCommandCancellation and logCliCommand, resolving host and port with the slice-2 endpoint parser, reading files through parseCliJsonInput, importing the listener lazily, awaiting the cancellation signal or a listener failure and returning one stopped document or a typed error; register the name in CLI_COMMANDS and the lazy module in the startup import probe.
  6. Share the fixture pair through tests/fixtures/environmentServe.ts and the listener spawn through a generalised startListeningProcess; add services, adapters, mcp-boundary, cli-boundary and process-boundary tests.
  7. Document the command in docs/getting-started/cli.md, add docs/agent-environments.md with its sidebar and index entries, and record the spec.

No new dependency is introduced. REA's tool contracts, catalog digests and the stdio transport are unchanged; the CLI inventory gains one command.