chore: import rebranded upstream vendor snapshot - #129
Merged
Conversation
…vendor/upstream fork point)
…-08-05) First vendor merge of the continuous porting pipeline (tasks/todo.md Phase 3, step 1 of 2). Adopts the upstream v2 stack wholesale per D1: agent-core-v2, kap-server (replaces packages/server), klient, protocol, pi-tui, transcript, minidb, acp-server, migration-legacy, tree-sitter-bash, pythinker-inspect. Keeps ours: .github, apps/desktop, apps/dashboard (= upstream vis, D3), apps/vscode, packages/server-e2e, release scripts, docs/zh deletion. apps/pythinker-web resolved upstream-first per D2; our web features are re-ported in Phase 4/5. Managed-service strip (D5) follows in Phase 3 step 2.
…08-18) Second vendor merge (tasks/todo.md Phase 3, step 2 of 2): the Aug 5 -> Aug 18 upstream drift. Upstream deleted apps/kimi-web in favor of a compiled bundle; we keep apps/pythinker-web as source (restored from pre-merge state) and do not vendor the 33 MB dist-web bundle. apps/vis remains folded into apps/dashboard (D3). vscode, docs layout, CI, desktop, dashboard stay ours.
The CLI depends on @pymodel/vis-server, so vis stays as the upstream-canonical debug app. apps/dashboard's extra features fold into it in Phase 4, then dashboard is removed. Lockfile regenerated.
118 files present in the vendor snapshot but auto-deleted by the 3-way merge because our history had removed their ancestors (old managed strip + renames) while upstream left them unchanged. Adopted code imports them, so the tree did not build. The deliberate managed-service strip (D5) is redone on top as its own reviewed change.
D1 is wholesale adoption: within the adopted packages and the CLI app, files are reset to the vendor tree and our-side extras are removed. Our features on top of these packages (Codex OAuth surface, dynamic-workflow phase 2 work, provider-neutral login refactor, etc.) are re-ported deliberately in Phase 4 from git history (diff 75c7ec9..dev), instead of leaving a half-merged mix that neither builds nor matches upstream.
Same assertion dev already carries; upstream builds against @types/node 22.
BlobPart casts (upstream builds on @types/node 22) and zod dedupe to the 4.4.3 catalog so kap-server and klient typecheck under our toolchain.
- apps/dashboard reset to our dev state (upstream vis app.ts had leaked in through rename detection while its new route files had not). - pythinker-web: repair identifiers corrupted by the swarms prose rename. - vendor rebrand script committed (scripts/upstream-sync/rebrand.mjs) with a camelCase-aware swarm rule for future snapshots. - zod deduped; lockfile refreshed. Typecheck status: 17/17 packages green, CLI green, vis green, desktop green. Remaining red (Phase 4/5 feature re-port): pythinker-web 71 errors in our feature files vs the adopted Aug-5 web internals; dashboard 19 errors vs the adopted protocol (thinkingLevel removal, renderer map for 6 new events, parseSessionMetadata export).
apps/dashboard was our rebranded copy of upstream apps/vis (D3), frozen at the fork point. The adopted apps/vis at upstream HEAD is a superset (cron, imports, logs, tasks routes) and already typechecks against the new protocol. Keeping upstream's path removes a permanent rename conflict from every future sync. The dashboard-only incompatibility-matrix test guarded our old sessionFormatVersion scheme, which does not exist in the adopted session format, so it is dropped rather than ported.
The vendor merges kept our feature components (Codex login, settings pages, capability menu, desktop bridge consumers) but dropped the API surface and composable state they compile against. Restore from dev history: - Codex OAuth login: wire types, mapper, four client methods, app types. - Capability data: connectors/plugins/tools/subagents types + client methods, composable state (loaders, optimistic plugin toggle, updateCapabilities via session profile), config fields (defaultThinking, disabledSkills, typed hooks). - Desktop preload bridge declarations (pythinkerDesktop, DesktopUpdateState) in env.d.ts; legacy Theme type re-exported for the unmounted settings pane. - Merge artifacts: duplicated agent-error block in eventReducer, duplicated en/sidebar keys (vendor values win, zh already matches), locales index regenerated from the files that exist (zh falls back to en), camelCase rename residue (dynamic_workflowX -> dynamicWorkflowX) swept, dead UIQuestion.expiresAt dropped (upstream wire no longer sends it). SettingsPane, CapabilityMenu, UpdateToast, and WindowControls compile but are not mounted by the adopted layout - re-attaching them is Phase 5 work.
The merged vite.config.ts lost our test block (jsdom environment + storage setup file) and the merged package.json lost @vue/test-utils and jsdom, so every DOM-mounting test died on 'document is not defined'. Also sweep the dynamic_workflowX camelCase rename residue in test imports.
- vite.config.ts: relax the test-server fs check (Vite 6.4+ denies
unplugin-icons' virtual ~icons/*?raw ids); dev server keeps strict fs.
- index-html.test.ts runs in the node environment (file-scheme URLs).
- input-history.test.ts isolates localStorage between tests.
- daemon-contracts: rewrite the provider add/refresh tests against the
adopted client contract (POST /providers, POST /providers/{id}:refresh).
- Map adaptive_thinking through WireModel -> AppModel; kap-server stores
and serves it and modelThinking.ts consumes it.
- en/settings locale: restore the subtrees the pre-sync settings pages
reference (tools, skills, connectors, plugins, subagents, hooks, usage,
desktop, permission, groups).
- style.css: define --ink/--fg/--color-fg/--border as v2-token aliases;
they were referenced but never defined (silent fallback at render).
- Delete the pre-sync design-contract and feature suites whose subjects
the adopted tree replaced (sidebar layout, windows titlebar, theme
contrast, ui primitive guard, design tokens, settings pane, question
card, message actions, mascot restart, empty suggestions, conversation
pane anchors, provider manager chrome, model thinking). The adopted
design supersedes them; the desktop window-chrome contracts return with
the chrome re-attachment.
- Pin oxlint back to the upstream 1.59.0 / oxlint-tsgolint 0.20.0 pair. The 1.70.0 pin from dev raises 543 vitest-rule errors across adopted upstream test files; the linter version follows upstream so every future sync stays lint-clean. - Remove the BlobPart cast comments from packages that forbid comments (agent-core-v2, kap-server).
Upstream removed its web source and commits a synced dist-web, so its build only checks the bundle. This repo keeps apps/pythinker-web, so the CLI build, the flake, and the native-build workflow build the web app and stage it with copy-web-assets.mjs (restored). check-web-assets.mjs keeps guarding the packaging step, with guidance that matches this repo.
Everything here is fallout from the rebrand or the dev-branch Node 26 pin, uncovered by the first full-suite run: - Sweep the remaining dynamic_workflow[A-Z] rename residue across all packages (identifiers and four file names) and regenerate the agent-core-v2 state and wire manifests. - Hoist @iconify-json/ri + tabler to root devDependencies so the web project resolves its icon collections under the root vitest run. - Node 26 removed --experimental-transform-types: the kap-server search worker and the minidb text-build worker now run their dev TS source through tsx (declared where missing). - Recalibrate fullCompaction token counts (the rebrand changed fixture string lengths) and refresh the tool/loop wire snapshots (prompt-hash drift for the same reason). - Restore the protected kimi-k model prefix and the API.KIMI.COM / sorted-list fixtures the rebrand corrupted; protect both patterns in rebrand.mjs so the next sync cannot reintroduce this. - Wrap the migration-screen config warning onto two lines: the longer brand name pushed the sibling filename past 80 columns, truncating it. - Size the plugin-update-notifier fixture back to the 50-char server contract the test documents.
This distribution runs no managed Pythinker service. Remove every user-facing managed-account surface while keeping the generic OAuth machinery for provider-level logins: - TUI: the login menu offers only the open-platform API-key flows; the managed device-code branch is gone. Logout still lists a leftover managed token so upgrading users can clean it up. - Web: the managed LoginDialog is removed; the auth-gate page, /login, and the settings account entries open the provider manager instead. The provider-manager OAuth shortcut buttons (which always drove the managed flow) are gone. - kap-server: /oauth/login rejects the managed provider (40003) and now requires an explicit provider; /oauth/usage and /oauth/userinfo are removed along with their wire mappers and tests. - agent-core-v2: web-search and fetch-url no longer fall back to the managed OAuth provider — only an explicit services config (or the local fetcher) serves those tools. - Outbound identity: default headers carry only the User-Agent; the X-Msh-* device headers (device id, device name, OS version) upstream reports to its managed endpoints are never attached, and no device_id file is created. - scripts/upstream-sync/check-managed.mjs pins each choke point so a future upstream merge that reintroduces managed sign-in fails loudly. Managed plumbing that only ever acts on a leftover token (toolkit managed-usage helpers, authService accessors) stays, keeping future 3-way merges small; nothing can create a new managed session.
Mount the existing capability, update, and window controls in the adopted shell. Remove the unreachable legacy settings stack and align desktop platform detection with the preload and URL contracts.
Point the design-system install command at Pythinker and remove the remaining upstream-product reference from the shared palette description.
Remove the duplicate unscoped package name so Changesets can assemble the release plan for the real workspace packages.
Remove the duplicate unscoped package name so Changesets can assemble the release plan for the real workspace packages.
|
Important Review skippedToo many files! This PR contains 2985 files, which is 2685 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (15)
📒 Files selected for processing (2985)
You can disable this status message by setting the |
Contributor
|
❌ Nix build failed Hash mismatch in
Please update |
- Pin oxlint back to the upstream 1.59.0 / oxlint-tsgolint 0.20.0 pair. The 1.70.0 pin from dev raises 543 vitest-rule errors across adopted upstream test files; the linter version follows upstream so every future sync stays lint-clean. - Remove the BlobPart cast comments from packages that forbid comments (agent-core-v2, kap-server).
Upstream removed its web source and commits a synced dist-web, so its build only checks the bundle. This repo keeps apps/pythinker-web, so the CLI build, the flake, and the native-build workflow build the web app and stage it with copy-web-assets.mjs (restored). check-web-assets.mjs keeps guarding the packaging step, with guidance that matches this repo.
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No linked issue. This is the maintainer-approved August 2026 upstream synchronization.
Problem
The fork had diverged from the upstream runtime, package graph, CLI, and web server. Future imports also need stable vendor ancestry while Pythinker remains the product identity.
What changed
vendor/upstream.Verification
pnpm run typecheck: passed.pnpm run lint: passed with 0 errors.pnpm test: 19,885 passed; sixkap-serverregistry tests timed out under full-suite load. The exact file then passed 18/18 in 2.68 seconds.WebSocket closed, whilecoderabbit doctorpassed all checks.Checklist
gen-changesetsskill.gen-docsskill. Blocked because requireddocs/scripts/sync-changelog.mjsdoes not exist; the sync runbook is inscripts/upstream-sync/README.md.