Commit Graph

5505 Commits

Author SHA1 Message Date
YeonGyu-Kim a91023961c feat(team-mode): add team session registry with tests 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 3a93cb776f test(team-mode): add integration test for team-mode lifecycle 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 8c4c4ff644 feat(team-mode): add caller team-lead resolution with tests 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 41d6e12f0d feat(team-mode): add member session resolution and routing logic 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 8a42d7fd69 feat(team-mode): add member guidance and parser utilities 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 783d70558b feat(team-mode): add core types, dependencies and type-level tests 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 5e4ae8815e test(tmux-subagent): expand zombie-pane test coverage 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 49bb5dd81a test(tmux-subagent): add pane-state-querier runner tests 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 8d3d882578 test(tmux-subagent): add manager project-directory resolution tests 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 77655a7c30 test(tmux-subagent): expand manager test coverage 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 680927d0fd test(tmux-subagent): expand polling-manager test coverage 2026-05-06 14:19:38 +09:00
YeonGyu-Kim b6dcf05d45 test(tmux-subagent): expand action-executor test coverage 2026-05-06 14:19:38 +09:00
YeonGyu-Kim c8b225099c refactor(tmux-subagent): stabilize polling, execution and session lifecycle with runner 2026-05-06 14:19:38 +09:00
YeonGyu-Kim 90e6e0cdce feat(openclaw): integrate typed tmux runner for external dispatch 2026-05-06 14:18:08 +09:00
YeonGyu-Kim 4a5e7cf2cf feat(tmux): add window-spawn utility with tests 2026-05-06 14:17:41 +09:00
YeonGyu-Kim 13b3bd9e72 feat(tmux): add session-spawn utility with tests 2026-05-06 14:17:19 +09:00
YeonGyu-Kim ad315987c7 feat(tmux): add session-kill utility with runner tests 2026-05-06 14:16:57 +09:00
YeonGyu-Kim 56250a468c feat(tmux): add pane-spawn utility with runner tests 2026-05-06 14:16:57 +09:00
YeonGyu-Kim f93e15b2a9 feat(tmux): add pane-replace utility with tests 2026-05-06 14:16:27 +09:00
YeonGyu-Kim d90102042b feat(tmux): add pane-dimensions utility with tests 2026-05-06 14:15:17 +09:00
YeonGyu-Kim cfce0cc31f refactor(tmux): migrate pane-close to runner and expand test coverage 2026-05-06 14:14:52 +09:00
YeonGyu-Kim b9a40f0c8c refactor(tmux): migrate layout commands to typed runner 2026-05-06 14:14:52 +09:00
YeonGyu-Kim c9e544a667 refactor(tmux): export sweepTmuxSessionsWith and add runtime tests 2026-05-06 14:14:15 +09:00
YeonGyu-Kim 96161cc0e6 feat(tmux): introduce typed tmux command runner abstraction 2026-05-06 14:14:15 +09:00
YeonGyu-Kim ec121a730f feat(config): add team-mode configuration schema and merge support 2026-05-06 14:14:15 +09:00
YeonGyu-Kim caaa3d4c08 refactor(hephaestus): tighten GPT-5.5 prompt for outcome-first density
Compress 6 discovery sections into one Discovery & Retrieval section, remove three-way echo of "drive the artifact" between Goal, Manual QA Gate, and Forbidden stops (now once + cross-ref), split persona prose into Tone vs Autonomy & Collaboration per OpenAI's GPT-5.5 prompting guide, trim Output formatting from 13 prior-restating bullets to 5 environment-specific ones, and defer the Oracle wait policy to the dynamic oracleSection so it lives in a single source of truth.

Add buildFrontendGuidanceSection: conditional injection that only emits the anti-slop frontend block when `visual-engineering` category is unavailable, since the category-skills guide already forces visual work to delegate when the category exists.

Static prose drops 277 -> ~175 lines (-37%); every Hephaestus identity item preserved (Manual QA Gate surface map, Intent table + commitment line, three-attempt failure protocol, Hard invariants, no defensive code, AGENTS.md and dirty worktree handling, four dynamic placeholders).
2026-05-06 13:54:24 +09:00
github-actions[bot] 60dfac871f release: v3.17.15 2026-05-06 04:52:53 +00:00
YeonGyu-Kim 10684857e3 Merge pull request #3798 from code-yeongyu/fix/node-runtime-compat
fix(bun-spawn-shim): eliminate globalThis.Bun top-level destructures (#3797)
2026-05-06 13:33:11 +09:00
YeonGyu-Kim 9dd0e14733 fix(bun-spawn-shim): match Bun.spawn semantics in Node fallback
Address cubic and oracle review feedback to make the Node/Electron
fallback faithful to Bun.spawn behavior so cross-runtime callers
behave identically.

Changes:
- resolveStdio() default stdio is now ["ignore", "pipe", "inherit"]
  to match Bun.spawn defaults (was ["pipe", "pipe", "pipe"]).
  Prevents hangs in dispatcher and on-complete-hook callers that
  did not explicitly set stdin and would otherwise wait forever
  for input on Node.
- spawn-with-windows-hide.ts uses the same defaults so the Windows
  Node helper aligns with the rest of the shim.
- wrapNodeProcess now rejects proc.exited with the original error
  on "error" events (previously swallowed the error and resolved
  to exit code 1, hiding ENOENT and friends).
- spawnSync result returns the real result.pid instead of -1 and
  exposes stdout/stderr as Buffer | undefined to match Node's
  spawnSync result shape when those streams are not piped.

Tests cover the new defaults, real pid surfacing, and missing
executable error propagation.

Refs cubic review and oracle audit on #3798.
2026-05-06 13:28:21 +09:00
YeonGyu-Kim 677b78fe3b test(agents): cover default-agent sort shim ordering 2026-05-06 11:05:38 +09:00
YeonGyu-Kim 4c426a53ba test(hooks): cancel idle notification timer in input-needed test 2026-05-06 11:05:35 +09:00
YeonGyu-Kim 46f6fa407a prevent infinite loop when fallback model equals current model
prevent infinite loop when fallback model equals current model
2026-05-06 04:25:19 +09:00
github-actions[bot] 953280eb9e @paolo-notaro has signed the CLA in code-yeongyu/oh-my-openagent#3802 2026-05-05 19:14:26 +00:00
Paolo Notaro d800fec6b1 fix(runtime-fallback): prevent infinite loop when fallback model equals current model 2026-05-05 21:01:50 +02:00
YeonGyu-Kim e9d7dca604 fix(session-notification): tolerate shell promises without nothrow 2026-05-05 23:06:01 +09:00
YeonGyu-Kim f8defe2588 fix(node-runtime-compat): harden Bun spawn shim 2026-05-05 22:59:43 +09:00
YeonGyu-Kim 3ddc757b15 fix(bun-spawn-shim): eliminate globalThis.Bun top-level destructures for Electron/Node compat
Root cause: bun build --target bun inlines top-level
  var { spawn } = globalThis.Bun;
for every file that contains 'import { spawn } from "bun"'. On Node/Electron
where globalThis.Bun is undefined, this crashes with
  Cannot destructure property 'spawn' of 'globalThis.Bun' as it is undefined.
26 source files had this import; the bundled output had 25 top-level destructures.

Fix:
- Add src/shared/bun-spawn-shim.ts: a thin wrapper that
  - delegates to Bun.spawn/spawnSync when globalThis.Bun is present (real Bun)
  - falls back to static ESM imports of node:child_process otherwise
  - uses static 'import { spawn } from "node:child_process"' so Bun bundler
    does NOT emit any globalThis.Bun destructures for this module
- Replace all 26 'from "bun"' spawn/spawnSync imports with relative paths to shim
- Replace 4 direct Bun.spawn() call sites with shim's spawn()
- Remove src/electron-compat.ts and script/prepend-electron-shim.ts (no longer needed)
- Update src/electron-compat.test.ts to assert 0 top-level globalThis.Bun destructures

Verification: grep -c '} = globalThis.Bun;' dist/index.js → 0 (was 25)
All 5921 tests pass (1 pre-existing timeout failure unrelated to this change).

Fixes #3797
2026-05-05 22:41:45 +09:00
YeonGyu-Kim f178ea3207 fix(electron-compat): prepend globalThis.Bun shim to prevent Electron/Node crash
On Node/Electron, globalThis.Bun is undefined. The Bun bundler emits top-level
  var { spawn } = globalThis.Bun;
destructures from its internal modules, causing 'Cannot destructure property
of undefined' before any plugin hook is reached (25 occurrences in dist/index.js).

Fix:
- Add src/electron-compat.ts: a side-effect module that populates globalThis.Bun
  with node:child_process-backed spawn/spawnSync shims when Bun is unavailable
- Add script/prepend-electron-shim.ts: post-build script that prepends the shim
  code to dist/index.js, guaranteeing it runs BEFORE the top-level destructures
  (Bun bundler does not preserve import side-effect evaluation order reliably)
- Update build script to run prepend-shim after bundling
- Add src/electron-compat.test.ts verifying shim position in dist

The shim only activates when globalThis.Bun is absent (real Bun runtime is
unaffected). Spawn-dependent features degrade gracefully at call time.

Fixes #3797 (follow-up to #3795/#3796)
2026-05-05 22:17:06 +09:00
github-actions[bot] f6e9fadf01 release: v3.17.14 2026-05-05 10:31:32 +00:00
YeonGyu-Kim 723df5f142 Merge pull request #3796 from code-yeongyu/fix/bun-sqlite-dynamic-import
fix(ultrawork): lazy-load bun:sqlite to support Node/Electron runtime
2026-05-05 19:17:40 +09:00
YeonGyu-Kim aae619c58f fix(ultrawork): align lazy sqlite fallback test
Keep bun:sqlite loading lazy and verify the unavailable-runtime fallback without a test-only importer seam.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-05 19:09:31 +09:00
YeonGyu-Kim c537e840ee fix(ultrawork): handle bun:sqlite import failure directly
Use the lazy bun:sqlite importer inside the deferred override microtask and keep the unavailable-runtime test on the rejected-import path.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-05 19:09:31 +09:00
YeonGyu-Kim f4a225b6cd fix(ultrawork): lazy-load bun:sqlite to support Node/Electron runtime
Top-level `import { Database } from 'bun:sqlite'` caused Node/Electron's
ESM loader to reject the plugin at module-graph resolution time because
the `bun:` protocol is not in Node's allowed scheme list. This prevented
the OpenCode desktop app from loading the plugin at all.

Fix:
- Remove top-level static import of `bun:sqlite`
- Use a lazy importer (`_bunSqliteImporter`) that calls
  `import('bun:sqlite').catch(() => null)` at runtime
- If the import returns null (non-Bun environment), log a warning and
  return early — no DB override attempted, plugin loads normally
- Expose `__setBunSqliteImporterForTesting` / `__resetBunSqliteImporterForTesting`
  test seams to verify the Node/Electron fallback path

Closes #3795
2026-05-05 19:09:31 +09:00
YeonGyu-Kim 61ea99a72b fix(process-cleanup): add test seam to prevent process.exitCode contaminating bun runner
fix(process-cleanup): isolate test to prevent process.exitCode leaking into shared batch CI
2026-05-05 19:09:19 +09:00
YeonGyu-Kim 32fab88d68 fix(process-cleanup): add test seam to prevent process.exitCode contaminating bun runner
scheduleForcedExit() sets process.exitCode which taints the bun test runner's
own exit code for the entire suite. This caused CI to fail even though all
tests passed individually.

Fix:
- Add __disableScheduledForcedExitForTesting / __enableScheduledForcedExitForTesting
  seams to skip scheduleForcedExit() during tests
- beforeEach disables forced exit; afterEach re-enables
- The 'fallback exit timer' test explicitly re-enables to verify setTimeout/clearTimeout
- Remove process.exitCode and exitSpy assertions that required forced exit to be active
  (shutdown call counts are sufficient to verify behavior)
2026-05-05 19:04:40 +09:00
YeonGyu-Kim ad535cd29d fix(process-cleanup): isolate test and avoid checking process.exitCode directly
The test file modifies process.exitCode and emits process signals which can
leak into bun test's exit code. Add:
1. mock.module() sentinel to route to isolated batch (following abort-with-timeout.test.ts pattern)
2. Global afterAll() hook that resets process.exitCode = 0 before test runner checks it
3. Remove direct checks of process.exitCode in assertions - only check that process.exit() was called with the right code via spy

This ensures bun test exits with code 0 even after tests verify process.exit behavior.

Fixes #3792
2026-05-05 05:15:59 +09:00
YeonGyu-Kim 45452a039c Merge pull request #3731 from yizhifengye/fix/process-cleanup-infinite-loop-epipe
fix(background-agent): detach error listener before running body to s…
2026-05-05 04:24:01 +09:00
YeonGyu-Kim fd62f5b072 Merge pull request #3639 from auyua9/fix/fatal-cleanup-exit
fix(background): exit after fatal cleanup
2026-05-05 04:15:50 +09:00
YeonGyu-Kim ef7ac52286 Merge pull request #3771 from tw-yshuang/fix/atlas-pending-continuation-race
fix(atlas): block continuation while delegated tasks are pending
2026-05-05 04:15:46 +09:00
YeonGyu-Kim b43f849fb4 Merge pull request #3791 from code-yeongyu/fix/parentSessionId-typo
fix(background-agent): fix parentSessionID -> parentSessionId typo causing TS build failure
2026-05-05 04:05:19 +09:00