@codetelemetry/mcp 0.3.7 → 0.3.9
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 +100 -11
- package/dist/src/client/agent.d.ts +20 -0
- package/dist/src/client/agent.js +20 -0
- package/dist/src/client/config.d.ts +2 -0
- package/dist/src/client/config.js +2 -0
- package/dist/src/client/deviceClient.js +11 -5
- package/dist/src/client/plan.d.ts +53 -0
- package/dist/src/client/plan.js +112 -0
- package/dist/src/session.d.ts +7 -0
- package/dist/src/session.js +27 -0
- package/dist/src/tools.d.ts +11 -0
- package/dist/src/tools.js +454 -28
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +5 -5
- package/tool-manifest.json +191 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codetelemetry/mcp",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "CodeTelemetry MCP server — lets a coding agent onboard a user end to end: authenticate (device code), obtain an ingest key, write the Claude Code OTEL config, send a test event, and confirm telemetry landed — then search, read, interpret and compare the user's own coding sessions, plan the next one, and size tasks and Linear issues from that history. The plaintext key never enters the model's context.",
|
|
3
|
+
"version": "0.3.9",
|
|
4
|
+
"description": "CodeTelemetry MCP server — lets a coding agent onboard a user end to end: authenticate (device code), obtain an ingest key, write the Claude Code OTEL config, send a test event, and confirm telemetry landed — then search, read, interpret and compare the user's own coding sessions, plan the next one, and size tasks, plans and Linear issues from that history. The plaintext key never enters the model's context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://codetelemetry.com/docs/onboarding/mcp-server",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "node scripts/cleanDist.ts && tsc -p tsconfig.build.json",
|
|
33
|
-
"test": "node --test test/tools.test.ts test/cost.test.ts test/performance.test.ts test/taskSize.test.ts test/estimateLinearIssue.test.ts test/manifest.test.ts test/clientEdgeCases.test.ts",
|
|
34
|
-
"test:protocol": "node --test test/protocol.smoke.ts",
|
|
35
|
-
"test:e2e": "node test/e2e.smoke.ts",
|
|
33
|
+
"test": "node --import ./test/support/isolateHome.ts --test test/tools.test.ts test/cost.test.ts test/performance.test.ts test/taskSize.test.ts test/estimatePlan.test.ts test/estimateLinearIssue.test.ts test/manifest.test.ts test/clientEdgeCases.test.ts",
|
|
34
|
+
"test:protocol": "node --import ./test/support/isolateHome.ts --test test/protocol.smoke.ts",
|
|
35
|
+
"test:e2e": "node --import ./test/support/isolateHome.ts test/e2e.smoke.ts",
|
|
36
36
|
"test:packaged": "node --test test/packaged.smoke.ts",
|
|
37
37
|
"manifest:write": "node scripts/writeManifest.ts",
|
|
38
38
|
"verify:registry": "node scripts/verifyRegistry.ts",
|
package/tool-manifest.json
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"serverName": "codetelemetry",
|
|
3
|
-
"serverVersion": "0.3.
|
|
4
|
-
"registryHash": "
|
|
5
|
-
"toolCount":
|
|
3
|
+
"serverVersion": "0.3.9",
|
|
4
|
+
"registryHash": "cb42092214d900fd605f79977e1251b4b79ed28aae4471d4a224ee1693db021d",
|
|
5
|
+
"toolCount": 21,
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "authenticate",
|
|
9
9
|
"title": "Authenticate (device code)",
|
|
10
|
-
"description": "Begin device-code authentication. Returns a verification URL and a short user code; show them to the human and ask them to approve in a browser, then call auth_status. No password or browser automation is needed.",
|
|
10
|
+
"description": "Begin device-code authentication. Returns a verification URL and a short user code; show them to the human and ask them to approve in a browser, then call auth_status. No password or browser automation is needed. Pass organizationId to connect one of the user's organizations instead of their personal workspace.",
|
|
11
11
|
"inputSchema": {
|
|
12
12
|
"type": "object",
|
|
13
|
-
"properties": {
|
|
13
|
+
"properties": {
|
|
14
|
+
"organizationId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"maxLength": 256,
|
|
18
|
+
"description": "Optional organization id. The approval page pre-selects that organization, and auth_status keeps only a key issued to it. Omit it for the personal workspace, or to let the user choose while approving."
|
|
19
|
+
},
|
|
20
|
+
"workspaceUrl": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"maxLength": 2048,
|
|
24
|
+
"description": "Optional CodeTelemetry server to sign in to (default https://codetelemetry.com). Only https URLs on codetelemetry.com or its subdomains are accepted. It picks the server, not an organization."
|
|
25
|
+
}
|
|
26
|
+
},
|
|
14
27
|
"additionalProperties": false
|
|
15
28
|
}
|
|
16
29
|
},
|
|
@@ -42,7 +55,7 @@
|
|
|
42
55
|
{
|
|
43
56
|
"name": "write_local_config",
|
|
44
57
|
"title": "Write local OTEL config (Claude Code or Codex)",
|
|
45
|
-
"description": "Write the OpenTelemetry exporter config (and the ingest key) into a
|
|
58
|
+
"description": "Write the OpenTelemetry exporter config (and the ingest key) into a local client config — Claude Code's user or current-project settings.json, Codex's active ~/.codex/config.toml (`client: \"codex\"`), or an explicit `path` to another settings.json, settings.local.json or config.toml. Preserves existing settings and backs up the file first. Content telemetry and repository-path observation are separate, explicit opt-ins. Returns the path and the KEYS written (never values).",
|
|
46
59
|
"inputSchema": {
|
|
47
60
|
"type": "object",
|
|
48
61
|
"properties": {
|
|
@@ -62,6 +75,12 @@
|
|
|
62
75
|
],
|
|
63
76
|
"description": "Claude only: user → ~/.claude/settings.json (default); project → ./.claude/settings.json."
|
|
64
77
|
},
|
|
78
|
+
"path": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"maxLength": 1024,
|
|
82
|
+
"description": "Explicit config file, overriding scope and the Codex default: a settings.json or settings.local.json inside a .claude directory (or $CLAUDE_CONFIG_DIR), or with client \"codex\" a config.toml inside a .codex directory (or $CODEX_HOME). A leading ~ is the home directory. Links, network paths and anything but a regular file are refused."
|
|
83
|
+
},
|
|
65
84
|
"enrich": {
|
|
66
85
|
"type": "boolean",
|
|
67
86
|
"description": "Opt in to content telemetry (default false). Claude Code uploads prompt text, tool details/content, and raw API request/response bodies; Codex uploads prompt text. These can contain source code, commands, file contents, secrets, or other sensitive data."
|
|
@@ -102,7 +121,7 @@
|
|
|
102
121
|
{
|
|
103
122
|
"name": "onboard",
|
|
104
123
|
"title": "Onboard (one shot)",
|
|
105
|
-
"description": "Do the whole onboarding in one call: use the session key (or a `key` you pass), write a recognized local
|
|
124
|
+
"description": "Do the whole onboarding in one call: use the session key (or a `key` you pass), write a local client config (the recognized default, or an explicit settings.json, settings.local.json or config.toml `path`), send a test event, and confirm it landed. Content telemetry and repository-path observation are separate, explicit opt-ins. Returns a step-by-step checklist. Run authenticate + auth_status first if you don't already have a key.",
|
|
106
125
|
"inputSchema": {
|
|
107
126
|
"type": "object",
|
|
108
127
|
"properties": {
|
|
@@ -126,6 +145,12 @@
|
|
|
126
145
|
],
|
|
127
146
|
"description": "Claude only: which settings.json to write (default user)."
|
|
128
147
|
},
|
|
148
|
+
"path": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1,
|
|
151
|
+
"maxLength": 1024,
|
|
152
|
+
"description": "Explicit config file, overriding scope and the Codex default: a settings.json or settings.local.json inside a .claude directory (or $CLAUDE_CONFIG_DIR), or with client \"codex\" a config.toml inside a .codex directory (or $CODEX_HOME). A leading ~ is the home directory. Links, network paths and anything but a regular file are refused."
|
|
153
|
+
},
|
|
129
154
|
"enrich": {
|
|
130
155
|
"type": "boolean",
|
|
131
156
|
"description": "Opt in to content telemetry (default false). Claude Code uploads prompt text, tool details/content, and raw API request/response bodies; Codex uploads prompt text. These can contain source code, commands, file contents, secrets, or other sensitive data."
|
|
@@ -145,7 +170,7 @@
|
|
|
145
170
|
{
|
|
146
171
|
"name": "status",
|
|
147
172
|
"title": "Onboarding status",
|
|
148
|
-
"description": "Read-only diagnostics for a recognized
|
|
173
|
+
"description": "Read-only diagnostics for a client config (the recognized default, or an explicit settings.json, settings.local.json or config.toml `path`): whether a key is held (masked), whether that config has the OTEL settings, the organization requested and attested, the resolved endpoints, any pending authorization, and `server` — the MCP build and tool-inventory hash. No secrets.",
|
|
149
174
|
"inputSchema": {
|
|
150
175
|
"type": "object",
|
|
151
176
|
"properties": {
|
|
@@ -164,6 +189,12 @@
|
|
|
164
189
|
"project"
|
|
165
190
|
],
|
|
166
191
|
"description": "Claude only: which settings.json to inspect (default user)."
|
|
192
|
+
},
|
|
193
|
+
"path": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 1,
|
|
196
|
+
"maxLength": 1024,
|
|
197
|
+
"description": "Explicit config file, overriding scope and the Codex default: a settings.json or settings.local.json inside a .claude directory (or $CLAUDE_CONFIG_DIR), or with client \"codex\" a config.toml inside a .codex directory (or $CODEX_HOME). A leading ~ is the home directory. Links, network paths and anything but a regular file are refused."
|
|
167
198
|
}
|
|
168
199
|
},
|
|
169
200
|
"additionalProperties": false
|
|
@@ -695,6 +726,91 @@
|
|
|
695
726
|
"additionalProperties": false
|
|
696
727
|
}
|
|
697
728
|
},
|
|
729
|
+
{
|
|
730
|
+
"name": "estimate_plan",
|
|
731
|
+
"title": "T-shirt size a Claude Code / Codex plan",
|
|
732
|
+
"description": "Estimate the effort of a plan a coding assistant proposed — t-shirt size, predicted token range, and confidence — from YOUR similar past coding sessions. Submit the plan content explicitly as `planText` and/or ordered `steps`; the server cannot read the agent's hidden state, so whatever you don't pass isn't sized. The plan is sized as ONE unit: submitted step boundaries are preserved in `source` for provenance, but the estimate is never the sum of independently sized steps. The number predicts CODING-ASSISTANT TOKEN EFFORT, not elapsed time or human engineering hours. When the matched history is weak or contradictory the result is low confidence and carries a small calibration task instead of a falsely precise number. Read-only: it never edits the plan, creates issues, or starts work.",
|
|
733
|
+
"inputSchema": {
|
|
734
|
+
"type": "object",
|
|
735
|
+
"properties": {
|
|
736
|
+
"planText": {
|
|
737
|
+
"type": "string",
|
|
738
|
+
"minLength": 1,
|
|
739
|
+
"maxLength": 4000,
|
|
740
|
+
"description": "The plan as plain text. Combined with `steps` when both are given."
|
|
741
|
+
},
|
|
742
|
+
"steps": {
|
|
743
|
+
"type": "array",
|
|
744
|
+
"maxItems": 50,
|
|
745
|
+
"description": "Ordered plan steps. Each item is a string (the step's detail) or an object { title?, detail? }. Order is preserved in the result's source metadata.",
|
|
746
|
+
"items": {
|
|
747
|
+
"oneOf": [
|
|
748
|
+
{
|
|
749
|
+
"type": "string",
|
|
750
|
+
"minLength": 1,
|
|
751
|
+
"maxLength": 4000
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"type": "object",
|
|
755
|
+
"properties": {
|
|
756
|
+
"title": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"maxLength": 300
|
|
759
|
+
},
|
|
760
|
+
"detail": {
|
|
761
|
+
"type": "string",
|
|
762
|
+
"maxLength": 4000
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
"additionalProperties": false
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"title": {
|
|
771
|
+
"type": "string",
|
|
772
|
+
"maxLength": 300,
|
|
773
|
+
"description": "Optional plan title, used as the leading line of the sized text."
|
|
774
|
+
},
|
|
775
|
+
"repo": {
|
|
776
|
+
"type": "string",
|
|
777
|
+
"maxLength": 200,
|
|
778
|
+
"description": "Repo the work will land in, when known. Selects that repo's calibrated ladder if one exists."
|
|
779
|
+
},
|
|
780
|
+
"project": {
|
|
781
|
+
"type": "string",
|
|
782
|
+
"maxLength": 200,
|
|
783
|
+
"description": "Optional project/product grouping. Recorded as context; does not change the estimate."
|
|
784
|
+
},
|
|
785
|
+
"provider": {
|
|
786
|
+
"type": "string",
|
|
787
|
+
"enum": [
|
|
788
|
+
"claude",
|
|
789
|
+
"codex"
|
|
790
|
+
],
|
|
791
|
+
"description": "Which coding assistant produced the plan (claude or codex). Recorded as context; does not change the estimate."
|
|
792
|
+
},
|
|
793
|
+
"model": {
|
|
794
|
+
"type": "string",
|
|
795
|
+
"maxLength": 120,
|
|
796
|
+
"description": "Model id the caller knows produced the plan. Recorded as context; does not change the estimate."
|
|
797
|
+
},
|
|
798
|
+
"lookbackDays": {
|
|
799
|
+
"type": "integer",
|
|
800
|
+
"minimum": 1,
|
|
801
|
+
"maximum": 365,
|
|
802
|
+
"description": "History window to size against (default 90 days)."
|
|
803
|
+
},
|
|
804
|
+
"limit": {
|
|
805
|
+
"type": "integer",
|
|
806
|
+
"minimum": 1,
|
|
807
|
+
"maximum": 5000,
|
|
808
|
+
"description": "Maximum historical sessions to load (default 1000)."
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"additionalProperties": false
|
|
812
|
+
}
|
|
813
|
+
},
|
|
698
814
|
{
|
|
699
815
|
"name": "estimate_linear_issue",
|
|
700
816
|
"title": "T-shirt size an existing Linear issue",
|
|
@@ -755,6 +871,73 @@
|
|
|
755
871
|
],
|
|
756
872
|
"additionalProperties": false
|
|
757
873
|
}
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"name": "get_github_pr_gate",
|
|
877
|
+
"title": "Read the GitHub PR gate",
|
|
878
|
+
"description": "Use this when the user wants to set up, check, or understand their CodeTelemetry GitHub PR gate: a required GitHub check that blocks a pull request whose coding session did not meet the workspace's validation policy. Returns the gate exactly as its settings page shows it: the policy (enabled, minScore, missingScore, complexityAware, requireTestBeforePush), the trusted repositories, the GitHub Actions workflow file to commit (actions.workflow.path and its exact content), the check to require (actions.requiredCheck), nextSteps still outstanding, and recent decisions. Setup needs no GitHub token or secret: the workflow authenticates to CodeTelemetry with the OIDC token GitHub mints for each run. Read-only.",
|
|
879
|
+
"inputSchema": {
|
|
880
|
+
"type": "object",
|
|
881
|
+
"properties": {},
|
|
882
|
+
"additionalProperties": false
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "configure_github_pr_gate",
|
|
887
|
+
"title": "Configure the GitHub PR gate",
|
|
888
|
+
"description": "Use this when the user asks to set up or change their CodeTelemetry GitHub PR gate. Change only what they asked for. addRepositories / removeRepositories take owner/repo, owner/* (every repository of that owner), or a github.com URL; the repository you are working in is usually the one to add. Policy: minScore (0-100), missingScore (pass lets a PR with no session or no score through; fail blocks it), complexityAware (simple work needs a lower score), requireTestBeforePush, and enabled. Enabling needs at least one trusted repository. Once the gate is enabled, a change that loosens it (turning it off, lowering minScore, missingScore fail to pass, turning complexityAware on, dropping requireTestBeforePush) is refused with requires_dashboard: the gate judges your own work, so the user makes that change on the settings page. Returns the updated gate. GitHub enforces nothing until the workflow in gate.actions.workflow is committed to each trusted repository's default branch and the check in gate.actions.requiredCheck is required there; howTo says how.",
|
|
889
|
+
"inputSchema": {
|
|
890
|
+
"type": "object",
|
|
891
|
+
"properties": {
|
|
892
|
+
"addRepositories": {
|
|
893
|
+
"type": "array",
|
|
894
|
+
"maxItems": 20,
|
|
895
|
+
"items": {
|
|
896
|
+
"type": "string",
|
|
897
|
+
"minLength": 3,
|
|
898
|
+
"maxLength": 300
|
|
899
|
+
},
|
|
900
|
+
"description": "Repositories to trust: owner/repo, owner/*, or a github.com repository URL."
|
|
901
|
+
},
|
|
902
|
+
"removeRepositories": {
|
|
903
|
+
"type": "array",
|
|
904
|
+
"maxItems": 20,
|
|
905
|
+
"items": {
|
|
906
|
+
"type": "string",
|
|
907
|
+
"minLength": 3,
|
|
908
|
+
"maxLength": 300
|
|
909
|
+
},
|
|
910
|
+
"description": "Repositories to stop trusting. Their checks are then refused, which blocks rather than passes."
|
|
911
|
+
},
|
|
912
|
+
"enabled": {
|
|
913
|
+
"type": "boolean",
|
|
914
|
+
"description": "Turn the gate on. Turning it off is a loosening: the user does that on the settings page."
|
|
915
|
+
},
|
|
916
|
+
"minScore": {
|
|
917
|
+
"type": "integer",
|
|
918
|
+
"minimum": 0,
|
|
919
|
+
"maximum": 100,
|
|
920
|
+
"description": "The validation score a PR's session must reach (default 70)."
|
|
921
|
+
},
|
|
922
|
+
"missingScore": {
|
|
923
|
+
"type": "string",
|
|
924
|
+
"enum": [
|
|
925
|
+
"pass",
|
|
926
|
+
"fail"
|
|
927
|
+
],
|
|
928
|
+
"description": "What happens when no session or no score can be found for a PR (default pass)."
|
|
929
|
+
},
|
|
930
|
+
"complexityAware": {
|
|
931
|
+
"type": "boolean",
|
|
932
|
+
"description": "Trivial work always passes and low-complexity work needs half the score."
|
|
933
|
+
},
|
|
934
|
+
"requireTestBeforePush": {
|
|
935
|
+
"type": "boolean",
|
|
936
|
+
"description": "Every linked session must pass its required checks after its final edit and before pushing."
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"additionalProperties": false
|
|
940
|
+
}
|
|
758
941
|
}
|
|
759
942
|
]
|
|
760
943
|
}
|