docs: purge chain-of-thought leakage from prose
Delete design-session citations (decision/audit/plan ordinals, stack positions), change narration, review choreography, and reviewer-addressed justification from comments, JSDoc, docs, READMEs, Agent Notes, tests, and generator templates; restate every affected fact as current-state contract prose. Fix generated docs at their sources and regenerate the catalogs and cordis-surface regions; re-paste type-equiv blocks; update every bilingual counterpart and re-record the pairs. Record the citation rule in the committed-artifact-citations Agent Note.
This commit is contained in:
@@ -258,9 +258,8 @@ function createExecutor(
|
||||
}
|
||||
|
||||
// Trust boundary: the SDK's return type erases to `any[]` due to the
|
||||
// union of CallToolResult | CompatibilityCallToolResult. We process each
|
||||
// element defensively in extractText (reading only .type/.text/.mimeType
|
||||
// with optional fallbacks).
|
||||
// union of CallToolResult | CompatibilityCallToolResult; extractText
|
||||
// validates each element.
|
||||
const content = result.content as unknown as JsonValue[]
|
||||
const text = extractText(content, rawName)
|
||||
|
||||
|
||||
@@ -40,9 +40,8 @@ export function createTransport(config: Config): Transport {
|
||||
case 'streamable-http':
|
||||
// The MCP SDK's StreamableHTTPClientTransport has optional callback
|
||||
// properties typed without `| undefined` (exactOptionalPropertyTypes
|
||||
// mismatch with the Transport interface). The cast is safe — the SDK
|
||||
// constructed the object, it simply doesn't declare the optionals
|
||||
// strictly enough for our tsconfig.
|
||||
// mismatch with the Transport interface); the SDK constructed the
|
||||
// object, so the cast records only that widening.
|
||||
return new StreamableHTTPClientTransport(
|
||||
new URL(config.url),
|
||||
{ requestInit: { headers: config.headers } },
|
||||
|
||||
@@ -175,7 +175,6 @@ describe('apply (plugin lifecycle)', () => {
|
||||
expect(ctx.tools.get('mcp__srv__remote')).toBeDefined()
|
||||
|
||||
await expect(apply(ctx, stdioConfig)).rejects.toThrow(/serverName "srv" is already in use/)
|
||||
// First instance unaffected.
|
||||
expect(ctx.tools.get('mcp__srv__remote')).toBeDefined()
|
||||
})
|
||||
|
||||
|
||||
@@ -207,7 +207,6 @@ describe('syncTools', () => {
|
||||
const firstDisposers = await syncTools(client as never, ctx, defaultOpts, new Map())
|
||||
expect(ctx.tools.get('mcp__srv__old_tool')).toBeDefined()
|
||||
|
||||
// Second sync with different tools should remove old_tool.
|
||||
client.listTools.mockResolvedValue({ tools: [{ name: 'new_tool', inputSchema: { type: 'object' } }], nextCursor: undefined })
|
||||
const secondDisposers = await syncTools(client as never, ctx, defaultOpts, firstDisposers)
|
||||
|
||||
@@ -770,13 +769,11 @@ describe('createTransport', () => {
|
||||
toolCallTimeoutMs: 60_000,
|
||||
failOnStartupError: false,
|
||||
}
|
||||
// createTransport internally calls buildChildEnv; we verify by inspecting
|
||||
// the constructed StdioClientTransport. Since we can't inspect private fields
|
||||
// easily, we at least confirm it doesn't throw and returns a transport.
|
||||
// StdioClientTransport keeps its env private; the observable contract is
|
||||
// that createTransport(config) returns a transport without throwing.
|
||||
const transport = createTransport(config)
|
||||
expect(transport).toBeDefined()
|
||||
} finally {
|
||||
// Restore env
|
||||
delete process.env.SAFE_VAR
|
||||
delete process.env.MY_SECRET
|
||||
delete process.env.API_KEY
|
||||
|
||||
Reference in New Issue
Block a user