Commit Graph

424 Commits

Author SHA1 Message Date
YeonGyu-Kim b1764a880c Merge pull request #3484 from code-yeongyu/fix/ci-remaining-test-fixes
fix(test): complete session_id→task_id migration in CI-breaking tests
2026-04-17 12:48:00 +09:00
YeonGyu-Kim 3a956b2103 fix(test): align session_id→task_id across tests and source files
Several places still emitted task(session_id=...) after the refactor:
- src/hooks/atlas/verification-reminders.ts: 2 occurrences
- src/agents/dynamic-agent-core-sections.ts: buildNonClaudePlannerSection prompt

Tests updated to match: atlas index.test.ts and dynamic-agent-prompt-builder.test.ts
2026-04-17 12:46:44 +09:00
YeonGyu-Kim 28a896d093 fix(test): update dynamic-agent-prompt-builder test to expect task_id
Same session_id->task_id migration as the atlas hook test.
2026-04-17 12:46:44 +09:00
YeonGyu-Kim d89e257d8a refactor(task): align continuation ids with task_id 2026-04-16 23:13:44 +09:00
YeonGyu-Kim 64e5593697 fix(multimodal-looker): instruct explicit Read tool usage for PDFs (#2998)
The agent prompt described PDF handling but did not tell the agent
to call the Read tool, which is its only allowed tool. Added
explicit instruction so PDFs and documents are actually loaded
before extraction.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:29:39 +09:00
YeonGyu-Kim a6e4f211a3 fix(shared): normalize claude model IDs for anthropic provider (#3290)
Anthropic API accepts claude-opus-4.6 (dot format) but not
claude-opus-4-6 (dash format). Added anthropic case to
transformModelForProvider to normalize dash-format model IDs before
they reach the provider. Updated model config snapshots and test
expectations to match the new dot-format output.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:28:27 +09:00
YeonGyu-Kim 40411f3218 docs(agents): add AGENTS.md documentation for prometheus, hephaestus, sisyphus variants, and builtin-skills
- src/agents/prometheus/: Strategic planner documentation
- src/agents/hephaestus/: GPT-5.4 autonomous worker documentation
- src/agents/sisyphus/: Model-specific orchestrator variants documentation
- src/features/builtin-skills/: 8 built-in skills catalog

🤖 Generated with OhMyOpenCode assistance
2026-04-11 22:33:22 +09:00
YeonGyu-Kim 0c5cd3a1c4 chore(agents): update all AGENTS.md generation dates to 2026-04-11
🤖 Generated with OhMyOpenCode assistance
2026-04-11 22:33:22 +09:00
YeonGyu-Kim 10371d5bde fix(agents): re-apply GPT apply_patch deny after config override merge 2026-04-10 18:47:17 +09:00
YeonGyu-Kim 12a96eeb77 test(agents): update agent utility and builtin agent tests
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:27 +09:00
YeonGyu-Kim 2083cb0710 feat(agents): add centralized GPT apply_patch permission guard
Extract hardcoded GPT apply_patch permission logic into a reusable module
to ensure consistent behavior across all agents. This prevents GPT models
from using the unreliable apply_patch tool while allowing other models.

- Add gpt-apply-patch-guard.ts with GPT_APPLY_PATCH_GUIDANCE and getGptApplyPatchPermission
- Update Hephaestus agent to use centralized permission logic
- Update Sisyphus-Junior agent to use centralized permission logic
- Update all GPT prompt builders to reference shared guidance constant

🤖 Generated with assistance of OhMyOpenCode
2026-04-10 10:47:27 +09:00
YeonGyu-Kim 21127b0308 Merge remote-tracking branch 'origin/dev' into fix/gpt-apply-patch-rebased 2026-04-09 11:06:36 +09:00
YeonGyu-Kim b2e7ddfb73 fix: inject agent identity into system prompt for built-in agents (#2964)
Built-in agents (Sisyphus, Hephaestus, Atlas) now include explicit
identity section in their system prompts, matching custom agent behavior.

12 agent identity tests pass, 266 total pass, tsc clean.

Closes #2964
2026-04-07 15:29:10 +09:00
YeonGyu-Kim 1140080927 fix(agents): deny apply_patch for GPT models to prevent verification hangs (#2935)
GPT models (5.3-codex, 5.4, etc.) frequently hang when using apply_patch
due to verification loops. This adds:

1. Tool restriction: apply_patch is denied for GPT variants of
   Hephaestus, Sisyphus-Junior, and Sisyphus agents
2. Prompt guidance: GPT-specific prompts now explicitly instruct using
   edit/write tools instead of apply_patch
3. Removed the 'Always use apply_patch' instruction from
   sisyphus-junior/gpt-5-4.ts that contradicted the fix

The deny is model-conditional — Claude variants retain apply_patch
access since it works reliably there.
2026-04-07 11:28:48 +09:00
YeonGyu-Kim 137c2459f7 fix(prompt): prevent immediate BackgroundOutput polling after background task launch
Tool return values contained CTAs ("Use background_output to check") that
caused models to immediately poll instead of waiting for <system-reminder>
notifications. Unified all 5 tool return messages with explicit "Do NOT call
background_output now" guard, added pre-notification warning to BackgroundOutput
tool description, and strengthened Background Result Collection sections across
all 3 Sisyphus prompt variants (default, gpt-5-4, main) with BLOCKING
anti-pattern enforcement.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-04-06 17:18:47 +09:00
YeonGyu-Kim 75447b7ea2 fix(hephaestus): restrict Oracle to failure-escalation only in GPT-5.4 prompt
Replace generic buildOracleSection (proactive triggers: architecture, significant
work, unfamiliar patterns) with Hephaestus-specific Oracle section that only
permits consultation after 2+ failed attempts. Aligns with autonomous deep worker
identity - try first, escalate later.
2026-04-05 18:32:13 +09:00
YeonGyu-Kim 7b7526e2f6 docs(src): update counts across tools, features, config, cli AGENTS.md
- tools: 15 -> 16 dirs, writing model kimi-k2p5 -> gemini-3-flash
- features: builtin skills 6 -> 8 (+review-work, +ai-slop-remover)
- config: schema files 24 -> 27 (+git-env-prefix, model-capabilities, openclaw)
- cli: commands 5 -> 6 (+refresh-model-capabilities)
- plugin-handlers: 13 -> 14 non-test files
- shared: 95+ -> 100+ utility files
2026-04-05 14:12:31 +09:00
YeonGyu-Kim 67d05f54d0 fix(hephaestus): restore GPT-5.4 prompt test contract
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-05 13:42:37 +09:00
YeonGyu-Kim 5d065da7a1 refactor(hephaestus): clarify tool call philosophy for direct tools vs agents
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-04-05 13:27:38 +09:00
YeonGyu-Kim 3517017ee1 refactor(hephaestus): rewrite GPT-5.4 prompt with entropy-reduced XML architecture
🤖 Generated with assistance of OhMyOpenCode
2026-04-05 11:24:10 +09:00
YeonGyu-Kim ad025ee0f8 test: isolate flaky shared-state tests 2026-04-04 19:20:59 +09:00
YeonGyu-Kim fabbcaa4b7 refactor(runtime): replace unicode dashes in prompt strings
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 01:27:51 +09:00
YeonGyu-Kim f497f956db refactor(agents): remove AI slop from code comments and clean verbose patterns 2026-04-03 21:37:14 +09:00
YeonGyu-Kim 98659783c0 fix(security): confine file resolution to project roots
Block traversal, out-of-root absolute path, and symlink escapes for @file references, file:// URIs, and config skill file loading while logging rejected attempts.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-02 14:55:35 +09:00
YeonGyu-Kim 1316a7d8d1 fix(agents): make sisyphus, hephaestus, atlas primary-only (not callable as subagents)
These agents should only be usable as primary session agents, not as
subagent targets via call_omo_agent/task(). Previously MODE was 'all'
which allowed them to be spawned as subagents, leading to confusing
behavior (e.g. Atlas delegating to Hephaestus as a subagent).

Subagent-callable agents remain: oracle, explore, librarian,
multimodal-looker, metis, momus, sisyphus-junior.

Note: Prometheus is not a BuiltinAgentName and is only invoked via
slash commands, so no change needed there.
2026-04-01 14:15:08 +09:00
YeonGyu-Kim 1d0135b230 fix(delegate-task): reject stray backend-style categories
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-31 13:05:44 -07:00
YeonGyu-Kim 68ae9dca4b fix(agents): stop advertising custom agents to orchestrators
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-31 13:05:38 -07:00
YeonGyu-Kim fd281deba7 fix(tests): resolve 25 pre-publish test failures
- Add providerModelsCache/fetchAvailableModels mocks to 20 utils.test.ts
  tests that broke when createBuiltinAgents started reading the cache
- Isolate ALL src/plugin and src/features/background-agent test files in CI
  (mock.module pollution crosses between files in the same bun process)
- Mirror CI isolation changes in publish.yml

25 failures → 0 in CI (all mock-pollution tests run individually)
2026-03-31 18:12:57 +09:00
YeonGyu-Kim 71c60e1be4 fix: skip thinking param injection for GLM models in sisyphus-junior (#2967)
GLM-5 has native reasoning built-in. Injecting thinking: {type: 'enabled'}
causes a param conflict (400 error). Add isGlmModel() check to return base
config without thinking/reasoningEffort for GLM models.

- Add isGlmModel() helper to types.ts
- Early return in createSisyphusJuniorAgentWithOverrides for GLM models
- Add tests for isGlmModel and GLM reasoning config behavior
2026-03-31 16:32:32 +09:00
YeonGyu-Kim 44b039bef6 Merge pull request #2705 from MoerAI/fix/sisyphus-premature-implementation
fix(sisyphus): block premature implementation before context is complete (fixes #2274)
2026-03-28 01:46:31 +09:00
YeonGyu-Kim d39891fcab docs: update hephaestus default model references from gpt-5.3-codex to gpt-5.4
Updated across README (all locales), docs/guide/, docs/reference/,
docs/examples/, AGENTS.md files, and test expectations/snapshots.

The deep category and multimodal-looker still use gpt-5.3-codex as
those are separate from the hephaestus agent.
2026-03-26 19:25:26 +09:00
YeonGyu-Kim d57ed97386 feat(hephaestus): upgrade default model from gpt-5.3-codex to gpt-5.4
Hephaestus now uses gpt-5.4 as its default model across all providers
(openai, github-copilot, venice, opencode), matching Sisyphus's GPT 5.4
support. The separate gpt-5.3-codex → github-copilot fallback entry is
removed since gpt-5.4 is available on all required providers.
2026-03-26 19:02:37 +09:00
YeonGyu-Kim a8ec92748c fix(model-resolution): honor user config overrides on cold cache
When provider-models cache is cold (first run / cache miss),
resolveModelForDelegateTask returns {skipped: true}. Previously this
caused the subagent resolver to:

1. Ignore the user's explicit model override (e.g. explore.model)
2. Fall through to the hardcoded fallback chain which may contain
   model IDs that don't exist in the provider catalog

Now:
- subagent-resolver: if resolution is skipped but user explicitly
  configured a model, use it directly
- subagent-resolver: don't assign hardcoded fallback chain on skip
- category-resolver: same — don't leak hardcoded chain on skip
- general-agents: if user model fails resolution, use it as-is
  instead of falling back to hardcoded chain first entry

Closes #2820
2026-03-26 16:54:04 +09:00
YeonGyu-Kim 6e42b553cc Merge origin/dev into feature/upgrade-minimax-m2.7 (resolve conflicts) 2026-03-26 08:48:53 +09:00
YeonGyu-Kim 2268ba45f9 Merge pull request #2262 from Stranmor/feat/prompt-file-uri-support
feat: support file:// URIs in agent prompt field
2026-03-25 21:45:53 +09:00
YeonGyu-Kim a3519c3a14 Merge pull request #2544 from djdembeck/fix/quick-anti-loop-v2
fix(agents): add termination criteria to Sisyphus-Junior default
2026-03-25 21:45:43 +09:00
YeonGyu-Kim e610d88558 Merge pull request #2594 from MoerAI/fix/subagent-fallback-model-v2
fix(agent-registration): always attempt fallback when model resolution fails (fixes #2427, supersedes #2517)
2026-03-25 21:45:40 +09:00
Ravi Tharuma a77a16c494 feat(config): support object-style fallback_models with per-model settings
Add support for object-style entries in fallback_models arrays, enabling
per-model configuration of variant, reasoningEffort, temperature, top_p,
maxTokens, and thinking settings.

- Zod schema for FallbackModelObject with full validation
- normalizeFallbackModels() and flattenToFallbackModelStrings() utilities
- Provider-agnostic model resolution pipeline with fallback chain
- Session prompt params state management
- Fallback chain construction with prefix-match lookup
- Integration across delegate-task, background-agent, and plugin layers
2026-03-25 11:04:49 +01:00
YeonGyu-Kim 535ecee318 fix(models): remove stale Gemini 3 Pro references
Keep repo-owned CLI, docs, and test fixtures aligned with current Gemini 3.1 naming while leaving upstream catalog behavior untouched.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 23:53:56 +09:00
YeonGyu-Kim d8fe61131c fix(agents): preserve uiSelectedModel when agent override has no model
Three agent builder files used falsy checks that incorrectly nullified
uiSelectedModel when override objects existed but had no model set:

- sisyphus-agent.ts: `?.model ?` → `?.model !== undefined ?`
- atlas-agent.ts: `?.model ?` → `?.model !== undefined ?`
- general-agents.ts: `!override?.model` → `override?.model === undefined`

This caused user model selection in web mode to revert to defaults.

Fixes #2351
2026-03-24 16:22:03 +09:00
YeonGyu-Kim a00a22ac4c fix: remove copy-paste artifacts in hephaestus gpt-5-3-codex prompt
Same issue as gpt.ts and gpt-5-4.ts: duplicated CORRECT block with pipe
characters and duplicated Hard Constraints/Task Scope Clarification sections.
2026-03-24 10:14:53 +09:00
YeonGyu-Kim 8879581fc1 fix: remove copy-paste artifacts in hephaestus GPT prompts
- Remove leading pipe characters (|) from duplicated CORRECT block
- Remove duplicated ## Hard Constraints and ### Task Scope Clarification sections
- Properly place Task Scope Clarification section between CORRECT list and Hard Constraints

Addresses review comments by cubic-dev-ai[bot] on PR #2780
2026-03-24 09:57:30 +09:00
YeonGyu-Kim 230ce835e5 fix: resolve 3 bugs - subagent model override, empty plan completion, deep task refusal
- #2741: Pass inheritedModel as fallback in subagent-resolver when user hasn't
  configured an override, ensuring custom provider models take priority
- #2648: Fix getPlanProgress to treat plans with 0 checkboxes as incomplete
  instead of complete (total > 0 && completed === total)
- #2779: Relax Hephaestus single-task guard to accept multi-step sub-tasks
  from Atlas delegation, only rejecting genuinely independent tasks

Fixes #2741, fixes #2648, fixes #2779
2026-03-24 09:45:11 +09:00
YeonGyu-Kim f5eaa648e9 fix: respect disabled_tools config in agent prompts (fixes #2742)
- Check disabled_tools for 'question' in tool-config-handler permission logic
- Strip Question tool code examples from Prometheus prompts when disabled
- Pass disabled_tools through prometheus agent config builder pipeline
- Add tests for disabled_tools question permission handling
2026-03-23 18:13:38 +09:00
PR Bot 0d52519293 feat: upgrade MiniMax from M2.5 to M2.7 and expand to more agents/categories
- Upgrade minimax-m2.5 → minimax-m2.7 (latest model) across all agents and categories
- Replace minimax-m2.5-free with minimax-m2.7-highspeed (optimized speed variant)
- Expand MiniMax fallback coverage to atlas, sisyphus-junior, writing, and unspecified-low
- Add isMiniMaxModel() detection function in types.ts for model family detection
- Update all tests (58 passing) and documentation
2026-03-21 01:29:53 +08:00
MoerAI d2d65fbf99 fix(sisyphus): block premature implementation before context is complete (fixes #2274) 2026-03-20 10:16:30 +09:00
YeonGyu-Kim 57757a345d refactor: improve test isolation and DI for cache/port-utils/resolve-file-uri
- connected-providers-cache: extract factory pattern (createConnectedProvidersCacheStore) for testable cache dir injection
- port-utils.test: environment-independent tests with real socket probing and contiguous port detection
- resolve-file-uri.test: mock homedir instead of touching real home directory
- github-triage: update SKILL.md
2026-03-18 13:17:01 +09:00
MoerAI abdd39da00 fix(agent-registration): always attempt fallback when model resolution fails
Removes both the isFirstRunNoCache and override?.model guards from
the fallback logic in collectPendingBuiltinAgents(). Previously, when
a user configured a model like minimax/MiniMax-M2.5 that wasn't in
availableModels, the agent was silently excluded and --agent Librarian
would crash with 'undefined is not an object'.

Now: if applyModelResolution() fails for ANY reason (cache state,
unavailable model, config merge issue), getFirstFallbackModel() is
always attempted. A log warning is emitted when a user-configured
model couldn't be resolved, making the previously silent failure
visible.

Supersedes #2517
Fixes #2427
2026-03-16 11:06:00 +09:00
YeonGyu-Kim 16b0d9eb77 fix(atlas): gate final-wave approval on real plan state
Ignore nested plan checkboxes and track parallel final-wave approvals so Atlas only pauses for user approval when the real top-level review wave is complete.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim 532995bb51 fix(model-fallback): align OpenAI fallback resolution across CLI and runtime
Keep install-time and runtime model tables in sync, stop OpenAI-only misrouting when OpenCode Go is present, and add valid OpenAI fallbacks for atlas, metis, and sisyphus-junior.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00