@devries-cameron20 / composio Mirror · read-only / commits / 7e4e6811c
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 07:15 UTC

test(cli): refresh skills and certify authoring examples (#5180)

This PR: - refreshes CLI and Effect v4 guidance for registration identity, shared flags, acting users, help/version handling, and `@composio/client/effect` - documents command data flow, `TerminalUI`, unlimited listeners, Ctrl+C/Ctrl+D, prompt fallbacks, and recovery after partial side effects - adds `validate:cli-skills` to Agent Substrate CI for source-linked examples, compiled snippets, and selected invocation contracts - exercises a teaching command through the real tree and invocation, asserting its organization/project factory arguments separately from native Effect request mapping - rejects stale registration excerpts, dropped client Effects, and wrong organization/project scopes - validates 574 CLI contract tests, 5 checker tests, 27 workflow tests, TypeScript checks, Effect diagnostics, guidance/routing checks, lint, and formatting The contract checks include terminal output, prompt cancellation, runner signals, listener shutdown, and sink failures. A local PTY probe confirms Ctrl+D ends a cooked stdin read. The checks certify the examples and selected contracts; the documented unseen-task protocol does not claim measured agent performance. VHS recordings are omitted because the change updates authoring guidance and verification without adding a command surface.

Alberto Schiabel committed Nov 1, 2026 at 23:59 UTC 7e4e6811cfe2860069779ac59c9daa4f20023251
17 files changed +500 -121
.agents/skills/cli-command/SKILL.md
+2
@@ -12,3 +12,5 @@ Read the relevant reference:
12 - `references/design.md` for command surface, output, errors, interactivity, configuration, and exit codes.
13 - `references/implementation.md` for Effect command wiring and service patterns.
14 - `references/client-cache-sync.md` when touching toolkit client services.
15 +- `references/command-example.md` for the repo-linked authoring recipe, behavioral checks, and an unseen-task evaluation protocol.
16 +- `references/data-and-lifecycle.md` for TerminalUI, stdin/stdout contracts, streaming commands, terminal controls, and recovery pitfalls.
.agents/skills/cli-command/references/command-example.md new
+71
@@ -0,0 +1,71 @@
1 +# A checked command-authoring example
2 +
3 +The example declares an optional toolkit filter, resolves the acting user, sends a scoped native Effect request, and writes JSON. It is a teaching command, not the production connection renderer. The production handler also decodes responses and computes permission groups.
4 +
5 +The declaration and handler below are compiled by the CLI's test typecheck. The example test substitutes this declaration for `connections list`, so argv enters the real command tree and `runInvocation` over `TestLive`.
6 +
7 +## Declaration
8 +
9 +```ts no-check repo-file=ts/packages/cli/test/skills/command-example.cmd.ts
10 +import { Command, Flag } from 'effect/cli';
11 +import { withCommandMeta } from 'src/invocation/command-identity';
12 +import { listAccounts } from './command-example.handler';
13 +
14 +const toolkit = Flag.String('toolkit').pipe(
15 + Flag.withDescription('Filter by toolkit slug'),
16 + Flag.optional
17 +);
18 +
19 +/** Teaching example, substituted for connections list only by its test. */
20 +export const connectionsCmd$List = Command.make('list', { toolkit }, listAccounts).pipe(
21 + Command.withDescription('List connected accounts.'),
22 + withCommandMeta({ requiresLogin: true })
23 +);
24 +```
25 +
26 +## Handler
27 +
28 +```ts no-check repo-file=ts/packages/cli/test/skills/command-example.handler.ts
29 +import { Effect, Option } from 'effect';
30 +import { actingUser } from 'src/commands/surface';
31 +import { ComposioClientSingleton } from 'src/services/composio-clients';
32 +import { idempotent } from 'src/services/composio-request';
33 +import { TerminalUI } from 'src/services/terminal-ui';
34 +
35 +export type ListParams = { readonly toolkit: Option.Option<string> };
36 +
37 +/** Teaching example: lists accounts through the CLI's native Effect client. */
38 +export const listAccounts = ({ toolkit }: ListParams) =>
39 + Effect.gen(function* () {
40 + const ui = yield* TerminalUI;
41 + const factory = yield* ComposioClientSingleton;
42 + const { userId, project } = yield* actingUser();
43 + const client = yield* factory.getFor({ orgId: project.orgId, projectId: project.projectId });
44 + const result = yield* client.connectedAccounts.list(
45 + {
46 + user_ids: [userId],
47 + toolkit_slugs: Option.map(toolkit, slug => [slug]).pipe(Option.getOrUndefined),
48 + },
49 + idempotent
50 + );
51 + yield* ui.output(JSON.stringify(result.items), { force: true });
52 + });
53 +```
54 +
55 +`ComposioClientSingleton` constructs clients from `@composio/client/effect`. The handler yields a native client operation directly. Its test replaces the connected-account resource's HTTP transport with the existing recording transport. The test records scope arguments separately because its fixed recording client does not prove scoped request headers. It does not replace the resource operation with a function that returns a canned Effect.
56 +
57 +## What the checks establish
58 +
59 +The root command `bun run validate:cli-skills` runs in Agent Substrate CI. It checks that linked excerpts still match source, compiles standalone Effect examples and the CLI tests, exercises the example, runs existing registration and invocation contracts, and checks Effect diagnostics.
60 +
61 +The example asserts the organization and project passed to `getFor`, optional-filter request mapping, the acting user, JSON stdout, empty stderr, inherited login enforcement, help/version handling, parse failures, skipped hooks, and lifecycle identity. Existing registration and command-identity tests cover nested providers, reused registrations, root/dev command paths, shared flags, and canonical paths after a rejected command token.
62 +
63 +These checks certify the recipe and the selected contracts at the tested revision. They do not certify arbitrary prose claims, live backend behavior, or an agent's ability to apply the skill to an unfamiliar request. The routing checks measure description matching, not skill use. Known telemetry defects from the architecture review remain separate fixes.
64 +
65 +## Evaluate actual skill use
66 +
67 +A separate authoring trial measures whether an agent can use the guidance. The trial starts from a fresh worktree and gives the agent the CLI and Effect skills plus a new task. The evaluator keeps its request assertions out of the agent's starting context.
68 +
69 +An example task asks for an optional `--limit` on the teaching command. When absent, the command must preserve the existing request. When present, it must send the parsed integer as the request limit. The agent must keep login enforcement, output streams, and lifecycle reporting intact.
70 +
71 +The evaluator checks both argv forms against the recorded HTTP request, then runs `bun run validate:cli-skills`. The evaluation records the starting revision, prompt, produced diff, and check results. The task is a template for an unseen trial, not a claim that such a trial has run. Reusing a published solution does not establish performance on an unseen task.
.agents/skills/cli-command/references/data-and-lifecycle.md new
+54
@@ -0,0 +1,54 @@
1 +# Command data and lifecycle
2 +
3 +## Producing and consuming data
4 +
5 +[TerminalUI](../../../../ts/packages/cli/src/services/terminal-ui.ts) owns terminal output and prompts. Each stream reports whether it is attached to a terminal through `isTTY`. The three stream capabilities are independent.
6 +
7 +| Concern | Current behavior |
8 +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
9 +| Machine data | `ui.output(text)` writes a newline to redirected stdout. Visible TTY stdout stays silent unless `{ force: true }` is set. |
10 +| Human decoration | `ui.log`, `note`, `intro`, `outro`, and spinners use stderr and disappear when stderr is not a TTY. |
11 +| Persistent diagnostics | `ui.error(text)` writes to stderr even when redirected. It also carries protocol metadata such as `RUN_LOG_FILE`. |
12 +| Prompts | `canPrompt` requires both stdin and stderr to be TTYs. Piping stdout alone does not disable prompts. |
13 +
14 +A command serializes its machine result before calling `output`. A command without a separate human renderer uses `force: true` when its data must remain visible on a terminal. Output consumers must follow that command's contract. `proxy` can return text or JSON, while listeners emit a stream rather than one JSON document.
15 +
16 +[resolveOptionalTextInput](../../../../ts/packages/cli/src/effects/resolve-optional-text-input.ts) handles a literal string, `@file`, explicit `-` for stdin, or implicit piped stdin when no value is supplied. A file or explicit value takes precedence over implicit stdin. The helper returns text or the configured missing-value fallback. The command validates supplied data with its own parser and schema before using it.
17 +
18 +[Stdin.readAll](../../../../ts/packages/cli/src/services/stdin.ts) buffers size-limited input until end of input (EOF). It is not a reader for an unlimited event stream. A producer that never closes stdin keeps the command waiting. `TestLive({ stdin: { isTTY: false, data: '...' } })` supplies finite test input without consuming the test runner's stdin.
19 +
20 +## Commands that do more than request and print
21 +
22 +| Command | Behavior that changes the implementation approach |
23 +| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24 +| `listen` | A realtime subscription can run indefinitely without `--timeout` or `--max-events`. It writes payload files and an `events.jsonl` index, and emits status and event lines. `--stream` also emits inline payload values. |
25 +| `dev triggers listen` | A long-lived listener can append to an output file or forward events to a URL. Each sink can fail independently. |
26 +| `run` | A child process inherits stdin, stdout, and stderr. Arbitrary script output is not a CLI JSON result. The command announces a log path on stderr and preserves the child's exit outcome. |
27 +| `proxy` | A successful proxy operation can contain an upstream HTTP error response. The command's exit code alone does not establish an upstream success status. |
28 +
29 +The [listen handler](../../../../ts/packages/cli/src/commands/listen/listen.handler.ts) uses scoped event fibers and `acquireUseRelease` for temporary-trigger cleanup. It does not collect the full event stream into memory. Its in-memory event-id set still grows with the subscription, so an agent session needs a bounded duration or event count.
30 +
31 +[Sink failure handling](../../../../ts/packages/cli/src/commands/triggers/sink-failures.ts) counts failures and continues by default. The stop summary remains visible on redirected stderr. `--fail-fast` stops on the first sink failure and exits 1. A clean listener exit therefore does not prove every event was saved or forwarded. On a count or timeout stop, accepted event work gets a bounded drain. A signal stop interrupts active event fibers before release, so it does not guarantee that every accepted write completed.
32 +
33 +## Ctrl+C, Ctrl+D and cleanup
34 +
35 +The [runner](../../../../ts/packages/cli/src/run-main.ts) owns SIGINT, SIGTERM, and SIGHUP. Handlers cooperate through [ShutdownSignal](../../../../ts/packages/cli/src/services/shutdown-signal.ts). Resource cleanup belongs in scoped Effects and finalizers.
36 +
37 +| Situation | Result |
38 +| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
39 +| Ctrl+C interrupts a normal command | An interruption-only outcome after SIGINT exits 130. SIGTERM and SIGHUP use 143 and 129. |
40 +| A subscribed listener receives Ctrl+C or SIGTERM | It cooperates and normally exits 0 after release. Before subscription confirmation, interruption still uses 130 or 143. |
41 +| `run` receives a stop signal | It forwards the signal to its child process group and mirrors how the child ends. A child that handles the signal can exit 0. |
42 +| A second signal arrives, or shutdown exceeds 10 seconds | The runner forces termination. Finalizers are not guaranteed to complete. |
43 +| A finite stdin read receives EOF | `Stdin.readAll()` returns the buffered input. In a Unix terminal in cooked mode, Ctrl+D on an empty input line produces EOF. It is not a process-wide stop signal. |
44 +| Clack reports prompt cancellation | `confirm` returns false. `select` returns the first option. Ctrl+D has no CLI-wide cancellation contract in raw prompts and is not a substitute for Ctrl+C. |
45 +
46 +When prompting is unavailable, `confirm` returns its configured default, which is true if omitted. `select` returns the first option. A handler must not treat either fallback as a person's explicit approval. Destructive commands need an explicit noninteractive policy, as in `connections remove --yes`.
47 +
48 +## Recovery for agents
49 +
50 +A parsed, authenticated invocation can still fail after a remote action took effect. [Idempotent request options](../../../../ts/packages/cli/src/services/composio-request.ts) enable retries only for calls known to be safe to repeat. An agent checks remote state before repeating a create, delete, execution, or proxy action after a timeout or interruption.
51 +
52 +A recovery flow keeps stdout and stderr separate, inspects the exit outcome, and applies the command's output contract. A nonzero exit can still accompany useful execution JSON. A zero listener exit can accompany sink-failure diagnostics. For `run`, the child script defines the meaning of its output and exit status.
53 +
54 +After a listener is force-killed, temporary-trigger cleanup and accepted writes may be incomplete. Existing payload files and the stop diagnostics are evidence, not proof of complete delivery. Prompt defaults, EOF, and a clean shutdown do not authorize an agent to infer that a requested side effect succeeded.
.agents/skills/cli-command/references/design.md
+1 -1
@@ -24,7 +24,7 @@
24 ## Configuration And Exit Codes
25
26 - Runtime config is read from environment variables via `effect/Config`. Every variable the CLI reads is declared, under its full name, in one of the catalogs in `src/config` (`APP_CONFIG` for user-facing `COMPOSIO_*` settings, `DEBUG_CONFIG`, `TELEMETRY_CONFIG`, `HOST_CONFIG`, `GITHUB_CONFIG`); add new variables there, never inline. Tests inject `ConfigProvider.fromEnvRecord({...})`.
27 -- Persistent user/auth state lives in `~/.composio/user-config.json`; `ComposioUserContext` merges environment variables over the stored file, so an env var overrides the stored value.
27 +- Persistent user/auth state lives in `~/.composio/config.json` and `~/.composio/user_data.json`. The API key can be stored in the OS keyring. `ComposioUserContext` applies environment overrides to stored values.
28 - Project-scoped data uses a project-local `.composio/` directory.
29 - Exit `0` on success and `1` on failure. A command a signal cancels exits 128 + the signal's number: `130` (Ctrl-C), `143` (SIGTERM), `129` (SIGHUP). A listener stopped with Ctrl-C or SIGTERM once subscribed exits `0`; `composio run` ends the way its script did (its code, or the same signal). Never assign `process.exitCode`: an error declares `[Runtime.errorExitCode]` / `[Runtime.errorReported]` (effect `Runtime`), and `Runtime.defaultTeardown`, run by the CLI's runner (`src/run-main.ts`), picks the code. Never install signal handlers in a command; cooperate through `ShutdownSignal` instead (see `ts/packages/cli/AGENTS.md`). There is no distinct "invalid usage" exit code — do not invent one.
30
.agents/skills/cli-command/references/implementation.md
+19
@@ -1,5 +1,15 @@
1 # CLI Implementation
2
3 +## Start with the current command model
4 +
5 +The [contributor guide](../../../../ts/packages/cli/CONTRIBUTING.md) traces one command through parsing, behavior, registration, and its argv-level test. The generated [command catalog](../../../../ts/packages/cli/src/commands/COMMANDS.md) lists every registration and its source. The package's AGENTS.md remains authoritative.
6 +
7 +- Groups register children through `withRegisteredSubcommands`, which supplies parsed identity and inherited policy. Direct `Command.withSubcommands` bypasses it.
8 +- `withCommandMeta` declares login, hooks, telemetry family, and unsupported shared flags. Handlers do not repeat login gates or lifecycle reporting.
9 +- `CommandSurface` supplies root/dev context and dev shared flags. `actingUser()` or `actingUserOption()` resolves the acting user and project. A user filter does not use a test-user fallback.
10 +- The same command definition can have multiple registrations. Root shortcuts do not need copied handlers or descriptions.
11 +- Changes to command paths or help summaries regenerate `COMMANDS.md` with `pnpm --filter @composio/cli run commands:map`.
12 +
13 ## Command Files
14
15 One directory per command under `src/commands/`, files sharing the command's dotted basename. The authoritative description, including the legacy shape and the test mirror, is "Command module layout" in `ts/packages/cli/AGENTS.md`; the short form:
@@ -75,6 +85,14 @@ export const runToolsList = ({ toolkit, query, limit }: ToolsListParams) =>
85
86 Follow existing local patterns before introducing new service abstractions.
87
88 +## Native Effect client
89 +
90 +`ComposioClientSingleton` in `src/services/composio-clients.ts` builds `@composio/client/effect` clients with `make`, explicit `Auth`, scope, the Effect HTTP transport, CLI identity, and schema loaders. Handlers get a client through `getFor({ orgId, projectId })` after resolving project context.
91 +
92 +Client operations already return Effects, so handlers yield them directly. Paginated reads use the client's streams. Fallible Promise adapters remain appropriate only for dependencies that return Promises. Read operations can pass `idempotent` from `src/services/composio-request.ts`. Execution and proxy operations must retain their existing retry policy. Runtime response decoding and stdout allowlists remain command-owned contracts.
93 +
94 +The command-example reference contains a runnable recipe and request assertions against the real Effect client over a stub HTTP transport.
95 +
96 ## Effect Platform Boundaries
97
98 `node:path`, `node:fs`, `node:os`, `node:child_process`, `process.env`, and `try`/`catch` are lint-banned (oxlint) in `src/`:
@@ -109,6 +127,7 @@ For CLI source changes, run from the repo root:
127
128 ```bash
129 pnpm typecheck
130 +pnpm --filter @composio/cli run lint:effect
131 pnpm --filter @composio/cli test
132 ```
133
.agents/skills/effect-v4/SKILL.md
+6 -4
@@ -29,10 +29,9 @@ See [versions.json](versions.json) for the full matrix (also `typescript`, `vite
29 - [references/upgrade-workflow.md](references/upgrade-workflow.md) — procedure for
30 bumping to a newer release.
31
32 -Code excerpts in those references are short quotes from real, currently-compiling repo
33 -files (path cited at each excerpt) — not standalone examples. The compile-checked
34 -source of truth is always the cited file itself; when it and a reference disagree,
35 -trust the file and fix the reference.
32 +References label source excerpts and standalone framework examples separately. Repo-linked
33 +excerpts name the file checked by `validate:cli-skills`. The cited source remains authoritative
34 +when an excerpt or explanation disagrees with the implementation.
35
36 ## Non-negotiables
37
@@ -60,6 +59,7 @@ trust the file and fix the reference.
59
60 ```bash
61 pnpm typecheck
62 +pnpm --filter @composio/cli run lint:effect
63 pnpm --filter @composio/cli test
64 ```
65
@@ -72,3 +72,5 @@ node .agents/skills/effect-v4/scripts/check-examples.mjs
72 ```
73
74 Blocks that quote repo files with unresolvable imports carry a `no-check` fence info string.
75 +
76 +`bun run validate:cli-skills` also verifies repo-linked command examples, their native Effect client requests, and the selected invocation contracts in Agent Substrate CI. Standalone snippet compilation and routing probes alone do not certify command behavior or agent task performance.
.agents/skills/effect-v4/references/cli-surface.md
+61 -115
@@ -1,133 +1,79 @@
1 -# effect/cli surface, as used in this repo
1 +# Effect CLI in this repository
2
3 -`@effect/cli` no longer exists. The CLI framework lives under `effect/cli`:
4 -`Command`, `Flag` (was `Options`), `Argument` (was `Args`), `GlobalFlag` (was
5 -`BuiltInOptions`), `CliConfig`, `CliOutput`, `CliError` (was `ValidationError`/
6 -`HelpDoc`). Ground truth for this reference is
7 -`ts/packages/cli/src/cli-config.ts`, `ts/packages/cli/src/cli-main.ts`, and
8 -`ts/packages/cli/src/invocation/invocation.ts` — read their full module docstrings before touching the runner, not just the excerpts below.
3 +The framework lives in `effect/cli`. The installed `effect@4.0.5` typings determine which interfaces compile. The CLI's registration and invocation modules determine how the repository uses them.
4
10 -## Command shape
5 +## Command registration
6
12 -```ts
13 -import { Command } from 'effect/cli';
7 +A command definition declares flags, arguments, descriptions, examples, and its imported handler. A handler accepts a plain params type and returns an Effect. The [contributor guide](../../../../ts/packages/cli/CONTRIBUTING.md) follows a filter through this structure.
8 +
9 +Every group uses `withRegisteredSubcommands` from `src/commands/registration.ts`. This helper supplies command identity and enforces inherited login metadata and supported shared flags. Calling `Command.withSubcommands` directly bypasses that behavior.
10
15 -declare const toolsCmd$List: Command.Command<'list', {}, never, never>;
16 -declare const toolsCmd$Info: Command.Command<'info', {}, never, never>;
11 +The following is the current connections group.
12
18 -export const rootToolsCmd = Command.make('tools').pipe(
19 - Command.withDescription('Browse and inspect tools before executing them.'),
20 - Command.withSubcommands([toolsCmd$List, toolsCmd$Info])
13 +```ts no-check repo-file=ts/packages/cli/src/commands/connections/connections.cmd.ts
14 +import { withCommandMeta } from 'src/invocation/command-identity';
15 +import { Command } from 'effect/cli';
16 +import { connectionsCmd$List } from './list/connections.list.cmd';
17 +import { connectionsCmd$Remove } from './remove/connections.remove.cmd';
18 +import { withRegisteredSubcommands } from 'src/commands/registration';
19 +
20 +export const rootConnectionsCmd = Command.make('connections').pipe(
21 + Command.withDescription('Inspect and remove connected toolkit accounts.'),
22 + withRegisteredSubcommands([connectionsCmd$List, connectionsCmd$Remove]),
23 + withCommandMeta({ requiresLogin: true })
24 );
25 ```
26
24 -(`ts/packages/cli/src/commands/tools/tools.cmd.ts`, unchanged shape from v3 apart from
25 -the import path — `Command.make`/`.withDescription`/`.withSubcommands` all carried over.)
27 +The registration supplies its command path after parsing. Root shortcuts can reuse the same definition with different command paths. `withCommandMeta` declares login requirements, invocation hook policy, telemetry family, and unsupported dev shared flags. The selected handler begins after parsing, then runs its enabled hooks, records the invoked event, rejects unsupported flags, and checks login.
28 +
29 +`CommandSurface` supplies root/dev context and dev shared flags. `actingUser()` resolves the acting user and project together. Handlers use these helpers instead of repeating user or project fallback rules. [ADR 0001](../../../../ts/packages/cli/docs/adr/0001-command-identity-after-parse.md) records the identity decision.
30
27 -Flags/arguments: `Flag.String/Boolean/Int/Literals/Directory(...)` (was
28 -`Options.text`/`.boolean`/`.integer`/`.choice`/`.directory`), with the same
29 -`.withDescription`/`.withDefault`/`.withAlias`/`.optional` combinators. `Argument.String(name)`
30 -takes a bare string name, not `{ name }`. Variadic: `Argument.variadic()` must be called
31 -with parens when piped — the bare unapplied reference resolves to the wrong overload.
31 +## Flags and arguments
32
33 -## `CliConfig.builtIns`
33 +Named options use `Flag.String`, `Flag.Boolean`, `Flag.Int`, `Flag.Literals`, or `Flag.Directory`. Positionals use `Argument.String`. Constructors use capital letters, while combinators use lowercase names. `Argument.variadic()` must be called when it is piped.
34
35 -v4's `CliConfig.Service` shrank to one field, `builtIns` — the ordered list of active
36 -global flags. `ts/packages/cli/src/cli-config.ts`:
35 +This standalone framework example demonstrates an optional flag and a positional argument.
36
37 ```ts
39 -import { GlobalFlag, type CliConfig } from 'effect/cli';
38 +import { Argument, Flag } from 'effect/cli';
39 +
40 +export const toolkit = Argument.String('toolkit');
41 +export const query = Flag.String('query').pipe(Flag.withDescription('Text search'), Flag.optional);
42 +```
43 +
44 +Optional flags produce `Option` values. Defaults, aliases, and descriptions belong in the declaration so help and parsing agree.
45 +
46 +## Builtins, help and version
47 +
48 +`src/cli-config.ts` enables the repository's Help and Version actions. Both wrap framework actions to record command identity without running a selected handler.
49
50 +```ts no-check repo-file=ts/packages/cli/src/cli-config.ts
51 +import { Help, Version } from 'src/commands/root-help';
52 +import type { CliConfig } from 'effect/cli';
53 +
54 +// Help and version use the framework parser, wrapped to record the command they answer for. The
55 +// help formatter keeps version output bare.
56 export const ComposioCliConfig = {
42 - builtIns: [GlobalFlag.Help],
57 + builtIns: [Help, Version],
58 } satisfies Partial<CliConfig.CliConfig.Service>;
59 ```
60
46 -This drops `--version` (see the next section), `--wizard`, `--completions`, and
47 -`--log-level` (Composio has its own `--log-level` flag on the default command) — the v4
48 -equivalent of v3's `showBuiltIns: false`, scoped to exactly the one builtin Composio wants.
49 -
50 -v3's `autoCorrectLimit` and `isCaseSensitive` have **no v4 config field**, and Composio no
51 -longer reproduces either behavior:
52 -
53 -- The parser always computes "Did you mean?" suggestions internally
54 - (`internal/auto-suggest.ts`) and bakes them into `CliError.UnrecognizedOption` /
55 - `CliError.UnknownSubcommand`'s `message` getter. There is no parser switch to disable
56 - them, and Composio deliberately renders them as-is now — they are useful UX, not a
57 - regression to work around.
58 -- v4's parser performs no case-folding anywhere — flag/subcommand matching is always
59 - exact, so case-sensitivity needs no config.
60 -
61 -`ComposioCliConfig`'s `builtIns` narrowing is the _only_ `CliConfig` customization
62 -Composio makes. There is no custom `CliOutput.Formatter` — `InvocationLive` provides no
63 -`CliOutput.layer(...)` at all, so `Command.runWith` uses v4's own
64 -`CliOutput.defaultFormatter()` for everything: suggestions render as-is. An earlier revision of this file
65 -wrapped `defaultFormatter()` to strip suggestions and flatten `formatVersion` back to a
66 -bare semver; that formatter (`ComposioCliOutputFormatter`, `withoutSuggestions`) was
67 -deleted as a deliberate PR-review decision — do not reintroduce it.
68 -
69 -## `--version`, `-v`, and `composio version` print the same bare semver
70 -
71 -`GlobalFlag.Version` is not in `builtIns`. `src/commands/index.ts`'s
72 -`normalizeVersionFlag` rewrites a leading `--version`/`-v` to the `version` command before
73 -the parser runs, so all three spellings share `src/commands/version.cmd.ts`'s handler and
74 -print the bare `pkg.version`/`DEBUG_OVERRIDE_VERSION` via `ui.output()`. v4's
75 -`CliOutput.defaultFormatter().formatVersion` (`<name> v<version>`) is never reached: keeping
76 -the built-in active would have let `composio <subcommand> --version` render that banner
77 -instead, a second rendering of the same value. `composio <subcommand> --version` is therefore
78 -an unrecognized flag, like any other unknown option.
79 -
80 -## `runWith`, `ShowHelp`, and the no-double-print rule
81 -
82 -v4's `Command.runWith` is not a passive parser: it **renders help and parse/validation
83 -errors itself** (`Console.log`/`Console.error`, via whichever `CliOutput.Formatter` is
84 -in context — v4's default, per above) for the resolved `commandPath`, then re-fails with
85 -`CliError.ShowHelp`. By the time that failure reaches this package's runner, the correct
86 -output has already been printed once, to the correct stream.
87 -
88 -`CliError.ShowHelp` is not a plain tagged error — it carries two `effect/Runtime`
89 -markers set on the class itself (`ts/vendor/.../cli/CliError.ts`):
90 -`[Runtime.errorExitCode] = errors.length ? 1 : 0` and `[Runtime.errorReported] = false`.
91 -Those markers _are_ the contract: "I already printed my own output; don't log me again
92 -(`errorReported`), and here is the process exit code to use (`errorExitCode`)."
93 -`Runtime.makeRunMain` (which `BunRuntime.runMain`/`NodeRuntime.runMain` build on) reads
94 -`errorReported` off the squashed cause to decide whether to auto-log, and
95 -`Runtime.defaultTeardown` reads `errorExitCode` the same way — see
96 -`ts/vendor/effect/packages/effect/src/Runtime.ts`'s `getErrorReported`/`getErrorExitCode`.
97 -
98 -The CLI's own errors use the same contract. A failure a command already printed
99 -(`ReportedFailure` from `src/effects/report-failure.ts`, `ReportedToolExecutionError`,
100 -`ShellSetupAbortError`, `SetupCommandError`, …) or that carries a custom code
101 -(`ChildProcessExited` from `composio run`) declares the markers as getters, and
102 -the CLI's runner (`ts/packages/cli/src/run-main.ts`, built on `Runtime.makeRunMain`) exits
103 -through `Runtime.defaultTeardown`: 0 on success, and otherwise with the squashed failure's
104 -`errorExitCode` (1 when unset). An exit made of interruptions alone after a signal is 128 + the
105 -signal's number instead (130, 143, 129). Nothing in `src/` assigns `process.exitCode`.
106 -
107 -`runInvocation` (`src/invocation/invocation.ts`) skips every failure whose `errorReported`
108 -is false (`ShowHelp` included); when nothing is left it prints nothing. If you add rendering
109 -anywhere in this path, you will double-print — this is the single most important rule when
110 -touching the runner. It prints an expected failure's message, a rejected key's hint, or, for
111 -whatever else is left, the defect report captured via `effect-errors`, then re-fails with the
112 -original `Cause`, so tests still match the typed error. `forRunner` (in `cli-main.ts`'s
113 -pipeline) turns what the invocation printed into a `ReportedFailure` and passes failures
114 -already on screen untouched, so the markers take over. `Command.runWith` never renders the
115 -defect path, so appending help text there is not a double-print.
116 -
117 -## argv preprocessing and the executable-prefix contract
118 -
119 -`Command.runWith(rootCommand, { version })` expects argv **without** the node/bun
120 -executable and script path prefix — unlike v3's `Command.run`, which stripped that
121 -prefix internally. `runInvocation` still passes the _full_ `process.argv` into
122 -`runWithConfig` (from `src/commands`); that module is responsible for slicing
123 -`argv.slice(2)` immediately before calling `Command.runWith`. Do not change this
124 -boundary without updating both sides together.
125 -
126 -Composio also does argv rewriting _before_ the parser ever sees the tokens, for cases
127 -`effect/cli`'s lexer cannot express on its own — e.g. `composio run`'s
128 -passthrough of arbitrary `-`-prefixed tokens to the spawned script (the lexer treats
129 -every `-`-prefixed token as an option unless a literal `--` precedes it, and that `--`
130 -split does not propagate into subcommands). Look at `normalizeRunPassthroughArgs` and
131 -its siblings (`normalizeListenStreamFlag`, `normalizeVersionFlag`,
132 -`normalizeHiddenDebugFlags`) in `src/commands/index.ts` for the established pattern
133 -before inventing a new one.
61 +`src/commands/root-help.ts` defines `helpFormatter()`. It starts from `CliOutput.defaultFormatter()`, keeps version output bare, and appends the root overview. `src/commands/index.ts` provides it as `CliOutput.Formatter`. Suggestions remain the framework's own.
62 +
63 +`--version`, `-v`, and `composio version` print the version without a command-name prefix. A subcommand also accepts the version builtin. There is no version-token rewrite. The CLI declares its own log-level flag, while wizard and completion builtins are not enabled.
64 +
65 +## Invocation and output
66 +
67 +`Command.runWith(rootCommand, { version })` receives argv without the executable and script prefix. `runInvocation` receives full argv. `runWithConfig` removes the first two entries immediately before dispatch.
68 +
69 +Compatibility normalization in `src/commands/argv-compat.ts` handles script tails for `run` and bare `listen --stream`. Effect still owns parsing. New command behavior does not need another argv parser.
70 +
71 +`Command.runWith` renders help and parse failures before failing with `CliError.ShowHelp`. Explicit help and version use stdout. Implicit command help and errors use stderr. A parse failure has an exit code of 1 and records the canonical command path with reason `parse_error`. Help, version, parse failures, and groups that only show help skip selected-command hooks.
72 +
73 +A reported failure carries `[Runtime.errorReported] = false`, which suppresses another print. `[Runtime.errorExitCode]` supplies its code. `runInvocation` reports an unreported expected failure or defect once and preserves the original cause for tests. `forRunner` marks what was printed before the runner exits through `Runtime.defaultTeardown`.
74 +
75 +The runner owns signals. Commands cooperate through `ShutdownSignal`. A stopped subscribed listener exits 0. `run` preserves its child's code or signal. Other interrupted commands exit with 128 plus the signal number. Commands do not assign `process.exitCode` or install signal handlers.
76 +
77 +## Verification
78 +
79 +`bun run validate:cli-skills` checks linked excerpts against source, compiles standalone snippets and the CLI tests, runs the documented command example and existing invocation contracts, then checks Effect diagnostics. Its linked examples and behavior tests are described in the `cli-command` skill's command-example reference. These checks certify the examples and selected contracts, not an agent's ability to solve an unseen task.
.agents/skills/typescript-testing/references/effect-v4-cli.md
+6
@@ -123,3 +123,9 @@ Port tests by contract, not file count:
123 - shared service layers, config providers, filesystem/process adapters, interruption, time, and
124 cleanup;
125 - direct binary smoke tests and Docker CLI E2E after unit and package checks pass.
126 +
127 +## Authoring-skill examples
128 +
129 +`bun run validate:cli-skills` compiles the skill snippets, checks linked excerpts against current source, and runs the documented teaching command through `cliExit()` over `TestLive`. Its request assertions use the native `@composio/client/effect` implementation over the recording HTTP transport from `test/__utils__/services/stub-composio-client.ts`. The same command also runs the existing registration and invocation contracts and Effect diagnostics.
130 +
131 +This is recipe and contract verification. It does not measure agent performance on an unseen authoring task. The separate trial protocol lives in the `cli-command` command-example reference.
.github/workflows/agent-substrate.yml
+7 -1
@@ -11,7 +11,10 @@ name: Agent Substrate
11 # skill keeps a probe asserting it is the unique top match for a
12 # representative task, so description edits cannot silently break routing.
13 #
14 -# These checks run nowhere else, so this workflow is their only enforcement
14 +# `validate:cli-skills` checks repo-linked examples and exercises the selected
15 +# CLI invocation contracts, including native Effect client requests.
16 +#
17 +# These guidance checks run nowhere else, so this workflow is their only enforcement
18 # point. It runs on every push and PR with no path filters: the
19 # validate:agent-skills stale-guidance walk scans every text file in the
20 # repo, so any change can affect the result. Both scripts are
@@ -56,6 +59,9 @@ jobs:
59 - name: Validate skill routing
60 run: bun run validate:skill-routing
61
62 + - name: Certify CLI skill examples and invocation contracts
63 + run: bun run validate:cli-skills
64 +
65 - name: Typecheck agent tooling
66 run: bun run typecheck:agent-workflow
67
package.json
+1
@@ -59,6 +59,7 @@
59 "validate:agent-skills": "bun ts/scripts/validate-agent-skills.ts",
60 "validate:changesets": "node ts/scripts/validate-changesets.mjs",
61 "validate:skill-routing": "bun ts/scripts/test-skill-routing.ts",
62 + "validate:cli-skills": "bun test test/cli-skills.test.ts && bun ts/scripts/check-cli-skills.ts",
63 "prepublish": "pnpm run build:packages",
64 "changeset": "changeset",
65 "changeset:version": "changeset version",
test/cli-skills.test.ts new
+31
@@ -0,0 +1,31 @@
1 +import { describe, expect, test } from 'bun:test';
2 +import { checkLinkedExamples } from '../ts/scripts/check-cli-skills';
3 +
4 +const linked = (code: string) => `\`\`\`ts no-check repo-file=example.ts\n${code}\n\`\`\``;
5 +
6 +describe('repo-linked skill examples', () => {
7 + test('accepts a current excerpt with different indentation', () => {
8 + expect(
9 + checkLinkedExamples(linked(' current();'), () => 'function example() {\ncurrent();\n}')
10 + ).toBe(1);
11 + });
12 + test('rejects the old registration recipe even when its framework types still compile', () => {
13 + expect(() =>
14 + checkLinkedExamples(
15 + linked('Command.withSubcommands(children)'),
16 + () => 'withRegisteredSubcommands(children)'
17 + )
18 + ).toThrow('Example differs from example.ts');
19 + });
20 + test('fails when linked examples disappear', () => {
21 + expect(() => checkLinkedExamples('# No examples', () => '')).toThrow('Expected at least one');
22 + });
23 + test('rejects an empty example instead of certifying nothing', () => {
24 + expect(() => checkLinkedExamples(linked(''), () => 'source')).toThrow('Empty example');
25 + });
26 + test('rejects paths outside the repository', () => {
27 + expect(() =>
28 + checkLinkedExamples(linked('example').replace('example.ts', '../private.ts'), () => '')
29 + ).toThrow('Invalid example source path');
30 + });
31 +});
ts/packages/cli/test/skills/command-example.cmd.ts new
+14
@@ -0,0 +1,14 @@
1 +import { Command, Flag } from 'effect/cli';
2 +import { withCommandMeta } from 'src/invocation/command-identity';
3 +import { listAccounts } from './command-example.handler';
4 +
5 +const toolkit = Flag.String('toolkit').pipe(
6 + Flag.withDescription('Filter by toolkit slug'),
7 + Flag.optional
8 +);
9 +
10 +/** Teaching example, substituted for connections list only by its test. */
11 +export const connectionsCmd$List = Command.make('list', { toolkit }, listAccounts).pipe(
12 + Command.withDescription('List connected accounts.'),
13 + withCommandMeta({ requiresLogin: true })
14 +);
ts/packages/cli/test/skills/command-example.handler.ts new
+24
@@ -0,0 +1,24 @@
1 +import { Effect, Option } from 'effect';
2 +import { actingUser } from 'src/commands/surface';
3 +import { ComposioClientSingleton } from 'src/services/composio-clients';
4 +import { idempotent } from 'src/services/composio-request';
5 +import { TerminalUI } from 'src/services/terminal-ui';
6 +
7 +export type ListParams = { readonly toolkit: Option.Option<string> };
8 +
9 +/** Teaching example: lists accounts through the CLI's native Effect client. */
10 +export const listAccounts = ({ toolkit }: ListParams) =>
11 + Effect.gen(function* () {
12 + const ui = yield* TerminalUI;
13 + const factory = yield* ComposioClientSingleton;
14 + const { userId, project } = yield* actingUser();
15 + const client = yield* factory.getFor({ orgId: project.orgId, projectId: project.projectId });
16 + const result = yield* client.connectedAccounts.list(
17 + {
18 + user_ids: [userId],
19 + toolkit_slugs: Option.map(toolkit, slug => [slug]).pipe(Option.getOrUndefined),
20 + },
21 + idempotent
22 + );
23 + yield* ui.output(JSON.stringify(result.items), { force: true });
24 + });
ts/packages/cli/test/skills/command-example.test.ts new
+105
@@ -0,0 +1,105 @@
1 +import { vi } from 'vitest';
2 +import { Effect, Layer } from 'effect';
3 +import { ComposioClientSingleton, type ClientScope } from 'src/services/composio-clients';
4 +import { describe, expect, it } from '@effect/vitest';
5 +import { cliExit, MockConsole, recordedInvocationCalls, pkg, TestLive } from 'test/__utils__';
6 +import { stubClientResources } from 'test/__utils__/services/stub-composio-client';
7 +
8 +// The example enters the real root tree, registration and runInvocation. No production command changes.
9 +vi.mock(
10 + 'src/commands/connections/list/connections.list.cmd',
11 + () => import('./command-example.cmd')
12 +);
13 +
14 +const invoke = (args: ReadonlyArray<string>, loggedIn = true) =>
15 + Effect.gen(function* () {
16 + const stub = stubClientResources(['connectedAccounts'], () =>
17 + Response.json({ items: [], next_cursor: null })
18 + );
19 + const scopes: ClientScope[] = [];
20 + const recordingFactory = Layer.effect(
21 + ComposioClientSingleton,
22 + Effect.gen(function* () {
23 + const base = yield* ComposioClientSingleton;
24 + return ComposioClientSingleton.of({
25 + ...base,
26 + getFor: params =>
27 + Effect.suspend(() => {
28 + scopes.push(params);
29 + return base.getFor(params);
30 + }),
31 + });
32 + })
33 + );
34 + const { exitCode } = yield* cliExit(args).pipe(
35 + Effect.provide(recordingFactory),
36 + Effect.provide(stub.layer)
37 + );
38 + const stdout = yield* MockConsole.getLines({ stream: 'stdout', stripAnsi: true });
39 + const stderr = yield* MockConsole.getLines({ stream: 'stderr', stripAnsi: true });
40 + const calls = yield* recordedInvocationCalls;
41 + const lifecycle = calls.flatMap(call =>
42 + call.service === 'CommandLifecycleTelemetry' && call.event !== 'pluginHintShown'
43 + ? [{ event: call.event, path: call.context.commandPath }]
44 + : []
45 + );
46 + return { exitCode, stdout, stderr, calls, lifecycle, requests: stub.requests, scopes };
47 + }).pipe(Effect.provide(TestLive(loggedIn ? { fixture: 'user-config-with-global-context' } : {})));
48 +
49 +describe('CLI skill command example', () => {
50 + it.effect('maps an optional flag to a native Effect client request and prints only data', () =>
51 + Effect.gen(function* () {
52 + const result = yield* invoke(['connections', 'list', '--toolkit', 'github']);
53 + expect(result.exitCode).toBe(0);
54 + expect(result.stdout).toEqual(['[]']);
55 + expect(result.stderr).toEqual([]);
56 + expect(result.requests).toHaveLength(1);
57 + expect(result.scopes.at(-1)).toEqual({ orgId: 'org_1', projectId: 'consumer_project_test' });
58 + const request = result.requests[0]!;
59 + expect(request.method).toBe('GET');
60 + const url = new URL(request.path, 'https://stub.invalid');
61 + expect(url.pathname).toBe('/api/v3.1/connected_accounts');
62 + expect(url.searchParams.get('toolkit_slugs')).toBe('github');
63 + expect(url.searchParams.get('user_ids')).toBe('consumer-user-org_1');
64 + expect(result.lifecycle).toEqual([
65 + { event: 'invoked', path: 'connections list' },
66 + { event: 'succeeded', path: 'connections list' },
67 + ]);
68 + })
69 + );
70 +
71 + it.effect('omits the filter when absent', () =>
72 + Effect.gen(function* () {
73 + const result = yield* invoke(['connections', 'list']);
74 + expect(result.exitCode).toBe(0);
75 + expect(result.requests).toHaveLength(1);
76 + const url = new URL(result.requests[0]!.path, 'https://stub.invalid');
77 + expect(url.searchParams.has('toolkit_slugs')).toBe(false);
78 + })
79 + );
80 +
81 + it.effect('enforces inherited login metadata before sending requests', () =>
82 + Effect.gen(function* () {
83 + const result = yield* invoke(['connections', 'list'], false);
84 + expect(result.exitCode).toBe(1);
85 + expect(result.requests).toEqual([]);
86 + expect(result.stdout).toEqual([]);
87 + expect(result.stderr.join('\n')).toContain('composio login');
88 + expect(result.lifecycle.at(-1)).toEqual({ event: 'failed', path: 'connections list' });
89 + })
90 + );
91 +
92 + it.effect.each([
93 + { args: ['connections', 'list', '--help'], code: 0, text: '--toolkit' },
94 + { args: ['connections', 'list', '--version'], code: 0, text: pkg.version },
95 + { args: ['connections', 'list', '--unknown'], code: 1, text: '--unknown' },
96 + ])('handles $args without reaching the handler', ({ args, code, text }) =>
97 + Effect.gen(function* () {
98 + const result = yield* invoke(args, false);
99 + expect(result.exitCode).toBe(code);
100 + expect(result.requests).toEqual([]);
101 + expect([...result.stdout, ...result.stderr].join('\n')).toContain(text);
102 + expect(result.calls.filter(call => call.service !== 'CommandLifecycleTelemetry')).toEqual([]);
103 + })
104 + );
105 +});
ts/packages/cli/test/src/services/terminal-ui.test.ts
+16
@@ -2,6 +2,7 @@ import { Writable } from 'node:stream';
2 import { describe, expect, it, layer } from '@effect/vitest';
3 import { beforeEach, vi } from 'vitest';
4 import * as p from '@clack/prompts';
5 +import { CANCEL_SYMBOL } from '@clack/core';
6 import stringWidth from 'fast-string-width';
7 import { Data, Effect } from 'effect';
8 import {
@@ -72,6 +73,21 @@ describe('TerminalUI', () => {
73 vi.mocked(p.select).mockReset();
74 });
75
76 + it.effect('maps prompt cancellation to false for confirmation and the first selection', () =>
77 + Effect.gen(function* () {
78 + const { ui } = makeStreamedUi({ stdin: true, stdout: true, stderr: true });
79 + vi.mocked(p.confirm).mockResolvedValue(CANCEL_SYMBOL);
80 + vi.mocked(p.select).mockResolvedValue(CANCEL_SYMBOL);
81 + expect(yield* ui.confirm('proceed?', { defaultValue: true })).toBe(false);
82 + expect(
83 + yield* ui.select('pick', [
84 + { value: 'first', label: 'First' },
85 + { value: 'second', label: 'Second' },
86 + ])
87 + ).toBe('first');
88 + })
89 + );
90 +
91 it.effect(
92 'stdin redirected, stdout+stderr TTY: prompts fall back, stdout stays clean, decoration renders',
93 () =>
ts/scripts/check-cli-skills.ts new
+80
@@ -0,0 +1,80 @@
1 +#!/usr/bin/env bun
2 +import { readFileSync } from 'node:fs';
3 +import path from 'node:path';
4 +
5 +const root = path.resolve(import.meta.dir, '../..');
6 +const references = [
7 + '.agents/skills/effect-v4/references/cli-surface.md',
8 + '.agents/skills/cli-command/references/command-example.md',
9 +];
10 +
11 +/** Linked excerpts must still occur in the source that the compiler and behavior tests exercise. */
12 +export const checkLinkedExamples = (
13 + markdown: string,
14 + readSource: (file: string) => string
15 +): number => {
16 + const blocks = [
17 + ...markdown.matchAll(/^```(?:ts|typescript) no-check repo-file=(\S+)\n([\s\S]*?)^```/gm),
18 + ];
19 + if (blocks.length === 0) throw new Error('Expected at least one repo-linked TypeScript example');
20 + for (const [, file, code] of blocks) {
21 + if (!file || path.isAbsolute(file) || file.split('/').includes('..')) {
22 + throw new Error(`Invalid example source path: ${file}`);
23 + }
24 + const normalize = (text: string) =>
25 + text
26 + .split('\n')
27 + .map(line => line.trim())
28 + .join('\n')
29 + .trim();
30 + if (!code?.trim()) throw new Error(`Empty example from ${file}`);
31 + if (!normalize(readSource(file)).includes(normalize(code))) {
32 + throw new Error(`Example differs from ${file}`);
33 + }
34 + }
35 + return blocks.length;
36 +};
37 +
38 +if (import.meta.main) {
39 + let count = 0;
40 + for (const file of references) {
41 + count += checkLinkedExamples(readFileSync(path.join(root, file), 'utf8'), source =>
42 + readFileSync(path.join(root, source), 'utf8')
43 + );
44 + }
45 + console.log(`${count} CLI skill excerpts match repo source`);
46 + const commands = [
47 + ['node', '.agents/skills/effect-v4/scripts/check-examples.mjs'],
48 + ['pnpm', 'exec', 'turbo', 'run', 'typecheck', '--filter=@composio/cli'],
49 + [
50 + 'pnpm',
51 + '--filter',
52 + '@composio/cli',
53 + 'exec',
54 + 'vitest',
55 + 'run',
56 + 'test/skills/command-example.test.ts',
57 + 'test/src/commands/registration.test.ts',
58 + 'test/src/commands/surface.test.ts',
59 + 'test/src/commands/surface.acting-user.test.ts',
60 + 'test/src/invocation/invocation.test.ts',
61 + 'test/src/invocation/command-identity.test.ts',
62 + 'test/src/services/composio-client-singleton.test.ts',
63 + 'test/src/services/terminal-ui.test.ts',
64 + 'test/src/run-main.test.ts',
65 + 'test/src/services/shutdown-signal.test.ts',
66 + 'test/src/commands/triggers/sink-failures.test.ts',
67 + 'test/src/commands/listen/listen.cmd.test.ts',
68 + 'test/src/commands/triggers/triggers.listen.cmd.test.ts',
69 + ],
70 + ['pnpm', '--filter', '@composio/cli', 'run', 'lint:effect'],
71 + ];
72 + for (const cmd of commands) {
73 + console.log(`Checking: ${cmd.join(' ')}`);
74 + const result = Bun.spawnSync(cmd, { cwd: root, stdout: 'inherit', stderr: 'inherit' });
75 + if (result.exitCode !== 0) process.exit(result.exitCode || 1);
76 + }
77 + console.log(
78 + 'CLI skill examples compile and satisfy the selected invocation contracts. Agent task performance is not measured.'
79 + );
80 +}
tsconfig.agent-workflow.json
+2
@@ -11,6 +11,8 @@
11 },
12 "include": [
13 "scripts/agent-task.ts",
14 + "ts/scripts/check-cli-skills.ts",
15 + "test/cli-skills.test.ts",
16 "test/agent-task.test.ts",
17 "ts/scripts/validate-agent-skills.ts",
18 "ts/scripts/test-skill-routing.ts"