@bendyline/gezel-mcp 1.0.2 → 1.0.3
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/server.js +125 -16
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* whose names come from the applied type's manifest, not from this frozen
|
|
19
19
|
* contract. Registration guards them against colliding with these names.
|
|
20
20
|
*/
|
|
21
|
-
declare const ALWAYS_REGISTERED_TOOLS: readonly ["search_memory", "save_memory", "list_memories", "list_dir", "read_file", "read_files", "stat", "write_file", "append_to_file", "replace_in_file", "replace_lines", "apply_patch", "insert_at_marker", "delete_path", "make_dir", "rename", "copy_artifact_to_workspace", "validate", "npm_install", "list_package_scripts", "run_package_script", "run_npx", "run_nodejs_script", "derive_file", "list_packages", "run_playwright_script", "list_artifacts", "read_artifact", "write_artifact", "grep_artifact", "browser_find_page_element", "list_documents", "read_document", "write_document", "delete_document", "search_documents", "list_gezels", "create_gezel", "list_gilde", "list_project_types", "apply_project_type", "start_project_from_type", "export_project_type", "import_project_type", "ensure_gezel", "update_gezel", "message_gezel", "ask_gezel", "ask_specialist", "delegate_developer", "consult_developer", "delegate_designer", "consult_designer", "delegate_reviewer", "consult_reviewer", "delegate_planner", "consult_planner", "delegate_researcher", "consult_researcher", "delegate_builder", "consult_builder", "delegate_writer", "consult_writer", "delegate_image_generator", "consult_image_generator", "delegate_voorman", "consult_voorman", "delegate_meester", "consult_meester", "ask_user_question", "list_projects", "start_project", "fetch_repo", "fetch_diff", "update_project", "list_project_gezels", "add_gezel_to_project", "remove_gezel_from_project", "list_suggested_work", "enable_suggested_work", "disable_suggested_work", "list_tasks", "get_task", "create_task", "start_plan", "update_task", "set_outcomes", "verify_outcome", "add_verification_step", "spawn_task_instances", "list_task_children", "set_task_status", "activate_task", "assign_task", "add_task_step", "advance_task_step", "read_task_notes", "write_task_note", "search_history", "search_sessions", "how_do_i", "render_image", "generate_image", "describe_image", "read_image_metadata", "generate_video", "transcribe_audio", "synthesize_speech", "fetch_url", "web_search", "wikipedia_search", "grep_files", "find_files", "diff_files", "read_image_as_base64", "outline_file", "find_symbol", "read_symbol", "find_references", "map_repo", "search_code", "file_review", "list_file_issues", "get_file_issue", "set_file_issue_status", "security_scan", "security_overview", "scan_findings", "map_attack_surface", "list_dependencies", "trace_taint", "search_docs", "read_doc_as_markdown", "search_images", "find_similar_images", "describe_folder", "find_entity", "list_entity_mentions", "list_archive", "extract_archive", "run_git", "list_scripts", "run_installed_script", "get_script_run", "list_craftbooks", "suggest_craftbook", "invoke_craftbook", "import_skill", "craftbook_read", "craftbook_write", "craftbook_add_step", "set_step_deliverable", "craftbook_remove_step", "craftbook_reorder_steps", "craftbook_set_entry", "craftbook_update", "export_task_craftbook", "github_pr_list", "github_pr_view", "github_pr_files", "github_pr_diff", "github_pr_comments", "github_pr_comment", "github_pr_create", "github_workflow_runs", "github_check_status"];
|
|
21
|
+
declare const ALWAYS_REGISTERED_TOOLS: readonly ["search_memory", "save_memory", "list_memories", "list_dir", "read_file", "read_files", "stat", "write_file", "append_to_file", "replace_in_file", "replace_lines", "apply_patch", "insert_at_marker", "delete_path", "make_dir", "rename", "copy_artifact_to_workspace", "validate", "npm_install", "list_package_scripts", "run_package_script", "run_npx", "run_nodejs_script", "derive_file", "list_packages", "run_playwright_script", "list_artifacts", "read_artifact", "write_artifact", "grep_artifact", "browser_find_page_element", "list_documents", "read_document", "write_document", "delete_document", "search_documents", "list_gezels", "create_gezel", "list_gilde", "list_project_types", "apply_project_type", "start_project_from_type", "export_project_type", "import_project_type", "ensure_gezel", "update_gezel", "message_gezel", "ask_gezel", "ask_specialist", "delegate_developer", "consult_developer", "delegate_designer", "consult_designer", "delegate_reviewer", "consult_reviewer", "delegate_planner", "consult_planner", "delegate_researcher", "consult_researcher", "delegate_builder", "consult_builder", "delegate_writer", "consult_writer", "delegate_image_generator", "consult_image_generator", "delegate_voorman", "consult_voorman", "delegate_meester", "consult_meester", "ask_user_question", "list_projects", "start_project", "fetch_repo", "fetch_diff", "update_project", "list_project_gezels", "add_gezel_to_project", "remove_gezel_from_project", "list_suggested_work", "enable_suggested_work", "disable_suggested_work", "list_tasks", "get_task", "create_task", "start_plan", "update_task", "set_outcomes", "verify_outcome", "add_verification_step", "spawn_task_instances", "list_task_children", "set_task_status", "activate_task", "assign_task", "add_task_step", "advance_task_step", "read_task_notes", "write_task_note", "search_history", "search_sessions", "how_do_i", "render_image", "generate_image", "describe_image", "read_image_metadata", "generate_video", "transcribe_audio", "synthesize_speech", "fetch_url", "web_search", "wikipedia_search", "grep_files", "find_files", "diff_files", "read_image_as_base64", "outline_file", "find_symbol", "read_symbol", "find_references", "map_repo", "search_code", "file_review", "list_file_issues", "get_file_issue", "set_file_issue_status", "security_scan", "security_overview", "scan_findings", "map_attack_surface", "list_dependencies", "trace_taint", "search_docs", "read_doc_as_markdown", "search_images", "find_similar_images", "describe_folder", "find_entity", "list_entity_mentions", "list_archive", "extract_archive", "run_git", "list_scripts", "run_installed_script", "get_script_run", "list_craftbooks", "suggest_craftbook", "invoke_craftbook", "import_skill", "craftbook_read", "craftbook_write", "craftbook_add_step", "set_step_deliverable", "craftbook_remove_step", "craftbook_reorder_steps", "craftbook_set_entry", "craftbook_update", "export_task_craftbook", "github_pr_list", "github_pr_view", "github_pr_files", "github_pr_file", "github_pr_diff", "github_pr_comments", "github_pr_comment", "github_pr_create", "github_workflow_runs", "github_check_status"];
|
|
22
22
|
/**
|
|
23
23
|
* Tools registered only when their feature or session-context gate is set
|
|
24
24
|
* in the env. Keep contextual/compatibility tools here so inventory users
|
package/dist/index.js
CHANGED
package/dist/server.js
CHANGED
|
@@ -776,6 +776,7 @@ var ALWAYS_REGISTERED_TOOLS = [
|
|
|
776
776
|
"github_pr_list",
|
|
777
777
|
"github_pr_view",
|
|
778
778
|
"github_pr_files",
|
|
779
|
+
"github_pr_file",
|
|
779
780
|
"github_pr_diff",
|
|
780
781
|
"github_pr_comments",
|
|
781
782
|
"github_pr_comment",
|
|
@@ -1247,6 +1248,7 @@ var READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1247
1248
|
"github_pr_list",
|
|
1248
1249
|
"github_pr_view",
|
|
1249
1250
|
"github_pr_files",
|
|
1251
|
+
"github_pr_file",
|
|
1250
1252
|
"github_pr_diff",
|
|
1251
1253
|
"github_pr_comments",
|
|
1252
1254
|
"github_workflow_runs",
|
|
@@ -1348,6 +1350,7 @@ var OPEN_WORLD_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1348
1350
|
"github_pr_list",
|
|
1349
1351
|
"github_pr_view",
|
|
1350
1352
|
"github_pr_files",
|
|
1353
|
+
"github_pr_file",
|
|
1351
1354
|
"github_pr_diff",
|
|
1352
1355
|
"github_pr_comments",
|
|
1353
1356
|
"github_pr_comment",
|
|
@@ -3256,7 +3259,7 @@ ${listing}` : summary }
|
|
|
3256
3259
|
);
|
|
3257
3260
|
server.tool(
|
|
3258
3261
|
"read_file",
|
|
3259
|
-
"Read one workspace file, optionally only an inclusive line range. For files over ~200 lines, pass `startLine`/`endLine` from grep_files, outline_file, or an error instead of loading the whole file. Omit both range fields for the backward-compatible full read. Output uses `N\u2192` line gutters for precise edits; the gutter is display-only and is never part of the file. Pass `raw: true` for text without gutters.",
|
|
3262
|
+
"Read one project-workspace file, optionally only an inclusive line range. This tool never reads the separate artifacts drawer; use read_artifact for artifact inputs. For files over ~200 lines, pass `startLine`/`endLine` from grep_files, outline_file, or an error instead of loading the whole file. Omit both range fields for the backward-compatible full read. Output uses `N\u2192` line gutters for precise edits; the gutter is display-only and is never part of the file. Pass `raw: true` for text without gutters.",
|
|
3260
3263
|
{
|
|
3261
3264
|
path: z5.string().min(1).max(4096).describe("File path relative to the project root."),
|
|
3262
3265
|
startLine: z5.number().int().min(1).max(1e7).optional().describe("1-based first line to return (inclusive). Defaults to 1."),
|
|
@@ -3301,6 +3304,11 @@ server.tool(
|
|
|
3301
3304
|
const base = unwrapApiError(err);
|
|
3302
3305
|
let text = `read_file "${path}": ${base}`;
|
|
3303
3306
|
if (/not found|404|no such file/i.test(base)) {
|
|
3307
|
+
const artifactCollision = await artifactCollisionForWorkspacePath(path);
|
|
3308
|
+
if (artifactCollision) {
|
|
3309
|
+
text += `. A project artifact exists at "${artifactCollision}". The workspace and artifacts are separate drawers; call read_artifact({ path: ${JSON.stringify(artifactCollision)} }) instead of read_file. The artifact was not opened automatically.`;
|
|
3310
|
+
return { content: [{ type: "text", text }], isError: true };
|
|
3311
|
+
}
|
|
3304
3312
|
try {
|
|
3305
3313
|
const dir = path.includes("/") ? path.slice(0, path.lastIndexOf("/")) : "";
|
|
3306
3314
|
const listing = await api.listProjectWorkspace(projectId, dir, false);
|
|
@@ -4896,6 +4904,15 @@ async function workspaceCollisionForArtifactPath(cleanPath) {
|
|
|
4896
4904
|
}
|
|
4897
4905
|
return null;
|
|
4898
4906
|
}
|
|
4907
|
+
async function artifactCollisionForWorkspacePath(path) {
|
|
4908
|
+
try {
|
|
4909
|
+
const cleanPath = normalizeArtifactPath(path);
|
|
4910
|
+
const result = await api.readProjectArtifactSlice(projectId, cleanPath, { head: 0 });
|
|
4911
|
+
return result.kind === "found" && !result.fuzzy ? result.path : null;
|
|
4912
|
+
} catch {
|
|
4913
|
+
return null;
|
|
4914
|
+
}
|
|
4915
|
+
}
|
|
4899
4916
|
var WORKSPACE_DELIVERABLE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
4900
4917
|
"html",
|
|
4901
4918
|
"htm",
|
|
@@ -9277,14 +9294,14 @@ ${pausedNote}`,
|
|
|
9277
9294
|
);
|
|
9278
9295
|
server.tool(
|
|
9279
9296
|
"read_task_notes",
|
|
9280
|
-
"Read the chronological feed of timestamped notes for a task (or a specific step). Each entry has an author (a gezel or the user) and was appended at a known time \u2014 newest first.",
|
|
9297
|
+
"Read the chronological feed of timestamped notes for a task (or a specific step). Omit stepId to read the whole task feed across every step. Each entry has an author (a gezel or the user) and was appended at a known time \u2014 newest first.",
|
|
9281
9298
|
{
|
|
9282
9299
|
ref: z5.string(),
|
|
9283
9300
|
stepId: z5.string().optional()
|
|
9284
9301
|
},
|
|
9285
9302
|
async ({ ref, stepId }) => {
|
|
9286
9303
|
const parsed = parseRef(ref);
|
|
9287
|
-
const effectiveStep = stepId
|
|
9304
|
+
const effectiveStep = stepId?.trim() || void 0;
|
|
9288
9305
|
const { notes } = await api.listTaskNotes(parsed.projectId, parsed.num, effectiveStep);
|
|
9289
9306
|
const summary = `Loaded ${notes.length} ${notes.length === 1 ? "note" : "notes"} for ${ref}${effectiveStep ? `/${effectiveStep}` : ""}.`;
|
|
9290
9307
|
return okResult(
|
|
@@ -11246,26 +11263,57 @@ server.tool(
|
|
|
11246
11263
|
);
|
|
11247
11264
|
server.tool(
|
|
11248
11265
|
"github_pr_files",
|
|
11249
|
-
"List
|
|
11266
|
+
"List a bounded page of files changed in a PR. Defaults to compact metadata only so filenames later in a large PR are never hidden behind early patch bodies. Follow `nextOffset` until `hasMore: false`; set includePatch only for a small page, or use github_pr_file for one path.",
|
|
11250
11267
|
{
|
|
11251
11268
|
project: z5.string().optional(),
|
|
11252
|
-
number: z5.number().int().positive()
|
|
11269
|
+
number: z5.number().int().positive(),
|
|
11270
|
+
offset: z5.number().int().nonnegative().optional().describe("Zero-based file offset (default 0)."),
|
|
11271
|
+
limit: z5.number().int().min(1).max(200).optional().describe("Files per page (default 100)."),
|
|
11272
|
+
paths: z5.array(z5.string().min(1)).max(50).optional().describe("Optional exact changed paths to select."),
|
|
11273
|
+
includePatch: z5.boolean().optional().describe("Include bounded patches for this page. Defaults false.")
|
|
11253
11274
|
},
|
|
11254
|
-
async ({ project, number }) => {
|
|
11275
|
+
async ({ project, number, offset, limit, paths, includePatch }) => {
|
|
11255
11276
|
const resolved = project ? await resolveProjectId(project) : projectId;
|
|
11256
11277
|
try {
|
|
11257
|
-
const res = await api.listProjectGitHubPullFiles(resolved, number
|
|
11278
|
+
const res = await api.listProjectGitHubPullFiles(resolved, number, {
|
|
11279
|
+
...offset !== void 0 ? { offset } : {},
|
|
11280
|
+
...limit !== void 0 ? { limit } : {},
|
|
11281
|
+
...paths ? { paths } : {},
|
|
11282
|
+
includePatch: includePatch === true
|
|
11283
|
+
});
|
|
11258
11284
|
if (!res.files.length) {
|
|
11259
|
-
return {
|
|
11285
|
+
return {
|
|
11286
|
+
content: [
|
|
11287
|
+
{
|
|
11288
|
+
type: "text",
|
|
11289
|
+
text: paths?.length ? `No changed files matched: ${paths.join(", ")}` : "No file changes in this PR."
|
|
11290
|
+
}
|
|
11291
|
+
]
|
|
11292
|
+
};
|
|
11260
11293
|
}
|
|
11261
11294
|
const blocks = res.files.map((f) => {
|
|
11262
11295
|
const header = `${f.filename} \u2014 ${f.status} (+${f.additions} \u2212${f.deletions})`;
|
|
11263
|
-
|
|
11296
|
+
if (!f.patch) return header;
|
|
11297
|
+
const truncation = f.patchTruncated ? `
|
|
11298
|
+
[patch truncated: returned ${f.patch.length} of ${f.patchChars ?? "?"} chars; call github_pr_diff with path="${f.filename}" and nextOffset until complete]` : "";
|
|
11299
|
+
return `${header}
|
|
11264
11300
|
\`\`\`diff
|
|
11265
11301
|
${f.patch}
|
|
11266
|
-
|
|
11302
|
+
\`\`\`${truncation}`;
|
|
11267
11303
|
});
|
|
11268
|
-
|
|
11304
|
+
const start = res.offset ?? offset ?? 0;
|
|
11305
|
+
const total = res.totalFiles ?? res.files.length;
|
|
11306
|
+
const end = start + res.files.length;
|
|
11307
|
+
const coverage = [
|
|
11308
|
+
`Coverage: files ${start + 1}-${end} of ${total}${res.allFiles !== void 0 && res.allFiles !== total ? ` selected from ${res.allFiles} PR files` : ""}.`,
|
|
11309
|
+
`Patches: ${res.includesPatch ? "included where available" : "omitted (metadata-only)"}.`,
|
|
11310
|
+
res.hasMore ? `hasMore: true; nextOffset: ${res.nextOffset ?? end}. Call github_pr_files again with that offset.` : "hasMore: false; this selection is complete."
|
|
11311
|
+
].join("\n");
|
|
11312
|
+
return {
|
|
11313
|
+
content: [{ type: "text", text: `${coverage}
|
|
11314
|
+
|
|
11315
|
+
${blocks.join("\n\n")}` }]
|
|
11316
|
+
};
|
|
11269
11317
|
} catch (err) {
|
|
11270
11318
|
const msg = unwrapApiError(err);
|
|
11271
11319
|
return {
|
|
@@ -11275,18 +11323,79 @@ ${f.patch}
|
|
|
11275
11323
|
}
|
|
11276
11324
|
}
|
|
11277
11325
|
);
|
|
11326
|
+
server.tool(
|
|
11327
|
+
"github_pr_file",
|
|
11328
|
+
"Fetch one changed path and its bounded patch. Use this after github_pr_files identifies a file; if the patch is truncated, continue with github_pr_diff({ number, path, offset: nextOffset }).",
|
|
11329
|
+
{
|
|
11330
|
+
project: z5.string().optional(),
|
|
11331
|
+
number: z5.number().int().positive(),
|
|
11332
|
+
path: z5.string().min(1).describe("Exact changed path from github_pr_files.")
|
|
11333
|
+
},
|
|
11334
|
+
async ({ project, number, path }) => {
|
|
11335
|
+
const resolved = project ? await resolveProjectId(project) : projectId;
|
|
11336
|
+
try {
|
|
11337
|
+
const res = await api.listProjectGitHubPullFiles(resolved, number, {
|
|
11338
|
+
paths: [path],
|
|
11339
|
+
limit: 1,
|
|
11340
|
+
includePatch: true
|
|
11341
|
+
});
|
|
11342
|
+
const file = res.files[0];
|
|
11343
|
+
if (!file) {
|
|
11344
|
+
return {
|
|
11345
|
+
content: [{ type: "text", text: `Changed path not found: ${path}` }],
|
|
11346
|
+
isError: true
|
|
11347
|
+
};
|
|
11348
|
+
}
|
|
11349
|
+
const header = `${file.filename} \u2014 ${file.status} (+${file.additions} \u2212${file.deletions})`;
|
|
11350
|
+
const patch = file.patch ? `
|
|
11351
|
+
|
|
11352
|
+
\`\`\`diff
|
|
11353
|
+
${file.patch}
|
|
11354
|
+
\`\`\`` : "\n\n(No patch returned.)";
|
|
11355
|
+
const truncation = file.patchTruncated ? `
|
|
11356
|
+
|
|
11357
|
+
Patch truncated: returned ${file.patch?.length ?? 0} of ${file.patchChars ?? "?"} chars. Call github_pr_diff({ number: ${number}, path: ${JSON.stringify(file.filename)} }) and follow nextOffset.` : "";
|
|
11358
|
+
return { content: [{ type: "text", text: `${header}${patch}${truncation}` }] };
|
|
11359
|
+
} catch (err) {
|
|
11360
|
+
const msg = unwrapApiError(err);
|
|
11361
|
+
return {
|
|
11362
|
+
content: [{ type: "text", text: `github_pr_file failed: ${msg}` }],
|
|
11363
|
+
isError: true
|
|
11364
|
+
};
|
|
11365
|
+
}
|
|
11366
|
+
}
|
|
11367
|
+
);
|
|
11278
11368
|
server.tool(
|
|
11279
11369
|
"github_pr_diff",
|
|
11280
|
-
"Fetch
|
|
11370
|
+
"Fetch one explicit character page of a PR diff, optionally scoped to an exact changed path. The result always reports totalChars, truncated, and nextOffset; continue until truncated is false. For large PR discovery, page github_pr_files first instead of assuming one diff call is complete.",
|
|
11281
11371
|
{
|
|
11282
11372
|
project: z5.string().optional(),
|
|
11283
|
-
number: z5.number().int().positive()
|
|
11373
|
+
number: z5.number().int().positive(),
|
|
11374
|
+
path: z5.string().min(1).optional().describe("Optional exact changed path."),
|
|
11375
|
+
offset: z5.number().int().nonnegative().optional().describe("Character offset (default 0)."),
|
|
11376
|
+
limit: z5.number().int().min(1).max(6e4).optional().describe("Characters to return (default 48,000; max 60,000).")
|
|
11284
11377
|
},
|
|
11285
|
-
async ({ project, number }) => {
|
|
11378
|
+
async ({ project, number, path, offset, limit }) => {
|
|
11286
11379
|
const resolved = project ? await resolveProjectId(project) : projectId;
|
|
11287
11380
|
try {
|
|
11288
|
-
const res = await api.getProjectGitHubPullDiff(resolved, number
|
|
11289
|
-
|
|
11381
|
+
const res = await api.getProjectGitHubPullDiff(resolved, number, {
|
|
11382
|
+
...path ? { path } : {},
|
|
11383
|
+
...offset !== void 0 ? { offset } : {},
|
|
11384
|
+
...limit !== void 0 ? { limit } : {}
|
|
11385
|
+
});
|
|
11386
|
+
const scope = res.path ? ` for ${res.path}` : "";
|
|
11387
|
+
const start = res.offset ?? offset ?? 0;
|
|
11388
|
+
const returned = res.returnedChars ?? res.diff.length;
|
|
11389
|
+
const total = res.totalChars ?? res.diff.length;
|
|
11390
|
+
const meta = [
|
|
11391
|
+
`Diff page${scope}: chars ${start}-${start + returned} of ${total}.`,
|
|
11392
|
+
res.truncated ? `truncated: true; nextOffset: ${res.nextOffset ?? start + returned}. Continue with the same path and that offset.` : "truncated: false; this diff selection is complete."
|
|
11393
|
+
].join("\n");
|
|
11394
|
+
return {
|
|
11395
|
+
content: [{ type: "text", text: `${meta}
|
|
11396
|
+
|
|
11397
|
+
${res.diff || "(empty diff)"}` }]
|
|
11398
|
+
};
|
|
11290
11399
|
} catch (err) {
|
|
11291
11400
|
const msg = unwrapApiError(err);
|
|
11292
11401
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/gezel-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Gezel MCP server — gives agents access to memory, workspace, artifacts, and tools.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"!dist/**/*.map"
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@bendyline/gezel": "1.0.
|
|
59
|
-
"@bendyline/gezel-client": "1.0.
|
|
58
|
+
"@bendyline/gezel": "1.0.3",
|
|
59
|
+
"@bendyline/gezel-client": "1.0.3",
|
|
60
60
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
61
61
|
"typescript": "^6.0.3",
|
|
62
62
|
"zod": "^4.4.3"
|