run402 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.
package/lib/deploy-v2.mjs CHANGED
@@ -56,7 +56,7 @@ import { sdkStats, printVerboseStats } from "./stats.mjs";
56
56
  const DEPLOY_HELP = `run402 deploy — Deploy a release from a manifest (the unified deploy primitive)
57
57
 
58
58
  Usage:
59
- run402 deploy [--project <project_id>] [--check|--print-spec|--print-manifest|--plan|--require-plan <plan_id>] [--no-rehearse] [--quiet|--final-only] [--json]
59
+ run402 deploy [--project <project_id>] [--check|--print-spec|--print-manifest|--plan|--require-plan <plan_id>] [--no-rehearse] [--no-snapshot] [--quiet|--final-only] [--json]
60
60
  run402 deploy --manifest <path> [--project <project_id>] [...same options]
61
61
  run402 deploy --spec '<json>' [--project <project_id>] [...same options]
62
62
  run402 deploy --dir <build-output> [--manifest <path>] [--project <project_id>]
@@ -134,6 +134,10 @@ Options:
134
134
  against a project with a live release is rehearsed on a contained
135
135
  branch and committed only on a passing report (result.rehearsal);
136
136
  a first deploy has nothing to protect and commits directly.
137
+ --no-snapshot Commit without the automatic pre-migration snapshot, so the
138
+ migrations run with no restore point
139
+ (result.snapshot_skipped_reason: "explicit_skip_requested").
140
+ A rehearsal still captures the project.
137
141
  --require-plan <plan_id> Deploy only if this reviewed plan still matches.
138
142
  --json No-op compatibility flag; success output is always JSON.
139
143
  --quiet Suppress per-event JSON-line stderr (final result still on stdout)
@@ -809,10 +813,11 @@ function parseDeployArgs(args) {
809
813
  mode: null,
810
814
  planFingerprint: null,
811
815
  noRehearse: false,
816
+ noSnapshot: false,
812
817
  allowDirty: false,
813
818
  verbose: false,
814
819
  };
815
- const allowedFlags = ["--manifest", "--spec", "--dir", "--project", "--quiet", "--final-only", "--json", "--allow-warning", "--allow-warnings", "--check", "--print-spec", "--print-manifest", "--plan", "--no-rehearse", "--require-plan", "--plan-fingerprint", "--allow-dirty", "-v", "--verbose", "--help", "-h"];
820
+ const allowedFlags = ["--manifest", "--spec", "--dir", "--project", "--quiet", "--final-only", "--json", "--allow-warning", "--allow-warnings", "--check", "--print-spec", "--print-manifest", "--plan", "--no-rehearse", "--no-snapshot", "--require-plan", "--plan-fingerprint", "--allow-dirty", "-v", "--verbose", "--help", "-h"];
816
821
 
817
822
  for (let i = 0; i < args.length; i++) {
818
823
  const arg = args[i];
@@ -878,6 +883,7 @@ function parseDeployArgs(args) {
878
883
  if (arg === "--print-manifest") { setApplyMode(opts, "printManifest", "--print-manifest"); continue; }
879
884
  if (arg === "--plan") { setApplyMode(opts, "plan", "--plan"); continue; }
880
885
  if (arg === "--no-rehearse") { opts.noRehearse = true; continue; }
886
+ if (arg === "--no-snapshot") { opts.noSnapshot = true; continue; }
881
887
  if (typeof arg === "string" && arg.startsWith("-")) {
882
888
  fail({
883
889
  code: "BAD_USAGE",
@@ -1408,6 +1414,7 @@ async function deployCmd(args) {
1408
1414
  allowWarnings: opts.allowWarnings,
1409
1415
  allowWarningCodes: opts.allowWarningCodes,
1410
1416
  ...(opts.noRehearse ? { noRehearse: true } : {}),
1417
+ ...(opts.noSnapshot ? { noSnapshot: true } : {}),
1411
1418
  ...(requiredPlan ? { requiredPlan } : {}),
1412
1419
  },
1413
1420
  target: isCoreApiTarget() ? "core" : "cloud",
package/lib/functions.mjs CHANGED
@@ -12,8 +12,8 @@ export const FUNCTION_LOG_TAIL_MAX = 1000;
12
12
  // Shared by `run402 functions logs` and the top-level `run402 logs` shortcut
13
13
  // (cli/lib/logs.mjs) so the two commands validate identically.
14
14
 
15
- /** `--since <iso|epoch_ms>` → ISO string, or a BAD_USAGE exit. */
16
- export function parseLogSinceFlag(since) {
15
+ /** `--since <iso|epoch_ms>` (or `--until`, with flag) → ISO string, or a BAD_USAGE exit. */
16
+ export function parseLogSinceFlag(since, flag = "--since") {
17
17
  if (since === undefined || since === null) return undefined;
18
18
  const raw = String(since).trim();
19
19
  const ms = /^\d+$/.test(raw)
@@ -24,8 +24,8 @@ export function parseLogSinceFlag(since) {
24
24
  if (!Number.isSafeInteger(ms) || ms < 0) {
25
25
  fail({
26
26
  code: "BAD_USAGE",
27
- message: `Invalid --since value: ${since}`,
28
- details: { flag: "--since", value: since },
27
+ message: `Invalid ${flag} value: ${since}`,
28
+ details: { flag, value: since },
29
29
  });
30
30
  }
31
31
  return new Date(ms).toISOString();
@@ -85,7 +85,7 @@ Subcommands:
85
85
  --raw prints the response body verbatim
86
86
  (string body → text + newline, JSON
87
87
  body → pretty-printed JSON).
88
- logs [<name>] [--project <project_id>] [--tail <n>] [--since <ts>] [--request-id <request_id>] [--app|--platform|--all] [--follow]
88
+ logs [<name>] [--project <project_id>] [--tail <n>] [--since <ts>] [--until <ts>] [--request-id <request_id>] [--app|--platform|--all] [--follow]
89
89
  Get function logs (app output by default;
90
90
  omit <name> with --request-id to search
91
91
  every function)
@@ -245,9 +245,12 @@ Arguments:
245
245
 
246
246
  Options:
247
247
  --project <project_id> Target project ID (defaults to the active project)
248
- --tail <n> Number of most-recent entries (default 50, max 1000).
249
- Bounds the read BEFORE the origin filter below.
248
+ --tail <n> Number of most-recent entries (default 50, max 1000),
249
+ counted after the origin filter below.
250
250
  --since <ts> ISO timestamp or epoch ms; only entries after this
251
+ --until <ts> ISO timestamp or epoch ms; only entries before this, to
252
+ read an earlier window that newer entries push out of --tail.
253
+ Not with --follow.
251
254
  --request-id <request_id> Only entries correlated to this req_ (the
252
255
  x-run402-request-id response header), fnrun_, or fnatt_ id
253
256
  --app Only the function's own output (default). Lambda runtime
@@ -535,20 +538,22 @@ function validateInvokeJsonBody(value, source, projectId, name) {
535
538
  }
536
539
 
537
540
  async function logs(projectId, name, args) {
538
- const usage = "run402 functions logs <name> [--project <project_id>] [--tail <n>] [--since <ts>] [--request-id <request_id>] [--app|--platform|--all] [--follow] | run402 functions logs --request-id <request_id> [--project <project_id>]";
541
+ const usage = "run402 functions logs <name> [--project <project_id>] [--tail <n>] [--since <ts>] [--until <ts>] [--request-id <request_id>] [--app|--platform|--all] [--follow] | run402 functions logs --request-id <request_id> [--project <project_id>]";
539
542
  assertRequiredProject(projectId, usage);
540
543
  assertKnownFlags(
541
544
  args,
542
- ["--tail", "--since", "--request-id", "--follow", "--app", "--platform", "--all", "--help", "-h"],
543
- ["--tail", "--since", "--request-id"],
545
+ ["--tail", "--since", "--until", "--request-id", "--follow", "--app", "--platform", "--all", "--help", "-h"],
546
+ ["--tail", "--since", "--until", "--request-id"],
544
547
  );
545
548
  let tail = 50;
546
549
  let since = undefined;
550
+ let until = undefined;
547
551
  let requestId = undefined;
548
552
  let follow = false;
549
553
  for (let i = 0; i < args.length; i++) {
550
554
  if (args[i] === "--tail") tail = parseIntegerFlag("--tail", args[++i], { min: 1, max: FUNCTION_LOG_TAIL_MAX });
551
555
  if (args[i] === "--since" && args[i + 1]) since = args[++i];
556
+ if (args[i] === "--until" && args[i + 1]) until = args[++i];
552
557
  if (args[i] === "--request-id" && args[i + 1]) requestId = args[++i];
553
558
  if (args[i] === "--follow") follow = true;
554
559
  }
@@ -557,7 +562,11 @@ async function logs(projectId, name, args) {
557
562
  // Keep CLI-side validation so a bad `--since` / `--request-id` errors with
558
563
  // a clear message before any network call.
559
564
  let sinceIso = parseLogSinceFlag(since);
565
+ const untilIso = parseLogSinceFlag(until, "--until");
560
566
  assertLogRequestIdFlag(requestId);
567
+ if (follow && untilIso !== undefined) {
568
+ fail({ code: "BAD_USAGE", message: "--until reads a past window; --follow streams new entries. Pass one.", details: { flag: "--until" } });
569
+ }
561
570
 
562
571
  if (!name) {
563
572
  if (!requestId) {
@@ -575,7 +584,7 @@ async function logs(projectId, name, args) {
575
584
  });
576
585
  }
577
586
  try {
578
- const result = await getSdk().functions.logsByRequestId(projectId, requestId, { tail, since: sinceIso, origin });
587
+ const result = await getSdk().functions.logsByRequestId(projectId, requestId, { tail, since: sinceIso, until: untilIso, origin });
579
588
  const hint = platformHiddenHint(result.entries, result.hidden);
580
589
  console.log(JSON.stringify({
581
590
  logs: result.entries,
@@ -597,6 +606,7 @@ async function logs(projectId, name, args) {
597
606
  return await getSdk().functions.logs(projectId, name, {
598
607
  tail,
599
608
  since: sinceIso,
609
+ until: untilIso,
600
610
  requestId,
601
611
  origin,
602
612
  });
package/lib/logs.mjs CHANGED
@@ -46,8 +46,10 @@ Required (one of):
46
46
 
47
47
  Optional:
48
48
  --project <project_id> Project id (default: \$RUN402_PROJECT_ID, else the active project)
49
- --tail <n> Max entries per function BEFORE the origin filter (default 100, max 1000)
49
+ --tail <n> Max entries per function, counted after the origin filter (default 100, max 1000)
50
50
  --since <ts> ISO timestamp or epoch ms; only entries at or after this
51
+ --until <ts> ISO timestamp or epoch ms; only entries before this, to read
52
+ an earlier window that newer entries push out of --tail
51
53
  --app Only the function's own output (default). Lambda runtime
52
54
  lines (INIT_START, START/END/REPORT RequestId, billed
53
55
  duration) are hidden; "hidden.platform" counts them and a
@@ -72,6 +74,7 @@ Examples:
72
74
  run402 logs ssr --request-id req_abc123 --all
73
75
  run402 logs --request-id fnrun_abc123 --project prj_xyz
74
76
  run402 logs --function checkout --tail 20
77
+ run402 logs --function ssr --since 2026-11-12T08:00:00Z --until 2026-11-12T08:10:00Z
75
78
 
76
79
  Tip: the request id appears in:
77
80
  - The 'x-run402-request-id' response header on every function response
@@ -80,7 +83,7 @@ Tip: the request id appears in:
80
83
  - The 'samples' of 'run402 errors list' (each sample names a runnable logs command)
81
84
  `;
82
85
 
83
- const VALUE_FLAGS = ["--request-id", "--function", "--project", "--tail", "--since"];
86
+ const VALUE_FLAGS = ["--request-id", "--function", "--project", "--tail", "--since", "--until"];
84
87
  const KNOWN_FLAGS = [...VALUE_FLAGS, "--app", "--platform", "--all", "--help", "-h"];
85
88
 
86
89
  export async function run(sub, args = []) {
@@ -96,6 +99,7 @@ export async function run(sub, args = []) {
96
99
  const projectIdArg = flagValue(all, "--project") ?? undefined;
97
100
  const tailArg = flagValue(all, "--tail") ?? undefined;
98
101
  const sinceArg = flagValue(all, "--since") ?? undefined;
102
+ const untilArg = flagValue(all, "--until") ?? undefined;
99
103
  const origin = resolveLogOriginFlag(all);
100
104
 
101
105
  const positionals = positionalArgs(all, VALUE_FLAGS);
@@ -136,6 +140,7 @@ export async function run(sub, args = []) {
136
140
 
137
141
  const tail = parseIntegerFlag("--tail", tailArg, { min: 1, max: FUNCTION_LOG_TAIL_MAX, def: 100 });
138
142
  const since = parseLogSinceFlag(sinceArg);
143
+ const until = parseLogSinceFlag(untilArg, "--until");
139
144
 
140
145
  const sdk = getSdk();
141
146
  try {
@@ -143,6 +148,7 @@ export async function run(sub, args = []) {
143
148
  const result = await sdk.functions.logsByRequestId(projectId, requestId, {
144
149
  tail,
145
150
  since,
151
+ until,
146
152
  origin,
147
153
  ...(fnName !== undefined && { functionName: fnName }),
148
154
  });
@@ -160,7 +166,7 @@ export async function run(sub, args = []) {
160
166
  }
161
167
 
162
168
  // --function alone: that function's recent tail, same envelope.
163
- const result = await sdk.functions.logs(projectId, fnName, { tail, since, origin });
169
+ const result = await sdk.functions.logs(projectId, fnName, { tail, since, until, origin });
164
170
  emit({
165
171
  ok: true,
166
172
  request_id: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.149.1",
3
+ "version": "4.151.0",
4
4
  "description": "CLI 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.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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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E;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