@devpad/mcp 2.3.5 → 2.3.6

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/index.js +347 -14
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -12265,7 +12265,7 @@ var coerce = {
12265
12265
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
12266
12266
  };
12267
12267
  var NEVER = INVALID;
12268
- // ../api/dist/chunk-A7B2SE7T.js
12268
+ // ../api/dist/chunk-KRYLGBPJ.js
12269
12269
  var timestamps = () => ({
12270
12270
  created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
12271
12271
  updated_at: text("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
@@ -12357,7 +12357,8 @@ var ACTIONS = [
12357
12357
  "DELETE_MILESTONE",
12358
12358
  "CREATE_CHECKLIST",
12359
12359
  "UPDATE_CHECKLIST",
12360
- "DELETE_CHECKLIST"
12360
+ "DELETE_CHECKLIST",
12361
+ "ADVANCE_STAGE"
12361
12362
  ];
12362
12363
  var action = sqliteTable("action", {
12363
12364
  ...owned_entity("action"),
@@ -12412,6 +12413,7 @@ var TASK_KINDS = ["task", "phase", "approval"];
12412
12413
  var COMPLETION_POLICIES = ["manual", "auto_children"];
12413
12414
  var COMPLETED_VIA_VALUES = ["user", "api", "policy"];
12414
12415
  var TASK_LINK_KINDS = ["blocks", "relates_to", "references", "discovered_from", "tracks_metric"];
12416
+ var SDLC_STAGES = ["ideate", "plan", "build", "review", "deploy", "live"];
12415
12417
  var task = sqliteTable("task", {
12416
12418
  ...owned_entity("task"),
12417
12419
  title: text("title").notNull(),
@@ -12432,7 +12434,8 @@ var task = sqliteTable("task", {
12432
12434
  completion_policy: text("completion_policy", { enum: COMPLETION_POLICIES }).notNull().default("manual"),
12433
12435
  completed_via: text("completed_via", { enum: COMPLETED_VIA_VALUES }),
12434
12436
  claimed_by: text("claimed_by"),
12435
- claimed_at: text("claimed_at")
12437
+ claimed_at: text("claimed_at"),
12438
+ stage: text("stage", { enum: SDLC_STAGES })
12436
12439
  }, (table) => [index("task_parent_id_idx").on(table.parent_id)]);
12437
12440
  var task_link = sqliteTable("task_link", {
12438
12441
  ...entity("link"),
@@ -12469,7 +12472,13 @@ var TASK_EVENT_KINDS = [
12469
12472
  "edge.removed",
12470
12473
  "node.children_all_done",
12471
12474
  "policy.fired",
12472
- "node.completion_stale"
12475
+ "node.completion_stale",
12476
+ "doc.pushed",
12477
+ "thread.opened",
12478
+ "thread.resolved",
12479
+ "signoff.requested",
12480
+ "signoff.decided",
12481
+ "stage.advanced"
12473
12482
  ];
12474
12483
  var TASK_EVENT_ACTORS = ["user", "api", "policy", "github"];
12475
12484
  var TASK_EVENT_DISPATCH_STATUSES = ["pending", "dispatched"];
@@ -12514,6 +12523,48 @@ var github_webhook_event = sqliteTable("github_webhook_event", {
12514
12523
  event_type: text("event_type").notNull(),
12515
12524
  processed_at: text("processed_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
12516
12525
  }, (table) => [index("github_webhook_event_delivery_guid_idx").on(table.delivery_guid)]);
12526
+ var DOCUMENT_KINDS = ["plan", "design", "interface"];
12527
+ var DOCUMENT_STATUSES = ["draft", "in_review", "approved"];
12528
+ var document = sqliteTable("document", {
12529
+ ...entity("doc"),
12530
+ project_id: text("project_id").notNull().references(() => project.id),
12531
+ task_id: text("task_id").references(() => task.id),
12532
+ kind: text("kind", { enum: DOCUMENT_KINDS }).notNull(),
12533
+ title: text("title").notNull(),
12534
+ head_version: text("head_version"),
12535
+ status: text("status", { enum: DOCUMENT_STATUSES }).notNull().default("draft")
12536
+ }, (table) => [index("document_project_id_idx").on(table.project_id), index("document_task_id_idx").on(table.task_id)]);
12537
+ var THREAD_STATUSES = ["open", "addressed", "resolved", "orphaned"];
12538
+ var annotation_thread = sqliteTable("annotation_thread", {
12539
+ ...id("thread"),
12540
+ document_id: text("document_id").notNull().references(() => document.id),
12541
+ thread_id: text("thread_id").notNull(),
12542
+ status: text("status", { enum: THREAD_STATUSES }).notNull().default("open"),
12543
+ blocking: int("blocking", { mode: "boolean" }).notNull().default(false),
12544
+ ...timestamps()
12545
+ }, (table) => [
12546
+ unique("annotation_thread_unique").on(table.document_id, table.thread_id),
12547
+ index("annotation_thread_document_id_idx").on(table.document_id),
12548
+ index("annotation_thread_status_idx").on(table.status)
12549
+ ]);
12550
+ var SIGNOFF_SUBJECT_KINDS = ["doc_version", "stage", "pipeline_gate"];
12551
+ var SIGNOFF_CHECKPOINTS = ["plan", "types", "design"];
12552
+ var SIGNOFF_DECISIONS = ["approved", "changes_requested", "auto"];
12553
+ var signoff = sqliteTable("signoff", {
12554
+ ...entity("signoff"),
12555
+ subject_kind: text("subject_kind", { enum: SIGNOFF_SUBJECT_KINDS }).notNull(),
12556
+ subject_id: text("subject_id").notNull(),
12557
+ checkpoint: text("checkpoint", { enum: SIGNOFF_CHECKPOINTS }).notNull(),
12558
+ task_id: text("task_id").references(() => task.id),
12559
+ decision: text("decision", { enum: SIGNOFF_DECISIONS }),
12560
+ decided_by: text("decided_by").references(() => user.id),
12561
+ decided_at: text("decided_at"),
12562
+ reason: text("reason"),
12563
+ content_hash: text("content_hash")
12564
+ }, (table) => [
12565
+ index("signoff_subject_idx").on(table.subject_kind, table.subject_id),
12566
+ index("signoff_task_id_idx").on(table.task_id)
12567
+ ]);
12517
12568
  var checklist = sqliteTable("checklist", {
12518
12569
  ...entity("checklist"),
12519
12570
  task_id: text("task_id").notNull().references(() => task.id),
@@ -12755,6 +12806,18 @@ var pipeline_analysis_template_relations = relations(pipeline_analysis_template,
12755
12806
  var pipeline_oidc_trust_relations = relations(pipeline_oidc_trust, ({ one }) => ({
12756
12807
  owner: one(user, { fields: [pipeline_oidc_trust.owner_id], references: [user.id] })
12757
12808
  }));
12809
+ var document_relations = relations(document, ({ one, many }) => ({
12810
+ project: one(project, { fields: [document.project_id], references: [project.id] }),
12811
+ task: one(task, { fields: [document.task_id], references: [task.id] }),
12812
+ threads: many(annotation_thread)
12813
+ }));
12814
+ var annotation_thread_relations = relations(annotation_thread, ({ one }) => ({
12815
+ document: one(document, { fields: [annotation_thread.document_id], references: [document.id] })
12816
+ }));
12817
+ var signoff_relations = relations(signoff, ({ one }) => ({
12818
+ task: one(task, { fields: [signoff.task_id], references: [task.id] }),
12819
+ decided_by_user: one(user, { fields: [signoff.decided_by], references: [user.id] })
12820
+ }));
12758
12821
  var upsert_project = exports_external.object({
12759
12822
  id: exports_external.string().optional().nullable(),
12760
12823
  project_id: exports_external.string(),
@@ -13086,8 +13149,107 @@ var task_event_payload = exports_external.discriminatedUnion("kind", [
13086
13149
  exports_external.object({ kind: exports_external.literal("edge.removed"), link_kind: task_link_kind, dst_id: exports_external.string().nullable() }),
13087
13150
  exports_external.object({ kind: exports_external.literal("node.children_all_done") }),
13088
13151
  exports_external.object({ kind: exports_external.literal("policy.fired"), policy: exports_external.enum(COMPLETION_POLICIES) }),
13089
- exports_external.object({ kind: exports_external.literal("node.completion_stale"), child_id: exports_external.string() })
13152
+ exports_external.object({ kind: exports_external.literal("node.completion_stale"), child_id: exports_external.string() }),
13153
+ exports_external.object({ kind: exports_external.literal("doc.pushed"), document_id: exports_external.string(), version: exports_external.string() }),
13154
+ exports_external.object({ kind: exports_external.literal("thread.opened"), document_id: exports_external.string(), thread_id: exports_external.string() }),
13155
+ exports_external.object({ kind: exports_external.literal("thread.resolved"), document_id: exports_external.string(), thread_id: exports_external.string() }),
13156
+ exports_external.object({
13157
+ kind: exports_external.literal("signoff.requested"),
13158
+ subject_kind: exports_external.enum(SIGNOFF_SUBJECT_KINDS),
13159
+ subject_id: exports_external.string(),
13160
+ checkpoint: exports_external.enum(SIGNOFF_CHECKPOINTS)
13161
+ }),
13162
+ exports_external.object({
13163
+ kind: exports_external.literal("signoff.decided"),
13164
+ subject_kind: exports_external.enum(SIGNOFF_SUBJECT_KINDS),
13165
+ subject_id: exports_external.string(),
13166
+ checkpoint: exports_external.enum(SIGNOFF_CHECKPOINTS),
13167
+ decision: exports_external.enum(SIGNOFF_DECISIONS)
13168
+ }),
13169
+ exports_external.object({
13170
+ kind: exports_external.literal("stage.advanced"),
13171
+ from: exports_external.enum(SDLC_STAGES).nullable(),
13172
+ to: exports_external.enum(SDLC_STAGES),
13173
+ override: exports_external.boolean()
13174
+ })
13090
13175
  ]);
13176
+ var document_kind = exports_external.enum(DOCUMENT_KINDS);
13177
+ var push_doc_request = exports_external.object({
13178
+ document_id: exports_external.string().optional(),
13179
+ project_id: exports_external.string(),
13180
+ task_id: exports_external.string().nullable().optional(),
13181
+ kind: document_kind,
13182
+ title: exports_external.string().min(1),
13183
+ html: exports_external.string()
13184
+ });
13185
+ var thread_anchor = exports_external.object({
13186
+ quote: exports_external.string().min(1),
13187
+ prefix: exports_external.string(),
13188
+ suffix: exports_external.string(),
13189
+ start: exports_external.number().int().nonnegative(),
13190
+ end: exports_external.number().int().nonnegative()
13191
+ });
13192
+ var thread_entry = exports_external.object({
13193
+ author: exports_external.string().min(1),
13194
+ channel: exports_external.enum(["user", "api"]),
13195
+ body: exports_external.string().min(1),
13196
+ at: exports_external.string()
13197
+ });
13198
+ var thread_status = exports_external.enum(THREAD_STATUSES);
13199
+ var thread_marker = exports_external.object({
13200
+ id: exports_external.string().min(1),
13201
+ anchor: thread_anchor,
13202
+ status: thread_status,
13203
+ blocking: exports_external.boolean(),
13204
+ entries: exports_external.array(thread_entry).min(1)
13205
+ });
13206
+ var create_thread_request = exports_external.object({
13207
+ quote: exports_external.string().min(1),
13208
+ prefix: exports_external.string(),
13209
+ suffix: exports_external.string(),
13210
+ start: exports_external.number().int().nonnegative(),
13211
+ end: exports_external.number().int().nonnegative(),
13212
+ body: exports_external.string().min(1),
13213
+ blocking: exports_external.boolean().optional().default(false)
13214
+ });
13215
+ var reply_thread_request = exports_external.object({ body: exports_external.string().min(1) });
13216
+ var toggle_blocking_request = exports_external.object({ blocking: exports_external.boolean() });
13217
+ var signoff_subject_kind = exports_external.enum(SIGNOFF_SUBJECT_KINDS);
13218
+ var signoff_checkpoint = exports_external.enum(SIGNOFF_CHECKPOINTS);
13219
+ var request_checkpoint_request = exports_external.object({
13220
+ project_id: exports_external.string(),
13221
+ subject_kind: signoff_subject_kind,
13222
+ subject_id: exports_external.string(),
13223
+ checkpoint: signoff_checkpoint,
13224
+ blocks: exports_external.array(exports_external.string()).default([])
13225
+ });
13226
+ var decide_checkpoint_request = exports_external.object({
13227
+ decision: exports_external.union([exports_external.literal("approved"), exports_external.literal("changes_requested")]),
13228
+ reason: exports_external.string().optional()
13229
+ });
13230
+ var sdlc_stage = exports_external.enum(SDLC_STAGES);
13231
+ var advance_stage_request = exports_external.object({
13232
+ to: sdlc_stage,
13233
+ override: exports_external.boolean().optional().default(false),
13234
+ reason: exports_external.string().optional()
13235
+ });
13236
+ var push_interface_report_request = exports_external.object({
13237
+ document_id: exports_external.string().optional(),
13238
+ project_id: exports_external.string(),
13239
+ task_id: exports_external.string().nullable().optional(),
13240
+ title: exports_external.string().min(1),
13241
+ normalized: exports_external.string()
13242
+ });
13243
+ var REVIEW_ITEM_KINDS = ["signoff", "annotation", "pipeline_gate", "scan_diff"];
13244
+ var review_item = exports_external.object({
13245
+ kind: exports_external.enum(REVIEW_ITEM_KINDS),
13246
+ subject_id: exports_external.string(),
13247
+ title: exports_external.string(),
13248
+ project_id: exports_external.string().nullable(),
13249
+ created_at: exports_external.string(),
13250
+ path: exports_external.string()
13251
+ });
13252
+ var reviews_pending_response = exports_external.object({ items: exports_external.array(review_item) });
13091
13253
  var hook_selector = exports_external.object({
13092
13254
  subject_kind: exports_external.enum(TASK_KINDS).optional(),
13093
13255
  tag: exports_external.string().optional(),
@@ -13628,12 +13790,8 @@ function handleHttpResponse(response) {
13628
13790
  throw new AuthenticationError("Invalid or expired API key");
13629
13791
  case HTTP_STATUS.NOT_FOUND:
13630
13792
  throw new ApiError("Resource not found", { statusCode: HTTP_STATUS.NOT_FOUND });
13631
- case HTTP_STATUS.BAD_REQUEST:
13632
- break;
13633
13793
  default:
13634
- if (!response.ok) {
13635
- throw new ApiError(`Request failed: ${response.statusText}`, { statusCode: response.status });
13636
- }
13794
+ break;
13637
13795
  }
13638
13796
  }
13639
13797
  async function handleResponseError(response) {
@@ -13644,11 +13802,13 @@ async function handleResponseError(response) {
13644
13802
  const raw = JSON.parse(errorText);
13645
13803
  parsedError = raw;
13646
13804
  } catch {}
13647
- if (response.status === HTTP_STATUS.BAD_REQUEST && parsedError?.error?.name === "ZodError") {
13648
- const zodErrorDetails = parsedError.error.issues ? JSON.stringify(parsedError.error) : errorMessage;
13805
+ const structuredError = typeof parsedError?.error === "object" ? parsedError.error : undefined;
13806
+ if (response.status === HTTP_STATUS.BAD_REQUEST && structuredError?.name === "ZodError") {
13807
+ const zodErrorDetails = structuredError.issues ? JSON.stringify(structuredError) : errorMessage;
13649
13808
  throw new ValidationError(zodErrorDetails);
13650
13809
  }
13651
- throw new ApiError(errorMessage, { statusCode: response.status });
13810
+ const message = typeof parsedError?.error === "string" ? parsedError.error : errorMessage;
13811
+ throw new ApiError(message, { statusCode: response.status });
13652
13812
  }
13653
13813
  function handleNetworkError(error) {
13654
13814
  const message = error instanceof Error ? error.message : "Unknown network error";
@@ -14119,6 +14279,7 @@ var ApiClient2 = class {
14119
14279
  near: (id2) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/near`)),
14120
14280
  claim: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/claim`, { body: data })),
14121
14281
  done: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/done`, { body: data })),
14282
+ advanceStage: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/stage`, { body: data })),
14122
14283
  link: (data) => wrap(() => this.clients.tasks.post("/tasks/link", { body: data })),
14123
14284
  unlink: (link_id) => wrap(() => this.clients.tasks.delete(`/tasks/link/${link_id}`)),
14124
14285
  apply: (data) => wrap(() => this.clients.tasks.post("/tasks/apply", { body: data }))
@@ -14126,6 +14287,44 @@ var ApiClient2 = class {
14126
14287
  this.tags = {
14127
14288
  list: () => wrap(() => this.clients.tags.get("/tags"))
14128
14289
  };
14290
+ this.docs = {
14291
+ list: (filters) => wrap(() => {
14292
+ const query = { project_id: filters.project_id };
14293
+ if (filters.task_id)
14294
+ query.task_id = filters.task_id;
14295
+ return this.clients.docs.get("/docs", { query });
14296
+ }),
14297
+ push: (data) => wrap(() => this.clients.docs.post("/docs", { body: data })),
14298
+ pull: (id2, version2) => wrap(() => this.clients.docs.get(`/docs/${id2}`, version2 ? { query: { version: version2 } } : {})),
14299
+ versions: (id2) => wrap(() => this.clients.docs.get(`/docs/${id2}/versions`)),
14300
+ createThread: (document_id, data) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads`, { body: data })),
14301
+ replyThread: (document_id, thread_id, body) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/reply`, { body: { body } })),
14302
+ resolveThread: (document_id, thread_id) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/resolve`, {})),
14303
+ toggleBlocking: (document_id, thread_id, blocking) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/blocking`, { body: { blocking } })),
14304
+ unresolved: (filters) => wrap(() => {
14305
+ const query = {};
14306
+ if (filters.project_id)
14307
+ query.project_id = filters.project_id;
14308
+ if (filters.document_id)
14309
+ query.document_id = filters.document_id;
14310
+ return this.clients.docs.get("/docs/annotations/unresolved", { query });
14311
+ }),
14312
+ pushInterfaceReport: (data) => wrap(() => this.clients.docs.post("/docs/interface", { body: data })),
14313
+ interfaceStatus: (filters) => wrap(() => {
14314
+ const query = { project_id: filters.project_id, title: filters.title };
14315
+ if (filters.task_id)
14316
+ query.task_id = filters.task_id;
14317
+ return this.clients.docs.get("/docs/interface/status", { query });
14318
+ })
14319
+ };
14320
+ this.signoffs = {
14321
+ request: (data) => wrap(() => this.clients.signoffs.post("/signoffs", { body: data })),
14322
+ find: (id2) => wrap(() => this.clients.signoffs.get(`/signoffs/${id2}`)),
14323
+ decide: (id2, data) => wrap(() => this.clients.signoffs.post(`/signoffs/${id2}/decide`, { body: data }))
14324
+ };
14325
+ this.reviews = {
14326
+ pending: () => wrap(() => this.clients.reviews.get("/reviews/pending"))
14327
+ };
14129
14328
  this.github = {
14130
14329
  repos: () => wrap(() => this.clients.github.get("/repos")),
14131
14330
  branches: (owner, repo) => wrap(() => this.clients.github.get(`/repos/${owner}/${repo}/branches`))
@@ -14491,7 +14690,10 @@ var ApiClient2 = class {
14491
14690
  media: new ApiClient({ ...clientOptions, category: "media" }),
14492
14691
  pulse: new ApiClient({ ...clientOptions, base_url: `${base_url}/pulse`, category: "pulse" }),
14493
14692
  pipelines: new ApiClient({ ...clientOptions, category: "pipelines" }),
14494
- hooks: new ApiClient({ ...clientOptions, category: "hooks" })
14693
+ hooks: new ApiClient({ ...clientOptions, category: "hooks" }),
14694
+ docs: new ApiClient({ ...clientOptions, category: "docs" }),
14695
+ signoffs: new ApiClient({ ...clientOptions, category: "signoffs" }),
14696
+ reviews: new ApiClient({ ...clientOptions, category: "reviews" })
14495
14697
  };
14496
14698
  }
14497
14699
  history() {
@@ -14899,6 +15101,15 @@ var tools = {
14899
15101
  }),
14900
15102
  execute: async (client, input) => unwrap2(await client.tasks.unlink(input.id))
14901
15103
  }),
15104
+ devpad_tasks_advance_stage: define_tool({
15105
+ name: "devpad_tasks_advance_stage",
15106
+ description: "Advance a task's SDLC stage (ideate|plan|build|review|deploy|live). Gated hops (plan->build needs an approved plan checkpoint; review->deploy needs approved types + design when a design doc exists) 409 naming what's missing unless override:true, which always succeeds but is audited.",
15107
+ inputSchema: advance_stage_request.extend({ id: exports_external.string().describe("Task ID") }),
15108
+ execute: async (client, input) => {
15109
+ const { id: id2, ...rest } = input;
15110
+ return unwrap2(await client.tasks.advanceStage(id2, rest));
15111
+ }
15112
+ }),
14902
15113
  devpad_tasks_apply: define_tool({
14903
15114
  name: "devpad_tasks_apply",
14904
15115
  description: "Batch apply create/update/reparent/link/unlink/claim/complete ops atomically, with $0/$1… temp handles for subtree creation. Replaying the same idempotency_key returns the prior response verbatim.",
@@ -15448,6 +15659,128 @@ var tools = {
15448
15659
  owner_id: exports_external.string().describe("Owner ID (must match the policy's owner)")
15449
15660
  }),
15450
15661
  execute: async (client, input) => unwrap2(await client.pipelines.oidc_trust.delete(input.id, { owner_id: input.owner_id }))
15662
+ }),
15663
+ devpad_docs_list: define_tool({
15664
+ name: "devpad_docs_list",
15665
+ description: "List documents for a project (optionally filtered to one task)",
15666
+ inputSchema: exports_external.object({
15667
+ project_id: exports_external.string().describe("Project ID"),
15668
+ task_id: exports_external.string().optional().describe("Filter to documents attached to this task")
15669
+ }),
15670
+ execute: async (client, input) => unwrap2(await client.docs.list(input))
15671
+ }),
15672
+ devpad_docs_push: define_tool({
15673
+ name: "devpad_docs_push",
15674
+ description: "Push HTML content as a new document (omit document_id) or a new version on an existing one. HTML is sanitized server-side before storage — script/iframe/object/embed/form, event handlers, and javascript:/data: URLs never survive.",
15675
+ inputSchema: push_doc_request,
15676
+ execute: async (client, input) => unwrap2(await client.docs.push(input))
15677
+ }),
15678
+ devpad_docs_pull: define_tool({
15679
+ name: "devpad_docs_pull",
15680
+ description: "Pull a document's content at a specific version (default: head)",
15681
+ inputSchema: exports_external.object({
15682
+ id: exports_external.string().describe("Document ID"),
15683
+ version: exports_external.string().optional().describe("Corpus version — defaults to head")
15684
+ }),
15685
+ execute: async (client, input) => unwrap2(await client.docs.pull(input.id, input.version))
15686
+ }),
15687
+ devpad_docs_versions: define_tool({
15688
+ name: "devpad_docs_versions",
15689
+ description: "Full version history for a document, newest first (the lineage walk)",
15690
+ inputSchema: exports_external.object({
15691
+ id: exports_external.string().describe("Document ID")
15692
+ }),
15693
+ execute: async (client, input) => unwrap2(await client.docs.versions(input.id))
15694
+ }),
15695
+ devpad_annotations_create: define_tool({
15696
+ name: "devpad_annotations_create",
15697
+ description: "Open a new annotation thread on a document, anchored to an exact quote (with prefix/suffix context + char offsets for re-anchoring across edits)",
15698
+ inputSchema: create_thread_request.extend({ document_id: exports_external.string().describe("Document ID") }),
15699
+ execute: async (client, input) => {
15700
+ const { document_id, ...rest } = input;
15701
+ return unwrap2(await client.docs.createThread(document_id, rest));
15702
+ }
15703
+ }),
15704
+ devpad_annotations_reply: define_tool({
15705
+ name: "devpad_annotations_reply",
15706
+ description: "Reply to an existing annotation thread",
15707
+ inputSchema: exports_external.object({
15708
+ document_id: exports_external.string().describe("Document ID"),
15709
+ thread_id: exports_external.string().describe("Thread ID (from the marker JSON, not the document ID)"),
15710
+ body: exports_external.string().min(1).describe("Reply text")
15711
+ }),
15712
+ execute: async (client, input) => unwrap2(await client.docs.replyThread(input.document_id, input.thread_id, input.body))
15713
+ }),
15714
+ devpad_annotations_resolve: define_tool({
15715
+ name: "devpad_annotations_resolve",
15716
+ description: "Mark an annotation thread resolved",
15717
+ inputSchema: exports_external.object({
15718
+ document_id: exports_external.string().describe("Document ID"),
15719
+ thread_id: exports_external.string().describe("Thread ID")
15720
+ }),
15721
+ execute: async (client, input) => unwrap2(await client.docs.resolveThread(input.document_id, input.thread_id))
15722
+ }),
15723
+ devpad_annotations_toggle_blocking: define_tool({
15724
+ name: "devpad_annotations_toggle_blocking",
15725
+ description: "Toggle whether an annotation thread blocks approval",
15726
+ inputSchema: exports_external.object({
15727
+ document_id: exports_external.string().describe("Document ID"),
15728
+ thread_id: exports_external.string().describe("Thread ID"),
15729
+ blocking: exports_external.boolean()
15730
+ }),
15731
+ execute: async (client, input) => unwrap2(await client.docs.toggleBlocking(input.document_id, input.thread_id, input.blocking))
15732
+ }),
15733
+ devpad_interface_push: define_tool({
15734
+ name: "devpad_interface_push",
15735
+ description: "Push already-normalized declaration text as a new interface-doc version. The server independently recomputes additive-vs-breaking against its own stored previous content and auto-approves additive diffs against an approved base.",
15736
+ inputSchema: push_interface_report_request,
15737
+ execute: async (client, input) => unwrap2(await client.docs.pushInterfaceReport(input))
15738
+ }),
15739
+ devpad_interface_status: define_tool({
15740
+ name: "devpad_interface_status",
15741
+ description: "Get the approved/auto content_hash for an interface doc, for a client-side hash comparison (the `check` verb)",
15742
+ inputSchema: exports_external.object({
15743
+ project_id: exports_external.string().describe("Project ID"),
15744
+ task_id: exports_external.string().optional().describe("Task ID"),
15745
+ title: exports_external.string().describe("The interface document's title (package name)")
15746
+ }),
15747
+ execute: async (client, input) => unwrap2(await client.docs.interfaceStatus(input))
15748
+ }),
15749
+ devpad_reviews_pending: define_tool({
15750
+ name: "devpad_reviews_pending",
15751
+ description: "The human's queue — one typed aggregate across pending signoff checkpoints, open blocking annotation threads, pending pipeline manual gates, and pending scanner diffs, scoped to the authenticated user",
15752
+ inputSchema: exports_external.object({}),
15753
+ execute: async (client) => unwrap2(await client.reviews.pending())
15754
+ }),
15755
+ devpad_annotations_unresolved: define_tool({
15756
+ name: "devpad_annotations_unresolved",
15757
+ description: "List pending annotation threads (anything not resolved) for a project or a specific document",
15758
+ inputSchema: exports_external.object({
15759
+ project_id: exports_external.string().optional().describe("Project ID"),
15760
+ document_id: exports_external.string().optional().describe("Document ID")
15761
+ }),
15762
+ execute: async (client, input) => unwrap2(await client.docs.unresolved(input))
15763
+ }),
15764
+ devpad_signoffs_request: define_tool({
15765
+ name: "devpad_signoffs_request",
15766
+ description: "Request a human signoff checkpoint — creates a pending approval node that blocks the named downstream tasks until decided",
15767
+ inputSchema: request_checkpoint_request,
15768
+ execute: async (client, input) => unwrap2(await client.signoffs.request(input))
15769
+ }),
15770
+ devpad_signoffs_get: define_tool({
15771
+ name: "devpad_signoffs_get",
15772
+ description: "Get a signoff checkpoint's current state",
15773
+ inputSchema: exports_external.object({ id: exports_external.string().describe("Signoff ID") }),
15774
+ execute: async (client, input) => unwrap2(await client.signoffs.find(input.id))
15775
+ }),
15776
+ devpad_signoffs_decide: define_tool({
15777
+ name: "devpad_signoffs_decide",
15778
+ description: "Decide a signoff checkpoint (approved | changes_requested). Human-only — an api-channel key gets 403. Approving a doc_version subject is vetoed by any open blocking annotation thread.",
15779
+ inputSchema: decide_checkpoint_request.extend({ id: exports_external.string().describe("Signoff ID") }),
15780
+ execute: async (client, input) => {
15781
+ const { id: id2, ...rest } = input;
15782
+ return unwrap2(await client.signoffs.decide(id2, rest));
15783
+ }
15451
15784
  })
15452
15785
  };
15453
15786
  var toolNames = Object.keys(tools);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/mcp",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "description": "MCP server for devpad - exposes devpad API functionality via Model Context Protocol",
5
5
  "keywords": [
6
6
  "ai-tools",
@@ -50,7 +50,7 @@
50
50
  "zod-to-json-schema": "^3.24.6"
51
51
  },
52
52
  "devDependencies": {
53
- "@devpad/api": "^2.3.5",
53
+ "@devpad/api": "^2.3.6",
54
54
  "@types/node": "^24.3.0",
55
55
  "typescript": "^5.0.0"
56
56
  },