@descryy/mcp 0.11.1 → 0.11.2

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.
Files changed (103) hide show
  1. package/dist/render.d.ts +7 -11
  2. package/dist/render.d.ts.map +1 -1
  3. package/dist/render.js +22 -2
  4. package/dist/render.js.map +1 -1
  5. package/dist/server.d.ts.map +1 -1
  6. package/dist/server.js +13 -2
  7. package/dist/server.js.map +1 -1
  8. package/dist/tools/alias-kit.d.ts +29 -0
  9. package/dist/tools/alias-kit.d.ts.map +1 -0
  10. package/dist/tools/alias-kit.js +21 -0
  11. package/dist/tools/alias-kit.js.map +1 -0
  12. package/dist/tools/aliases.d.ts +42 -0
  13. package/dist/tools/aliases.d.ts.map +1 -0
  14. package/dist/tools/aliases.js +52 -0
  15. package/dist/tools/aliases.js.map +1 -0
  16. package/dist/tools/browser-close-session.d.ts +5 -1
  17. package/dist/tools/browser-close-session.d.ts.map +1 -1
  18. package/dist/tools/browser-close-session.js +3 -1
  19. package/dist/tools/browser-close-session.js.map +1 -1
  20. package/dist/tools/browser-navigate.d.ts +5 -1
  21. package/dist/tools/browser-navigate.d.ts.map +1 -1
  22. package/dist/tools/browser-navigate.js +3 -1
  23. package/dist/tools/browser-navigate.js.map +1 -1
  24. package/dist/tools/browser-read.d.ts +33 -0
  25. package/dist/tools/browser-read.d.ts.map +1 -0
  26. package/dist/tools/browser-read.js +113 -0
  27. package/dist/tools/browser-read.js.map +1 -0
  28. package/dist/tools/browser-snapshot.d.ts +5 -2
  29. package/dist/tools/browser-snapshot.d.ts.map +1 -1
  30. package/dist/tools/browser-snapshot.js +3 -1
  31. package/dist/tools/browser-snapshot.js.map +1 -1
  32. package/dist/tools/browser-wait-for.d.ts +5 -1
  33. package/dist/tools/browser-wait-for.d.ts.map +1 -1
  34. package/dist/tools/browser-wait-for.js +3 -1
  35. package/dist/tools/browser-wait-for.js.map +1 -1
  36. package/dist/tools/browser.d.ts +69 -0
  37. package/dist/tools/browser.d.ts.map +1 -0
  38. package/dist/tools/browser.js +377 -0
  39. package/dist/tools/browser.js.map +1 -0
  40. package/dist/tools/change-scope.d.ts +25 -0
  41. package/dist/tools/change-scope.d.ts.map +1 -0
  42. package/dist/tools/change-scope.js +110 -0
  43. package/dist/tools/change-scope.js.map +1 -0
  44. package/dist/tools/code-context.d.ts +83 -0
  45. package/dist/tools/code-context.d.ts.map +1 -0
  46. package/dist/tools/code-context.js +416 -0
  47. package/dist/tools/code-context.js.map +1 -0
  48. package/dist/tools/disclosure.d.ts +75 -0
  49. package/dist/tools/disclosure.d.ts.map +1 -0
  50. package/dist/tools/disclosure.js +288 -0
  51. package/dist/tools/disclosure.js.map +1 -0
  52. package/dist/tools/draw-conclusion.d.ts +12 -1
  53. package/dist/tools/draw-conclusion.d.ts.map +1 -1
  54. package/dist/tools/draw-conclusion.js +11 -2
  55. package/dist/tools/draw-conclusion.js.map +1 -1
  56. package/dist/tools/git-context.d.ts +39 -0
  57. package/dist/tools/git-context.d.ts.map +1 -0
  58. package/dist/tools/git-context.js +364 -0
  59. package/dist/tools/git-context.js.map +1 -0
  60. package/dist/tools/index.d.ts +15 -6
  61. package/dist/tools/index.d.ts.map +1 -1
  62. package/dist/tools/index.js +41 -67
  63. package/dist/tools/index.js.map +1 -1
  64. package/dist/tools/kit.d.ts +3 -2
  65. package/dist/tools/kit.d.ts.map +1 -1
  66. package/dist/tools/kit.js.map +1 -1
  67. package/dist/tools/merged-browser.d.ts +11 -0
  68. package/dist/tools/merged-browser.d.ts.map +1 -0
  69. package/dist/tools/merged-browser.js +20 -0
  70. package/dist/tools/merged-browser.js.map +1 -0
  71. package/dist/tools/merged-context.d.ts +11 -0
  72. package/dist/tools/merged-context.d.ts.map +1 -0
  73. package/dist/tools/merged-context.js +21 -0
  74. package/dist/tools/merged-context.js.map +1 -0
  75. package/dist/tools/merged-observe.d.ts +13 -0
  76. package/dist/tools/merged-observe.d.ts.map +1 -0
  77. package/dist/tools/merged-observe.js +21 -0
  78. package/dist/tools/merged-observe.js.map +1 -0
  79. package/dist/tools/merged-workspace.d.ts +14 -0
  80. package/dist/tools/merged-workspace.d.ts.map +1 -0
  81. package/dist/tools/merged-workspace.js +21 -0
  82. package/dist/tools/merged-workspace.js.map +1 -0
  83. package/dist/tools/observe-runtime.d.ts +11 -1
  84. package/dist/tools/observe-runtime.d.ts.map +1 -1
  85. package/dist/tools/observe-runtime.js +6 -2
  86. package/dist/tools/observe-runtime.js.map +1 -1
  87. package/dist/tools/observe-tests.d.ts +12 -1
  88. package/dist/tools/observe-tests.d.ts.map +1 -1
  89. package/dist/tools/observe-tests.js +6 -2
  90. package/dist/tools/observe-tests.js.map +1 -1
  91. package/dist/tools/observe.d.ts +28 -0
  92. package/dist/tools/observe.d.ts.map +1 -0
  93. package/dist/tools/observe.js +285 -0
  94. package/dist/tools/observe.js.map +1 -0
  95. package/dist/tools/verb.d.ts +46 -0
  96. package/dist/tools/verb.d.ts.map +1 -0
  97. package/dist/tools/verb.js +78 -0
  98. package/dist/tools/verb.js.map +1 -0
  99. package/dist/tools/workspace.d.ts +28 -0
  100. package/dist/tools/workspace.d.ts.map +1 -0
  101. package/dist/tools/workspace.js +101 -0
  102. package/dist/tools/workspace.js.map +1 -0
  103. package/package.json +3 -3
@@ -0,0 +1,101 @@
1
+ /**
2
+ * `workspace` — merges `analyze`, `analyze_workspace` and `link_workspace`
3
+ * behind one `verb` (documents/plans/mcp-surface-consolidation.md §2, group 1).
4
+ * All three are `stateful-read`/`evidence`, so the merge crosses neither
5
+ * boundary.
6
+ *
7
+ * Dispatch only. Each verb's own `run()` body is untouched and stays in its
8
+ * own module (`analyze.ts` / `analyze-workspace.ts` / `link-workspace.ts`) —
9
+ * this file never holds a second copy of that logic, it only routes to it
10
+ * after `selectVerb` has re-established, per verb, the argument strength a
11
+ * flat union schema loses (`verb.ts`'s own header explains why that is
12
+ * mandatory once a schema covers more than one verb).
13
+ */
14
+ import { selectVerb } from "./verb.js";
15
+ import { analyzeTool } from "./analyze.js";
16
+ import { analyzeWorkspaceTool } from "./analyze-workspace.js";
17
+ import { linkWorkspaceTool } from "./link-workspace.js";
18
+ const VERBS = ["analyze", "index", "link"];
19
+ const VERB_SPECS = [
20
+ { verb: "analyze", accepts: ["includeHistory", "maxCommits", "reload"] },
21
+ { verb: "index", accepts: ["includeHistory", "maxCommits"] },
22
+ { verb: "link", accepts: ["workspace", "repos"] },
23
+ ];
24
+ const SCHEMA = {
25
+ type: "object",
26
+ properties: {
27
+ verb: {
28
+ type: "string",
29
+ enum: [...VERBS],
30
+ description: '"analyze" — read this repository into the code graph. "index" — read every repository a ' +
31
+ 'prior "link" declared into one shared graph. "link" — declare which repositories share a ' +
32
+ "workspace.",
33
+ },
34
+ includeHistory: {
35
+ type: "boolean",
36
+ description: "analyze/index. Read git history for co-change coupling. Default true.",
37
+ },
38
+ maxCommits: {
39
+ type: "integer",
40
+ minimum: 1,
41
+ description: "analyze/index. Cap on commits read from history. Default 2000.",
42
+ },
43
+ reload: {
44
+ type: "boolean",
45
+ description: "analyze only. Re-read .descry/config.json from disk before this run, instead of the " +
46
+ "configuration this server started with.",
47
+ },
48
+ workspace: {
49
+ type: "string",
50
+ description: 'link only. The workspace id to write into every repository in "repos", byte-identical.',
51
+ },
52
+ repos: {
53
+ type: "array",
54
+ minItems: 2,
55
+ items: {
56
+ type: "object",
57
+ properties: {
58
+ path: { type: "string", description: "Absolute path to the repository on disk." },
59
+ repo: { type: "string", description: "This repository's identity, written explicitly." },
60
+ },
61
+ required: ["path", "repo"],
62
+ additionalProperties: false,
63
+ },
64
+ description: "link only. Every repository that should share this workspace, including the current one " +
65
+ "if it should join. Only ones the user has explicitly confirmed belong together — never " +
66
+ "inferred.",
67
+ },
68
+ },
69
+ required: ["verb"],
70
+ additionalProperties: false,
71
+ };
72
+ const DISPATCH = {
73
+ analyze: analyzeTool,
74
+ index: analyzeWorkspaceTool,
75
+ link: linkWorkspaceTool,
76
+ };
77
+ async function run(args, ctx) {
78
+ const verb = selectVerb(args, "verb", VERB_SPECS);
79
+ // `ToolDefinition` erases its answer's type parameter — it has to, the
80
+ // registry is one array of many shapes — so the delegated call comes back as
81
+ // an erased answer type. The verb table is what makes the union true: every
82
+ // entry's own `run` is declared against one of WorkspaceData's members, and a verb
83
+ // added without its shape stops compiling at the union. The assertion
84
+ // re-applies what the table already guarantees rather than asserting
85
+ // something unchecked.
86
+ return (await DISPATCH[verb].run(args, ctx));
87
+ }
88
+ export const workspaceTool = {
89
+ name: "workspace",
90
+ class: "stateful-read",
91
+ tier: "evidence",
92
+ version: "1.0.0",
93
+ title: "Analyse a repository or workspace into the code graph",
94
+ description: "Read source into the code graph, or declare which repositories share a workspace, by verb: " +
95
+ '"analyze" (one repository, with its configured adapters), "index" (every repository a prior ' +
96
+ '"link" call declared, into one shared graph), "link" (write a workspace id into each named ' +
97
+ "repository's config — only after the user has explicitly confirmed they belong together).",
98
+ inputSchema: SCHEMA,
99
+ run,
100
+ };
101
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/tools/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAkBxD,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAGpD,MAAM,UAAU,GAA8B;IAC5C,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE;IACxE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAA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EAAE,iBAAiB;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,CAAC,IAA6B,EAAE,GAAgB;IAChE,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAClD,uEAAuE;IACvE,6EAA6E;IAC7E,4EAA4E;IAC5E,mFAAmF;IACnF,sEAAsE;IACtE,qEAAqE;IACrE,uBAAuB;IACvB,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAA8B,CAAC;AAC5E,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,uDAAuD;IAC9D,WAAW,EACT,6FAA6F;QAC7F,8FAA8F;QAC9F,6FAA6F;QAC7F,2FAA2F;IAC7F,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@descryy/mcp",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "type": "module",
5
- "description": "Descry's MCP server: the agent-facing front door over the query layer. The stdio transport is JSON-RPC 2.0 by hand rather than seventeen packages of HTTP and OAuth. Thirty-eight tools; most read the graph and nothing else. The @descryy dependencies are here for the three that do more: observe_runtime boots or attaches to a real application, observe_tests runs the project's own test suite, and the browser tools drive a real browser — each writing what it witnessed into the graph as R4 facts. @descryy/runtime-browser is declared below like the others. It is still imported by specifier at call time rather than statically — not because it is unpublished (it is not) but because that indirection is an injection seam real tests use to drive the settle logic against a fake module with no real browser involved; see playwright-driver.ts. A missing package, a missing Chromium binary, or an import failure each still returns a named, remediable refusal rather than a crash or an empty result.",
5
+ "description": "Descry's MCP server: the agent-facing front door over the query layer. The stdio transport is JSON-RPC 2.0 by hand rather than seventeen packages of HTTP and OAuth. Twenty tools; most read the graph and nothing else. The @descryy dependencies are here for the three that do more: observe_runtime boots or attaches to a real application, observe_tests runs the project's own test suite, and the browser tools drive a real browser — each writing what it witnessed into the graph as R4 facts. @descryy/runtime-browser is declared below like the others. It is still imported by specifier at call time rather than statically — not because it is unpublished (it is not) but because that indirection is an injection seam real tests use to drive the settle logic against a fake module with no real browser involved; see playwright-driver.ts. A missing package, a missing Chromium binary, or an import failure each still returns a named, remediable refusal rather than a crash or an empty result.",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  "build": "tsc -b"
37
37
  },
38
38
  "dependencies": {
39
- "@descryy/core": "0.9.0",
39
+ "@descryy/core": "0.8.0",
40
40
  "@descryy/ir": "0.10.0",
41
41
  "@descryy/runtime-backend-observation": "0.3.5",
42
42
  "@descryy/runtime-browser": "0.4.6",