@bendyline/gezel-service 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.
Files changed (61) hide show
  1. package/dist/bin/gezeld.js +17312 -16791
  2. package/dist/handboek.js +13 -2
  3. package/dist/index-store/static-index-worker.js +8 -5
  4. package/dist/index.d.ts +64 -5
  5. package/dist/index.js +17312 -16791
  6. package/dist/providers/mlx/python/gezel_mlx_server.py +154 -22
  7. package/dist/ui/assets/{TerminalCodeEditor-BpkIEKrW.js → TerminalCodeEditor-CXspNipu.js} +2 -2
  8. package/dist/ui/assets/{_.contribution-DESswd3T.js → _.contribution-Bi8h5rS7.js} +1 -1
  9. package/dist/ui/assets/{cpp.contribution-DazoHQwn.js → cpp.contribution-CIgWElWw.js} +1 -1
  10. package/dist/ui/assets/{csharp.contribution-B64MdTmq.js → csharp.contribution-DDiJzXzB.js} +1 -1
  11. package/dist/ui/assets/{css.contribution-u617lXYH.js → css.contribution-Dc5E_mNx.js} +1 -1
  12. package/dist/ui/assets/{cssMode-Cf_QqRjJ.js → cssMode-BN_VZB6O.js} +1 -1
  13. package/dist/ui/assets/dist-BwDZUtiH.js +2 -0
  14. package/dist/ui/assets/dist-D4PZf1Q3.js +222 -0
  15. package/dist/ui/assets/{dockerfile.contribution-P8T1FxHz.js → dockerfile.contribution-BQsaSuAJ.js} +1 -1
  16. package/dist/ui/assets/{go.contribution-BqqmPpYF.js → go.contribution-CPvqBST7.js} +1 -1
  17. package/dist/ui/assets/{handlebars-B9qcPqjD.js → handlebars-DJvRMy-I.js} +1 -1
  18. package/dist/ui/assets/{handlebars.contribution-vZslMuRE.js → handlebars.contribution-BNbstxN6.js} +2 -2
  19. package/dist/ui/assets/{html-Fp2jEZ7j.js → html-Becff5XU.js} +1 -1
  20. package/dist/ui/assets/{html.contribution-B1GzaEV-.js → html.contribution-CPDzzJ0M.js} +2 -2
  21. package/dist/ui/assets/{htmlMode-B5cPhGim.js → htmlMode-BFmyC6t-.js} +1 -1
  22. package/dist/ui/assets/index-DTicLc4o.css +1 -0
  23. package/dist/ui/assets/{index-CQSh1NUQ.js → index-w_CaRVtV.js} +192 -191
  24. package/dist/ui/assets/{ini.contribution-XkZYQphY.js → ini.contribution-DFSSA0eY.js} +1 -1
  25. package/dist/ui/assets/{java.contribution-CUQitE0a.js → java.contribution-Bdvvskrf.js} +1 -1
  26. package/dist/ui/assets/{javascript-CcBUpTjJ.js → javascript-DByfaclN.js} +1 -1
  27. package/dist/ui/assets/{javascript.contribution-D6DhUpPP.js → javascript.contribution-CPCuprn0.js} +2 -2
  28. package/dist/ui/assets/{jsonMode-D9SbmDW6.js → jsonMode-CxkV6dJT.js} +1 -1
  29. package/dist/ui/assets/{kotlin.contribution-B9AYd3Yp.js → kotlin.contribution-D8eqi2Fi.js} +1 -1
  30. package/dist/ui/assets/{less.contribution-DtKQK3HF.js → less.contribution-DFRb86Ld.js} +1 -1
  31. package/dist/ui/assets/{lua.contribution-DxFFDcBW.js → lua.contribution-BgktkcsF.js} +1 -1
  32. package/dist/ui/assets/{markdown.contribution-B7aCxle-.js → markdown.contribution-BKqBKD_g.js} +1 -1
  33. package/dist/ui/assets/{monaco-BBFILBn6.js → monaco-CyhM025v.js} +3 -3
  34. package/dist/ui/assets/{monaco-base-CvsKN-Z-.js → monaco-base-hW9ht_BG.js} +1 -1
  35. package/dist/ui/assets/{monaco-setup-BeHgXlpG.js → monaco-setup-Cquhh1OE.js} +1 -1
  36. package/dist/ui/assets/{monaco.contribution-DRZnYNPl.js → monaco.contribution-BVrZ1Anc.js} +2 -2
  37. package/dist/ui/assets/{monaco.contribution-B-c9k_-7.js → monaco.contribution-Cle0Lbgx.js} +2 -2
  38. package/dist/ui/assets/{monaco.contribution-BBrbIBfd.js → monaco.contribution-D9-bPyBf.js} +2 -2
  39. package/dist/ui/assets/{monaco.contribution-Baa3Cv83.js → monaco.contribution-Dl8lHLi5.js} +2 -2
  40. package/dist/ui/assets/{php.contribution-vC08ovbS.js → php.contribution-CcYxMawn.js} +1 -1
  41. package/dist/ui/assets/{python-CevkXHVb.js → python-DivQov6J.js} +1 -1
  42. package/dist/ui/assets/{python.contribution-C6TUOYNZ.js → python.contribution-CiRaN0sm.js} +2 -2
  43. package/dist/ui/assets/{ruby.contribution-BMZvE4z1.js → ruby.contribution-DNudSRrU.js} +1 -1
  44. package/dist/ui/assets/{rust.contribution-DOWKjtrn.js → rust.contribution-BqG2lQpP.js} +1 -1
  45. package/dist/ui/assets/{scss.contribution-BXLJWEv0.js → scss.contribution-DDxPnF-K.js} +1 -1
  46. package/dist/ui/assets/{shell.contribution-gbqcscnj.js → shell.contribution-Q7wVL7zv.js} +1 -1
  47. package/dist/ui/assets/{sql.contribution-DO39C_-u.js → sql.contribution-B9ndj3QH.js} +1 -1
  48. package/dist/ui/assets/{swift.contribution-D4Vjb2VA.js → swift.contribution-D_FDdL6S.js} +1 -1
  49. package/dist/ui/assets/{terminal-monaco-setup-Bb4lnoOq.js → terminal-monaco-setup-BdF0mUfG.js} +1 -1
  50. package/dist/ui/assets/{tsMode-BAHQHAnm.js → tsMode-JVR2Jo5q.js} +1 -1
  51. package/dist/ui/assets/{typescript-15FhCrR2.js → typescript-1ZOjdUnd.js} +1 -1
  52. package/dist/ui/assets/{typescript.contribution-D30L44Mw.js → typescript.contribution-_s-8TvIE.js} +2 -2
  53. package/dist/ui/assets/{xml-BA1mrkDo.js → xml-DrdFGpo2.js} +1 -1
  54. package/dist/ui/assets/{xml.contribution-CN9NFcUA.js → xml.contribution-DUPYAKAC.js} +2 -2
  55. package/dist/ui/assets/{yaml-CIqCv-ro.js → yaml-DYQPB5Mj.js} +1 -1
  56. package/dist/ui/assets/{yaml.contribution-BsLB8vrs.js → yaml.contribution-CRBo99nF.js} +2 -2
  57. package/dist/ui/index.html +4 -4
  58. package/package.json +11 -11
  59. package/dist/ui/assets/dist-DB6xxrlD.js +0 -2
  60. package/dist/ui/assets/dist-DucbO86I.js +0 -222
  61. package/dist/ui/assets/index-Ch0qGtVJ.css +0 -1
package/dist/handboek.js CHANGED
@@ -344,11 +344,16 @@ var DELEGATION_ORCHESTRATOR_ROLES = /* @__PURE__ */ new Set([
344
344
  "voorman",
345
345
  "planner"
346
346
  ]);
347
- function roleDelegationGroups(role) {
347
+ function roleDelegationGroups(role, isProjectVoorman) {
348
348
  const canonical = canonicalRoleKey(role);
349
+ if (isProjectVoorman) return ["role-delegation-escalation"];
349
350
  if (canonical && DELEGATION_ORCHESTRATOR_ROLES.has(canonical)) return ["role-delegation"];
350
351
  return ["role-delegation-escalation"];
351
352
  }
353
+ var PROJECT_VOORMAN_SELF_ESCALATION_TOOLS = /* @__PURE__ */ new Set([
354
+ "delegate_voorman",
355
+ "consult_voorman"
356
+ ]);
352
357
  var CONSULTATION_STRIPPED_TOOLS = /* @__PURE__ */ new Set(["ask_specialist", "ask_gezel"]);
353
358
  var VOORMAN_STRIPPED_MEESTER_TOOLS = /* @__PURE__ */ new Set([
354
359
  "create_gezel",
@@ -423,6 +428,7 @@ var GITHUB_REMOTE_TOOLS = /* @__PURE__ */ new Set([
423
428
  "github_pr_list",
424
429
  "github_pr_view",
425
430
  "github_pr_files",
431
+ "github_pr_file",
426
432
  "github_pr_diff",
427
433
  "github_pr_comments",
428
434
  "github_pr_comment",
@@ -462,7 +468,7 @@ function computeToolAllowlist(opts) {
462
468
  }
463
469
  const hasToolsetOverride = !!opts.toolsetsGroupOverride && opts.toolsetsGroupOverride.length > 0;
464
470
  const roleBaseGroups = hasToolsetOverride ? opts.toolsetsGroupOverride : roleToolsetGroups(opts.role);
465
- const baseGroups = opts.rolesAsTools ? [...roleBaseGroups, ...roleDelegationGroups(opts.role)] : roleBaseGroups;
471
+ const baseGroups = opts.rolesAsTools ? [...roleBaseGroups, ...roleDelegationGroups(opts.role, opts.isProjectVoorman === true)] : roleBaseGroups;
466
472
  const needsTeamStrip = opts.projectMode === "solo" || opts.consultationMode === true;
467
473
  const groups = needsTeamStrip ? stripTeamManagement(baseGroups) : baseGroups;
468
474
  let resolved = applyGates(expandToolsetGroups(groups));
@@ -482,6 +488,11 @@ function computeToolAllowlist(opts) {
482
488
  for (const name of VOORMAN_STRIPPED_DELEGATION_TOOLS) next.delete(name);
483
489
  resolved = next;
484
490
  }
491
+ if (opts.isProjectVoorman === true) {
492
+ const next = new Set(resolved);
493
+ for (const name of PROJECT_VOORMAN_SELF_ESCALATION_TOOLS) next.delete(name);
494
+ resolved = next;
495
+ }
485
496
  if (resolved.has("replace_in_file") && !resolved.has("replace_lines")) {
486
497
  const next = new Set(resolved);
487
498
  next.add("replace_lines");
@@ -253,6 +253,7 @@ import { join, relative } from "path";
253
253
  // src/git/git.ts
254
254
  import { spawn } from "child_process";
255
255
  import { realpath } from "fs/promises";
256
+ import { windowsHeadlessSpawnOptions } from "@bendyline/gezel/native";
256
257
  var GitError = class extends Error {
257
258
  constructor(message, code, stderr) {
258
259
  super(message);
@@ -313,11 +314,13 @@ async function runGit(args, opts = {}) {
313
314
  const child = hasStdinPayload ? spawn("git", gitArgs, {
314
315
  cwd: opts.cwd,
315
316
  env,
316
- stdio: ["pipe", "pipe", "pipe"]
317
+ stdio: ["pipe", "pipe", "pipe"],
318
+ ...windowsHeadlessSpawnOptions()
317
319
  }) : spawn("git", gitArgs, {
318
320
  cwd: opts.cwd,
319
321
  env,
320
- stdio: ["ignore", "pipe", "pipe"]
322
+ stdio: ["ignore", "pipe", "pipe"],
323
+ ...windowsHeadlessSpawnOptions()
321
324
  });
322
325
  const stdinState = {};
323
326
  if (hasStdinPayload) {
@@ -1012,7 +1015,7 @@ import { mkdtemp, realpath as realpath3, rm as rm2, writeFile as writeFile2 } fr
1012
1015
  import { tmpdir } from "os";
1013
1016
  import { isAbsolute as isAbsolute2, join as join3 } from "path";
1014
1017
  import { pathToFileURL } from "url";
1015
- import { windowsHeadlessSpawnOptions } from "@bendyline/gezel/native";
1018
+ import { windowsHeadlessSpawnOptions as windowsHeadlessSpawnOptions2 } from "@bendyline/gezel/native";
1016
1019
 
1017
1020
  // src/sandbox/macos.ts
1018
1021
  function runUnderMacSandbox(command, args, ctx, opts = {}) {
@@ -1163,7 +1166,7 @@ async function readNodeHelp(nodeBin) {
1163
1166
  env: sandboxEnv(process.env),
1164
1167
  // The capability probe is owned and awaited. Hide its Windows console
1165
1168
  // rather than giving the short-lived process a detached one.
1166
- ...windowsHeadlessSpawnOptions()
1169
+ ...windowsHeadlessSpawnOptions2()
1167
1170
  });
1168
1171
  let stdout = "";
1169
1172
  let stderr = "";
@@ -1189,7 +1192,7 @@ async function runSandboxChild(command, args, opts) {
1189
1192
  // Windows tree cleanup follows parent PIDs instead, so detaching there
1190
1193
  // only creates a new console window; keep it owned and hidden.
1191
1194
  detached: process.platform !== "win32",
1192
- ...windowsHeadlessSpawnOptions(),
1195
+ ...windowsHeadlessSpawnOptions2(),
1193
1196
  // Allowlist-scrub the env — inheriting everything leaked tokens
1194
1197
  // (GEZEL_TOKEN, OPENAI_API_KEY, GITHUB_PERSONAL_ACCESS_TOKEN,
1195
1198
  // etc.) into the sandboxed script, letting it `fetch` them
package/dist/index.d.ts CHANGED
@@ -6095,9 +6095,17 @@ declare class TaskManager {
6095
6095
  private onTaskSettled?;
6096
6096
  private onTaskNeedsHelp?;
6097
6097
  private onConnectorPrep?;
6098
+ private readonly autoPreparedConnectorTypes;
6098
6099
  private scriptRunner?;
6099
6100
  private craftbookResolver?;
6100
6101
  private roleResolver?;
6102
+ /**
6103
+ * Join concurrent replays of the same step transition. Local models can
6104
+ * retry an MCP call when its response is slow; without single-flight both
6105
+ * requests read the same active step and independently run gates, scripts,
6106
+ * recruitment, and handoff hooks before either write becomes visible.
6107
+ */
6108
+ private readonly inFlightStepCompletions;
6101
6109
  constructor(store: Store, history?: HistoryManager | undefined);
6102
6110
  /**
6103
6111
  * Wake a project that was resting in `stable` because live work just
@@ -6167,7 +6175,9 @@ declare class TaskManager {
6167
6175
  * still enforced (a required, unbound connector fails the launch), but
6168
6176
  * nothing syncs.
6169
6177
  */
6170
- setConnectorPrepHook(fn: ConnectorPrepHook): void;
6178
+ setConnectorPrepHook(fn: ConnectorPrepHook, opts?: {
6179
+ autoPreparedTypes?: readonly string[];
6180
+ }): void;
6171
6181
  /**
6172
6182
  * Fire the needs-help hook (fire-and-forget, errors logged). Public so
6173
6183
  * the scheduler's stalled-step escalation can report through the same
@@ -6247,7 +6257,7 @@ declare class TaskManager {
6247
6257
  addStep(projectId: string, num: number, input: NewCraftbookStep, pos?: StepPosition): Promise<Task>;
6248
6258
  /**
6249
6259
  * Patch a single step's mutable fields (`description`, `prompt`,
6250
- * `assignee`, `suggestedGezelId`). `undefined` means "leave alone";
6260
+ * `consumes`, `assignee`, `suggestedGezelId`). `undefined` means "leave alone";
6251
6261
  * explicit `null` on the optional fields means "clear it." Returns
6252
6262
  * the updated task. Returns `null` when the step id doesn't exist.
6253
6263
  */
@@ -6875,6 +6885,7 @@ interface ProviderCacheStats {
6875
6885
  providerName: string;
6876
6886
  totalBytes: number;
6877
6887
  budgetBytes: number;
6888
+ /** All entries, including reusable `prefix-*` entries; legacy field name. */
6878
6889
  warmSessionCount: number;
6879
6890
  hits: number;
6880
6891
  misses: number;
@@ -9368,9 +9379,10 @@ declare class ChatManager {
9368
9379
  cancelled: boolean;
9369
9380
  }>;
9370
9381
  /**
9371
- * Install-wide panic stop for chat work. The engagement-mode cache flips
9372
- * synchronously before any teardown awaits, so task runners and autonomous
9373
- * follow-ups cannot admit replacement turns while the current ones unwind.
9382
+ * Install-wide panic stop for chat work and resident providers. The
9383
+ * engagement-mode cache flips synchronously before any teardown awaits, so
9384
+ * task runners and autonomous follow-ups cannot admit replacement turns
9385
+ * while the current ones unwind.
9374
9386
  * Pending user messages and after-idle handoffs are deliberately discarded:
9375
9387
  * leaving either queue intact would make an "emergency stop" immediately
9376
9388
  * restart work as soon as the cancelled provider call releases its slot.
@@ -9480,6 +9492,14 @@ declare class ChatManager {
9480
9492
  * prompt. See ChatSession.consultationMode for the full contract.
9481
9493
  */
9482
9494
  consultationMode?: boolean;
9495
+ /**
9496
+ * Pin the session's name-rendering mode ("boring mode") instead of
9497
+ * following the live config flag. Passed by clients with a fixed
9498
+ * presentation mode (the TUI) so the prompt's gezel references match
9499
+ * the labels that client renders. See
9500
+ * `ChatSessionSchema.roleBasedNameOnlyMode`.
9501
+ */
9502
+ roleBasedNameOnlyMode?: boolean;
9483
9503
  /**
9484
9504
  * Shape-of-deliverable hint persisted on the session. When
9485
9505
  * `kind: "file"` is set, the consultation-mode addendum swaps
@@ -11393,6 +11413,7 @@ declare class ConnectorManager {
11393
11413
  */
11394
11414
  syncBinding(project: ProjectDetail, bindingId: string, opts?: {
11395
11415
  scopes?: readonly string[];
11416
+ backfillLimit?: number;
11396
11417
  }): Promise<BindingSyncResult>;
11397
11418
  /** Sync every enabled binding on a project (drives the sync manager). */
11398
11419
  syncProject(project: ProjectDetail): Promise<BindingSyncResult[]>;
@@ -12491,6 +12512,25 @@ declare class CodeReviewManager {
12491
12512
  private mutate;
12492
12513
  }
12493
12514
 
12515
+ interface GitHubPullFilesPage {
12516
+ files: GitHubPullFile[];
12517
+ allFiles: number;
12518
+ totalFiles: number;
12519
+ offset: number;
12520
+ limit: number;
12521
+ hasMore: boolean;
12522
+ nextOffset?: number;
12523
+ includesPatch: boolean;
12524
+ }
12525
+ interface GitHubPullDiffPage {
12526
+ diff: string;
12527
+ path?: string;
12528
+ offset: number;
12529
+ returnedChars: number;
12530
+ totalChars: number;
12531
+ truncated: boolean;
12532
+ nextOffset?: number;
12533
+ }
12494
12534
  declare class GitHubPrs {
12495
12535
  private readonly manager;
12496
12536
  constructor(manager: GitManager);
@@ -12505,7 +12545,20 @@ declare class GitHubPrs {
12505
12545
  */
12506
12546
  listFiles(project: ProjectDetail, num: number, opts?: {
12507
12547
  patchLimit?: number;
12548
+ includePatch?: boolean;
12508
12549
  }): Promise<GitHubPullFile[]>;
12550
+ /**
12551
+ * A bounded, explicitly paginated view for API/tool consumers. Metadata is
12552
+ * complete for the selected page before any optional patch bodies appear,
12553
+ * so a bridge cap can no longer erase the existence of later files.
12554
+ */
12555
+ listFilesPage(project: ProjectDetail, num: number, opts?: {
12556
+ offset?: number;
12557
+ limit?: number;
12558
+ paths?: readonly string[];
12559
+ includePatch?: boolean;
12560
+ patchLimit?: number;
12561
+ }): Promise<GitHubPullFilesPage>;
12509
12562
  listComments(project: ProjectDetail, num: number): Promise<GitHubPullComment[]>;
12510
12563
  /**
12511
12564
  * Fetch the unified diff for a PR via the `application/vnd.github.v3.diff`
@@ -12517,6 +12570,12 @@ declare class GitHubPrs {
12517
12570
  getPullRequestDiff(project: ProjectDetail, num: number, opts?: {
12518
12571
  limit?: number;
12519
12572
  }): Promise<string>;
12573
+ /** Bounded diff page with machine-readable continuation metadata. */
12574
+ getPullRequestDiffPage(project: ProjectDetail, num: number, opts?: {
12575
+ offset?: number;
12576
+ limit?: number;
12577
+ path?: string;
12578
+ }): Promise<GitHubPullDiffPage>;
12520
12579
  /**
12521
12580
  * Post a top-level (issue-style) comment to a PR. Returns the new
12522
12581
  * comment id + URL so callers can link the user/model to it.