Commit Graph

18 Commits

Author SHA1 Message Date
Alberto Schiabel 956f9be9b4 chore(agents): normalize repo guidance skills (#3666)
This PR:
- replaces the duplicated repo-local skill set with the requested
canonical `.agents/skills` taxonomy and short router `SKILL.md` files
backed by first-level references
- makes `.claude/skills` a compatibility symlink to `.agents/skills` and
removes hand-maintained Claude skill/rule copies
- moves docs agent guidance and decisions into neutral
`docs/agent-guidance/` and `docs/decisions/`, with `docs/CLAUDE.md`
reduced to a shim
- retires CLI Cursor rules after migrating CLI design, Effect source,
and client-cache sync guidance into `AGENTS.md` and `cli-command`
- adds nested `AGENTS.md` files for TS, core, providers, e2e, Python,
Python providers, and docs
- adds `pnpm validate:agent-skills` to validate skill frontmatter,
taxonomy, references, symlink invariants, stale paths, and command names
- implements missing Python `tst` and `snt` nox sessions that existing
Makefile targets already exposed
- no changeset: repository guidance/tooling only, no published SDK
package behavior

## Verification
- `pnpm validate:agent-skills` -> `Validated 14 canonical agent skills
and guidance invariants.`
- `for skill in .agents/skills/*; do python
/Users/jkomyno/.codex/skills/.system/skill-creator/scripts/quick_validate.py
"$skill" || exit 1; done` -> 14x `Skill is valid!`
- `pnpm --dir ts/packages/cli validate:skills` -> `Validated
composio-cli skill builds for stable and beta.`
- `cd python && uv run nox --list` -> includes `tst` and `snt`
- `cd python && uv run nox -s snt` -> 18 passed
- `cd python && uv run nox -s tst -- tests/test_imports.py` -> 8 passed
- `git diff --check` / `git diff --cached --check` -> clean
- stale reference search for retired docs/Claude/Cursor paths -> no
matches

## Forward Tests
- TypeScript core bug: loaded `bug-fixing`, `typescript-sdk`,
`typescript-testing`; found correct root/ts/core `AGENTS.md` route.
- Python provider: loaded `python-providers`, `python-testing`; found
missing nox sessions, fixed here.
- CLI command: loaded `cli-command`; found recording/changeset wording
gaps, fixed here.
- Cross-SDK drift: loaded `cross-sdk-parity`; again found Python nox
drift, fixed here.
- Docs + decision: loaded `docs-decisions`; found decision
template/index and Twoslash path gaps, fixed here.

## Notes
The first normal `git commit` attempt hit a lint-staged/Git stash
limitation while replacing `.claude/skills/` with a symlink (`path ...
beyond a symbolic link`). The final commit used `--no-verify` after the
validators and formatting checks above passed.
2026-06-27 00:35:57 +04:00
Rahul Tarak d17a268d3f docs: sessions-first rewrite — new guides, examples & components (+ core 0.13.0 SDK changes) (#3637)
Integration branch for the next docs release: a **sessions-first
documentation rewrite** — new and rewritten guides, example pages,
interactive components, and docs tooling — plus the supporting SDK
changes that the new docs describe.

The bulk of this PR is docs (~24k lines across ~150 commits); the SDK
changes (~5k lines) back the new guides.

## Documentation (the bulk)

- **Sessions-first restructure** — reorganized navigation and section
structure (incl. the "Sandbox (prev workbench)" section), with
v3-reorganization redirects so old URLs keep resolving.
- **Rewritten core guides** — quickstart, configuring sessions, triggers
(creating + subscribing to events), proxy-execute, toolkits
enable/disable, and common FAQ, rewritten in the house voice.
- **New example pages** — local-sandbox PR reviewer, daily standup bot,
and slack bot, with runnable build-ups.
- **New interactive components & diagrams** — triggers flow animation,
manage-connections visual, connection-refresh visual, and the
terminal-kit components.
- **Docs tooling** — a docs-graph link-graph connectivity checker,
search reprioritization (deprioritize legacy pages), and SDK-reference
regeneration.

## Supporting SDK changes

**`@composio/core` → 0.13.0 (minor)**
- `composio.sessions.create()` as the first-class sessions API
(`composio.create()` kept as an alias).
- **MCP is opt-in:** default `create()` / `use()` return native-tool
sessions (`SessionWithoutMcp`); pass `{ mcp: true }` to surface
`session.mcp`. _Migration: read `session.mcp` only after creating with
`{ mcp: true }`._
- `session.sandbox` is the canonical resolved config;
`session.workbench` kept as a deprecated alias. `sandbox` is the
preferred session-config key (`workbench` still accepted).
- `connectedAccounts.updateAcl()` graduated from experimental (alias
kept).
- `triggers.parse()` (parse + optionally verify an incoming webhook) and
`triggers.setWebhookSubscription()`.

**`@composio/experimental` → minor** — local-workbench helpers moved
onto the `@composio/experimental/workbench` subpath (out of
`@composio/core/experimental`), keeping the ~14 KB embedded Python
helper out of core. Plus the experimental Pi provider.

**`@composio/slim` → minor.**

**Python → 0.17.0** — mirrors the TS surface: `composio.sessions` mount
(`tool_router` deprecated), `triggers.parse()` /
`set_webhook_subscription()`, the `sandbox` config key, and
`connected_accounts.update_acl()`.

## Review response (#3664)

Addressed the `@composio/core` review:
- **Security:** `triggers.parse()` no longer fails open — a
present-but-empty `verifySecret` (e.g. unset `COMPOSIO_WEBHOOK_SECRET`)
now throws instead of silently skipping verification; omitting it stays
an explicit opt-out (both SDKs).
- Removed snake_case leakage from `transformWebhookSubscription` (+ the
index signature that allowed it).
- **Removed** the TS-only `connectedAccounts.link()` toolkit
auto-resolve (shipped with cancellability / orphaned-auth-config bugs
and was effectively undocumented; to be reintroduced properly later).
- Unified Python error types on `ValidationError`; added `mcp=True`
Python tests; fixed runtime-portability + error-type test assertions.
- Polished deprecation messages; fixed the backwards `/experimental`
`@deprecated` note and the `SessionWithMcp` JSDoc.

## Testing

- **TS:** `@composio/core` + `@composio/experimental` typecheck pass;
vitest green for the touched suites.
- **Python:** `test_tool_router.py` + `test_triggers.py` pass (161
tests).

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Kshitij Jhunjhunwala <kj@composio.dev>
Co-authored-by: Malay Vasa <malayvasa@gmail.com>
Co-authored-by: Sarah Simionescu <sarah@composio.dev>
Co-authored-by: Kshitij Jhunjhunwala <113939507+KJ-11@users.noreply.github.com>
2026-06-25 18:27:43 -07:00
Alberto Schiabel 80448048a8 docs: remove legacy custom tools references and retarget redirects (#3510)
This PR is **part 3 of 3** splitting
https://github.com/ComposioHQ/composio/pull/3505 to make the removal of
the old 2025 custom tools easier to review. It carries the **docs**
slice.

- builds on top of https://github.com/ComposioHQ/composio/pull/3509
(stacked — this PR's base is `remove-ts-custom-tools`)
- deletes the legacy `/docs/tools-direct/custom-tools` page and prunes
its `meta.json` entry
- retargets redirects for `/docs/tools-direct/custom-tools` and the
`:path*` wildcard to `/docs/toolkits/custom-tools-and-toolkits`, with
matching `redirects.test.ts` expectations
- updates migration-guide, glossary, proxy-execute, and executing-tools
prose; fixes the `ctx.proxyExecute` example to include the required
GitHub toolkit
- updates agent guidance (`AGENTS.md`, `building-agents` skills) to the
experimental custom tools API

## Notes

- This slice is a byte-identical subset of #3505 — the three split
branches recombine to that PR's exact tree. Docs link/redirect checks
could not run in the source checkout (missing docs deps); CI runs them
per PR.
2026-06-04 23:54:08 -07:00
Rahul Tarak 341cdcf596 Add CLI dev mode config toggle (#3181)
## Summary

Turns `composio dev` into a real developer-mode switch backed by CLI
user config, and hides the developer subcommand tree when the mode is
off.

## `composio dev` changes

- **New `--mode on|off` option** on the `dev` command
(`Options.choice('mode', ['on', 'off'])`, optional).
- **Visibility-gated subcommands.** `buildDevCommand(visibility)` only
attaches the developer subcommand tree (`init`, `tools execute`,
`triggers listen`, `logs`, `toolkits`, `auth-configs`,
`connected-accounts`, `triggers`, `projects`) when
`visibility.isDevModeEnabled` is true. When off, `composio dev` is a
leaf command whose only job is toggling the mode.
- **Handler behavior:**
- `composio dev` with no flag → interactive `select` prompt (Turn on /
Turn off / Keep current). Non-TTY → prints current state and exits with
a hint to pass `--mode on|off`.
- `composio dev --mode on` → shows a boxed warning note about unlocking
advanced commands, then `confirm` before flipping. Non-TTY refuses to
enable and points the user at the config file path.
  - `composio dev --mode off` → flips immediately.
- No-op if the requested state already matches; logs current state
instead of rewriting config.
- **Description swaps with mode.** When dev mode is on: *"Developer
workflows: init, playground execution, logs, projects, toolkits,
accounts, and triggers."* When off: *"Developer mode controls access to
developer-only workflows. When off, only `composio dev --mode on|off` is
available."*

## Config wiring

- `CliUserConfig` gains a `developer` struct (`{ enabled,
destructive_actions }`) replacing the flat `developer_mode_enabled` /
`developer_dangerous_commands_enabled` keys. `normalizeRawConfigJson`
migrates existing configs on read.
- `ComposioCliUserConfig` service exposes `isDevModeEnabled()`,
`areDeveloperDangerousCommandsEnabled()`, and an `update()` that
persists partial changes to `~/.composio/<cli-config>.json`.
- `cli-main.ts` / `root-help.ts` / `commands/index.ts` consume
visibility so the help output and command tree match the toggle.

## Collateral cleanup

Removed deprecated destructive/info commands that were being guarded
ad-hoc and now fall under the dev-mode gate:

- `auth-configs delete`, `auth-configs info`
- `connected-accounts delete`, `connected-accounts info`
- `triggers delete`
- Corresponding tests deleted; `auth-configs create`, `projects
list/switch`, and `triggers` mutation tests updated for the new
layer/visibility shape.

## Testing

- `ts/packages/cli/test/src/commands/dev.cmd.test.ts` — new coverage for
the toggle handler (TTY/non-TTY, on→on no-op, confirm path, persisted
config).
- `ts/packages/cli/test/src/services/cli-user-config.test.ts` — new
coverage for the `developer` struct, legacy key migration, and
`update()`.
- `ts/packages/cli/test/src/commands/feature-visibility.test.ts` —
updated to exercise visibility-gated subcommands.
- Not run: full workspace test suite.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 19:12:30 -07:00
Rahul Tarak 12ef3d3a50 ci: simplify CLI binary release workflow (#3121)
## Summary

- **Auto-beta on push to `next`**: any merge touching
`ts/packages/cli/**` automatically builds binaries and creates a
`@composio/cli@X.Y.Z-beta.<run_number>` prerelease. Version = latest
stable + patch bump.
- **Stable on version bump**: if `ts/packages/cli/package.json` version
changed in the push commit (i.e. changeset "Release: update version"
merge), creates a stable release instead.
- **`workflow_dispatch` build-beta**: build a beta from any branch on
demand.
- **`workflow_dispatch` promote-stable**: promote an existing beta tag
to stable (unchanged).
- Removes the old PR-title-gated flow (`pull_request` trigger with title
check).

## Test plan

- [ ] Merge into `next` with a CLI change → verify beta release is
created
- [ ] Trigger `workflow_dispatch` with `build-beta` on a feature branch
→ verify beta release
- [ ] Merge a changeset "Release: update version" PR → verify stable
release is created
- [ ] Trigger `workflow_dispatch` with `promote-stable` + existing beta
tag → verify stable release

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 01:22:28 -07:00
Rahul Tarak e7b5a44fb3 Preload custom auth connections into CLI tool router sessions (#3077)
## Summary
- Preloads active connected accounts into CLI Tool Router sessions so
custom-auth toolkits can execute without missing auth context.
- Resolves connected toolkits from the consumer cache path when
available, falling back to the standard connected-toolkit lookup.
- Adds a new session-connection resolver that selects the newest
non-Composio-managed account per toolkit and passes explicit
`auth_configs` and `connected_accounts` into session creation.
- Expands test coverage for custom auth session creation and
connected-account lookup filtering.

## Testing
- Added/updated CLI tests covering `POSTHOG_RUN_ENDPOINT` session
creation with explicit `auth_configs` and `connected_accounts`.
- Added test-layer support for filtering connected accounts by
`toolkit_slugs`, `user_ids`, `statuses`, and `limit`.
- Not run locally.
2026-03-31 15:44:07 -07:00
Rahul Tarak d268e4ab58 Add full-cli-test agent skill with Slack integration tests (#3081)
## Summary

- Adds new `/full-cli-test` agent skill that orchestrates a 3-phase CLI
validation pipeline: poll CI for type/lint → local binary test →
CI-bundled binary test
- Includes a Slack integration test (`#buzz-skill-based-cli-testing`)
that validates `execute()`, `experimental_subAgent()`, `z` (Zod), and
`result.prompt()` in both local and bundled builds
- Updates `/cli-test-with-bundling` to always use `-beta.<timestamp>`
versioning, preventing accidental production releases from test runs

## Test plan

- [ ] Verify `/full-cli-test` skill appears in skill list
- [ ] Run `/cli-test-with-bundling` and confirm the workflow dispatch
uses a beta version
- [ ] Confirm the Slack test script runs against
`#buzz-skill-based-cli-testing`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:58:13 -07:00
Rahul Tarak 125974f59f Add cli-test and cli-test-with-bundling agent skills (#3080)
## Summary

- Adds `cli-test` skill: build the CLI binary locally and test it
directly
- Adds `cli-test-with-bundling` skill: trigger CI binary build via
workflow dispatch, monitor, download artifact, test `run`/`subAgent`,
and post results as a PR comment
- Both symlinked to `.agents/skills/` for Codex compatibility

## Test plan

- [ ] Verify `/cli-test` skill loads and instructions are accurate
- [ ] Verify `/cli-test-with-bundling` skill loads and instructions are
accurate
- [ ] Verify symlinks resolve correctly in `.agents/skills/`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:20:17 -07:00
Rahul Tarak 02e72116da docs(cli): update skills and docs for manage/generate restructure (#2939)
## Summary

Updates all documentation, agent skills, and internal references to
reflect the `manage` namespace and `generate ts`/`generate py`
restructuring from the previous two PRs.

## Changes
- Updated `docs/content/docs/cli.mdx` — all command examples now use
`composio manage ...` and `composio generate ts/py` syntax
- Updated `docs/content/docs/troubleshooting/cli.mdx` — corrected
generation command references
- Updated `docs/content/changelog/03-13-26-cli-improvements.mdx` — fixed
references to `composio orgs switch` → `composio manage orgs switch`
- Updated `ts/packages/cli/AGENTS.md` — command table and code
generation pipeline docs
- Updated `.claude/skills/implement-cli-command/SKILL.md` — directory
structure, file naming conventions, subcommand group examples, and
reference table all reflect the new layout
- Updated `.claude/skills/create-cli/SKILL.md` — help output examples
use `composio generate ts/py`
- Updated `.claude/skills/create-cli-e2e/SKILL.md` — e2e test examples
use `composio manage tools ...`

## Type of change
- [x] Documentation

## How Has This Been Tested?
- Documentation changes are text-only; verified formatting renders
correctly

## Checklist
- [x] I have read the Code of Conduct and this PR adheres to it
- [x] I ran linters/tests locally and they passed
- [x] I updated documentation as needed
- [x] I added tests or explain why not applicable
- [x] I added a changeset if this change affects published packages

Co-authored-by: Alberto Schiabel <jkomyno@users.noreply.github.com>
2026-03-18 18:05:52 -07:00
Rahul Tarak 3415a4a15b feat(cli): add manage namespace for advanced commands (#2937)
## Summary

Introduces a `composio manage` namespace that groups resource management
commands (toolkits, tools, auth-configs, connected-accounts, triggers,
logs, orgs, projects) under a single parent command. This declutters the
top-level CLI help and creates a clearer separation between everyday
commands (`init`, `login`, `generate`) and advanced resource management.

## Changes
- Created `manage/manage.cmd.ts` with all resource subcommands
registered under `composio manage`
- Removed individual top-level imports (toolkits, tools, auth-configs,
etc.) from `index.ts` and replaced with single `manageCmd` import
- Updated alias mapping (`ALIAS_TO_PARENT`) to route through `manage`
(e.g., `search` → `manage tools`, `link` → `manage connected-accounts`)
- Updated `parseExecuteInputHelpSlug` to account for the new `manage`
prefix in argv parsing
- Consolidated the root help advanced commands section to show a single
`manage` entry

## Type of change
- [x] Refactor/Chore

## How Has This Been Tested?
- Verified CLI help output displays correctly with the new `manage`
namespace
- Tested that aliases (`composio search`, `composio execute`, `composio
link`, `composio listen`) still resolve correctly through the `manage`
prefix

## Checklist
- [x] I have read the Code of Conduct and this PR adheres to it
- [x] I ran linters/tests locally and they passed
- [x] I updated documentation as needed
- [x] I added tests or explain why not applicable
- [x] I added a changeset if this change affects published packages

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
2026-03-17 19:44:44 -07:00
jkomyno 5c6c0ec2c8 feat(cli): add VHS recording script for CLI demo generation
Add a recording infrastructure that produces SVG and asciicast demos
from a declarative YAML config. Supports dynamic height auto-sizing,
parallel execution, and progress reporting via Clack UI.
2026-02-19 01:16:18 +04:00
jkomyno 335a3912a8 refactor(ai): deduplicate and improve CLI skills
- Break create-cli symlink to Cursor rule; create standalone SKILL.md
  with corrected globs (ts/packages/cli/src/**/*.ts) and alwaysApply: false
- Add YAML frontmatter with description to create-cli-e2e and
  implement-cli-command for skill discovery
- Replace duplicated output conventions with AGENTS.md references
- Add bidirectional cross-references across all three skills
- Deduplicate e2e patterns B-E as deltas from canonical Pattern A
- Add decision flowchart for choosing e2e test patterns
- Standardize on Command.withHandler() pipe pattern
- Add ComposioToolkitsRepositoryCached note and service creation guide
- Trim generic CLI wisdom, unused CLI Spec Template, over-long option docs
- Add build failure troubleshooting to implementation checklist
- Update AGENTS.md cross-reference to reflect standalone skill file

Total: 1516 → 1172 lines (-23%)
2026-02-18 16:51:11 +04:00
jkomyno d5694a91ec feat(ai): add "implement-cli-command" skill 2026-02-18 16:34:03 +04:00
jkomyno 6c4e814059 feat(ai): add "create-cli-e2e" skill 2026-02-18 16:33:50 +04:00
jkomyno 33e6c97f31 feat(ai): add "create-cli" skill 2026-02-18 15:54:25 +04:00
Alberto Schiabel ff1e89b7c2 feat(py): support type-safe generic get_tools() based on given provider (#2469)
Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
2026-02-09 15:55:51 +05:30
Musthaq Ahamad 7da71f884a Fix agent skills, add bug fixing guidelines (#2549) 2026-02-02 12:26:13 +05:30
Musthaq Ahamad e387f1eda6 Add comprehensive agent building skills for Claude Code (#2537) 2026-02-01 11:00:31 +05:30