Commit Graph

1228 Commits

Author SHA1 Message Date
YeonGyu-Kim 051ab840d6 Merge pull request #3348 from code-yeongyu/refactor/ulw-repo-cleanup-20260411
refactor: simplify nullish guards and remove dead no-op paths
2026-04-12 18:04:43 +09:00
YeonGyu-Kim c5c5bc36bc fix(delegate-task): consume fallback chain on sendSyncPrompt failure (#2691)
setSessionFallbackChain stored the fallback chain but the sync path
never consumed it when sendSyncPrompt returned an error. Added a
retry loop that iterates getNextFallback() until the prompt succeeds
or the chain is exhausted, preserving the finally-block cleanup.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:30:32 +09:00
YeonGyu-Kim 796a646c63 fix(non-interactive-env): use detectShellType instead of hardcoded win32 check (#3310, #3338)
Hardcoded platform check forced PowerShell env syntax on Windows
regardless of the actual shell. Replaced with detectShellType() so
Git Bash, WSL, and similar environments use unix prefixes while
native PowerShell continues to get powershell prefixes.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:29:28 +09:00
YeonGyu-Kim 2d8b4a9d53 fix(anthropic-effort): skip effort injection for github-copilot provider (#3270)
github-copilot routes Claude models but rejects the Anthropic effort
parameter. Added an explicit guard so effort is no longer injected
when the provider ID is github-copilot, while preserving native
Anthropic provider support.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:29:18 +09:00
YeonGyu-Kim 7e96af5f28 fix(atlas): exclude node_modules from verification git diff --stat (#3215)
Atlas verification reminders instructed 'git diff --stat' which
included node_modules noise in the output. Added pathspec exclude
to both VERIFICATION_REMINDER and VERIFICATION_REMINDER_GEMINI
templates.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:29:08 +09:00
YeonGyu-Kim d7b4bec58b fix(hooks,tools): replace /plan example with prometheus delegation and rename code-review example to review-work (#2633, #3285, #2873)
- context-info-builder referenced a non-existent /plan command;
  now directs users to the Prometheus agent for planning
- skill tool description example referenced 'code-review' which
  does not exist; changed to 'review-work' (actual built-in skill)
- skill tool execute path now surfaces the missing host permission
  gap so callers understand OpenCode plugin context limits

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:28:58 +09:00
YeonGyu-Kim 6713b30cc1 refactor(hooks): drop no-op directory injector callbacks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-12 00:07:10 +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 522f8aab6c fix: move Haiku check before variant check for reliability
Addresses cubic-dev-ai review feedback. The Haiku early-return now
runs immediately after model validation, ensuring it's always reached
regardless of any upstream variant normalization.
2026-04-11 13:44:35 +09:00
YeonGyu-Kim 7c154c6659 fix(anthropic-effort): skip effort injection for Haiku models (#3308)
Haiku models do not support the effort parameter and return API errors
when it is passed. The hook now explicitly checks for Haiku model
patterns and skips effort injection, preventing silent title generation
failures.

Added EFFORT_UNSUPPORTED_PATTERN and isEffortUnsupportedModel() to
detect and skip Haiku models.

Fixes #3308
2026-04-11 13:06:24 +09:00
YeonGyu-Kim e54f747916 fix(tests): replace as any with typed PluginInput mocks 2026-04-10 18:47:17 +09:00
YeonGyu-Kim ca9b5fde40 test(hooks): update claude-code, comment-checker, and rules-injector 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:33 +09:00
YeonGyu-Kim 8a4eacfd24 test(hooks): update multiple hook test suites
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:32 +09:00
YeonGyu-Kim 0e74f5a749 fix(hooks): improve comment checker CLI runner
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:20 +09:00
YeonGyu-Kim 08c4757824 fix(hooks): improve auto update checker
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:19 +09:00
YeonGyu-Kim 111cf6d1a9 fix(hooks): improve session last agent tracking
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:13 +09:00
YeonGyu-Kim 25abda684c fix(hooks): improve image resizer implementation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:12 +09:00
YeonGyu-Kim 5a762ba2ca fix(hooks): improve rules injector implementation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 15:53:10 +09:00
YeonGyu-Kim e86b4f4c2b fix(keyword-detector): stop starting ralph loop for ulw
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 11:40:46 +09:00
YeonGyu-Kim 959229d9b7 test(keyword-detector): add plain ulw no-loop regressions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 11:40:14 +09:00
YeonGyu-Kim 33ac57ba7a refactor: update remaining modules to use plugin-identity constants
Update various modules to use centralized constants from plugin-identity:
- get-local-version/formatter: Use PUBLISHED_PACKAGE_NAME
- run/session-resolver: Use PUBLISHED_PACKAGE_NAME
- background-agent/task-poller: Use PUBLISHED_PACKAGE_NAME
- mcp-oauth/provider: Use PUBLISHED_PACKAGE_NAME
- auto-update-checker/constants: Use ACCEPTED_PACKAGE_NAMES
- comment-checker/downloader: Use PUBLISHED_PACKAGE_NAME
- legacy-plugin-toast/hook: Use PLUGIN_NAME
- shared/data-path: Use CACHE_DIR_NAME
- shared/external-plugin-detector: Use ACCEPTED_PACKAGE_NAMES
- shared/logger: Use LOG_FILENAME
- tools/ast-grep/downloader: Use PUBLISHED_PACKAGE_NAME
- tools/call-omo-agent/tools: Use PUBLISHED_PACKAGE_NAME
- tools/delegate-task/category-resolver: Use PUBLISHED_PACKAGE_NAME
- tools/grep/constants: Use PUBLISHED_PACKAGE_NAME
- tools/grep/downloader: Use PUBLISHED_PACKAGE_NAME
- tools/lsp/lsp-client-wrapper: Use PUBLISHED_PACKAGE_NAME

🤖 Generated with assistance of OhMyOpenCode
2026-04-10 11:16:16 +09:00
YeonGyu-Kim d00a6bbf16 fix(keyword-detector): always trigger ultrawork keywords 2026-04-10 11:15:23 +09:00
YeonGyu-Kim f36231a8a6 fix(keyword-detector): trigger ulw shorthand anywhere 2026-04-10 11:12:56 +09:00
YeonGyu-Kim 5f90b238e0 fix(keyword-detector): restore ulw trigger after greeting prefixes 2026-04-10 11:09:01 +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 6df597c60c Merge pull request #3279 from code-yeongyu/fix/stop-continuation-persistence
fix(stop-continuation): persist stop state across user messages (#3276)
2026-04-09 21:50:50 +09:00
YeonGyu-Kim ab515b77d0 fix(stop-continuation): persist stop state across user messages (#3276)
The /stop-continuation command was ineffective because the stop-
continuation-guard cleared its stopped state on the very next
chat.message event. Since any user message (including normal chat
after stopping) triggers chat.message, the continuation would
resume immediately.

Root cause: the chat.message handler called clear(sessionID) on
every user message, treating it as a 'user resumed work' signal.
But the user expects /stop-continuation to persist until they
explicitly start work again.

Changes:
- stop-continuation-guard chat.message: no longer clears stop state
- tool-execute-before: /start-work, /ralph-loop, /ulw-loop now
  explicitly clear the stop state (so continuation resumes when
  user intentionally restarts work)
- Updated and added tests: 12 pass (3 new), 125 related tests pass

Closes #3276
2026-04-09 21:36:10 +09:00
YeonGyu-Kim 69f47a9751 feat(keyword-detector): handle ultrawork keyword after greeting patterns
- Add TRAILING_GREETING_ULTRAWORK_PATTERN to detect 'hi ultrawork' style inputs
- Rename hasLeadingUltraworkKeyword to hasEdgeUltraworkKeyword for clarity
- Add extractUltraworkTask guard to return empty string for greeting-only inputs
- Add comprehensive test coverage for edge trigger scenarios

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-09 15:15:30 +09:00
YeonGyu-Kim 58be69114f docs: update AGENTS.md hierarchy with openclaw, runtime-fallback, skill-mcp-manager
- Add src/openclaw/AGENTS.md: bidirectional Discord/Telegram/webhook integration
- Add src/hooks/runtime-fallback/AGENTS.md: reactive provider error recovery
- Add src/features/skill-mcp-manager/AGENTS.md: tier-3 MCP lifecycle
- Update root AGENTS.md: refresh commit hash, add openclaw/IntentGate/Hashline refs
- Fix src/features/AGENTS.md: skill-mcp-manager file count 14→18, complexity MEDIUM→HIGH

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-09 15:14:40 +09:00
YeonGyu-Kim 4344a41eae fix(auto-update): resolve cached version when installed as oh-my-openagent (#3257)
The auto-update-checker's version resolver hardcoded the canonical
oh-my-opencode package name in three read paths:

  1. INSTALLED_PACKAGE_JSON pointed only at
     cache/node_modules/oh-my-opencode/package.json
  2. findPackageJsonUp() rejected any walked-up package.json whose name
     did not equal PACKAGE_NAME
  3. getLocalDevPath() only matched file:// plugin entries whose path
     contained the canonical name

The publish pipeline ships the same code under two npm package names
(oh-my-opencode canonical, oh-my-openagent alias). Users who add
"oh-my-openagent" to their opencode config end up with
node_modules/oh-my-openagent/package.json, so every read path above
silently missed the installed version and the startup toast fell back
to "unknown".

Introduce ACCEPTED_PACKAGE_NAMES + INSTALLED_PACKAGE_JSON_CANDIDATES in
constants.ts and teach the three readers to accept both names. Writes
are untouched (sync-package-json, pinned-version-updater, cache
invalidation) because the auto-update-checker still owns its own cache
workspace and writes to the canonical name there.

Tests: 54 auto-update-checker tests pass (4 new), full 4444-test suite
passes, tsc clean. New tests cover both install paths, the walk-up
resolver, and the priority order when both candidates exist.

Closes #3257
2026-04-09 07:29:07 +09:00
YeonGyu-Kim 1ea0ee4319 fix(preemptive-compaction): notify user on failure and reduce timeout
Reports from david_66 on Discord: sessions get perceived as 'stuck' when
context usage crosses the 78% threshold. Investigation confirmed two
issues in the preemptive compaction hook:

1. PREEMPTIVE_COMPACTION_TIMEOUT_MS was 120s. While the summarize
   request is in flight, tool.execute.after short-circuits via the
   compactionInProgress guard. A hung summarize blocked the session
   for two full minutes before giving up, which users reasonably
   experience as a hang.

2. On failure (timeout or exception) only a log line was emitted. The
   user had no visibility into why their session was unresponsive or
   why auto-compaction never ran, so a transient upstream error could
   silently leave them well above the threshold with no signal.

Fix:

- Reduce timeout 120s -> 60s. Still gives the upstream a generous
  window, but caps the worst-case perceived hang at one minute.
- Show a warning toast via ctx.client.tui.showToast whenever the
  catch block fires, including the underlying error string so users
  can act (retry, manual /compact, or adjust provider).
- Include providerID/modelID in the Compaction failed log entry so
  wild failures are easier to correlate to a specific target model.

Two existing failure-path assertions were updated to match the new
log shape and a new test covers the toast notification contract.

Discord report: https://discord.com/channels/1452487457085063218/1490536332961906829/1491345441399505037
2026-04-08 20:10:25 +09:00
YeonGyu-Kim d781b7537f Merge pull request #3226 from code-yeongyu/fix/plan-progress-and-trust
fix(plan): skill MCP trust + non-ASCII names + simple-mode progress + ralph-loop cap
2026-04-08 17:40:51 +09:00
YeonGyu-Kim aa0de17f03 fix(start-work): preserve non-ASCII characters in plan name normalization
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:18:23 +09:00
YeonGyu-Kim 15e3b14cca fix(auto-update): match both canonical and legacy plugin names in entry finder
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:17:41 +09:00
YeonGyu-Kim 917ae4dfc3 fix(keyword-detector): narrow ULW auto-start to leading keyword position only
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:17:14 +09:00
YeonGyu-Kim 06b825dd74 fix(start-work): reuse registered opencode agent names 2026-04-08 16:18:26 +09:00
YeonGyu-Kim cd95172e42 fix(start-work): keep native command agents on config keys 2026-04-08 15:58:02 +09:00
YeonGyu-Kim 2c6a161441 test(runtime-fallback): fix OpenAI auto-retry test expectations
- Add timeout_seconds to mock config for auto-retry signal detection

- Add 'usage limit' pattern to quota_exceeded error classification

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:40:40 +09:00
YeonGyu-Kim 4d9652c028 test(start-work): update display name expectations for ZWSP fix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:33:19 +09:00
YeonGyu-Kim 1a04a6effb test(ralph-loop): update iteration cap expectation to 500
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:33:09 +09:00
YeonGyu-Kim d490b4dc20 fix(ralph-loop): harden Oracle VERIFIED detection
Replace fragile regex text matching with structured detection for Oracle verification evidence.

- Add oracle-verification-detector.ts with parseOracleVerificationEvidence()

- Use structured parsing instead of multiple regex patterns

- Add comprehensive test coverage for edge cases

- Update completion-promise-detector.ts to use isOracleVerified()

- Update pending-verification-handler.ts to use structured extraction

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:24:50 +09:00
YeonGyu-Kim 0bf5dc2629 fix(token-limit): normalize detection across providers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:24:14 +09:00
YeonGyu-Kim 14f4390a34 fix(ultrawork): add iteration cap to prevent infinite loops
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:22:41 +09:00
YeonGyu-Kim 8090ee6afe fix(compaction): persist recovery cap across cycles
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:20:01 +09:00
YeonGyu-Kim f2fac9bc0b test(runtime-fallback): update tests for quota STOP classification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:14:54 +09:00
YeonGyu-Kim 8169dbec89 docs: update for v3.16.0 release
- Update AGENTS.md header with current date and commit

- Update runtime-fallback test to reflect quota STOP classification

- Release notes drafted in .sisyphus/drafts/release-notes-v3.16.0.md
2026-04-08 13:13:22 +09:00
YeonGyu-Kim 5e0bd87dea test(runtime-fallback): add provider matrix quota tests
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:10:26 +09:00
YeonGyu-Kim 7751402999 fix(runtime-fallback): classify quota exhaustion as STOP not retryable
Remove quota exhaustion patterns from RETRYABLE_ERROR_PATTERNS:

- 'usage limit reached' patterns (lines 30, 32)

- 'insufficient credits' pattern (line 37)

- 'credit balance too low' pattern (line 38)

These errors indicate permanent quota exhaustion, not temporary

rate limits. They are already handled by classifyErrorType() which returns

'quota_exceeded', and isRetryableError() properly stops on these

unless there's an explicit auto-retry signal.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:09:38 +09:00
YeonGyu-Kim 78e6d780eb fix(plugin): verify event hook compatibility with v1.4.0
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:08:03 +09:00
YeonGyu-Kim 317e2c6465 fix(zwsp): strip zero-width chars in start-work-hook
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:01:51 +09:00