@mrrlin-dev/mcp 0.4.205 → 0.4.206

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/bin.cjs +79 -4
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -64313,6 +64313,7 @@ var openApiOperationIds = {
64313
64313
  listProjects: "listProjects",
64314
64314
  listTaskDependencies: "listTaskDependencies",
64315
64315
  listTasks: "listTasks",
64316
+ getTaskBlockerStatusV1: "getTaskBlockerStatusV1",
64316
64317
  listTaskEvents: "listTaskEvents",
64317
64318
  listTaxonomy: "listTaxonomy",
64318
64319
  listWikiPages: "listWikiPages",
@@ -66506,6 +66507,12 @@ var githubRepositorySelectionSchema = external_exports.enum(["all", "selected"])
66506
66507
  var mrrlinTaskIdSchema = external_exports.string().regex(/^GT-\d+$/);
66507
66508
  var mrrlinPlanIdSchema = external_exports.string().regex(/^PL-\d+$/);
66508
66509
  var mrrlinWikiPageIdSchema = external_exports.string().regex(/^WK-\d+$/);
66510
+ var blockerTaskIdSchema = external_exports.string().min(4).max(128).refine((id) => id.startsWith("GT-") && !/[^0-9]/u.test(id.slice(3)), "Invalid task ID");
66511
+ var blockerTaskIdsSchema = external_exports.array(blockerTaskIdSchema).min(1).max(16).refine((ids) => new Set(ids).size === ids.length, "Duplicate task ID");
66512
+ var blockerStatusResponseSchema = external_exports.object({
66513
+ contract: external_exports.literal("task-blocker-status-v1"),
66514
+ active: external_exports.boolean()
66515
+ }).strict();
66509
66516
  var linkedTaskPageIdSchema = mrrlinWikiPageIdSchema.max(128);
66510
66517
  var linkedTaskResponseSchema = external_exports.object({
66511
66518
  contract: external_exports.literal("spec-linked-task-v1"),
@@ -68905,6 +68912,40 @@ function buildTaskListPath(projectSlug, filters, view) {
68905
68912
  view: view ?? filters.view
68906
68913
  });
68907
68914
  }
68915
+ function withinBlockerStatusDeadline(operation, signal) {
68916
+ return new Promise((resolve3, reject) => {
68917
+ const aborted2 = () => reject(signal.reason);
68918
+ signal.addEventListener("abort", aborted2, { once: true });
68919
+ if (signal.aborted)
68920
+ aborted2();
68921
+ void operation.then(resolve3, reject).finally(() => signal.removeEventListener("abort", aborted2));
68922
+ });
68923
+ }
68924
+ async function readBlockerStatus(response, signal) {
68925
+ const reader = response.body?.getReader();
68926
+ if (!reader)
68927
+ throw new TypeError("Missing blocker status response body");
68928
+ const bytes3 = new Uint8Array(52);
68929
+ let length = 0;
68930
+ try {
68931
+ while (true) {
68932
+ const { done, value } = await withinBlockerStatusDeadline(reader.read(), signal);
68933
+ if (done)
68934
+ break;
68935
+ if (value.byteLength > bytes3.length - length)
68936
+ throw new RangeError("Blocker status response too large");
68937
+ bytes3.set(value, length);
68938
+ length += value.byteLength;
68939
+ }
68940
+ signal.throwIfAborted();
68941
+ const body = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes3.subarray(0, length)));
68942
+ return blockerStatusResponseSchema.parse(body).active;
68943
+ } finally {
68944
+ void reader.cancel().catch(() => {
68945
+ });
68946
+ reader.releaseLock();
68947
+ }
68948
+ }
68908
68949
  var MrrlinApiError = class extends Error {
68909
68950
  code;
68910
68951
  method;
@@ -69002,11 +69043,13 @@ function createMrrlinClient(config2) {
69002
69043
  });
69003
69044
  });
69004
69045
  }
69005
- async function executeFetch(path40, init) {
69046
+ function createFetchScope(callerSignal) {
69006
69047
  const operation = config2.createOperation?.();
69007
69048
  const operationSignal = operation?.signal ?? config2.operationSignal?.();
69008
- const signals = [init?.signal, operationSignal].filter((value) => Boolean(value));
69009
- const signal = signals.length ? AbortSignal.any(signals) : void 0;
69049
+ const signals = [callerSignal, operationSignal].filter((value) => Boolean(value));
69050
+ return { operation, signal: signals.length ? AbortSignal.any(signals) : void 0 };
69051
+ }
69052
+ async function executeFetch(path40, init, { operation, signal } = createFetchScope(init?.signal)) {
69010
69053
  const method = (init?.method ?? "GET").toUpperCase();
69011
69054
  if (signal?.aborted)
69012
69055
  throw new DOMException("The user aborted a request.", "AbortError");
@@ -69291,6 +69334,38 @@ function createMrrlinClient(config2) {
69291
69334
  const body = await request(`${projectPath(projectSlug)}/tasks/${encodeURIComponent(taskId)}`);
69292
69335
  return taskResponseSchema.parse(body).data;
69293
69336
  },
69337
+ async getTaskBlockerStatusV1(projectSlug, taskIds, options) {
69338
+ const ids = blockerTaskIdsSchema.parse(taskIds);
69339
+ const query = new URLSearchParams(ids.map((id) => ["taskId", id]));
69340
+ const path40 = `${projectPath(projectSlug)}/task-blocker-status/v1?${query}`;
69341
+ const deadline = AbortSignal.timeout(3e4);
69342
+ const callerSignal = options?.signal ? AbortSignal.any([options.signal, deadline]) : deadline;
69343
+ const scope = createFetchScope(callerSignal);
69344
+ const signal = scope.signal ?? callerSignal;
69345
+ signal.throwIfAborted();
69346
+ const pending = executeFetch(path40, { cache: "no-store" }, scope);
69347
+ void pending.then((response2) => {
69348
+ if (signal.aborted)
69349
+ void response2.body?.cancel().catch(() => {
69350
+ });
69351
+ }, () => {
69352
+ });
69353
+ const response = await withinBlockerStatusDeadline(pending, signal);
69354
+ if (response.status !== 200) {
69355
+ void response.body?.cancel().catch(() => {
69356
+ });
69357
+ throw new MrrlinApiError({
69358
+ code: `HTTP_${response.status}`,
69359
+ status: response.status,
69360
+ method: "GET",
69361
+ path: path40,
69362
+ message: `Blocker status request failed: ${response.status}`,
69363
+ responseBody: "",
69364
+ violations: null
69365
+ });
69366
+ }
69367
+ return readBlockerStatus(response, signal);
69368
+ },
69294
69369
  async getWikiPageLinkedTaskV1(projectSlug, pageId) {
69295
69370
  const path40 = `${projectPath(projectSlug)}/wiki/${encodeURIComponent(pageId)}/linked-task/v1`;
69296
69371
  const response = await executeFetch(path40);
@@ -99328,7 +99403,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
99328
99403
  }
99329
99404
 
99330
99405
  // src/_generated/version.ts
99331
- var PKG_VERSION = "0.4.205";
99406
+ var PKG_VERSION = "0.4.206";
99332
99407
 
99333
99408
  // src/bridge-allowed-origins.ts
99334
99409
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.205",
3
+ "version": "0.4.206",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"