Commit Graph

68 Commits

Author SHA1 Message Date
YeonGyu-Kim 34e6af1ae6 docs: update AGENTS guidance 2026-05-18 11:49:56 +09:00
YeonGyu-Kim 4f9813848a feat: add ci test runner, session routing, bash parser, and test fixtures
- script/run-ci-tests.ts: CI test sharding and isolation logic
- script/run-ci-tests.test.ts: tests for CI test target selection
- src/features/background-agent/session-route.ts: session prompt routing for background agents
- src/hooks/interactive-bash-session/parser.ts: interactive bash output parser
- src/hooks/ralph-loop/completion-promise-detector-test-input.ts: test fixture for completion promise detection
2026-05-16 23:51:43 +09:00
YeonGyu-Kim d8f52aae7f test: run suite without split runner 2026-05-15 16:26:57 +09:00
YeonGyu-Kim e80c2811b1 ci: fail closed on sharded test gate 2026-05-15 12:07:58 +09:00
YeonGyu-Kim fdd40815ba ci: split test workflow across shards
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:41:35 +09:00
YeonGyu-Kim 53de295b21 perf(ci): add sharded test runner phases
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-15 11:41:35 +09:00
YeonGyu-Kim 4150092e9a test: run suite through isolated mock runner 2026-05-12 15:30:45 +09:00
ShishaBoyTJ 8236d7d6b8 fix: support cmux tmux compatibility 2026-05-07 19:25:50 +09:00
YeonGyu-Kim 8003d1a147 test(ci): isolate stateful tests in CI runner
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-06 14:20:50 +09:00
YeonGyu-Kim 690d107334 ci: adapt workflows and test runner for team-mode 2026-05-06 14:19:40 +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
GeonWoo Jeon (Jay) ade57474be fix(merge): resolve dev conflicts for openclaw branch 2026-04-09 12:23:38 +09:00
GeonWoo Jeon (Jay) 6aab2f7b34 fix(schema): use zod native json schema output 2026-04-09 12:09:09 +09:00
GeonWoo Jeon (Jay) f82cc81c33 fix(ci): isolate discord reply listener test 2026-04-09 12:09:09 +09:00
YeonGyu-Kim dc1546c613 fix(ci): isolate mock.module tests per-file to prevent cross-contamination 2026-04-08 17:30:53 +09:00
YeonGyu-Kim 902b2f9f58 test(ci): update workflow test to match actual CI command
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:40:38 +09:00
YeonGyu-Kim 18771c8d6d fix(schema): restore z.toJSONSchema native v4 API 2026-04-08 12:59:54 +09:00
YeonGyu-Kim 83a80e21fb fix(ci): add skipLibCheck to script tsconfig to avoid bun-types/@types/node conflicts
CI ubuntu-latest has @types/node ambient types that conflict with
bun-types for CompressionStream/DecompressionStream declarations.
skipLibCheck skips checking .d.ts files from node_modules.
2026-04-07 18:36:56 +09:00
YeonGyu-Kim 23180c6ba6 fix(schema): use zodToJsonSchema instead of z.toJSONSchema for zod v3 compat
z.toJSONSchema is a zod v4 API. We pin zod to ^3.24.0 for opencode
compatibility, so use zodToJsonSchema from zod-to-json-schema package.
2026-04-06 18:51:56 +09:00
YeonGyu-Kim e2d73f482a ci: run pure bun test in workflows
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-06 18:45:33 +09:00
YeonGyu-Kim 41af547fc7 fix(schema): use Zod native JSON schema output
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-06 18:45:33 +09:00
YeonGyu-Kim bd723b5163 fix(tests): repair test regressions from zod v3 downgrade
- Fix zod/v4 imports in background-task schema tests
- Remove ZWSP prefix from agent-key-remapper test (fixed in #3136)
- Use toMatchObject for openai-only catalog tests (fallback_models added by #3144)
- Replace z.toJSONSchema (zod v4) with zodToJsonSchema (zod v3 compat)
- Fix task-list.ts type narrowing for zod v3 inferred types
2026-04-06 14:43:19 +09:00
YeonGyu-Kim d6add1f56d test: update workflow test to expect run-ci-tests.ts 2026-04-05 01:17:19 +09:00
YeonGyu-Kim 89fd302db4 Update publish-workflow test for bun test command
- Change test expectation from "bun run test:ci" to "bun test"

🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
2026-04-04 18:56:26 +09:00
YeonGyu-Kim a71dd54f8e fix(test): isolate auto-update-checker mock.module() tests to prevent contamination
- Moved hook.test.ts, background-update-check.test.ts, workspace-resolution.test.ts, and cache.test.ts to separate sibling directories (_auc-mocks-hook, _auc-mocks-bg, _auc-mocks-ws, _auc-mocks-cache)
- Separated sync-package-json.test.ts to _auc-sync-mocks
- Fixed all relative import paths to account for new directory structure
- Bun runs same-directory test files in parallel; mock.module() calls contaminate each other. Only reliable isolation is separate directory = separate CI batch
- CI plan now creates individual isolated target for each mocking test file, preventing cross-file pollution
2026-04-04 17:53:24 +09:00
YeonGyu-Kim bedf141c5e fix(ci): include bin tests in CI plan discovery
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 16:12:22 +09:00
YeonGyu-Kim 2c081e1999 fix(ci): restore isolated Bun test execution for mock.module suites
Running Linux CI in one Bun process still leaks mock.module registrations across files, so the workflows now use a CI-specific test runner that isolates mock-heavy targets before executing the remaining suite together.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 15:51:54 +09:00
YeonGyu-Kim 5946dba47d ci: run publish workflow tests via bun test 2026-04-04 01:51:48 +09:00
YeonGyu-Kim d2c576c510 fix: resolve 25 pre-publish blockers
- postinstall.mjs: fix alias package detection
- migrate-legacy-plugin-entry: dedupe + regression tests
- task_system: default consistency across runtime paths
- task() contract: consistent tool behavior
- runtime model selection, tool cap, stale-task cancellation
- recovery sanitization, context-limit gating
- Ralph semantic DONE hardening, Atlas fallback persistence
- native-skill description/content, skill path traversal guard
- publish workflow: platform awaited via reusable workflow job
- release: version edits reapplied before commit/tag
- JSONC plugin migration: top-level plugin key safety
- cold-cache: user fallback models skip disconnected providers
- docs/version/release framing updates

Verified: bun test (4599 pass), tsc --noEmit clean, bun run build clean
2026-03-28 15:24:18 +09:00
Ravi Tharuma 2af9324400 feat: add models.dev-backed model capabilities 2026-03-25 14:47:46 +01:00
YeonGyu-Kim caf595e727 fix(build-binaries): prevent test imports from triggering binary builds
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 10:47:33 +09:00
YeonGyu-Kim f31f50abec fix(release): revert package identity to oh-my-opencode
Keep installer, config detection, schema generation, and publish workflows aligned with the long-lived oh-my-opencode package so this release does not split across two npm names.

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 6aeda598b9 feat(schema): generate oh-my-openagent schema alongside legacy schema
Update build script to generate both oh-my-opencode.schema.json (backward
compatibility) and oh-my-openagent.schema.json (new package name).
Also adds delegate-task-english-directive hook to schema.

🤖 Generated with assistance of OhMyOpenCode
2026-03-14 12:45:58 +09:00
YeonGyu-Kim a2fd6d77bd docs: update all GitHub URLs from oh-my-opencode to oh-my-openagent
The GitHub repository was renamed from oh-my-opencode to oh-my-openagent,
but all documentation, scripts, and source code references still pointed
to the old repository name. This caused confusion for users who saw
'oh-my-opencode' in docs but a different repo name on GitHub.

Updated all references across:
- README files (en, ko, ja, zh-cn, ru)
- CONTRIBUTING.md
- docs/ (installation, overview, configuration, etc.)
- Source code (schema URLs, GitHub API calls, issue links)
- Test snapshots

The npm package name remains 'oh-my-opencode' (unchanged).

Fixes: https://x.com/Dhruv14588676/status/2031216617762468348
2026-03-10 15:18:16 +09:00
YeonGyu-Kim f383d7abb5 Revert "Merge pull request #1951 from edxeth/feat/custom-agents"
This reverts commit 47e300b17e, reversing
changes made to 243ce1b7e8.
2026-03-02 23:55:48 +09:00
YeonGyu-Kim 47e300b17e Merge pull request #1951 from edxeth/feat/custom-agents
feat(config): make custom agents first-class for planning and delegation
2026-03-02 23:28:57 +09:00
edxeth d7ab5c4d7b refactor(schema): dedupe custom agent override with ref 2026-02-26 21:39:04 +01:00
Jeon Suyeol 0cc9edac17 replace master branch references with dev across docs, schema URLs, and tests 2026-02-27 00:49:53 +09:00
YeonGyu-Kim 2d79d64bb2 fix(build): correct JSON schema target from draft-07 to draft-7
Fix invalid target warning in schema generation.
Schema regenerated with correct draft-7 target.
2026-02-21 14:19:52 +09:00
YeonGyu-Kim c1c7d18133 fix: resolve 4 publish blockers — CLI bin, schema export, security vulns, doc link
- Remove leading ./ from bin entry (npm strips invalid paths)
- Write schema to dist/ for export map compatibility (keep assets/ for GitHub URL)
- Remove unused codex dep + bump @modelcontextprotocol/sdk to ^1.25.2
- Fix broken relative link in configuration.md (../guide/installation.md)

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 13:59:53 +09:00
YeonGyu-Kim aab8a23243 fix(schema): generate full JSON schema with Zod v4 2026-02-13 11:08:46 +09:00
YeonGyu-Kim 7b8204924a feat(config): update task config schema for global storage
- Make storage_path truly optional (remove default)
- Add task_list_id as config alternative to env var
- Fix build-schema.ts to use zodToJsonSchema

🤖 Generated with assistance of OhMyOpenCode
2026-02-04 15:04:49 +09:00
justsisyphus 2efbf2650f fix(cli): add baseline builds for non-AVX2 CPUs (#1154) 2026-01-27 10:35:20 +09:00
justsisyphus 5e27ceeb81 refactor(agents): streamline sisyphus prompt and remove generator script
Simplify sisyphus prompt by removing redundant sections and inline generation. Delete generate-sisyphus-prompt.ts as prompts are now managed directly in the agent definition.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-22 22:45:05 +09:00
justsisyphus 8b820c5374 refactor(publish): parallel platform jobs with fresh OIDC tokens per job
- Split monolithic publish into build + parallel publish-platform + publish-main + release jobs
- Each platform package gets its own OIDC token (fixes token expiration during large binary uploads)
- Add --prepare-only flag to publish.ts for build step version sync
- Matrix strategy: 7 parallel platform jobs
- publish-main waits for all platforms before publishing main package
2026-01-22 10:58:35 +09:00
justsisyphus 85b7e9737c fix(publish): disable provenance for platform packages via env override
NPM_CONFIG_PROVENANCE env var was overriding useProvenance=false in code.
Now explicitly sets NPM_CONFIG_PROVENANCE=false for platform packages
to prevent OIDC token expiration during large binary uploads.
2026-01-22 10:49:20 +09:00
justsisyphus 3bea6a043d fix(publish): robust error handling, republish mode, separate tag/branch push
- Fix 404 error handling: no longer incorrectly marks failed publishes as 'already published'
- Add REPUBLISH mode: allows re-publishing missing platform packages without version check
- Separate tag and branch push: tag push (critical) succeeds even if branch push fails
- Fix changelog for beta releases: compares against previous beta tag instead of latest stable
- Add checkPackageVersionExists for accurate E403 error handling
2026-01-22 10:40:39 +09:00
justsisyphus 681cc566b4 fix(publish): handle E404+OIDC expiration as already-published 2026-01-19 15:29:46 +09:00