Skip to content

feat: sync upstream v0.81.0 into KKL fork#21

Merged
junior-ricon merged 47 commits into
mainfrom
junior/sync-upstream-v0.81.0-20260721
Jul 21, 2026
Merged

feat: sync upstream v0.81.0 into KKL fork#21
junior-ricon merged 47 commits into
mainfrom
junior/sync-upstream-v0.81.0-20260721

Conversation

@junior-ricon

Copy link
Copy Markdown

Summary

Sync the KKL fork from upstream Pi v0.80.10 to upstream v0.81.0.

The merge has exact parents:

  • KKL main: 736d14f2fee5dfa5dbd3a963a26410e10146a91d
  • upstream main: 3dcb411e8969d293556b6540696357eca22e044e

The fork's shared upstream branch was fast-forwarded to that exact upstream head before creating this merge.

KKL preservation

  • keep KKL-only exact tree-navigation summaries
  • keep queued extension commands and terminal queue semantics
  • keep print-mode extension continuation behavior
  • preserve the fork's KKL-only CI/release workflow policy instead of restoring upstream publication and triage workflows
  • set all workspace versions and internal dependency pins to 0.81.0-kkl.1
  • regenerate the root lock, extension example locks, coding-agent shrinkwrap, and install lock

The one source conflict combines upstream branch-summary usage accounting with KKL exact-summary provenance. The one compatibility repair updates a KKL-only test from the removed streamFn constructor option to upstream's required streamFunction name.

Validation

  • upstream 3dcb411e full CI passed: https://github.com/earendil-works/pi/actions/runs/29834576830
  • local full workspace build passed, including strict generated-model validation
  • local full workspace check passed
  • focused KKL behavior group: 48 passed, 10 skipped
  • focused tree-summary/usage integration group: 49 passed, 10 skipped
  • Fold git pre-commit passed
  • Fold git pre-push passed with the expected warning that inherited upstream commits are not all GPG-signed; the merge commit itself is signed by Junior

The long workspace test suite is intentionally left to hosted CI.

Boundary

This PR does not tag or publish v0.81.0-kkl.1, update downstream consumers, merge Pi #19, or change ricon-pi PR earendil-works#40. Those remain separate decisions.

mitsuhiko and others added 30 commits July 19, 2026 20:18
Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
…ce (earendil-works#6790)

When pi exits, the reverse-video cursor character remains visible on
the editor prompt line. Combined with the terminal's own cursor below,
this creates the appearance of two cursors, which is confusing.

Overwrite the inverted cursor with a normal space before exiting.
…ndil-works#6812)

The npm registry normalizes bin paths in packument metadata
("dist/cli.js") while the published tarball keeps the authored
"./dist/cli.js". npm consumers get perpetual one-line
package-lock.json flips depending on whether resolution used
registry metadata or the extracted package.

Drop the "./" prefix to match the registry-normalized form and the
sibling coding-agent package.

Fixes earendil-works#6811
Add Alibaba Cloud Model Studio Token Plan subscription service as two
built-in API-key providers: qwen-token-plan (international, Singapore)
and qwen-token-plan-cn (China, Beijing).

Each provider exposes 15 text-generation models (Qwen, DeepSeek, GLM,
Kimi, MiniMax) via the OpenAI-compatible endpoint with DashScope
enable_thinking support. Model metadata is sourced from models.dev;
qwen3.8-max-preview is hardcoded until models.dev includes it.

Also fixes kimi-coding test references (k2p7 -> kimi-for-coding) after
models.dev catalog update picked up by generate-models.

Closes earendil-works#6850
Undo snapshots now restore paste content and counters alongside editor text. Paste marker renumbering shifts registry entries in ascending ID order before rewriting markers, preventing literal or incorrect paste content on submit.\n\nCloses earendil-works#6844
Treat the models.dev k2p7 entry as an alias for kimi-for-coding and regenerate provider catalogs. This restores consistency between generated model types and values and unblocks repository type checks.
…arendil-works#6671)

* add usage info to branch summary entries

* add usage to compaction entries

* allow custom tools to report llm usage in tool results

* allow observing and patching usage in tool_result hooks

* agent-harness: save usage in entries

for compaction, branch summaries and tool results
davidbrai and others added 17 commits July 21, 2026 06:07
…ce-expansion

update brace-expansion version
This PR:

- Adds retainedTail to compaction entries in the new agent harness so we don't have to walk up the tree for the 2000 tokens before compaction,
- Changes getPathToRoot to getPathToRootOrCompaction to only load until last compaction, as unnecessary to access all nodes where it is called,
- Adds a SQLite storage backend, in a separate packages/session-backend-sqlite, with a migration system and schemas as per on-site discussions: sessions to match session header messages (except for metadata, which I couldn't understand what it's used for or where it gets written, so I omitted it), session_entries for shared entry types as columns plus payload as a json for what remains, session_sequences to represent the append-only, serialized nature of the jsonl files, branch_entries to attribute nodes to branches (relationship one-to-many), and session_materialized with the session info (see /session in TUI) to act as a "cache" or quick-access for costs, message count, token info, labels, session name, and model-thinking-level config (e.g. for fast resume).
- This is compatible with the new agent harness Session abstraction.
…b-actions-versions

update deprecated github actions

@brownie-ricon brownie-ricon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review of exact head 92e5c711d4afaba8a4ab6bcb1e677abf19d383ef with parents 736d14f2fee5dfa5dbd3a963a26410e10146a91d and 3dcb411e8969d293556b6540696357eca22e044e.

No blocking findings.

I reviewed the actual merge and conflict resolutions before the PR description. The semantic AgentSession resolution is sound: exact summaries retain caller/extension provenance and bypass model summarization, while upstream-generated and hook-provided summaries retain their new usage accounting (packages/coding-agent/src/core/agent-session.ts:3013-3095). The exact-summary regression passes and the extension-summary usage integration tests pass.

KKL-only behavior remains intact:

  • queued extension commands still run post-turn with FIFO and terminal stale-work protection while the session stays globally busy (agent-session.ts:1272-1368);
  • the KKL test adaptation changes only the removed streamFn option to upstream's streamFunction (packages/coding-agent/test/queued-extension-commands.test.ts:75);
  • print mode still waits for startup and agent_settled extension continuations through pending-action idle accounting and explicit waits;
  • direct exact summaries remain non-hook provenance, while TUI/print/RPC extension adapters mark extension-supplied summaries;
  • the KKL release workflow is byte-identical to the KKL parent, and the only retained upstream workflow changes are action-version updates in CI and issue analysis. Upstream publication, contributor gate, audit, and triage workflows remain absent.

All 12 repository package manifests use 0.81.0-kkl.1; every internal Pi dependency is exact-pinned to it. Root install succeeded, npm run check passed, and both shrinkwrap/install-lock generators report current output. A separate audit covered the root lock, coding-agent shrinkwrap/install lock, and four extension-example locks.

Focused evidence: KKL preservation set 47 passed / 10 credential-gated skipped; branch-summary usage integration 14/14 passed; exact-summary regression 1 passed / 10 skipped. Hosted CI run 29836415708 is green at this exact head for build/check/full tests.

Local validation friction: the documented direct Vitest path did not exist in this workspace layout, and source tests initially needed the gitignored model-data hydration step. One broad focused invocation also inherited an Anthropic OAuth token and made five generated-summary attempts, all rejected with the same organization-policy 403; rerunning with provider auth explicitly disabled produced the clean 47/10 result above. I did not rerun the full workspace suite locally. Merge signature verification is also locally degraded because Junior's public key is absent from this keyring; Git records a signature by key C0391D3A4BEB3E5AC62A8ABE7F9C71B73808628D.

No fix-it PR was needed. No merge, release, or downstream change performed.

This review was created by an AI coding agent.

@junior-ricon
junior-ricon marked this pull request as ready for review July 21, 2026 14:23
@junior-ricon
junior-ricon merged commit c9d4c0f into main Jul 21, 2026
1 check 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.