Commit Graph

16 Commits

Author SHA1 Message Date
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