mirror of
https://github.com/ComposioHQ/composio.git
synced 2026-09-22 11:46:35 +08:00
022ecf6176
This PR: - codifies the schema-parsing convention in agent guidance: parse untyped/external data once at the boundary with zod (`z.infer` downstream) in the docs site and SDK packages, and with `effect/Schema` in the CLI - bans hand-rolled structural guards (`'x' in obj` / `typeof` chains), `as`-casts of parsed JSON, and fake validators such as `z.custom(() => true)` - updates `docs/AGENTS.md`, `ts/AGENTS.md`, `ts/packages/core/AGENTS.md`, and the existing trust-boundary rule in `ts/packages/cli/AGENTS.md` ## Context Follow-up to the review feedback that led to the #3958 split (#3966 / #3967 / #3968): the docs type-safety work initially shipped a suite of conditional structural utility helpers instead of zod schemas. This records the convention so agents and contributors reach for schemas by default.
1.6 KiB
1.6 KiB
AGENTS.md
TypeScript workspace guidance for AI agents.
Scope
ts/ contains the TypeScript SDK packages, examples, CLI, and runtime E2E tests.
Skill Routing
- Use
typescript-sdkfor@composio/core, shared TypeScript package behavior, generated SDK surfaces, and modifiers. - Use
typescript-providersfor packages underts/packages/providers/. - Use
typescript-testingfor Vitest, typecheck, package builds, examples, or runtime E2E test selection. - Use
cli-commandorcli-e2eforts/packages/cli/andts/e2e-tests/cli/. - Use
cli-releasefor first-party CLI beta builds, stable promotion, release verification, or recovery.
Commands
Run from the repository root:
pnpm build:packages
pnpm typecheck
pnpm lint:packages
pnpm test
pnpm test:e2e:node
pnpm test:e2e:deno
pnpm test:e2e:cloudflare
pnpm test:e2e:cli
Rules
- Do not edit
ts/vendor/; those submodules are read-only references. - Keep generated outputs owned by their generator.
- Add changesets only for changes to published TypeScript packages.
- Never add changesets for
@composio/clior@composio/cli-local-toolswhile.changeset/config.jsonignores them; record CLI notes ints/packages/cli/CHANGELOG.mdinstead. - Prefer focused package tests before broad workspace tests.
- Parse untyped or external data (API payloads, JSON,
unknown) at the boundary with schemas and let inferred types flow downstream: zod in SDK packages (@composio/core, providers, shared packages),effect/Schemaints/packages/cli/. Never hand-roll structural guards ('x' in obj/typeofchains) or cast parsed JSON withas.