@devpad/mcp 2.3.4 → 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 +125 -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",
|
|
@@ -12486,6 +12488,32 @@ var task_event = sqliteTable("task_event", {
|
|
|
12486
12488
|
index("task_event_subject_id_idx").on(table.subject_id),
|
|
12487
12489
|
index("task_event_dispatch_status_idx").on(table.dispatch_status)
|
|
12488
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)]);
|
|
12489
12517
|
var checklist = sqliteTable("checklist", {
|
|
12490
12518
|
...entity("checklist"),
|
|
12491
12519
|
task_id: text("task_id").notNull().references(() => task.id),
|
|
@@ -12679,6 +12707,13 @@ var task_rollup_relations = relations(task_rollup, ({ one }) => ({
|
|
|
12679
12707
|
var task_event_relations = relations(task_event, ({ one }) => ({
|
|
12680
12708
|
subject: one(task, { fields: [task_event.subject_id], references: [task.id] })
|
|
12681
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
|
+
}));
|
|
12682
12717
|
var checklist_relations = relations(checklist, ({ one, many }) => ({
|
|
12683
12718
|
task: one(task, { fields: [checklist.task_id], references: [task.id] }),
|
|
12684
12719
|
items: many(checklist_item)
|
|
@@ -13053,6 +13088,52 @@ var task_event_payload = exports_external.discriminatedUnion("kind", [
|
|
|
13053
13088
|
exports_external.object({ kind: exports_external.literal("policy.fired"), policy: exports_external.enum(COMPLETION_POLICIES) }),
|
|
13054
13089
|
exports_external.object({ kind: exports_external.literal("node.completion_stale"), child_id: exports_external.string() })
|
|
13055
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
|
+
});
|
|
13056
13137
|
|
|
13057
13138
|
// ../../node_modules/@f0rbit/corpus/dist/types.js
|
|
13058
13139
|
var ok = (value) => ({ ok: true, value });
|
|
@@ -13946,6 +14027,12 @@ var ApiClient2 = class {
|
|
|
13946
14027
|
delete: (id2) => wrap(() => this.clients.milestones.delete(`/milestones/${id2}`)),
|
|
13947
14028
|
goals: (id2) => wrap(() => this.clients.milestones.get(`/milestones/${id2}/goals`))
|
|
13948
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
|
+
};
|
|
13949
14036
|
this.goals = {
|
|
13950
14037
|
list: () => wrap(() => this.clients.goals.get("/goals")),
|
|
13951
14038
|
find: (id2) => wrap(() => this.clients.goals.get(`/goals/${id2}`)),
|
|
@@ -14403,7 +14490,8 @@ var ApiClient2 = class {
|
|
|
14403
14490
|
blog: new ApiClient({ ...clientOptions, category: "blog" }),
|
|
14404
14491
|
media: new ApiClient({ ...clientOptions, category: "media" }),
|
|
14405
14492
|
pulse: new ApiClient({ ...clientOptions, base_url: `${base_url}/pulse`, category: "pulse" }),
|
|
14406
|
-
pipelines: new ApiClient({ ...clientOptions, category: "pipelines" })
|
|
14493
|
+
pipelines: new ApiClient({ ...clientOptions, category: "pipelines" }),
|
|
14494
|
+
hooks: new ApiClient({ ...clientOptions, category: "hooks" })
|
|
14407
14495
|
};
|
|
14408
14496
|
}
|
|
14409
14497
|
history() {
|
|
@@ -14489,6 +14577,16 @@ var milestone_by_id = exports_external.object({
|
|
|
14489
14577
|
var goal_by_id = exports_external.object({
|
|
14490
14578
|
id: exports_external.string().describe("Goal ID")
|
|
14491
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
|
+
});
|
|
14492
14590
|
var github_branches = exports_external.object({
|
|
14493
14591
|
owner: exports_external.string().describe("Repository owner"),
|
|
14494
14592
|
repo: exports_external.string().describe("Repository name")
|
|
@@ -14586,6 +14684,30 @@ var tools = {
|
|
|
14586
14684
|
finished_at: input.finished_at
|
|
14587
14685
|
}))
|
|
14588
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
|
+
}),
|
|
14589
14711
|
devpad_goals_list: define_tool({
|
|
14590
14712
|
name: "devpad_goals_list",
|
|
14591
14713
|
description: "List goals for authenticated user",
|
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
|
},
|