@devpad/mcp 2.5.2 → 2.6.0

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 +70 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7960,6 +7960,9 @@ class Index {
7960
7960
  function index(name) {
7961
7961
  return new IndexBuilderOn(name, false);
7962
7962
  }
7963
+ function uniqueIndex(name) {
7964
+ return new IndexBuilderOn(name, true);
7965
+ }
7963
7966
 
7964
7967
  // ../../node_modules/drizzle-orm/sqlite-core/primary-keys.js
7965
7968
  function primaryKey(...config) {
@@ -12108,7 +12111,7 @@ var createSelectSchema = (entity, refine) => {
12108
12111
  return handleColumns(columns, refine ?? {}, selectConditions);
12109
12112
  };
12110
12113
 
12111
- // ../api/dist/chunk-HIDAIYV4.js
12114
+ // ../api/dist/chunk-WM2RV3FZ.js
12112
12115
  var timestamps = () => ({
12113
12116
  created_at: text("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
12114
12117
  updated_at: text("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
@@ -12474,10 +12477,12 @@ var ignore_path = sqliteTable("ignore_path", {
12474
12477
  });
12475
12478
  var ROLLOUT_SHAPES = ["gradual", "atomic"];
12476
12479
  var RUN_KINDS = ["deploy", "rollback"];
12477
- var RUN_STATUSES = ["queued", "deploying", "baking", "awaiting_approval", "rolling_back", "completed", "rolled_back", "failed", "cancelled"];
12480
+ var RUN_STATUSES = ["queued", "deploying", "unconfirmed", "baking", "awaiting_approval", "rolling_back", "completed", "rolled_back", "failed", "cancelled"];
12478
12481
  var FORCED_ATOMIC_REASONS = ["do_migrations", "asset_affinity_none"];
12479
- var STAGE_EVENT_KINDS = ["deploy_started", "deploy_completed", "bake_started", "bake_completed", "gate_verdict", "approval_requested", "rollback_started", "rollback_completed", "warning", "error"];
12482
+ var STAGE_EVENT_KINDS = ["deploy_started", "deploy_completed", "deploy_failed", "dispatch_requested", "dispatch_failed", "timed_out", "bake_started", "bake_completed", "gate_verdict", "approval_requested", "rollback_started", "rollback_completed", "warning", "error"];
12480
12483
  var APPROVAL_DECISIONS = ["approved", "denied"];
12484
+ var DEPLOY_MODES = ["orchestrated", "external"];
12485
+ var DISPATCH_STATUSES = ["claimed", "dispatched", "failed"];
12481
12486
  var pipeline_package = sqliteTable("pipeline_package", {
12482
12487
  ...entity("pipeline-package"),
12483
12488
  owner_id: text("owner_id").notNull().references(() => user.id),
@@ -12485,12 +12490,15 @@ var pipeline_package = sqliteTable("pipeline_package", {
12485
12490
  repo_url: text("repo_url"),
12486
12491
  default_template_ref: text("default_template_ref"),
12487
12492
  script_name_overrides: text("script_name_overrides", { mode: "json" }),
12488
- project_id: text("project_id").references(() => project.id)
12493
+ project_id: text("project_id").references(() => project.id),
12494
+ deploy_mode: text("deploy_mode", { enum: DEPLOY_MODES }).notNull().default("orchestrated"),
12495
+ external_target: text("external_target", { mode: "json" })
12489
12496
  });
12490
12497
  var pipeline_run = sqliteTable("pipeline_run", {
12491
12498
  ...entity("pipeline-run"),
12492
12499
  package_id: text("package_id").notNull().references(() => pipeline_package.id),
12493
- version_set_id: text("version_set_id").notNull(),
12500
+ version_set_id: text("version_set_id"),
12501
+ commit_sha: text("commit_sha"),
12494
12502
  shape: text("shape", { enum: ROLLOUT_SHAPES }).notNull(),
12495
12503
  kind: text("kind", { enum: RUN_KINDS }).notNull().default("deploy"),
12496
12504
  status: text("status", { enum: RUN_STATUSES }).notNull().default("queued"),
@@ -12509,7 +12517,19 @@ var pipeline_stage_event = sqliteTable("pipeline_stage_event", {
12509
12517
  payload: text("payload", { mode: "json" }),
12510
12518
  ts: text("ts").notNull().default(sql`(CURRENT_TIMESTAMP)`),
12511
12519
  idempotency_hash: text("idempotency_hash")
12512
- });
12520
+ }, (table) => [
12521
+ uniqueIndex("idx_pipeline_stage_event_idem_uniq").on(table.run_id, table.idempotency_hash).where(sql`idempotency_hash IS NOT NULL`)
12522
+ ]);
12523
+ var pipeline_dispatch = sqliteTable("pipeline_dispatch", {
12524
+ ...id("pipeline-dispatch"),
12525
+ run_id: text("run_id").notNull().references(() => pipeline_run.id),
12526
+ stage_name: text("stage_name").notNull(),
12527
+ commit_sha: text("commit_sha").notNull(),
12528
+ status: text("status", { enum: DISPATCH_STATUSES }).notNull().default("claimed"),
12529
+ error: text("error"),
12530
+ requested_by: text("requested_by"),
12531
+ ...timestamps()
12532
+ }, (table) => [unique("pipeline_dispatch_run_stage_unique").on(table.run_id, table.stage_name)]);
12513
12533
  var pipeline_grant = sqliteTable("pipeline_grant", {
12514
12534
  ...entity("pipeline-grant"),
12515
12535
  package_id: text("package_id").notNull().references(() => pipeline_package.id),
@@ -12635,7 +12655,11 @@ var pipeline_package_relations = relations(pipeline_package, ({ one, many }) =>
12635
12655
  var pipeline_run_relations = relations(pipeline_run, ({ one, many }) => ({
12636
12656
  package: one(pipeline_package, { fields: [pipeline_run.package_id], references: [pipeline_package.id] }),
12637
12657
  events: many(pipeline_stage_event),
12638
- approvals: many(pipeline_approval)
12658
+ approvals: many(pipeline_approval),
12659
+ dispatches: many(pipeline_dispatch)
12660
+ }));
12661
+ var pipeline_dispatch_relations = relations(pipeline_dispatch, ({ one }) => ({
12662
+ run: one(pipeline_run, { fields: [pipeline_dispatch.run_id], references: [pipeline_run.id] })
12639
12663
  }));
12640
12664
  var pipeline_stage_event_relations = relations(pipeline_stage_event, ({ one }) => ({
12641
12665
  run: one(pipeline_run, { fields: [pipeline_stage_event.run_id], references: [pipeline_run.id] })
@@ -12805,6 +12829,7 @@ var run_kind = unionType([literalType("deploy"), literalType("rollback")]);
12805
12829
  var run_status = unionType([
12806
12830
  literalType("queued"),
12807
12831
  literalType("deploying"),
12832
+ literalType("unconfirmed"),
12808
12833
  literalType("baking"),
12809
12834
  literalType("awaiting_approval"),
12810
12835
  literalType("rolling_back"),
@@ -12817,6 +12842,10 @@ var forced_atomic_reason = unionType([literalType("do_migrations"), literalType(
12817
12842
  var stage_event_kind = unionType([
12818
12843
  literalType("deploy_started"),
12819
12844
  literalType("deploy_completed"),
12845
+ literalType("deploy_failed"),
12846
+ literalType("dispatch_requested"),
12847
+ literalType("dispatch_failed"),
12848
+ literalType("timed_out"),
12820
12849
  literalType("bake_started"),
12821
12850
  literalType("bake_completed"),
12822
12851
  literalType("gate_verdict"),
@@ -12827,6 +12856,16 @@ var stage_event_kind = unionType([
12827
12856
  literalType("error")
12828
12857
  ]);
12829
12858
  var approval_decision = unionType([literalType("approved"), literalType("denied")]);
12859
+ var deploy_mode = unionType([literalType("orchestrated"), literalType("external")]);
12860
+ var commit_sha = stringType().regex(/^[0-9a-f]{40}$/, "commit_sha must be a 40-hex SHA");
12861
+ var external_target = objectType({
12862
+ repo: stringType().regex(/^[^/\s]+\/[^/\s]+$/, "repo must be owner/name"),
12863
+ workflow: stringType().min(1).describe("workflow file name, e.g. deploy.yml"),
12864
+ ref: stringType().min(1).default("main"),
12865
+ timeout_ms: numberType().int().positive().default(2700000),
12866
+ gate: objectType({ type: literalType("manual") }).default({ type: "manual" })
12867
+ });
12868
+ var dispatch_status = unionType([literalType("claimed"), literalType("dispatched"), literalType("failed")]);
12830
12869
  var grant_scope = stringType().regex(/^[a-z0-9_-]+:[a-z0-9_-]+(:[^\s]+)?$/, "Invalid scope format");
12831
12870
  var rollout_stage = objectType({
12832
12871
  name: stringType(),
@@ -12855,12 +12894,15 @@ var upsert_pipeline_package = objectType({
12855
12894
  repo_url: stringType().nullable().optional(),
12856
12895
  default_template_ref: stringType().nullable().optional(),
12857
12896
  script_name_overrides: recordType(stringType(), stringType()).nullable().optional(),
12858
- project_id: stringType().nullable().optional()
12897
+ project_id: stringType().nullable().optional(),
12898
+ deploy_mode: deploy_mode.optional(),
12899
+ external_target: external_target.nullable().optional()
12859
12900
  });
12860
12901
  var upsert_pipeline_run = objectType({
12861
12902
  id: stringType().optional().nullable(),
12862
12903
  package_id: stringType(),
12863
- version_set_id: stringType(),
12904
+ version_set_id: stringType().nullable(),
12905
+ commit_sha: commit_sha.nullable().optional(),
12864
12906
  shape: rollout_shape,
12865
12907
  kind: run_kind.optional(),
12866
12908
  status: run_status.optional(),
@@ -12893,6 +12935,15 @@ var upsert_pipeline_approval = objectType({
12893
12935
  decided_by: stringType().nullable().optional(),
12894
12936
  decided_at: stringType().nullable().optional()
12895
12937
  });
12938
+ var upsert_pipeline_dispatch = objectType({
12939
+ id: stringType().optional().nullable(),
12940
+ run_id: stringType(),
12941
+ stage_name: stringType(),
12942
+ commit_sha,
12943
+ status: dispatch_status.optional(),
12944
+ error: stringType().nullable().optional(),
12945
+ requested_by: stringType().nullable().optional()
12946
+ });
12896
12947
  var upsert_pipeline_analysis_template = objectType({
12897
12948
  id: stringType().optional(),
12898
12949
  owner_id: stringType().min(1),
@@ -14494,6 +14545,8 @@ var ApiClient2 = class {
14494
14545
  })),
14495
14546
  cancel: (run_id) => wrap(() => this.clients.pipelines.post(`/runs/${run_id}/cancel`, { body: {} })),
14496
14547
  rollback: (run_id) => wrap(() => this.clients.pipelines.post(`/runs/${run_id}/rollback`, { body: {} })),
14548
+ redispatch: (run_id) => wrap(() => this.clients.pipelines.post(`/runs/${run_id}/redispatch`, { body: {} })),
14549
+ dispatches: (run_id) => wrap(() => this.clients.pipelines.get(`/runs/${run_id}/dispatches`)),
14497
14550
  events: {
14498
14551
  ingest: (run_id, input) => wrap(() => this.clients.pipelines.post(`/runs/${run_id}/events`, {
14499
14552
  body: input
@@ -15304,6 +15357,14 @@ var tools = {
15304
15357
  }),
15305
15358
  execute: async (client, input) => unwrap2(await client.pipelines.get(input.run_id))
15306
15359
  }),
15360
+ devpad_pipelines_dispatches: define_tool({
15361
+ name: "devpad_pipelines_dispatches",
15362
+ description: "List a pipeline run's dispatch ledger rows (external deploy mode #155): per-stage claim/dispatch status, error text, and requesting actor. Read-only.",
15363
+ inputSchema: objectType({
15364
+ run_id: stringType().describe("Pipeline run ID")
15365
+ }),
15366
+ execute: async (client, input) => unwrap2(await client.pipelines.dispatches(input.run_id))
15367
+ }),
15307
15368
  devpad_pipelines_create: define_tool({
15308
15369
  name: "devpad_pipelines_create",
15309
15370
  description: "Create a new pipeline run",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/mcp",
3
- "version": "2.5.2",
3
+ "version": "2.6.0",
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.5.2",
53
+ "@devpad/api": "^2.6.0",
54
54
  "@types/node": "^24.3.0",
55
55
  "typescript": "^5.0.0"
56
56
  },