Commit Graph

5642 Commits

Author SHA1 Message Date
Can Bölük d62e7f4698 chore: update installation command in update-cli.ts 2026-05-17 11:23:02 +02:00
Bonobo 8a7f7d75c5 fix(coding-agent): correct install.sh fallback URL in omp update warning
The fallback reinstall hint printed when omp update can't verify the new
binary pointed at https://raw.githubusercontent.com/can1357/oh-my-pi/main/install.sh,
which returns 404. The installer actually lives at scripts/install.sh
(consistent with the README install instructions).
2026-05-17 05:54:08 +02:00
can1357 cbd37a26ec docs(robomp): updated references from pi-artifacts to pi:image/pi-base
- Replaced `oh-my-pi/artifacts:dev` image references with `oh-my-pi/pi:dev`.
- Updated `PI_ARTIFACTS_IMAGE` → `PI_BASE` in compose and script descriptions.
- Replaced `/work/pi/Dockerfile` artifact stage with `/Dockerfile` pi-runtime stages.
- Added `pi:image` and `pi:run` commands to development command reference.
2026-05-17 05:48:06 +02:00
can1357 407f9319d5 chore: bump version to 15.1.3 2026-05-17 05:45:51 +02:00
can1357 9155df2bf0 fix(coding-agent): scoped report_tool_issue enum to active built-in tools
- Built a dynamic enum from constructed built-in/hidden tools so MCP and extension tools are excluded from QA reports.
- Added allowlist guard to silently drop reports targeting non-built-in tools at runtime.
- Stripped `proxy_` prefix before allowlist check so passthrough-wrapped tools resolve correctly.
2026-05-17 05:45:25 +02:00
can1357 b976d4d300 refactor(docker): consolidated build into pi-base + pi-runtime stages
- Replaced the slim artifacts-only image with a full pi-base image (python + bun + rustup + natives + omp_rpc + omp shim).
- Moved robomp Dockerfile to repo root as Dockerfile.robomp, extending pi-base instead of copying from a scratch artifacts image.
- Renamed PI_ARTIFACTS_IMAGE to PI_BASE and updated all npm scripts and compose config accordingly.
- Split .dockerignore into per-Dockerfile shadows (Dockerfile.dockerignore, Dockerfile.robomp.dockerignore).
2026-05-17 05:44:47 +02:00
can1357 7b20915e20 refactor(coding-agent): replaced console.warn with logger.warn calls
- Migrated warning output from raw console.warn+chalk to the shared logger utility.
- Removed unused chalk import as a result.
2026-05-17 05:31:58 +02:00
can1357 f4b1cc084b fix: guarded terminal control sequences behind isTTY checks
- Skipped thinking-line writes and clears when stdout is not a TTY.
- Prevented terminal title (set/push/pop) from emitting OSC/xterm escape sequences to piped or non-interactive output.
- Suppressed all ProcessTerminal control writes when stdout isn't a TTY.
2026-05-17 05:29:56 +02:00
can1357 f945e5e382 refactor(coding-agent/modes): reorganized account section width sharing
- Refactored account header rendering to separate label truncation from reset suffixes and align suffix spacing.
- Introduced a shared section width calculation so provider groups reuse the same account column and bar width.
- Updated aggregate usage text to show free-percentage formatting and shortened account count labels.
2026-05-17 05:16:03 +02:00
can1357 7abac9f96e ci: split native job into linux and release-only platform jobs
- Extracted repeated build steps into a reusable `build-native` composite action.
- Split `native` into `native_linux` (runs on every PR) and `native_release` (tags only).
- Release jobs now always use same-run artifacts, removing cross-run artifact resolution logic.
2026-05-17 05:14:18 +02:00
can1357 1de85ee708 test(agent): added trace/context reset before otel test setup
- Reset global trace and context state before each test suite to prevent stale providers from leaking across test runs.
2026-05-17 05:10:56 +02:00
can1357 a951925814 fix(ai): corrected stream auth to refresh once and retry pre-start 401
- Updated auth refresh to return generation booleans and return false for missing, non-oauth, or null-rotation creds.
- Added stream auth retry logic by wrapping streamSimple and retrying once with a fresh key for pre-start 401 only.
- Added changelog note on streaming auth retries and coding-agent onAuthError flow to refresh stale credentials.
- Added snapshot and stream auth tests for headers/no-store, 304 transitions, long-poll wakes, and retry limits.
2026-05-17 05:02:16 +02:00
can1357 6db7d6af92 feat(ai): added auth-broker snapshot contract with generation checks
- Added generation-aware snapshot contracts with generation, serverNowMs, refresher, and rotatesInMs fields.
- Reworked /v1/snapshot serving and client fetching for If-None-Match long-poll with 304/200 status handling.
- Added status checks in remote-store and SDK/CLI snapshot paths, applying updates only when fetch returns 200.
- Added StreamOptions.onAuthError and stream one-shot 401 retry dispatch using refreshed credentials.
2026-05-17 04:54:30 +02:00
can1357 c8f1e4a0b6 refactor(coding-agent): replaced bracket-wrapped bars with smooth sub-cell rendering
- Switched usage bar fill to floor+partial-block characters (▓, ▒) for finer granularity.
- Removed surrounding `[` / `]` bracket characters from bar output and adjusted column width arithmetic accordingly.
- Replaced dot-filled unknown-state bar brackets with a plain dot run.
2026-05-17 04:35:56 +02:00
can1357 75f34d1815 feat(utils): added configurable logger transport switching for headless services
- Added a new `setTransports` logger API to swap console and file winston transports at runtime.
- Refactored logger transport creation to lazily build rotating file logs via a shared directory helper.
- Updated auth-broker serve startup/shutdown to use structured logger output and switch to console-only logs for its headless runtime.
2026-05-17 04:19:38 +02:00
can1357 ec20364322 chore: flatten robomp 2026-05-17 04:10:50 +02:00
can1357 a93ab48a6a test(ai): fixed lint warning and vi.fn parameter inference
pi-native-client: dropped the ${baseUrl} placeholder from an it() name; biome's noTemplateCurlyInString warned because the literal isn't a template string. Replaced with <baseUrl> which keeps the descriptive intent without the false positive.

claude-usage-retry: typed the vi.fn callback as (delayMs, signal?) so tsgo can infer Parameters<T> as a 2-tuple. Without param types, T narrows to () => void and retryWait.mock.calls[0]?.[0] errored as 'tuple of length 0 has no element at index 0'.
2026-05-17 04:09:08 +02:00
can1357 584b34dd6d chore(bunfig): pruned robomp clones and worktrees from bun test discovery
bun test scans the cwd recursively and ignores .gitignore (only node_modules is excluded). A root-level `bun test` was walking into python/robomp/data/workspaces/ — full repo clones from the parallel-agent system — and exploding on stale @sinclair/typebox imports. Added [test] pathIgnorePatterns to prune python/robomp/data, .wt, .worktrees, and node_modules so root-level discovery stays inside packages.
2026-05-17 04:09:01 +02:00
can1357 90b134ca4c test: replaced real timers and sleeps with deterministic test hooks
- Added `providerRetryWait` and `retryWait` hooks to stream/usage options so tests bypass real scheduler delays.
- Parameterized GitHub Copilot poll intervals and Copilot model retry base delay for fast test execution.
- Replaced `Bun.sleep`/`setTimeout` polling loops with `AbortSignal` event listeners in agent session tests.
- Consolidated auth-gateway E2E helpers into a shared `test/helpers` module, eliminating duplicated `checkGatewayAvailable` implementations.
- Migrated credential-disabled tests from SQLite-backed stores to an in-memory store, removing temp-dir lifecycle overhead.
2026-05-17 04:02:09 +02:00
can1357 6d7c4008e5 feat(emoji): added emoticon expansion and inline replace
- Added a hand-maintained EMOTICONS table mapping western text emoticons (`:)`, `:-D`, `
2026-05-17 03:57:20 +02:00
can1357 2155b8e020 perf: replaced WeakMap caches with symbol-keyed properties
- Migrated per-object caches (chat/tool starts, model fingerprints, validation contexts, provider indexes, render IDs) from WeakMap to Symbol-keyed properties on the objects themselves.
- Rewrote SSE debug tee as a single-pass inline parser, eliminating the body.tee() + readSseEvents re-parse pipeline.
- Refactored MockModel from a factory function + external WeakMap state into a self-contained class.
- Added FIFO memoization caches for heuristic candidate expansion and namespace suffix lookups.
2026-05-17 03:47:45 +02:00
can1357 5523582735 test(coding-agent): minor fixes 2026-05-17 03:12:36 +02:00
can1357 cb05764eac feat(ai): added pi-native auth-gateway transport
- Added POST /v1/pi/stream endpoint that accepts canonical Context directly, skipping wire-format translation layers.
- Added client-side streamPiNative dispatch activated via Model.transport = "pi-native".
- Propagated transport field through model registry, provider overrides, and models.yml schema.
- Refactored deriveSessionId to accept explicit arguments instead of ParsedFormatRequest.
2026-05-17 03:05:57 +02:00
can1357 dc3d39df9e perf: optimized SSE debug cloning and model alias resolution
- Eliminated double clone of `raw` per SSE event by removing `toRawSseEvent` and relying on the single clone in `notifyRawSseEvent`.
- Extracted regex patterns as module-level constants to avoid recompilation on each call.
- Replaced sort-based model alias selection with a single-pass linear scan, reducing allocations.
2026-05-17 02:45:12 +02:00
can1357 4e24a79002 feat(ai): added AWS auth and Bedrock stream decoding with SigV4
- Removed deprecated AWS/Google client and proxy dependencies from root and AI package manifests.
- Added AWS credential chaining, SigV4 signing, and Bedrock stream decoding with region fallback and CRC checks.
- Added local Google type mirrors and migrated providers to request plans with SSE fetch and token-based auth.
- Updated AI changelog with auth/stream fixes, and added fetch-stub and SigV4/event-stream tests.
2026-05-17 02:36:43 +02:00
can1357 42d86254df feat(coding-agent): added emoji shortcode autocomplete and inline replace
- Added bucketed emoji dataset with prefix-indexed lookup for O(log n) suggestions.
- Implemented `:name:` inline replace that fires on closing colon without popup.
- Wired emoji suggestions and completions into PromptActionAutocompleteProvider.
- Extended AutocompleteProvider interface with trySyncInlineReplace hook.
2026-05-17 02:32:12 +02:00
can1357 69aeb94621 fix(grievances): replaced hostname with platform/arch 2026-05-17 02:16:23 +02:00
can1357 c049613cab docs: added auth-broker, schema-normalize, install-id, and eval docs
- Added auth-broker-gateway.md covering remote OAuth vault, gateway forward-proxy, usage cache layering, and env surface.
- Added ai-schema-normalize.md documenting the unified tool-schema normalization pipeline and strict-mode edge cases.
- Added install-id.md describing the per-install UUID persistence and consumer contract.
- Rewrote eval.md to reflect structured JSON cells schema, removing the legacy `*** Cell` parser and Lark grammar.
- Updated environment-variables.md, models.md, sdk.md, secrets.md, lsp.md, session-tree-plan.md, ttsr-injection-lifecycle.md, and natives docs to match code changes.
2026-05-17 02:15:55 +02:00
can1357 00bb61b054 feat(stats): added time-range-aware bucketing to model series charts
- Passed `bucketMs` to `getModelTimeSeries` and `getModelPerformanceSeries` so SQL bucketing matches the selected range.
- Added `range-meta.ts` to centralise bucket sizes, counts, tick formats, and labels per time range.
- Updated `ChartsContainer` and `ModelsTable` to use range-aware x-axis formatting and trend labels.
2026-05-17 02:15:37 +02:00
can1357 0bb385f8ab feat(grievances): added consent gate & push
- Added `dev.autoqa.consent` setting and single-flight popup handler wired through `InteractiveMode`.
- Added `flushGrievances` to batch-POST unpushed rows to `dev.autoqaPush.endpoint` with cooldown and single-flight deduplication.
- Added `omp grievances push` subcommand with TTY progress bar for manual draining.
- Migrated shared DB logic to `openAutoQaDb` (with `pushed` column migration) exported from `report-tool-issue`.
2026-05-17 01:47:24 +02:00
can1357 3061c47a32 chore: added robomp workspace, ignored fallow deps, cleaned up exports
- Added `python/robomp` as a workspace package alongside its nested `web` sub-package.
- Added `ignoreDependencies` in `.fallowrc.jsonc` for deps used via bin or in nested workspaces.
- Removed unused `clearTriggerStatus` export and unexported `tick` and `ByModelToggle`.
2026-05-17 01:44:13 +02:00
can1357 6120adbde2 perf(coding-agent): added PI_TIMING flag to log prompt durations
- Wrapped initial and subsequent print-mode prompts with `logger.time` for timing instrumentation.
- Printed collected timings after session run when `PI_TIMING` env var is set.
2026-05-17 01:33:16 +02:00
can1357 35e0ffdec2 perf(ai): added static fingerprint cache to skip redundant model merges
- Added `static_fingerprint` column (schema v3) so cold-start reads can bypass `mergeDynamicModels` when the static catalog is unchanged.
- Added `fingerprintStatic` with WeakMap memoization to avoid repeated JSON+hash work per process.
- Added fast paths in `mergeModelSources` and `mergeDynamicModels` for empty-source cases.
- Lazy-loaded cursor discovery module and removed unused provider options (Bedrock, MiniMax).
2026-05-17 01:32:53 +02:00
can1357 66259615de perf(coding-agent): added preconnect and conditional LSP warmup
- Added fire-and-forget `preconnectModelHost` to prime DNS/TCP/TLS/H2 before the first API call, saving 100–300ms on transcontinental connections.
- Skipped LSP warmup for non-UI (print/script) sessions to avoid CPU contention with LLM stream consumers.
2026-05-17 01:31:53 +02:00
can1357 cd981ae0e6 feat(utils): install ID generation 2026-05-17 01:31:16 +02:00
can1357 484fca9c01 feat: added auth-gateway usage cache with single-flight 15s ttl fallback
- Added AbortSignal propagation and timeout-race handling for broker health, usage, refresh, and snapshot calls.
- Added single-flight usage-report caching with 15s TTL, per-caller abort races, and null-on-fail fallback.
- Expanded provider schemas and parse/build logic for cache metadata, headers, stop controls, and image/file content.
- Hardened auth flows by rejecting refresh sentinels and using timing-safe bearer-token comparisons.
2026-05-17 01:10:25 +02:00
can1357 df1c1a6ba8 feat(auth): added auth-gateway forward-proxy and broker usage/migrate endpoints
- Added `omp auth-gateway serve/token/status` — a forward-proxy injecting broker credentials for OpenAI Chat, Anthropic Messages, and OpenAI Responses wire formats.
- Added `GET /v1/usage` to auth-broker and auth-gateway; usage cache switched to 5-min per-credential TTL with jitter and last-good fallback on failure.
- Added `AuthStorage.setConfigApiKey/removeConfigApiKey/clearConfigApiKeys` so `models.yml` `apiKey` beats OAuth tokens without overriding `--api-key`.
- Added `omp auth-broker migrate --from-local` for idempotent upload of local SQLite/env credentials to the broker.
2026-05-16 23:25:10 +02:00
can1357 d1877baf66 feat(python/robomp): migrated robomp into monorepo as python/robomp/
- Subtree-merged github.com/can1357/roboomp with full history
- Wired python/robomp/web as a Bun workspace; migrated SolidJS deps to root catalog
- Removed nested bun.lock/bunfig.toml/biome.json; root configs now own them
- Replaced scripts/with-pi-root.sh; default PI_ROOT to ../.. (the monorepo)
- Added root recipes: test:py, lint:py, fix:py (Python opt-in, not folded into bun test)
- Updated .gitignore/.dockerignore for robomp runtime state (data/, cache/, web dist, static bundle)
- Updated README/AGENTS/.env.example to drop ROBOMP_PI_* auto-clone knobs
2026-05-16 21:16:54 +02:00
can1357 2c773a12a4 Add 'python/robomp/' from commit '553fd1cfcf59e4c501c54fc81bc083ffd2ca007b'
git-subtree-dir: python/robomp
git-subtree-mainline: 4f6e70f779
git-subtree-split: 553fd1cfcf
2026-05-16 21:00:42 +02:00
can1357 553fd1cfcf test: handed tmp_path and staged workspaces to slot uid in Linux root tests 2026-05-16 21:00:42 +02:00
can1357 4f6e70f779 fix(coding-agent): auto-name approved plan sessions 2026-05-16 20:53:11 +02:00
can1357 c3f5a60c22 feat(auth): added auth-broker for remote credential vault
- Added `AuthBrokerClient`, `RemoteAuthCredentialStore`, `AuthBrokerRefresher`, and `startAuthBroker` server in `packages/ai/src/auth-broker`.
- Renamed `AuthCredentialStore` class to `SqliteAuthCredentialStore`; extracted `AuthCredentialStore` as a persistence interface.
- Added `exportSnapshot`, `forceRefreshCredentialById`, `disableCredentialById`, and `upsertCredential` to `AuthStorage` for broker wire protocol.
- Added `omp auth-broker` CLI subcommand (serve, token, login, logout, import, status) and `discoverAuthStorage` broker-mode path keyed on `OMP_AUTH_BROKER_URL`.
2026-05-16 20:44:07 +02:00
can1357 7f544fc669 feat(natives_cache): added content-addressed cache for pi-natives build artifacts
- Added NativesCache with hardlink-based populate and atomic capture under a shared root:omp setgid directory.
- Integrated cache populate into ensure_workspace and capture into post-task success path.
- Added periodic GC loop in WorkerPool with configurable interval and per-repo entry/byte caps.
- Provisioned /data/cache/pi-natives in entrypoint.sh and exposed five ROBOMP_NATIVES_CACHE_* settings.
2026-05-16 20:29:05 +02:00
can1357 7901cecf80 feat(coding-agent): added module cache busting for local imports in JS runtime
- Appended a unique nonce query param to local file imports so Bun treats each reload as a fresh module record.
- Restricted cache busting to relative/absolute path specifiers; bare packages and built-ins are left unchanged.
2026-05-16 20:27:45 +02:00
can1357 54a60a7702 fix(ai/schema): hoisted description to anyOf wrapper in strict-mode unions
- Extracted `description` from type-array and nullable branches so it lives on the wrapper, not duplicated onto each variant.
- Replaced inline enum-type inference with `inferStrictPrimitiveTypeFromEnumOrConst`, covering both `enum` and `const` in sanitize and enforce paths.
- Mixed-primitive enums and non-primitive consts now fall back to non-strict instead of producing a typeless schema that OpenAI rejects on the wire.
2026-05-16 20:22:39 +02:00
can1357 22848e89ff refactor(natives): removed sanitizeText from pi-natives, use JS impl
- Moved @oh-my-pi/pi-natives from devDependencies to dependencies in pi-utils.
- Deleted Rust sanitizeText implementation and its JS bindings/types.
- Updated sanitize benchmark to use pi-utils implementation as baseline.
2026-05-16 20:21:36 +02:00
can1357 7ea9e16408 feat(coding-agent): changed TTSR non-interrupt tool matches to fold into toolResult
- Non-interrupting tool-source TTSR matches now prepend a system-reminder to the matched tool's `toolResult` content instead of queuing a loop-wide deferred follow-up turn.
- Text/thinking source matches retain the previous deferred-injection behavior.
- Added deduplication so one rule attaches to exactly one sibling tool call per batch.
- Stale per-tool injections are cleared on abort/error before tools produce results.
2026-05-16 20:15:53 +02:00
can1357 39f34ada70 feat: added pure-JS sanitizeText
- Migrated sanitizeText from pi-natives to pi-utils as a pure-JS implementation, removing the native dependency across all call sites.
2026-05-16 20:12:26 +02:00
can1357 5c931ac135 refactor(ai/schema): merged strict-mode into normalize, removed strict-mode.ts
- Moved sanitizeSchemaForStrictMode, enforceStrictSchema, and tryEnforceStrictSchema into normalize.ts.
- Moved sanitizeSchemaForOpenAIResponses/rewriteOneOfToAnyOf into normalize.ts alongside other normalizers.
- Removed strict-mode.ts and its public re-export; adapt.ts now only exposes NO_STRICT and adaptSchemaForStrict.
- Dropped StringEnum helper from strict-mode.ts (already removed from public API).
2026-05-16 19:41:18 +02:00
can1357 84ec8fba49 feat(coding-agent/eval): implemented JSON cell-based eval tool inputs
- Removed the legacy `parseEvalInput` parser module and `eval.lark`, eliminating `*** Cell` stream parsing.
- Replaced eval tool arguments from single `input` strings to ordered `cells` arrays in tool calls and schema.
- Updated execution to resolve language explicitly, map `py` to `python`, and apply timeout/reset defaults.
- Removed backend sniffing and `ABORT_WARNING` suffix handling, then updated docs and tests to the new JSON cells format.
2026-05-16 19:33:44 +02:00