Commit Graph

3597 Commits

Author SHA1 Message Date
can1357 7efbb6255e chore: bump version to 14.6.3 2026-05-03 09:08:15 +02:00
can1357 b36a093664 feat(coding-agent/tools): added batched memory retention and prompt-backed tool descriptions
- Loaded recall, reflect, and retain tool descriptions from new markdown prompt files.
- Updated the retain tool to accept batched `items`, enqueue each memory entry, and return the queued-memory count.
- Reworked retain tests to pass the array payload, assert pluralized queue messages, and confirm single-batch flush behavior.
2026-05-03 09:01:57 +02:00
can1357 378c757571 fix(coding-agent/edit): changed default edit separator to '~' for better reliability
- Switched HL_EDIT_SEP initialization to read from process.env, trimming the value and defaulting to "~" when missing or invalid.
- Expanded the separator documentation with benchmark data and reliability notes explaining why "~" was selected as the fallback over other candidates.
2026-05-03 08:53:31 +02:00
can1357 51dc178be8 feat(hindsight): implemented per-session hindsight retain queue auto-flush
- Added per-session retain queues with size/time auto-flush, recursive drain, and lifecycle flushes on end/clear/enqueue.
- Changed `hindsight-retain` to validate session state, enqueue writes, and return `Memory queued.` immediately.
- Added `notice` event support and handlers that route error/warning/status messages with source-aware formatting.
- Updated client and tests with shared request mapping, `RequestOptions`, `buildMemoryItem`, and expanded batch/list/doc APIs.
2026-05-03 08:51:53 +02:00
can1357 1e6235d3fc feat(coding-agent): aliased subagent sessions to shared parent Hindsight state
- Added an optional `aliasOf` link and a `pickPrimaryState` helper to track reusable parent Hindsight state.
- Updated task-depth subagent startup to reuse the latest primary state's bank, client, config, tags, and missions while returning silently when no parent exists.
- Skipped alias states in recall-snippet selection and enqueue so auto-recall/retain work only on the parent session.
2026-05-03 08:37:39 +02:00
can1357 6475247eee feat(coding-agent/tools): added recall/retain/reflect tools for hindsight sessions
- Updated tool selection logic to add memory-specific tools when the session backend is set to "hindsight".
- Ensured the new tools "recall", "retain", and "reflect" are appended only if not already requested.
2026-05-03 08:29:13 +02:00
can1357 6e8daae059 feat(coding-agent): added inline hashline parse with conflict checks
- Added inline hashline parse and apply support for `<` prepend and `+` append operations with prefix+suffix edits.
- Added fail-fast behavior to reject inline modify ops combined with delete or replace on same line.
- Renamed HASHLINE_* and mode symbols to HL_* in prompt tooling, read/search checks, and prompt templates.
- Standardized separators to `PI_HL_SEP`/`HL_EDIT_SEP` and fixed `HL_BODY_SEP='|'`, updating parser formatting behavior.
- Updated benchmark subtype constants and python cleanup test setup to use HL_* values and AgentRegistry mock failure injection.
2026-05-03 08:17:09 +02:00
can1357 067c8eb8f2 fix(coding-agent): unified plugin cache clearing and registry path resolution for plugin roots
- Replaced duplicated plugin-registry cache invalidation blocks with clearPluginRootsAndCaches in command and selector setup paths.
- Updated OMP plugin registry path resolution to use getPluginsDir for reads and cache invalidation, matching marketplace write locations.
- Removed a redundant project-scope marketplace test after centralizing cache-root invalidation logic.
2026-05-03 07:51:53 +02:00
can1357 3d8d44f86f refactor(hindsight): migrated dependency to local HindsightApi client
- Removed the `@vectorize-io/hindsight-client` dependency from both package manifests.
- Added a local `HindsightApi` client and changed `createHindsightClient` to instantiate it.
- Replaced `HindsightClient` imports/types with `HindsightApi` across backend, bank, and tests.
- Implemented `HindsightApi` `#request` handling with `fetch`, safe JSON parsing, and `HindsightError` on failures.
2026-05-03 07:47:22 +02:00
can1357 af0f740baa fix(coding-agent/edit): changed default hashline separator to backslash
- Changed the default HASHLINE_CONTENT_SEPARATOR value to a backslash when PI_HASHLINE_SEP is not provided.
- Kept the environment variable override path intact so custom separators continue to work via PI_HASHLINE_SEP.
2026-05-03 07:41:04 +02:00
can1357 7937fe55da fix(coding-agent): added memory setting defaults to RPC host override list
- Added memory.backend and memories.enabled to the RPC defaulted settings list.
- Ensured RPC hosts can pick up explicit memory configuration defaults from the settings layer.
2026-05-03 07:39:52 +02:00
can1357 b19354d8cd feat(coding-agent): added PI_HASHLINE_SEP for hashline payload separator
- Added configurable hashline separator support via `PI_HASHLINE_SEP` with `|` fallback.
- Replaced hardcoded `|` payload markers with `{{hsep}}`/`$HSEP$` in prompts, grammar, and parsing.
- Updated payload parsing to strip shared separator prefixes while preserving whitespace-only prefixes.
- Replaced `resolveLarkLidPlaceholders` with `resolveHashlineGrammarPlaceholders` and added a compatibility alias.
2026-05-03 07:39:52 +02:00
can1357 e398f83163 fix(coding-agent): removed settings entries and derived submenu options
- Removed settings UI entries for `display.tabWidth`, `stt.language`, and similar values lacking valid `ui.options`.
- Refactored `pathToSettingDef()` in `settings-defs.ts` to derive submenu options directly from schema metadata.
- Introduced `SubmenuOption`/`AnyUiMetadata` in `settings-schema.ts` and added `options: "runtime"` support for dynamic lists.
2026-05-03 07:39:52 +02:00
can1357 b59ef9eb80 fix(coding-agent/edit): fixed doubled || prefix handling in hashline parser
- Updated `collectPayload` to accept a warnings accumulator, detect doubled payload prefixes, and strip one extra leading `|` when all payload lines used the doubled form.
- Changed `parseHashlineWithWarnings` to return collected parser warnings instead of an empty list.
- Added tests confirming auto-stripping, single-line `|` preservation, and mixed-prefix payload behavior.
2026-05-03 07:39:52 +02:00
can1357 0518955e0a ux(coding-agent/modes): removed token_total from default status-line preset
- Removed the token_total segment from the default status-line preset.
- Kept the remaining left-side segment order unchanged, including cost at the end.
2026-05-03 07:39:52 +02:00
can1357 76a02c385a feat(coding-agent): added hindsight scoping modes with bank scope tags
- Added `hindsight.scoping` and `HINDSIGHT_SCOPING` with global, per-project, and per-project-tagged modes.
- Migrated legacy `raw.hindsight` handling to scoping-based behavior and removed deprecated `dynamicBankId`/`agentName` keys.
- Replaced `deriveBankId` with `computeBankScope`, returning `bankId` plus optional retain/recall tags by mode.
- Forwarded scoped tags through memory ops so recall and retain/reflect calls use `tags`, `tagsMatch`, and `recallTags`.
- Validated `scoping` values from env/settings, warning and defaulting to `per-project-tagged` when invalid.
2026-05-03 07:39:52 +02:00
can1357 d14e4ae4b9 refactor(coding-agent): standardized Hindsight memory wrappers and tool names
- Standardized Hindsight context output to emit `<memories>` blocks and updated retention stripping to remove both `<memories>` and legacy `<hindsight_memories>`/`<relevant_memories>` tags.
- Renamed built-in Hindsight tool entry points and labels from `hindsight_retain`/`hindsight_recall`/`hindsight_reflect` to `retain`, `recall`, and `reflect`, including tool availability checks.
2026-05-03 07:39:52 +02:00
can1357 d57275fb5d feat(coding-agent): made memory.backend the authoritative selector for memory backends
- Updated runtime memory config loading and backend resolution so `memory.backend === "local"` now enables the local pipeline directly, while `memories.enabled` is treated only as a legacy migration input.
- Switched the `memory.backend` default to `off` and kept `memories.enabled` hidden from the Memory tab UI for migration compatibility.
- Adjusted memory runtime, resolver, and documentation/tests to match the new backend-selection semantics.
2026-05-03 07:39:52 +02:00
can1357 7784717935 feat(coding-agent): added first-turn hindsight recall injection to startup prompts
- Added a new optional `beforeAgentStartPrompt` hook to `MemoryBackend` and implemented it in the Hindsight backend to recall long-term context for the first turn.
- Updated `AgentSession` startup flow to inject the recalled context into the turn-specific system prompt before the first response is generated.
- Preserved `<hindsight_memories>` tags in Hindsight developer instructions and added tests for first-turn injection and state caching.
2026-05-03 07:39:52 +02:00
can1357 fea97766dd fix(coding-agent/modes): applied setting visibility conditions to all setting variants
- Refactored setting definitions so the optional visibility predicate now lives on the shared base interface.
- Updated path-to-def mapping to pass the shared condition through every setting variant.
- Adjusted SettingsSelectorComponent to evaluate condition for all setting types before rendering items.
2026-05-03 07:39:52 +02:00
can1357 ce2a109c09 feat(coding-agent): added hindsight memory backends and tools
- Added `memory.backend` and `hindsight.*` settings schema with migration from `memories.enabled` legacy mode.
- Added Hindsight memory backend runtime modules for resolved config, client creation, bank ID derivation, and state lifecycle.
- Added off/local/hindsight backends and resolver wiring across SDK, commands, and compaction context.
- Added `hindsight_recall`, `hindsight_reflect`, and `hindsight_retain` tools with schema validation and backend gating.
- Added Memory tab metadata and symbols to expose backend selection in the settings UI.
- Added package export barrels and tests for bank ID, content formatting, and hindsight config env precedence.
2026-05-03 07:39:52 +02:00
can1357 c65191911e feat(coding-agent/cli): added grievance clean action to the grievances command
- Added a `list`/`clean` positional action and examples to the grievances command, along with new `--id`, `--tool`, and `--all` flags for cleaning.
- Implemented `cleanGrievances` to delete grievances by id, tool, or all entries, enforce mutually exclusive selectors, and emit JSON counts when requested.
- Updated grievance DB access to use writable handles for clean operations and reset autoincrement sequence when removing all rows.
2026-05-03 07:39:52 +02:00
can1357 7f2b25ea95 fix(tools): resolved search and find behavior for missing path inputs
- Updated search, find, ast-edit, and ast-grep to skip missing paths and run on existing ones.
- Added multi-path error handling to throw ToolError only when all provided paths are missing.
- Updated search and find outputs to surface skipped `missingPaths` in text and renderer warnings.
- Updated CHANGELOG with multi-path tool behavior updates and `search_repos` global-search notes.
- Added `PartitionedPaths` and `partitionExistingPaths` to classify existing versus missing path inputs.
- Added test helpers and fixtures for multi-path missing-path cases in search/find behavior tests.
2026-05-03 07:39:52 +02:00
can1357 58b895db23 feat(tools): added GitHub code, commit, and repo search support
- Added `search_code`, `search_commits`, and `search_repos` to GitHub tool schema, docs, and titles.
- Extended `GithubTool.execute` and search arg building to dispatch new search ops and handle args correctly.
- Added richer search formatters for code, commit, and repo results with short SHA and repository metadata.
- Added tests for code, commit, and repo search outputs and `--repo` argument behavior.
2026-05-03 07:39:52 +02:00
can1357 242b121085 chore: bump version to 14.6.2 2026-05-03 05:00:22 +02:00
can1357 ee8b4ec252 fix(coding-agent): adjusted status-line session accent handling for border gaps
- Status-line rendering now treats `statusLine.sessionAccent` as disabled only when explicitly set to false.
- Updated status-line overflow tests to assert gap colors use session accent when enabled and theme border when disabled.
- Test teardown now restores `WSL_INTEROP` and `WSL_DISTRO_NAME` environment variables after mutation.
2026-05-03 04:59:43 +02:00
can1357 581148452c fix(coding-agent/modes): prevented status-line accent lookup before settings initialization
- Added an isSettingsInitialized helper to expose whether global settings were created.
- Updated interactive mode to use the session name when settings are not yet initialized.
- Guarded the status-line accent lookup behind settings initialization to avoid premature access.
2026-05-03 04:58:12 +02:00
can1357 a1a2331d5a fix(tui): avoided OSC 11 polling on Windows Subsystem for Linux
- Added WSL detection in terminal initialization and skipped periodic OSC 11 polling when running under Windows Subsystem for Linux.
- Removed mode 2031 activity tracking and stopped OSC 11 polling immediately when DA1/Mode 2031 reports were received.
- Extended OSC 11 appearance tests to restore platform/env state and verify no polling is started under WSL.

Fixes #914
2026-05-03 04:53:38 +02:00
can1357 3f05cb23d6 test(coding-agent): updated status-line overflow test setup and assertions
- Initialized in-memory settings during test setup and reset them after tests.
- Updated the status-line border assertion to verify border glyph text and styling directly.
- Removed reliance on session accent helper functions in the session-accent test case.
2026-05-03 04:52:10 +02:00
can1357 24b150cf8e feat(coding-agent): added session accent toggle for status line and border colors
- Added a new boolean statusLine.sessionAccent setting to settings schema and propagated it through status-line preview, controller, and component setting updates.
- Updated status line rendering and interactive border coloring to disable session-based accent colors when the setting is false.
- Added a regression test verifying the status-line gap uses theme border color instead of session accent when session accents are disabled.

Fixes #918
2026-05-03 04:52:10 +02:00
can1357 47607faf5f refactor(coding-agent/mcp): parallelize standalone mcp.json fallback reads
Mirrors the user/project Promise.all pattern above; precedence
(mcp.json before .mcp.json) is preserved by iteration order on the
resolved configs.
2026-05-03 04:48:43 +02:00
Can Bölük 1bab1f5896 Merge pull request #919 from phanthh/fix/mcp-reauth-standalone-configs
fix: support standalone mcp.json/.mcp.json in /mcp reauth and config commands
2026-05-03 04:46:14 +02:00
Can Bölük 128c77d75d Merge pull request #917 from infernix/ssh-project-isolation-fix
fix(coding-agent): hash SSH control sockets by connection
2026-05-03 04:45:14 +02:00
can1357 52b6c1a00c fix(coding-agent/tools): skipped spilling read tool results to artifacts
- Updated spillLargeResultToArtifact to return early when toolName is "read", preventing read results from being written to artifacts.
2026-05-03 04:41:01 +02:00
phanthh ce0bf064b8 revert: remove CHANGELOG entry, left to maintainers 2026-05-02 20:45:09 +03:00
phanthh 2935cd43c3 fix: support standalone mcp.json/.mcp.json in /mcp reauth and other config commands
#findConfiguredServer only checked .omp/mcp.json (project) and
~/.omp/agent/mcp.json (user). Servers discovered from standalone
mcp.json or .mcp.json in the project root were visible in /mcp list
but not found by /mcp reauth, /mcp unauth, /mcp enable, or
/mcp disable.

Extend #findConfiguredServer to also check the standalone fallback
files that the mcp-json discovery provider reads.
2026-05-02 20:39:02 +03:00
Gerben Meijer b8f5a3d890 fix(coding-agent): hash SSH control sockets by connection 2026-05-02 17:14:18 +02:00
can1357 5f728ba735 chore: bump version to 14.6.1 2026-05-02 08:11:46 +02:00
can1357 6b4de15353 fix(coding-agent): retry sync git metadata reads on EINTR
POSIX permits short syscalls (incl. open/read/stat) to be interrupted
by a signal and surface as EINTR. Optional sync git metadata helpers
(used by the status line) propagated the raw error and crashed the
agent. Add a small bounded retry around the sync stat/read calls and
classify persistent EINTR as 'metadata unavailable' so optional reads
fall back to undefined instead of throwing.

Fixes #899
2026-05-02 07:55:30 +02:00
can1357 5d1ad6e80b fix(coding-agent): load extensions before --list-models
The --list-models handler in runRootCommand short-circuited to
listModels() right after Settings.init and modelRegistry.refresh,
exiting before extension loading ran in createAgentSession. As a
result, providers contributed via pi.registerProvider() (from -e
paths or settings.extensions) never appeared in the listing.

Extract a runListModelsCommand entry point in cli/list-models.ts
that loads extensions (CLI -e paths and settings.extensions) into
the supplied ModelRegistry, mirroring sdk.ts's handoff of pending
provider registrations, and then delegates to listModels. The load
is intentionally narrow: no agent loop, no MCP servers, no custom
tools.

Fixes #905
2026-05-02 07:48:30 +02:00
can1357 cb0d51b0f1 fix(coding-agent): guard non-string _i in event-controller intent update
Streamed tool-call JSON can deliver `_i` as an object, number, or boolean
before schema validation lands. The optional-chain in
#updateWorkingMessageFromIntent only guarded null/undefined, so any
non-string value crashed the UI with 'intent?.trim is not a function'.

Accept `unknown` and bail unless typeof intent === 'string', mirroring
the typed guard in agent-loop's extractIntent. Drop the misleading
`as string | undefined` cast at the streaming call site.

Fixes #900
2026-05-02 07:47:21 +02:00
can1357 1c1d68f526 feat(coding-agent/tools): added contextual github render status messages
- Updated `githubToolRenderer.renderCall` to use operation-specific titles and contextual metadata.
- Fixed `githubToolRenderer.renderResult` fallback path to show the real operation and clearer status messages.
- Changed non-`run_watch` fallback output to truncate lines by terminal width and show `+N more lines` hints.
2026-05-02 07:44:58 +02:00
Can Bölük 74d0ed6d85 Merge pull request #907 from quickserve-ai/main
fix(ai/responses): support status_details.error and retry opaque failures
2026-05-02 07:27:52 +02:00
can1357 ca70328a9b chore: bump version to 14.6.0 2026-05-02 07:02:16 +02:00
can1357 2264165567 feat: hashline v3 2026-05-02 07:01:57 +02:00
can1357 86a55701b5 docs(coding-agent/prompts): documented concise agent prompt guidance
- Replaced verbose design-checklist and Design Integrity sections with a shorter clarity-focused working guidance block.
- Removed redundant prose around abstraction and design doctrine, keeping the prompt focused on practical editing and verification behavior.
- Updated follow-through and tool-failure guidance to emphasize concise updates and re-reading changed files before next actions.
2026-05-02 06:59:53 +02:00
can1357 627e655f43 fix(coding-agent/eval): enabled main-context dynamic imports in JS VM execution
- Added the main-context dynamic import loader option when running the JS prelude in VM state creation.
- Enabled the same `importModuleDynamically` setting during `executeInVmContext` execution so wrapped scripts use the shared dynamic import behavior.
- This ensures VM execution now uses the main context default loader for dynamic module imports.
2026-05-02 06:59:33 +02:00
can1357 d064170c56 fix: chatgpt really doesnt like sandwitching lark 2026-05-02 04:54:56 +02:00
can1357 f0e9a830ff refactor(packages/coding-agent): migrated search args to paths arrays
- Switched search/ast_grep/ast_edit/find inputs from scalar path fields to required `paths` arrays.
- Reworked path resolution to normalize and expand each `paths` entry via explicit helpers in `src/tools/path-utils.ts`.
- Updated search and find tool-call rendering to display explicit `paths` values in mode overlays and export views.
- Updated tool prompt docs and examples to document `paths` array inputs for search, grep, find, and AST tools.
- Raised the default search match limit from 20 to 500 and updated limit-reached messaging.
2026-05-02 04:34:39 +02:00
can1357 ffdec04af2 refactor(packages/coding-agent): reorganized atom LID parsing rules
- Centralized `line-hash.ts` hash regex sources and resolved `atom.lark` via `resolveLarkLidPlaceholders`.
- Expanded `computeLineHash` to emit `>[a-z]` and `[a-z]<` hashes for brace-context anchors.
- Replaced atom/hashline parsers' hard-coded lid regex with shared `HASHLINE_HASH_RE_SRC` and lax counterparts.
- Removed `\\TEXT` continuation handling in atom rewrites and switched multi-line replacements to `+TEXT`.
- Added brace-body insertion warning when `@Lid` on `{`-ending lines inserts at non-body-safe indent.
- Suppressed duplicate auto-rebase warnings and kept unmatched `-`/`+` ranges separate in compact previews.
2026-05-02 04:34:39 +02:00