@mainwave/cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -18
- package/dist/adapters/claude-code.js +258 -38
- package/dist/adapters/claude-code.js.map +1 -1
- package/dist/adapters/claude-desktop.js +0 -87
- package/dist/adapters/claude-desktop.js.map +1 -1
- package/dist/adapters/codex-cli.js +0 -65
- package/dist/adapters/codex-cli.js.map +1 -1
- package/dist/adapters/copilot-chat.js +7 -42
- package/dist/adapters/copilot-chat.js.map +1 -1
- package/dist/adapters/copilot-cli.js +7 -32
- package/dist/adapters/copilot-cli.js.map +1 -1
- package/dist/adapters/cursor-enterprise.js +4 -53
- package/dist/adapters/cursor-enterprise.js.map +1 -1
- package/dist/adapters/cursor.js +0 -62
- package/dist/adapters/cursor.js.map +1 -1
- package/dist/api/index.js +0 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/types.gen.js +0 -1
- package/dist/api/types.gen.js.map +1 -1
- package/dist/core/apply.js +73 -97
- package/dist/core/apply.js.map +1 -1
- package/dist/core/auth-commands.js +5 -20
- package/dist/core/auth-commands.js.map +1 -1
- package/dist/core/behaviour-hooks.js +0 -7
- package/dist/core/behaviour-hooks.js.map +1 -1
- package/dist/core/browser.js +0 -18
- package/dist/core/browser.js.map +1 -1
- package/dist/core/codecs/cursor-hooks-json.js +0 -8
- package/dist/core/codecs/cursor-hooks-json.js.map +1 -1
- package/dist/core/codecs/json-flat.js +0 -28
- package/dist/core/codecs/json-flat.js.map +1 -1
- package/dist/core/codecs/json-managed.js +0 -30
- package/dist/core/codecs/json-managed.js.map +1 -1
- package/dist/core/codecs/toml-otel.js +0 -39
- package/dist/core/codecs/toml-otel.js.map +1 -1
- package/dist/core/detect.js +0 -29
- package/dist/core/detect.js.map +1 -1
- package/dist/core/device-login.js +0 -22
- package/dist/core/device-login.js.map +1 -1
- package/dist/core/doctor.js +209 -48
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/edit.js +18 -0
- package/dist/core/edit.js.map +1 -1
- package/dist/core/effective-settings.js +107 -10
- package/dist/core/effective-settings.js.map +1 -1
- package/dist/core/env-command.js +0 -9
- package/dist/core/env-command.js.map +1 -1
- package/dist/core/errors.js +0 -12
- package/dist/core/errors.js.map +1 -1
- package/dist/core/flags.js +0 -13
- package/dist/core/flags.js.map +1 -1
- package/dist/core/format.js +0 -56
- package/dist/core/format.js.map +1 -1
- package/dist/core/git.js +0 -9
- package/dist/core/git.js.map +1 -1
- package/dist/core/headers.js +4 -97
- package/dist/core/headers.js.map +1 -1
- package/dist/core/install-hooks.js +81 -0
- package/dist/core/install-hooks.js.map +1 -0
- package/dist/core/interview.js +25 -151
- package/dist/core/interview.js.map +1 -1
- package/dist/core/keys.js +0 -18
- package/dist/core/keys.js.map +1 -1
- package/dist/core/layer-policy.js +34 -0
- package/dist/core/layer-policy.js.map +1 -0
- package/dist/core/markers.js +219 -117
- package/dist/core/markers.js.map +1 -1
- package/dist/core/pinned-use-case.js +11 -0
- package/dist/core/pinned-use-case.js.map +1 -0
- package/dist/core/platform.js +5 -40
- package/dist/core/platform.js.map +1 -1
- package/dist/core/post-setup.js +7 -18
- package/dist/core/post-setup.js.map +1 -1
- package/dist/core/prompts.js +0 -59
- package/dist/core/prompts.js.map +1 -1
- package/dist/core/settings.js +20 -16
- package/dist/core/settings.js.map +1 -1
- package/dist/core/skills.js +0 -75
- package/dist/core/skills.js.map +1 -1
- package/dist/core/status.js +97 -45
- package/dist/core/status.js.map +1 -1
- package/dist/core/store.js +4 -34
- package/dist/core/store.js.map +1 -1
- package/dist/core/tty.js +0 -9
- package/dist/core/tty.js.map +1 -1
- package/dist/core/ucid.js +0 -13
- package/dist/core/ucid.js.map +1 -1
- package/dist/core/ui.js +0 -11
- package/dist/core/ui.js.map +1 -1
- package/dist/core/use-case.js +3 -50
- package/dist/core/use-case.js.map +1 -1
- package/dist/core/validate.js +0 -5
- package/dist/core/validate.js.map +1 -1
- package/dist/core/verify.js +51 -33
- package/dist/core/verify.js.map +1 -1
- package/dist/core/version.js +0 -3
- package/dist/core/version.js.map +1 -1
- package/dist/core/wizard.js +172 -128
- package/dist/core/wizard.js.map +1 -1
- package/dist/main.js +16 -38
- package/dist/main.js.map +1 -1
- package/hooks/cursor-otlp.mjs +4 -4
- package/hooks/github-pr-marker.mjs +31 -12
- package/hooks/jira-ticket-marker.mjs +46 -27
- package/hooks/linear-ticket-marker.mjs +58 -37
- package/hooks/marker-core.mjs +671 -59
- package/hooks/matchers.json +1 -1
- package/hooks/vocabulary.d.mts +9 -1
- package/hooks/vocabulary.mjs +73 -23
- package/package.json +3 -3
- package/skills/mainwave-instrument/SKILL.md +6 -5
- package/skills/mainwave-instrument/reference/frameworks.md +33 -22
- package/skills/mainwave-instrument/reference/troubleshooting.md +13 -4
- package/skills/mainwave-setup/SKILL.md +22 -6
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @mainwave/cli
|
|
2
2
|
|
|
3
3
|
Setup wizard that connects third-party coding tools to [Mainwave AI](https://mainwave.com), so their
|
|
4
|
-
OpenTelemetry traces land in your dashboard
|
|
4
|
+
OpenTelemetry traces land in your dashboard, attributed to you.
|
|
5
5
|
|
|
6
6
|
Installs as the `mainwave-cli` command. Requires Node 22.13 or newer.
|
|
7
7
|
|
|
@@ -34,19 +34,39 @@ picker:
|
|
|
34
34
|
npx @mainwave/cli setup claude-code codex
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Signed in (`mainwave-cli login`), setup asks almost nothing: it
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
Signed in (`mainwave-cli login`), setup asks almost nothing: it mints a Mainwave key labelled with
|
|
38
|
+
your email and this machine so you never handle a credential, takes the collector URL from your
|
|
39
|
+
deployment, writes each tool's config in the format it expects, and then **sends a sample trace and
|
|
40
|
+
watches for it to land**. Not signed in, it prompts for a key; that path stays for scripts and
|
|
41
|
+
air-gapped installs.
|
|
42
|
+
|
|
43
|
+
There is no use case to pick. For every tool but one (below), setup writes no use-case id: Mainwave
|
|
44
|
+
attributes each tool's activity to you from the identity its telemetry already carries — your Claude
|
|
45
|
+
account for Claude Code and Claude Desktop, your email for the rest — and files it under your use
|
|
46
|
+
case for that tool. Your activity
|
|
47
|
+
appears under **Development** in the app once your first session arrives, within about 10 minutes.
|
|
48
|
+
Codex and Copilot carry no identity of their own, and Claude Code carries none when it signs in with
|
|
49
|
+
an API key, Bedrock or Vertex rather than a Claude account, so setup adds your email for them: the
|
|
50
|
+
signed-in account's, or `--email`, or your git email. Under a Claude account the account still wins,
|
|
51
|
+
so the email changes nothing there. If setup has no email, it warns that those tools' activity will
|
|
52
|
+
land unattributed until you re-run with `--email` or sign in.
|
|
53
|
+
|
|
54
|
+
The exception is `cursor-enterprise`. Cursor's Enterprise OTel export is configured once for the whole
|
|
55
|
+
team, by an admin, and carries no per-person email, so an email would attribute the whole team to
|
|
56
|
+
whoever ran setup. Setup gives it a team use-case id instead: minted on the first run, kept on every
|
|
57
|
+
re-run, and never shared with your other tools. If the id it already has is also in your other
|
|
58
|
+
tools' config, or is your own stored use case — which is what earlier versions of the CLI wrote —
|
|
59
|
+
setup mints a separate team id and says so.
|
|
44
60
|
|
|
45
61
|
Validation names the organization the key belongs to, so a key from the wrong workspace is caught
|
|
46
|
-
before anything is written.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
62
|
+
before anything is written. To pin every tool to one specific use case instead — a shared or team
|
|
63
|
+
one — pass `--ucid <id|url>` or `--use-case <name>`. A pin you set that way stays: re-running setup
|
|
64
|
+
without either keeps it in the tools that already carry it, and says so. `--no-use-case` removes it.
|
|
65
|
+
A re-run does remove a use-case id an earlier version of the CLI assigned on its own, and tells you
|
|
66
|
+
which.
|
|
67
|
+
|
|
68
|
+
Config is written to your **user-global** settings file — `~/.claude/settings.json` and friends
|
|
69
|
+
(for Claude Code, `$CLAUDE_CONFIG_DIR/settings.json` when you set `CLAUDE_CONFIG_DIR`).
|
|
50
70
|
There is no repo-local option: it put your API key inside the repository, several tools ignore
|
|
51
71
|
credentials that come from repo config, and it had to be redone for every checkout.
|
|
52
72
|
|
|
@@ -84,11 +104,18 @@ a tool picked the file up.
|
|
|
84
104
|
|
|
85
105
|
```bash
|
|
86
106
|
mainwave-cli verify # push a sample trace, wait for it to land, print the link
|
|
87
|
-
mainwave-cli verify --no-sample # just watch (e.g. after running your tool for real)
|
|
88
107
|
mainwave-cli verify --json
|
|
108
|
+
mainwave-cli verify --no-sample # with a pinned use case: just watch for its spans, send nothing
|
|
89
109
|
```
|
|
90
110
|
|
|
91
|
-
|
|
111
|
+
With a use case pinned — `--ucid` here, or one a `setup --ucid` / `--use-case` run pinned that one
|
|
112
|
+
of your tools' config still carries — the sample trace carries that id, `verify` watches for it,
|
|
113
|
+
and the link goes to that use case. Otherwise the sample carries no use-case id at all — the CLI
|
|
114
|
+
finds it again by the trace id it generated, so checking your setup creates no use-case id in
|
|
115
|
+
Mainwave — and the link points at Development, where your tools' own sessions appear. `--no-sample`
|
|
116
|
+
needs a pinned use case; with none there is nothing to watch, and it says so. `setup` runs `verify`
|
|
117
|
+
for you at the end when you're signed in, watching only what that run pinned: a run without
|
|
118
|
+
`--ucid` or `--use-case` always sends the id-less sample. On a timeout `verify` lists what usually
|
|
92
119
|
causes it — the tool needs restarting, a `DISABLE_TELEMETRY=1` in your shell, a collector URL that
|
|
93
120
|
doesn't match — and exits non-zero, so CI can gate on it.
|
|
94
121
|
|
|
@@ -99,14 +126,14 @@ stderr), so a coding agent can drive the CLI without a terminal:
|
|
|
99
126
|
|
|
100
127
|
```bash
|
|
101
128
|
mainwave-cli setup claude-code codex \
|
|
102
|
-
--
|
|
129
|
+
--opt-in none --no-markers --yes --json
|
|
103
130
|
```
|
|
104
131
|
|
|
105
132
|
| Flag | Answers |
|
|
106
133
|
| ---------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
107
134
|
| `--api-key <k>` | the collector key (otherwise minted for you when signed in) |
|
|
108
135
|
| `--collector-url <u>` / `--api-url <u>` | which deployment |
|
|
109
|
-
| `--ucid <id\|url>` / `--use-case <name>` / `--no-use-case` |
|
|
136
|
+
| `--ucid <id\|url>` / `--use-case <name>` / `--no-use-case` | pin one use case, or `--no-use-case` to unpin (default: none) |
|
|
110
137
|
| `--email <e>` | attribution identity for tools that need it injected |
|
|
111
138
|
| `--opt-in prompts,tool-details,tool-content` (or `all` / `none`) | content capture (default: all on; `none` sends metadata only) |
|
|
112
139
|
| `--no-markers` | skip the ticket & PR marker hooks (installed by default) |
|
|
@@ -166,6 +193,40 @@ upgrade** to refresh both the scripts and the tool-matching rules; `doctor` warn
|
|
|
166
193
|
entries were written by an older CLI version. To disable, re-run setup with `--no-markers` — the
|
|
167
194
|
entries are removed cleanly.
|
|
168
195
|
|
|
196
|
+
Organizations that configure Claude Code centrally (managed settings from the Claude admin console,
|
|
197
|
+
or an MDM `managed-settings.json`) deliver the markers without anyone running setup: when a session
|
|
198
|
+
starts or resumes (not on `/clear` or a compaction), the managed settings run
|
|
199
|
+
`cd "$HOME" && npx -y --registry=https://registry.npmjs.org @mainwave/cli@<version> install-hooks --quiet`
|
|
200
|
+
— from your home directory, so a repository's own `.npmrc` or `node_modules` can't choose what runs —
|
|
201
|
+
which installs or refreshes the scripts in `~/.mainwave/hooks/managed/` with no prompts, no
|
|
202
|
+
sign-in and no network calls of its own. That directory is separate from the one a per-developer
|
|
203
|
+
setup installs to, so neither overwrites the other's scripts. When managed settings deliver the
|
|
204
|
+
hooks, it also removes the copy an earlier per-developer setup left in your user settings, so each ticket and PR is marked once, and `setup` itself leaves
|
|
205
|
+
out any hook your managed settings already run. It never edits project settings; `doctor` lists
|
|
206
|
+
every settings file that installs the hooks and warns when two of them would fire for the same
|
|
207
|
+
ticket or PR. The org-wide setup follows how Claude Code 2.1.282 and later apply managed settings;
|
|
208
|
+
`doctor` warns on an older install.
|
|
209
|
+
|
|
210
|
+
Two kinds of session don't get the admin console's markers:
|
|
211
|
+
|
|
212
|
+
- A session that skips server-managed settings: one started with a `CLAUDE_CODE_USE_*` provider
|
|
213
|
+
variable or a non-Anthropic `ANTHROPIC_BASE_URL` in your shell or user settings. Once the org's
|
|
214
|
+
managed settings deliver the markers, `install-hooks` has removed the per-developer copy, so such
|
|
215
|
+
a session sends no markers; `doctor` run the same way says so. MDM or `managed-settings.json`
|
|
216
|
+
delivery doesn't have this gap.
|
|
217
|
+
- A non-interactive run (`claude -p`, the Agent SDK, CI) on a machine where nobody has approved the
|
|
218
|
+
org's current settings in an interactive session. Claude Code applies them for that run only and
|
|
219
|
+
doesn't cache them, so the marker hooks can't read the org's collector endpoint and key: they fall
|
|
220
|
+
back to your user settings or send nothing, and on a machine that also has a per-developer setup
|
|
221
|
+
both copies fire, marking each ticket and PR twice. Approve the settings in an interactive session on that
|
|
222
|
+
machine (again after each change to them), or deliver them through MDM or `managed-settings.json`,
|
|
223
|
+
which need no approval.
|
|
224
|
+
|
|
225
|
+
Under the org's settings, which carry no use case of their own, a marker is attributed through the
|
|
226
|
+
Claude account the session is signed in with. A session signed in another way (an API key, a
|
|
227
|
+
`CLAUDE_CODE_OAUTH_TOKEN`, a cloud provider through MDM delivery) sends markers no developer is
|
|
228
|
+
attached to.
|
|
229
|
+
|
|
169
230
|
Markers are available only for tools with a hooks mechanism (today: Claude Code). For other tools
|
|
170
231
|
the wizard says so instead of appearing to succeed.
|
|
171
232
|
|
|
@@ -199,7 +260,7 @@ password itself — argv lands in shell history and in `ps`). Point the CLI at a
|
|
|
199
260
|
deployment with `--api-url`, or `MAINWAVE_API_URL` / `MAINWAVE_APP_URL` /
|
|
200
261
|
`MAINWAVE_COLLECTOR_URL`.
|
|
201
262
|
|
|
202
|
-
`~/.mainwave/settings.json` holds the non-secret intent (org, endpoints,
|
|
263
|
+
`~/.mainwave/settings.json` holds the non-secret intent (org, endpoints, a pinned use case) and
|
|
203
264
|
`~/.mainwave/credentials.json` holds the session token — both mode 0600, and the token is never
|
|
204
265
|
written into any tool's settings file.
|
|
205
266
|
|
|
@@ -211,13 +272,28 @@ mainwave-cli doctor <adapter> # settings hierarchy + health checks
|
|
|
211
272
|
mainwave-cli doctor <adapter> --validate # also auth-check against the collector
|
|
212
273
|
mainwave-cli edit <adapter> # open the settings file in $EDITOR
|
|
213
274
|
mainwave-cli env <adapter> # print shell export lines
|
|
275
|
+
mainwave-cli install-hooks [--quiet] # install or refresh the Claude Code marker hook scripts
|
|
214
276
|
mainwave-cli --help
|
|
215
277
|
```
|
|
216
278
|
|
|
217
279
|
`doctor` walks the tool's full settings hierarchy (managed → project-local → project → user), prints
|
|
218
280
|
the effective configuration tagged by which file each value came from, and flags the gotchas that
|
|
219
281
|
silently drop telemetry — a kill-switch set in your shell environment, a missing endpoint, or a
|
|
220
|
-
managed-tier policy overriding what you just wrote.
|
|
282
|
+
managed-tier policy overriding what you just wrote. For Claude Code the managed tier includes the
|
|
283
|
+
settings your organization's admin console delivers, read from Claude Code's own cache of them. A tool
|
|
284
|
+
with no use-case id is the normal state, not a problem: `doctor` notes that attribution happens at
|
|
285
|
+
ingest. It also fails (exits non-zero) when a tool's activity would land unattributed: a tool that
|
|
286
|
+
needs your email has none — Codex or Copilot, or Claude Code when it isn't signed in to a Claude
|
|
287
|
+
account (an API key, Bedrock or Vertex, or no sign-in at all) — or `cursor-enterprise` has no team
|
|
288
|
+
use-case id.
|
|
289
|
+
|
|
290
|
+
From Claude Code 2.1.282, project and local settings (`.claude/settings.json`,
|
|
291
|
+
`.claude/settings.local.json`) can no longer turn telemetry on, choose where it goes, or choose what
|
|
292
|
+
it captures: Claude Code ignores those keys there. `doctor`, `status` and `edit --local` say so, name
|
|
293
|
+
the file and the keys, and point you at your user or managed settings instead. `OTEL_RESOURCE_ATTRIBUTES`
|
|
294
|
+
still applies from project settings, so a per-repository use case keeps working. The ticket and PR
|
|
295
|
+
marker hooks follow the same rule: they take the collector endpoint and key only from managed
|
|
296
|
+
settings, your user settings or the process environment, never from a repository's settings.
|
|
221
297
|
|
|
222
298
|
Some tools read their configuration from the environment rather than from a file. For those, `env`
|
|
223
299
|
prints the export lines to source:
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { accessSync, constants as fsConstants, promises as fs } from 'node:fs';
|
|
1
3
|
import { homedir } from 'node:os';
|
|
2
|
-
import { join } from 'node:path';
|
|
4
|
+
import { delimiter, isAbsolute, join, resolve } from 'node:path';
|
|
3
5
|
import { jsonEnvCodec } from '../core/codecs/json-env.js';
|
|
4
6
|
import { hasBinary, hasPath } from '../core/detect.js';
|
|
7
|
+
import { tildify } from '../core/post-setup.js';
|
|
8
|
+
import { isErrnoCode } from '../core/settings.js';
|
|
5
9
|
const MANAGED_ENV_KEYS = [
|
|
6
10
|
'CLAUDE_CODE_ENABLE_TELEMETRY',
|
|
7
|
-
// Without this beta flag traces are silently dropped (only metrics + logs flow).
|
|
8
|
-
// See clients/cli/docs/claude-code-telemetry-env.md.
|
|
9
11
|
'CLAUDE_CODE_ENHANCED_TELEMETRY_BETA',
|
|
10
12
|
'OTEL_TRACES_EXPORTER',
|
|
11
13
|
'OTEL_METRICS_EXPORTER',
|
|
@@ -20,19 +22,6 @@ const MANAGED_ENV_KEYS = [
|
|
|
20
22
|
];
|
|
21
23
|
const buildResourceAttrs = (ucid, userEmail) => {
|
|
22
24
|
const deploymentEnv = process.env.MAINWAVE_DEPLOYMENT_ENV ?? 'production';
|
|
23
|
-
// A ucid is always supplied now (`autoUcid` below): signed-in setup auto-assigns
|
|
24
|
-
// a real use case, and otherwise the wizard mints one and the plan step fails
|
|
25
|
-
// rather than reach here with none. MAI-1033 originally dropped these attrs and
|
|
26
|
-
// let the stream land unattributed (invisible on Use Cases, orphaned from the
|
|
27
|
-
// onboarding reconciler) — reversed so no setup produces orphaned telemetry. The
|
|
28
|
-
// empty branch stays only as a defensive fallback the wizard guard prevents.
|
|
29
|
-
//
|
|
30
|
-
// `mainwave.user_email` is stamped only for account-less invite installs
|
|
31
|
-
// (MAI-2015), where the developer has no login and the invite email is the
|
|
32
|
-
// identity. It's the collector's documented fallback (`coding_user_email()`):
|
|
33
|
-
// Claude Code's own native `user.email` from git config still wins where set,
|
|
34
|
-
// so this attributes the invited person when git identity is absent and never
|
|
35
|
-
// overrides a real one. Normal runs pass no email and it stays absent.
|
|
36
25
|
return [
|
|
37
26
|
...(ucid ? [`mainwave.ucid=${ucid}`, 'mainwave.ucid_source=explicit'] : []),
|
|
38
27
|
...(userEmail ? [`mainwave.user_email=${userEmail}`] : []),
|
|
@@ -82,8 +71,6 @@ const parseEnv = (env) => {
|
|
|
82
71
|
const ucid = findKvPair(attrs, 'mainwave.ucid', false);
|
|
83
72
|
if (ucid)
|
|
84
73
|
out.ucid = ucid;
|
|
85
|
-
// Recover an invite-stamped identity (MAI-2015) so a re-run keeps it rather
|
|
86
|
-
// than dropping the account-less developer's attribution.
|
|
87
74
|
const email = findKvPair(attrs, 'mainwave.user_email', false);
|
|
88
75
|
if (email)
|
|
89
76
|
out.userEmail = email;
|
|
@@ -135,6 +122,24 @@ const collectChecks = (env) => {
|
|
|
135
122
|
message: 'OTEL_LOG_RAW_API_BODIES is set — full request/response bodies (including system prompts) will be sent. Highest-risk var on the surface.',
|
|
136
123
|
});
|
|
137
124
|
}
|
|
125
|
+
const scrub = env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB ?? process.env.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB;
|
|
126
|
+
const parsed = parseEnv({ ...env });
|
|
127
|
+
if (['1', 'true', 'yes', 'on'].includes((scrub ?? '').trim().toLowerCase()) &&
|
|
128
|
+
parsed.ucid === undefined) {
|
|
129
|
+
issues.push({
|
|
130
|
+
level: 'warn',
|
|
131
|
+
message: parsed.userEmail
|
|
132
|
+
? "CLAUDE_CODE_SUBPROCESS_ENV_SCRUB is on, so Claude Code hides the session's credentials from " +
|
|
133
|
+
'hooks and the ticket and PR markers carry no Claude account. They are attributed from ' +
|
|
134
|
+
`mainwave.user_email (${parsed.userEmail}) instead, which can derive a different ucid than ` +
|
|
135
|
+
"the session's account-derived one — those markers then land on a separate ucid that an " +
|
|
136
|
+
'operator binds on Unassigned Agent Activity.'
|
|
137
|
+
: "CLAUDE_CODE_SUBPROCESS_ENV_SCRUB is on, so Claude Code hides the session's credentials from " +
|
|
138
|
+
'hooks and the ticket and PR markers carry no Claude account and no email, so the collector ' +
|
|
139
|
+
'can’t attribute them to a developer. Re-run `mainwave-cli setup claude-code --email ' +
|
|
140
|
+
'you@company.com` so they are attributed from your email.',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
138
143
|
if (!env.CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS && !process.env.CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS) {
|
|
139
144
|
issues.push({
|
|
140
145
|
level: 'info',
|
|
@@ -143,9 +148,11 @@ const collectChecks = (env) => {
|
|
|
143
148
|
}
|
|
144
149
|
return issues;
|
|
145
150
|
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
export const claudeConfigDir = (env = process.env) => {
|
|
152
|
+
const dir = env.CLAUDE_CONFIG_DIR?.trim();
|
|
153
|
+
return dir ? resolve(dir) : join(homedir(), '.claude');
|
|
154
|
+
};
|
|
155
|
+
const USER_DIR = claudeConfigDir();
|
|
149
156
|
const managedSettingsDir = (() => {
|
|
150
157
|
if (process.platform === 'darwin')
|
|
151
158
|
return '/Library/Application Support/ClaudeCode';
|
|
@@ -155,16 +162,25 @@ const managedSettingsDir = (() => {
|
|
|
155
162
|
})();
|
|
156
163
|
const HIERARCHY = [
|
|
157
164
|
{
|
|
158
|
-
id: 'managed',
|
|
159
|
-
label: 'Managed (
|
|
160
|
-
path: join(
|
|
165
|
+
id: 'managed-server',
|
|
166
|
+
label: 'Managed (server, cached)',
|
|
167
|
+
path: join(USER_DIR, 'remote-settings.json'),
|
|
161
168
|
kind: 'file',
|
|
169
|
+
managedSource: 'server',
|
|
162
170
|
},
|
|
163
171
|
{
|
|
164
172
|
id: 'managed-dropin',
|
|
165
173
|
label: 'Managed drop-in',
|
|
166
174
|
path: join(managedSettingsDir, 'managed-settings.d'),
|
|
167
175
|
kind: 'dir',
|
|
176
|
+
managedSource: 'file',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'managed',
|
|
180
|
+
label: 'Managed (org policy)',
|
|
181
|
+
path: join(managedSettingsDir, 'managed-settings.json'),
|
|
182
|
+
kind: 'file',
|
|
183
|
+
managedSource: 'file',
|
|
168
184
|
},
|
|
169
185
|
{
|
|
170
186
|
id: 'projectLocal',
|
|
@@ -181,39 +197,243 @@ const HIERARCHY = [
|
|
|
181
197
|
{
|
|
182
198
|
id: 'user',
|
|
183
199
|
label: 'User (global)',
|
|
184
|
-
path: join(
|
|
200
|
+
path: join(USER_DIR, 'settings.json'),
|
|
185
201
|
kind: 'file',
|
|
186
202
|
},
|
|
187
203
|
];
|
|
204
|
+
const EXPORTER_SELECTORS = ['OTEL_TRACES_EXPORTER', 'OTEL_METRICS_EXPORTER', 'OTEL_LOGS_EXPORTER'];
|
|
205
|
+
const OFF_SWITCH_CONTENT_KEYS = [
|
|
206
|
+
'OTEL_LOG_USER_PROMPTS',
|
|
207
|
+
'OTEL_LOG_TOOL_CONTENT',
|
|
208
|
+
'OTEL_LOG_TOOL_DETAILS',
|
|
209
|
+
];
|
|
210
|
+
const IGNORED_EXACT = new Set([
|
|
211
|
+
'CLAUDE_CODE_ENABLE_TELEMETRY',
|
|
212
|
+
'CLAUDE_CODE_ENHANCED_TELEMETRY_BETA',
|
|
213
|
+
'ENABLE_ENHANCED_TELEMETRY_BETA',
|
|
214
|
+
...EXPORTER_SELECTORS,
|
|
215
|
+
...OFF_SWITCH_CONTENT_KEYS,
|
|
216
|
+
'OTEL_LOG_ASSISTANT_RESPONSES',
|
|
217
|
+
'OTEL_LOG_RAW_API_BODIES',
|
|
218
|
+
'ENABLE_BETA_TRACING_DETAILED',
|
|
219
|
+
'BETA_TRACING_ENDPOINT',
|
|
220
|
+
'OTEL_EXPORTER_PROMETHEUS_HOST',
|
|
221
|
+
'OTEL_EXPORTER_PROMETHEUS_PORT',
|
|
222
|
+
]);
|
|
223
|
+
const OTLP_IGNORED = /^OTEL_EXPORTER_OTLP_(?:(?:TRACES|METRICS|LOGS)_)?\w*(?:ENDPOINT|HEADERS|PROTOCOL|CERTIFICATE|CLIENT_KEY|INSECURE)$/;
|
|
224
|
+
const CONTENT_OFF_VALUES = new Set(['0', 'false', 'no', 'off']);
|
|
225
|
+
export const isProjectIgnoredTelemetryKey = (key) => IGNORED_EXACT.has(key) || OTLP_IGNORED.test(key);
|
|
226
|
+
const isHonoredOffValue = (key, value) => {
|
|
227
|
+
const v = value.trim().toLowerCase();
|
|
228
|
+
if (EXPORTER_SELECTORS.includes(key))
|
|
229
|
+
return v === 'none';
|
|
230
|
+
if (OFF_SWITCH_CONTENT_KEYS.includes(key))
|
|
231
|
+
return CONTENT_OFF_VALUES.has(v);
|
|
232
|
+
return false;
|
|
233
|
+
};
|
|
234
|
+
let installedVersionCache;
|
|
235
|
+
export const trustedPath = (env = process.env) => (env.PATH ?? '')
|
|
236
|
+
.split(delimiter)
|
|
237
|
+
.filter((dir) => dir && isAbsolute(dir) && !/[\\/]node_modules[\\/]\.bin[\\/]?$/.test(dir))
|
|
238
|
+
.join(delimiter);
|
|
239
|
+
export const trustedClaudeBinary = (env = process.env) => {
|
|
240
|
+
for (const dir of trustedPath(env).split(delimiter)) {
|
|
241
|
+
if (!dir)
|
|
242
|
+
continue;
|
|
243
|
+
const candidate = join(dir, 'claude');
|
|
244
|
+
try {
|
|
245
|
+
accessSync(candidate, fsConstants.X_OK);
|
|
246
|
+
return candidate;
|
|
247
|
+
}
|
|
248
|
+
catch {
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return undefined;
|
|
252
|
+
};
|
|
253
|
+
const installedClaudeCodeVersion = () => {
|
|
254
|
+
if (process.platform === 'win32')
|
|
255
|
+
return undefined;
|
|
256
|
+
if (!installedVersionCache) {
|
|
257
|
+
let value;
|
|
258
|
+
const bin = trustedClaudeBinary();
|
|
259
|
+
try {
|
|
260
|
+
const r = bin
|
|
261
|
+
? spawnSync(bin, ['--version'], {
|
|
262
|
+
encoding: 'utf8',
|
|
263
|
+
timeout: 5000,
|
|
264
|
+
env: { ...process.env, PATH: trustedPath() },
|
|
265
|
+
})
|
|
266
|
+
: undefined;
|
|
267
|
+
value = r?.status === 0 ? /\d+\.\d+\.\d+/.exec(r.stdout)?.[0] : undefined;
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
value = undefined;
|
|
271
|
+
}
|
|
272
|
+
installedVersionCache = { value };
|
|
273
|
+
}
|
|
274
|
+
return installedVersionCache.value;
|
|
275
|
+
};
|
|
276
|
+
const isManagedTelemetryUnitKey = (key) => key.startsWith('OTEL_EXPORTER_OTLP_') ||
|
|
277
|
+
key.startsWith('OTEL_LOG_') ||
|
|
278
|
+
key === 'OTEL_LOGS_EXPORTER' ||
|
|
279
|
+
key === 'ENABLE_BETA_TRACING_DETAILED' ||
|
|
280
|
+
key === 'BETA_TRACING_ENDPOINT';
|
|
281
|
+
const TRUTHY = new Set(['1', 'true', 'yes', 'on']);
|
|
282
|
+
const OTLP = 'OTEL_EXPORTER_OTLP_';
|
|
283
|
+
const OTLP_SIGNALS = ['TRACES', 'METRICS', 'LOGS'];
|
|
284
|
+
const OTLP_CREDENTIALS = ['HEADERS', 'CLIENT_KEY', 'CLIENT_CERTIFICATE'];
|
|
285
|
+
const perSignal = (suffix) => OTLP_SIGNALS.map((s) => `${OTLP}${s}_${suffix}`);
|
|
286
|
+
const OFF_SELECTOR_VALUES = new Set(['none', 'console', '']);
|
|
287
|
+
const isManagedLockedKey = (key, managed) => {
|
|
288
|
+
const set = (k) => (managed[k] ?? '') !== '';
|
|
289
|
+
if (set(`${OTLP}ENDPOINT`) && perSignal('ENDPOINT').includes(key))
|
|
290
|
+
return true;
|
|
291
|
+
if (set(`${OTLP}PROTOCOL`) && perSignal('PROTOCOL').includes(key))
|
|
292
|
+
return true;
|
|
293
|
+
for (const c of OTLP_CREDENTIALS) {
|
|
294
|
+
if (!set(`${OTLP}${c}`))
|
|
295
|
+
continue;
|
|
296
|
+
if (perSignal(c).includes(key))
|
|
297
|
+
return true;
|
|
298
|
+
if (key === `${OTLP}ENDPOINT` || perSignal('ENDPOINT').includes(key))
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
for (const s of OTLP_SIGNALS) {
|
|
302
|
+
if (key === `${OTLP}${s}_ENDPOINT` && OTLP_CREDENTIALS.some((c) => set(`${OTLP}${s}_${c}`))) {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
if (key === 'BETA_TRACING_ENDPOINT') {
|
|
307
|
+
const decides = [
|
|
308
|
+
`${OTLP}ENDPOINT`,
|
|
309
|
+
...OTLP_CREDENTIALS.map((c) => `${OTLP}${c}`),
|
|
310
|
+
...['LOGS', 'TRACES'].flatMap((s) => [
|
|
311
|
+
`${OTLP}${s}_ENDPOINT`,
|
|
312
|
+
...OTLP_CREDENTIALS.map((c) => `${OTLP}${s}_${c}`),
|
|
313
|
+
]),
|
|
314
|
+
].some(set);
|
|
315
|
+
const signalOff = ['OTEL_LOGS_EXPORTER', 'OTEL_TRACES_EXPORTER'].some((k) => k in managed && OFF_SELECTOR_VALUES.has(managed[k].trim().toLowerCase()));
|
|
316
|
+
const telemetryOff = 'CLAUDE_CODE_ENABLE_TELEMETRY' in managed &&
|
|
317
|
+
!TRUTHY.has(managed.CLAUDE_CODE_ENABLE_TELEMETRY.trim().toLowerCase());
|
|
318
|
+
return decides || signalOff || telemetryOff;
|
|
319
|
+
}
|
|
320
|
+
return false;
|
|
321
|
+
};
|
|
322
|
+
const NON_OAUTH_VALUE_ENV = ['ANTHROPIC_API_KEY', 'ANTHROPIC_AUTH_TOKEN'];
|
|
323
|
+
const nonBlank = (v) => typeof v === 'string' && v.trim() !== '';
|
|
324
|
+
export const readClaudeAccountSignIn = async (env, home = homedir()) => {
|
|
325
|
+
const path = resolve(env.CLAUDE_CONFIG_DIR || home, '.claude.json');
|
|
326
|
+
let text;
|
|
327
|
+
try {
|
|
328
|
+
text = await fs.readFile(path, 'utf8');
|
|
329
|
+
}
|
|
330
|
+
catch (err) {
|
|
331
|
+
return isErrnoCode(err, 'ENOENT') ? { state: 'signed-out', path } : { state: 'unknown' };
|
|
332
|
+
}
|
|
333
|
+
let account;
|
|
334
|
+
try {
|
|
335
|
+
account = JSON.parse(text)?.oauthAccount;
|
|
336
|
+
}
|
|
337
|
+
catch {
|
|
338
|
+
return { state: 'unknown' };
|
|
339
|
+
}
|
|
340
|
+
const signedIn = nonBlank(account?.accountUuid) || nonBlank(account?.emailAddress);
|
|
341
|
+
return { state: signedIn ? 'signed-in' : 'signed-out', path };
|
|
342
|
+
};
|
|
343
|
+
export const CLAUDE_CODE_ACCOUNT = {
|
|
344
|
+
signIn: (env) => readClaudeAccountSignIn(env),
|
|
345
|
+
};
|
|
346
|
+
export const claudeCodeNonOauthReason = async (env, files) => {
|
|
347
|
+
for (const key of NON_OAUTH_VALUE_ENV) {
|
|
348
|
+
if ((env[key] ?? '').trim() !== '')
|
|
349
|
+
return `${key} is set`;
|
|
350
|
+
}
|
|
351
|
+
for (const key of SERVER_BYPASS_PROVIDER_FLAGS) {
|
|
352
|
+
const value = (env[key] ?? '').trim();
|
|
353
|
+
if (TRUTHY.has(value.toLowerCase()))
|
|
354
|
+
return `${key}=${value}`;
|
|
355
|
+
}
|
|
356
|
+
for (const file of files) {
|
|
357
|
+
let parsed;
|
|
358
|
+
try {
|
|
359
|
+
parsed = JSON.parse(await fs.readFile(file, 'utf8'));
|
|
360
|
+
}
|
|
361
|
+
catch {
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
const helper = parsed?.apiKeyHelper;
|
|
365
|
+
if (typeof helper === 'string' && helper.trim() !== '')
|
|
366
|
+
return `apiKeyHelper is set in ${file}`;
|
|
367
|
+
}
|
|
368
|
+
if (nonBlank(env.CLAUDE_CODE_OAUTH_TOKEN))
|
|
369
|
+
return undefined;
|
|
370
|
+
const account = await CLAUDE_CODE_ACCOUNT.signIn(env);
|
|
371
|
+
if (account.state === 'signed-out') {
|
|
372
|
+
return `no Claude account sign-in in ${tildify(account.path)}`;
|
|
373
|
+
}
|
|
374
|
+
return undefined;
|
|
375
|
+
};
|
|
376
|
+
const SERVER_BYPASS_PROVIDER_FLAGS = [
|
|
377
|
+
'CLAUDE_CODE_USE_BEDROCK',
|
|
378
|
+
'CLAUDE_CODE_USE_VERTEX',
|
|
379
|
+
'CLAUDE_CODE_USE_FOUNDRY',
|
|
380
|
+
'CLAUDE_CODE_USE_MANTLE',
|
|
381
|
+
'CLAUDE_CODE_USE_ANTHROPIC_AWS',
|
|
382
|
+
];
|
|
383
|
+
export const serverManagedBypassed = (env) => {
|
|
384
|
+
if (SERVER_BYPASS_PROVIDER_FLAGS.some((k) => TRUTHY.has((env[k] ?? '').trim().toLowerCase()))) {
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
387
|
+
const base = (env.ANTHROPIC_BASE_URL ?? '').trim();
|
|
388
|
+
if (!base)
|
|
389
|
+
return false;
|
|
390
|
+
try {
|
|
391
|
+
return new URL(base).host !== 'api.anthropic.com';
|
|
392
|
+
}
|
|
393
|
+
catch {
|
|
394
|
+
return true;
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
export const CLAUDE_CODE_LAYER_POLICY = {
|
|
398
|
+
layers: ['project', 'projectLocal'],
|
|
399
|
+
ignores: (key, value) => isProjectIgnoredTelemetryKey(key) && !isHonoredOffValue(key, value),
|
|
400
|
+
since: '2.1.282',
|
|
401
|
+
installedVersion: installedClaudeCodeVersion,
|
|
402
|
+
ignoredSummary: 'the telemetry enable flags, exporter selectors, OTEL_LOG_* and OTLP endpoint and header keys',
|
|
403
|
+
stillApplies: 'OTEL_RESOURCE_ATTRIBUTES still applies',
|
|
404
|
+
};
|
|
188
405
|
export const claudeCode = {
|
|
189
406
|
name: 'claude-code',
|
|
190
407
|
displayName: 'Claude Code',
|
|
191
408
|
paths: {
|
|
192
409
|
local: join('.claude', 'settings.json'),
|
|
193
|
-
global: join(
|
|
410
|
+
global: join(USER_DIR, 'settings.json'),
|
|
194
411
|
},
|
|
195
412
|
runInstruction: 'claude',
|
|
196
|
-
// When the user supplies no specific use case (and isn't signed in for an
|
|
197
|
-
// auto-assign), the wizard mints a ucid and stamps it, rather than writing an
|
|
198
|
-
// unattributed config. A generated stream is a single-developer unbound coding
|
|
199
|
-
// ucid, so the MAI-1980 reconciler can then auto-provision a use case for it.
|
|
200
|
-
autoUcid: true,
|
|
201
|
-
// Claude Code emits native user.email from git config, so it is never prompted
|
|
202
|
-
// for an identity — but an account-less invite install (MAI-2015) has only the
|
|
203
|
-
// invite email, stamped as the `mainwave.user_email` resource-attr fallback.
|
|
204
413
|
stampsIdentityAttr: true,
|
|
205
|
-
|
|
414
|
+
nativeIdentityAbsent: claudeCodeNonOauthReason,
|
|
415
|
+
detect: () => hasPath(USER_DIR) || hasBinary('claude'),
|
|
206
416
|
codec: jsonEnvCodec,
|
|
207
417
|
managedEnvKeys: MANAGED_ENV_KEYS,
|
|
208
418
|
hierarchy: HIERARCHY,
|
|
419
|
+
layerKeyPolicy: CLAUDE_CODE_LAYER_POLICY,
|
|
420
|
+
managedUnitKey: isManagedTelemetryUnitKey,
|
|
421
|
+
managedLock: isManagedLockedKey,
|
|
422
|
+
inactiveLayers: (env) => serverManagedBypassed(env)
|
|
423
|
+
? [
|
|
424
|
+
{
|
|
425
|
+
id: 'managed-server',
|
|
426
|
+
reason: 'a third-party provider flag (CLAUDE_CODE_USE_*) or a non-Anthropic ANTHROPIC_BASE_URL is ' +
|
|
427
|
+
'set in your shell or user settings, so Claude Code skips server-managed settings',
|
|
428
|
+
},
|
|
429
|
+
]
|
|
430
|
+
: [],
|
|
209
431
|
buildEnv,
|
|
210
432
|
parseEnv,
|
|
211
433
|
collectChecks,
|
|
212
|
-
// Native skill support: Claude Code discovers `<dir>/<name>/SKILL.md`
|
|
213
|
-
// directly, so the bundles are copied in rather than pointed at.
|
|
214
434
|
instructionSurface: {
|
|
215
435
|
kind: 'skill-dir',
|
|
216
|
-
global: join(
|
|
436
|
+
global: join(USER_DIR, 'skills'),
|
|
217
437
|
local: join('.claude', 'skills'),
|
|
218
438
|
label: 'skill directory',
|
|
219
439
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/adapters/claude-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAItD,MAAM,gBAAgB,GAAG;IACvB,8BAA8B;IAC9B,iFAAiF;IACjF,qDAAqD;IACrD,qCAAqC;IACrC,sBAAsB;IACtB,uBAAuB;IACvB,oBAAoB;IACpB,6BAA6B;IAC7B,6BAA6B;IAC7B,4BAA4B;IAC5B,0BAA0B;IAC1B,uBAAuB;IACvB,uBAAuB;IACvB,uBAAuB;CACf,CAAA;AAEV,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,SAAkB,EAAU,EAAE;IACvE,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,YAAY,CAAA;IACzE,iFAAiF;IACjF,8EAA8E;IAC9E,gFAAgF;IAChF,8EAA8E;IAC9E,iFAAiF;IACjF,6EAA6E;IAC7E,EAAE;IACF,yEAAyE;IACzE,2EAA2E;IAC3E,8EAA8E;IAC9E,8EAA8E;IAC9E,8EAA8E;IAC9E,uEAAuE;IACvE,OAAO;QACL,GAAG,CAAC,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