neon 8.4.4 → 8.5.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 (75) hide show
  1. package/README.md +11 -11
  2. package/dist/_chunks/{env-4WGRW2nw.js → env-BNm69Qh8.js} +2 -5
  3. package/dist/commands/config.js +11 -28
  4. package/dist/commands/dev.js +3 -3
  5. package/dist/commands/env.js +2 -3
  6. package/dist/commands/index.js +0 -2
  7. package/dist/commands/init.js +1 -2
  8. package/dist/commands/manifest.js +2 -10
  9. package/dist/commands/realtime.js +2 -1
  10. package/dist/commands/subscribe.js +24 -43
  11. package/dist/credential_io.js +1 -2
  12. package/dist/dev/env.js +1 -2
  13. package/dist/index.js +2 -2
  14. package/dist/init/run.js +1 -2
  15. package/dist/plugins/run.js +2 -1
  16. package/dist/psql/command/cmd_io.js +1 -2
  17. package/dist/psql/command/cmd_pipeline.js +1 -2
  18. package/dist/psql/core/common.js +1 -2
  19. package/dist/psql/core/startup.js +1 -2
  20. package/dist/psql/index.js +1 -2
  21. package/dist/psql/types/index.js +1 -2
  22. package/dist/skills/catalog.js +5 -0
  23. package/dist/utils/hooks.js +0 -2
  24. package/dist/utils/staging.js +1 -14
  25. package/{LICENSE → dist/vendor/postgres-meta/LICENSE} +0 -1
  26. package/dist/vendor/postgres-meta/constants.js +14 -0
  27. package/dist/vendor/postgres-meta/lib/PostgresMeta.js +49 -0
  28. package/dist/vendor/postgres-meta/lib/PostgresMetaColumnPrivileges.js +85 -0
  29. package/dist/vendor/postgres-meta/lib/PostgresMetaColumns.js +235 -0
  30. package/dist/vendor/postgres-meta/lib/PostgresMetaConfig.js +16 -0
  31. package/dist/vendor/postgres-meta/lib/PostgresMetaExtensions.js +79 -0
  32. package/dist/vendor/postgres-meta/lib/PostgresMetaForeignTables.js +81 -0
  33. package/dist/vendor/postgres-meta/lib/PostgresMetaFunctions.js +173 -0
  34. package/dist/vendor/postgres-meta/lib/PostgresMetaIndexes.js +42 -0
  35. package/dist/vendor/postgres-meta/lib/PostgresMetaMaterializedViews.js +84 -0
  36. package/dist/vendor/postgres-meta/lib/PostgresMetaPolicies.js +120 -0
  37. package/dist/vendor/postgres-meta/lib/PostgresMetaPublications.js +193 -0
  38. package/dist/vendor/postgres-meta/lib/PostgresMetaRelationships.js +87 -0
  39. package/dist/vendor/postgres-meta/lib/PostgresMetaRoles.js +203 -0
  40. package/dist/vendor/postgres-meta/lib/PostgresMetaSchemas.js +105 -0
  41. package/dist/vendor/postgres-meta/lib/PostgresMetaTablePrivileges.js +91 -0
  42. package/dist/vendor/postgres-meta/lib/PostgresMetaTables.js +183 -0
  43. package/dist/vendor/postgres-meta/lib/PostgresMetaTriggers.js +156 -0
  44. package/dist/vendor/postgres-meta/lib/PostgresMetaTypes.js +22 -0
  45. package/dist/vendor/postgres-meta/lib/PostgresMetaVersion.js +20 -0
  46. package/dist/vendor/postgres-meta/lib/PostgresMetaViews.js +83 -0
  47. package/dist/vendor/postgres-meta/lib/constants.js +8 -0
  48. package/dist/vendor/postgres-meta/lib/db.js +147 -0
  49. package/dist/vendor/postgres-meta/lib/generators.js +106 -0
  50. package/dist/vendor/postgres-meta/lib/helpers.js +26 -0
  51. package/dist/vendor/postgres-meta/lib/index.js +1 -0
  52. package/dist/vendor/postgres-meta/lib/sql/column_privileges.sql.js +154 -0
  53. package/dist/vendor/postgres-meta/lib/sql/columns.sql.js +123 -0
  54. package/dist/vendor/postgres-meta/lib/sql/common.js +1 -0
  55. package/dist/vendor/postgres-meta/lib/sql/config.sql.js +32 -0
  56. package/dist/vendor/postgres-meta/lib/sql/extensions.sql.js +20 -0
  57. package/dist/vendor/postgres-meta/lib/sql/foreign_tables.sql.js +20 -0
  58. package/dist/vendor/postgres-meta/lib/sql/functions.sql.js +141 -0
  59. package/dist/vendor/postgres-meta/lib/sql/indexes.sql.js +51 -0
  60. package/dist/vendor/postgres-meta/lib/sql/materialized_views.sql.js +21 -0
  61. package/dist/vendor/postgres-meta/lib/sql/policies.sql.js +53 -0
  62. package/dist/vendor/postgres-meta/lib/sql/publications.sql.js +46 -0
  63. package/dist/vendor/postgres-meta/lib/sql/roles.sql.js +40 -0
  64. package/dist/vendor/postgres-meta/lib/sql/schemas.sql.js +26 -0
  65. package/dist/vendor/postgres-meta/lib/sql/table.sql.js +109 -0
  66. package/dist/vendor/postgres-meta/lib/sql/table_privileges.sql.js +85 -0
  67. package/dist/vendor/postgres-meta/lib/sql/table_relationships.sql.js +52 -0
  68. package/dist/vendor/postgres-meta/lib/sql/triggers.sql.js +64 -0
  69. package/dist/vendor/postgres-meta/lib/sql/types.sql.js +65 -0
  70. package/dist/vendor/postgres-meta/lib/sql/version.sql.js +15 -0
  71. package/dist/vendor/postgres-meta/lib/sql/views.sql.js +22 -0
  72. package/dist/vendor/postgres-meta/lib/sql/views_key_dependencies.sql.js +198 -0
  73. package/dist/vendor/postgres-meta/lib/types.js +1 -0
  74. package/dist/vendor/postgres-meta/templates/typescript.js +608 -0
  75. package/package.json +16 -8
package/README.md CHANGED
@@ -308,31 +308,31 @@ regression + TAP tests.
308
308
 
309
309
  ## Subscribe to a Realtime query
310
310
 
311
- `neon subscribe` streams a live SQL query until interrupted:
311
+ `neon realtime subscribe` streams a live SQL query until interrupted:
312
312
 
313
313
  ```bash
314
- neon subscribe "SELECT id, title, completed FROM realtime_todos ORDER BY id"
314
+ neon realtime subscribe "SELECT id, title, completed FROM realtime_todos ORDER BY id"
315
315
  ```
316
316
 
317
317
  The default terminal output is append-only. It identifies the selected project,
318
318
  branch, and database; prints the initial result once; reports connection-state
319
- changes; and then prints each published batch with its transaction IDs, a compact
319
+ changes; and then prints each published change set with its transaction IDs, a compact
320
320
  `+insert ~update -delete` summary, and the affected rows. It does not take over the
321
- terminal or require keyboard navigation. Pass `--changes` to display the raw reset
322
- and batch events instead of the materialized view.
321
+ terminal or require keyboard navigation. Pass `--changes` to display the raw `rows`
322
+ and `changes` events instead of the materialized view.
323
323
 
324
324
  For scripts and agents, JSON output is a JSON Lines stream with one complete event
325
325
  per line. YAML output uses one document per event:
326
326
 
327
327
  ```bash
328
- neon subscribe --changes --output json "SELECT * FROM realtime_todos" |
329
- jq --unbuffered 'select(.type == "batch")'
328
+ neon realtime subscribe --changes --output json "SELECT * FROM realtime_todos" |
329
+ jq --unbuffered 'select(.type == "changes")'
330
330
 
331
- neon subscribe --output yaml "SELECT * FROM realtime_todos"
331
+ neon realtime subscribe --output yaml "SELECT * FROM realtime_todos"
332
332
  ```
333
333
 
334
334
  Machine-readable output retains the event stream: without `--changes`, each event is
335
- a complete `snapshot`; with `--changes`, events are raw `reset` and `batch` objects.
335
+ a complete `snapshot`; with `--changes`, events are raw `rows` and `changes` objects.
336
336
  Lifecycle labels and the target header are terminal-only.
337
337
 
338
338
  ## Configure autocompletion
@@ -967,7 +967,7 @@ On a TTY the command asks which agents and which skills, then installs. Detected
967
967
 
968
968
  `-y` skips those questions and installs the default skills into detected agents: project-folder markers such as `.cursor`, else the agent driving the CLI. `--agent` / `-a` names coding agents and skips the agent picker. `--skill` / `-s` names specific skills and skips the skill picker; it does not select agents. `--global -y` uses installed apps, else the host CLI agent. Without a TTY, pass `-y`, or `--skill <name>` (add `--agent <name>` to name agents). If `-y` finds no agent, it exits: pass `--agent <name>`, run from a supported agent, or omit `-y` in a terminal to pick.
969
969
 
970
- `--skill` names by source repo: `neondatabase/agent-skills` (`neon`, `neon-ai-gateway`, `neon-auth`, `neon-functions`, `neon-object-storage`, `neon-postgres`, `neon-postgres-branches`, `neon-postgres-egress-optimizer`); `neondatabase/neon-for-agent-platforms` (`neon-postgres-agent-platforms`).
970
+ `--skill` names by source repo: `neondatabase/agent-skills` (`neon`, `neon-ai-gateway`, `neon-auth`, `neon-functions`, `neon-object-storage`, `neon-postgres`, `neon-postgres-branches`, `neon-postgres-egress-optimizer`, `neon-realtime`); `neondatabase/neon-for-agent-platforms` (`neon-postgres-agent-platforms`).
971
971
 
972
972
  Supported agents match `neon mcp`, minus agents that cannot install skills: `antigravity`, `cline`, `cline-cli`, `claude-code`, `claude-desktop`, `codex`, `cursor`, `gemini-cli`, `goose`, `github-copilot-cli`, `grok-build`, `opencode`, `vscode`, `windsurf`, `zed`. `mcporter` is a known MCP name that is then skipped. `neon skills --help` lists the same skill and agent values, and that `-y` leaves out `neon-postgres-agent-platforms`.
973
973
 
@@ -1019,7 +1019,7 @@ Default scope is `project`. `--global` is `user`. On macOS and Linux, Cursor and
1019
1019
 
1020
1020
  Supported agents with a plugins mapping: `claude-code`, `claude-desktop`, `codex`, `cursor`, `github-copilot-cli`, `grok-build`, `vscode`. `claude-desktop` installs as Claude Code; detecting both produces one install and lists both names in the table. `mcporter` is a known MCP name that is then skipped.
1021
1021
 
1022
- The plugins CLI installs every plugin it finds in the Neon plugin package. Today that is `neon-postgres` from `neondatabase/agent-skills`. It includes the Neon MCP server (`https://mcp.neon.tech/mcp`) and these skills: `neon`, `neon-ai-gateway`, `neon-auth`, `neon-functions`, `neon-object-storage`, `neon-postgres`, `neon-postgres-branches`, `neon-postgres-egress-optimizer`. It does not include `neon-postgres-agent-platforms`.
1022
+ The plugins CLI installs every plugin it finds in the Neon plugin package. Today that is `neon-postgres` from `neondatabase/agent-skills`. It includes the Neon MCP server (`https://mcp.neon.tech/mcp`) and these skills: `neon`, `neon-ai-gateway`, `neon-auth`, `neon-functions`, `neon-object-storage`, `neon-postgres`, `neon-postgres-branches`, `neon-postgres-egress-optimizer`, `neon-realtime`. It does not include `neon-postgres-agent-platforms`.
1023
1023
 
1024
1024
  `neon plugins --help` lists the plugin, those contents, and the supported agent names.
1025
1025
 
@@ -4,8 +4,8 @@ import { declaredNeonServices } from "../config_services.js";
4
4
  import { loadProjectConfig } from "../project.js";
5
5
  import { a as defaultAiGatewayCredential, c as fetchEnvKeysState, d as isLiveCredential, h as toEntries, i as credentialName, l as functionBaseUrlKey, m as resolveBranchPolicy, n as createApiFromOptions, o as defaultStorageCredential, p as policyEnvKeys, r as credentialEnvKeys, t as NEON_ENV_VAR_KEYS, u as isFunctionBaseUrlKey } from "./env-BpP3Dqpe.js";
6
6
  import { ENV_PULL_SERVICES, envKeysForSelection, serviceForEnvKey, servicesForEnvKeys } from "../env_services.js";
7
- import { StagingOnlyError, assertPolicyAvailable, assertRealtimeAvailable, stagingFeaturesEnabled } from "../utils/staging.js";
8
7
  import { formatInstallCommand, resolvePackageManager } from "../utils/package_manager.js";
8
+ import { StagingOnlyError } from "../utils/staging.js";
9
9
  import { ErrorCode, PlatformError, createNeonApiFromOptions, isPlatformError } from "@neon/config";
10
10
  import { credentialScopesSatisfied } from "@neon/config/v1";
11
11
  import { plan, pullConfig } from "@neon/config-runtime";
@@ -414,8 +414,7 @@ const resolveNeonEnvVars = async (ctx) => {
414
414
  const pulled = await pullConfig({
415
415
  projectId: ctx.projectId,
416
416
  branchId: ctx.branchId,
417
- ...apiOptions(ctx),
418
- realtime: stagingFeaturesEnabled(ctx.apiHost)
417
+ ...apiOptions(ctx)
419
418
  });
420
419
  const resolvedBranch = {
421
420
  id: pulled.branch.id,
@@ -513,7 +512,6 @@ const resolveSelectedServices = async (ctx, directServices, envKeys) => {
513
512
  const impliedServices = servicesForEnvKeys(envKeys);
514
513
  const services = ENV_PULL_SERVICES.filter((service) => directServices.includes(service) || impliedServices.includes(service));
515
514
  const selectedKeys = envKeysForSelection(directServices, envKeys);
516
- if (services.includes("realtime")) assertRealtimeAvailable(ctx.apiHost);
517
515
  const api = apiFor(ctx);
518
516
  const has = (service) => services.includes(service);
519
517
  const checkAiGateway = has("ai-gateway") && !selectedKeys.includes(NEON_ENV_VAR_KEYS.aiGateway.apiKey);
@@ -758,7 +756,6 @@ const loadNeonConfig = async (ctx) => {
758
756
  ...ctx.config ? { path: ctx.config } : {},
759
757
  ...ctx.omitUnsetFunctionEnv ? { unsetFunctionEnv: "omit" } : {}
760
758
  });
761
- assertPolicyAvailable(config, ctx.apiHost);
762
759
  return config;
763
760
  } catch (err) {
764
761
  const message = err instanceof Error ? err.message : String(err);
@@ -11,7 +11,6 @@ import { toNeonConfigView } from "../config_format.js";
11
11
  import { declaredNeonServices } from "../config_services.js";
12
12
  import { loadProjectConfig, neonConfigFilename, projectConfigPath, projectDir } from "../project.js";
13
13
  import { loadEnvFileIntoProcess } from "../env_file.js";
14
- import { assertPolicyAvailable, assertRealtimeAvailable, listedServices, stagingFeaturesEnabled, stagingFeaturesEnabledForArgv } from "../utils/staging.js";
15
14
  import { formatInstallCommand, installArgs, resolvePackageManager, runCommand } from "../utils/package_manager.js";
16
15
  import { writer } from "../writer.js";
17
16
  import { fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
@@ -159,11 +158,7 @@ const missingDependencies = (cwd) => {
159
158
  * starter policy, which is what `config init` has always written.
160
159
  */
161
160
  const resolveServices = async (props) => {
162
- if (props.services !== void 0) {
163
- const services = parseConfigInitServices(props.services, (used, canonical) => log.warning(deprecatedServiceMessage(used, canonical)));
164
- if (services.includes("realtime")) assertRealtimeAvailable(props.apiHost);
165
- return services;
166
- }
161
+ if (props.services !== void 0) return parseConfigInitServices(props.services, (used, canonical) => log.warning(deprecatedServiceMessage(used, canonical)));
167
162
  if (props.pickServices) return props.pickServices();
168
163
  if (isCi() || !process.stdout.isTTY) return [];
169
164
  return pickServicesInteractively();
@@ -456,22 +451,14 @@ const builder = (argv) => argv.usage("$0 config <sub-command> [options]").option
456
451
  }))).command("ai-gateway", "Enable the AI Gateway (aiGateway: true)", addSharedOptions, (args) => addCmd(addProps(args, {
457
452
  kind: "service",
458
453
  service: "ai-gateway"
459
- }))).command({
460
- command: "realtime",
461
- describe: stagingFeaturesEnabledForArgv() ? "Enable Realtime (preview.realtime: true)" : false,
462
- builder: (yargs) => addSharedOptions(yargs).option("allowed-origin", {
463
- describe: "Allowed browser origin (repeatable). \"*\" allows every origin",
464
- type: "array",
465
- string: true
466
- }),
467
- handler: (args) => {
468
- assertRealtimeAvailable();
469
- return addCmd(addProps(args, {
470
- kind: "realtime",
471
- ...args.allowedOrigin !== void 0 ? { allowedOrigins: args.allowedOrigin } : {}
472
- }));
473
- }
474
- }).command("function <slug>", "Declare a Neon Function and create its handler file", (yargs) => addSharedOptions(yargs).example("$0 config add function sendemail", "Creates functions/sendemail.ts and declares it").example("$0 config add function sendemail --source src/send.ts", "Declares an existing handler").positional("slug", {
454
+ }))).command("realtime", "Enable Realtime (preview.realtime: true)", (yargs) => addSharedOptions(yargs).option("allowed-origin", {
455
+ describe: "Allowed browser origin (repeatable). \"*\" allows every origin",
456
+ type: "array",
457
+ string: true
458
+ }), (args) => addCmd(addProps(args, {
459
+ kind: "realtime",
460
+ ...args.allowedOrigin !== void 0 ? { allowedOrigins: args.allowedOrigin } : {}
461
+ }))).command("function <slug>", "Declare a Neon Function and create its handler file", (yargs) => addSharedOptions(yargs).example("$0 config add function sendemail", "Creates functions/sendemail.ts and declares it").example("$0 config add function sendemail --source src/send.ts", "Declares an existing handler").positional("slug", {
475
462
  describe: "Function slug: 1-20 lowercase letters and digits",
476
463
  type: "string",
477
464
  demandOption: true
@@ -510,7 +497,7 @@ const builder = (argv) => argv.usage("$0 config <sub-command> [options]").option
510
497
  },
511
498
  services: servicesOption({
512
499
  key: "services",
513
- allowed: listedServices(NEON_SERVICES),
500
+ allowed: NEON_SERVICES,
514
501
  describe: "Services the scaffolded neon.ts declares",
515
502
  also: "postgres alone writes the starter policy; every branch has Postgres. Omitted: pick interactively on a terminal, starter policy in CI or without a TTY."
516
503
  }),
@@ -541,8 +528,7 @@ const liveConfigView = async (opts) => {
541
528
  branchId: opts.branchId,
542
529
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
543
530
  ...opts.apiHost ? { apiHost: opts.apiHost } : {},
544
- ...opts.runtimeApi ? { api: opts.runtimeApi } : {},
545
- realtime: stagingFeaturesEnabled(opts.apiHost)
531
+ ...opts.runtimeApi ? { api: opts.runtimeApi } : {}
546
532
  });
547
533
  const resolved = resolveConfig(live.config, {
548
534
  name: live.branch.name,
@@ -569,7 +555,6 @@ const loadConfig = async (props) => {
569
555
  contextFile: props.contextFile,
570
556
  ...props.config ? { path: props.config } : {}
571
557
  });
572
- assertPolicyAvailable(config, props.apiHost);
573
558
  return config;
574
559
  };
575
560
  const status = async (props) => {
@@ -994,7 +979,6 @@ const applyPolicyOnCreate = async (props) => {
994
979
  if (/Could not find a Neon config file/i.test(message)) return;
995
980
  throw err;
996
981
  }
997
- assertPolicyAvailable(config, props.apiHost);
998
982
  try {
999
983
  warnDeprecatedPreview(config, await warningTargetForExistingBranch({
1000
984
  projectId: props.projectId,
@@ -1079,7 +1063,6 @@ const createBranchFromPolicyOnCheckout = async (props) => {
1079
1063
  if (/Could not find a Neon config file/i.test(message)) return null;
1080
1064
  throw err;
1081
1065
  }
1082
- assertPolicyAvailable(config, props.apiHost);
1083
1066
  await assertAiGatewayProvisionableFromCreds({
1084
1067
  projectId: props.projectId,
1085
1068
  ...props.apiKey ? { apiKey: props.apiKey } : {},
@@ -4,11 +4,11 @@ import { isClaimableEnvTarget } from "../claimable/state.js";
4
4
  import { getCliName } from "../utils/cli_name.js";
5
5
  import { readEnvFile, resolveEnvFilePath } from "../env_file.js";
6
6
  import { l as functionBaseUrlKey } from "../_chunks/env-BpP3Dqpe.js";
7
- import { a as resolveDevEnv } from "../_chunks/env-4WGRW2nw.js";
8
- import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
9
- import { resolveWatchInputs } from "../dev/inputs.js";
10
7
  import { branchIdResolve } from "../utils/enrichers.js";
11
8
  import { bundleEntry } from "../utils/esbuild.js";
9
+ import { a as resolveDevEnv } from "../_chunks/env-BNm69Qh8.js";
10
+ import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
11
+ import { resolveWatchInputs } from "../dev/inputs.js";
12
12
  import { existsSync, mkdirSync, rmSync, statSync, writeFileSync } from "node:fs";
13
13
  import { basename, dirname, join, relative, resolve } from "node:path";
14
14
  import { fileURLToPath } from "node:url";
@@ -7,10 +7,9 @@ import { deprecatedServiceMessage, parseServices, servicesFlagValue, servicesOpt
7
7
  import { mergeEnvFile, readEnvFile, resolveEnvFilePath } from "../env_file.js";
8
8
  import { t as NEON_ENV_VAR_KEYS, u as isFunctionBaseUrlKey } from "../_chunks/env-BpP3Dqpe.js";
9
9
  import { ENV_PULL_KEY_HELP, ENV_PULL_SERVICES, envKeysForSelection, envPullFlagValue, ownedEnvServiceKeys, parseEnvPullKeys } from "../env_services.js";
10
- import { listedServices } from "../utils/staging.js";
11
- import { i as dropClaimableUnsupported, o as resolveNeonEnvVars } from "../_chunks/env-4WGRW2nw.js";
12
10
  import { fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
13
11
  import { warnAiGateway } from "../utils/ai_gateway_notice.js";
12
+ import { i as dropClaimableUnsupported, o as resolveNeonEnvVars } from "../_chunks/env-BNm69Qh8.js";
14
13
  import { formatPulledEnv, pulledBranch } from "./env_output.js";
15
14
  import { existsSync } from "node:fs";
16
15
  import chalk from "chalk";
@@ -48,7 +47,7 @@ const builder = (argv) => argv.usage("$0 env <sub-command> [options]").options({
48
47
  },
49
48
  service: servicesOption({
50
49
  key: "service",
51
- allowed: listedServices(ENV_PULL_SERVICES),
50
+ allowed: ENV_PULL_SERVICES,
52
51
  describe: "Pull only these services' variables",
53
52
  also: "Overrides neon.ts, and prunes only within the services you name. Combines with --env as a union."
54
53
  }),
@@ -39,7 +39,6 @@ import { t as roles_exports } from "./roles.js";
39
39
  import { t as set_context_exports } from "./set_context.js";
40
40
  import { t as snapshots_exports } from "./snapshots.js";
41
41
  import { t as status_exports } from "./status.js";
42
- import { t as subscribe_exports } from "./subscribe.js";
43
42
  import { t as triggers_exports } from "./triggers.js";
44
43
  import { t as user_exports } from "./user.js";
45
44
  import { t as vpc_endpoints_exports } from "./vpc_endpoints.js";
@@ -78,7 +77,6 @@ var commands_default = [
78
77
  feedback_exports,
79
78
  data_api_exports,
80
79
  realtime_exports,
81
- subscribe_exports,
82
80
  functions_exports,
83
81
  triggers_exports,
84
82
  credentials_exports,
@@ -2,7 +2,6 @@ import { t as __exportAll } from "../_chunks/rolldown-runtime-8H4AJuhK.js";
2
2
  import { getCliName } from "../utils/cli_name.js";
3
3
  import { helpCsv, helpEpilogue } from "../utils/help_text.js";
4
4
  import { NEON_SERVICES, servicesOption } from "../neon_services.js";
5
- import { listedServices } from "../utils/staging.js";
6
5
  import { coerceAgentFlag } from "../utils/agent_flag.js";
7
6
  import { initPluginAgents, initSkillsMcpAgents } from "../init/plan.js";
8
7
  import { listSkillIds } from "../skills/catalog.js";
@@ -52,7 +51,7 @@ const builder = (yargs) => yargs.usage("$0 init [options]").option("context-file
52
51
  describe: "Create neon.ts after linking. Use --no-config to skip. Omitted in Custom: you will be asked"
53
52
  }).option("services", servicesOption({
54
53
  key: "services",
55
- allowed: listedServices(NEON_SERVICES),
54
+ allowed: NEON_SERVICES,
56
55
  describe: "Services to declare in neon.ts",
57
56
  also: "postgres alone writes the starter policy; every branch has Postgres. Implies creating neon.ts. Cannot be combined with --no-config."
58
57
  })).option("org-id", {
@@ -1,9 +1,8 @@
1
1
  import { getCliName } from "../utils/cli_name.js";
2
- import { REALTIME_COMING_SOON } from "../utils/staging.js";
3
2
  import { Parser } from "yargs/helpers";
4
3
  //#region src/commands/manifest.ts
5
4
  /**
6
- * Every top-level command, in help order, with the metadata yargs needs to list and route it.
5
+ * Every top-level command, with the metadata yargs needs to list and route it.
7
6
  * A command's module (and everything it imports) loads only when yargs selects that command,
8
7
  * so `neon --help` and `neon projects list` don't pay for `init`, `dev`, or `psql`.
9
8
  *
@@ -190,14 +189,7 @@ const commandManifest = [
190
189
  {
191
190
  command: "realtime",
192
191
  describe: "Manage Neon Realtime for a branch",
193
- load: () => import("./realtime.js"),
194
- stagingOnly: REALTIME_COMING_SOON
195
- },
196
- {
197
- command: "subscribe <query>",
198
- describe: "Subscribe to a live SQL query with Neon Realtime",
199
- load: () => import("./subscribe.js"),
200
- stagingOnly: REALTIME_COMING_SOON
192
+ load: () => import("./realtime.js")
201
193
  },
202
194
  {
203
195
  command: "functions",
@@ -2,6 +2,7 @@ import { t as __exportAll } from "../_chunks/rolldown-runtime-8H4AJuhK.js";
2
2
  import { log } from "../log.js";
3
3
  import { retryOnLock } from "../api.js";
4
4
  import { branchIdFromProps, fillSingleProject } from "../utils/enrichers.js";
5
+ import { builder as builder$1, handler as handler$1 } from "./subscribe.js";
5
6
  import { defineConfig } from "@neon/config";
6
7
  //#region src/commands/realtime.ts
7
8
  var realtime_exports = /* @__PURE__ */ __exportAll({
@@ -44,7 +45,7 @@ const builder = (argv) => argv.usage("$0 realtime <sub-command> [options]").opti
44
45
  }), (args) => enable({
45
46
  ...args,
46
47
  ...args.allowedOrigin !== void 0 ? { allowedOrigins: args.allowedOrigin } : {}
47
- })).command("disable", "Disable Realtime on a branch", (yargs) => yargs.strict(), (args) => disable(args));
48
+ })).command("disable", "Disable Realtime on a branch", (yargs) => yargs.strict(), (args) => disable(args)).command("subscribe <query>", "Subscribe to a live SQL query with Neon Realtime", builder$1, handler$1);
48
49
  const handler = (_args) => {};
49
50
  //#endregion
50
51
  export { builder, command, describe, disable, enable, handler, realtime_exports as t };
@@ -1,37 +1,18 @@
1
- import { t as __exportAll } from "../_chunks/rolldown-runtime-8H4AJuhK.js";
2
1
  import { writer } from "../writer.js";
3
- import { o as resolveNeonEnvVars } from "../_chunks/env-4WGRW2nw.js";
4
- import { branchIdFromProps, fillSingleProject } from "../utils/enrichers.js";
2
+ import { branchIdFromProps } from "../utils/enrichers.js";
3
+ import { o as resolveNeonEnvVars } from "../_chunks/env-BNm69Qh8.js";
5
4
  import YAML from "yaml";
6
5
  //#region src/commands/subscribe.ts
7
- var subscribe_exports = /* @__PURE__ */ __exportAll({
8
- builder: () => builder,
9
- command: () => command,
10
- describe: () => describe,
11
- handler: () => handler,
12
- subscribe: () => subscribe
13
- });
14
- const command = "subscribe <query>";
15
- const describe = "Subscribe to a live SQL query with Neon Realtime";
16
- const builder = (argv) => argv.usage("$0 subscribe \"<query>\" [options]").positional("query", {
6
+ const builder = (argv) => argv.usage("$0 realtime subscribe \"<query>\" [options]").positional("query", {
17
7
  describe: "SELECT query to subscribe to",
18
8
  type: "string"
19
- }).options({
20
- "project-id": {
21
- describe: "Project ID",
22
- type: "string"
23
- },
24
- branch: {
25
- describe: "Branch ID or name",
26
- type: "string"
27
- },
28
- changes: {
29
- describe: "Show raw resets and transaction batches",
30
- type: "boolean",
31
- default: false
32
- }
33
- }).example("$0 subscribe \"SELECT * FROM items\"", "Print the initial result followed by a readable transaction log").example("$0 subscribe --changes \"SELECT * FROM items\"", "Print raw reset and delta events").epilogue("The subscription runs until interrupted. Terminal output is an append-only snapshot and transaction log; JSON output is newline-delimited; YAML output uses one document per event.").middleware(fillSingleProject).strict();
34
- const handler = async (props) => {
9
+ }).options({ changes: {
10
+ describe: "Show raw rows and changes events",
11
+ type: "boolean",
12
+ default: false
13
+ } }).example("$0 realtime subscribe \"SELECT * FROM items\"", "Print the initial result followed by a readable transaction log").example("$0 realtime subscribe --changes \"SELECT * FROM items\"", "Print raw rows and changes events").epilogue("The subscription runs until interrupted. Terminal output is an append-only snapshot and transaction log; JSON output is newline-delimited; YAML output uses one document per event.").strict();
14
+ const handler = async (args) => {
15
+ const props = args;
35
16
  const controller = new AbortController();
36
17
  const stop = (exitCode) => {
37
18
  controller.abort();
@@ -159,16 +140,16 @@ const createRenderer = (props, context, now) => {
159
140
  return;
160
141
  }
161
142
  out.write("\n");
162
- if (event.type === "reset" && !props.changes) {
163
- const label = hasBaseline ? "Reset" : "Initial snapshot";
143
+ if (event.type === "rows" && !props.changes) {
144
+ const label = hasBaseline ? "Rows" : "Initial snapshot";
164
145
  hasBaseline = true;
165
146
  rowsById.clear();
166
147
  for (const { rowId, row } of event.rows) rowsById.set(rowId, row);
167
148
  renderMaterializedRows(out, event.rows.map(({ row }) => row), `${timestamp(now)} ${label}`);
168
149
  return;
169
150
  }
170
- if (event.type === "batch" && !props.changes) {
171
- renderHumanBatch(out, event, rowsById, now);
151
+ if (event.type === "changes" && !props.changes) {
152
+ renderHumanChanges(out, event, rowsById, now);
172
153
  return;
173
154
  }
174
155
  renderTableEvent(out, event, now);
@@ -179,12 +160,12 @@ const renderTableEvent = (out, event, now) => {
179
160
  renderMaterializedRows(out, event.rows, `${timestamp(now)} Snapshot`);
180
161
  return;
181
162
  }
182
- if (event.type === "reset") {
163
+ if (event.type === "rows") {
183
164
  const rows = event.rows.map(({ rowId, row }) => ({
184
165
  row_id: rowId,
185
166
  row
186
167
  }));
187
- renderRows(out, rows, ["row_id", "row"], `${timestamp(now)} Reset · ${rowCount(rows.length)}`, "Reset contains no rows.");
168
+ renderRows(out, rows, ["row_id", "row"], `${timestamp(now)} Rows · ${rowCount(rows.length)}`, "Rows event contains no rows.");
188
169
  return;
189
170
  }
190
171
  const rows = event.changes.map((change) => ({
@@ -196,7 +177,7 @@ const renderTableEvent = (out, event, now) => {
196
177
  "type",
197
178
  "row_id",
198
179
  "row"
199
- ], `${timestamp(now)} ${transactionLabel(event.txids)} · ${rawChangeSummary(event.changes)}`, "Batch contains no row changes.");
180
+ ], `${timestamp(now)} ${transactionLabel(event.txids)} · ${rawChangeSummary(event.changes)}`, "Changes event contains no row changes.");
200
181
  };
201
182
  const renderHumanHeader = (out, context, rawChanges) => {
202
183
  const target = {
@@ -224,18 +205,18 @@ const renderMaterializedRows = (out, rows, title) => {
224
205
  const humanTitle = `${title} · ${rowCount(rows.length)}`;
225
206
  renderRows(out, rows, rowFields(rows), humanTitle, "Query returned no rows.");
226
207
  };
227
- const renderHumanBatch = (out, event, rowsById, now) => {
208
+ const renderHumanChanges = (out, event, rowsById, now) => {
228
209
  const changes = classifyChanges(event.changes, rowsById);
229
210
  const inserted = changes.filter((change) => change.operation === "+ insert");
230
211
  const updated = changes.filter((change) => change.operation === "~ update");
231
212
  const deleted = changes.filter((change) => change.operation === "- delete");
232
- const rowFieldsInBatch = rowFields(changes.flatMap((change) => change.row ? [change.row] : []));
233
- const operationField = uniqueOperationField(rowFieldsInBatch);
213
+ const rowFieldsInChanges = rowFields(changes.flatMap((change) => change.row ? [change.row] : []));
214
+ const operationField = uniqueOperationField(rowFieldsInChanges);
234
215
  const rows = changes.map((change) => ({
235
216
  ...change.row ?? {},
236
217
  [operationField]: change.operation
237
218
  }));
238
- renderRows(out, rows, [operationField, ...rowFieldsInBatch], `${timestamp(now)} ${transactionLabel(event.txids)} · +${inserted.length} ~${updated.length} -${deleted.length}`, "Transaction contains no row changes.");
219
+ renderRows(out, rows, [operationField, ...rowFieldsInChanges], `${timestamp(now)} ${transactionLabel(event.txids)} · +${inserted.length} ~${updated.length} -${deleted.length}`, "Transaction contains no row changes.");
239
220
  };
240
221
  const renderRows = (out, rows, fields, title, emptyMessage) => {
241
222
  writer({
@@ -311,11 +292,11 @@ const consumeSnapshots = async (subscription, render, signal) => consumeSubscrip
311
292
  }))], render, signal);
312
293
  const consumeChanges = async (subscription, render, signal) => consumeSubscription(subscription, (fail) => [subscription.onUpdate((update) => {
313
294
  if (update.type === "rows") attempt(fail, () => render({
314
- type: "reset",
295
+ type: "rows",
315
296
  rows: update.rows
316
297
  }));
317
298
  else attempt(fail, () => render({
318
- type: "batch",
299
+ type: "changes",
319
300
  txids: update.batch.txids,
320
301
  changes: update.changes
321
302
  }));
@@ -357,4 +338,4 @@ const attempt = (fail, action) => {
357
338
  }
358
339
  };
359
340
  //#endregion
360
- export { builder, command, describe, handler, subscribe, subscribe_exports as t };
341
+ export { builder, handler, subscribe };
@@ -1,2 +1 @@
1
- import { t as storeFor } from "./_chunks/credential_io-ByNuojoE.js";
2
- export { storeFor };
1
+ export { t as storeFor } from "./_chunks/credential_io-ByNuojoE.js";
package/dist/dev/env.js CHANGED
@@ -1,2 +1 @@
1
- import { a as resolveDevEnv, i as dropClaimableUnsupported, n as MissingBranchContextError, o as resolveNeonEnvVars, r as ServiceNotOnBranchError, t as DevEnvMismatchError } from "../_chunks/env-4WGRW2nw.js";
2
- export { DevEnvMismatchError, MissingBranchContextError, ServiceNotOnBranchError, dropClaimableUnsupported, resolveDevEnv, resolveNeonEnvVars };
1
+ export { t as DevEnvMismatchError, n as MissingBranchContextError, r as ServiceNotOnBranchError, i as dropClaimableUnsupported, a as resolveDevEnv, o as resolveNeonEnvVars } from "../_chunks/env-BNm69Qh8.js";
package/dist/index.js CHANGED
@@ -12,13 +12,13 @@ import { getCliName } from "./utils/cli_name.js";
12
12
  import { ensureAuth } from "./commands/auth.js";
13
13
  import { recoverFrom401 } from "./auth_recovery.js";
14
14
  import { UsageError, failOnUsageError, isBareParentCommand, showHelp, showUsageErrorHelp } from "./help.js";
15
- import { stagingFeaturesEnabledForArgv } from "./utils/staging.js";
16
15
  import { lazyCommands, preloadCommand } from "./commands/manifest.js";
17
16
  import { rewriteUnknownAgentArg } from "./init/plan.js";
18
17
  import { recoverFromSSO } from "./sso_recovery.js";
19
18
  import { notifyIfUpdateAvailable } from "./update_notifier.js";
20
19
  import { fillInArgs, resolveApiKeyFromEnv } from "./utils/middlewares.js";
21
20
  import { collapseRepeatedFlags, declaredOptions } from "./utils/repeated_flags.js";
21
+ import { stagingFeaturesEnabledForArgv } from "./utils/staging.js";
22
22
  import yargs from "yargs";
23
23
  import { hideBin } from "yargs/helpers";
24
24
  //#region src/index.ts
@@ -30,7 +30,6 @@ const NO_SUBCOMMANDS_VERBS = [
30
30
  "cs",
31
31
  "connection-string",
32
32
  "psql",
33
- "subscribe",
34
33
  "set-context",
35
34
  "checkout",
36
35
  "link",
@@ -52,6 +51,7 @@ const NO_SUBCOMMANDS_VERBS = [
52
51
  let builder = yargs(hideBin(process.argv));
53
52
  builder = builder.scriptName(pkg_default.name).locale("en").usage("$0 <command> [options]").parserConfiguration({
54
53
  "populate--": true,
54
+ "sort-commands": true,
55
55
  "parse-positional-numbers": false
56
56
  }).help().option("output", {
57
57
  alias: "o",
package/dist/init/run.js CHANGED
@@ -9,7 +9,6 @@ import { getCliName } from "../utils/cli_name.js";
9
9
  import { servicesFlagValue } from "../neon_services.js";
10
10
  import { CONFIG_INIT_SERVICES, parseConfigInitServices } from "../config_template.js";
11
11
  import { hasNeonConfigFile, neonConfigFilename } from "../project.js";
12
- import { assertRealtimeAvailable } from "../utils/staging.js";
13
12
  import { getAgentDisplayName } from "../mcp/agents.js";
14
13
  import { mcpInstallableAgents } from "../mcp/targets.js";
15
14
  import { missingPluginsCommands, pluginsInstallableAgents } from "../plugins/targets.js";
@@ -184,7 +183,7 @@ const runInit = async (props) => {
184
183
  };
185
184
  const servicesFlag = servicesFlagValue(props.services);
186
185
  if (props.config === false && servicesFlag !== void 0) throw new Error(INIT_CONFIG_SERVICES_CONFLICT);
187
- if (servicesFlag !== void 0 && parseConfigInitServices(servicesFlag).includes("realtime")) assertRealtimeAvailable(props.apiHost);
186
+ if (servicesFlag !== void 0) parseConfigInitServices(servicesFlag);
188
187
  const linkInputs = {
189
188
  ...props.orgId ? { orgId: props.orgId } : {},
190
189
  ...props.projectId ? { projectId: props.projectId } : {},
@@ -12,7 +12,8 @@ const PLUGIN_SKILLS = [
12
12
  "neon-object-storage",
13
13
  "neon-postgres",
14
14
  "neon-postgres-branches",
15
- "neon-postgres-egress-optimizer"
15
+ "neon-postgres-egress-optimizer",
16
+ "neon-realtime"
16
17
  ];
17
18
  const PLUGINS_CLI_TIMEOUT_MS = 12e4;
18
19
  const pluginsChildEnv = (base = process.env) => {
@@ -1,2 +1 @@
1
- import { A as cmdPrint, C as cmdGdesc, D as cmdInclude, E as cmdGx, F as registerIoCommands, M as cmdWrite, N as formatWatchTimestamp, O as cmdIncludeRel, P as getQueryFout, S as cmdG, T as cmdGset, b as WATCH_TEST_CONTROLLER, j as cmdWatch, k as cmdOut, w as cmdGexec, x as clearPipelineGateErrors, y as DEFAULT_WATCH_INTERVAL } from "../../_chunks/cmd_pipeline-CEk93dGN.js";
2
- export { DEFAULT_WATCH_INTERVAL, WATCH_TEST_CONTROLLER, clearPipelineGateErrors, cmdG, cmdGdesc, cmdGexec, cmdGset, cmdGx, cmdInclude, cmdIncludeRel, cmdOut, cmdPrint, cmdWatch, cmdWrite, formatWatchTimestamp, getQueryFout, registerIoCommands };
1
+ export { y as DEFAULT_WATCH_INTERVAL, b as WATCH_TEST_CONTROLLER, x as clearPipelineGateErrors, S as cmdG, C as cmdGdesc, w as cmdGexec, T as cmdGset, E as cmdGx, D as cmdInclude, O as cmdIncludeRel, k as cmdOut, A as cmdPrint, j as cmdWatch, M as cmdWrite, N as formatWatchTimestamp, P as getQueryFout, F as registerIoCommands } from "../../_chunks/cmd_pipeline-CEk93dGN.js";
@@ -1,2 +1 @@
1
- import { C as cmdGdesc, _ as stagedNamedBindPresent, a as cmdFlush, c as cmdParse, d as cmdSyncPipeline, f as consumeBindState, g as registerPipelineCommands, h as lookupPrepared, i as cmdEndPipeline, l as cmdSendPipeline, m as getPipelineState, n as cmdBindNamed, o as cmdFlushRequest, p as dropPrepared, r as cmdClosePrepared, s as cmdGetResults, t as cmdBind, u as cmdStartPipeline, v as stashPrepared } from "../../_chunks/cmd_pipeline-CEk93dGN.js";
2
- export { cmdBind, cmdBindNamed, cmdClosePrepared, cmdEndPipeline, cmdFlush, cmdFlushRequest, cmdGdesc, cmdGetResults, cmdParse, cmdSendPipeline, cmdStartPipeline, cmdSyncPipeline, consumeBindState, dropPrepared, getPipelineState, lookupPrepared, registerPipelineCommands, stagedNamedBindPresent, stashPrepared };
1
+ export { t as cmdBind, n as cmdBindNamed, r as cmdClosePrepared, i as cmdEndPipeline, a as cmdFlush, o as cmdFlushRequest, C as cmdGdesc, s as cmdGetResults, c as cmdParse, l as cmdSendPipeline, u as cmdStartPipeline, d as cmdSyncPipeline, f as consumeBindState, p as dropPrepared, m as getPipelineState, h as lookupPrepared, g as registerPipelineCommands, _ as stagedNamedBindPresent, v as stashPrepared } from "../../_chunks/cmd_pipeline-CEk93dGN.js";
@@ -1,2 +1 @@
1
- import { B as psqlExec, G as writeQueryError, H as renderResultSet, I as __testing, L as captureLastError, R as executeAndPrint, U as sendQuery, V as refreshErrorVars, W as stripLeadingCommentsAndWS, z as pickOut } from "../../_chunks/cmd_pipeline-CEk93dGN.js";
2
- export { __testing, captureLastError, executeAndPrint, pickOut, psqlExec, refreshErrorVars, renderResultSet, sendQuery, stripLeadingCommentsAndWS, writeQueryError };
1
+ export { I as __testing, L as captureLastError, R as executeAndPrint, z as pickOut, B as psqlExec, V as refreshErrorVars, H as renderResultSet, U as sendQuery, W as stripLeadingCommentsAndWS, G as writeQueryError } from "../../_chunks/cmd_pipeline-CEk93dGN.js";
@@ -1,2 +1 @@
1
- import { f as CLIENT_VERSION, h as parseStartupArgs, m as formatParseError, p as applyStartupArgs } from "../../_chunks/psql-BNljLda2.js";
2
- export { CLIENT_VERSION, applyStartupArgs, formatParseError, parseStartupArgs };
1
+ export { f as CLIENT_VERSION, p as applyStartupArgs, m as formatParseError, h as parseStartupArgs } from "../../_chunks/psql-BNljLda2.js";
@@ -1,2 +1 @@
1
- import { a as mergeConnectOptions, c as parseConnectionUriService, d as serviceEntryToConnectOptions, i as looksLikeConnectionString, l as parseConninfo, n as envConnectionDefaults, o as parseConnectionUri, r as libpqConnectionDefaults, s as parseConnectionUriPartial, t as defaultClientCertDefaults, u as runPsql } from "../_chunks/psql-BNljLda2.js";
2
- export { defaultClientCertDefaults, envConnectionDefaults, libpqConnectionDefaults, looksLikeConnectionString, mergeConnectOptions, parseConnectionUri, parseConnectionUriPartial, parseConnectionUriService, parseConninfo, runPsql, serviceEntryToConnectOptions };
1
+ export { t as defaultClientCertDefaults, n as envConnectionDefaults, r as libpqConnectionDefaults, i as looksLikeConnectionString, a as mergeConnectOptions, o as parseConnectionUri, s as parseConnectionUriPartial, c as parseConnectionUriService, l as parseConninfo, u as runPsql, d as serviceEntryToConnectOptions } from "../_chunks/psql-BNljLda2.js";
@@ -1,8 +1,7 @@
1
- import { initialScanState, isContinueStatus } from "./scanner.js";
1
+ export { initialScanState, isContinueStatus } from "./scanner.js";
2
2
  import "./backslash.js";
3
3
  import "./connection.js";
4
4
  import "./printer.js";
5
5
  import "./repl.js";
6
6
  import "./settings.js";
7
7
  import "./variables.js";
8
- export { initialScanState, isContinueStatus };
@@ -43,6 +43,11 @@ const NEON_SKILL_CATALOG = [
43
43
  source: AGENT_SKILLS_SOURCE,
44
44
  defaultSelected: true
45
45
  },
46
+ {
47
+ skill: "neon-realtime",
48
+ source: AGENT_SKILLS_SOURCE,
49
+ defaultSelected: true
50
+ },
46
51
  {
47
52
  skill: "neon-postgres-agent-platforms",
48
53
  source: PLATFORMS_SKILLS_SOURCE,
@@ -1,7 +1,6 @@
1
1
  import { log } from "../log.js";
2
2
  import { loadProjectConfig } from "../project.js";
3
3
  import { s as fetchEnvKeys } from "../_chunks/env-BpP3Dqpe.js";
4
- import { assertPolicyAvailable } from "./staging.js";
5
4
  import { runHook } from "@neon/config-runtime";
6
5
  //#region src/utils/hooks.ts
7
6
  /**
@@ -150,7 +149,6 @@ const runAfter = async (label, run) => {
150
149
  * postgres only, since nothing else is declared enabled).
151
150
  */
152
151
  const resolveHookEnv = async (config, options) => {
153
- assertPolicyAvailable(config, options.apiHost);
154
152
  try {
155
153
  const resolved = await fetchEnvKeys(config, options, null);
156
154
  return shapeHookEnv(resolved);
@@ -7,7 +7,6 @@ import { Parser, hideBin } from "yargs/helpers";
7
7
  * hidden from help and fail with a "coming soon" message.
8
8
  */
9
9
  const STAGING_API_HOST = "https://console-stage.neon.build/api/v2";
10
- const REALTIME_COMING_SOON = `Neon Realtime is coming soon! For now it only works on Neon's staging API: set NEON_API_HOST=${STAGING_API_HOST} or pass --api-host.`;
11
10
  /** `NEON_STAGING_API_HOST` lets the CLI's tests treat their local mock API as staging. */
12
11
  const stagingHostname = () => new URL(process.env.NEON_STAGING_API_HOST ?? "https://console-stage.neon.build/api/v2").hostname;
13
12
  const isStagingApiHost = (apiHost) => apiHost !== void 0 && URL.canParse(apiHost) && new URL(apiHost).hostname === stagingHostname();
@@ -26,8 +25,6 @@ const stagingFeaturesEnabledForArgv = (args = hideBin(process.argv)) => {
26
25
  };
27
26
  /** `apiHost` is a command's resolved host; without one, the host this process was invoked with. */
28
27
  const stagingFeaturesEnabled = (apiHost) => apiHost === void 0 ? stagingFeaturesEnabledForArgv() : isStagingApiHost(apiHost);
29
- /** Service names to list in help: Realtime only on staging. */
30
- const listedServices = (services) => stagingFeaturesEnabledForArgv() ? services : services.filter((service) => service !== "realtime");
31
28
  /** A hard stop: callers that degrade other failures to warnings let this one through. */
32
29
  var StagingOnlyError = class extends Error {
33
30
  constructor(..._args) {
@@ -35,15 +32,5 @@ var StagingOnlyError = class extends Error {
35
32
  this.name = "StagingOnlyError";
36
33
  }
37
34
  };
38
- const assertRealtimeAvailable = (apiHost) => {
39
- if (!stagingFeaturesEnabled(apiHost)) throw new StagingOnlyError(REALTIME_COMING_SOON);
40
- };
41
- /**
42
- * A `neon.ts` with any `preview.realtime` value reads the Realtime API, which production
43
- * does not serve. `false` reads it too, to disable Realtime on the branch.
44
- */
45
- const assertPolicyAvailable = (config, apiHost) => {
46
- if (config.preview?.realtime !== void 0) assertRealtimeAvailable(apiHost);
47
- };
48
35
  //#endregion
49
- export { REALTIME_COMING_SOON, STAGING_API_HOST, StagingOnlyError, assertPolicyAvailable, assertRealtimeAvailable, isStagingApiHost, listedServices, stagingFeaturesEnabled, stagingFeaturesEnabledForArgv };
36
+ export { STAGING_API_HOST, StagingOnlyError, isStagingApiHost, stagingFeaturesEnabled, stagingFeaturesEnabledForArgv };