@codetelemetry/mcp 0.6.0 → 0.8.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 +78 -7
- package/dist/src/client/cli.js +177 -4
- package/dist/src/client/import/browser.d.ts +8 -0
- package/dist/src/client/import/browser.js +83 -47
- package/dist/src/client/import/convert.d.ts +3 -3
- package/dist/src/client/import/convert.js +15 -4
- package/dist/src/client/import/core.d.ts +23 -3
- package/dist/src/client/import/core.js +78 -9
- package/dist/src/client/import/estimate.d.ts +87 -0
- package/dist/src/client/import/estimate.js +187 -0
- package/dist/src/client/import/identity.d.ts +25 -0
- package/dist/src/client/import/identity.js +118 -0
- package/dist/src/client/import/model.d.ts +18 -0
- package/dist/src/client/import/model.js +127 -0
- package/dist/src/client/import/run.d.ts +15 -2
- package/dist/src/client/import/run.js +80 -2
- package/dist/src/client/import/sources/claudeCodeText.js +2 -2
- package/dist/src/client/import/sources/codexText.js +28 -2
- package/dist/src/client/import/sources/files.d.ts +5 -1
- package/dist/src/client/import/sources/files.js +23 -2
- package/dist/src/client/import/transport.d.ts +10 -0
- package/dist/src/client/import/transport.js +26 -0
- package/dist/src/client/index.d.ts +3 -1
- package/dist/src/client/index.js +3 -1
- package/dist/src/client/repositoryHook.js +6 -1
- package/dist/src/client/repositoryOrigin.d.ts +1 -0
- package/dist/src/client/repositoryOrigin.js +13 -0
- package/dist/src/client/rolloutRepository.d.ts +29 -0
- package/dist/src/client/rolloutRepository.js +84 -0
- package/dist/src/client/workspaceImport.js +4 -2
- package/dist/src/client/workspaces.d.ts +1 -1
- package/dist/src/client/workspaces.js +3 -1
- package/dist/src/tools.d.ts +5 -0
- package/dist/src/tools.js +90 -9
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +9 -1
- package/tool-manifest.json +75 -7
package/tool-manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"serverName": "codetelemetry",
|
|
3
|
-
"serverVersion": "0.
|
|
4
|
-
"registryHash": "
|
|
5
|
-
"toolCount":
|
|
3
|
+
"serverVersion": "0.8.0",
|
|
4
|
+
"registryHash": "fa9df3510d2a587d1fc17339fcca4436662e7954c2c7867d37523cffa759f0c4",
|
|
5
|
+
"toolCount": 35,
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "discover_grader_checks",
|
|
@@ -551,6 +551,18 @@
|
|
|
551
551
|
"maximum": 31536000000,
|
|
552
552
|
"description": "Inclusive maximum elapsed session span in milliseconds."
|
|
553
553
|
},
|
|
554
|
+
"start": {
|
|
555
|
+
"type": "integer",
|
|
556
|
+
"minimum": 0,
|
|
557
|
+
"maximum": 253402300799,
|
|
558
|
+
"description": "Only sessions last active at or after this time, in Unix seconds."
|
|
559
|
+
},
|
|
560
|
+
"end": {
|
|
561
|
+
"type": "integer",
|
|
562
|
+
"minimum": 0,
|
|
563
|
+
"maximum": 253402300799,
|
|
564
|
+
"description": "Only sessions last active before this time, in Unix seconds (after start)."
|
|
565
|
+
},
|
|
554
566
|
"activity": {
|
|
555
567
|
"type": "string",
|
|
556
568
|
"enum": [
|
|
@@ -1364,7 +1376,7 @@
|
|
|
1364
1376
|
},
|
|
1365
1377
|
"beforePush": {
|
|
1366
1378
|
"type": "boolean",
|
|
1367
|
-
"description": "Require successful command evidence after the final edit and before pushing;
|
|
1379
|
+
"description": "Require successful command evidence after the final edit and before pushing; the service accepts it only when matcherRule.include names the commands: one exactFingerprint equals/in condition, or all of source equals shell, executable equals/in and packageScript equals/in (each optionally with one repositoryRelativeWorkingDirectory equals condition). Broader matchers are refused."
|
|
1368
1380
|
},
|
|
1369
1381
|
"matcherRule": {
|
|
1370
1382
|
"type": "object",
|
|
@@ -1480,6 +1492,19 @@
|
|
|
1480
1492
|
"additionalProperties": false
|
|
1481
1493
|
}
|
|
1482
1494
|
},
|
|
1495
|
+
"issues": {
|
|
1496
|
+
"type": "array",
|
|
1497
|
+
"minItems": 1,
|
|
1498
|
+
"maxItems": 20,
|
|
1499
|
+
"uniqueItems": true,
|
|
1500
|
+
"items": {
|
|
1501
|
+
"type": "string",
|
|
1502
|
+
"minLength": 3,
|
|
1503
|
+
"maxLength": 220,
|
|
1504
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,38}/[a-z0-9._-]{1,100}#[1-9][0-9]{0,9}$"
|
|
1505
|
+
},
|
|
1506
|
+
"description": "Task scope: the GitHub issues (lowercase owner/repo#number) this check is required for. It applies only when the pull request being judged closes one of them, as GitHub reports it, and adds to organization and repository checks; it never applies outside a pull request. Issue and PR text never select it."
|
|
1507
|
+
},
|
|
1483
1508
|
"linkage": {
|
|
1484
1509
|
"type": "string",
|
|
1485
1510
|
"enum": [
|
|
@@ -1534,7 +1559,7 @@
|
|
|
1534
1559
|
{
|
|
1535
1560
|
"name": "update_grader_config",
|
|
1536
1561
|
"title": "Update the Grader draft",
|
|
1537
|
-
"description": "Save selected instruction/skill-derived checks to the authenticated workspace's Grader draft. features records which instruction features the user wants graded. Use seed_grader_config to inspect sources, then get_grader_config to obtain expectedRevision. upsertChecks add or update by id, preserving unmentioned checks; removeCheckIds removes only named checks. Checks use the dashboard's ValidationCheck shape and deterministic matcherRule (source, executable, packageScript, normalizedArguments, toolNamespace/toolName, operation, workingDirectory, etc.). For example, a skill check can require source=agent_tool, toolName=Skill, and operation=<skill name>; do not equate invoking a skill with complying with all its prose. Match only observable evidence, keep rationale/source in description, and apply repositoryId/environment scope when appropriate. The backend validates checks and refuses stale revisions with conflict; read again before retrying any uncertain save. After saving, use write_grader_config_artifact to leave selected checks as Terraform or Pulumi when requested. This saves a draft; use publish_grader_config with the returned revision to apply it when the user wants publication.",
|
|
1562
|
+
"description": "Save selected instruction/skill-derived checks to the authenticated workspace's Grader draft. features records which instruction features the user wants graded. Use seed_grader_config to inspect sources, then get_grader_config to obtain expectedRevision. upsertChecks add or update by id, preserving unmentioned checks; removeCheckIds removes only named checks. Checks use the dashboard's ValidationCheck shape and deterministic matcherRule (source, executable, packageScript, normalizedArguments, toolNamespace/toolName, operation, workingDirectory, etc.). For example, a skill check can require source=agent_tool, toolName=Skill, and operation=<skill name>; do not equate invoking a skill with complying with all its prose. Match only observable evidence, keep rationale/source in description, and apply repositoryId/environment scope when appropriate. Use issues for checks that only one GitHub issue's pull request must pass (task scope). The backend validates checks and refuses stale revisions with conflict; read again before retrying any uncertain save. After saving, use write_grader_config_artifact to leave selected checks as Terraform or Pulumi when requested. This saves a draft; use publish_grader_config with the returned revision to apply it when the user wants publication.",
|
|
1538
1563
|
"inputSchema": {
|
|
1539
1564
|
"type": "object",
|
|
1540
1565
|
"properties": {
|
|
@@ -1626,7 +1651,7 @@
|
|
|
1626
1651
|
},
|
|
1627
1652
|
"beforePush": {
|
|
1628
1653
|
"type": "boolean",
|
|
1629
|
-
"description": "Require successful command evidence after the final edit and before pushing;
|
|
1654
|
+
"description": "Require successful command evidence after the final edit and before pushing; the service accepts it only when matcherRule.include names the commands: one exactFingerprint equals/in condition, or all of source equals shell, executable equals/in and packageScript equals/in (each optionally with one repositoryRelativeWorkingDirectory equals condition). Broader matchers are refused."
|
|
1630
1655
|
},
|
|
1631
1656
|
"matcherRule": {
|
|
1632
1657
|
"type": "object",
|
|
@@ -1742,6 +1767,19 @@
|
|
|
1742
1767
|
"additionalProperties": false
|
|
1743
1768
|
}
|
|
1744
1769
|
},
|
|
1770
|
+
"issues": {
|
|
1771
|
+
"type": "array",
|
|
1772
|
+
"minItems": 1,
|
|
1773
|
+
"maxItems": 20,
|
|
1774
|
+
"uniqueItems": true,
|
|
1775
|
+
"items": {
|
|
1776
|
+
"type": "string",
|
|
1777
|
+
"minLength": 3,
|
|
1778
|
+
"maxLength": 220,
|
|
1779
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,38}/[a-z0-9._-]{1,100}#[1-9][0-9]{0,9}$"
|
|
1780
|
+
},
|
|
1781
|
+
"description": "Task scope: the GitHub issues (lowercase owner/repo#number) this check is required for. It applies only when the pull request being judged closes one of them, as GitHub reports it, and adds to organization and repository checks; it never applies outside a pull request. Issue and PR text never select it."
|
|
1782
|
+
},
|
|
1745
1783
|
"linkage": {
|
|
1746
1784
|
"type": "string",
|
|
1747
1785
|
"enum": [
|
|
@@ -1866,10 +1904,36 @@
|
|
|
1866
1904
|
"additionalProperties": false
|
|
1867
1905
|
}
|
|
1868
1906
|
},
|
|
1907
|
+
{
|
|
1908
|
+
"name": "estimate_history",
|
|
1909
|
+
"title": "Estimate past sessions before importing them",
|
|
1910
|
+
"description": "Use this when the user asks what importing their EXISTING local Claude Code or Codex history would cost, or how much history they have. Needs no key and sends nothing: it reads ~/.claude/projects and ~/.codex/sessions on this machine and returns sessions and tokens per source, per UTC month and per day, the oldest and newest session, and the last-30-day pace, priced with CodeTelemetry's public price list when it can be read. Imported tokens are billed like live usage: this month's included seat tokens first, then the per-million price from prepaid credit. Claude Code deletes local transcripts cleanupPeriodDays (default 30) after their last activity, so an older Claude session survives only if it was captured live or its transcript is still on disk; goneForGood says from when. Sessions already captured live are counted here but skipped by an import. To import, call import_history (dry run first).",
|
|
1911
|
+
"inputSchema": {
|
|
1912
|
+
"type": "object",
|
|
1913
|
+
"properties": {
|
|
1914
|
+
"source": {
|
|
1915
|
+
"type": "string",
|
|
1916
|
+
"enum": [
|
|
1917
|
+
"claude-code",
|
|
1918
|
+
"codex",
|
|
1919
|
+
"all"
|
|
1920
|
+
],
|
|
1921
|
+
"description": "Which history to read (default all)."
|
|
1922
|
+
},
|
|
1923
|
+
"sinceDays": {
|
|
1924
|
+
"type": "integer",
|
|
1925
|
+
"minimum": 1,
|
|
1926
|
+
"maximum": 364,
|
|
1927
|
+
"description": "How many days back (default 364, the whole retained year)."
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
"additionalProperties": false
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1869
1933
|
{
|
|
1870
1934
|
"name": "import_history",
|
|
1871
1935
|
"title": "Import past Claude Code / Codex sessions",
|
|
1872
|
-
"description": "Use this when the user wants their EXISTING local Claude Code or Codex history (sessions from before CodeTelemetry was set up) to show in CodeTelemetry. It reads ~/.claude/projects and ~/.codex/sessions on this machine and sends them through the normal ingest under the session's key, tagged as imported. ALWAYS call it first with dryRun true (the default) and show the user the summary — sessions, tokens, what is skipped and the content setting — then ask before calling again with dryRun false. Sessions already captured live or already imported are skipped; an interrupted import resumes. Each call sends at most maxSessions; while `remaining` > 0, call again. A persistent workspace restricts imports to its bound project and coding client; it never falls back to a personal or machine-wide destination. Imported history has tokens, prompts and tool results but no per-request latency, retries, permission decisions or active time. content defaults to live: exactly the prompt / tool text the user's live exporters are configured to send (Claude OTEL_LOG_USER_PROMPTS / OTEL_LOG_TOOL_DETAILS, Codex log_user_prompt); none sends no text; all sends prompt text and tool inputs regardless — only with the user's explicit agreement.",
|
|
1936
|
+
"description": "Use this when the user wants their EXISTING local Claude Code or Codex history (sessions from before CodeTelemetry was set up) to show in CodeTelemetry. It reads ~/.claude/projects and ~/.codex/sessions on this machine and sends them through the normal ingest under the session's key, tagged as imported. ALWAYS call it first with dryRun true (the default) and show the user the summary — sessions, tokens, what is skipped and the content setting — then ask before calling again with dryRun false. Sessions already captured live or already imported are skipped; an interrupted import resumes. Each call sends at most maxSessions; while `remaining` > 0, call again. A persistent workspace restricts imports to its bound project and coding client; it never falls back to a personal or machine-wide destination. Imported history has tokens, prompts and tool results but no per-request latency, retries, permission decisions or active time. Imported tokens are billed like live usage (this month's included seat tokens first, then the per-million price from prepaid credit): when the server reports billing state, `billing` gives the run's estimated cost and whether the credit covers it, and a real import starts no session the credit cannot cover (stoppedBy budget). estimate_history prices the whole local history without a key. Rows carry the signed-in account's identity as live rows do, shown masked in `identity`; identity false omits it. content defaults to live: exactly the prompt / tool text the user's live exporters are configured to send (Claude OTEL_LOG_USER_PROMPTS / OTEL_LOG_TOOL_DETAILS, Codex log_user_prompt); none sends no text; all sends prompt text and tool inputs regardless — only with the user's explicit agreement.",
|
|
1873
1937
|
"inputSchema": {
|
|
1874
1938
|
"type": "object",
|
|
1875
1939
|
"properties": {
|
|
@@ -1912,6 +1976,10 @@
|
|
|
1912
1976
|
"minLength": 1,
|
|
1913
1977
|
"maxLength": 1024,
|
|
1914
1978
|
"description": "Only sessions whose working directory is this path or under it."
|
|
1979
|
+
},
|
|
1980
|
+
"identity": {
|
|
1981
|
+
"type": "boolean",
|
|
1982
|
+
"description": "Stamp the signed-in account's identity on imported rows, as live exporters do (default true; false omits it)."
|
|
1915
1983
|
}
|
|
1916
1984
|
},
|
|
1917
1985
|
"additionalProperties": false
|