Commit Graph

5207 Commits

Author SHA1 Message Date
Daksh 5468c242be perf(cli): cut 221ms and 44MB RSS off every CLI invocation (#4463)
## Summary

`composio --version`: 970ms to 749ms. Peak RSS: 175.8MB to 132.2MB.
Binary: 96MB to 86MB. No new dependencies (one unused one removed), no
API changes.

The compiled binary carried two copies of the TypeScript compiler and
all six tiktoken rank tables. A compiled Bun binary parses everything it
embeds before running any JS, so every command paid for that.

First PR in a stack of five. Review order: this, #4464, #4468, #4469,
#4475.

Bun 1.4.1+4661e494f, linux-x64, best of 7, analytics disabled:

| | before | after |
|---|---|---|
| `composio --version` | 970ms | 749ms |
| peak RSS | 175.8MB | 132.2MB |
| compiled binary | 96MB | 86MB |
| bundle | 31.24MB | 15.84MB |

## Changes

1. `run.cmd.ts` imported `ts` from ts-morph, which bundles its own
TypeScript. It now uses the `typescript` package the generation code
already pulls in. One compiler instead of two, 8.5MB each.
2. js-tiktoken's main entry inlines six rank tables (5.3MB). The CLI
only uses o200k. Switched to `js-tiktoken/lite` with that one table.
Token ids are identical.
3. `prepareExecuteOutput` built the rank table on every successful
execute just to compare against a 10,000 token threshold. A token covers
at least one byte, so a payload under 10,000 bytes cannot exceed 10,000
tokens. It checks bytes first and only builds the tokenizer past that.
It also checks the invocation origin before building it, since `composio
run` always prints inline, and a stored response is encoded once rather
than once for the threshold and again for `tokenCount`.
4. `ToolsExecutorLive` resolved a client via `clientSingleton.get()`
(disk reads) and then discarded it, since every caller passes one in.
Resolved lazily now.
5. `ts-morph` is removed from the CLI's dependencies. Nothing imports it
after change 1, and leaving it listed made it easy to bring its
TypeScript copy back.

What changes in behavior:

- Responses under 10KB no longer reach `Tiktoken.encode()`, so the
`<|endoftext|>` crash stops happening for them. Larger responses still
hit it. #4464 is the real fix.
- Executes started by `composio run` no longer build the tokenizer for
responses over 10KB. Their output was always printed inline, so the
count was discarded.
- TypeScript 6.0.2 (ts-morph's copy) becomes 6.0.3.
- Under `COMPOSIO_LOG_LEVEL=Debug`, ProjectContext's "resolved from"
lines no longer print on the remote execute path.

On change 3: an earlier version of this description said it saved ~500ms
per execute, measured in isolation under a different Bun. Inside the
compiled binary, `new Tiktoken(o200k)` costs ~390ms and `encode()` of
7.5KB about 4ms. Measured end to end on a real
`HACKERNEWS_GET_ITEM_WITH_ID` execute with `COMPOSIO_PERF_DEBUG=1`, the
time from `execute.tool_call.end` to exit drops from ~300ms to ~15ms for
responses under 10KB, and stays ~350ms above it.

## Type of change
- [ ] Bug fix
- [ ] New feature
- [x] Refactor/Chore
- [ ] Documentation
- [ ] Breaking change

It removes a crash, but by accident, so it is not marked as a bug fix.

## How Has This Been Tested?

Bun 1.4.1+4661e494f, Node 24.17.0, pnpm 11.8.0, linux-x64.

1. `cd ts/packages/cli && pnpm run typecheck && pnpm run
validate:boundaries`
2. `pnpm exec vitest run
test/src/commands/tools/tools.execute.cmd.test.ts
test/src/commands/run.cmd.test.ts`: 90 passed. A new case covers a ~18KB
response that encodes to ~4k tokens, past the byte check but under the
threshold, and asserts it stays inline.
3. `pnpm build:binary && time ./dist/composio --version`

Checked but not committed: the three parse helpers give identical output
under both compilers across 20 sources (TSX, decorators, `using`,
`satisfies`, import attributes, unicode). Lite tiktoken gives identical
token id streams on 8 samples including CJK, RTL, emoji and control
characters. Max tokens per byte was 0.846, under the 1.0 the byte check
needs.

## Screenshots (if applicable)

Not applicable.

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

No docs describe the bundle contents or the token threshold. The byte
pre-filter boundary has a test. The compiler and tokenizer comparisons
above are still not committed and should become a suite. `@composio/cli`
is `private: true`, so no changeset.

## Additional context

Bun 1.4.2 gives no gain over 1.4.1 (three rounds of best of 7:
723/732/756ms vs 744/713/747ms). Keep the pin.

Not touched: ~1.1s of execute preflight (5 to 7 serial round trips;
`project/resolve` has no cache and can fire three times), the
two-round-trip session create plus execute, and `--skip-checks`, which
currently skips nothing measurable.

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

https://claude.ai/code/session_01EzaE7oGVgziJ5nRvBhcci2
@composio/cli@0.4.2-beta.388
2026-09-14 13:51:26 +00:00
jkomyno cbcdecf3a9 perf(cli): skip the tokenizer for run-origin executes and count tokens once
Check the invocation origin before building the tokenizer, since composio run
always prints inline, and pass the token count from the threshold check into
the stored-output summary instead of encoding the payload twice.

Add a test for a response past the byte pre-filter but under the token
threshold, and drop the unused ts-morph dependency.
2026-09-14 15:46:57 +02:00
Claude ebe8bb780f perf(cli): cut 221ms and 44MB RSS off every CLI invocation
A compiled Bun binary parses its whole embedded module graph before the
first line of JS runs, so bundled-but-unused code is paid for on every
invocation. Verified: a binary that bundles everything but evaluates only
console.log still costs ~235ms, against 15ms for a hello-world build.
Most of this bundle was code `composio execute` never reaches.

Measured on the pinned toolchain (Bun 1.4.1+4661e494f, linux-x64,
best of 7, analytics disabled):

  composio --version   970ms   -> 749ms    (-221ms)
  peak RSS             175.8MB -> 132.2MB  (-43.6MB)
  compiled binary      96MB    -> 86MB
  bundle               31.24MB -> 15.84MB

Four changes.

run.cmd.ts imported `ts` from ts-morph, which vendors its own copy of the
TypeScript compiler, so the binary carried two of them. The file uses only
createSourceFile, forEachChild, ScriptTarget, ScriptKind and five isX
guards, all available in the typescript copy that
src/generation/typescript/* already pulls in. Sharing one compiler also
means commands/generate and commands/run.cmd no longer evaluate a compiler
each.

js-tiktoken's main entry statically inlines all six BPE rank tables (gpt2,
r50k, p50k, p50k_edit, cl100k, o200k) as string literals; the CLI only ever
uses o200k, via encodingForModel('gpt-4o'). The lite build with that single
table produces identical token-id streams.

prepareExecuteOutput built the o200k rank table on every successful
execute, purely to compare the response against a 10k-token threshold.
Constructing it measured ~390ms in a compiled binary on the pinned
toolchain (390.1, 367.1, 418.6ms across three runs), against ~4ms to
encode a 7.5KB payload once the table exists. A BPE token always covers at
least one UTF-8 byte, so a payload of at most THRESHOLD bytes can never
exceed THRESHOLD tokens; checking byte length first reaches the same
decision without the tokenizer.

That ~390ms is construction cost measured in isolation, not an end-to-end
delta on a real `composio execute`. No credentialed run was available to
measure the whole command before and after, so treat it as the size of the
work removed from the success path rather than a verified wall-clock
saving. `COMPOSIO_PERF_DEBUG=1` reports the gap between
`execute.tool_call.end` and exit for anyone able to run it for real.

ToolsExecutorLive resolved a client through clientSingleton.get()
unconditionally, walking the project context off disk, then discarded it
because every caller on the remote-execute path passes one in.

Three behavioral deltas, none of them the tokenization result or the
inline/file decision:

1. Tiktoken.encode() throws on the literals <|endoftext|> and
   <|endofprompt|> appearing anywhere in the response, at any size (a
   66-byte payload reproduces it). That throw landed after
   "Execution successful" had printed, so the tool ran and the CLI still
   exited 1 with nothing on stdout. Responses at or under 10KB no longer
   reach encode(), so they now succeed. Larger responses still hit it;
   the real fix is passing allowedSpecial 'all' and is not in this commit.
2. TypeScript 6.0.2 (ts-morph's vendored copy) to 6.0.3. Differential
   tested: the three real parse helpers over 20 sources covering TSX,
   decorators, `using`, `satisfies`, import attributes, optional-chained
   calls and unicode gave identical output on all 60 comparisons.
3. Under COMPOSIO_LOG_LEVEL=Debug, ProjectContext's "resolved from ..."
   debug lines no longer appear on the remote-execute path. The local-tool
   path still calls get() and is unchanged.

Verified with typecheck:src, oxlint, validate:boundaries, the
tools.execute and run command suites (89 tests), and differential tests of
both tokenizers and both TypeScript versions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EzaE7oGVgziJ5nRvBhcci2
2026-09-14 15:46:57 +02:00
Alberto Schiabel efe6d89864 chore(cli): refresh baked toolkit slugs (#4477)
## Summary
Automated refresh of the toolkit slugs the CLI knows without asking
the API, generated by
`ts/packages/cli/scripts/generate-toolkit-slugs.ts`.

Toolkits added since the last refresh currently cost users one
toolkit-list fetch (~2 s) the first time they run one of that
toolkit's tools. Merging this makes them free.

The generator refuses to write a list that is short, malformed, or
missing staple toolkits, so a bad fetch opens no PR at all.
@composio/cli@0.4.2-beta.387
2026-09-14 13:25:30 +02:00
Alberto Schiabel dae005cf41 fix(core): raise tool not found only on 404/400 (#4459)
This PR:

- closes [PRDE-1613](https://linear.app/composio/issue/PRDE-1613)
- maps only 404/400 from `tools.retrieve` to
`ComposioToolNotFoundError`; every other failure (401 invalid API key,
5xx, network) now raises the new `ComposioToolFetchError` with the
client error kept as `cause`
- `tools.get(userId, slug)` and `tools.execute` inherit the corrected
mapping since they call `getRawComposioToolBySlug`
- fixes `toolkits.get(slug)`, whose 404/400 check compared against the
OpenAI `APIError` class instead of the Composio client one, so
`ComposioToolkitNotFoundError` never fired
- Python parity: `get_raw_composio_tool_by_slug` raises
`ToolNotFoundError` (now a `NotFoundError` subclass) on 404/400 and
re-raises any other `composio_client` error unchanged
- adds unit tests on both sides for 404, 400, 401 and non-API failures;
verified live against the API with an invalid key on both SDKs

## Context

An unauthenticated call to `tools.getRawComposioToolBySlug` returned
`error.name === "ComposioToolNotFoundError"` while `error.cause.status`
was 401. The catch block wrapped every error except cancellation as
not-found, which predates the `@composio/client@beta` swap. Intended to
be back-ported to `main` after merging to `next`.

https://claude.ai/code/session_017HtbhwMAKcfebo8HyXWa5s
2026-09-14 13:25:08 +02:00
jkomyno 3ab81b3373 chore(cli): refresh baked toolkit slugs 2026-09-14 06:36:42 +00:00
jkomyno 8bb1d29950 fix(core): raise tool not found only on 404/400
getRawComposioToolBySlug relabelled every client error, including an
invalid API key (401), as ComposioToolNotFoundError. Map only 404/400 to
not-found and wrap the rest in a new ComposioToolFetchError that keeps
the client error as cause. Toolkits.getToolkitBySlug compared against
the OpenAI APIError class, so its not-found branch never fired; import
the Composio client class instead. Python mirrors the mapping: an
unknown slug raises ToolNotFoundError (now a NotFoundError), anything
else propagates the composio_client error unchanged.

PRDE-1613

Claude-Session: https://claude.ai/code/session_017HtbhwMAKcfebo8HyXWa5s
2026-09-11 22:54:53 +02:00
Brendan O'Leary 85e33f6a81 docs: update contact links with CTA placement (#4454)
## Summary
Route documentation contact links to the Composio contact form with both
`utm_source=docs` and page-specific CTA placement tracking.

## Changes
- Replace Calendly links on both rate-limit pages with
`https://composio.dev/contact?utm_source=docs&cta_placement=docs-rate-limits`.
- Update the data-retention sales link to use
`utm_source=docs&cta_placement=docs-data-retention`.
- Replace the premium-tools billing email link with the contact form
using `utm_source=docs&cta_placement=docs-pro-tools`.

## Type of change
- [x] Documentation

## How Has This Been Tested?
Verified that all four Markdown contact links contain the expected
source and page-specific placement parameters with Python URL parsing
assertions. `git diff --check` passed. The docs build and test suite
were not run; docs dependencies are not installed in this checkout.

## Checklist
- [x] I updated documentation as needed
- [x] I added tests or explain why not applicable

No new tests or changeset are needed for these four documentation URL
replacements.
2026-09-11 11:06:31 -07:00
Brendan O'Leary 11706780b3 docs: preserve source tracking on contact links 2026-09-11 17:58:12 +00:00
Brendan O'Leary 4b295a5813 docs: update contact links with CTA placement 2026-09-11 17:53:35 +00:00
Brendan O'Leary 08ec3f67de Remove fastmode as it isn't in the SDK yet (#4450)
## Summary
Explain the motivation and context for this change. Link to any related
issues.

Fixes #

## Changes
- 
- 

## Type of change
- [ ] Bug fix
- [ ] New feature
- [ ] Refactor/Chore
- [ ] Documentation
- [ ] Breaking change

## How Has This Been Tested?
Describe the tests you ran and instructions so reviewers can reproduce.
Include any relevant config/versions.

## Screenshots (if applicable)

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

## Additional context
2026-09-11 09:58:04 -07:00
Brendan O'Leary 4c0c89b090 Remove fastmode as it isn't in the SDK yet 2026-09-11 09:52:33 -07:00
Alberto Schiabel 2367b80d9d chore(ci): enforce agent guidance validators in CI (#4447)
This PR:
- Add `.github/workflows/agent-substrate.yml` running `pnpm
validate:agent-skills` and `pnpm validate:skill-routing` on every push
and pull request; both validators previously ran in no CI workflow
- No path filters on the trigger: the stale-guidance walk scans every
text file in the repo, so any change can affect the result (PR runs
restore caches but only `next` pushes save them, per the
`setup-node-pnpm-bun` guidance)
- Skip `vendor/` directories in the `validate:agent-skills`
stale-guidance walk, which was failing on read-only third-party
snapshots mentioning other tools' rule conventions
- Extend the validator's command scan to `CONTRIBUTING.md` (with a `pnpm
dlx` exemption), so its documented commands are checked against
`package.json`, `python/Makefile`, and `python/noxfile.py` like the rest
of the guidance
- Point the routing-test header, root `AGENTS.md`, and
`skill-maintenance` reference docs at the new workflow, and add a
"Working with AI Coding Agents" section to `CONTRIBUTING.md` covering
the inherited agent setup, the two checks, and the routing-probe
requirement for skill edits

## Context

These two validators are the only checks keeping repo-level agent
guidance honest: command names mentioned in guidance are verified
against `package.json`, `python/Makefile`, and `python/noxfile.py`, and
routing probes assert each skill stays the unique top match for its
representative task. Until now nothing enforced either one, and the
stale-guidance walk was already red on vendored trees — a failure no
guidance owner could fix, which trains people to ignore the check. This
makes both checks blocking everywhere they can bite.

## Verification

- `pnpm validate:agent-skills` — 19 skills, green, now including
`CONTRIBUTING.md` commands
- `pnpm validate:skill-routing` — 19 probes over 19 skills, green
- Workflow YAML parsed; oxlint and prettier clean on touched files
- `Agent Substrate` workflow ran green on this PR (42s) before the
trigger change and re-runs on every push
2026-09-11 17:31:23 +02:00
Brendan O'Leary 1a26ea0869 docs: document unattended agent authentication (#4434)
## Summary

Autonomous coding agents assumed Composio signup required a human,
leaving integrations without credentials or live verification. Add a
prominent guide for the supported `composio login --agent` flow when no
human is available.

Addresses Gauge action `cmtvu1rwe00040ip8mxhszmj1`. Reviewed the
metadata, insights, logs, and diffs for [evidence run
1](https://agents.withgauge.com/composio-aclx/runs/cmtvrts3n001201ea7jwbhu4q)
and [evidence run
2](https://agents.withgauge.com/composio-aclx/runs/cmtvrts3n001401eak0rwndar).
Both assumed signup required human interaction; the second attempted
disposable-email signup before switching to mocks.

## Changes

- Document unattended login, readiness checks, project API-key
extraction, credential handling, constraints, and the human login
fallback.
- Include a live Hacker News tool call and require separate verification
of the requested integration, including provider authorization and
confirmation of write results.
- Link the guide from the agent setup sidebar, quickstart, CLI docs, API
authentication reference, and `llms.txt`.

## Type of change

- [x] Documentation

## How Has This Been Tested?

From `docs/`:

- `bun run test`: 557 passed, 0 failed. Run with loopback access for the
analytics test's local server.
- `bun run lint:links`: 0 errors.
- `bun run lint`: passed with existing warnings.
- `bun run postinstall`: regenerated MDX collections successfully.

All five shell snippets pass `bash -n`. The key-extraction snippet
accepts a valid local fixture and rejects missing, blank, and non-string
keys without printing credentials. `git diff --check` passes. No live
account was provisioned or tool executed for this documentation change.

## Checklist

- [x] I ran linters/tests locally and they passed
- [x] I updated documentation as needed
- [x] I added tests or explain why not applicable: existing docs checks
and focused snippet validation cover this documentation-only change.
- [x] I added a changeset if this change affects published packages: not
applicable; no published package changes.
2026-09-11 08:25:59 -07:00
Brendan O'Leary 03f92ee026 docs: shorten unattended auth sidebar label 2026-09-11 15:20:02 +00:00
sdkrelease[bot] e265ff838a docs(kb): refresh public support knowledge (#4437)
Automated knowledge-base refresh for `ComposioHQ/support-knowledge`.

- Source commit: `5eac683455ff252a7a3b62f33ab6566445009b52` (unchanged;
rebuilt a stale semantic artifact)
- Regenerated public KB pages and search records
- Reused unchanged vectors and rebuilt the checked semantic artifact
- Ran KB freshness and semantic-artifact verification

Co-authored-by: sohambasu963 <80603154+sohambasu963@users.noreply.github.com>
2026-09-11 16:24:51 +02:00
Brendan O'Leary eb1d1e1d35 Merge branch 'next' into codex/docs-unattended-agent-auth 2026-09-10 16:33:20 -07:00
Brendan O'Leary 8174302053 docs: update documentation for new changelog entries (#4273)
## Summary
Automated documentation updates triggered by new changelog entries
merged to next.

Generated by Codex via GitHub Actions.
2026-09-10 16:32:46 -07:00
Brendan O'Leary abb272572b Merge branch 'next' into codex/docs-unattended-agent-auth 2026-09-10 16:22:29 -07:00
Brendan O'Leary ba84d94b02 Merge branch 'next' into docs/changelog-update-e2270d1 2026-09-10 16:22:21 -07:00
Brendan O'Leary 4634a99ae3 fix(docs): make semantic artifact freshness advisory in PR checks (#4436)
## Summary

Editing an indexed docs page makes the checked-in semantic artifact
stale, causing `Docs - Tests` to fail until a credentialed rebuild
commits new embeddings. Make freshness advisory in PR checks so docs
changes can proceed while the existing refresh workflows rebuild the
artifact.

## Changes

- Add `--allow-stale` to the PR semantic check. Stale artifacts emit a
warning; missing artifacts and integrity failures still fail the check.
- Validate artifact integrity before reporting freshness mismatches, so
stale content cannot hide corrupt vectors or invalid records.
- Keep rebuild workflows and runtime validation strict. Search uses its
existing keyword fallback until a fresh artifact is available.
- Document the contributor workflow and add regression coverage for
freshness, corruption, and CI wiring.

## Type of change

- [x] Bug fix
- [x] Documentation

## How Has This Been Tested?

Run from `docs/` with Bun 1.4.2:

- `bun test tests/static/kb-semantic-artifact.test.ts
tests/static/kb-update-workflow.test.ts
tests/static/knowledge-search.test.ts`: 72 passed.
- `bun run test`: 567 passed; one analytics test could not open its
local HTTP server in the sandbox. `bun test
tests/static/kb-query-analytics.test.ts` passed all 14 tests when rerun
with permission to listen.
- `bun run types:check`: passed.
- `bun run lint`: passed with existing warnings.
- `bun run check:kb-semantic` and `bun run check:kb-semantic
--allow-stale`: passed for the current artifact.
- CLI smoke checks with temporary artifact changes confirmed that stale
content exits 1 in strict mode and exits 0 with a GitHub warning in
advisory mode. A stale artifact with corrupt vector data still exits
nonzero. The original artifact was restored.

## Checklist

- [x] Ran linters and tests locally, with results recorded above
- [x] Updated documentation
- [x] Added regression tests
- [x] Changeset not required: docs-site and CI changes only

## Additional context

Merging stale embeddings temporarily reduces search to keyword retrieval
until a refresh lands. Embeddings are still generated by the existing
background workflows, without adding API calls to ordinary PR checks or
generating the corpus during search requests.
2026-09-10 16:22:08 -07:00
Brendan O'Leary 2ad6c8742f fix(docs): make semantic artifact freshness advisory in PR checks 2026-09-10 23:12:09 +00:00
Brendan O'Leary 1f44efb709 Merge branch 'next' into docs/changelog-update-e2270d1 2026-09-10 15:26:56 -07:00
Brendan O'Leary faaf37761c docs: update Python SDK reference from source (#4409)
## Summary
Auto-generated Python SDK reference docs from `python/composio/`.

Regenerates pages at `docs/content/reference/sdk-reference/python/` to
reflect changes in the Python package's public API (new methods, updated
signatures, changed types).
2026-09-10 15:23:13 -07:00
Brendan O'Leary 19c9fb2dc8 docs: document unattended agent authentication 2026-09-10 22:23:07 +00:00
Brendan O'Leary fa2e03c456 fix(docs): preserve install commands and agent setup in Markdown (#4424)
`PackageInstall` disappeared from agent-readable Markdown, removing
required package commands from the quickstart, provider guides, and
search records. Preserve Node and Python install commands,
package-choice comments, coding-agent setup prompts and client links,
and video captions. Share the UI's package-manager definitions and setup
content with the converter.

Addresses [DEVREL-35](https://linear.app/composio/issue/DEVREL-35). The
component audit records existing coverage and remaining visual/catalog
parity work for DEVREL-32 and DEVREL-38.

Validation from `docs/`:
- Static suite: 553 passed.
- Typecheck, lint, and production build passed. Lint retains existing
warnings.
- Built-server HTTP regression: quickstart, Anthropic provider, client
setup, and `/llms-full.txt` retain the expected commands and prompts.
- Corpus regression covers every authored PackageInstall instance in
page text and search records, plus raw and processed attribute forms.

The semantic artifact content hash is stale because indexed text
changes. CI fails at that check. The automatic rebuild skipped its
membership gate on both the initial run and one retry, even though the
current PR API reports MEMBER. A maintainer needs to run the authorized
artifact rebuild before merge. No OPENAI_API_KEY is available locally;
no embeddings were edited by hand and no search index was published
locally.
2026-09-10 13:37:15 -07:00
Brendan O'Leary cb7ebd6531 ci: remove Claude docs review workflow (#4430)
Removes the "Claude Docs Review" GitHub Actions workflow so it no longer
runs on docs PRs.
2026-09-10 13:26:01 -07:00
Brendan O'Leary f38df0a206 ci: remove Claude docs review workflow 2026-09-10 13:19:32 -07:00
Brendan O'Leary 64a48ba326 chore(docs): refresh semantic index after merging next 2026-09-10 13:06:32 -07:00
Brendan O'Leary ba69d58219 Merge remote-tracking branch 'origin/next' into codex/devrel-35-markdown-install 2026-09-10 13:05:41 -07:00
Brendan O'Leary 21ba266c1a chore(docs): regenerate semantic index for Markdown changes 2026-09-10 12:33:46 -07:00
Brendan O'Leary 4c99de5df5 fix(docs): improve homepage social preview (#4429)
## Summary

The docs homepage used the article OG template with “Welcome” as its
headline. Its page-level metadata also dropped the site name. Add a
dedicated homepage card with “Build and operate AI agents,” SDK/CLI/MCP
entry points, and a “Start building” prompt.

## Changes

- Route the docs homepage and default social image to the new 1200×630
card. Preserve article cards.
- Use a descriptive homepage title and shorter description, and set
explicit Open Graph and Twitter metadata.
- Cover homepage image routing and rendered metadata after the root
redirect with regression tests.

## Type of change

- [x] Bug fix
- [x] Documentation

## How Has This Been Tested?

Commands run from `docs/`:

- `bun test tests/static/og-image.test.ts`: 2 passed, including article
and homepage PNG rendering.
- `TEST_BASE_URL=http://localhost:3123 bun test
tests/integration/rendering.test.ts --test-name-pattern 'docs homepage
social metadata' --timeout 60000`: passed against the local dev server.
- `bun run types:check`: passed.
- `bun run lint`: passed with warnings in unrelated files.
- Rendered and visually inspected the homepage PNG at 1200×630.
- `git diff --check`: passed.

Image tests were rerun after updating to current `next`. Remote CI and
production deployment are pending.

## Checklist

- [x] Ran local checks as described above
- [x] Updated homepage metadata
- [x] Added regression tests
- [x] No changeset required: docs-only change
2026-09-10 12:10:52 -07:00
Brendan O'Leary b972a93b22 fix(docs): improve homepage social preview 2026-09-10 12:05:26 -07:00
Brendan O'Leary f0399b4f9a docs: curate the agent routing map and separate the full index (#4426)
Replace the exhaustive `/llms.txt` dump with a short routing map for
product selection, installation, authentication, sessions, execution,
and troubleshooting. Keep the full catalog at `/llms-index.txt`, using
named links and descriptions, and put that catalog and other long-tail
resources under Optional. Current REST v3.1 and legacy v3.0 remain
explicitly separated.

Fixes [DEVREL-34](https://linear.app/composio/issue/DEVREL-34). The
format follows the descriptive-link and Optional conventions in the
[llms.txt proposal](https://llmstxt.org/).

Validation: 551 static tests passed, including bounded routing-map
coverage and route resolution. Typecheck, lint, and link validation
passed. Existing exhaustive-catalog coverage now tests
`/llms-index.txt`; the HTTP version-grouping test follows the new
catalog route. Existing lint warnings remain.
2026-09-10 12:03:26 -07:00
Brendan O'Leary b7cd83709e docs: add setup and skill guidance to llms.txt 2026-09-10 11:54:17 -07:00
Brendan O'Leary ae7956354e docs: expose release notes from agent-readable pages (#4427)
Agents reading individual pages or `/llms-full.txt` could miss the
Markdown changelog. Its dated `.md` links also matched a broad legacy
redirect and landed on HTML instead of release-note Markdown.

Link page Markdown and the full corpus to `/docs/changelog.md`, and
route dated `.md` and `.mdx` requests to the existing Markdown renderer
before the legacy HTML redirects. Add an HTTP regression that follows
quickstart → changelog → dated release and checks both extensions.

Fixes [DEVREL-31](https://linear.app/composio/issue/DEVREL-31).

Validation: typecheck, link validation, and all 551 static tests passed
for discovery. The new HTTP test reproduced the redirect defect locally
and in CI. The corrected combined production build passed. Its full HTTP
suite passed 92 tests with one existing API-key-dependent skip,
including dated .md and .mdx release-note checks. No new feed format or
dependency is added.
2026-09-10 11:52:23 -07:00
Brendan O'Leary 5f7e2af52c fix(docs): serve social preview images from the docs host (#4425)
The live docs advertise `https://og.composio.dev/api/og?title=Welcome`,
which returns HTTP 404 and breaks link previews. Serve 1200×630 PNG
previews from `/api/og` on the docs host and point the shared page
metadata and root metadata at that route. Titles are bounded to keep the
image readable and rendering work limited.

Fixes [DEVREL-41](https://linear.app/composio/issue/DEVREL-41).

Validation: reproduced the live 404, rendered and visually inspected the
replacement image, tested PNG signatures and dimensions for default,
normal, special-character, and long titles, and passed typecheck, lint,
and all 551 static tests. Existing lint warnings remain. No remote image
service or new dependency is required.
2026-09-10 11:49:09 -07:00
Brendan O'Leary a9a361326b docs: document the contribution and review workflow (#4423)
Give contributors one path from a docs problem to a reviewed, published
fix. The guide explains when to use a Docs issue or a PR, where source
files live, how to validate HTML and Markdown, and what to verify after
deployment. Link it from the docs README and replace the stale CLAUDE.md
pointer with the current Twoslash guide.

Addresses [DEVREL-28](https://linear.app/composio/issue/DEVREL-28).

Validation: all relative links resolve, all documented `bun run`
commands exist in `docs/package.json`, and `git diff --check` passes.
Guidance-only change; no runtime tests needed. Reviewer selection
follows existing repository requirements without assigning new owners or
approval rules.
2026-09-10 11:47:52 -07:00
Brendan O'Leary 609918aee2 fix(docs): preserve dated Markdown changelog links through redirects 2026-09-10 11:27:46 -07:00
Brendan O'Leary 17ff9cce85 docs: expose release notes from agent-readable pages 2026-09-10 11:21:46 -07:00
Brendan O'Leary b7891d78fe docs: curate the agent routing map and separate the full index 2026-09-10 11:21:42 -07:00
Brendan O'Leary 37a647d1c4 fix(docs): serve social preview images from the docs host 2026-09-10 11:21:17 -07:00
Brendan O'Leary a18698787f fix(docs): preserve install commands and agent setup in Markdown 2026-09-10 11:19:55 -07:00
Brendan O'Leary d9e4b78653 docs: document the contribution and review workflow 2026-09-10 11:19:06 -07:00
Brendan O'Leary ce33bfb281 fix(docs): hide deprecated fields only in API playground (#4413)
Deprecated API fields clutter the interactive playground at the top of
reference pages. Hide those inputs while retaining their descriptions,
deprecation badges, defaults, and response examples in the reference
below.

Filter a cloned schema only inside the playground renderer. Keep the
shared OpenAPI loader unchanged and preserve synchronization between
playground edits, example selection, server selection, and generated
request code. Published OpenAPI files remain unchanged.

Validation: all 547 docs static tests pass, `bun run types:check`
passes, and `bun run lint` passes with existing warnings. Browser checks
on Create auth config confirm both auth variants omit deprecated inputs,
the JSON editor omits deprecated values, reference descriptions and
badges remain, and edits update the cURL example.

Fixes DEVREL-51.
2026-09-10 10:55:39 -07:00
Brendan O'Leary 84237d28f1 fix(docs): prevent copy page overlap on mobile (#4422)
## Summary
The “Copy page” button covers long page titles on mobile, including
“Stream logs to a SIEM”. Keep the button in its own row below the title
on narrow screens.

## Changes
- Apply the negative top margin only at the `md` breakpoint and above,
preserving the existing desktop layout.
- Update the shared component comments to describe its responsive
behavior.

## Type of change
- [x] Bug fix

## How Has This Been Tested?
- Focused Oxlint check passed for `docs/components/page-actions.tsx`,
using dependencies from the main checkout.
- `git diff --check` passed.
- Browser verification and the full docs build were not run. No
automated test added for this CSS breakpoint change.

## Additional context
Docs-only change; no changeset required.
2026-09-10 09:52:00 -07:00
Brendan O'Leary 947bfb4590 fix(docs): filter deprecated fields only in playground 2026-09-10 09:50:54 -07:00
Brendan O'Leary 60313e9e3d fix(docs): prevent copy page overlap on mobile 2026-09-10 09:37:40 -07:00
Alberto Schiabel d1bc94c580 test(ts/e2e): exercise core tool execution under Deno (#4418)
This PR:
- builds on top of https://github.com/ComposioHQ/composio/pull/3901
- adds a second Deno e2e suite, `@e2e-tests/deno-tool-execution`, that
drives the runtime instead of the import surface: session creation over
`fetch`, custom-tool registration, Zod validation/defaults/failures, and
in-process local tool execution
- mirrors the node `custom-tools` suite trimmed to its local-execution
half; remote coverage (tool chaining, weathermap) stays node-only
- imports the workspace's built dist via a relative path: a version-less
`npm:@composio/core` resolves from the registry (published pre-migration
0.18.1), ignoring the pnpm workspace symlink, so the direct path is what
makes the suite test the Effect v4 build CI bakes into the image
- keeps the only backend call to `composio.create()`; requires
`COMPOSIO_API_KEY` (CI provides it, the runner passes it into the
container)

## Context

The existing `deno/esm-basic` suite stops at the import/export surface
and, despite its `deno.jsonc` comment, resolves `npm:@composio/core`
from the registry rather than the workspace — so nothing under Deno
exercised the Effect v4 runtime. This suite closes that gap. A side
observation for a follow-up: `esm-basic` has the same
registry-resolution drift and tests the published package, contrary to
its README.

Validation:

- full local Deno matrix passes against the staging backend: 22 tests /
2 suites (11 + 11), fixture markers `SESSION_CREATE_OK` through `ALL_OK`
all observed
- `pnpm --filter @e2e-tests/deno-tool-execution typecheck` and prettier
clean
- `pnpm-lock.yaml` updated for the new workspace importer

Merge after #3901.
2026-09-10 18:33:23 +02:00
Brendan O'Leary f8dcebad3d docs(add): add agent-first setup for developers path (#4362)
## Summary
Add an agent-first setup path that helps developers install the Composio
Agent Skill and use their coding agent to integrate Composio.

Fixes
https://linear.app/composio/issue/DEVREL-42/add-agent-first-setup-flow-to-composio-docs

<img width="1120" height="560" alt="CleanShot 2026-09-04 at 15 09 27"
src="https://github.com/user-attachments/assets/bdab541a-335a-4a41-86e6-ee581aac0725"
/>

<img width="926" height="747" alt="CleanShot 2026-09-04 at 15 09 50"
src="https://github.com/user-attachments/assets/c7f24efc-04c4-4585-886f-18ee0920c424"
/>

<img width="968" height="651" alt="CleanShot 2026-09-04 at 15 10 02"
src="https://github.com/user-attachments/assets/b9220ade-1c87-47df-ae68-14ecc08acb59"
/>

## Changes
- Add an Agent setup section with an overview and client-specific
installation instructions.
- Cover Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI,
OpenClaw, OpenCode, Cline, and Grok Build.
- Add reusable actions for opening the setup guide and copying a setup
prompt.
- Add a suggested first prompt for testing the installed skill.
- Surface agent setup from the docs homepage and SDK quickstart.
- Simplify the homepage product cards and tighten spacing across the
landing page.
- Exclude external sidebar links from the generated `llms.txt`
documentation URL list.
- Add static coverage for navigation, client instructions, setup
prompts, and external links.

## Type of change
- [ ] Bug fix
- [ ] New feature
- [ ] Refactor/Chore
- [x] Documentation
- [ ] Breaking change

## How Has This Been Tested?
- `bun test tests/static/home-navigation.test.ts
tests/static/navigation.test.ts tests/static/product-navigation.test.ts
tests/static/start-routing.test.ts`
- `bun run lint`
- `git diff --check`

All focused tests pass. Lint completes with existing repository warnings
and no errors.

## Screenshots (if applicable)

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

## Additional context
2026-09-10 09:21:03 -07:00