1
+{
2
+ "src/analytics/events.ts": [
3
+ {
4
+ "rule": "no-restricted-syntax",
5
+ "reason": "spawn-time env handoff from parent run",
6
+ "target": "(process.env.COMPOSIO_CLI_PARENT_RUN_ID ?? crypto.randomUUID())"
7
+ },
8
+ {
9
+ "rule": "no-restricted-syntax",
10
+ "reason": "spawn-time env handoff read outside Effect",
11
+ "target": "const getInvocationOrigin = (): string => process.env.COMPOSIO_CLI_INVOCATION_ORIGIN ?? 'cli';"
12
+ },
13
+ {
14
+ "rule": "no-restricted-syntax",
15
+ "reason": "spawn-time env handoff read outside Effect",
16
+ "target": "const getParentRunId = (): string | undefined => process.env.COMPOSIO_CLI_PARENT_RUN_ID;"
17
+ }
18
+ ],
19
+ "src/bin.ts": [
20
+ {
21
+ "rule": "no-restricted-syntax",
22
+ "reason": "pre-runtime env write during bootstrap",
23
+ "target": "process.env[CLI_TELEMETRY_DEBUG_ENV_VAR] = 'true';"
24
+ }
25
+ ],
26
+ "src/cli-main.ts": [
27
+ {
28
+ "rule": "no-restricted-syntax",
29
+ "reason": "env write propagates run id to children",
30
+ "target": "process.env.COMPOSIO_CLI_PARENT_RUN_ID = commandTelemetryContext.runId;"
31
+ }
32
+ ],
33
+ "src/commands/index.ts": [
34
+ {
35
+ "rule": "no-restricted-syntax",
36
+ "reason": "env delete clears a stale hidden-flag value",
37
+ "target": "delete process.env.COMPOSIO_RUN_ACP_ONLY;"
38
+ },
39
+ {
40
+ "rule": "no-restricted-syntax",
41
+ "reason": "env write hands the stripped flag to run.cmd",
42
+ "target": "process.env.COMPOSIO_RUN_ACP_ONLY = acpOnly ? '1' : '0';"
43
+ }
44
+ ],
45
+ "src/commands/install.cmd.ts": [
46
+ {
47
+ "rule": "no-restricted-syntax",
48
+ "reason": "$SHELL is read inside a plain synchronous helper that mirrors install.sh's shell detection, outside any Effect context",
49
+ "target": "const shellEnv = process.env.SHELL ?? '';"
50
+ },
51
+ {
52
+ "rule": "no-restricted-syntax",
53
+ "reason": "COMPOSIO_INSTALL_DIR is the handoff variable set by the install.sh bootstrapper for this one-shot post-install step; read directly to stay byte-compatible with the script",
54
+ "target": "const installDir = process.env.COMPOSIO_INSTALL_DIR ?? path.join(os.homedir, '.composio');"
55
+ }
56
+ ],
57
+ "src/commands/run.cmd.ts": [
58
+ {
59
+ "rule": "no-restricted-imports",
60
+ "reason": "os.tmpdir and os.homedir locate the preload scratch directory and ~/.composio in the same synchronous helpers",
61
+ "target": "import * as os from 'node:os';"
62
+ },
63
+ {
64
+ "rule": "no-restricted-imports",
65
+ "reason": "synchronous fs (mkdtempSync/writeFileSync/rmSync/existsSync) builds and tears down the run preload files in plain helpers that execute outside the Effect runtime",
66
+ "target": "import * as fs from 'node:fs';"
67
+ },
68
+ {
69
+ "rule": "no-restricted-syntax",
70
+ "reason": "honors the same COMPOSIO_CACHE_DIR/CACHE_DIR overrides the run-helpers child runtime reads, so the sandbox read roots match the child's cache location",
71
+ "target": "process.env.COMPOSIO_CACHE_DIR?.trim() || process.env.CACHE_DIR?.trim() || defaultComposioDir;"
72
+ },
73
+ {
74
+ "rule": "no-restricted-syntax",
75
+ "reason": "reads the COMPOSIO_RUN_ACP_ONLY flag a parent process sets to force the ACP-only subagent path in the child run",
76
+ "target": "const acpOnly = process.env.COMPOSIO_RUN_ACP_ONLY === '1';"
77
+ },
78
+ {
79
+ "rule": "no-restricted-syntax",
80
+ "reason": "reuses the run ID a parent `composio run` process passed via env so nested runs share one run identity",
81
+ "target": "const runId = process.env.COMPOSIO_CLI_PARENT_RUN_ID ?? crypto.randomUUID();"
82
+ },
83
+ {
84
+ "rule": "no-restricted-syntax",
85
+ "reason": "spreads the caller's full environment into the spawned script so user-provided variables reach the child process",
86
+ "target": "...process.env,"
87
+ },
88
+ {
89
+ "rule": "no-restricted-syntax",
90
+ "reason": "try/finally removes the temp preload and wrapper files around the imperative Bun.spawn block, whose success path ends in process.exit",
91
+ "target": "try {"
92
+ }
93
+ ],
94
+ "src/commands/tools/commands/tools.execute.cmd.ts": [
95
+ {
96
+ "rule": "no-restricted-syntax",
97
+ "reason": "COMPOSIO_CLI_INVOCATION_ORIGIN is a spawn-time handshake the parent `composio run` process injects into nested CLI invocations, not user configuration, and it must be read fresh at call time",
98
+ "target": "const shouldStoreLargeExecuteOutput = () => process.env.COMPOSIO_CLI_INVOCATION_ORIGIN !== 'run';"
99
+ },
100
+ {
101
+ "rule": "no-restricted-syntax",
102
+ "reason": "COMPOSIO_RUN_OUTPUT_DIR is injected per-subprocess by the parent `composio run` and must take precedence over the session artifacts directory; inter-process plumbing, not user configuration",
103
+ "target": "process.env.COMPOSIO_RUN_OUTPUT_DIR?.trim() ||"
104
+ },
105
+ {
106
+ "rule": "no-restricted-syntax",
107
+ "reason": "COMPOSIO_RUN_OUTPUT_DIR is injected per-subprocess by the parent `composio run` so nested executions share one output directory; it is inter-process plumbing, not user configuration",
108
+ "target": "directoryPath: sharedDirectory?.trim() || process.env.COMPOSIO_RUN_OUTPUT_DIR?.trim(),"
109
+ },
110
+ {
111
+ "rule": "no-restricted-syntax",
112
+ "reason": "COMPOSIO_RUN_OUTPUT_DIR is injected per-subprocess by the parent `composio run` so nested local-tool executions write into its shared output directory; inter-process plumbing, not user configuration",
113
+ "target": "executeOutputDir: process.env.COMPOSIO_RUN_OUTPUT_DIR?.trim() || undefined,"
114
+ }
115
+ ],
116
+ "src/commands/triggers/commands/triggers.listen.cmd.ts": [
117
+ {
118
+ "rule": "no-restricted-syntax",
119
+ "reason": "re-checks the same raw env var to tell the user whether they supplied a secret or this session generated one",
120
+ "target": "if (process.env.COMPOSIO_WEBHOOK_SECRET) {"
121
+ },
122
+ {
123
+ "rule": "no-restricted-syntax",
124
+ "reason": "the forward signing secret is an optional raw passthrough from the user's shell; its literal presence/absence selects the generated-secret fallback",
125
+ "target": "const webhookSecret = process.env.COMPOSIO_WEBHOOK_SECRET ?? generatedWebhookSecret;"
126
+ }
127
+ ],
128
+ "src/services/agents.ts": [
129
+ {
130
+ "rule": "no-restricted-syntax",
131
+ "reason": "read lazily at request time inside a plain sync helper so tests can repoint agents.composio.dev per call without rebuilding a Config layer",
132
+ "target": "(process.env.COMPOSIO_AGENTS_BASE_URL ?? DEFAULT_AGENTS_BASE_URL).replace(/\\/+$/, '');"
133
+ }
134
+ ],
135
+ "src/services/cli-session-artifacts.ts": [
136
+ {
137
+ "rule": "no-restricted-syntax",
138
+ "reason": "COMPOSIO_CACHE_DIR is the second rung of the same fall-through chain: env overrides must beat the persisted artifactDirectory before the tmpdir default",
139
+ "target": "process.env.COMPOSIO_CACHE_DIR?.trim() ||"
140
+ },
141
+ {
142
+ "rule": "no-restricted-syntax",
143
+ "reason": "read inline so a blank/whitespace-only COMPOSIO_SESSION_DIR falls through the || precedence chain (session dir > cache dir > user config > tmpdir)",
144
+ "target": "process.env.COMPOSIO_SESSION_DIR?.trim() ||"
145
+ }
146
+ ],
147
+ "src/services/cli-user-config.ts": [
148
+ {
149
+ "rule": "no-restricted-imports",
150
+ "reason": "os.homedir feeds resolveCliConfigDirectorySync, which runs from synchronous non-Effect call sites (dev.cmd messages, run-helpers-runtime readFileSync) where the NodeOs service is unavailable",
151
+ "target": "import os from 'node:os';"
152
+ },
153
+ {
154
+ "rule": "no-restricted-syntax",
155
+ "reason": "this resolver is called from synchronous non-Effect code, so the COMPOSIO_CACHE_DIR override cannot come from effect/Config here",
156
+ "target": "process.env.COMPOSIO_CACHE_DIR?.trim() ||"
157
+ }
158
+ ],
159
+ "src/services/detached-process.ts": [
160
+ {
161
+ "rule": "no-restricted-imports",
162
+ "reason": "This Effect helper is the sole detached-spawn boundary for CLI source: @effect/platform Command processes are scope-bound and are killed when their scope closes, while these children must outlive the CLI process.",
163
+ "target": "import { spawn } from 'node:child_process';"
164
+ }
165
+ ],
166
+ "src/services/master-detector.ts": [
167
+ {
168
+ "rule": "no-restricted-syntax",
169
+ "reason": "classifies the driving agent by scanning every env key for CODEX_/CLAUDE_ prefixes; effect/Config reads known keys and cannot enumerate the whole environment",
170
+ "target": "export const detectMaster = (env: Record<string, string | undefined> = process.env): MasterKind => {"
171
+ }
172
+ ],
173
+ "src/services/native-ui-sidecar.ts": [
174
+ {
175
+ "rule": "no-restricted-syntax",
176
+ "reason": "Sole raw-env boundary of this module: prefix scanning needs the full environment map, which effect/Config cannot enumerate.",
177
+ "target": "const rawProcessEnv: NodeJS.ProcessEnv = process.env;"
178
+ }
179
+ ],
180
+ "src/services/node-os.ts": [
181
+ {
182
+ "rule": "no-restricted-imports",
183
+ "reason": "This Effect service is the sole node:os boundary for CLI source.",
184
+ "target": "import os from 'node:os';"
185
+ }
186
+ ],
187
+ "src/services/project-environment-detector.ts": [
188
+ {
189
+ "rule": "no-restricted-syntax",
190
+ "reason": "npm_config_user_agent is transient metadata injected by the package manager that spawned this process, not CLI configuration; read once as the last-resort heuristic when no lockfile or manifest evidence exists",
191
+ "target": "const userAgent = parseUserAgent(process.env.npm_config_user_agent);"
192
+ }
193
+ ],
194
+ "src/services/run-helpers-runtime.ts": [
195
+ {
196
+ "rule": "no-restricted-imports",
197
+ "reason": "os.tmpdir() locates the fallback run-files directory in the child process, outside the Effect runtime",
198
+ "target": "import * as os from 'node:os';"
199
+ },
200
+ {
201
+ "rule": "no-restricted-imports",
202
+ "reason": "sync fs for run-log appends, run-file writes, and CLI config reads in the child process, outside the Effect runtime",
203
+ "target": "import * as fs from 'node:fs';"
204
+ },
205
+ {
206
+ "rule": "no-restricted-syntax",
207
+ "reason": "JSON.stringify throws on circular user values in this sync formatter injected into user code; String() is the entire fallback",
208
+ "target": "try {"
209
+ },
210
+ {
211
+ "rule": "no-restricted-syntax",
212
+ "reason": "async fallback chain in the user's child process: ACP invoke errors route to the legacy sub-agent path, everything else rethrows",
213
+ "target": "try {"
214
+ },
215
+ {
216
+ "rule": "no-restricted-syntax",
217
+ "reason": "debug flag reaches the child process via inherited environment; the CLI's Config provider is not available here",
218
+ "target": "helperContext.perfDebug === true || process.env.COMPOSIO_PERF_DEBUG === '1';"
219
+ },
220
+ {
221
+ "rule": "no-restricted-syntax",
222
+ "reason": "debug flag reaches the child process via inherited environment; the CLI's Config provider is not available here",
223
+ "target": "helperContext.toolDebug === true || process.env.COMPOSIO_TOOL_DEBUG === '1';"
224
+ },
225
+ {
226
+ "rule": "no-restricted-syntax",
227
+ "reason": "sync config read at the child-process boundary; a missing or malformed CLI config file just means the 'auto' target",
228
+ "target": "try {"
229
+ },
230
+ {
231
+ "rule": "no-restricted-syntax",
232
+ "reason": "the spawned CLI child must inherit the caller's full environment before Composio-specific overrides are layered on top",
233
+ "target": "...process.env,"
234
+ }
235
+ ],
236
+ "src/services/run-subagent-output-mcp.ts": [
237
+ {
238
+ "rule": "no-restricted-imports",
239
+ "reason": "standalone MCP stdio sidecar entrypoint runs outside the CLI's Effect runtime; sync fs reads the schema file and writes the structured result file",
240
+ "target": "import * as fs from 'node:fs';"
241
+ }
242
+ ],
243
+ "src/services/runtime-debug-flags.ts": [
244
+ {
245
+ "rule": "no-restricted-syntax",
246
+ "reason": "called from sync non-Effect helper code in spawned child processes, where the flag arrives via inherited environment rather than a Config provider",
247
+ "target": "runtimeDebugFlags.perfDebug || process.env.COMPOSIO_PERF_DEBUG === '1';"
248
+ },
249
+ {
250
+ "rule": "no-restricted-syntax",
251
+ "reason": "called from sync non-Effect helper code in spawned child processes, where the flag arrives via inherited environment rather than a Config provider",
252
+ "target": "runtimeDebugFlags.toolDebug || process.env.COMPOSIO_TOOL_DEBUG === '1';"
253
+ }
254
+ ],
255
+ "src/services/tool-permissions.ts": [
256
+ {
257
+ "rule": "no-restricted-syntax",
258
+ "reason": "node:http listen callback inside a Promise executor: on failure to open the browser, close the server and reject the surrounding Promise; Effect's error channel is not available here",
259
+ "target": "try {"
260
+ }
261
+ ],
262
+ "src/ui/colors.ts": [
263
+ {
264
+ "rule": "no-restricted-syntax",
265
+ "reason": "palette is created eagerly at import time, before any Effect runtime; honors the NO_COLOR convention",
266
+ "target": "} = color.createColors(!Boolean(process.env.NO_COLOR));"
267
+ }
268
+ ],
269
+ "src/ui/redact.ts": [
270
+ {
271
+ "rule": "no-restricted-syntax",
272
+ "reason": "plain sync string helper called from formatting code; CI flag toggles redaction in recorded CLI output",
273
+ "target": "if (process.env.CI !== 'true') return value as `${Prefix}${string}`;"
274
+ }
275
+ ]
276
+}