Commit Graph

316 Commits

Author SHA1 Message Date
can1357 371846167b docs: update docs 2026-06-12 14:43:35 +02:00
can1357 09aa87103c feat: added read-only and write-token-based collab links for view-only sessions
- Added write-token generation and validation to distinguish writable and read-only guests.
- Added deep-link support using `https://<relay>/#<link>` with 32/48-byte collab secrets.
- Added full-link and key-only semantics where full links grant writes and key-only links are view-only.
- Added /collab view/status/stop command updates with read-only participant status and join hints.
2026-06-12 13:34:43 +02:00
can1357 8fa1f6c250 feat: added shared collab wire protocol and web guest collaboration client
- Added @oh-my-pi/pi-wire and reworked collab protocol types into shared contracts.
- Added wire-compatibility guards in coding-agent host to block unsupported events.
- Added standalone collab-web package with guest UI, mock-host tooling, and local relay.
- Added secure room-link validation, WebCrypto framing, and safer socket routing.
2026-06-12 11:54:41 +02:00
can1357 ae84502b82 fix(coding-agent): bypass LSP for individual conflict resolution
Individual conflict resolution now bypasses the LSP writethrough to prevent formatting from corrupting other unresolved marker blocks and to avoid noisy diagnostics in partially resolved files.
2026-06-12 11:29:38 +02:00
can1357 3e90371f5c feat(coding-agent): added collaborative sessions with host and guest command support
- Added AES-GCM room-key crypto, relay link parsing, and invalid-link validation.
- Added `/collab`, `/join`, and `/leave` command handling for collaborative sessions.
- Added startup `join` argument wiring to execute `/join` during interactive launch.
- Added status-line, prompt, and command-routing updates for guest/host collaboration UX.
2026-06-12 10:54:28 +02:00
can1357 b845ef6362 feat(snapcompact): implemented model-aware compaction billing and frame-size resolution
- Implemented model-specific frame-size billing for Anthropic, OpenAI, and Google.
- Changed compaction shape resolution to bind model variants to ideal frame sizes.
- Updated tests and docs to reflect new frame-size and budget behavior.
2026-06-12 09:27:03 +02:00
can1357 a9229b0f26 feat(snapcompact): clipped snapcompact PNG frame height to rendered text rows
- Adjusted snapcompact rendering to compute used rows from text, dim toggles, and doc line breaks, then derive output height from usedRows x lineRepeat x cellHeight.
- Updated indexed and RGB PNG encoders to accept explicit canvas width and height so native renders now emit non-square frames matching actual content.
- Expanded Rust and TypeScript tests and updated docs/changelogs to assert and describe variable-height frame behavior.
2026-06-12 09:11:41 +02:00
can1357 8eeab0a877 feat(packages/snapcompact): added model-aware shape + text-tail budgets
- Added support for `{api,id}` `ShapeTarget` in `resolveShape`, deriving variants from model IDs.
- Added provider budget APIs/constants and `providerFrameBudget` clamping with `MAX_FRAMES`.
- Added `Archive.textTail` and moved overflow pages into plain-text tail folding across frames.
- Updated summary prompt rendering to show continuation only when `textTail` exists and append it as text.
2026-06-12 09:00:04 +02:00
can1357 870d2b8981 feat(snapcompact): switched the Anthropic default shape from 8x8r-bw to 6x12-dim
- Repointed `SHAPES.anthropic` and the `anthropic-messages`/unknown-API fallback in `resolveShape` at the `6x12-dim` variant: production mono eval on claude-fable scored f1 .840 vs .877 for the repeated grid (within noise at n=25) at 37% lower cost, with no refusals.
- Reworded the `snapcompact.shape` descriptions in `settings-schema.ts` to drop per-provider eval-winner claims from the variant help text.
- Updated `snapcompact.test.ts` (new `6x12-dim` default render/compact assertions, `8x8r-bw` exercised via `resolveShape`), `snapcompact-inline.test.ts` frame math for the new geometry, and the `docs/compaction.md` shape sentence.
- Amended the snapcompact `[Unreleased]` entry that said the Anthropic default stayed `8x8r-bw` and added the default-switch entry.
2026-06-12 08:21:48 +02:00
can1357 300c1ada30 feat(coding-agent): added bench command and updated default compaction shapes
- Added a new `bench` CLI command with multi-model selectors and new options.
- Implemented `runBenchCommand` validation, per-run session handling, and failure exit reporting.
- Updated default compaction shapes to `8x8r-bw` and `doc-8on16-sent-dim` in code and schema.
- Documented `bench` flags, per-run errors, failure counts, and exit behavior.
2026-06-12 08:00:03 +02:00
can1357 a094b794bc fix: updated OpenAI defaults and corrected catalog grouping behavior
- Resolved OpenAI shape resolution to `openai` and default to `8on16-bw`.
- Fixed catalog generation to collapse effort tiers before provider grouping.
- Updated help text and schemas to describe `8on16-bw` as the OpenAI auto default.
- Added production `render_pages` and `mono_prod` scripts for end-to-end QA output.
2026-06-12 07:49:23 +02:00
can1357 509192d24a feat(coding-agent): added eval-winner variants to the snapcompact.shape setting
- Added the `6x12-dim`, `8x13-bw`, `8on16-bw`, `doc-8on16-bw`, `doc-8on16-sent`, and `doc-8on16-sent-dim` options to the `snapcompact.shape` enum in `settings-schema.ts` with per-variant descriptions naming each eval winner.
- Updated the `snapcompact.shape` paragraph in `docs/compaction.md` to list the new grid and two-column doc variants.
- Updated the coding-agent changelog: rewrote the `snapcompact.shape` Added entry for the new variants and recorded the Changed/Fixed entries for the already-landed variant-alias and pending-preview commits (one contiguous changelog run).
2026-06-12 07:38:00 +02:00
can1357 4f0d32a1c1 feat(snapcompact): added configurable compaction shape selection for snapcompact
- Added snapcompact.shape setting with auto and variant options in agent config.
- Implemented resolveShape support for forced variants, auto provider winners, and repricing.
- Threaded resolved shape into compaction and inline-image flows for pricing and rendering.
2026-06-12 07:00:34 +02:00
can1357 f2099fcc00 feat(todo): removed todo note fields and note operation behavior
- Removed the `note` operation from `TodoOp` validation and the `text` field from todo operation payloads.
- Deleted `TodoItem` note storage and stripped note-aware logic from execution, markdown round-trip helpers, summaries, and rendering.
- Updated todo docs and prompt schema text to remove `note` usage and keep the public operation set aligned.
2026-06-12 05:38:40 +02:00
can1357 4596c03fa8 feat(hashline): allowed closer-line insert after block anchors with warning fallback
- Updated block resolution to detect structural-closing-line anchors and convert unresolvable `insert after block` edits into plain `insert after` inserts while emitting a dedicated warning.
- Propagated these resolver warnings through `PatchSection` and `Patcher` results so parse and application callers receive them.
- Added tests covering the closer-anchor fallback and confirming non-closer unresolved block anchors still throw.
2026-06-12 04:25:00 +02:00
Can Bölük ed92eb8ff6 Merge pull request #2248 from chan1103/feat/smart-paste-text-fallback
feat(coding-agent): fall back to text paste when clipboard holds no image
2026-06-12 04:24:29 +02:00
can1357 12bbefd48b feat(mnemopi): exposed polyphonic and enhanced recall via config.yml
- Added `mnemopi.polyphonicRecall` and `mnemopi.enhancedRecall` boolean settings (default off) to `settings-schema.ts` and `loadMnemopiConfig`, applied via the new `configureRecallFeatures()` in `createScopedResources`.
- Made `polyphonicRecallEnabled()`, `enhancedRecallEnabled()`, and `isEnhancedRecallEnabled()` fall back to the configured defaults while `MNEMOPI_POLYPHONIC_RECALL` / `MNEMOPI_ENHANCED_RECALL` env vars still win when set.
- Exported `configureRecallFeatures`/`RecallFeatureFlags` from the package root and `core` barrels; documented the settings in `docs/mnemosyne-memory-backend.md`.
- Added `recall-feature-flags.test.ts` covering defaults, config enablement, and env precedence; the mnemopi changelog hunk also carries the adjacent #2322 entry (same contiguous run).

Fixes #2323: Mnemopi: MNEMOPI_POLYPHONIC_RECALL and MNEMOPI_ENHANCED_RECALL not configurable via config.yml
2026-06-12 04:01:36 +02:00
can1357 6b1ca33bf7 refactor(snapcompact): dropped the snapcompact qualifier from every export
- Renamed all functions, types, and constants in @oh-my-pi/snapcompact to namespace-relative names (`snapcompactCompact` → `compact`, `renderSnapcompactFrames` → `renderMany`, `snapcompactFrameCount` → `frames`, `SnapcompactShape` → `Shape`, `SNAPCOMPACT_SHAPES` → `SHAPES`, …).
- Converted every consumer to `import * as snapcompact` member access: `agent/compaction.ts`, `coding-agent` `agent-session.ts`/`session-manager.ts`/`snapcompact-inline.ts`, and all affected tests.
- Renamed internal `geometry` locals to `geo` in `snapcompact.ts` to avoid TDZ collisions with the new `geometry` export.
- Updated `docs/compaction.md` prose and added a Breaking Changes entry to the snapcompact changelog documenting the full rename map.
2026-06-12 03:27:50 +02:00
can1357 8c3c68a048 feat(ai): added stateful previous_response_id chaining to the platform Responses provider 2026-06-12 02:33:46 +02:00
can1357 ce4ebad726 feat(agent): added per-call tool concurrency resolver and parallel bash execution
- Extended `AgentTool.concurrency` to accept per-call resolver functions and resolved concurrency mode from each tool call, falling back to exclusive on resolver errors.
- Updated BashTool to schedule non-PTY calls as shared and PTY calls as exclusive so non-interactive bash calls can run in parallel within one message.
- Tracked in-use persistent shell sessions in the bash executor and routed overlapping calls on the same session key to isolated one-shot shells while preserving owner session availability.
2026-06-11 18:13:07 +02:00
can1357 926dfdea39 fix(coding-agent): restored side-channel IRC auto-reply for busy recipients when async execution is disabled
A subagent's send await:true to Main during a blocking task spawn was a structural deadlock: deliverIrcMessage queues mid-turn messages as step-boundary asides, but Main's next boundary requires the sender's own batch to finish, so the sender always burned the full irc.timeoutMs. Awaited sends now pass expectsReply through IrcBus.send; a mid-turn recipient with async.enabled off generates an ephemeral no-tools reply via runEphemeralTurn, records an irc:autoreply aside in its own history, and delivers it back over the bus with replyTo threading so the sender's waiter resolves.
2026-06-11 18:12:22 +02:00
Can Bölük 640d192b72 Merge branch 'main' into feat/expert-elixir-lsp 2026-06-11 17:46:44 +02:00
can1357 0e3e211639 docs(tui): clarify component-scoped rendering and document performance fix
- Updated `tui-runtime-internals.md` and `tui/README.md` to describe the `requestComponentRender` API and its partial compose reuse behavior.
- Added an entry to `packages/coding-agent/CHANGELOG.md` explaining how the component-scoped render path resolves input lag caused by frequent full TUI re-compositions from animated loaders.
2026-06-11 16:26:50 +02:00
can1357 844c8dbdfe fix(coding-agent): restored task sync mode when async.enabled was false
- Updated TaskTool to skip `session.asyncJobManager` and run `task` spawns inline whenever `async.enabled` is false.
- Set `async.enabled` default to `true` and updated task prompts/settings text to reflect async-versus-sync behavior.
- Adjusted task batching tests to cover both async background execution and synchronous batched execution when async is disabled.
2026-06-11 16:07:38 +02:00
roboomp 46214c62f8 fix(hashline): clarified insert-after-block anchors
Updated the hashline edit prompt and internal edit docs to make insert-after-block anchors opener-only, and added regression coverage for closing-delimiter anchors and prompt guidance.\n\nFixes #2292
2026-06-11 05:36:44 +00:00
Tharindu Abeydeera 33fcc53e82 feat(coding-agent): add Expert Elixir language server to built-in LSP defaults
Adds an `expert` server entry (binary `expert`, invoked `expert --stdio`)
to the built-in LSP defaults, auto-detected for Mix projects
(`mix.exs`/`mix.lock`). Placed after `elixirls` so elixir-ls remains the
primary navigation server when both binaries are installed; this keeps the
default getServerForFile() behavior unchanged. Absent-binary setups are
unaffected by loadConfig's PATH/root-marker gating.

Includes a docs row, changelog entry, and a regression test pinning that
`.ex` files match `expert` and that `elixirls` still sorts ahead of it.
2026-06-11 00:57:23 +02:00
can1357 72c12ff9c2 feat(task): migrated task tool to batch-first mode with shared context
- Replaced task-simple-mode with a `task.batch` setting enabled by default.
- Updated task schema to use batch `{agent, context, tasks[]}` payloads.
- Migrated task execution to spawn one async job per task and merge outputs.
- Removed per-call schema passing while preserving legacy flat task calls.
2026-06-10 23:47:28 +02:00
can1357 4b95d73b94 feat(snapcompact): cap and dim tool-related content for clarity
Oversized tool results and arguments are now truncated to keep archives
conversation-dense, and tool output is rendered in dim gray ink on image frames
to visually de-emphasize noise.

All truncation budgets and dimming behavior are configurable.
2026-06-10 23:16:43 +02:00
can1357 388354fe9c feat(cross-cutting): merged compaction file lists into one grouped tree with access markers 2026-06-10 23:13:57 +02:00
can1357 6ac73655c8 feat(coding-agent): removed resume support and switched task execution to spawn-only
- Removed `resume` from task params and schema, requiring agent and assignment inputs.
- Dropped resume continuation paths in task execution and call rendering, always spawning a new agent.
- Removed the `irc.enabled` setting and computed IRC availability by task-depth rules.
- Updated task follow-up guidance to use IRC messaging/history links instead of `task(resume:)`.
2026-06-10 23:00:03 +02:00
can1357 0fe75212b4 ux(hashline): appended context previews to unresolved block-edit errors
- Added a shared `formatAnchoredContext` helper and switched mismatch formatting to use it.
- Extended unresolved block-edit errors to append nearby numbered context with `*`-marked anchor lines.
- Updated unit and integration tests and docs to reflect the new unresolved-block preview behavior.
2026-06-10 21:50:19 +02:00
can1357 08a941a14e feat: added standalone snapcompact package and model-specific frame shaping
- Added a new @oh-my-pi/snapcompact package and redirected compaction call sites to it.
- Added provider-aware snapcompact shape resolution for model-specific mixed-frame behavior.
- Added optional image detail support by extending ImageContent and passing hints through OpenAI providers.
- Added native snapcompact render options, including 5x8/8x8 font loading and palette/geometry controls.
2026-06-10 21:50:03 +02:00
can1357 6ff1fe5caf docs(coding-agent): logged Unreleased entries and snapcompact compaction notes
Adds the [Unreleased] block to the coding-agent CHANGELOG covering the task tool single-call rewrite, IRC mailbox bus rework, eval agent() context drop, Agent Hub overlay, supersede pruning, soft request budgets, subagent salvage, repeat-read notice, inline byte cap, agent lifecycle, history:// protocol, snapcompact strategy, IRC tool renderer, compaction inline divider, and async.enabled scope narrowing. docs/compaction.md gets the snapcompact strategy section (rationale, frame budget, eviction policy, fallback to context-full).
2026-06-10 17:55:19 +02:00
can1357 9d99ae1af0 feat(coding-agent): rewrote the task tool to spawn one persistent subagent per call
The task tool now takes a single { agent, assignment, description, ... } and always runs the subagent in the background — the batch tasks[] array and shared context parameter are gone. Fan-out is parallel task calls; shared background flows through a '/Users/can/.omp/agent/sessions/-Projects-.tree-pi-commit/2026-06-10T15-36-32-782Z_019eb22d-970e-7000-8964-72c98becf3e8/local' file referenced in each assignment.\n\nIntroduces a persistent subagent lifecycle: finished subagents stay live as idle, the lifecycle manager parks them to disk after task.agentIdleTtlMs (default 7 minutes; 0 keeps them live until exit), and they revive automatically when prompted from the Agent Hub, messaged on IRC, or resumed via task. New task(resume: "<id>") revives an idle or parked subagent and runs a follow-up assignment in its existing session.\n\nAdds soft request budgets (explore/quick_task 40, others 90, configurable via task.softRequestBudget, 0 disables): crossing the budget injects a one-time wrap-up steer into the child; crossing 1.5× aborts the run gracefully. Cancelled/aborted subagent salvage replaces the old (no output) with the child's last activity snippet plus request/token stats; SingleResult tracks a per-child requests counter (assistant message_end events) used to sort agent lists in runtime-ascending order in both the live progress view (finished agents above pending/running) and the finalized result view, so rows no longer reshuffle on finalize. Adds a task gallery fixture variant for the resume path (renderer key separated from fixture key).\n\nAll task tests are reshaped around the single-call contract; tests for the discarded shared-context flow are removed, and new task-guards/task-resume/task-schema tests pin the new contract surface.
2026-06-10 17:54:47 +02:00
can1357 0f4f301a02 feat(coding-agent): made waiting job polls displaceable in the TUI
A job poll whose watched jobs are all still running and nothing was cancelled is pure 'still waiting' noise once a newer block exists. ToolExecutionComponent now detects isWaitingPollDetails on the result, leaves the block displaceable, and keeps its rows out of scrollback. EventController tracks the most recent displaceable poll and resolves it (sealing the block) on every event that proves another tool now owns the live region: a new tool call/result, a streaming arg start, an end-of-turn signal, or another job result that itself isn't displaceable. UiHelpers' transcript rebuild applies the same rule. Docs and the new job-poll-displacement test pin the behavior.
2026-06-10 17:53:07 +02:00
can1357 a64ff00cb8 feat(coding-agent): added history:// internal URL for agent transcripts
Registers a HistoryProtocolHandler with the internal URL router: history:// lists every registered agent (id, status, kind, last activity) and history://<agentId> renders a concise markdown transcript (tool calls collapsed to one line each, thinking elided). Live refs render from the in-memory message array; parked refs load read-only from the JSONL session file via loadSessionMessagesReadOnly (no writer, no lock). System prompt + read tool prompt + docs/tools/read.md learn the new scheme.
2026-06-10 17:52:13 +02:00
can1357 a92d2ce989 feat(coding-agent): removed context argument from eval agent() spawn
Shared background now flows through a '/Users/can/.omp/agent/sessions/-Projects-.tree-pi-commit/2026-06-10T15-36-32-782Z_019eb22d-970e-7000-8964-72c98becf3e8/local' file referenced in each prompt instead of a context string forwarded into the subagent's system prompt. The JS and Python preludes drop the context kwarg from agent(), the subagent system prompt drops the {{#if context}} block and the conversation-context file pointer, and runEvalAgent no longer writes a per-call conversation context file. AgentSession sheds the now-unused formatCompactContext() helper that supplied the file's body, and ToolSession.getCompactContext is removed alongside it.
2026-06-10 17:49:01 +02:00
can1357 fcb8663de8 feat(coding-agent): reworked irc to a send/wait/inbox/list mailbox bus
Replaces the blocking auto-reply IRC turn with a process-global IrcBus and a four-op tool (send/wait/inbox/list). send is fire-and-forget with per-recipient delivery receipts (injected/woken/revived/failed); replies become real turns by the recipient, observed via wait (or the send await:true sugar). Bounded per-agent mailboxes (cap 100) drop oldest on overflow; AgentSession.deliverIrcMessage folds an in-flight delivery in as a non-interrupting aside at the next step boundary, or starts a real wake turn when idle. AgentRegistry/lifecycle handle the idle→woken / parked→revived transitions, so messaging a non-running peer brings it back. Adds a dedicated TUI renderer (directional headers, delivery-outcome coloring, quoted bodies, per-recipient receipt trees, status-badged peer lists with unread counts). irc.timeoutMs is now the default timeout for wait / send await:true. AgentSession sheds the agentRegistry config field, the dedupeIrcReply → dedupeEphemeralReply rename (now used by /btw and /omfg), and the background-channel exchange queue / forwardIrcRelayToMain plumbing the auto-reply model needed.
2026-06-10 17:47:47 +02:00
HugoAir Dev 765b972a00 feat(coding-agent): fall back to text paste when clipboard holds no image
app.clipboard.pasteImage dead-ended with a status message when the
clipboard held text, which made the chord useless on hosts that only
deliver that one keypress (VS Code's integrated terminal forwarding
Ctrl+V, Windows clipboard history via Win+V simulating Ctrl+V).

- handleImagePaste now pastes clipboard text through the editor's
  paste semantics when no image is available; an empty clipboard
  reports 'Clipboard is empty'.
- readTextFromClipboard reaches the Windows clipboard through host
  PowerShell under WSL (mirroring readImageFromClipboard), with CRLF
  normalization and UTF-8 output encoding.
- handleClipboardTextRawPaste's empty-clipboard status message moved
  to the actual empty branch (was shown after successful pastes).
- Clipboard reads are constructor-injectable for tests.

Implements proposal 1 of #1628.
2026-06-10 17:46:46 +09:00
can1357 7205289ece Merge pull request #2201: feat(coding-agent): add title system prompt override 2026-06-10 08:32:10 +02:00
Adryel Dearo ecbc2a3c15 feat(coding-agent): add configurable title system prompt for sessions
- add discovery of `TITLE_SYSTEM.md` and pass it through interactive startup context
- route custom title prompts to online and local tiny title generators via protocol
- update session-title docs and changelog with override behavior
- add tests for prompt discovery, forwarding, and fallback to bundled title prompts
2026-06-10 08:31:32 +02:00
can1357 bcf978a266 Merge pull request #2205: feat(models): resolve secrets from commands 2026-06-10 08:26:59 +02:00
can1357 8245fcf095 Merge pull request #2202: feat(config): add runtime config overlays 2026-06-10 08:26:59 +02:00
danzaio 9c4d62b6ba docs(models): clarify oMLX local discovery 2026-06-10 08:26:00 +02:00
danzaio 75467b7289 feat(config): add runtime config overlays 2026-06-10 08:26:00 +02:00
danzaio b36f5c0785 docs(models): document oMLX OpenAI-compatible setup 2026-06-10 08:26:00 +02:00
danzaio 887864fef0 feat(models): resolve secrets from commands 2026-06-10 08:26:00 +02:00
can1357 661587e110 feat(coding-agent): raised retry limits to ten with capped exponential backoff
- Raised Anthropic provider retries to 10 attempts and used a shared jittered exponential backoff for each retry.
- Updated coding-agent retry defaults and session delay calculation to a 500ms base with an 8,000ms jittered cap.
- Added tests that verify capped ten-step backoff sequences and recovery after repeated 502 errors.
2026-06-10 07:49:12 +02:00
can1357 61a57c1d21 fix(coding-agent): stabilized streaming TUI rendering with readonly rows and memoized reuse
- Changed render methods to return component-owned `readonly string[]` rows.
- Added `RenderStablePrefix` row reuse to avoid repainting unchanged streaming content.
- Stabilized streaming gutters and spinner placement to reduce preview jitter and flicker.
- Finalized commit-safe transcript behavior for tool-call previews and added streaming edge-case tests.
2026-06-10 07:26:02 +02:00
can1357 b0fec42218 feat(coding-agent): surfaced lazy LSP servers as available in welcome screen
- Added "available" status so recognized servers show under lazy mode without warmup.
- Rendered full welcome box as pre-TUI splash with fixed slot heights to avoid layout shift.
- Reported lazy servers as available in /status instead of omitting the section.
2026-06-10 07:22:22 +02:00