From baad68f437edc5c41116092cbc5bf272b40fd5f7 Mon Sep 17 00:00:00 2001 From: Kaoru0822 Date: Sat, 21 Nov 2026 00:47:50 -0800 Subject: [PATCH] docs(mcp): clarify DeepSeek catalog refresh compatibility (#13041) * docs(mcp): describe the DeepSeek in-task refresh limit * test(setup): preserve DeepSeek catalog profile choices --- docs/getting-started/client-configuration.md | 10 ++- tests/boundary/cli/setupToolCatalog.test.ts | 77 ++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/client-configuration.md b/docs/getting-started/client-configuration.md index a2821da5d3..774a3f3622 100644 --- a/docs/getting-started/client-configuration.md +++ b/docs/getting-started/client-configuration.md @@ -118,7 +118,7 @@ unfamiliar prefix. The unavailable fork reported in ## Hot/cold catalogs -For a client that supports MCP catalog refresh, set +For a client that can call newly listed tools during an active task, set `REA_MCP_TOOL_CATALOG_PROFILE=hot-cold` in REA's server environment and restart the connection. REA then advertises a small initial catalog and loads other named tools through `discover_tools`. Setup can record the explicit choice: @@ -1037,6 +1037,14 @@ in `~/.agents/skills` (`$DSH_AGENTS_HOME/skills` when configured); Harness discovers that directory, and its native `skill` tool can load `reverse-engineer-anything`. +Keep the default `full` catalog with Harness 0.2.0-rc.2. In a headless +loopback-model probe, `discover_tools` activated the requested tool. Harness +re-fetched `tools/list` and received the new definition, but its next model +request still omitted that tool. Verify that an active task can call a newly +listed tool before opting into hot/cold on another Harness version. To restore +upfront advertisement, run `rea setup --client dsh --tool-catalog-profile full` +and restart Harness. + REA's optional [native client verification](../development/testing.md#end-to-end-integration-and-golden-evidence) checks headless chat, skill loading, all tool input schemas and actual analysis using the installed Harness and a local model fixture. This establishes the diff --git a/tests/boundary/cli/setupToolCatalog.test.ts b/tests/boundary/cli/setupToolCatalog.test.ts index da00ad8ce1..c909fec3d7 100644 --- a/tests/boundary/cli/setupToolCatalog.test.ts +++ b/tests/boundary/cli/setupToolCatalog.test.ts @@ -2,6 +2,7 @@ import { access, mkdir, readFile, readdir, writeFile } from "node:fs/promises"; import { dirname, join } from "node:path"; import { parse as parseToml } from "smol-toml"; import { expect } from "vitest"; +import { parseDshCordisDocument } from "../../../src/application/DshCordisPatch.js"; import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; import { cliTest } from "../../support/cli/cliFixture.js"; @@ -125,3 +126,79 @@ cliTest.for(["codex", "cursor"] as const)( ); }, ); + +cliTest( + "keeps DeepSeek Harness upfront by default and restores it by explicit selection", + async ({ cli }) => { + const home = await createTestTempDirectory("rea-dsh-catalog-"); + const dshHome = join(home, "harness"); + const config = join(dshHome, "cordis.patch.yml"); + const original = + "- id: agent-default-model\n config:\n model: caller-choice\n"; + await mkdir(dshHome); + await writeFile(config, original); + const setup = (approval: string, profile?: string) => + cli.run({ + arguments: [ + "setup", + "--client", + "dsh", + "--no-skill", + approval, + "--json", + ...(profile === undefined ? [] : ["--tool-catalog-profile", profile]), + ], + cwd: home, + environment: { + HOME: home, + USERPROFILE: home, + DSH_HOME: dshHome, + REA_MCP_TOOL_CATALOG_PROFILE: undefined, + }, + }); + const read = () => readFile(config, "utf8"); + const setting = "env.REA_MCP_TOOL_CATALOG_PROFILE"; + + const upfront = await setup("--yes"); + expect(upfront.exitCode, upfront.stderr).toBe(0); + const initial = await read(); + const registration = parseDshCordisDocument(initial).servers.rea; + expect(registration).toMatchObject({ transport: "stdio" }); + expect(registration).not.toHaveProperty(setting); + expect(initial).toContain(original); + + const preview = await setup("--dry-run", "hot-cold"); + expect(preview.exitCode, preview.stderr).toBe(0); + expect(preview.json).toMatchObject({ + plannedActions: [ + expect.objectContaining({ + detail: expect.stringContaining( + "REA_MCP_TOOL_CATALOG_PROFILE=hot-cold", + ), + }), + ], + }); + expect(await read()).toBe(initial); + + const optedIn = await setup("--yes", "hot-cold"); + expect(optedIn.exitCode, optedIn.stderr).toBe(0); + const saved = await read(); + expect(parseDshCordisDocument(saved).servers.rea).toHaveProperty( + setting, + "hot-cold", + ); + const repeated = await setup("--yes"); + expect(repeated.exitCode, repeated.stderr).toBe(0); + expect(repeated.json).toMatchObject({ appliedActions: [] }); + expect(await read()).toBe(saved); + + const restored = await setup("--yes", "full"); + expect(restored.exitCode, restored.stderr).toBe(0); + const full = await read(); + expect(parseDshCordisDocument(full).servers.rea).toHaveProperty( + setting, + "full", + ); + expect(full).toContain(original); + }, +);