Skip to content

feat: port official and community platform fixes - #5

Merged
Pidbid merged 10 commits into
mainfrom
agent/upstream-port-20260804
Aug 5, 2026
Merged

feat: port official and community platform fixes#5
Pidbid merged 10 commits into
mainfrom
agent/upstream-port-20260804

Conversation

@Pidbid

@Pidbid Pidbid commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

Selective vendor-neutral port from MoonshotAI/kimi-code:

  • 8 upstream-merged PRs: legacy SSE MCP, safe /fork, resumed profile/tool bindings, colon-containing question IDs, MCP structured results/meta filtering, and OAuth persistence/redirect fixes.
  • 14 pinned open community PRs: Windows plugin updates, web caching/rendering, typed tool-arg repair, provider refresh, hook stdout, WSL clipboard, safe Edit, disabled tools, path expansion, transcript memory bounds, and related reliability fixes.
  • Kimi account/login/quota/hosted-config/feedback/telemetry business logic remains excluded.
  • New v2 workspace/mcpCore-dependent work, including fix(agent-core): preserve Bash stdout after process exit MoonshotAI/kimi-code#2541, is recorded for later instead of partially importing an incompatible architecture.

Traceability

Every included PR, pinned head SHA, compatibility adaptation, and deferred candidate is recorded in UPSTREAM_PORTS.md under “Batch 2026-08-04”.

Validation

Do not merge until the latest commit passes both CI and Nix Build.

Pidbid added 2 commits August 4, 2026 20:23
Port 23 vendor-neutral upstream fixes and document all accepted and deferred PRs in UPSTREAM_PORTS.md.
Avoid duplicating SSE files already present in KKM and adapt structured MCP results to the current v2 agent/mcp type layout.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

❌ Nix build failed

    kkm>      │               ─────────┬─────────
    kkm>      │                        ╰─────────── `OAuthClientProvider` has already been declared here
    kkm>      │
    kkm>  172 │ import type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
    kkm>      │               ─────────┬─────────
    kkm>      │                        ╰─────────── It can not be redeclared here
    kkm> ─────╯
    kkm> 
    kkm> [PARSE_ERROR] Identifier `SSEClientTransport` has already been declared
    kkm>      ╭─[ ../../packages/agent-core/src/mcp/client-sse.ts:4:10 ]
    kkm>      │
    kkm>    4 │ import { SSEClientTransport, SseError } from '@modelcontextprotocol/sdk/client/sse.js';
    kkm>      │          ─────────┬────────
    kkm>      │                   ╰────────── `SSEClientTransport` has already been declared here
    kkm>      │
    kkm>  173 │ import { SSEClientTransport, SseError } from '@modelcontextprotocol/sdk/client/sse.js';
    kkm>      │          ─────────┬────────
    kkm>      │                   ╰────────── It can not be redeclared here
    kkm> ─────╯
    kkm> 
    kkm> [PARSE_ERROR] Identifier `SseError` has already been declared
    kkm>      ╭─[ ../../packages/agent-core/src/mcp/client-sse.ts:4:30 ]
    kkm>      │
    kkm>    4 │ import { SSEClientTransport, SseError } from '@modelcontextprotocol/sdk/client/sse.js';
    kkm>      │                              ────┬───
    kkm>      │                                  ╰───── `SseError` has already been declared here
    kkm>      │
    kkm>  173 │ import { SSEClientTransport, SseError } from '@modelcontextprotocol/sdk/client/sse.js';
    kkm>      │                              ────┬───
    kkm>      │                                  ╰───── It can not be redeclared here
    kkm> ─────╯
    kkm> 
    kkm> ...
    kkm>     at aggregateBindingErrorsIntoJsError (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/shared/error-CkdMJ9ps.mjs:48:18)
    kkm>     at unwrapBindingResult (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/shared/error-CkdMJ9ps.mjs:18:128)
    kkm>     at #build (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/shared/rolldown-build-BVD3dIdE.mjs:3275:34)
    kkm>     at async build (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/index.mjs:42:22)
    kkm>     at async Promise.all (index 0)
    kkm>     at async buildSingle (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/build-5FURNVr0.mjs:765:19)
    kkm>     at async Promise.all (index 0)
    kkm>     at async buildWithConfigs (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/build-5FURNVr0.mjs:721:18)
    kkm>     at async CAC.<anonymous> (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/run.mjs:22:2)
    kkm>     at async runCLI (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/run.mjs:46:3)
    kkm> 
    kkm> 
    kkm> /build/source/apps/kimi-code:
    kkm>  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @moonshot-ai/kimi-code@0.30.0-kkm.1 build:native:sea: `node scripts/native/build.mjs --profile=local`
    kkm> Exit status 1
    error: Cannot build '/nix/store/dvj5k5hg39qxayq4pxspnqs1r1rdvzcm-kkm-0.30.0-kkm.1.drv'.
           Reason: builder failed with exit code 1.
           Output paths:
             /nix/store/sadpfcbmzhw7nqsvrlxki118abaz3s1a-kkm-0.30.0-kkm.1
           Last 25 log lines:
           >    4 │ import { SSEClientTransport, SseError } from '@modelcontextprotocol/sdk/client/sse.js';
           >      │                              ────┬───
           >      │                                  ╰───── `SseError` has already been declared here
           >      │
           >  173 │ import { SSEClientTransport, SseError } from '@modelcontextprotocol/sdk/client/sse.js';
           >      │                              ────┬───
           >      │                                  ╰───── It can not be redeclared here
           > ─────╯
           >
           > ...
           >     at aggregateBindingErrorsIntoJsError (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/shared/error-CkdMJ9ps.mjs:48:18)
           >     at unwrapBindingResult (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/shared/error-CkdMJ9ps.mjs:18:128)
           >     at #build (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/shared/rolldown-build-BVD3dIdE.mjs:3275:34)
           >     at async build (file:///build/source/node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/dist/index.mjs:42:22)
           >     at async Promise.all (index 0)
           >     at async buildSingle (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/build-5FURNVr0.mjs:765:19)
           >     at async Promise.all (index 0)
           >     at async buildWithConfigs (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/build-5FURNVr0.mjs:721:18)
           >     at async CAC.<anonymous> (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/run.mjs:22:2)
           >     at async runCLI (file:///build/source/node_modules/.pnpm/tsdown@0.22.0_@arethetypeswrong+core@0.18.2_publint@0.3.18_tsx@4.21.0_typescript@6.0.2__e3c4b77bdbb7c42f8dbfce92959948a8/node_modules/tsdown/dist/run.mjs:46:3)
           >
           >
           > /build/source/apps/kimi-code:
           >  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @moonshot-ai/kimi-code@0.30.0-kkm.1 build:native:sea: `node scripts/native/build.mjs --profile=local`
           > Exit status 1
           For full logs, run:
             nix log /nix/store/dvj5k5hg39qxayq4pxspnqs1r1rdvzcm-kkm-0.30.0-kkm.1.drv

Pidbid added 8 commits August 4, 2026 20:28
Reuse existing SSE regression coverage and import the transcript output cap helper used by the port.
Update snapshots and coercion assertions for the accepted behavior, tolerate legacy session test doubles, and defer MoonshotAI#2541 until KKM has the required kaos wait/read lifecycle.
Update the remaining llm.request inline snapshot hashes after the Edit safety tool description changed.
@Pidbid
Pidbid merged commit 86d5571 into main Aug 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant