@mainwave/cli 0.6.1 → 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 -47
- 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 -49
- 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
|
@@ -2,49 +2,8 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { jsonManagedCodec } from '../core/codecs/json-managed.js';
|
|
4
4
|
import { buildHeaders, HEADER_NAME, headerBearerToken, jsonObjectHeaders, kvPairsHeaders, } from '../core/headers.js';
|
|
5
|
-
/**
|
|
6
|
-
* Claude Desktop (Cowork on Team/Enterprise, and the third-party-inference
|
|
7
|
-
* "3P" builds) exports session activity to any OpenTelemetry collector — this
|
|
8
|
-
* is OTel-native, so no MCP proxy is involved. Unlike Claude Code, telemetry
|
|
9
|
-
* is not turned on with `OTEL_*` env vars in a settings.json `env` block; it is
|
|
10
|
-
* a set of managed-configuration keys (`otlp*`) delivered either through the
|
|
11
|
-
* first-party Cowork admin console (endpoint / protocol / headers only) or an
|
|
12
|
-
* MDM profile (macOS plist / Windows registry / Linux JSON).
|
|
13
|
-
*
|
|
14
|
-
* Because the first-party console exposes only endpoint/protocol/headers,
|
|
15
|
-
* tenancy rides on OTLP **headers** (`X-Mainwave-UCID` / `X-Mainwave-Source`) —
|
|
16
|
-
* the same mechanism the Codex and Copilot adapters use — rather than
|
|
17
|
-
* `otlpResourceAttributes`. The collector promotes those headers to
|
|
18
|
-
* `mainwave.*` before processor dispatch. `service.name` is left as the app
|
|
19
|
-
* sets it (`cowork` / `claude-code-desktop` / `claude-desktop`); source
|
|
20
|
-
* identity comes from the header, so one value covers all three sub-surfaces.
|
|
21
|
-
*
|
|
22
|
-
* Structured values (`otlpHeaders`, `otlpContentCapture`) are carried as
|
|
23
|
-
* JSON strings through the wizard's flat record and stored as JSON-encoded
|
|
24
|
-
* strings on disk — the encoding the plist/registry surfaces require. See
|
|
25
|
-
* `jsonManagedCodec`. The one exception is the first-party Cowork console: it
|
|
26
|
-
* takes headers as comma-separated `key=value` pairs (the OTel env-var form) and
|
|
27
|
-
* rejects the JSON object, so `printPostSetupInstructions` renders that surface's
|
|
28
|
-
* headers with `headersAsConsoleValue`, not the JSON `otlpHeaders` (MAI-1187).
|
|
29
|
-
*
|
|
30
|
-
* Point `otlpEndpoint` at the collector's OTLP/HTTP receiver (`:4318`) with
|
|
31
|
-
* `http/protobuf`: Cowork sessions do not support gRPC and silently fall back
|
|
32
|
-
* to HTTP against the *same* endpoint, so a `:4317` gRPC address drops all
|
|
33
|
-
* Cowork telemetry. `doctor` warns on both the `grpc` protocol and a `:4317`
|
|
34
|
-
* endpoint (see collectChecks).
|
|
35
|
-
*
|
|
36
|
-
* See MAI-1163 / MAI-1187. Cowork event schema and the collector-side ingest
|
|
37
|
-
* live in MAI-1188.
|
|
38
|
-
*/
|
|
39
5
|
const SOURCE_VALUE = 'cowork.claude_desktop';
|
|
40
6
|
const DEFAULT_PROTOCOL = 'http/protobuf';
|
|
41
|
-
/**
|
|
42
|
-
* Claude Desktop's OTel export requires app ≥ 1.1.4173; the traces beta
|
|
43
|
-
* (`otlpTracesEnabled`) requires ≥ 1.22209.0. We enable traces because they
|
|
44
|
-
* give per-prompt spans that make session correlation far richer; the value
|
|
45
|
-
* is additive and ignored by older builds, and the collector must not depend
|
|
46
|
-
* on it (MAI-1188). `doctor` surfaces the version floors as info.
|
|
47
|
-
*/
|
|
48
7
|
const OTEL_MIN_APP_VERSION = '1.1.4173';
|
|
49
8
|
const TRACES_MIN_APP_VERSION = '1.22209.0';
|
|
50
9
|
const KEY = {
|
|
@@ -54,7 +13,6 @@ const KEY = {
|
|
|
54
13
|
contentCapture: 'otlpContentCapture',
|
|
55
14
|
tracesEnabled: 'otlpTracesEnabled',
|
|
56
15
|
};
|
|
57
|
-
/** Every key buildEnv can emit — settings.ts clears these on re-run to remove opted-out keys. */
|
|
58
16
|
const MANAGED_ENV_KEYS = [
|
|
59
17
|
KEY.endpoint,
|
|
60
18
|
KEY.protocol,
|
|
@@ -63,15 +21,6 @@ const MANAGED_ENV_KEYS = [
|
|
|
63
21
|
KEY.tracesEnabled,
|
|
64
22
|
];
|
|
65
23
|
const stripTrailingSlash = (url) => url.replace(/\/+$/, '');
|
|
66
|
-
/**
|
|
67
|
-
* Map the wizard's three opt-ins onto Claude Desktop's `otlpContentCapture`
|
|
68
|
-
* categories. `userPrompts` pulls in `assistantResponses` too so the research /
|
|
69
|
-
* theme milestones get both sides of the exchange on every app version (on
|
|
70
|
-
* ≥ 1.17377 enabling `userPrompts` captures responses anyway; we make it
|
|
71
|
-
* explicit for older builds). `rawApiBodies` is intentionally never enabled —
|
|
72
|
-
* it is the most sensitive category and no opt-in maps to it, mirroring how the
|
|
73
|
-
* Claude Code adapter does not turn on `OTEL_LOG_RAW_API_BODIES`.
|
|
74
|
-
*/
|
|
75
24
|
const contentCategories = (optIns) => {
|
|
76
25
|
const cats = [];
|
|
77
26
|
if (optIns.userPrompts)
|
|
@@ -82,24 +31,12 @@ const contentCategories = (optIns) => {
|
|
|
82
31
|
cats.push('toolContent');
|
|
83
32
|
return cats;
|
|
84
33
|
};
|
|
85
|
-
/** The tenancy/auth headers, in the shared shape both surfaces encode from. */
|
|
86
34
|
const headersFor = (input) => buildHeaders({ apiKey: input.apiKey, ucid: input.ucid, source: SOURCE_VALUE });
|
|
87
|
-
/**
|
|
88
|
-
* The first-party Cowork console (Admin settings → Cowork) takes OTLP headers in
|
|
89
|
-
* the OpenTelemetry env-var convention — comma-separated `key=value` pairs — and
|
|
90
|
-
* REJECTS a JSON object (verified against a live claude.ai admin-settings install,
|
|
91
|
-
* MAI-1187). The JSON-object form (`buildEnv`'s `otlpHeaders`) is the
|
|
92
|
-
* managed-config (plist / registry / managed-settings.json) encoding only; the
|
|
93
|
-
* two must not be swapped. Both come from `core/headers.ts`, which is also what
|
|
94
|
-
* the display masker decodes with.
|
|
95
|
-
*/
|
|
96
35
|
const headersAsConsoleValue = (headers) => kvPairsHeaders.encode(headers);
|
|
97
36
|
const buildEnv = ({ ucid, collectorUrl, apiKey, optIns, }) => {
|
|
98
37
|
const out = {
|
|
99
38
|
[KEY.endpoint]: stripTrailingSlash(collectorUrl),
|
|
100
39
|
[KEY.protocol]: DEFAULT_PROTOCOL,
|
|
101
|
-
// Managed-config surface: JSON-object string, the encoding the plist /
|
|
102
|
-
// registry / managed-settings.json keys require.
|
|
103
40
|
[KEY.headers]: jsonObjectHeaders.encode(headersFor({ ucid, apiKey })),
|
|
104
41
|
[KEY.tracesEnabled]: 'true',
|
|
105
42
|
};
|
|
@@ -124,8 +61,6 @@ const parseEnv = (env) => {
|
|
|
124
61
|
if (!MANAGED_ENV_KEYS.some((k) => k in env))
|
|
125
62
|
return {};
|
|
126
63
|
const out = {};
|
|
127
|
-
// otlpEndpoint is the bare collector base — Claude Desktop appends the
|
|
128
|
-
// per-signal path itself, so there is no /v1/<signal> suffix to strip.
|
|
129
64
|
if (env[KEY.endpoint])
|
|
130
65
|
out.collectorUrl = env[KEY.endpoint];
|
|
131
66
|
const headers = parseHeaders(env[KEY.headers]);
|
|
@@ -145,12 +80,6 @@ const parseEnv = (env) => {
|
|
|
145
80
|
};
|
|
146
81
|
return out;
|
|
147
82
|
};
|
|
148
|
-
/**
|
|
149
|
-
* Project the adapter's keys onto the generic telemetry shape the doctor's
|
|
150
|
-
* adapter-agnostic checks expect. Tenancy lives inside the `otlpHeaders` JSON
|
|
151
|
-
* blob rather than `OTEL_RESOURCE_ATTRIBUTES`, so the default projection in
|
|
152
|
-
* doctor.ts would always report "missing mainwave.ucid" for Desktop setups.
|
|
153
|
-
*/
|
|
154
83
|
const normalizeForGenericChecks = (env) => {
|
|
155
84
|
const headers = parseHeaders(env[KEY.headers]);
|
|
156
85
|
return {
|
|
@@ -186,18 +115,6 @@ const collectChecks = (env) => {
|
|
|
186
115
|
});
|
|
187
116
|
return issues;
|
|
188
117
|
};
|
|
189
|
-
/**
|
|
190
|
-
* NOTE (MAI-1163 open item): the exact on-disk managed-config locations
|
|
191
|
-
* (macOS managed-preferences plist under `com.anthropic.claudefordesktop`,
|
|
192
|
-
* the Windows `…\Policies\Claude` registry hive, the Linux
|
|
193
|
-
* `/etc/claude-desktop/managed-settings.json` path) still need verifying
|
|
194
|
-
* against a real Cowork/3P install, and the plist/.reg *encodings* are a
|
|
195
|
-
* follow-up. Until then the wizard writes a portable JSON managed-settings
|
|
196
|
-
* profile to a safe, user-writable location and `printPostSetupInstructions`
|
|
197
|
-
* explains how to deploy it (Cowork admin console, or an MDM profile). This
|
|
198
|
-
* keeps setup runnable and non-destructive rather than writing to an
|
|
199
|
-
* unverified system path.
|
|
200
|
-
*/
|
|
201
118
|
const PROFILE_FILENAME = 'claude-desktop-managed-settings.json';
|
|
202
119
|
const globalProfilePath = join(homedir(), '.mainwave', PROFILE_FILENAME);
|
|
203
120
|
const localProfilePath = join('.mainwave', PROFILE_FILENAME);
|
|
@@ -211,7 +128,6 @@ const HIERARCHY = [
|
|
|
211
128
|
];
|
|
212
129
|
const printPostSetupInstructions = (input) => {
|
|
213
130
|
const env = buildEnv(input);
|
|
214
|
-
// Console headers are comma-separated key=value (NOT the JSON in the profile).
|
|
215
131
|
const consoleHeaders = headersAsConsoleValue(headersFor(input));
|
|
216
132
|
const lines = [
|
|
217
133
|
'Claude Desktop reads OTel config from a managed source, not this file directly.',
|
|
@@ -234,9 +150,6 @@ const printPostSetupInstructions = (input) => {
|
|
|
234
150
|
export const claudeDesktop = {
|
|
235
151
|
name: 'claude-desktop',
|
|
236
152
|
displayName: 'Claude Desktop (Cowork)',
|
|
237
|
-
// No `instructionSurface`, deliberately: Claude Desktop is a chat client, not
|
|
238
|
-
// a coding agent, and has no file it reads standing instructions from. Setup
|
|
239
|
-
// reports it as a no-op rather than counting it as an install (MAI-1424).
|
|
240
153
|
paths: {
|
|
241
154
|
local: localProfilePath,
|
|
242
155
|
global: globalProfilePath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-desktop.js","sourceRoot":"","sources":["../../src/adapters/claude-desktop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"claude-desktop.js","sourceRoot":"","sources":["../../src/adapters/claude-desktop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,oBAAoB,CAAA;AA6C3B,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,gBAAgB,GAAG,eAAe,CAAA;AASxC,MAAM,oBAAoB,GAAG,UAAU,CAAA;AACvC,MAAM,sBAAsB,GAAG,WAAW,CAAA;AAE1C,MAAM,GAAG,GAAG;IACV,QAA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0BAA0B,GAAG,CAAC,KAAoB,EAAU,EAAE;IAClE,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3B,MAAM,cAAc,GAAG,qBAAqB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;IAC/D,MAAM,KAAK,GAAG;QACZ,iFAAiF;QACjF,+CAA+C;QAC/C,EAAE;QACF,wEAAwE;QACxE,yBAAyB,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;QAC5C,yBAAyB,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;QAC5C,yBAAyB,cAAc,EAAE;QACzC,uFAAuF;QACvF,EAAE;QACF,iFAAiF;QACjF,0FAA0F;QAC1F,yEAAyE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QAC3F,EAAE;QACF,kEAAkE;KACnE,CAAA;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,yBAAyB;IAItC,KAAK,EAAE;QACL,KAAK,EAAE,gBAAgB;QACvB,MAAM,EAAE,iBAAiB;KAC1B;IACD,KAAK,EAAE,gBAAgB;IACvB,cAAc,EAAE,gBAAgB;IAChC,SAAS,EAAE,SAAS;IACpB,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,yBAAyB;IACzB,0BAA0B;CAC3B,CAAA"}
|
|
@@ -4,25 +4,6 @@ import { jsonEnvCodec } from '../core/codecs/json-env.js';
|
|
|
4
4
|
import { hasBinary, hasPath } from '../core/detect.js';
|
|
5
5
|
import { tomlOtelCodec } from '../core/codecs/toml-otel.js';
|
|
6
6
|
import { UCID_SOURCE_EXPLICIT } from '../core/headers.js';
|
|
7
|
-
/**
|
|
8
|
-
* Codex CLI's OTEL config is structured TOML, not env vars in a JSON `env`
|
|
9
|
-
* block. The wizard's flat env record uses dotted TOML paths as keys
|
|
10
|
-
* (e.g. `otel.exporter.otlp-http.endpoint`); the TOML codec un-flattens
|
|
11
|
-
* those into nested `[otel.*]` tables on serialize.
|
|
12
|
-
*
|
|
13
|
-
* Tenancy attributes ship as HTTP headers (`X-Mainwave-*`), not via
|
|
14
|
-
* `OTEL_RESOURCE_ATTRIBUTES`. The collector promotes them to `mainwave.*`
|
|
15
|
-
* resource attributes before processor dispatch, keeping all setup in a
|
|
16
|
-
* single config file rather than requiring a wrapper script.
|
|
17
|
-
*
|
|
18
|
-
* Codex CLI 0.130+ silently drops `otel` keys from project-local
|
|
19
|
-
* `.codex/config.toml` (see PROJECT_LOCAL_CONFIG_DENYLIST in
|
|
20
|
-
* codex-rs/config/src/loader/mod.rs). The reasoning upstream: project-local
|
|
21
|
-
* config comes from repository contents and should not get to choose where
|
|
22
|
-
* credentials are sent. Moot for new installs — setup writes user-global config
|
|
23
|
-
* only — but `collectFileChecks` still warns at doctor time when a stale local
|
|
24
|
-
* file with otel keys exists, which is how a pre-existing one surfaces.
|
|
25
|
-
*/
|
|
26
7
|
const SOURCE_VALUE = 'coding_agent.codex_cli';
|
|
27
8
|
const SIGNAL_BLOCKS = ['exporter', 'trace_exporter', 'metrics_exporter'];
|
|
28
9
|
const SIGNAL_PATH = {
|
|
@@ -40,7 +21,6 @@ const HEADER_NAMES = [
|
|
|
40
21
|
const endpointKey = (block) => `otel.${block}.otlp-http.endpoint`;
|
|
41
22
|
const protocolKey = (block) => `otel.${block}.otlp-http.protocol`;
|
|
42
23
|
const headerKey = (block, name) => `otel.${block}.otlp-http.headers.${name}`;
|
|
43
|
-
/** Every key buildEnv can emit — settings.ts clears these on re-run to remove opted-out keys. */
|
|
44
24
|
const MANAGED_ENV_KEYS = [
|
|
45
25
|
'otel.log_user_prompt',
|
|
46
26
|
'otel.log_system_prompt',
|
|
@@ -57,21 +37,10 @@ const stripTrailingSlash = (url) => url.replace(/\/+$/, '');
|
|
|
57
37
|
const buildEnv = ({ ucid, collectorUrl, apiKey, optIns, userEmail, }) => {
|
|
58
38
|
const base = stripTrailingSlash(collectorUrl);
|
|
59
39
|
const out = {};
|
|
60
|
-
// Prompt content — the user prompt and the system prompt bodies — under the
|
|
61
|
-
// prompt opt-in ("logs full prompt content").
|
|
62
40
|
if (optIns.userPrompts) {
|
|
63
41
|
out['otel.log_user_prompt'] = 'true';
|
|
64
42
|
out['otel.log_system_prompt'] = 'true';
|
|
65
43
|
}
|
|
66
|
-
// Codex can't split tool metadata from tool content the way Claude Code's
|
|
67
|
-
// OTEL_LOG_TOOL_DETAILS / _CONTENT can: a single `log_tool_payloads` carries
|
|
68
|
-
// the tool name, the command (arguments), success, and — with governance —
|
|
69
|
-
// the approval decision, together. So enable the tool / MCP / governance
|
|
70
|
-
// logging when the user opts into EITHER tool stream (tool details OR tool
|
|
71
|
-
// content). This is the config that lets the Codex tool-call / success-rate /
|
|
72
|
-
// auto-approve telemetry (MAI-1406) actually flow — without it a standard
|
|
73
|
-
// install produces the empty-Codex experience (MAI-1407). collectChecks below
|
|
74
|
-
// already warns that Codex ships full tool stdout regardless of these flags.
|
|
75
44
|
if (optIns.toolDetails || optIns.toolContent) {
|
|
76
45
|
out['otel.log_tool_payloads'] = 'true';
|
|
77
46
|
out['otel.log_mcp_interactions'] = 'true';
|
|
@@ -81,17 +50,11 @@ const buildEnv = ({ ucid, collectorUrl, apiKey, optIns, userEmail, }) => {
|
|
|
81
50
|
out[endpointKey(block)] = `${base}${SIGNAL_PATH[block]}`;
|
|
82
51
|
out[protocolKey(block)] = 'binary';
|
|
83
52
|
out[headerKey(block, 'Authorization')] = `Bearer ${apiKey}`;
|
|
84
|
-
// Omit the UCID header when unset — events land unmapped. See MAI-1033.
|
|
85
|
-
// The ucid_source stamp rides only with a ucid: it declares the id was
|
|
86
|
-
// explicitly configured (MAI-1480), meaningless without one.
|
|
87
53
|
if (ucid) {
|
|
88
54
|
out[headerKey(block, 'X-Mainwave-UCID')] = ucid;
|
|
89
55
|
out[headerKey(block, 'X-Mainwave-Ucid-Source')] = UCID_SOURCE_EXPLICIT;
|
|
90
56
|
}
|
|
91
57
|
out[headerKey(block, 'X-Mainwave-Source')] = SOURCE_VALUE;
|
|
92
|
-
// Codex spans carry no user.email and only ~half its logs do; stamp the
|
|
93
|
-
// developer's email so the collector promotes it to mainwave.user_email and
|
|
94
|
-
// reads attribute the activity to a person. Omitted when unset (MAI-1394).
|
|
95
58
|
if (userEmail)
|
|
96
59
|
out[headerKey(block, 'X-Mainwave-User-Email')] = userEmail;
|
|
97
60
|
}
|
|
@@ -133,11 +96,6 @@ const parseEnv = (env) => {
|
|
|
133
96
|
const userEmail = env[headerKey('exporter', 'X-Mainwave-User-Email')];
|
|
134
97
|
if (userEmail)
|
|
135
98
|
out.userEmail = userEmail;
|
|
136
|
-
// toolDetails / toolContent both drive the single `log_tool_payloads` flag, so
|
|
137
|
-
// a re-run can't tell which the user picked — recover both from it, preserving
|
|
138
|
-
// the enabled state on re-run (unchecking either still leaves the flag on via
|
|
139
|
-
// the OR in buildEnv; unchecking both clears it). userPrompts drives both the
|
|
140
|
-
// user- and system-prompt flags, so log_user_prompt is a sufficient witness.
|
|
141
99
|
out.optIns = {
|
|
142
100
|
userPrompts: env['otel.log_user_prompt'] === 'true',
|
|
143
101
|
toolDetails: env['otel.log_tool_payloads'] === 'true',
|
|
@@ -145,15 +103,6 @@ const parseEnv = (env) => {
|
|
|
145
103
|
};
|
|
146
104
|
return out;
|
|
147
105
|
};
|
|
148
|
-
/**
|
|
149
|
-
* Project Codex's TOML-keyed paths onto the generic shape the doctor's
|
|
150
|
-
* adapter-agnostic checks expect. Codex carries the UCID as an HTTP header
|
|
151
|
-
* (`X-Mainwave-UCID`) rather than via `OTEL_RESOURCE_ATTRIBUTES`, so the
|
|
152
|
-
* legacy default-projection in `doctor.ts` would always report "missing
|
|
153
|
-
* mainwave.ucid" for Codex setups. We take the first value seen across the
|
|
154
|
-
* three signal blocks (logs/traces/metrics) — they're identical by
|
|
155
|
-
* construction, but this is robust to partial configs.
|
|
156
|
-
*/
|
|
157
106
|
const normalizeForGenericChecks = (env) => {
|
|
158
107
|
let endpoint;
|
|
159
108
|
let auth;
|
|
@@ -220,8 +169,6 @@ export const codexCli = {
|
|
|
220
169
|
displayName: 'Codex CLI',
|
|
221
170
|
runInstruction: 'codex',
|
|
222
171
|
detect: () => hasPath(join(homedir(), '.codex')) || hasBinary('codex'),
|
|
223
|
-
// Codex reads AGENTS.md as standing instructions; the repo copy is the one
|
|
224
|
-
// its users actually keep, so local points at the tree root, not `.codex/`.
|
|
225
172
|
instructionSurface: {
|
|
226
173
|
kind: 'instructions-file',
|
|
227
174
|
global: join(homedir(), '.codex', 'AGENTS.md'),
|
|
@@ -232,13 +179,6 @@ export const codexCli = {
|
|
|
232
179
|
local: join('.codex', 'config.toml'),
|
|
233
180
|
global: join(homedir(), '.codex', 'config.toml'),
|
|
234
181
|
},
|
|
235
|
-
// Codex spans with an empty UCID never surface on the Use Cases page, so mint
|
|
236
|
-
// one at setup when the user gives none — the runs then land as an unbound
|
|
237
|
-
// UCID they can assign to a use case (MAI-1382).
|
|
238
|
-
autoUcid: true,
|
|
239
|
-
// Codex spans carry no identity and only ~half its logs carry user.email, so
|
|
240
|
-
// the wizard resolves the developer's email (git config default) and buildEnv
|
|
241
|
-
// stamps it as X-Mainwave-User-Email for the collector to attribute (MAI-1394).
|
|
242
182
|
injectsIdentity: true,
|
|
243
183
|
codec: tomlOtelCodec,
|
|
244
184
|
managedEnvKeys: MANAGED_ENV_KEYS,
|
|
@@ -248,11 +188,6 @@ export const codexCli = {
|
|
|
248
188
|
collectChecks,
|
|
249
189
|
collectFileChecks,
|
|
250
190
|
normalizeForGenericChecks,
|
|
251
|
-
// Codex fires PostToolUse hooks with the same shape as Claude Code (tool_name,
|
|
252
|
-
// tool_input.command, mcp__server__tool names), so the same marker scripts and
|
|
253
|
-
// matchers work — but hooks load from a sibling `hooks.json`, not the otel
|
|
254
|
-
// config.toml, and the scripts resolve OTLP config from config.toml at runtime
|
|
255
|
-
// (runtimeTool). MAI-1395.
|
|
256
191
|
markers: {
|
|
257
192
|
disclosure: 'Sends Linear/Jira issue ids and GitHub PR urls to the collector — never ticket bodies or diff content.',
|
|
258
193
|
hooksFile: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-cli.js","sourceRoot":"","sources":["../../src/adapters/codex-cli.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;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"codex-cli.js","sourceRoot":"","sources":["../../src/adapters/codex-cli.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;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AA+BzD,MAAM,YAAY,GAAG,wBAAwB,CAAA;AAE7C,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,CAAU,CAAA;AAGjF,MAAM,WAAW,GAAgC;IAC/C,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,YAAY;IAC5B,gBAAgB,EAAE,aAAa;CAChC,CAAA;AAED,MAAM,YAAY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AE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC;IAGtE,kBAAkB,EAAE;QAClB,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,WAAW,CAAC;QAC9C,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,WAAW;KACnB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC;QACpC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,CAAC;KACjD;IAID,eAAe,EAAE,IAAI;IACrB,KAAK,EAAE,aAAa;IACpB,cAAc,EAAE,gBAAgB;IAChC,SAAS,EAAE,SAAS;IACpB,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,iBAAiB;IACjB,yBAAyB;IAMzB,OAAO,EAAE;QACP,UAAU,EACR,wGAAwG;QAC1G,SAAS,EAAE;YACT,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC;YAC7C,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC;YACvC,KAAK,EAAE,YAAY;SACpB;QACD,WAAW,EAAE,OAAO;KACrB;CACF,CAAA"}
|
|
@@ -6,29 +6,6 @@ import { hasEntryPrefixed } from '../core/detect.js';
|
|
|
6
6
|
import { color } from '../core/format.js';
|
|
7
7
|
import { buildHeaders, HEADER_NAME, headerBearerToken, kvPairsHeaders } from '../core/headers.js';
|
|
8
8
|
import { renderEnvFileBlock } from '../core/post-setup.js';
|
|
9
|
-
/**
|
|
10
|
-
* VS Code's GitHub Copilot Chat extension splits OTLP configuration across
|
|
11
|
-
* two surfaces. The exporter wiring lives in `settings.json` under
|
|
12
|
-
* `github.copilot.chat.otel.*`, but the bearer/UCID headers must come from
|
|
13
|
-
* process env — there's no settings key for `OTEL_EXPORTER_OTLP_HEADERS`.
|
|
14
|
-
*
|
|
15
|
-
* This adapter writes both:
|
|
16
|
-
* 1. Primary: VS Code user `settings.json` (or workspace `.vscode/...`).
|
|
17
|
-
* 2. Additional: `~/.mainwave/copilot-chat.env`, mode 0600.
|
|
18
|
-
*
|
|
19
|
-
* The user is expected to source the env file from their shell rc so VS
|
|
20
|
-
* Code's shell-env resolver propagates the vars into the extension host on
|
|
21
|
-
* GUI launch (Spotlight/Dock). `printPostSetupInstructions` documents the
|
|
22
|
-
* source line + the Cmd+Q-vs-Reload-Window distinction; the doctor's
|
|
23
|
-
* generic `$SHELL -ilc env` check verifies it took.
|
|
24
|
-
*
|
|
25
|
-
* Tenancy ships as headers (`Authorization=Bearer …,X-Mainwave-UCID=…,
|
|
26
|
-
* X-Mainwave-Source=…`) inside `OTEL_EXPORTER_OTLP_HEADERS`. The collector's
|
|
27
|
-
* `headers.rs` middleware (MAI-74) promotes them to `mainwave.*` resource
|
|
28
|
-
* attrs before processor dispatch. `processors/copilot.rs` only matches
|
|
29
|
-
* `service.name=github-copilot` (the CLI surface); `copilot-chat` is
|
|
30
|
-
* dispatched to its own `processors/copilot_chat.rs` (MAI-1474).
|
|
31
|
-
*/
|
|
32
9
|
const SOURCE_VALUE = 'coding_agent.copilot_chat';
|
|
33
10
|
const VSCODE_KEY_ENABLED = 'github.copilot.chat.otel.enabled';
|
|
34
11
|
const VSCODE_KEY_EXPORTER_TYPE = 'github.copilot.chat.otel.exporterType';
|
|
@@ -57,12 +34,6 @@ const userSettingsPath = () => {
|
|
|
57
34
|
}
|
|
58
35
|
return join(homedir(), '.config', 'Code', 'User', 'settings.json');
|
|
59
36
|
};
|
|
60
|
-
// Copilot Chat ships from the marketplace, not in the box, so probing for VS
|
|
61
|
-
// Code itself — `code` on PATH, or the `User/` settings dir — says nothing about
|
|
62
|
-
// whether this adapter's tool is present. Probe for the extension instead.
|
|
63
|
-
// Extensions live under a versioned directory name (`<publisher>.<name>-<ver>`),
|
|
64
|
-
// which rules out a fixed path, and the extensions root sits in the home
|
|
65
|
-
// directory on every platform rather than beside `settings.json`.
|
|
66
37
|
const EXTENSION_ROOTS = [
|
|
67
38
|
join(homedir(), '.vscode', 'extensions'),
|
|
68
39
|
join(homedir(), '.vscode-insiders', 'extensions'),
|
|
@@ -73,7 +44,7 @@ const LOCAL_SETTINGS_PATH = join('.vscode', 'settings.json');
|
|
|
73
44
|
const ENV_FILE_GLOBAL_PATH = join(homedir(), '.mainwave', 'copilot-chat.env');
|
|
74
45
|
const ENV_FILE_LOCAL_PATH = join('.mainwave', 'copilot-chat.env');
|
|
75
46
|
const stripTrailingSlash = (url) => url.replace(/\/+$/, '');
|
|
76
|
-
const buildHeadersValue = (apiKey, ucid) => kvPairsHeaders.encode(buildHeaders({ apiKey, ucid, source: SOURCE_VALUE }));
|
|
47
|
+
const buildHeadersValue = (apiKey, ucid, userEmail) => kvPairsHeaders.encode(buildHeaders({ apiKey, ucid, source: SOURCE_VALUE, userEmail }));
|
|
77
48
|
const parseHeaders = (raw) => kvPairsHeaders.decode(raw) ?? {};
|
|
78
49
|
const buildEnv = ({ collectorUrl, optIns }) => ({
|
|
79
50
|
[VSCODE_KEY_ENABLED]: 'true',
|
|
@@ -99,9 +70,9 @@ const parseEnv = (env) => {
|
|
|
99
70
|
}
|
|
100
71
|
return out;
|
|
101
72
|
};
|
|
102
|
-
const buildEnvFile = ({ ucid, collectorUrl, apiKey }) => ({
|
|
73
|
+
const buildEnvFile = ({ ucid, collectorUrl, apiKey, userEmail, }) => ({
|
|
103
74
|
OTEL_EXPORTER_OTLP_ENDPOINT: stripTrailingSlash(collectorUrl),
|
|
104
|
-
OTEL_EXPORTER_OTLP_HEADERS: buildHeadersValue(apiKey, ucid),
|
|
75
|
+
OTEL_EXPORTER_OTLP_HEADERS: buildHeadersValue(apiKey, ucid, userEmail),
|
|
105
76
|
OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf',
|
|
106
77
|
OTEL_RESOURCE_ATTRIBUTES: `service.name=copilot-chat,mainwave.source=${SOURCE_VALUE}`,
|
|
107
78
|
});
|
|
@@ -122,6 +93,9 @@ const parseEnvFile = (env) => {
|
|
|
122
93
|
const u = headers[HEADER_NAME.ucid];
|
|
123
94
|
if (u)
|
|
124
95
|
out.ucid = u;
|
|
96
|
+
const userEmail = headers[HEADER_NAME.userEmail];
|
|
97
|
+
if (userEmail)
|
|
98
|
+
out.userEmail = userEmail;
|
|
125
99
|
}
|
|
126
100
|
return out;
|
|
127
101
|
};
|
|
@@ -140,13 +114,6 @@ const normalizeForGenericChecks = (env) => ({
|
|
|
140
114
|
auth: undefined,
|
|
141
115
|
ucid: undefined,
|
|
142
116
|
});
|
|
143
|
-
/**
|
|
144
|
-
* Tailors the source-line snippet to the scope the user picked and the
|
|
145
|
-
* host's shell. Delegates the env-file portion to `renderEnvFileBlock`
|
|
146
|
-
* (shell + OS aware); appends a VS Code-specific epilogue about the
|
|
147
|
-
* Cmd+Q-vs-Reload-Window restart and the doctor pointer. Windows always
|
|
148
|
-
* uses `setx` since VS Code skips the shell-env resolver there.
|
|
149
|
-
*/
|
|
150
117
|
const printPostSetupInstructions = (_input, scope = 'global') => {
|
|
151
118
|
const envFile = scope === 'local' ? ENV_FILE_LOCAL_PATH : ENV_FILE_GLOBAL_PATH;
|
|
152
119
|
if (osPlatform() === 'win32') {
|
|
@@ -194,9 +161,6 @@ export const copilotChat = {
|
|
|
194
161
|
name: 'copilot-chat',
|
|
195
162
|
displayName: 'GitHub Copilot Chat (VS Code)',
|
|
196
163
|
detect: () => EXTENSION_ROOTS.some((root) => hasEntryPrefixed(root, EXTENSION_PREFIX)),
|
|
197
|
-
// The same file the Copilot CLI adapter writes — one Copilot, two surfaces for
|
|
198
|
-
// telemetry config but a single instruction file, so a machine with both
|
|
199
|
-
// configured converges on one block rather than two.
|
|
200
164
|
instructionSurface: {
|
|
201
165
|
kind: 'instructions-file',
|
|
202
166
|
global: join(homedir(), '.config', 'github-copilot', 'copilot-instructions.md'),
|
|
@@ -207,6 +171,7 @@ export const copilotChat = {
|
|
|
207
171
|
local: LOCAL_SETTINGS_PATH,
|
|
208
172
|
global: GLOBAL_SETTINGS_PATH,
|
|
209
173
|
},
|
|
174
|
+
injectsIdentity: true,
|
|
210
175
|
codec: jsonFlatCodec,
|
|
211
176
|
managedEnvKeys: SETTINGS_MANAGED_KEYS,
|
|
212
177
|
hierarchy: HIERARCHY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-chat.js","sourceRoot":"","sources":["../../src/adapters/copilot-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"copilot-chat.js","sourceRoot":"","sources":["../../src/adapters/copilot-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,K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;QACV,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,MAAM;KACb;CACF,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAY;IAClC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,+BAA+B;IAC5C,MAAM,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAItF,kBAAkB,EAAE;QAClB,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,yBAAyB,CAAC;QAC/E,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,yBAAyB,CAAC;QACjD,KAAK,EAAE,yBAAyB;KACjC;IACD,KAAK,EAAE;QACL,KAAK,EAAE,mBAAmB;QAC1B,MAAM,EAAE,oBAAoB;KAC7B;IAID,eAAe,EAAE,IAAI;IACrB,KAAK,EAAE,aAAa;IACpB,cAAc,EAAE,qBAAqB;IACrC,SAAS,EAAE,SAAS;IACpB,QAAQ;IACR,QAAQ;IACR,yBAAyB;IACzB,0BAA0B;IAC1B,gBAAgB,EAAE,CAAC,YAAY,CAAC;CACjC,CAAA"}
|
|
@@ -5,33 +5,6 @@ import { hasBinary } from '../core/detect.js';
|
|
|
5
5
|
import { color } from '../core/format.js';
|
|
6
6
|
import { buildHeaders, HEADER_NAME, headerBearerToken, kvPairsHeaders } from '../core/headers.js';
|
|
7
7
|
import { renderEnvFileBlock } from '../core/post-setup.js';
|
|
8
|
-
/**
|
|
9
|
-
* GitHub Copilot CLI (the standalone `copilot` terminal binary) configures
|
|
10
|
-
* its OTLP exporter exclusively through shell env vars — there is no
|
|
11
|
-
* settings.json key for `OTEL_EXPORTER_OTLP_HEADERS` or
|
|
12
|
-
* `OTEL_EXPORTER_OTLP_ENDPOINT`. Rather than ask users to paste a snippet
|
|
13
|
-
* into shell rc on every wizard re-run, the adapter writes a managed env
|
|
14
|
-
* file at `~/.mainwave/copilot-cli.env` (mode 0600) that the user `source`s
|
|
15
|
-
* once. Re-runs update the file silently; the user's shell rc never has to
|
|
16
|
-
* change again.
|
|
17
|
-
*
|
|
18
|
-
* Loading patterns offered to the user (printed at wizard exit):
|
|
19
|
-
* 1. Current shell: `source ~/.mainwave/copilot-cli.env`
|
|
20
|
-
* 2. Cross-shell eval: `eval "$(mainwave-cli env copilot-cli)"`
|
|
21
|
-
* 3. Persist to rc: add `source ~/.mainwave/copilot-cli.env` to ~/.zshrc
|
|
22
|
-
*
|
|
23
|
-
* Tenancy attributes ship as HTTP headers (`X-Mainwave-*`) inside
|
|
24
|
-
* `OTEL_EXPORTER_OTLP_HEADERS`, not via `OTEL_RESOURCE_ATTRIBUTES`. The
|
|
25
|
-
* collector's `headers.rs` middleware (MAI-74) promotes them to `mainwave.*`
|
|
26
|
-
* resource attrs before processor dispatch, keeping the entire wiring in a
|
|
27
|
-
* single env var.
|
|
28
|
-
*
|
|
29
|
-
* MAI-78 will add a sibling `copilot-chat` adapter for the VS Code Copilot
|
|
30
|
-
* Chat extension surface. It does not converge on this processor:
|
|
31
|
-
* `processors/copilot.rs` only matches `service.name=github-copilot`, and
|
|
32
|
-
* `copilot-chat` is dispatched to its own `processors/copilot_chat.rs`
|
|
33
|
-
* (MAI-1474).
|
|
34
|
-
*/
|
|
35
8
|
const SOURCE_VALUE = 'coding_agent.copilot_cli';
|
|
36
9
|
const MANAGED_ENV_KEYS = [
|
|
37
10
|
'OTEL_EXPORTER_OTLP_ENDPOINT',
|
|
@@ -42,11 +15,11 @@ const MANAGED_ENV_KEYS = [
|
|
|
42
15
|
const GLOBAL_PATH = join(homedir(), '.mainwave', 'copilot-cli.env');
|
|
43
16
|
const LOCAL_PATH = join('.mainwave', 'copilot-cli.env');
|
|
44
17
|
const stripTrailingSlash = (url) => url.replace(/\/+$/, '');
|
|
45
|
-
const buildHeadersValue = (apiKey, ucid) => kvPairsHeaders.encode(buildHeaders({ apiKey, ucid, source: SOURCE_VALUE }));
|
|
18
|
+
const buildHeadersValue = (apiKey, ucid, userEmail) => kvPairsHeaders.encode(buildHeaders({ apiKey, ucid, source: SOURCE_VALUE, userEmail }));
|
|
46
19
|
const parseHeaders = (raw) => kvPairsHeaders.decode(raw) ?? {};
|
|
47
|
-
const buildEnv = ({ ucid, collectorUrl, apiKey }) => ({
|
|
20
|
+
const buildEnv = ({ ucid, collectorUrl, apiKey, userEmail, }) => ({
|
|
48
21
|
OTEL_EXPORTER_OTLP_ENDPOINT: stripTrailingSlash(collectorUrl),
|
|
49
|
-
OTEL_EXPORTER_OTLP_HEADERS: buildHeadersValue(apiKey, ucid),
|
|
22
|
+
OTEL_EXPORTER_OTLP_HEADERS: buildHeadersValue(apiKey, ucid, userEmail),
|
|
50
23
|
OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf',
|
|
51
24
|
COPILOT_OTEL_ENABLED: 'true',
|
|
52
25
|
});
|
|
@@ -67,6 +40,9 @@ const parseEnv = (env) => {
|
|
|
67
40
|
const ucid = headers[HEADER_NAME.ucid];
|
|
68
41
|
if (ucid)
|
|
69
42
|
out.ucid = ucid;
|
|
43
|
+
const userEmail = headers[HEADER_NAME.userEmail];
|
|
44
|
+
if (userEmail)
|
|
45
|
+
out.userEmail = userEmail;
|
|
70
46
|
}
|
|
71
47
|
return out;
|
|
72
48
|
};
|
|
@@ -112,8 +88,6 @@ export const copilotCli = {
|
|
|
112
88
|
name: 'copilot-cli',
|
|
113
89
|
displayName: 'GitHub Copilot CLI',
|
|
114
90
|
detect: () => hasBinary('copilot'),
|
|
115
|
-
// Copilot reads repo instructions from `.github/copilot-instructions.md`; the
|
|
116
|
-
// user-level twin lives beside its own config, not in `.github/`.
|
|
117
91
|
instructionSurface: {
|
|
118
92
|
kind: 'instructions-file',
|
|
119
93
|
global: join(homedir(), '.config', 'github-copilot', 'copilot-instructions.md'),
|
|
@@ -124,6 +98,7 @@ export const copilotCli = {
|
|
|
124
98
|
local: LOCAL_PATH,
|
|
125
99
|
global: GLOBAL_PATH,
|
|
126
100
|
},
|
|
101
|
+
injectsIdentity: true,
|
|
127
102
|
codec: envFileCodec,
|
|
128
103
|
managedEnvKeys: MANAGED_ENV_KEYS,
|
|
129
104
|
hierarchy: HIERARCHY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-cli.js","sourceRoot":"","sources":["../../src/adapters/copilot-cli.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,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"copilot-cli.js","sourceRoot":"","sources":["../../src/adapters/copilot-cli.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,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAiC1D,MAAM,YAAY,GAAG,0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