Commit Graph

9108 Commits

Author SHA1 Message Date
can1357 fbba331f8a feat(cross-cutting): added multi-syntax in-band tool-call support for runtime tool conversion
- Added optional Agent and SDK tool-call syntax controls (`toolCallSyntax`, `PI_OWNED_TOOLS`) for owned calls.
- Added in-band grammar scanners and renderers for Anthropic, DeepSeek, GLM, Hermes, Kimi, PI, and Qwen3.
- Added supportsTools propagation and model schema updates to route unsupported models to fallback syntax.
- Replaced stream-markup parsing with syntax-specific in-band scanners and event conversion.
2026-06-15 07:33:24 +02:00
can1357 907bc9979e feat: renamed opcodes to simplified variants
- Renamed line and block patch op verbs to XCHG, DEL, and INS in parsing and formatting.
- Updated grammar and tokenizer to support XCHG.BLK, DEL.BLK, and INS.PRE/POST/HEAD/TAIL forms.
- Updated diagnostics, docs, prompts, tests, and changelog to use XCHG/DEL/INS-based operators.
- Expanded session-stats parsing to normalize legacy op aliases to compact IDs.
2026-06-15 07:33:24 +02:00
can1357 6639d6e1f7 feat(coding-agent/modes): added conditional nerd-font tip for unicode welcome mode
- WelcomeComponent now lazily selected and cached a tip per instance, preserving it across re-renders.
- With the unicode preset, it showed a special nerdfont tip 10% of the time and otherwise used the regular tip rotation.
- Added tests that mocked theme preset and Math.random to verify standard and special tip selection behavior.
2026-06-15 06:10:52 +02:00
can1357 628809a09a fix(coding-agent): promote context before pre-prompt compaction and fall back from overflowing snapcompact
The pre-prompt context check ran compaction directly, so snapcompact (or
any strategy) fired before auto-promote ever got a chance — defeating
Auto-Promote Context. It now tries promotion to a larger-context model
first (mirroring the post-turn threshold path) and only compacts when no
target is available.

Auto and manual compaction now project a snapcompact result's
post-compaction size (kept history + frames at the image budget + summary
+ non-message overhead); when it still exceeds the model's usable window,
they downgrade to a context-full LLM summary instead of leaving the
session overflowing.
2026-06-15 05:45:42 +02:00
can1357 bc6130aad4 fix(natives): build linux addons against a glibc 2.17 floor via cargo-zigbuild
Native linux-x64/arm64 builds moved onto the Ubuntu 24.04 (glibc 2.39)
omp-kata runner. The x64 addon was a plain host build that linked the
runner's glibc and failed to dlopen with `version 'GLIBC_2.39' not found`
on older distros; the arm64 cross-build floated up to GLIBC_2.30. Build
the shipped linux-gnu addons through cargo-zigbuild against a pinned 2.17
floor so they load on any glibc >= 2.17.

- build-native.ts: key the tree-sitter-just `-UNDEBUG` CFLAGS off the
  bare triple (cargo-zigbuild strips the `.2.17` glibc suffix before
  invoking cargo) and symlink the suffixed target dir napi 3.7.0 expects
  to the bare dir cargo-zigbuild writes, so postBuild copyArtifact finds
  the cdylib.
- build-native action: add a `glibc` input plus a resolve step deriving
  the zigbuild cross_target (suffixed) and the rustup bare_target
  (stripped); gate zig/cargo-zigbuild install on cross_target so the
  host-arch x64 build still runs native Rust tests.
- ci.yml: GLIBC_FLOOR=2.17 fed to the linux-x64 and linux-arm64 native
  jobs.

Re-tags 15.13.1, whose release failed at the linux-x64 binary smoke
before any publish step ran.
2026-06-15 05:39:02 +02:00
can1357 6c48b6224d chore: bump version to 15.13.1 2026-06-15 04:36:40 +02:00
can1357 35abd9ff71 chore: update changelogs 2026-06-15 04:35:55 +02:00
can1357 74d24e8917 Merge remote-tracking branch 'origin/farm/01e345d2/editor-windows-default-notepad' 2026-06-15 04:35:33 +02:00
can1357 36991a38e7 fix(scripts): added changelog baseline pinning for recover runs
- Added a `refs/clog` baseline and updated the fixer to prefer it over older `v*` tags when resolving the changelog diff floor.
- Constrained recovery scans to tags containing the baseline and added `--pin` to advance that baseline to `HEAD` after authoritative rewrites.
- Updated release tagging/tag lookup behavior and added a regression test covering recovered released bullets not being re-promoted.
2026-06-15 04:35:12 +02:00
roboomp fb75ba481d fix(editor): default to notepad on Windows when $VISUAL/$EDITOR are unset
The external editor flow (Ctrl+G, plan editor, /todo edit) warned 'No
editor configured' on Windows because getEditorCommand() returned
undefined whenever neither $VISUAL nor $EDITOR was set — the default
state for most Windows shells.

Fall back to 'notepad' on win32 after consulting $VISUAL/$EDITOR
(always present in %SystemRoot%\\System32) and trim env values so
accidentally padded strings still resolve. POSIX still returns
undefined so the warning continues to nudge users to configure an
editor.

Fixes #2604
2026-06-15 02:34:06 +00:00
can1357 a655953e7a fix(hashline): hardened hashline editing with seen-line and block-anchor validation
- Tracked seen-line provenance in snapshots and propagated it from read/search/ast-grep rows.
- Rejected hashline edits on unseen lines before patching, throwing unseen-line errors.
- Rejected single-line block anchors in strict mode and dropped them in unresolved lenient mode.
- Trimmed one-sided keeper-echo duplicates during multi-line replacements with warning output.
2026-06-15 04:25:33 +02:00
can1357 9cfefdedd4 fix(coding-agent/modes): allowed /tan dispatch to queue during streaming turns
- Removed the streaming guard that previously rejected /tan while the parent response was still generating.
- Passed "deliverAs: \"nextTurn\"" when sending the background dispatch breadcrumb and kept "triggerTurn: false" so an in-flight turn is not steered.
- Skipped rebuilding chat messages during streaming sessions and updated tests to cover the non-blocking dispatch path.
2026-06-15 04:21:11 +02:00
can1357 ca28fab3aa test(coding-agent): hardened retry fallback test assertion checks
- The AgentSession retry fallback test now validates the assistant message before reading it.
- It now verifies the first content block is text before checking the recovered message text.
2026-06-15 03:49:54 +02:00
can1357 ecd9f3220f feat(scripts): added changelog recovery mode for historical duplicate cleanup
- Added --recover CLI option to rebuild changelog fixes from tagged history.
- Pruned Unreleased bullets that match historical released items across all tags.
- Normalized output by sorting release sections by version and compacting bullet spacing.
2026-06-15 03:43:24 +02:00
can1357 3f82589ec1 fix: fixed OAuth and profile-boundary regressions across CLI and env handling
- Fixed OAuth credentials to keep unknown fields in schema while preserving existing shape checks.
- Fixed MCP OAuth IDs to be profile-scoped and avoid deleting credentials from non-active profiles.
- Fixed string-flag parsing so PROFILE_BOOTSTRAP_BOUNDARY tokens are not consumed as values.
- Fixed active-profile directory resolution to refresh after env updates so profile .env overrides apply.
2026-06-15 03:20:45 +02:00
can1357 6b26276505 Merge remote-tracking branch 'origin/farm/78f04ffd/fix-ctrl-c-extension-shutdown-timeout' 2026-06-15 03:17:00 +02:00
roboomp b0d0bd5bcb fix(coding-agent): cap session_shutdown extension handler at 2s
ExtensionRunner.emit shared the generic 30s EXTENSION_HANDLER_TIMEOUT_MS budget with every event, including the fire-and-forget session_shutdown teardown event extensions cannot observe. A hung third-party handler — observed on Windows with omp-discord-presence 0.1.2 waiting on a stuck Discord IPC pipe — held AgentSession.dispose() for the full window, making Ctrl+C look ignored for 30s.

session_shutdown now uses a dedicated 2s SESSION_SHUTDOWN_HANDLER_TIMEOUT_MS cap routed through a per-event handlerTimeoutForEvent() lookup so generic and shutdown budgets are independently configurable. The interactive-mode Ctrl+C path adds a defence-in-depth hard-exit: when isShuttingDown is true a fresh Ctrl+C exits with code 130 (the session JSONL has already been sync-flushed by the first press) instead of stacking another no-op shutdown() call.

Fixes #2600
2026-06-15 01:08:26 +00:00
can1357 7b319f0f02 fix(coding-agent/eval): routed process stdio writes to active runtime text sink
- Added runtime hook resolvers so each `JsRuntime` instance can expose hooks for its active run.
- Patched `process.stdout` and `process.stderr` writes once per stream to route output chunks through active run text hooks and preserve existing worker logging when no run is active.
- Added chunk-to-string conversion for write payloads and encoding-aware forwarding while keeping callback semantics intact.
2026-06-15 03:04:10 +02:00
can1357 05fd499551 Merge PR #1435: feat: added isolated profiles with --profile and --alias
Closes #1435

# Conflicts:
#	.github/actions/bun-install/action.yml
2026-06-15 02:47:12 +02:00
can1357 4952b28a8e test(mnemopi): reworked mnemopi test embedding setup and CI bucketing
- Removed the mnemopi Bun preload file and added explicit `./setup` imports in the changed test suites.
- Deleted the `RUN_EMBEDDINGS` flag path and shifted `MNEMOPI_NO_EMBEDDINGS` handling into per-suite before/after hooks.
- Excluded `packages/mnemopi` from the fast parallel CI test bucket with a note about missing fastembed models.
2026-06-15 02:45:03 +02:00
can1357 12950af096 perf(scripts): raised workspace test workers and ARC CPU limits
- Updated workspace-mode CI to run `workspaceTestCommand` with 8 workers instead of 4.
- Raised the documented ARC runner CPU limit from 8 to 16 in caching docs.
2026-06-15 02:44:16 +02:00
can1357 ab00631591 Merge PR #2594: fix(coding-agent): stopped todo reminders self-escalating without user input
Closes #2594
2026-06-15 02:39:47 +02:00
can1357 9741b91631 Merge PR #2587: fix(goals): retry turns failing with Gemini MALFORMED_FUNCTION_CALL
Closes #2587
2026-06-15 02:39:43 +02:00
can1357 1591179cbd Merge PR #2586: fix(goals): avoid deactivating goal mode on wall-clock-only updates
Closes #2586
2026-06-15 02:39:39 +02:00
can1357 05439419a8 Merge PR #2595: fix(coding-agent): render absolute mtimes in system-prompt workspace tree (prompt-cache stability)
Closes #2595
2026-06-15 02:39:34 +02:00
can1357 038d35d6ce Merge PR #2584: fix(snapcompact): budget openai-codex images
Closes #2584
2026-06-15 02:39:34 +02:00
can1357 f8e7874159 Merge remote-tracking branch 'origin/farm/ad9a74c4/release-notes-include-silent-tags' 2026-06-15 02:26:09 +02:00
Ogrodev 932ebe9a48 Merge remote-tracking branch 'upstream/main' into feat/profiles-and-alias
# Conflicts:
#	.github/actions/build-native/action.yml
#	.github/workflows/ci.yml
2026-06-14 21:26:03 -03:00
can1357 1f5307fdec feat(infra): migrated runner caches to PVC-backed Bun/Cargo and RustFS sccache
- Updated bun-install action to set mounted cache mode and use PVC cache paths.
- Removed RustFS Bun restore/save and maintenance scripts, replacing them with mounted cache setup.
- Removed zstd from runner image installation and baked-tool verification checks.
- Updated infra docs to describe split caching with RustFS for sccache and PVC for Bun/Cargo.
2026-06-15 02:24:35 +02:00
Ogrodev c7537eb1f4 fix(ci): disable rustfs bun cache on test jobs 2026-06-14 21:20:59 -03:00
Ogrodev a482b1c48e fix(natives): retry without sccache on cache outages 2026-06-14 21:08:32 -03:00
Ogrodev bf562af9f9 test(coding-agent): relax browser stealth timing bound 2026-06-14 21:04:17 -03:00
Ogrodev cfb08657cd chore(ci): retrigger install smoke 2026-06-14 20:56:11 -03:00
Ogrodev 87da6d373f fix(coding-agent): scope managed skills to profiles 2026-06-14 20:49:05 -03:00
roboomp 77a5befd53 fix(ci): authenticate gh release lookup and fail loud on lookup error
Two issues caught in review on #2597:

1. `gh release list` in GitHub Actions requires GH_TOKEN. The release
   notes step in `.github/workflows/ci.yml` had no env block, so gh would
   exit non-zero and the script's silent fallback would re-strand the
   silent-tag entries this change is meant to recover. Pass
   `GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}` to the step.

2. Silently degrading to legacy single-version output on gh failure is
   itself the regression vector — a future token misconfig or gh outage
   would lose data with no signal. `resolvePublishedFloorTag` now throws
   on gh failure with an actionable hint ("pass GH_TOKEN in Actions; set
   OMP_RELEASE_NOTES_FLOOR= locally to opt into legacy mode"). The
   thrown error propagates out of `main` and exits non-zero, failing the
   CI step loudly so the release is rebuilt with the fix.

The legitimate null path is preserved: `OMP_RELEASE_NOTES_FLOOR=`
(empty) still forces single-version mode, and a successful gh call with
no candidate < target still returns null (first-ever publish case).

Verified locally: hiding gh from PATH now exits 1 with the hint;
`OMP_RELEASE_NOTES_FLOOR=` with hidden gh still produces the legacy
84-bullet single-version output.

Refs #2596
2026-06-14 23:43:17 +00:00
roboomp 4d9f9d9edf fix(ci): aggregated release notes across silent intervening tags
scripts/ci-release-notes.ts previously extracted only the single
target-version section, so changelog entries finalized under tags pushed
without a GitHub Release (e.g. v15.12.5 and v15.12.6 — collateral from
the pre-#2564 release-cancellation bug) were stranded out of the next
published release body.

The generator now walks the range (latest-published-release, target],
resolved via 'gh release list', and merges every in-range '## [X.Y.Z]'
section per package — grouped by '### <category>' with bullet-level
dedup so post-release changelog flattening cannot surface the same
entry twice. Versions iterate newest-first so newer phrasing wins on
dup resolution, and categories are sorted into the canonical
Breaking/Added/Changed/Fixed/Removed order regardless of source order.

Falls back to legacy single-version extraction when 'gh' is unavailable
or no prior published release resolves (safe no-op);
'OMP_RELEASE_NOTES_FLOOR=v15.12.4' overrides the lookup for manual
re-runs (empty string forces legacy mode).

Adds scripts/ci-release-notes.test.ts covering: range inclusion above
floor, target-inclusive boundary, dedup of bullets flattened forward
into multiple versions, canonical category ordering, the null-floor
legacy fallback, empty version sections skipped, and no empty-category
emission when dedup drains a bucket. Wired into 'bun run test:scripts'.

Fixes #2596
2026-06-14 23:36:19 +00:00
Ogrodev f9bc96e96c fix(coding-agent): harden profile auth shipping gaps 2026-06-14 20:30:50 -03:00
Steve Pinkham db3af3eff8 fix(coding-agent): render absolute mtimes in the system-prompt workspace tree
The workspace tree shown in the system prompt renders per-entry modification
times as render-time relative ages ("9m ago") computed from Date.now() on
every build. Those strings drift between sessions ("9m ago" -> "10m ago",
"59m ago" -> "1h ago") while the files themselves are unchanged. Because the
tree sits ahead of the (multi-thousand-token) tool block and KV cache is
contextual, that one early change invalidates the cached prefix for everything
after it, forcing a full prompt re-prefill on the first request of every new
session — even when nothing in the workspace actually changed.

Fix: render a deterministic absolute UTC timestamp (YYYY-MM-DD HH:MM) derived
purely from the file's mtime for the cached system-prompt tree, so the rendered
block is byte-identical across sessions and only changes when a file actually
changes. Scoped via a new internal AssembleOptions.ageMode:
  - buildWorkspaceTree (cached system prompt) -> "absolute"
  - buildDirectoryTree (read-tool output, not cached) -> "relative" (unchanged)
renderNode now takes a per-pass age formatter instead of reading Date.now()
directly.

Measured on a local llama.cpp server (single user, prompt cache on): with a
file whose age ticks between two back-to-back sessions, the unpatched build
re-prefills the full prefix on session 2 (27,124 prompt tokens, 46s); with this
change session 2 is a cache hit (13 tokens, 2s). Existing tests are unaffected
(they assert on filenames/order/elision, not on age strings); two regression
tests added.
2026-06-14 19:17:24 -04:00
can1357 a6aa0c4ae8 fix(actions): fixed runner tooling setup and version parsing
- Updated Rust toolchain checks to use a prefix-aware grep pattern when validating installed components.
- Simplified the Zig installer action to extract into ~/.local and add the archive directory directly to PATH.
- Adjusted runner checks to parse sccache and gh version output via positional shell fields for stability.
2026-06-15 01:15:25 +02:00
can1357 551c599672 feat(infra): added infra automation for runner, cache, and kata runtime operations
- Enabled containerd-first runner builds with auto backend defaults, tool bootstrap, and docker fallback.
- Added RustFS cache maintenance report/prune modes with S3-driven listing, cache key grouping, and threshold exits.
- Added kata runtime tuning automation via SSH that patches config, runs smoke tests, and cleans up resources.
- Expanded runner-image smoke checks to verify clang, lld, sccache, zig, and cargo-* requirements.
2026-06-15 01:08:06 +02:00
can1357 ff5b06d0c2 ci: added CI workflows and actions for pinned toolchain-native builds
- Added composite GitHub actions to ensure rust toolchains and cargo helpers.
- Added a kata-native build action with variant checks and platform artifact uploads.
- Reworked CI matrices to split native cross-platform jobs and gate releases accordingly.
- Updated runner bootstrap and image to preinstall pinned build tools for CI consistency.
2026-06-15 01:01:45 +02:00
can1357 198b1cdec2 fix(ci): close bun-install cache backend branch
The backend-detection shell block in .github/actions/bun-install/action.yml was missing its closing fi, so every job that touched the composite failed immediately with . Restore the RustFS/GHA branch correctly and validate with YAML parse + bash -n.
2026-06-15 01:00:19 +02:00
can1357 37d356f7bc test(mnemopi): centralized embedding test gating through shared Bun setup
- Added a Bun test preload config in packages/mnemopi/bunfig.toml to run shared setup automatically.
- Moved embedding opt-out logic into test/setup.ts, using EMBEDDINGS=1 to enable embeddings and defaulting MNEMOPI_NO_EMBEDDINGS otherwise.
- Updated embedding-focused tests to import RUN_EMBEDDINGS and skip suites unless embeddings are enabled.
2026-06-15 00:58:26 +02:00
can1357 f4e11db5b8 feat(infra): added kata-based ARC CI docs and reload tooling for k3s
- Added k3s host and cluster setup docs, including pinned install, module checks, and readiness commands.
- Added kata-runtime setup docs with containerd integration, RuntimeClass, and guest-kernel validation steps.
- Added ARC ARC/runner-and-cache deployment docs covering helm values, secrets, and pod network policy.
- Added reload-runner automation and a preloaded runner image Dockerfile with pinned toolchain and rollout checks.
2026-06-15 00:52:47 +02:00
can1357 82871093bd ci(actions): skipped bun setup and rust-cache on shared-sccache runners
- Updated the bun-install composite action to detect preinstalled Bun and only fetch it when missing.
- Added cache-backend detection and wiring so Bun dependencies use RustFS cache when SCCACHE credentials are present.
- Conditionally skipped rust-cache in build-native and CI jobs when shared sccache runners are available, relying on the existing RustFS/sccache layer instead.
2026-06-15 00:52:32 +02:00
can1357 96fd08200d ux(coding-agent/modes): adjusted model menu layout to use a bounded scrollable option window
- Collapsed the model list while the role/action menu is open and restored it when the menu closes.
- Limited rendered menu options to a terminal-derived visible window centered around the selected item.
- Added overflow handling via ScrollView with dynamic width and scrollbar when the option list exceeds available rows.
2026-06-15 00:30:28 +02:00
can1357 5959bb0ad3 test(mnemopi): disabled embeddings in mnemopi tests
- Added beforeEach and afterEach hooks in mnemopi tests to set and clear MNEMOPI_NO_EMBEDDINGS so embeddings are skipped during those runs.
- Updated the bun-install cache script to archive only node_modules paths that exist as directories.
2026-06-15 00:29:24 +02:00
can1357 0d29c349ad feat(coding-agent): normalized generated titles to title case
- Applied title-casing to `normalizeGeneratedTitle` outputs using a new internal helper.
- Adjusted tiny text and title generator tests to assert the new title-cased results.
2026-06-15 00:28:08 +02:00
can1357 5a910863c3 feat(coding-agent): added hidden title role for prioritized title model selection
- Added a new built-in `title` model role with `hidden` metadata and updated role definitions and schema.
- Updated title generation to resolve models in `title`, `commit`, then `smol` order and added test coverage for that precedence.
- Filtered hidden roles from selector badges and documented the new built-in role in model/settings docs.
2026-06-15 00:23:29 +02:00
can1357 c7564f4e57 feat(coding-agent/prompts): strengthened benchmark prompt for exhaustive join-cost analysis
- Updated the default `omp bench` prompt text to emphasize full-spectrum reasoning before answering.
- Required explicit enumeration of all four-table join orders with cost comparisons across nested-loop and hash joins plus index-scan versus full-scan tradeoffs.
- Expanded the changelog rationale to document sustained deliberation and exhaustive costing to avoid short-circuit benchmark responses.
2026-06-15 00:19:23 +02:00