8000 [pull] main from can1357:main by pull[bot] · Pull Request #117 · ericrihm/oh-my-pi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
eaa7fd1
fix(windows): expand 8.3 short-name working dir and vault path to one…
CoderTCY Aug 7, 2026
3ff5738
fix(windows): unify cwd identity on short-name expansion and harden G…
CoderTCY Aug 7, 2026
7561f28
test(vault): narrow optional resolved source path
CoderTCY Aug 16, 2026
b8b1ae4
feat(coding-agent): support per-agent compaction thresholds
anatoli-tsinovoy Sep 24, 2026
f99877c
refactor(coding-agent): reuse numeric compaction thresholds per agent
anatoli-tsinovoy Sep 24, 2026
49b4057
docs(coding-agent): attribute per-agent compaction thresholds
anatoli-tsinovoy Sep 24, 2026
e5076a1
Merge remote-tracking branch 'upstream/main' into feat/agent-compacti…
anatoli-tsinovoy Sep 24, 2026
2e28f3d
docs(coding-agent): keep compaction entry under Unreleased
anatoli-tsinovoy Sep 24, 2026
8d7bb73
test(coding-agent): exercise subagent compaction decisions
anatoli-tsinovoy Sep 24, 2026
8600f44
fix(coding-agent): reject malformed agent compaction thresholds
anatoli-tsinovoy Sep 24, 2026
cea3caf
fix(edit): recorded edit response line provenance
roboomp Sep 24, 2026
edd63ad
feat(ai,coding-agent): support Anthropic fallback credit redemption o…
aliefe04 Sep 24, 2026
ecfe8d4
Merge remote-tracking branch 'origin/main' into pr13107
Sep 24, 2026
cbea59a
fix(coding-agent): scalar per-agent compaction thresholds scoped to t…
Sep 24, 2026
6597052
fix(shell): normalized Windows builtin paths
roboomp Sep 24, 2026
03666bb
fix(advisor): give edit diffs their own 300-line budget
Sep 24, 2026
d6a2379
fix(advisor): pin the mid-size diff case; describe the diff line cap …
Sep 24, 2026
3f42ca9
fix(ai,coding-agent): address fallback credit review feedback
aliefe04 Sep 24, 2026
59c5ac3
Merge main into fix/windows-83-realpath-consistency
CoderTCY Sep 24, 2026
c8ffed8
docs(changelog): credit #13184
Sep 24, 2026
db211e5
Fix tests
CoderTCY Sep 24, 2026
8dfd37d
fix(auth): log and announce automatic credential disables
alphastorm Sep 24, 2026
087f50f
docs(changelog): record automatic credential disable announcements
alphastorm Sep 24, 2026
4997783
fix(shell): kept verbatim Windows paths native in find/fd display
Sep 24, 2026
95e1e92
fix(edit): carried unshifted read provenance across edit responses
Sep 24, 2026
c7418d0
test(edit): satisfied clippy format_collect in provenance test
Sep 24, 2026
843a360
fix(windows): tighten 8.3 path identity fix for merge
Sep 24, 2026
9826dff
Merge pull request #13167 from can1357/farm/31391aab/fix-windows-buil…
H4vC Sep 24, 2026
1e50fa8
Merge pull request #7938 from CoderTCY/fix/windows-83-realpath-consis…
H4vC Sep 24, 2026
9f7cabb
Merge PR #13155: fix(edit): record edit response line provenance (@ro…
H4vC Sep 24, 2026
0fb8d5b
fix(ai,coding-agent): keep fallback credit prefix replayable and move…
Sep 24, 2026
e3707fb
docs(coding-agent): document which prompt inputs reach each session type
alphastorm Sep 24, 2026
8a2e999
Merge remote-tracking branch 'origin/main' into HEAD
Sep 24, 2026
e7ebd0a
Merge PR #13190: fix(auth): log and announce automatic credential dis…
H4vC Sep 24, 2026
377cb16 8000
Merge PR #13157: feat(ai,coding-agent): support Anthropic fallback cr…
H4vC Sep 24, 2026
c72f629
fix(mcp): list each mounted MCP tool once in the system prompt
alphastorm Sep 24, 2026
f962d1d
docs(changelog): record single MCP tool listing
alphastorm Sep 24, 2026
f6adda9
feat(mcp): allow opting out of server instructions
alphastorm Sep 24, 2026
237867d
docs(changelog): record the MCP instructions opt-out
alphastorm Sep 24, 2026
be623f3
fix(mcp): warn about invalid plugin MCP server options
alphastorm Sep 24, 2026
b112a21
fix(launch): route supervised service completions by session
serverinspector Sep 24, 2026
342fc63
fix(mcp): derive route summaries from the budgeted xd:// catalog
alphastorm Sep 24, 2026
d9e748a
fix(launch): retire completions when sessions change
serverinspector Sep 24, 2026
63370ea
Merge pull request #13107 from anatoli-tsinovoy/feat/agent-compaction…
H4vC Sep 24, 2026
ed34675
Merge pull request #13193 from alphastorm/contrib/docs-session-prompt…
H4vC Sep 24, 2026
bf45e5f
Merge PR #13184: fix(advisor): give edit diffs their own line cap in …
H4vC Sep 24, 2026
7a0455e
Merge origin/main into #13199
Sep 24, 2026
19e749f
fix(launch): keep session-change completions replayable on resume
Sep 24, 2026
62d6107
Merge PR #13199: fix(launch): route supervised service completions by…
Sep 24, 2026
54cbbc6
fix(mcp): tighten route read-before-use wording
Sep 24, 2026
4e83fcb
Merge remote-tracking branch 'origin/main' into pr-13195
Sep 24, 2026
98a8468
fix(find): kept unix display paths identical
can1357 Sep 24, 2026
67e78ce
docs(natives): noted windows fd/find path separator fix
can1357 Sep 24, 2026
06d66ae
test(walker): made cache test temp dirs unique per process
can1357 Sep 24, 2026
84045f1
feat(coding-agent): added detailed benchmark mode for multi-phase thr…
can1357 Sep 24, 2026
13226ae
feat(coding-agent): added cfg:// protocol for agent-controlled settin…
can1357 Sep 24, 2026
d9bc4fb
fix(config): treated a valueless config key as unset
roboomp Sep 24, 2026
6962d5c
feat: implemented centralized settings registry and internal URL routing
can1357 Sep 24, 2026
1459332
feat(rpc): added prompt results, settle signals, and headless host mode
can1357 Sep 24, 2026
0771b85
feat(ai): added vercel ai gateway app attribution headers
can1357 Sep 24, 2026
134bcf2
feat(ida): added IDA Pro integration via idalib workers
can1357 Sep 24, 2026
6ee309d
feat: added universal Mach-O slice support to IDA tool integration
can1357 Sep 24, 2026
da3c8f1
fix(mcp): accept shared server fields in the published schema
Sep 24, 2026
2f01215
Merge remote-tracking branch 'origin/main' into pr-13195
Sep 24, 2026
65e9679
Merge PR #13196: feat(mcp): allow opting out of server instructions p…
Sep 24, 2026
a083772
Merge PR #13195: fix(mcp): list each mounted MCP tool once in the sys…
H4vC Sep 24, 2026
2f8b7ec
feat(pi-builtins): implemented thread-level process listing via ps -M
can1357 Sep 24, 2026
0e383de
refactor(coding-agent/config): restructured config for slot memoization
can1357 Sep 24, 2026
ba56afb
fix(tools): added gating to prevent PTY deadlock in Bun.spawn
can1357 Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion .omp/tools/tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,22 @@ function unescapeBytes(text: string): Buffer {
return Buffer.from(out);
}

/**
* Wraps `command` so the PTY child blocks until `gate` exists, then execs the
* real command in place (same pid, still the session leader).
*
* Bun (1.4.2, macOS) arms its exit watch inside `Bun.spawn`; a child already
* exiting by then makes it fall back to a blocking `wait4` on the JS thread. A
* PTY session leader cannot finish exiting until its unread output drains, and
* the only reader is that same blocked thread — so a fast command (`git grep`)
* deadlocked the whole agent. Creating `gate` only after `Bun.spawn` returns
* guarantees the watch is armed before the child can exit.
*/
function gated(gate: string, command: string[]): string[] {
const script = 'gate=$1; shift; while [ ! -e "$gate" ]; do sleep 0.01; done; exec "$@"';
return ["/bin/sh", "-c", script, "sh", gate, ...command];
}

// ─── Tool ────────────────────────────────────────────────────────────────────

const factory = (omp: ToolHost) => {
Expand All @@ -968,14 +984,15 @@ const factory = (omp: ToolHost) => {
const cols = params.cols ?? 100;
const dir = mkdtempSync(join(tmpdir(), `omp-tui-${name}-`));
const sockPath = join(dir, "debug.sock");
const gatePath = join(dir, "spawn.gate");
const screen = await Screen.create(cols, rows);
// The PTY data callback closes over `session`; Bun.spawn returns
// synchronously and the callback fires on the event loop, so the
// binding is assigned before the first chunk can arrive.
let session: Session;
let proc: Child;
try {
const spawned = Bun.spawn(command, {
const spawned = Bun.spawn(gated(gatePath, command), {
cwd: omp.cwd,
env: {
...process.env,
Expand All @@ -993,6 +1010,7 @@ const factory = (omp: ToolHost) => {
});
const terminal = spawned.terminal;
if (!terminal) throw new Error("Bun.spawn did not create a PTY");
writeFileSync(gatePath, "");
proc = {
pid: spawned.pid,
exited: spawned.exited,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ await session.prompt("list .ts files");

`omp --mode rpc`

For non-Node embedders, or when you want process isolation. NDJSON commands in, response and event frames out. `--mode rpc-ui` adds tool cards, selectors, and dialogs as `extension_ui_request` frames the host must answer.
For non-Node embedders, or when you want process isolation. NDJSON commands in, response and event frames out; each prompt ends with its own `prompt_result`. `--mode rpc-ui` adds tool cards, selectors, and dialogs as `extension_ui_request` frames the host must answer; `--no-ui` keeps even extension dialogs off the wire for hosts with no UI.

```
$ omp --mode rpc --no-session
Expand Down
9 changes: 3 additions & 6 deletions crates/pi-builtins/src/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,7 @@ fn search(
} else {
cli.max_results
};
let separator = cli
.path_separator
.clone()
.unwrap_or_else(|| std::path::MAIN_SEPARATOR.to_string());
let separator = cli.path_separator.clone().unwrap_or_else(|| "/".to_string());
let config = SearchConfig {
base_dir,
absolute_roots,
Expand Down Expand Up @@ -1498,11 +1495,11 @@ fn root_was_absolute(path: &Path, roots: &[PathBuf]) -> bool {
}

fn normalize_display_path(path: &Path) -> String {
path.to_string_lossy().replace('\\', "/")
pi_walker::normalize_path(path).into_owned()
}

fn normalize_os_str(value: &OsStr) -> String {
value.to_string_lossy().replace('\\', "/")
normalize_display_path(Path::new(value))
}

fn format_path(template: &str, path: &Path, display: &str) -> String {
Expand Down
34 changes: 32 additions & 2 deletions crates/pi-builtins/src/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,25 @@ pub mod matchers {
display: Option<PathBuf>,
}

/// Forward-slash spelling of a Windows display path, or `None` when the path
/// already displays as-is (non-Windows, no backslashes, verbatim prefix, or
/// non-Unicode names that must stay native).
fn forward_slash_display(path: &Path) -> Option<PathBuf> {
if !cfg!(windows) || path.to_str().is_none() {
return None;
}
match pi_walker::normalize_path(path) {
std::borrow::Cow::Owned(text) => Some(PathBuf::from(text)),
std::borrow::Cow::Borrowed(_) => None,
}
}

impl WalkEntry {
/// Create a new WalkEntry for a specific file.
pub fn new(path: impl Into<PathBuf>, depth: usize, follow: Follow) -> Self {
Self { path: path.into(), depth, follow, meta: OnceCell::new(), display: None }
let path = path.into();
let display = forward_slash_display(&path);
Self { path, depth, follow, meta: OnceCell::new(), display }
}

/// Get the path to this entry.
Expand All @@ -379,7 +394,7 @@ pub mod matchers {
Ok(rel) => operand.join(rel),
Err(_) => return,
};
self.display = Some(display);
self.display = Some(forward_slash_display(&display).unwrap_or(display));
}

/// Get the name of this entry.
Expand Down Expand Up @@ -5415,4 +5430,19 @@ mod tests {
let matches: Vec<PathBuf> = capture.out().lines().map(PathBuf::from).collect();
assert_eq!(matches, vec![root.join("a.txt"), root.join("b.md"), root.join("c.rs")]);
}

/// `-exec {}` receives the display path, so on Unix it must keep non-UTF-8
/// name bytes instead of replacing them with U+FFFD.
#[cfg(unix)]
#[test]
fn display_root_keeps_non_utf8_name_bytes() {
use std::{ffi::OsStr, os::unix::ffi::OsStrExt, path::Path};

use super::matchers::{Follow, WalkEntry};

let file = Path::new(OsStr::from_bytes(b"/r/bad\xffname"));
let mut entry = WalkEntry::new(file, 1, Follow::Never);
entry.set_display_root(Path::new("."), Path::new("/r"));
assert_eq!(entry.display_path().as_os_str().as_bytes(), b"./bad\xffname");
}
}
Loading
Loading
0