Commit Graph

5240 Commits

Author SHA1 Message Date
github-actions[bot] 7641fc52a1 @leecoder has signed the CLA in code-yeongyu/oh-my-openagent#3604 2026-04-23 23:47:42 +00:00
github-actions[bot] 448fb0fa9d @uf-hy has signed the CLA in code-yeongyu/oh-my-openagent#3603 2026-04-23 23:36:35 +00:00
github-actions[bot] bbcbfe5d7a @fede-ciliberti has signed the CLA in code-yeongyu/oh-my-openagent#3581 2026-04-23 16:33:54 +00:00
github-actions[bot] f66bc8a840 @samuele-ruffino96 has signed the CLA in code-yeongyu/oh-my-openagent#3595 2026-04-23 13:59:02 +00:00
github-actions[bot] fd6e34a804 @ParkSnoopy has signed the CLA in code-yeongyu/oh-my-openagent#3591 2026-04-23 10:06:58 +00:00
YeonGyu-Kim a941774e99 chore(cleanup): remove obsolete team-mode workspace artifacts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 12:56:20 +09:00
YeonGyu-Kim 52ee201611 chore(gitignore): add .dori-sync/ directory
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 12:56:12 +09:00
YeonGyu-Kim 1ecf5ab8f2 refactor(ast-grep): inline tool descriptions and simplify pattern hints
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 12:56:10 +09:00
YeonGyu-Kim 70e18e95c4 refactor(agents): simplify librarian code search guidance
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 12:56:07 +09:00
YeonGyu-Kim acd867ec9d refactor(agents): simplify explore tool strategy guidance
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 12:56:04 +09:00
YeonGyu-Kim f0dd0464d8 refactor(librarian): teach proper ast_grep_search discipline
ast_grep_search was mentioned exactly once in the librarian prompt
(bundled as 'grep/ast_grep_search for function/class') with no syntax
guidance. When the librarian cloned a repo and tried to match code
shape, it fell into the same regex-in-AST trap as the main agent.

Two targeted edits, no rewrite of the surrounding request-classification
flow:

- Phase 1 TYPE B 'Find the implementation' now separates ast_grep_search
  (code shape) from grep (text/literals) and reminds the LLM that AST
  patterns use $VAR and $$$ and are not regex.
- TOOL REFERENCE adds a dedicated ast_grep_search row with valid
  examples and the explicit regex anti-pattern list, alongside tightened
  guidance for grep_app and grep so the LLM picks the right tool for
  cross-repo vs single-repo, text vs shape.
2026-04-22 12:29:00 +09:00
YeonGyu-Kim 5ef2a3fa7c refactor(explore): make ast_grep_search discipline the core of Tool Strategy
The previous Tool Strategy was a neutral 5-bullet list that treated
ast_grep_search and grep as equals. LLMs read 'structural patterns
(function shapes, class structures)' and reach for ast_grep_search
first, then call it with regex ('foo|bar', '.*', '\\w') and silently
get zero results.

Rewrite so the default is clear - grep first, ast_grep_search only for
true AST shape matching - and enumerate the regex anti-patterns with
their corrective switches. Add an explicit rule: if ast_grep_search
returns zero matches and the printed hint says the pattern is regex-
shaped, switch to grep instead of retrying with another regex variant.

Preserves the existing absolute-path requirement, <results> block
format, and read-only / no-emoji constraints.
2026-04-22 12:27:41 +09:00
YeonGyu-Kim 2f4b1c3158 feat(ast-grep): rewrite tool descriptions to prevent regex-style misuse
The previous description (41 words) told the LLM to write 'complete AST
nodes' but did not explain that regex syntax is the #1 failure mode. It
also shipped a bug: the Python example 'def $FUNC($$$):' had a trailing
colon that the hint system actively flags as wrong.

Extract descriptions into tool-descriptions.ts and rewrite:
- Open with 'This is NOT regex' so the constraint is unmissable
- List the four regex patterns that do not work (|, .*, \\w, [a-z])
  with the corrective action for each
- Tell the LLM to switch to grep when the pattern is text-shaped
- Fix the Python example (no trailing colon) and add Go and Rust rows
  since the failing reports came from Go codebases
- Shorten the pattern-param description with the same anti-regex list

Also harden the LSP reference for the new test files using the
bun-types triple-slash directive already used elsewhere.
2026-04-22 12:26:24 +09:00
YeonGyu-Kim 95ccbbfe8c feat(ast-grep): detect regex-style pattern misuse before returning empty results
LLMs frequently call ast_grep_search with regex-style patterns like
'func.*build|BuildMode|projectReferences' instead of AST patterns. The
search silently returns zero matches with no useful feedback, so the
model retries with a different regex-shaped pattern and loops.

Extract hint generation into pattern-hints.ts and add detectors for the
four dominant misuse modes:
- regex escapes (\\w, \\d, \\s, \\b)
- character-class ranges ([a-z], [0-9])
- regex wildcards (.* .+) with no meta-vars
- pure alternation (foo|bar|baz with no structural syntax)

Heuristics are designed to be safe on valid AST patterns: bitwise OR
'$A | $B' and Rust closures '|x| x + 1' are not flagged. Language-
specific shape hints (trailing-colon Python, body-less JS/TS/Go/Rust
functions) are preserved and extended to Go and Rust.
2026-04-22 12:23:51 +09:00
github-actions[bot] e0bcf3e2f9 @aschina has signed the CLA in code-yeongyu/oh-my-openagent#3560 2026-04-21 10:06:24 +00:00
YeonGyu-Kim 93dc103092 Merge pull request #3552 from code-yeongyu/feature/explore-librarian-gpt-5-4-mini-fast-primary
feat(agents): route explore + librarian primary to openai/gpt-5.4-mini-fast
2026-04-21 14:29:13 +09:00
YeonGyu-Kim 993fe20a12 docs(orchestration): reindent explore/librarian mermaid nodes
Align with sibling Junior/Oracle/Frontend nodes in the Worker Layer subgraph.
2026-04-21 14:23:39 +09:00
YeonGyu-Kim 3a6bd93252 fix(cli): keep mini-fast primary in openai-only install catalog
OPENAI_ONLY_AGENT_OVERRIDES was rewriting explore and librarian back to
gpt-5.4 medium for OpenAI-only installs. Match the runtime primary so the
install default stays on gpt-5.4-mini-fast.
2026-04-21 14:23:39 +09:00
YeonGyu-Kim 6914b44957 docs(configuration): restore vercel aliases in explore/librarian rows
Align documented fallback provider lists with the runtime chain in
model-requirements.ts so operators see the same providers that resolve at runtime.
2026-04-21 13:38:23 +09:00
YeonGyu-Kim fe44363bf8 fix(model-capabilities): drop pdf modality from gpt-5.4-mini-fast
OpenAI's mini-fast variant only accepts text and image input; advertising
pdf risks unsupported requests hitting runtime errors.
2026-04-21 13:38:23 +09:00
YeonGyu-Kim 02e4de865e docs(model): sync explorer and librarian guidance
Document the new primary chain and install-time fallback behavior for explorer and librarian.\nKeep the user-facing guidance aligned with the runtime and CLI model selection.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 13:30:11 +09:00
YeonGyu-Kim ceadf4bdbc fix(cli): prefer mini-fast for install fallback
Default the install-time fallback chain to gpt-5.4-mini-fast for librarian and explore when OpenAI is available.\nKeep the snapshot and catalog tests aligned with the new resolution path.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 13:30:02 +09:00
YeonGyu-Kim d2e5ddd73d fix(model-requirements): route primary agents to mini-fast
Use gpt-5.4-mini-fast as the primary runtime model for librarian and explore.\nKeep the fallback chain intact so older providers still resolve.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 13:29:55 +09:00
YeonGyu-Kim 680dd161b4 fix(model-capabilities): bundle gpt-5.4-mini-fast caps
Keep the supplemental OpenAI model available when the bundled snapshot omits it.\nMerge its capabilities at runtime so downstream model resolution can use it.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 13:29:49 +09:00
YeonGyu-Kim 064dcc844e fix(delegate-task): remove deprecated sync continuation fallback
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:56:05 +09:00
YeonGyu-Kim a17ba1673e chore(delegate-task): remove unused metadata model export
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:51:19 +09:00
YeonGyu-Kim 54e48de7f8 refactor(delegate-task): extract background session registration helpers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:50:28 +09:00
YeonGyu-Kim 2585031f54 refactor(delegate-task): extract sync continuation resume context
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:48:58 +09:00
YeonGyu-Kim 4810d0f1bd fix(delegate-task): apply load_skills content to continuation prompts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:36:24 +09:00
YeonGyu-Kim d0a3cb3936 fix(delegate-task): align background-continuation title with args.description
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:33:45 +09:00
YeonGyu-Kim 83c8ffbe01 fix(delegate-task): include category in continuation task_metadata blocks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:33:05 +09:00
YeonGyu-Kim b5bc4cd404 fix(delegate-task): preserve variant in sync-continuation metadata model
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:32:16 +09:00
YeonGyu-Kim 54cc9b7ca4 test(delegate-task): lock Oracle-found gaps with TDD
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:29:32 +09:00
YeonGyu-Kim 3f28e42483 refactor(delegate-task): remove AI slop from supporting files
Tighten resolve-metadata-model runtime guards, tidy tool-argument-preparation
subagent-type override logging, and trim a redundant literal in the
metadata-model-unification test. Behavior preserved (328 tests pass).
2026-04-20 15:20:45 +09:00
YeonGyu-Kim bcf95112ca refactor(delegate-task): remove AI slop from executor metadata paths
Strip obvious comments, over-defensive guards, and dead branches across
the five delegate-task executor files while preserving all metadata
propagation behavior added in prior commits. Regression tests remain
green (328 pass / 0 fail).
2026-04-20 15:16:48 +09:00
YeonGyu-Kim 271068d871 chore(delegate-task): remove unused execute field from DelegateTaskArgs
The execute field with { task_id, task_dir } was defined but never referenced anywhere in the codebase. Removing dead code simplifies the type surface and prevents accidental future misuse.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:53:44 +09:00
YeonGyu-Kim cd0c98e54d fix(delegate-task): preserve model variant in metadata resolution
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:53:31 +09:00
YeonGyu-Kim a82f0560cc test(delegate-task): add failing tests for model variant preservation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:53:31 +09:00
YeonGyu-Kim f486df71ae feat(delegate-task): preserve raw subagent_type across metadata
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:50:40 +09:00
YeonGyu-Kim 8a2a11b210 fix(delegate-task): propagate category in background continuation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:50:18 +09:00
YeonGyu-Kim 9bd5829a76 fix(delegate-task): propagate agent and category in sync continuation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:50:11 +09:00
YeonGyu-Kim 9bf89deee3 test(delegate-task): add failing tests for metadata continuation gaps
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:49:35 +09:00
github-actions[bot] 869accd11b @CoderLuii has signed the CLA in code-yeongyu/oh-my-openagent#3518 2026-04-19 03:28:31 +00:00
Sisyphus 017e4ef1c7 Merge pull request #3514 from andomeder/fix/cli-attach-auth 2026-04-19 02:38:19 +09:00
William Obino 69315fcad7 fix(cli): restrict attach auth injection to loopback URLs 2026-04-18 18:12:58 +03:00
github-actions[bot] ad0ee7abcd @andomeder has signed the CLA in code-yeongyu/oh-my-openagent#3514 2026-04-18 14:55:59 +00:00
William Obino ef5c74e972 fix(cli): inject server auth for attach clients 2026-04-18 17:49:05 +03:00
YeonGyu-Kim 64b49b465d Merge pull request #3510 from code-yeongyu/fix/tmux-stale-session-sweep
feat(tmux): sweep stale omo-agents-<pid> sessions on first spawn
2026-04-18 21:05:59 +09:00
YeonGyu-Kim e35ac38bbf test(tmux): rewrite stale-sweep tests via DI to eliminate cross-file mock leak
Oracle flagged that the previous test file monkey-patched process.kill
and relied on mock.module for 5 modules. Running it after manager.test.ts
in the same Bun process reproduced 2 failures - the test resolution of
`./session-kill` specifier interacted badly with manager.test.ts's
`../../shared/tmux` barrel mock.

Solution: refactor stale-session-sweep.ts to expose
`sweepStaleOmoAgentSessionsWith(deps)` that accepts a SweepDeps record
(isInsideTmux, getTmuxPath, listCandidateSessions, killSession,
processAlive, currentPid, log). The public `sweepStaleOmoAgentSessions()`
still uses runtime-built deps so call sites are unchanged.

The test file now imports the pure function directly and constructs a
fixture with fake deps. Zero mock.module calls, zero process.kill
patching, zero cache-bust dynamic imports. 8 tests (up from 6) run
deterministically in any order with any neighbor.

Before: combined run with manager.test.ts = 2 fail, 50 pass.
After:  combined run with manager.test.ts = 0 fail, 54 pass.
2026-04-18 21:00:34 +09:00
YeonGyu-Kim d1fc46da42 test(tmux): restore process.kill in afterEach to prevent cross-file leak
Oracle noted that loadSweeper() monkey-patches process.kill without
ever restoring it. Added afterEach hook to set process.kill back to the
captured original. Individual file runs already passed, and
script/run-ci-tests.ts confirms the full CI suite - 4781 pass, 0 fail
across 491 files - but this makes the test file safe under non-isolated
local runs as well.
2026-04-18 20:51:24 +09:00