@bendyline/gezel-mcp 0.1.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/server.js +31 -7
  2. package/package.json +4 -4
package/dist/server.js CHANGED
@@ -10,6 +10,8 @@ import {
10
10
  GEZEL_VERSION,
11
11
  ModelTierSchema,
12
12
  NewCraftbookStepSchema,
13
+ NpmPackageNameSchema,
14
+ NpmRegistryVersionSchema,
13
15
  ProviderNameSchema,
14
16
  StepGateUnionSchema,
15
17
  TaskRefSchema,
@@ -21,7 +23,9 @@ import {
21
23
  craftbookDocFormatFromEnv,
22
24
  deliverableStep,
23
25
  expandStepDeliverable,
26
+ formatReviewProvenance,
24
27
  inferDeliverableKind,
28
+ isReservedShadowArtifactPath,
25
29
  isTrustedConstrainedToolset,
26
30
  pickRandomNameWithGender,
27
31
  removeStepAndCleanEdges,
@@ -4205,8 +4209,10 @@ server.tool(
4205
4209
  {
4206
4210
  packages: z5.array(
4207
4211
  z5.object({
4208
- package: z5.string().describe('Package name (e.g. "zod", "@types/node").'),
4209
- version: z5.string().optional().describe('Semver range or exact version (e.g. "^3", "3.22.4"). Defaults to "latest".')
4212
+ package: NpmPackageNameSchema.describe('Package name (e.g. "zod", "@types/node").'),
4213
+ version: NpmRegistryVersionSchema.optional().describe(
4214
+ 'Semver range or exact version (e.g. "^3", "3.22.4"). Defaults to "latest".'
4215
+ )
4210
4216
  })
4211
4217
  ).min(1).describe(
4212
4218
  "Every package you want installed, in ONE call. Combine as many as you can \u2014 batching is cheap on our side and saves the user a click per package. Only call this tool a second time if you discover a new dependency after already running code."
@@ -4291,7 +4297,7 @@ ${lines.join("\n")}` : `${summary} Add some, or use \`run_npx\` for a locally in
4291
4297
  );
4292
4298
  server.tool(
4293
4299
  "run_package_script",
4294
- "Run a `package.json` script (equivalent to `npm run <script>` / `pnpm run <script>`). Use this to build, test, lint, typecheck \u2014 anything the project already has wired up. NOT for the named project scripts `list_scripts` shows (craftbook-installed probes/ops) \u2014 run those via `run_installed_script`. Call `list_package_scripts` first if you don't know what's available. First-time invocations of a given script trigger a user approval prompt; once approved the decision sticks. SECURITY: unlike `run_nodejs_script`, package commands are not an isolation boundary. They run as the user's OS account and may spawn processes, use the network, and read or modify files outside the project. The approval dialog shows this warning and the exact command body.",
4300
+ "Run a `package.json` script (equivalent to `npm run <script>` / `pnpm run <script>`). Use this to build, test, lint, typecheck \u2014 anything the project already has wired up. NOT for the named project scripts `list_scripts` shows (craftbook-installed probes/ops) \u2014 run those via `run_installed_script`. Call `list_package_scripts` first if you don't know what's available. First-time invocations of a given script trigger a user approval prompt; the approval remains valid only while the exact invocation and identifiable local input files are unchanged. SECURITY: unlike `run_nodejs_script`, package commands are not an isolation boundary. They run as the user's OS account and may spawn processes, use the network, and read or modify files outside the project. The approval dialog shows this warning and the exact command body.",
4295
4301
  {
4296
4302
  script: z5.string().describe('Script name \u2014 a key of `package.json#scripts` (e.g. "build").'),
4297
4303
  args: coerceStringArray(
@@ -4316,7 +4322,7 @@ server.tool(
4316
4322
  );
4317
4323
  server.tool(
4318
4324
  "run_npx",
4319
- "Run a binary that a project dependency already provides (equivalent to `npx <bin> [args]`). The binary must exist in the workspace's `node_modules/.bin` or be a declared dep \u2014 unknown binaries are rejected, no auto-download. NOT for the named project scripts `list_scripts` shows \u2014 run those via `run_installed_script`. First-time invocations of a given binary trigger a user approval prompt; once approved the decision sticks. SECURITY: this is a package command, not an isolation boundary. It runs as the user's OS account and may spawn processes, use the network, and read or modify files outside the project. The approval dialog shows this warning.",
4325
+ "Run a binary that a project dependency already provides (equivalent to `npx <bin> [args]`). The binary must exist in the workspace's `node_modules/.bin` or be a declared dep \u2014 unknown binaries are rejected, no auto-download. NOT for the named project scripts `list_scripts` shows \u2014 run those via `run_installed_script`. First-time invocations of a given binary trigger a user approval prompt; the approval remains valid only while the exact invocation and identifiable local input files are unchanged. SECURITY: this is a package command, not an isolation boundary. It runs as the user's OS account and may spawn processes, use the network, and read or modify files outside the project. The approval dialog shows this warning.",
4320
4326
  {
4321
4327
  bin: z5.string().describe('Binary name (e.g. "tsc", "vitest"). Bare name, not a path.'),
4322
4328
  args: coerceStringArray(z5.array(z5.string()).optional().describe("Args passed to the binary.")),
@@ -5135,6 +5141,17 @@ server.tool(
5135
5141
  },
5136
5142
  async ({ path, content, force }) => {
5137
5143
  const clean = normalizeArtifactPath(path);
5144
+ if (isReservedShadowArtifactPath(clean)) {
5145
+ return {
5146
+ content: [
5147
+ {
5148
+ type: "text",
5149
+ text: "artifacts/shadow/ is gezel's derived shadow-file cache (converted documents, image descriptions, transcripts), regenerated automatically by indexing \u2014 anything written there would be overwritten or swept. Write your artifact elsewhere, e.g. at the artifacts root or under reports/."
5150
+ }
5151
+ ],
5152
+ isError: true
5153
+ };
5154
+ }
5138
5155
  if (isProtectedConnectorArtifactPath(clean)) {
5139
5156
  return {
5140
5157
  content: [
@@ -9873,7 +9890,7 @@ server.tool(
9873
9890
  try {
9874
9891
  const res = await api.toolFileReview(projectId, args);
9875
9892
  if (!res.found || !res.review) {
9876
- const why = res.pending ? "the boekwachter has not reviewed this file yet (it studies files when idle or during Night Shift)" : "file is not in the index";
9893
+ const why = res.eligible === false ? "this file type is not reviewed (no rubric covers its kind \u2014 e.g. data files, caches, media)" : res.pending ? "the boekwachter has not reviewed this file yet (it studies files when idle or during Night Shift)" : "file is not in the index";
9877
9894
  return {
9878
9895
  content: [{ type: "text", text: `file_review: no review \u2014 ${why}.` }]
9879
9896
  };
@@ -9882,13 +9899,15 @@ server.tool(
9882
9899
  const issues = r.issues.map(
9883
9900
  (i) => `[${i.severity}] ${i.category} \u2014 ${i.message}${i.line ? ` (L${i.line})` : ""}`
9884
9901
  );
9902
+ const provenance = formatReviewProvenance(r);
9885
9903
  const text = [
9886
9904
  `${res.path} \u2014 health ${r.health}/10 \u2014 ${r.healthReason}`,
9887
9905
  "",
9888
9906
  r.notesMd,
9889
9907
  "",
9890
9908
  issues.length ? `issues:
9891
- ${issues.join("\n")}` : "issues: none"
9909
+ ${issues.join("\n")}` : "issues: none",
9910
+ ...provenance ? ["", provenance] : []
9892
9911
  ].join("\n");
9893
9912
  return { content: [{ type: "text", text }] };
9894
9913
  } catch (err) {
@@ -10194,12 +10213,17 @@ server.tool(
10194
10213
  (i) => `${i.path}${i.line ? `:${i.line}` : ""} [${i.severity}] ${i.category} \u2014 ${i.message}`
10195
10214
  );
10196
10215
  const tail = res.reviewedFiles < res.eligibleFiles ? "\n(review sweep still in progress \u2014 coverage grows when the machine is idle or during Night Shift)" : "";
10216
+ const reviewers = (res.reviewers ?? []).filter((r) => r.model).map(
10217
+ (r) => `${r.model}${r.provider ? ` (${r.provider})` : ""}${r.gezelName ? ` \xB7 ${r.gezelName}` : ""} \xD7${r.files} file${r.files === 1 ? "" : "s"}`
10218
+ );
10219
+ const reviewerLine = reviewers.length ? `
10220
+ Reviewed by ${reviewers.join(", ")}` : "";
10197
10221
  return {
10198
10222
  content: [
10199
10223
  {
10200
10224
  type: "text",
10201
10225
  text: `${head}
10202
- ${lines.join("\n") || "(none matched)"}${tail}`
10226
+ ${lines.join("\n") || "(none matched)"}${reviewerLine}${tail}`
10203
10227
  }
10204
10228
  ]
10205
10229
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/gezel-mcp",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Gezel MCP server — gives agents access to memory, workspace, artifacts, and tools.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -55,11 +55,11 @@
55
55
  "!dist/**/*.map"
56
56
  ],
57
57
  "dependencies": {
58
+ "@bendyline/gezel": "1.0.0",
59
+ "@bendyline/gezel-client": "1.0.0",
58
60
  "@modelcontextprotocol/sdk": "^1.29.0",
59
61
  "typescript": "^6.0.3",
60
- "zod": "^4.4.3",
61
- "@bendyline/gezel-client": "0.1.0",
62
- "@bendyline/gezel": "0.1.0"
62
+ "zod": "^4.4.3"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/node": "^24.13.3",