- Replaced Python execution with a local `python -u runner.py` subprocess and NDJSON stdin/stdout framing.
- Removed shared-gateway architecture, including coordinator lifecycle APIs, `useSharedGateway` wiring, and `jupyter` CLI/actions.
- Simplified setup checks to a plain Python 3 availability probe and removed automatic dependency-install fallbacks.
- Updated kernel cancellation and display processing to use status frames, SIGINT/SIGTERM escalation, and normalized output coercion.
- Added `python-runner` integration and display tests while deleting legacy websocket and kernel lifecycle test suites.
- Added a stripTypeScript pass that heuristically detects TypeScript-like syntax and transpiles it with Bun's ts loader before rewriting.
- Integrated the new pass into wrapCode so import and lexical rewrites operate on transpiled input.
- Added an executeJs test that verifies interfaces, type annotations, and type assertions execute to the expected numeric result.
- Rewrote static import lowering to emit `__omp_import__` calls instead of direct `import(...)` so rewritten code routes through worker context helpers.
- Added a `__omp_import__` runtime helper in `WorkerCore` that resolves specifiers against the session cwd via `Bun.resolveSync` while passing through URL-like modules unchanged.
- Updated static import rewrite tests to expect the new helper-based `__omp_import__` form, including import attribute cases.
- Fixed query tokenization to split on non-alphanumeric runs, aligning with FTS5 unicode61 indexer so punctuation-delimited terms like `git-commit` match correctly.
- Added LIKE-based substring fallback so infix queries FTS5 prefix matching cannot reach (e.g. `mit` matching `commit`) still return results.
- Merged FTS and substring results with deduplication, prioritizing FTS matches before substring-only matches up to the requested limit.
- Added new frustration and revised behavior metrics across stats types, parser mappings, and UI charts.
- Reworked session sync to fan out parsing across a capped worker pool with SyncOptions progress callbacks.
- Added worker-based parse messaging and throttled TTY progress rendering in the stats sync command.
- Updated behavior scoring to strip structured content, ignore noisy prompts, and fix profanity boundary regressions.
- Expanded user message schema and migrations, then repaired assistant model/provider links during sync backfill.
- Updated worker-import guidance in AGENTS.md and recorded sync-progress/metrics updates in package changelogs.
- Added worker-backed JS runtime via Transport and WorkerCore, with queued runs, status/error output, and clean teardown.
- Refactored executeInVmContext to reuse worker sessions, route pending runs by id, and fallback inline on spawn failure.
- Added rewrite helpers to convert top-level imports and demote top-level const/let/class declarations for persistence.
- Handled aborts by canceling in-flight tool calls, hard-killing worker sessions, and dropping JS timeout enforcement.
- Documented why the tab worker entry must be imported with Bun's file attribute despite tsgo limitations.
- Added a @ts-expect-error on the tabWorkerEntryUrl import to suppress tsgo TS1192/TS5097 errors.
External plugins, extensions, and downstream wrappers (notably the upstream
`@mariozechner/pi-coding-agent` AgentSession routed through the legacy-pi-compat
shim) call `modelRegistry.hasConfiguredAuth(model)` before launching a subagent
to short-circuit when no API key is configured. Our `ModelRegistry` did not
expose that method, so the direct agent-launch path threw
`this._modelRegistry.hasConfiguredAuth is not a function` and exited with 0
tokens, 0 tool uses, ~100ms runtime — well before any model conversation began.
The `task` tool path bypassed the preflight and worked, masking the missing
API.
Add a thin `hasConfiguredAuth(model)` wrapper that returns true for keyless
providers and providers with stored auth, matching upstream semantics. Add a
focused regression test asserting the method exists and distinguishes
configured vs. unconfigured providers.
Fixes#993.
The Worker spawn in spawnTabWorker used `new Worker(new URL(...).href, ...)`
through a local variable, which Bun's --compile static analysis does not
recognize. As a result, tab-worker-entry.ts was never embedded in single-file
binaries (v14.5.13+), and the worker thread failed to load its entry at
/$bunfs/root/tab-worker-entry.ts, surfacing as the user-visible
"Timed out initializing browser tab worker".
Switch to a `with { type: "file" }` import of the entry module so the
bundler discovers and embeds it in both dev and compiled targets.
Regression test asserts `Bun.build` emits tab-worker-entry as an asset
alongside the tab-supervisor entry point — the same static-analysis pass
that powers `bun build --compile`.
- Added optional since/until/dateField parameters to issue, PR, commit, and repo search tools.
- Added parsing for relative and ISO date bounds and built inclusive/exclusive/range search qualifiers.
- Allowed issue/PR/commit/repo searches to proceed with only date ranges and no query string.
- Mapped tool-specific date fields (commits, repos) and rejected since/until for code search validation.
- Updated search tool docs and tests for date filter formats, mappings, and unsupported-code-search behavior.
- Added ownerId metadata to async jobs and to task/bash progress items from the session agent id.
- Extended async job registration and query methods with optional owner filters, and updated cancelAll to target matching owners.
- Updated session handoff and disposal so subagents inherit the parent manager, top-level sessions own it, and teardown cancels own jobs only.
- Added owner-aware async-job tests using hold/AbortSignal and scoped cancelAll assertions for running versus cancelled jobs.
- Passed the `irc.enabled` session setting into task prompt rendering so templates can branch for IRC mode.
- Updated orchestrator and subagent-task prompts with IRC-specific instruction paths for skip-all checks, coordination, and file-scoped assignments.
- Removed the JS and Python eval prelude `run` helpers, including their shell execution and timeout/cwd option handling.
- Updated the JS VM helper set to expose `Bun` and removed the deleted `run` entry from the prelude.
- Revised eval docs to drop `run` from the helper surface and note the new JS `Bun` global.
- Added parent-to-subagent artifact manager adoption so subagents reuse the parent `ArtifactManager` and write artifacts into a shared directory with shared IDs.
- Passed the shared artifact manager through tool/session context into subagent executor startup and exposed it via `SessionManager` and `ToolSession` for lookup.
- Updated kernel environment and artifact-resolution paths to prefer `PI_ARTIFACTS_DIR`, falling back to existing session-file-based behavior when absent.
- Added process-wide singleton instances for InternalUrlRouter, AsyncJobManager, and MCPManager.
- Changed internal URL protocols to resolve through registered sessions and scan all active roots/datasets for matches.
- Refactored agent, artifact, memory, rule, skill, jobs, and mcp handlers to use shared manager and rule/skill state.
- Removed per-session protocol/tool wiring and switched tests to initialize and reset global singleton state.
- Stored a failure counter during single-path edit execution and set isError on aggregate results when any entry edit failed.
- Set streaming-edit handling to always evaluate auto-generated-file checks, but only primed the file cache when edit.streamingAbort was enabled.
- Added helpers to stringify and truncate display() JSON values before including them in text responses.
- Updated eval execution to append formatted display output text alongside stdout and emit images as dedicated content blocks.
- Adjusted no-output messaging for image-only runs and removed detail-level image payload duplication when content already includes image blocks.
- Updated bash, job, and task prompts to state that background results are delivered automatically when complete.
- Removed guidance encouraging repeated `jobs://` polling and clarified `job` with `poll` should be used only when a task is blocking.
- Changed the bash tool confirmation message to recommend doing other work while waiting for background jobs and polling only if needed.
- Set `minimumReleaseAge` to 259200 in the root `bunfig.toml` install configuration.
- Applied the same `minimumReleaseAge` setting to `packages/coding-agent/bunfig.toml` to enforce a 3-day minimum dependency release age.
- Updated addMessageToChat in UI helpers and InteractiveModeContext to return rendered components instead of void.
- EventController now tracks IRC message components and removes them after a 10-second TTL, avoiding duplicate expiry scheduling per message signature.
- EventController dispose now clears all pending IRC expiry timers and tests were added for immediate render, TTL removal, duplicate suppression, and timer cleanup.
- Removed the shared date, workspace, and critical-response block from now-prompt.md.
- Added the same instructional block to project-prompt.md so the project prompt now carries those system constraints.
- Skipped writing compact conversation context files when IRC is enabled so subagents avoid using stale markdown snapshots.
- In runSubprocess, passed an undefined context file for IRC-enabled paths and kept context file prompting for non-IRC executions.
- Added edit streaming fallback data to the edit render context and used it when no finalized patch text was available.
- Implemented hashline fallback rendering that strips envelope syntax, sanitizes text, and truncates output to a fixed number of lines with a streaming indicator.
- Updated tool execution to populate the fallback preview from the active edit strategy and added a renderer test for hashline envelope input while the diff is not yet computable.
- Added PTY flags to ShellRunOptions and ShellExecuteOptions and defaulted pty to false when unset.
- Routed PTY-enabled shell runs to a dedicated PTY runner and executed commands via `sh -lc` in a PTY.
- Handled PTY output with a dedicated thread, Chunk/Done events, child PGID cancellation, and drain-timeout cleanup.
- Added Unix-only PTY assertions and non-Windows native coverage for `executeShell` with `pty: true` and `/dev/` output checks.
- Added `portable-pty = "0.9"` (and lockfile update) to enable PTY execution in pi-shell.
- Updated the orchestration prompt to require that each `task` instructs subagents to skip all verification and formatting commands.
- Clarified that the orchestrator should perform linting, tests, and formatting once per phase across all changed files.
Two-edge fix for a runtime circular-import TDZ that manifested as
`ReferenceError: Cannot access 'TaskTool' / 'SUBAGENT_WARNING_*' /
'MAX_OUTPUT_BYTES' before initialization.` whenever the executor module
graph and the task tool module graph were evaluated together (e.g.
`bun test executor-warnings.test.ts task-simple-mode.test.ts` in either
order, or the wider `task/ discovery/ task-simple-mode` combination).
The runtime cycle is
task/index.ts → ./executor → ../sdk → ./tools → ../task
closed by `tools/index.ts:285` eagerly dereferencing `TaskTool.create`
while the `task` module's body had not yet reached its `export class
TaskTool` declaration. The throw aborted `tools/index.ts`, which
propagated back through `sdk → executor`, leaving executor's body
suspended before its post-import `const`s (`SUBAGENT_WARNING_*`,
`MAX_OUTPUT_BYTES`) were initialized.
Two structural changes:
1. `tools/index.ts:285`: replace `task: TaskTool.create` with
`task: s => TaskTool.create(s)`. Defers the `TaskTool` binding
dereference to factory-call time, by which point the cycle has
fully unwound. Matches the lazy-factory shape every other
`BUILTIN_TOOLS` entry already uses.
2. `task/executor.ts:31`: split the `"../tools"` import. Source
`truncateTail` directly from its leaf module
`../session/streaming-output` (the barrel was just re-exporting
it). Keep `ContextFileEntry` as a type-only import — erased at
runtime, so no participation in the cycle.
Neither change touches tests, test runners, or removes the cycle in
source. They eliminate the eager dereferences that turned a benign
linker-level cycle into a TDZ at evaluation time.
Verified:
- `bun test executor-warnings.test.ts task-simple-mode.test.ts`
passes in both orderings (11/11).
- Wider `bun test packages/coding-agent/test/task/
packages/coding-agent/test/discovery/
packages/coding-agent/test/tools/task-simple-mode.test.ts` now
100/100 (was 14 fail / 1 error).
- `bun --cwd=packages/coding-agent run check` clean apart from the
pre-existing unrelated `anthropic.ts:1206 'stop_details'` error
from 4e0ca3c0e.
Co-Authored-By: omp <noreply@oh-my-pi.dev>
The HTML export feed, sidebar tree, and TUI session tree did not handle
the developer role, so plan content injected after /plan approval (and
any other developer messages) was hidden from /export and shown as a
bare [developer] label in /tree.
Renders developer messages in the main feed with a dimmed
.developer-message style, labels them in the sidebar tree, counts them
in header stats, and shows their content in the TUI tree selector so
search matches the body.
Closes#753.
Co-Authored-By: omp <noreply@oh-my-pi.dev>
- Added a <critical> instruction block to the coding-agent system prompt.
- Prohibited narration of token limits, budgets, effort estimates, and scope-inflation speculation during task handling.
The 30 second default for 'ask.timeout' silently auto-selects the
recommended option mid-deliberation, which surprises users who are
weighing options the agent flagged as having materially different
tradeoffs. The setting was meant to be opt-in: 0 already means
'wait indefinitely' and plan mode already forces the timer off.
Flip the default to 0 so a fresh install matches the documented
'wait until the user replies' behavior, and update the AskTool
prompt so the model expects unlimited reply time by default. Users
who liked the auto-select can still set a positive timeout from
the Interaction settings tab.
Add a regression test asserting the dialog timeout is not passed
to the underlying selector when 'ask.timeout' is unset.
Plugin manifests that declare a directory entry (e.g. pi-goal's
`"pi": { "extensions": [".pi/extensions/pi-goal"] }`) were
pushed through to the legacy module loader unchanged. `Bun.file()`
on a directory throws "Directories cannot be read like files",
so every such plugin failed to load.
`resolvePluginPaths` now routes each joined manifest entry through
`resolveManifestEntryFile`, which:
- returns the path as-is when it is a file,
- returns the directory's `index.{ts,js,mjs,cjs}` when it is a
directory containing one of those files,
- otherwise returns null (skip).
This mirrors the documented native auto-discovery behavior in
`resolveExtensionEntries` and the candidate list in
`extensibility/custom-commands/loader.ts`.
Closes#1001.
- Normalized tool discovery token parsing with Unicode decomposition, removing combining marks and splitting acronym and camel-case boundaries for better tokenization.
- Expanded token separators to treat any non-letter or non-digit character as a boundary during indexing.
- Added a BM25_DELTA term to the BM25 scoring calculation to adjust relevance scoring for matching terms.
- Updated `irc` tool availability logic to require both `irc` settings and concurrency support.
- Imported `MAIN_AGENT_ID` and suppressed IRC access for the main agent when async mode is disabled, preventing sync-mode peer messaging.