@devpad/mcp 2.3.3 → 2.3.5
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.js +181 -3
- 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-
|
|
12268
|
+
// ../api/dist/chunk-A7B2SE7T.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)`)
|
|
@@ -12316,6 +12316,7 @@ var api_keys = sqliteTable("api_keys", {
|
|
|
12316
12316
|
name: text("name"),
|
|
12317
12317
|
note: text("note"),
|
|
12318
12318
|
scope: text("scope", { enum: ["devpad", "blog", "media", "pulse", "all"] }).notNull().default("all"),
|
|
12319
|
+
project_id: text("project_id").references(() => project.id),
|
|
12319
12320
|
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
12320
12321
|
last_used_at: text("last_used_at"),
|
|
12321
12322
|
...timestamps(),
|
|
@@ -12335,7 +12336,8 @@ var project = sqliteTable("project", {
|
|
|
12335
12336
|
link_text: text("link_text"),
|
|
12336
12337
|
visibility: text("visibility", { enum: ["PUBLIC", "PRIVATE", "HIDDEN", "ARCHIVED", "DRAFT", "DELETED"] }).notNull().default("PRIVATE"),
|
|
12337
12338
|
current_version: text("current_version"),
|
|
12338
|
-
scan_branch: text("scan_branch")
|
|
12339
|
+
scan_branch: text("scan_branch"),
|
|
12340
|
+
github_autoclose: integer("github_autoclose", { mode: "boolean" }).notNull().default(false)
|
|
12339
12341
|
});
|
|
12340
12342
|
var ACTIONS = [
|
|
12341
12343
|
"CREATE_TASK",
|
|
@@ -12457,6 +12459,61 @@ var apply_log = sqliteTable("apply_log", {
|
|
|
12457
12459
|
response: text("response", { mode: "json" }).notNull(),
|
|
12458
12460
|
created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
12459
12461
|
});
|
|
12462
|
+
var TASK_EVENT_KINDS = [
|
|
12463
|
+
"task.created",
|
|
12464
|
+
"task.updated",
|
|
12465
|
+
"task.completed",
|
|
12466
|
+
"task.reopened",
|
|
12467
|
+
"task.claimed",
|
|
12468
|
+
"edge.created",
|
|
12469
|
+
"edge.removed",
|
|
12470
|
+
"node.children_all_done",
|
|
12471
|
+
"policy.fired",
|
|
12472
|
+
"node.completion_stale"
|
|
12473
|
+
];
|
|
12474
|
+
var TASK_EVENT_ACTORS = ["user", "api", "policy", "github"];
|
|
12475
|
+
var TASK_EVENT_DISPATCH_STATUSES = ["pending", "dispatched"];
|
|
12476
|
+
var task_event = sqliteTable("task_event", {
|
|
12477
|
+
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
12478
|
+
event_id: text("event_id").notNull().unique().$defaultFn(() => `evt_${crypto.randomUUID()}`),
|
|
12479
|
+
kind: text("kind", { enum: TASK_EVENT_KINDS }).notNull(),
|
|
12480
|
+
subject_id: text("subject_id").notNull(),
|
|
12481
|
+
project_id: text("project_id"),
|
|
12482
|
+
actor: text("actor", { enum: TASK_EVENT_ACTORS }).notNull(),
|
|
12483
|
+
payload: text("payload", { mode: "json" }).notNull(),
|
|
12484
|
+
occurred_at: text("occurred_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
|
|
12485
|
+
dispatch_status: text("dispatch_status", { enum: TASK_EVENT_DISPATCH_STATUSES }).notNull().default("pending"),
|
|
12486
|
+
dispatched_at: text("dispatched_at")
|
|
12487
|
+
}, (table) => [
|
|
12488
|
+
index("task_event_subject_id_idx").on(table.subject_id),
|
|
12489
|
+
index("task_event_dispatch_status_idx").on(table.dispatch_status)
|
|
12490
|
+
]);
|
|
12491
|
+
var hook = sqliteTable("hook", {
|
|
12492
|
+
...entity("hook"),
|
|
12493
|
+
project_id: text("project_id").notNull().references(() => project.id),
|
|
12494
|
+
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
12495
|
+
trigger: text("trigger", { mode: "json" }).notNull(),
|
|
12496
|
+
action: text("action", { mode: "json" }).notNull()
|
|
12497
|
+
}, (table) => [index("hook_project_id_idx").on(table.project_id)]);
|
|
12498
|
+
var HOOK_DELIVERY_STATUSES = ["pending", "delivered", "failed_transient", "failed_permanent"];
|
|
12499
|
+
var hook_delivery = sqliteTable("hook_delivery", {
|
|
12500
|
+
id: text("id").primaryKey(),
|
|
12501
|
+
hook_id: text("hook_id").notNull().references(() => hook.id),
|
|
12502
|
+
event_id: text("event_id").notNull(),
|
|
12503
|
+
status: text("status", { enum: HOOK_DELIVERY_STATUSES }).notNull().default("pending"),
|
|
12504
|
+
attempts: integer("attempts").notNull().default(0),
|
|
12505
|
+
last_error: text("last_error"),
|
|
12506
|
+
...timestamps()
|
|
12507
|
+
}, (table) => [
|
|
12508
|
+
index("hook_delivery_hook_id_idx").on(table.hook_id),
|
|
12509
|
+
index("hook_delivery_status_idx").on(table.status)
|
|
12510
|
+
]);
|
|
12511
|
+
var github_webhook_event = sqliteTable("github_webhook_event", {
|
|
12512
|
+
id: text("id").primaryKey(),
|
|
12513
|
+
delivery_guid: text("delivery_guid").notNull(),
|
|
12514
|
+
event_type: text("event_type").notNull(),
|
|
12515
|
+
processed_at: text("processed_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
12516
|
+
}, (table) => [index("github_webhook_event_delivery_guid_idx").on(table.delivery_guid)]);
|
|
12460
12517
|
var checklist = sqliteTable("checklist", {
|
|
12461
12518
|
...entity("checklist"),
|
|
12462
12519
|
task_id: text("task_id").notNull().references(() => task.id),
|
|
@@ -12647,6 +12704,16 @@ var task_link_relations = relations(task_link, ({ one }) => ({
|
|
|
12647
12704
|
var task_rollup_relations = relations(task_rollup, ({ one }) => ({
|
|
12648
12705
|
task: one(task, { fields: [task_rollup.task_id], references: [task.id] })
|
|
12649
12706
|
}));
|
|
12707
|
+
var task_event_relations = relations(task_event, ({ one }) => ({
|
|
12708
|
+
subject: one(task, { fields: [task_event.subject_id], references: [task.id] })
|
|
12709
|
+
}));
|
|
12710
|
+
var hook_relations = relations(hook, ({ one, many }) => ({
|
|
12711
|
+
project: one(project, { fields: [hook.project_id], references: [project.id] }),
|
|
12712
|
+
deliveries: many(hook_delivery)
|
|
12713
|
+
}));
|
|
12714
|
+
var hook_delivery_relations = relations(hook_delivery, ({ one }) => ({
|
|
12715
|
+
hook: one(hook, { fields: [hook_delivery.hook_id], references: [hook.id] })
|
|
12716
|
+
}));
|
|
12650
12717
|
var checklist_relations = relations(checklist, ({ one, many }) => ({
|
|
12651
12718
|
task: one(task, { fields: [checklist.task_id], references: [task.id] }),
|
|
12652
12719
|
items: many(checklist_item)
|
|
@@ -13007,6 +13074,66 @@ var apply_request = exports_external.object({
|
|
|
13007
13074
|
ops: exports_external.array(apply_op).min(1)
|
|
13008
13075
|
});
|
|
13009
13076
|
var claim_request = exports_external.object({ actor: exports_external.string().min(1), base_rev: exports_external.number().int() });
|
|
13077
|
+
var done_request = exports_external.object({ base_rev: exports_external.number().int() });
|
|
13078
|
+
var task_event_actor = exports_external.enum(TASK_EVENT_ACTORS);
|
|
13079
|
+
var task_event_payload = exports_external.discriminatedUnion("kind", [
|
|
13080
|
+
exports_external.object({ kind: exports_external.literal("task.created"), title: exports_external.string() }),
|
|
13081
|
+
exports_external.object({ kind: exports_external.literal("task.updated"), fields: exports_external.array(exports_external.string()) }),
|
|
13082
|
+
exports_external.object({ kind: exports_external.literal("task.completed"), via: exports_external.enum(COMPLETED_VIA_VALUES) }),
|
|
13083
|
+
exports_external.object({ kind: exports_external.literal("task.reopened"), via: exports_external.enum(COMPLETED_VIA_VALUES) }),
|
|
13084
|
+
exports_external.object({ kind: exports_external.literal("task.claimed"), actor: exports_external.string() }),
|
|
13085
|
+
exports_external.object({ kind: exports_external.literal("edge.created"), link_kind: task_link_kind, dst_id: exports_external.string().nullable() }),
|
|
13086
|
+
exports_external.object({ kind: exports_external.literal("edge.removed"), link_kind: task_link_kind, dst_id: exports_external.string().nullable() }),
|
|
13087
|
+
exports_external.object({ kind: exports_external.literal("node.children_all_done") }),
|
|
13088
|
+
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() })
|
|
13090
|
+
]);
|
|
13091
|
+
var hook_selector = exports_external.object({
|
|
13092
|
+
subject_kind: exports_external.enum(TASK_KINDS).optional(),
|
|
13093
|
+
tag: exports_external.string().optional(),
|
|
13094
|
+
ancestor_id: exports_external.string().optional()
|
|
13095
|
+
});
|
|
13096
|
+
var hook_trigger = exports_external.object({
|
|
13097
|
+
kinds: exports_external.array(exports_external.enum(TASK_EVENT_KINDS)).min(1),
|
|
13098
|
+
selector: hook_selector.default({})
|
|
13099
|
+
});
|
|
13100
|
+
var hook_action_input = exports_external.discriminatedUnion("kind", [
|
|
13101
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), secret: exports_external.string().min(1).optional() }),
|
|
13102
|
+
exports_external.object({
|
|
13103
|
+
kind: exports_external.literal("vault"),
|
|
13104
|
+
scope: exports_external.string().min(1),
|
|
13105
|
+
op: exports_external.string().min(1),
|
|
13106
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
13107
|
+
}),
|
|
13108
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
13109
|
+
]);
|
|
13110
|
+
var hook_action_stored = exports_external.discriminatedUnion("kind", [
|
|
13111
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), secret_encrypted: exports_external.string().optional() }),
|
|
13112
|
+
exports_external.object({
|
|
13113
|
+
kind: exports_external.literal("vault"),
|
|
13114
|
+
scope: exports_external.string().min(1),
|
|
13115
|
+
op: exports_external.string().min(1),
|
|
13116
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
13117
|
+
}),
|
|
13118
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
13119
|
+
]);
|
|
13120
|
+
var hook_action_public = exports_external.discriminatedUnion("kind", [
|
|
13121
|
+
exports_external.object({ kind: exports_external.literal("webhook"), url: exports_external.string().url(), has_secret: exports_external.boolean() }),
|
|
13122
|
+
exports_external.object({
|
|
13123
|
+
kind: exports_external.literal("vault"),
|
|
13124
|
+
scope: exports_external.string().min(1),
|
|
13125
|
+
op: exports_external.string().min(1),
|
|
13126
|
+
args: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
13127
|
+
}),
|
|
13128
|
+
exports_external.object({ kind: exports_external.literal("pipeline"), package_id: exports_external.string().min(1) })
|
|
13129
|
+
]);
|
|
13130
|
+
var upsert_hook = exports_external.object({
|
|
13131
|
+
id: exports_external.string().optional(),
|
|
13132
|
+
project_id: exports_external.string(),
|
|
13133
|
+
enabled: exports_external.boolean().default(true),
|
|
13134
|
+
trigger: hook_trigger,
|
|
13135
|
+
action: hook_action_input
|
|
13136
|
+
});
|
|
13010
13137
|
|
|
13011
13138
|
// ../../node_modules/@f0rbit/corpus/dist/types.js
|
|
13012
13139
|
var ok = (value) => ({ ok: true, value });
|
|
@@ -13900,6 +14027,12 @@ var ApiClient2 = class {
|
|
|
13900
14027
|
delete: (id2) => wrap(() => this.clients.milestones.delete(`/milestones/${id2}`)),
|
|
13901
14028
|
goals: (id2) => wrap(() => this.clients.milestones.get(`/milestones/${id2}/goals`))
|
|
13902
14029
|
};
|
|
14030
|
+
this.hooks = {
|
|
14031
|
+
list: (project_id) => wrap(() => this.clients.hooks.get("/hooks", { query: { project_id } })),
|
|
14032
|
+
upsert: (data) => wrap(() => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })),
|
|
14033
|
+
delete: (id2) => wrap(() => this.clients.hooks.delete(`/hooks/${id2}`)),
|
|
14034
|
+
deliveries: (id2, status) => wrap(() => this.clients.hooks.get(`/hooks/${id2}/deliveries`, status ? { query: { status } } : {}))
|
|
14035
|
+
};
|
|
13903
14036
|
this.goals = {
|
|
13904
14037
|
list: () => wrap(() => this.clients.goals.get("/goals")),
|
|
13905
14038
|
find: (id2) => wrap(() => this.clients.goals.get(`/goals/${id2}`)),
|
|
@@ -13985,6 +14118,7 @@ var ApiClient2 = class {
|
|
|
13985
14118
|
tree: (id2, depth) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/tree`, depth ? { query: { depth: String(depth) } } : {})),
|
|
13986
14119
|
near: (id2) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/near`)),
|
|
13987
14120
|
claim: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/claim`, { body: data })),
|
|
14121
|
+
done: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/done`, { body: data })),
|
|
13988
14122
|
link: (data) => wrap(() => this.clients.tasks.post("/tasks/link", { body: data })),
|
|
13989
14123
|
unlink: (link_id) => wrap(() => this.clients.tasks.delete(`/tasks/link/${link_id}`)),
|
|
13990
14124
|
apply: (data) => wrap(() => this.clients.tasks.post("/tasks/apply", { body: data }))
|
|
@@ -14356,7 +14490,8 @@ var ApiClient2 = class {
|
|
|
14356
14490
|
blog: new ApiClient({ ...clientOptions, category: "blog" }),
|
|
14357
14491
|
media: new ApiClient({ ...clientOptions, category: "media" }),
|
|
14358
14492
|
pulse: new ApiClient({ ...clientOptions, base_url: `${base_url}/pulse`, category: "pulse" }),
|
|
14359
|
-
pipelines: new ApiClient({ ...clientOptions, category: "pipelines" })
|
|
14493
|
+
pipelines: new ApiClient({ ...clientOptions, category: "pipelines" }),
|
|
14494
|
+
hooks: new ApiClient({ ...clientOptions, category: "hooks" })
|
|
14360
14495
|
};
|
|
14361
14496
|
}
|
|
14362
14497
|
history() {
|
|
@@ -14442,6 +14577,16 @@ var milestone_by_id = exports_external.object({
|
|
|
14442
14577
|
var goal_by_id = exports_external.object({
|
|
14443
14578
|
id: exports_external.string().describe("Goal ID")
|
|
14444
14579
|
});
|
|
14580
|
+
var hook_filters = exports_external.object({
|
|
14581
|
+
project_id: exports_external.string().describe("Project ID to list hooks for")
|
|
14582
|
+
});
|
|
14583
|
+
var hook_by_id = exports_external.object({
|
|
14584
|
+
id: exports_external.string().describe("Hook ID")
|
|
14585
|
+
});
|
|
14586
|
+
var hook_deliveries_input = exports_external.object({
|
|
14587
|
+
id: exports_external.string().describe("Hook ID"),
|
|
14588
|
+
status: exports_external.enum(["pending", "delivered", "failed_transient", "failed_permanent"]).optional().describe("Filter by delivery status — use failed_permanent to see the DLQ")
|
|
14589
|
+
});
|
|
14445
14590
|
var github_branches = exports_external.object({
|
|
14446
14591
|
owner: exports_external.string().describe("Repository owner"),
|
|
14447
14592
|
repo: exports_external.string().describe("Repository name")
|
|
@@ -14539,6 +14684,30 @@ var tools = {
|
|
|
14539
14684
|
finished_at: input.finished_at
|
|
14540
14685
|
}))
|
|
14541
14686
|
}),
|
|
14687
|
+
devpad_hooks_list: define_tool({
|
|
14688
|
+
name: "devpad_hooks_list",
|
|
14689
|
+
description: "List hooks configured for a project",
|
|
14690
|
+
inputSchema: hook_filters,
|
|
14691
|
+
execute: async (client, input) => unwrap2(await client.hooks.list(input.project_id))
|
|
14692
|
+
}),
|
|
14693
|
+
devpad_hooks_upsert: define_tool({
|
|
14694
|
+
name: "devpad_hooks_upsert",
|
|
14695
|
+
description: "Create or update a hook (webhook/vault/pipeline action fired on matching task_event kinds). Pass 'id' to update.",
|
|
14696
|
+
inputSchema: upsert_hook,
|
|
14697
|
+
execute: async (client, input) => unwrap2(await client.hooks.upsert(input))
|
|
14698
|
+
}),
|
|
14699
|
+
devpad_hooks_delete: define_tool({
|
|
14700
|
+
name: "devpad_hooks_delete",
|
|
14701
|
+
description: "Delete a hook",
|
|
14702
|
+
inputSchema: hook_by_id,
|
|
14703
|
+
execute: async (client, input) => unwrap2(await client.hooks.delete(input.id))
|
|
14704
|
+
}),
|
|
14705
|
+
devpad_hooks_deliveries: define_tool({
|
|
14706
|
+
name: "devpad_hooks_deliveries",
|
|
14707
|
+
description: "List delivery attempts for a hook, optionally filtered by status (the DLQ is status=failed_permanent)",
|
|
14708
|
+
inputSchema: hook_deliveries_input,
|
|
14709
|
+
execute: async (client, input) => unwrap2(await client.hooks.deliveries(input.id, input.status))
|
|
14710
|
+
}),
|
|
14542
14711
|
devpad_goals_list: define_tool({
|
|
14543
14712
|
name: "devpad_goals_list",
|
|
14544
14713
|
description: "List goals for authenticated user",
|
|
@@ -14707,6 +14876,15 @@ var tools = {
|
|
|
14707
14876
|
}),
|
|
14708
14877
|
execute: async (client, input) => unwrap2(await client.tasks.claim(input.id, { actor: input.actor, base_rev: input.base_rev }))
|
|
14709
14878
|
}),
|
|
14879
|
+
devpad_tasks_done: define_tool({
|
|
14880
|
+
name: "devpad_tasks_done",
|
|
14881
|
+
description: "Complete a task through the single completion entrypoint (CompletionEngine). Returns { completed, bubbled, hooks_fired } — bubbled is the ordered chain of ancestors an auto_children cascade also completed. 409 on stale base_rev or if already completed.",
|
|
14882
|
+
inputSchema: exports_external.object({
|
|
14883
|
+
id: exports_external.string().describe("Task ID"),
|
|
14884
|
+
base_rev: exports_external.number().int().describe("Expected current rev — optimistic concurrency guard")
|
|
14885
|
+
}),
|
|
14886
|
+
execute: async (client, input) => unwrap2(await client.tasks.done(input.id, { base_rev: input.base_rev }))
|
|
14887
|
+
}),
|
|
14710
14888
|
devpad_tasks_link: define_tool({
|
|
14711
14889
|
name: "devpad_tasks_link",
|
|
14712
14890
|
description: "Create a typed edge between two tasks (blocks | relates_to | references | discovered_from | tracks_metric)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/mcp",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
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.
|
|
53
|
+
"@devpad/api": "^2.3.5",
|
|
54
54
|
"@types/node": "^24.3.0",
|
|
55
55
|
"typescript": "^5.0.0"
|
|
56
56
|
},
|