run402-mcp 4.149.1 → 4.151.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.
@@ -782,7 +782,7 @@ const info = await r.projects.info(projectId);
782
782
 
783
783
  ## Rehearsals, snapshots, and branches
784
784
 
785
- Rehearsal is automatic inside `apply()` and `r.up()`: when the plan's `rehearsal.available` is true (migrations, and the project has a live release), the plan is rehearsed on a contained branch and committed only on a passing report, bound to the report's `required_plan`. The result carries `rehearsal: { status: "passed", report, operation_id, branch_project_id }`, or `{ status: "skipped", reason: "no_live_release" | "no_migrations" | "migrations_unchanged" | "ci_session_unsupported" | "disabled" | "reviewed_plan" | "unsupported" }` (`migrations_unchanged`: every migration is already applied with an identical checksum — `plan.migrations.new` is empty — so nothing is rehearsed and a page-only redeploy ships in seconds; `ci_session_unsupported`: the plan was made by a CI session, which the gateway does not rehearse, so it commits directly). A failed rehearsal throws `Run402DeployError` with `code: "REHEARSAL_FAILED"` (the report is in `body.rehearsal`, its next actions in `body.next_actions`); nothing is committed. A project whose table data is over the 128 MiB capture size limit cannot be rehearsed: the report's `error.code` is `CAPTURE_SIZE_LIMIT_EXCEEDED`, no branch is made, and the next actions are `commit_plan` (commit the plan without a rehearsal, by passing its `required_plan`; the commit takes no restore point either) and `shrink_database`. Pass `{ noRehearse: true }` to skip it. The rehearsal runs on the gateway as an operation, not inside one request: the SDK starts it with `Prefer: respond-async` and polls the operation until its report is there, so a slow snapshot never holds a request open; a rehearsal whose gateway task stopped before it finished throws `OPERATION_INTERRUPTED` (retryable, `operationId` set, the branch it left in `body.details.branch_project_id`). `onEvent` sees `rehearsal.started`, the recorded `rehearsal.phase` events, `rehearsal.finished`, and `rehearsal.skipped`.
785
+ Rehearsal is automatic inside `apply()` and `r.up()`: when the plan's `rehearsal.available` is true (migrations, and the project has a live release), the plan is rehearsed on a contained branch and committed only on a passing report, bound to the report's `required_plan`. The result carries `rehearsal: { status: "passed", report, operation_id, branch_project_id }`, or `{ status: "skipped", reason: "no_live_release" | "no_migrations" | "migrations_unchanged" | "ci_session_unsupported" | "disabled" | "reviewed_plan" | "unsupported" }` (`migrations_unchanged`: every migration is already applied with an identical checksum — `plan.migrations.new` is empty — so nothing is rehearsed and a page-only redeploy ships in seconds; `ci_session_unsupported`: the plan was made by a CI session, which the gateway does not rehearse, so it commits directly). A failed rehearsal throws `Run402DeployError` with `code: "REHEARSAL_FAILED"` (the report is in `body.rehearsal`, its next actions in `body.next_actions`); nothing is committed. A project whose table data is over the 128 MiB capture size limit cannot be rehearsed: the report's `error.code` is `CAPTURE_SIZE_LIMIT_EXCEEDED`, no branch is made, and the next actions are `commit_plan` (commit the plan without a rehearsal, by passing its `required_plan`; the commit takes no restore point either) and `shrink_database`. A project whose rehearsal capture would push its organization past its storage limit cannot be rehearsed either: the report's `error.code` is `QUOTA_EXCEEDED` (`details.project_id`), no branch is made, and the next actions are `commit_plan` (its `body` carries `required_plan` and `snapshot: "skip"`: commit with `{ requiredPlan, noSnapshot: true }`, because the commit's own pre-migration snapshot meets the same limit; the migrations run with no restore point), `delete_snapshot` and `renew_tier`. Pass `{ noRehearse: true }` to skip the rehearsal. Pass `{ noSnapshot: true }` to commit without the automatic pre-migration snapshot (the commit body's `snapshot: "skip"`; the result carries `snapshot_skipped_reason: "explicit_skip_requested"`); a rehearsal, when one runs, still captures the project. The rehearsal runs on the gateway as an operation, not inside one request: the SDK starts it with `Prefer: respond-async` and polls the operation until its report is there, so a slow snapshot never holds a request open; a rehearsal whose gateway task stopped before it finished throws `OPERATION_INTERRUPTED` (retryable, `operationId` set, the branch it left in `body.details.branch_project_id`). `onEvent` sees `rehearsal.started`, the recorded `rehearsal.phase` events, `rehearsal.finished`, and `rehearsal.skipped`.
786
786
 
787
787
  The primitive is still there for experts: `r.project(id).apply.rehearse(planId, { teardown })` rehearses an already-persisted plan without committing and polls its operation for the report (a project with no live release rehearses on an EMPTY branch — never a refusal).
788
788
 
@@ -2071,10 +2071,11 @@ deploy(projectId, opts: {
2071
2071
  deps?: string[], schedule?: string | null,
2072
2072
  }): Promise<FunctionDeployResult> // routes through unified apply (functions.patch.set). result: { name, url, status, runtime, schedule, warnings }; runtime_version & deps_resolved are null via this path - read r.functions.list() for resolved versions
2073
2073
  invoke(projectId, name, opts?: { method?, body?, headers?, idempotencyKey?, wait? }): Promise<FunctionInvokeResult> // paid calls require a stable idempotencyKey; wait polls a 202 run handle and replays the same key for the retained result
2074
- logs(projectId, name, opts?: { tail?, since?, requestId?, origin? }): Promise<FunctionLogsResult>
2074
+ logs(projectId, name, opts?: { tail?, since?, until?, requestId?, origin? }): Promise<FunctionLogsResult>
2075
2075
  // every entry carries origin: "app" | "platform" (computed client-side by the exported classifyFunctionLogLine);
2076
- // origin filters client-side (default "all") and the result reports origin + hidden: { platform, app } when filtered
2077
- logsByRequestId(projectId, requestId, opts?: { tail?, since?, origin?, functionName? }): Promise<FunctionLogsByRequestIdResult>
2076
+ // origin (default "all") is applied by the gateway while it reads, so tail counts kept lines; the result reports
2077
+ // origin + hidden: { platform, app } when filtered. until (exclusive) reads an earlier window than the newest tail
2078
+ logsByRequestId(projectId, requestId, opts?: { tail?, since?, until?, origin?, functionName? }): Promise<FunctionLogsByRequestIdResult>
2078
2079
  // project-wide request-id search (the x-run402-request-id response header; fnrun_/fnatt_ ids too): lists the project's
2079
2080
  // functions (or just functionName), reads each with the request_id filter, returns { request_id, scanned, entries (each
2080
2081
  // with function), errors (each with function, message, code?), origin, hidden? } merged oldest-first. Also r.project(id).functions.logsByRequestId(...)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402-mcp",
3
- "version": "4.149.1",
3
+ "version": "4.151.0",
4
4
  "packageManager": "npm@11.19.0",
5
5
  "mcpName": "com.run402/mcp",
6
6
  "description": "MCP server for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
@@ -84,6 +84,8 @@ export declare class Deploy {
84
84
  * commit that carries neither.
85
85
  */
86
86
  vault?: VaultCommitDeclaration;
87
+ /** Commit without the automatic pre-migration snapshot (`snapshot: "skip"`); the migrations then have no restore point. */
88
+ noSnapshot?: boolean;
87
89
  }): Promise<DeployResult>;
88
90
  rehearse(planId: string, opts?: RehearsePlanOptions): Promise<RehearsePlanResult>;
89
91
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/namespaces/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAwB3C,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAQtB,WAAW,EACX,oBAAoB,EAEpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EAIvB,sBAAsB,EACtB,oBAAoB,EAUpB,iBAAiB,EAGjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAGlB,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAiH3B,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAnC,YAA6B,MAAM,EAAE,MAAM,EAAI;IAE/C;;;;OAIG;IACG,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAiD7E;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,CAE1E;IAED;;;;OAIG;IACG,IAAI,CACR,IAAI,EAAE,WAAW,EACjB,IAAI,GAAE;QACJ,cAA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B,CAAC,CAkClC;IAED;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA2B7E;IAED;;;;OAIG;IACG,gBAAgB,CACpB,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,sBAAsB,CAAC,CAmBjC;IAED;;;;OAIG;IACG,IAAI,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA6BlE;IAED;;;;OAIG;IACG,OAAO,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAUxE;CACF;AA+5ED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;iEAG6D;IAC7D,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;CACvC;AA2iFD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD"}
@@ -214,7 +214,7 @@ export class Deploy {
214
214
  */
215
215
  async commit(planId, opts = {}) {
216
216
  const emit = makeEmitter(opts.onEvent);
217
- const commit = requireCloudCommitResponse(await commitInternal(this.client, planId, opts.idempotencyKey, opts.project, opts.requiredPlan, opts.vault), "committing deploy");
217
+ const commit = requireCloudCommitResponse(await commitInternal(this.client, planId, opts.idempotencyKey, opts.project, opts.requiredPlan, opts.vault, undefined, opts.noSnapshot), "committing deploy");
218
218
  return await pollUntilReady(this.client, commit, {}, [], emit, opts.project);
219
219
  }
220
220
  async rehearse(planId, opts = {}) {
@@ -783,7 +783,7 @@ async function applyOnce(client, spec, opts, emit) {
783
783
  ...(sliceKinds.length > 0 ? { slice_kinds: sliceKinds } : {}),
784
784
  });
785
785
  const planId = requirePlanId(plan, "applying deploy to Core");
786
- const commit = await commitInternal(client, planId, opts.idempotencyKey, spec.project_id, opts.requiredPlan);
786
+ const commit = await commitInternal(client, planId, opts.idempotencyKey, spec.project_id, opts.requiredPlan, undefined, undefined, opts.noSnapshot);
787
787
  if (!isCoreCommitResponse(commit)) {
788
788
  return await pollUntilReady(client, commit, plan.diff, plan.warnings, emit, spec.project_id, sliceKinds);
789
789
  }
@@ -818,7 +818,7 @@ async function applyOnce(client, spec, opts, emit) {
818
818
  apply_plan_sha256: plan.vault?.apply_plan_sha256 ?? null,
819
819
  })
820
820
  : undefined;
821
- const commit = requireCloudCommitResponse(await commitInternal(client, planId, opts.idempotencyKey, spec.project_id, requiredPlan, vaultCommit, operationId), "applying deploy");
821
+ const commit = requireCloudCommitResponse(await commitInternal(client, planId, opts.idempotencyKey, spec.project_id, requiredPlan, vaultCommit, operationId, opts.noSnapshot), "applying deploy");
822
822
  const result = await pollUntilReady(client, commit, plan.diff, plan.warnings, emit, spec.project_id, sliceKinds);
823
823
  result.rehearsal = rehearsal.block;
824
824
  // v1.48 unified-apply: thread the plan response's `asset_entries[]` back
@@ -1744,7 +1744,7 @@ function expandCronNumberPart(part, min, max) {
1744
1744
  }
1745
1745
  return values;
1746
1746
  }
1747
- async function commitInternal(client, planId, idempotencyKey, project, requiredPlan, vault, operationId) {
1747
+ async function commitInternal(client, planId, idempotencyKey, project, requiredPlan, vault, operationId, noSnapshot) {
1748
1748
  const tries = { attempts: 0 };
1749
1749
  try {
1750
1750
  const body = {};
@@ -1754,6 +1754,10 @@ async function commitInternal(client, planId, idempotencyKey, project, requiredP
1754
1754
  body.required_plan = requiredPlanToWire(requiredPlan);
1755
1755
  if (vault)
1756
1756
  body.vault = vault;
1757
+ // The commit takes no pre-migration snapshot; the result then carries
1758
+ // `snapshot_skipped_reason: "explicit_skip_requested"`.
1759
+ if (noSnapshot)
1760
+ body.snapshot = "skip";
1757
1761
  const send = () => client.request(`/apply/v1/plans/${encodeURIComponent(planId)}/commit`, {
1758
1762
  method: "POST",
1759
1763
  body,
@@ -2405,7 +2409,7 @@ async function startInternal(client, spec, opts) {
2405
2409
  ...(sliceKinds.length > 0 ? { slice_kinds: sliceKinds } : {}),
2406
2410
  });
2407
2411
  const { planId, operationId } = requirePersistedPlan(plan, "starting deploy");
2408
- const commit = requireCloudCommitResponse(await commitInternal(client, planId, opts.idempotencyKey, spec.project_id, opts.requiredPlan, undefined, operationId), "starting deploy");
2412
+ const commit = requireCloudCommitResponse(await commitInternal(client, planId, opts.idempotencyKey, spec.project_id, opts.requiredPlan, undefined, operationId, opts.noSnapshot), "starting deploy");
2409
2413
  return await pollUntilReady(client, commit, plan.diff, plan.warnings, emit, spec.project_id, sliceKinds);
2410
2414
  })();
2411
2415
  // Avoid an unhandled-rejection at construction time. Consumers must call