Commit Graph

172 Commits

Author SHA1 Message Date
Your Name f07aedfa58 fix: resolve prompt delivery persistence and false warnings 2026-04-06 22:46:29 -07:00
Your Name 3d1913e690 fix: robust prompt delivery with retries and CLI warnings 2026-04-06 22:46:29 -07:00
ChiragArora31 4d33d25126 fix: detect nested project directories in CLI auto-resolution 2026-04-01 18:28:57 +05:30
Dhruv Sharma 2febded969
Merge pull request #836 from ChiragArora31/feat/status-watch-mode
feat(cli): add watch mode to ao status
2026-04-01 12:28:32 +05:30
ChiragArora31 10a41cfafa fix(cli/status): validate --interval only when --watch is used
The --interval flag is only relevant when --watch is enabled.
Previously, passing `--interval 0` without `--watch` threw an error,
whereas `--interval 5` was silently ignored. Now, invalid intervals
are ignored when `--watch` is omitted, ensuring consistent behavior.

Also adds a test case to prevent regression.
2026-04-01 11:05:30 +05:30
ChiragArora31 5a186fbb7f test(cli/status): add tests to hit 80% diff coverage threshold
Cover the following previously-uncovered lines in status.ts:
- 65-69: maybeClearScreen() isTTY branch
- 255-256: maybeClearScreen() call on watch refresh (refreshing=true)
- 262-266: loadConfig() throw → fallback to tmux session discovery
- 269-271: unknown --project flag → process.exit(1)
- 388, 390-396, 398: tracker block (registry.get, listIssues, error catch)
- 402-405: unverified issues warning banner
- 424-436: setInterval guard skips render when already in progress

Also hoists mockGetPluginRegistry as a vi.fn() so individual tests
can override the plugin registry returned by getPluginRegistry.
2026-04-01 10:37:12 +05:30
ChiragArora31 70232baf29 fix(cli): clean up status watch timer on shutdown 2026-04-01 09:27:38 +05:30
ChiragArora31 2d6bc7671d feat: add watch mode to status command 2026-04-01 09:26:59 +05:30
ChiragArora31 4420ab1773 feat(cli): add plugin resolution checks to ao doctor 2026-04-01 06:39:14 +05:30
Dhruv Sharma 7d7fb92d7b
Merge pull request #837 from fireddd/ci/diff-coverage-threshold
ci: add diff coverage workflow enforcing 80% on changed code only
2026-03-31 20:58:33 +05:30
Dhruv Sharma 124f7d30ee Merge main into feat/openclaw-dx - resolve conflicts
Conflicts resolved in 3 files:
- plugin-marketplace.ts: take main's createRequire approach, keep isAbsolute fix
- plugin-scaffold.ts: take main's newline escaping (superset of backslash fix)
- plugin.test.ts: take main's importOriginal pattern

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:05:16 +05:30
Dhruv Sharma 1701e03aac
Merge pull request #833 from ComposioHQ/feat/plugin-marketplace
Feat/plugin marketplace
2026-03-31 20:01:39 +05:30
Harsh Batheja 66aa92aec0
fix: use pnpm dev in monorepo to start terminal WebSocket servers (#846)
In dev mode, `npx next dev` only starts Next.js without the terminal
WebSocket servers. Detect monorepo by checking for `server/` dir and
use `pnpm run dev` which runs both via concurrently.
2026-03-31 19:13:49 +05:30
Dhruv Sharma fe1d45b0a7 fix: address production failure modes from adversarial review
- Rollback plugin config on setup failure so a half-configured
  notifier is never left enabled (non-transactional install fix)
- Use atomic temp+rename for health summary writes to prevent
  corruption under concurrent notifications
- Scope credential injection to only when OpenClaw notifier is
  configured, avoiding ambient secret exposure to unrelated projects

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:39:49 +05:30
Dhruv Sharma 166ace7477 refactor: extract fetch timeout into named constant
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:38:28 +05:30
Dhruv Sharma 6cfb1cc864 fix: guard statSync against permission errors, add fetch timeout
- Wrap statSync in try/catch in resolveLocalPluginEntrypoint so
  permission-denied errors return null instead of crashing
- Add 30s AbortSignal timeout to refreshMarketplaceCatalog fetch
  to prevent indefinite hangs on slow networks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:37:52 +05:30
Dhruv Sharma d36c0947cf refactor: deduplicate plugin resolution logic between core and CLI
Export isPluginModule, normalizeImportedPluginModule,
resolvePackageExportsEntry, and resolveLocalPluginEntrypoint from
@composio/ao-core and import them in the CLI instead of maintaining
independent copies that have already diverged.

Removes ~70 lines of duplicated code from plugin-marketplace.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 13:53:30 +05:30
Dhruv Sharma 153c298a46 fix: resolve plugin-registry.json from package root
createRequire resolves relative to the compiled dist/lib/ directory
where the JSON file doesn't exist. Use readFileSync with a path
resolved from the package root (../../src/assets/) which works from
both src/lib/ and dist/lib/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 13:45:54 +05:30
fireddd e6c3a06427 ci: add diff coverage workflow enforcing 80% on changed code only
Uses diff-cover to check that newly added or modified lines in PRs
have at least 80% test coverage, without requiring the entire
codebase to meet the threshold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 09:26:36 +05:30
Dhruv Sharma 6930f2ee12 fix: use createRequire for JSON import (Node16 module compat)
Import attributes aren't supported with module: "Node16". Switch to
createRequire for the plugin-registry.json import and copy assets
to dist during build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:11:24 +05:30
Dhruv Sharma 2c0a32da24 fix: use createRequire for JSON import (Node16 module compat)
Import attributes (`with { type: "json" }`) require module >= node18.
Use createRequire instead since tsconfig targets Node16.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:10:50 +05:30
Dhruv Sharma 545bede0b4 fix: add JSON import attribute for Node.js 20 compatibility
Add `with { type: "json" }` to the plugin-registry.json import to
satisfy Node.js 20's ERR_IMPORT_ASSERTION_TYPE_MISSING requirement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:08:13 +05:30
Dhruv Sharma 42adf3f35d fix: add JSON import attribute for plugin-registry.json
Node.js v20 requires `with { type: "json" }` for JSON module imports.
This fixes the ERR_IMPORT_ASSERTION_TYPE_MISSING error in the onboarding
integration test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:07:56 +05:30
Dhruv Sharma 7eac80cec4 fix: resolve lint errors in plugin, start, and test files
- Remove unused `resolve` import from plugin.ts
- Use strict equality (`!== null && !== undefined`) instead of `!=` in start.ts
- Attach `cause` to re-thrown errors in plugin install/update rollback
- Fix forbidden `import()` type annotation in plugin test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:05:50 +05:30
Dhruv Sharma 89d6f95723 fix: export runSetupAction, fix lint errors in plugin command
- Export runSetupAction from setup.ts (fixes TS2459 build error)
- Use rollbackErr as cause in re-thrown errors (preserve-caught-error)
- Remove import() type annotation from test mock (consistent-type-imports)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:04:29 +05:30
Dhruv Sharma 41989b71bc fix: remove dead code, validate SHELL path, and guard health JSON parsing
- Remove unused printPluginList wrapper (all callers use printPluginListFromCatalog directly)
- Remove unused getAgentFromRegistry export (all callers use getAgentByNameFromRegistry)
- Validate SHELL env var starts with / before passing to spawnSync
- Add shape validation for openclaw-health.json parsed content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:01:28 +05:30
Dhruv Sharma 1df727782c fix: resolve pre-existing lint errors in plugin command
- Remove unused `resolve` import from node:path
- Add `{ cause: err }` to re-thrown errors (preserve-caught-error rule)
- Fix import() type annotation in plugin test (consistent-type-imports)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 05:00:30 +05:30
Dhruv Sharma 1271ef8fbd fix: add missing default exports fallback and remove dead code
- Add top-level "default" key fallback in CLI's resolvePackageExportsEntry
  to match core's plugin-registry.ts (fixes local plugin resolution for
  packages using exports: { "default": "./dist/index.js" })
- Remove dead exports: MARKETPLACE_PLUGIN_CATALOG, printPluginList,
  getAgentFromRegistry, resolveInstalledPluginSpecifier
- Fix incomplete string escaping in plugin scaffold (backslash/newline)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:57:25 +05:30
Dhruv Sharma 846ddc4135 refactor: enhance OpenClaw plugin interfaces and improve setup options 2026-03-31 04:56:03 +05:30
Dhruv Sharma 76c3a78d68 add OpenClaw health checks to ao doctor 2026-03-31 04:02:33 +05:30
Dhruv Sharma b613158675 auto-detect OpenClaw in non-interactive setup 2026-03-31 04:02:33 +05:30
Dhruv Sharma 85924b82a8 wire OpenClaw status and credentials into ao start 2026-03-31 04:02:33 +05:30
Dhruv Sharma 4d142eac1f add credential resolver for OpenClaw key sharing 2026-03-31 04:02:33 +05:30
Dhruv Sharma a10ceb6c09 enhance openclaw-probe with installation detection 2026-03-31 04:02:33 +05:30
Dhruv Sharma 7445e134c4 add plugin spec and update docs 2026-03-31 04:02:25 +05:30
Dhruv Sharma 594c371e37 add browser-open error handling 2026-03-31 04:02:25 +05:30
Dhruv Sharma 9ba04391d9 use plugin store for shared loader paths 2026-03-31 04:02:25 +05:30
Dhruv Sharma b4b111a910 add ao plugin CLI commands 2026-03-31 04:02:25 +05:30
Dhruv Sharma df9409eceb add plugin scaffold generator 2026-03-31 04:02:25 +05:30
Dhruv Sharma bd60fb7b52 extract marketplace catalog to JSON with refresh 2026-03-31 04:02:25 +05:30
Dhruv Sharma 39396d4534 add cli error formatter and plugin store 2026-03-31 04:02:25 +05:30
Gautam Tayal 79938be822 refactor(cli): replace clack prompts with custom promptSelect function 2026-03-30 15:32:15 +05:30
Gautam Tayal fbf177300e refactor(cli): simplify agent selection prompt by removing unnecessary confirmation step 2026-03-30 15:32:15 +05:30
Gautam Tayal da8aabe0f2 feat(cli): add interactive option for agent configuration prompt before starting 2026-03-30 15:32:15 +05:30
Gautam Tayal 2282e0e9c9 fix: update jsdocs 2026-03-30 15:32:15 +05:30
Gautam Tayal 7d42dd7672 fix(cli): reload project configuration after saving changes 2026-03-30 15:32:15 +05:30
Gautam Tayal 56b36613f6 refactor(cli): streamline agent handling in spawn command 2026-03-30 15:32:15 +05:30
Gautam Tayal 7ca7632e73 refactor(cli): remove save to config option 2026-03-30 15:32:15 +05:30
Gautam Tayal 8c23903fa2 feat: add agent selection prompt 2026-03-30 15:32:15 +05:30
Dhruv Sharma d65d72e5c1
Merge pull request #797 from gautamtayal1/refactor/migrate-to-clack-prompts
refactor(cli): replace readline prompts with clack prompts
2026-03-29 22:17:49 +05:30