Commit Graph

588 Commits

Author SHA1 Message Date
Dhruv Sharma e486f1927e
Merge pull request #844 from ChiragArora31/feat/doctor-plugin-resolution 2026-04-01 10:35:59 +05:30
ChiragArora31 4420ab1773 feat(cli): add plugin resolution checks to ao doctor 2026-04-01 06:39:14 +05:30
Dhruv Sharma f358123057
Merge pull request #849 from ComposioHQ/ci/auto-deploy-vps
add GitHub Actions workflow for deploying to VPS
2026-04-01 03:36:38 +05:30
Dhruv Sharma 2ef3141856 ci: guard against stale reruns and pin SSH host fingerprint
- Skip deploy if CI SHA is not the current tip of main (prevents stale
  rerun from rolling back production)
- Add SSH host fingerprint to prevent MITM during deployment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 02:14:14 +05:30
Dhruv Sharma 3d9d317cc2 ci: deploy exact CI-passed SHA, ignore PR runs
- Checkout the specific commit that passed CI instead of origin/main tip
- Only deploy on push events to main, skip PR CI runs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:34:19 +05:30
Dhruv Sharma c10d620adf ci: wait for CI to pass before deploying to VPS
Uses workflow_run trigger so deploy only runs after CI succeeds on main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:26:48 +05:30
Dhruv Sharma 50589b17de ci: add auto-deploy workflow for VPS
Deploys to Hetzner VPS on every push to main via SSH.
Pulls latest, installs deps, builds, and restarts pm2 services.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 00:05:31 +05:30
Dhruv Sharma bb8ac3a68d add GitHub Actions workflow for deploying to VPS 2026-03-31 23:44:16 +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 f6dc8181df
Merge pull request #832 from ComposioHQ/feat/openclaw-dx
Feat/openclaw dx
2026-03-31 20:57:36 +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
Dhruv Sharma f9b3a4af20
Merge pull request #831 from ComposioHQ/feat/core-plugin-config
Feat/core plugin config
2026-03-31 19:55:16 +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 04bb56d15f
Merge pull request #823 from harshitsinghbhandari/fix/error
tests: Add Test Coverage Improvements for Recovery and Session Management
2026-03-31 13:59:00 +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
harshitsinghbhandari 23e006b00c fix: add type casts for mock promisify and registry.get
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-31 13:25:17 +05:30
harshitsinghbhandari 23f2f0dbeb fix: remove unused variable declarations in session-manager test
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-31 13:25:17 +05:30
harshitsinghbhandari 994297ca7e test: clean up session directories in recovery-actions afterEach
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-31 13:25:17 +05:30
harshitsinghbhandari 03e3426625 test: clarify error propagation test scope in session-manager
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-31 13:25:17 +05:30
harshitsinghbhandari 8fdcaff11e test: fix execFile mock to match Node callback contract
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-31 13:25:17 +05:30
harshitsinghbhandari 4a68fd9f99 test(core): fix timeouts in session manager communication tests
- Mock runtime output changes in OpenCode unit tests to trigger early
  delivery confirmation, reducing poll time from 3s to 500ms.
- Increase timeout for confirmation fallback tests to 10s to accommodate
  process-spawn overhead of mock binaries on some systems.
- Ensures reliable CI execution for @composio/ao-core tests.
2026-03-31 10:51:54 +05:30
harshitsinghbhandari 4d91457a01 test: ensure fake timers are restored in afterEach cleanup
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-31 10:14:59 +05:30
fireddd 68eafe9f0d ci: only run coverage for packages with changed files
Uses dorny/paths-filter to detect which packages have changes.
Tests and coverage only run for affected packages — e.g. a
web-only change won't trigger core or CLI tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 09:28:31 +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 4c39dbe3ad refactor(plugin-registry): improve plugin specifier resolution and error handling 2026-03-31 04:24:30 +05:30
Dhruv Sharma 97b0646022 improve notifier-openclaw error messages 2026-03-31 04:02:33 +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