Commit Graph

6501 Commits

Author SHA1 Message Date
can1357 cb00a07203 feat: added block replace syntax with block edits in hashline parser
- Added `replace block N:` syntax in grammar/parser/tokenizer/types, emitting `kind: "block"` edits with empty-body checks.
- Added block-resolution in hashline apply/recovery, wiring `BlockResolver` to resolve edits with throw/drop unresolved behavior.
- Added native `blockRangeAt` support and exported block range/options types through pi-ast, pi-natives, and JS bindings.
- Added coding-agent resolver wiring plus internal visibility/exports updates and new parser, patcher, and setup-wizard tests.
2026-05-31 00:46:03 +02:00
can1357 e7b7c3cc31 feat(coding-agent): added setup providers tabs for sign-in/web-search
- Added `SetupTab` abstractions and wired Sign-In/Web-Search tabs under the new providers onboarding scene.
- Added `providersSetupScene` and swapped `providerSetupScene` for `providers` in setup-wizard scene registration.
- Added `WebSearchTab` option loading, provider availability checks, and persisted selected search-provider preference.
- Changed sign-in flow handling to keep the scene active across providers and support cancellation during authentication.
- Changed glyph-mode picker initialization and rendering to preselect current preset and show live symbol previews.
- Updated setup wizard tests to use the `providers` scene id and cover the new web search tab path.
2026-05-31 00:29:48 +02:00
can1357 5f63165637 feat(setup-wizard): added interactive onboarding wizard on first launch
- Added setup wizard with provider login, glyph mode, and theme scenes shown once per setup version.
- Wired `omp setup` (no args) to trigger the wizard in a TTY; `--check`/`--json` still show help.
- Extracted `gradientEscape` and exported `PI_LOGO`/`ShineConfig` from welcome for shared use in splash/outro.
- Fixed race condition in `setSymbolPreset`/`setColorBlindMode` by tracking load request IDs.
2026-05-31 00:07:14 +02:00
can1357 39ab89b647 docs(hashline): added tight-range rule to prompt guidelines
- Clarified that replace/delete ranges must cover only lines that actually change, never widening to include unchanged surrounding code.
- Explained blast-radius rationale: a stale single-line replace corrupts one line vs. a stale block replace shredding the whole structure.
2026-05-31 00:05:56 +02:00
can1357 e799e0bc14 refactor(oauth): reorganized provider list into logical categories
- Grouped providers into: coding subscriptions, direct APIs, aggregator gateways, search tools, and local runtimes.
- Added new providers: ZenMux, Wafer Pass/Serverless, Vercel/Cloudflare AI Gateway, MiniMax CN, and others.
- Reordered entries so most popular providers appear first within each group.
2026-05-30 23:29:03 +02:00
can1357 1ea732309d feat(slash-commands): added /switch command to open temporary model selector
- Mirrors the alt+p keybinding for switching provider mid-session.
- Added test verifying showModelSelector is called with temporaryOnly: true.
- Updated tips.txt to document the /switch shortcut alongside alt+p.
2026-05-30 23:15:10 +02:00
can1357 fb8496fd21 feat(tiny/text): added code block stripping for session title generation
- Added `stripCodeBlocks` to remove fenced code blocks before titling, preventing literal noise (e.g. version strings in UI mockups) from becoming the session title.
- Added `prepareTitleInput` composing strip and truncate steps, updated `formatTitleUserMessage` to use it.
- Added unit tests for stripping logic and an integration test verifying the model never receives code block contents.
2026-05-30 23:13:11 +02:00
can1357 1803e25402 Merge branch 'farm/cb0ecfc0/slash-autocomplete-wsl-freeze' 2026-05-30 22:27:46 +02:00
can1357 0986a9e605 refactor(dirs): moved malloc env scrubbing into dirs module import
- Removed `scrubProcessEnv` from procmgr and its explicit call in cli.ts.
- Scrubbing now happens automatically when `dirs.ts` is imported, eliminating the need for a manual call at startup.
2026-05-30 22:26:52 +02:00
can1357 d73393cf5c feat(cli): added shell completions for bash, zsh, and fish
- Added `omp completions ` command generating scripts from live command/flag metadata.
- Added hidden `omp __complete` helper for dynamic model and session candidates.
- Completions never drift from the CLI: flags, enums, and subcommands are derived from static descriptors.
2026-05-30 21:32:03 +02:00
can1357 725539aeeb feat(read): conditioned inspect_image docs on feature flag
- Updated read tool prompt to show alternate image description when inspect_image is disabled.
- Passed INSPECT_IMAGE_ENABLED flag into prompt rendering context.
- Added test verifying description omits inspect_image references when disabled.
2026-05-30 21:24:14 +02:00
can1357 4ee35bec7a fix: corrected child-session behavior to DetachSession for non-term stdin
- Renamed non-terminal stdin pipeline tests and updated non-terminal expectations to DetachSession behavior.
- Updated child_session_action behavior so non-terminal, non-pipeline stdin now yields DetachSession instead of None.
- Updated execute_external_command to skip process_group for detached children and move take_foreground into its foreground arm.
- Added async regression coverage for detached pipeline stages and logged the fix in the natives CHANGELOG.
2026-05-30 20:55:55 +02:00
roboomp e8fadfe5fb fix(tui): kept autocomplete bypass when coalesced with offscreen mutations
Reverted the per-row scope check so an explicit allowUnknownViewportMutation render still bypasses the unknown-viewport deferral when diff.firstChanged sits in background scrollback. Caller contract is now documented and the existing focused-input regression covers the no-bypass default.
2026-05-30 17:58:31 +00:00
can1357 1c968a7bfc feat(scripts): added native leaf-package publish checks to install smoke tests
- Added repeatable `--tag` argument parsing in `gen-npm-packages.ts` and threaded parsed tags into `generateNpmPackages` for targeted leaf publishing.
- Exported `prepareNativeCorePackage` and expanded package manifest typing to support scripted manifest rewrites used by release workflows.
- Reworked install-test smoke logic to pack the host leaf package, pack the rewritten natives core, and assert the platform leaf package resolves from the core optional dependency.
2026-05-30 19:52:45 +02:00
roboomp 7786f1e9ce fix(tui): scoped viewport bypass to live rows
Removed the broad post-input bypass and limited unknown-viewport mutation allowance to frames whose changed rows are in the tracked live viewport.
2026-05-30 17:52:20 +00:00
roboomp 119bb0009c fix(tui): kept slash autocomplete repainting
Allowed live input renders to bypass unknown Windows viewport deferral while preserving the default scrollback protection for background mutations.

Fixes #1550
2026-05-30 17:46:04 +00:00
can1357 c7c627f0c5 ci(ci): published native leaf packages per target in the release flow
- CI now enabled OIDC publishing in the build matrix, installed Node 24/npm, and added a per-target native addon publish step.
- The release script now accepts `--native-leaf <tag>` and publishes only the matching generated native leaf package.
- Native package generation gained optional tag filtering with validation of requested leaf tags for targeted release publishing.
2026-05-30 19:22:36 +02:00
can1357 6c43cd6df1 feat(scripts): added placeholder bootstrap flow for missing native leaf packages
- Added helper logic to detect native leaf packages, generate placeholder manifests/readmes, and publish `0.0.0` temporary packages.
- Updated the trust setup flow to auto-bootstrap missing native leaves, throttle operations, and wait for registry visibility before trust configuration.
- Preserved manual handling for non-leaf missing packages and expanded output to show placeholder bootstrap activity.
- Updated minimum npm requirement to 11.16.0.
2026-05-30 19:18:48 +02:00
can1357 464314e3a2 fix(ci): scope fetch-tags to main pushes to unbreak tag-triggered checkout 2026-05-30 19:06:44 +02:00
can1357 474eb92047 chore: bump version to 15.6.0 2026-05-30 19:01:54 +02:00
can1357 c32460b2c5 fix(mnemosyne): corrected mnemosyne to await pending fact extractions
- Added pending extraction tracking to BeamMemory and a flush loop that waits for queued extraction promises.
- Added Mnemosyne.flushExtractions export and awaited it after forced session retention in coding-agent backend.
- Implemented remember/rememberBatch extraction scheduling with runFactExtraction, skipping empty content and swallowing extraction errors.
- Replaced extractAndStoreFacts insertion logic with storeFactStrings and updated entity counts from its return value.
- Added extraction wiring tests and changelog notes for extraction shutdown and todo animation visibility behavior.
2026-05-30 19:00:26 +02:00
can1357 0eee5a4019 feat(coding-agent): added todo-write strike-through completion animation
- Added todo_write strike-frame animation timing and updated execution flow after completion finalizes.
- Added strike animation cancellation in cleanup to clear todo timer and reset frames when spinner is idle.
- Removed todo-closing state and timeout handling from interactive mode and simplified empty todo-list rendering.
- Reworked todo-write to compute completion transitions, track completedTasks, and render strike-through frames.
- Added test coverage for completedTasks, theme setup, and strike-through progression at hold-frame thresholds.
2026-05-30 18:58:48 +02:00
can1357 f0b252449b feat(coding-agent): added tiny local model support for memory extraction and consolidation
- Added a new `providers.memoryModel` setting with tiny memory model options and `ONLINE_MEMORY_MODEL_KEY` default in settings.
- Updated Mnemosyne provider resolution so a configured local tiny model overrode remote completion and used new memory extraction and consolidation prompts.
- Expanded the tiny-model CLI registry to download and report all local tiny models (title plus memory) through a unified list.
2026-05-30 18:48:47 +02:00
can1357 ccc727d1bb feat(coding-agent): added internal URL completion with async handlers
- Added internal URL completion types and router support for async scheme completion handlers.
- Implemented `complete()` for local, memory, agent, artifact, omp, rule, and skill handlers with robust completion fallbacks.
- Added internal URL autocomplete flow with context extraction, fuzzy matching, ranking, and a 25-item suggestion cap.
- Integrated internal URL completion into prompt and editor autocomplete behaviors and added completion tests.
2026-05-30 18:43:00 +02:00
can1357 70202360ff feat(coding-agent): added local model registry for title completion
- Added Mnemosyne runtime `extractionPrompt` and `consolidationPrompt` options and wired them into resolved LLM config.
- Added fact-extraction branch to call configured completion first (temp 0), then parse facts and safely fall back.
- Added tiny local model registry features for memory/title, including keys, specs, and validation helpers.
- Added `complete` protocol messages and abort-aware client/worker paths for local title completion generation.
- Added local-models documentation for tiny/memory transformer paths, defaults, and known parser caveats.
2026-05-30 18:41:48 +02:00
can1357 91513cdbf3 fix(coding-agent/eval): fixed TypeScript type-only import rewriting
- Updated local module loading to force TS syntax stripping for .ts/.tsx/.mts modules and use the matching Bun transpiler loader.
- Extended TypeScript stripping to detect `import type`/`export type` syntax and rewired wrapping to strip TS syntax after final-expression extraction with TypeScript-aware parsing.
- Added tests verifying type-only imports are handled correctly in evaluator modules and rewritten code no longer contains type-only import declarations.
2026-05-30 18:35:01 +02:00
can1357 617c74d9a7 fix(coding-agent): applied selected plan execution model after exiting plan mode
- Captured the operator's selected execution tier and passed it through plan approval options.
- Applied the stored model after exiting plan mode so #exitPlanMode's restore no longer reverts it before execution begins.
- Added a regression test that selects a different slider tier and verifies execution runs on the chosen model.
2026-05-30 18:32:13 +02:00
can1357 e1a0d235ec ci(scripts): skipped duplicate release CI runs and enabled OIDC npm publishes
- Added a workflow `gate` job that marks `main` pushes with a `v*` tag at `HEAD` as duplicate release runs.
- Conditioned native, lint/test, and install CI jobs on that gate so redundant build and publish work is skipped on duplicate tagged pushes.
- Updated `scripts/ci-release-publish.ts` to publish packed tarballs via `npm publish` after `bun pm pack`, handling already-published versions as a no-op.
2026-05-30 18:28:50 +02:00
can1357 e32c639d2e feat(coding-agent): added hook-selector slider for persisted role models
- Added role-model cycle data structures and helper methods to resolve and persist selected model states.
- Added a plan-review model-tier slider from role model cycles, with arrow navigation and slider help text.
- Applied selected role model and explicit thinking level before plan approval, carrying over to fresh and compacted sessions.
- Added hook-selector slider rendering and movement handling with index clamping, plus tests and changelog coverage.
2026-05-30 18:21:34 +02:00
can1357 996584f15b deps(deps): updated dependency catalogs and refreshed lockfile package versions
- Upgraded workspace catalog dependencies to newer versions in both package manifests.
- Regenerated bun.lock to align transitive versions, including Vite and ecosystem tooling updates.
- Updated ACP startup tests and transport handling to fail fast on unsupported server transport types.
2026-05-30 18:11:25 +02:00
can1357 e831c2c758 chore: reformat 2026-05-30 18:08:51 +02:00
can1357 a53acf1431 test(coding-agent): updated hashline preview tests to use snapshot-tagged headers
- Updated hashline streaming preview tests to generate snapshot-tagged section headers and use an in-memory snapshot store.
- Replaced untagged file markers in multi-section preview inputs with `formatHashlineHeader` values derived from recorded file contents.
- Changed the bash command error test to expect a returned `isError` result with exit code 1 instead of a rejected promise.
2026-05-30 17:51:11 +02:00
can1357 826c3b932d refactor(packages/coding-agent): reorganized tiny-title runtime stack
- Added tiny-title protocol contracts, including progress-state unions, message payloads, and transport interfaces.
- Added title text utilities to truncate long inputs, wrap `<user-message>` blocks, and normalize generated titles.
- Added tiny-title model registry and helpers with type-safe keys and runtime optional loading via optionalDependencies.
- Added client-side worker orchestration with spawn fallback, request queueing, progress/error routing, and smoke-test APIs.
- Added worker runtime for model resolution, prompt-based inference, lock-based install retries, and close-time cache clear.
2026-05-30 17:40:18 +02:00
can1357 e22b31401b feat(packages/coding-agent): added orchestrate notices for session output
- Added orchestrate keyword detection and notice handling for non-synthetic prompts.
- Added orchestrate notice handling in session output paths, including streaming and append delivery.
- Added a system orchestrate notice specifying task-subagent delegation, phase workflow, and validation gates.
- Added shared gradient-highlighter utilities and switched ultrathink highlighting to use cached palettes.
- Removed embedded orchestrate prompt artifacts and updated usage tips for orchestration, ultrathink, and /login behavior.
2026-05-30 17:34:38 +02:00
can1357 34e099148a feat(natives): added per-platform leaf package publishing for native addons
- Added `gen-npm-packages.ts` script to generate per-platform leaf packages under `npm/-/`.
- Updated CI release publisher to generate and publish leaf packages before rewriting the core manifest with pinned `optionalDependencies`.
- Core package now ships only JS loader and declarations; installs fetch only the host platform's `.node` binary.
2026-05-30 17:08:23 +02:00
can1357 a48e16037b refactor(welcome): extracted tip rendering with word-wrap support
- Extracted `renderWelcomeTip` as a standalone exported function.
- Replaced truncation with `wrapTextWithAnsi` so long tips wrap under the label.
- Added test asserting multi-line output stays within box width without ellipsis.
2026-05-30 17:01:40 +02:00
can1357 bfd043b3e4 feat(packages/natives): added leafPackageDir to loader addon lookup
- Added `leafPackageDir` to loader state types and context for platform-native package roots.
- Updated `resolveLoaderCandidates` to include `leafPackageDir` in addon candidate search paths.
- Adjusted `maybeStageNodeModulesAddon` to stage addons from `ctx.leafPackageDir` before falling back to `nativeDir`.
2026-05-30 16:56:15 +02:00
can1357 b890345808 feat: added tiny-title worker to CLI/release entrypoints plus cleanup
- Added usage tips content and rendered one random tip in the welcome component.
- Implemented tip rendering rules to skip narrow boxes, truncate long text, and style output.
- Added tiny-title worker to binary and release entrypoints, including repro test coverage.
- Added tiny-title worker smoke-test execution and shutdown cleanup in the session disposal path.
2026-05-30 16:55:54 +02:00
can1357 f08e6397db test: added tiny-model role-propagation and title routing tests
- Added `get(path)` support in test `createSettings` to return tiny model setting for `providers.tinyModel`.
- Updated `createSettings` in tests to accept optional `tinyModel` with default `"online"`.
- Added `flushMicrotasks()` and helper factories for test settings, registry stubs, and online model mocks.
- Added tests for `raceFirstNonNull`, `generateSessionTitle` routing, and providers tinyModel enum validation.
2026-05-30 16:55:54 +02:00
can1357 4544db344c feat: added tiny-title generation core with worker flow and model specs
- Added `providers.tinyModel` with an `online` default and UI schema metadata; documented tiny-title updates in changelogs.
- Added tiny-title system prompt and title-text helpers to truncate input, wrap `<user-message>`, and normalize output.
- Added tiny-title model registry, local model specs, key validation, and cache-path helper.
- Added tiny-title transport/client/worker flow with spawn fallback, queued requests, ping checks, and graceful close.
- Updated `generateSessionTitle` to route by tiny-title model and race local generation against delayed online fallback.
2026-05-30 16:55:54 +02:00
can1357 c8ddb62a33 build: configured package.json and bun.lock for transformers dependency
- Added @huggingface/transformers to package.json dependencies for Transformer feature preparation.
- Updated bun.lock with new @huggingface/transformers resolution and transitive onnxruntime/sharp entries.
- Aligned lockfile package sources by converting @oh-my-pi/pi-mnemosyne from workspace to catalog resolution.
2026-05-30 16:55:53 +02:00
can1357 6d5aba8397 feat: implemented Mnemosyne memory state typing for prompt generation
- Resolved memory backend before instruction assembly and used it to build developer instructions.
- Added a `memoryRootEnabled` prompt option when the memory backend id is `local`.
- Typed Mnemosyne memory state types and updated `registerMnemosyneState()` to call `setMnemosyneSessionState()`.
- Documented that `@oh-my-pi/pi-mnemosyne/diagnose` export was added in the mnemosyne changelog.
2026-05-30 16:55:53 +02:00
can1357 6b4accd05e feat(memory): added memory_edit tool and stats/diagnose commands
- Added `memory_edit` tool for update, forget, and invalidate operations on Mnemosyne memories by id.
- Added `stats` and `diagnose` methods to `MemoryBackend` interface with Mnemosyne implementations.
- Exposed `/memory stats` and `/memory diagnose` slash commands in TUI and ACP modes.
- Refactored recall output to include memory ids via `formatScopedRecallWithIds`.
2026-05-30 16:48:02 +02:00
can1357 7ba28ada5b ci(mnemosyne): published pi-mnemosyne to npm via monorepo CI pipeline
- Added `@oh-my-pi/pi-mnemosyne` to the catalog and release publish script.
- Switched coding-agent dependency from `workspace:*` to the catalog reference.
- Added `tsconfig.publish.json` for declaration-only emit on publish.
- Included mnemosyne in CI tarball smoke tests alongside other workspace packages.
2026-05-30 16:42:58 +02:00
can1357 98de6510f0 fix(coding-agent/tools): renamed exit status label from "Status: exit N" to "Exit: N"
- Updated shell renderer footer label for non-zero exits to use the shorter `Exit: N` format.
- Updated changelog and tests to match the new label.
2026-05-30 16:35:34 +02:00
can1357 4356298182 fix(coding-agent/tools): handled non-zero bash exits as error results
- Tagged non-zero bash command completions as error results, capturing `exitCode` and keeping exit notices in returned text.
- Updated the shell renderer to hide duplicate exit notices from output while surfacing failed command status in the footer.
- Added tests for non-zero versus zero-exit bash results and footer rendering of failed commands.
2026-05-30 16:31:48 +02:00
can1357 318d553045 feat(tools): added memory inline renderers for retain/recall/reflect
- Added shared helpers and inline TUI renderers for retain, recall, and reflect tool outputs.
- Added tool registry entries for retain, recall, and reflect to use the new inline renderers.
- Updated changelog notes describing new memory inline rendering semantics and output headers.
- Added memory renderer tests for summary, truncation, streaming, and expand/collapse behavior.
2026-05-30 16:28:55 +02:00
can1357 515887fc31 test(testing): added Mnemosyne lifecycle and render-call suppression tests
- Added tests for `MnemosyneSessionState` lifecycle, including turn-based auto-retain.
- Added tests covering scoped Mnemosyne database clearing and per-project bank derivation.
- Added a task renderer test to suppress per-task previews when `renderContext.hasResult` is true.
2026-05-30 16:22:12 +02:00
can1357 99365385aa feat(mnemosyne): added mnemosyne parent-state sync in delegated sessions
- Added parentMnemosyneSessionState propagation from session state through SDK, executor, and task options into nested sessions.
- Added getMnemosyneSessionState() and rekeying logic to refresh Mnemosyne IDs during session sync, switch, and restore.
- Added Mnemosyne reset and teardown cleanup on unaliasing or restoration to avoid stale state.
2026-05-30 16:22:12 +02:00
can1357 095ac68331 feat(mnemosyne): added mnemosyne parent-session alias-of state support
- Added parent Mnemosyne session support to startup options and backend lookup via alias-of state.
- Added resetConversationTracking() and switched retention to extractMessages(sessionManager).
- Reworked bank resolution by resolving repo root and sanitizing/truncating project bank names with hash suffixes.
- Updated clear() to load config when absent and remove scoped DB paths, WAL, and SHM files.
- Added CHANGELOG Fixed entries for Mnemosyne lifecycle and related diff/UX formatting fixes.
2026-05-30 16:22:12 +02:00