@tryvira/mcp 0.1.13 → 0.1.15

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Vira / Esad Türkel
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vira / Esad Türkel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,79 +1,79 @@
1
- # @tryvira/mcp
2
-
3
- MIT-licensed MCP client/server package. The Vira service, application, and
4
- backend remain proprietary and are governed separately.
5
-
6
- An npx-ready MCP server for Vira's existing scoped authority boundary.
7
-
8
- ## Run it
9
-
10
- ```bash
11
- npx @tryvira/mcp
12
- ```
13
-
14
- The default transport is the official MCP transport. The legacy custom transport is an
15
- explicit migration option only: `VIRA_MCP_PROTOCOL_MODE=legacy npx @tryvira/mcp`.
16
-
17
- The launcher reads environment variables from its parent process. It does not automatically load a
18
- `.env` file. For a local shell, export the variables first; for an MCP client, put them in the
19
- client's `env` configuration:
20
-
21
- ```dotenv
22
- VIRA_API_URL=http://127.0.0.1:4185
23
- VIRA_API_KEY=vira_dev_local.local-development-only-32chars
24
- VIRA_MCP_AUTH_TOKEN=replace-with-a-long-random-mcp-token
25
- VIRA_ORGANIZATION_ID=local-org
26
- VIRA_PROJECT_ID=local-project
27
- VIRA_ENVIRONMENT_ID=local
28
- ```
29
-
30
- For example, an MCP client configuration uses the same names:
31
-
32
- ```json
33
- {"env":{"VIRA_API_URL":"https://api.example","VIRA_API_KEY":"<customer-api-key>","VIRA_MCP_AUTH_TOKEN":"<mcp-token>","VIRA_ORGANIZATION_ID":"<org>","VIRA_PROJECT_ID":"<project>","VIRA_ENVIRONMENT_ID":"<environment>"}}
34
- ```
35
-
36
- The default launcher uses MCP stdio. To run the optional HTTP transport explicitly, use
37
- `npx @tryvira/mcp --http`; it binds to `127.0.0.1` by default and requires `Authorization: Bearer
38
- <VIRA_MCP_AUTH_TOKEN>`. Effectful MCP tools are denied by default. Local-only effectful
39
- execution requires the explicit `VIRA_MCP_ALLOW_EFFECTFUL=true` opt-in; production never
40
- accepts that shortcut. Set `VIRA_MCP_BIND_PUBLIC=true` only when an authenticated reverse
41
- proxy or equivalent network boundary is present.
42
-
43
- Effectful MCP tools remain authority-gated; the launcher does not create a second execution or telemetry path.
44
-
45
- ## What a client can discover
46
-
47
- After `initialize`, call `tools/list`. Read-only tools such as `resolve_semantic` may return
48
- semantic candidates. Effectful tools such as `resolve_runtime`, pack installation/release
49
- and Strategy execution call the configured authority endpoint and can be denied by scope,
50
- role, release state or policy.
51
-
52
- ## Minimal MCP client configuration
53
-
54
- ```json
55
- {
56
- "mcpServers": {
57
- "vira": {
58
- "command": "npx",
59
- "args": ["-y", "@tryvira/mcp"],
60
- "env": {
61
- "VIRA_API_URL": "https://api.example.invalid",
62
- "VIRA_API_KEY": "<customer-api-key>",
63
- "VIRA_MCP_AUTH_TOKEN": "<mcp-auth-token>",
64
- "VIRA_MCP_AUTHORITY_URL": "https://api.example.invalid/v1/mcp/authorize",
65
- "VIRA_ORGANIZATION_ID": "<organization>",
66
- "VIRA_PROJECT_ID": "<project>",
67
- "VIRA_ENVIRONMENT_ID": "<environment>"
68
- }
69
- }
70
- }
71
- }
72
- ```
73
-
74
- Never paste real credentials into a checked-in client configuration. For local-only effectful
75
- testing, use the local stack and its documented development credentials; the production
76
- authority path does not accept the local bypass.
77
-
78
- See [`docs/MCP_GUIDE.md`](../../docs/MCP_GUIDE.md) for JSON-RPC discovery, tool examples and
79
- authority/error behavior.
1
+ # @tryvira/mcp
2
+
3
+ MIT-licensed MCP client/server package. The Vira service, application, and
4
+ backend remain proprietary and are governed separately.
5
+
6
+ An npx-ready MCP server for Vira's existing scoped authority boundary.
7
+
8
+ ## Run it
9
+
10
+ ```bash
11
+ npx @tryvira/mcp
12
+ ```
13
+
14
+ The default transport is the official MCP transport. The legacy custom transport is an
15
+ explicit migration option only: `VIRA_MCP_PROTOCOL_MODE=legacy npx @tryvira/mcp`.
16
+
17
+ The launcher reads environment variables from its parent process. It does not automatically load a
18
+ `.env` file. For a local shell, export the variables first; for an MCP client, put them in the
19
+ client's `env` configuration:
20
+
21
+ ```dotenv
22
+ VIRA_API_URL=http://127.0.0.1:4185
23
+ VIRA_API_KEY=vira_dev_local.local-development-only-32chars
24
+ VIRA_MCP_AUTH_TOKEN=replace-with-a-long-random-mcp-token
25
+ VIRA_ORGANIZATION_ID=local-org
26
+ VIRA_PROJECT_ID=local-project
27
+ VIRA_ENVIRONMENT_ID=local
28
+ ```
29
+
30
+ For example, an MCP client configuration uses the same names:
31
+
32
+ ```json
33
+ {"env":{"VIRA_API_URL":"https://api.example","VIRA_API_KEY":"<customer-api-key>","VIRA_MCP_AUTH_TOKEN":"<mcp-token>","VIRA_ORGANIZATION_ID":"<org>","VIRA_PROJECT_ID":"<project>","VIRA_ENVIRONMENT_ID":"<environment>"}}
34
+ ```
35
+
36
+ The default launcher uses MCP stdio. To run the optional HTTP transport explicitly, use
37
+ `npx @tryvira/mcp --http`; it binds to `127.0.0.1` by default and requires `Authorization: Bearer
38
+ <VIRA_MCP_AUTH_TOKEN>`. Effectful MCP tools are denied by default. Local-only effectful
39
+ execution requires the explicit `VIRA_MCP_ALLOW_EFFECTFUL=true` opt-in; production never
40
+ accepts that shortcut. Set `VIRA_MCP_BIND_PUBLIC=true` only when an authenticated reverse
41
+ proxy or equivalent network boundary is present.
42
+
43
+ Effectful MCP tools remain authority-gated; the launcher does not create a second execution or telemetry path.
44
+
45
+ ## What a client can discover
46
+
47
+ After `initialize`, call `tools/list`. Read-only tools such as `resolve_semantic` may return
48
+ semantic candidates. Effectful tools such as `resolve_runtime`, pack installation/release
49
+ and Strategy execution call the configured authority endpoint and can be denied by scope,
50
+ role, release state or policy.
51
+
52
+ ## Minimal MCP client configuration
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "vira": {
58
+ "command": "npx",
59
+ "args": ["-y", "@tryvira/mcp"],
60
+ "env": {
61
+ "VIRA_API_URL": "https://api.example.invalid",
62
+ "VIRA_API_KEY": "<customer-api-key>",
63
+ "VIRA_MCP_AUTH_TOKEN": "<mcp-auth-token>",
64
+ "VIRA_MCP_AUTHORITY_URL": "https://api.example.invalid/v1/mcp/authorize",
65
+ "VIRA_ORGANIZATION_ID": "<organization>",
66
+ "VIRA_PROJECT_ID": "<project>",
67
+ "VIRA_ENVIRONMENT_ID": "<environment>"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ Never paste real credentials into a checked-in client configuration. For local-only effectful
75
+ testing, use the local stack and its documented development credentials; the production
76
+ authority path does not accept the local bypass.
77
+
78
+ See [`docs/MCP_GUIDE.md`](../../docs/MCP_GUIDE.md) for JSON-RPC discovery, tool examples and
79
+ authority/error behavior.
package/dist/cli.js CHANGED
@@ -928,6 +928,35 @@ function createViraMcpOptions(config) {
928
928
  const { proposalId, transition, ...body } = args;
929
929
  return api(`/v1/teach/proposals/${encodeURIComponent(String(proposalId))}/${encodeURIComponent(String(transition))}`, body, `mcp:${tool}:${String(proposalId)}`);
930
930
  }
931
+ if (tool === "create_evaluation_plan") return api("/v1/evaluation-plans", args, `mcp:${tool}:${String(args.id)}`);
932
+ if (tool === "seal_evaluation_plan") return api(`/v1/evaluation-plans/${encodeURIComponent(String(args.planId))}/seal`, {}, `mcp:${tool}:${String(args.planId)}`);
933
+ if (tool === "create_improvement_proposal") {
934
+ const { evaluationId, ...body } = args;
935
+ return api(`/v1/evaluations/${encodeURIComponent(String(evaluationId))}/improvement-proposal`, body, `mcp:${tool}:${String(evaluationId)}`);
936
+ }
937
+ if (tool === "review_improvement_proposal") {
938
+ const { proposalId, action, ...body } = args;
939
+ return api(`/v1/behavior-improvement-proposals/${encodeURIComponent(String(proposalId))}`, { action, ...body }, `mcp:${tool}:${String(proposalId)}`);
940
+ }
941
+ if (tool === "create_behavior_revision_candidate") return api("/v1/behavior-revision-candidates", args, `mcp:${tool}:${String(args.id)}`);
942
+ if (tool === "evaluate_behavior_revision_candidate") {
943
+ const { candidateId, ...body } = args;
944
+ return api(`/v1/behavior-revision-candidates/${encodeURIComponent(String(candidateId))}/evaluate`, body, `mcp:${tool}:${String(candidateId)}`);
945
+ }
946
+ if (tool === "accept_behavior_revision_candidate") {
947
+ const { candidateId, candidateEvaluationId } = args;
948
+ return api(`/v1/behavior-revision-candidates/${encodeURIComponent(String(candidateId))}/accept`, { candidateEvaluationId }, `mcp:${tool}:${String(candidateId)}`);
949
+ }
950
+ if (tool === "create_pack_revision") return api("/v1/pack-revisions", args, `mcp:${tool}:${String(args.id)}`);
951
+ if (tool === "transition_pack_revision") {
952
+ const { revisionId, transition, ...body } = args;
953
+ return api(`/v1/pack-revisions/${encodeURIComponent(String(revisionId))}/${encodeURIComponent(String(transition))}`, body, `mcp:${tool}:${String(revisionId)}`);
954
+ }
955
+ if (tool === "materialize_pack_revision") {
956
+ const { revisionId, ...body } = args;
957
+ return api(`/v1/pack-revisions/${encodeURIComponent(String(revisionId))}/materialize`, body, `mcp:${tool}:${String(revisionId)}`);
958
+ }
959
+ if (tool === "get_pack_revision_diff") return api(`/v1/pack-revisions/${encodeURIComponent(String(args.revisionId))}/diff?organizationId=${encodeURIComponent(config.scope.organizationId)}&projectId=${encodeURIComponent(config.scope.projectId)}&environmentId=${encodeURIComponent(config.scope.environmentId)}`, void 0, `mcp:${tool}:${String(args.revisionId)}`);
931
960
  if (tool === "create_release") return api("/v1/releases", args, `mcp:${tool}:${String(args.releaseId ?? args.artifactId)}`);
932
961
  return lifecycleTransport.call(input);
933
962
  } };
@@ -996,6 +1025,17 @@ var init_vira_server = __esm({
996
1025
  { name: "review_discovery_candidate", description: "Record a human review decision for a scoped discovery candidate.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, kind: { type: "string" }, key: { type: "string" }, decision: { type: "string" }, payload: { type: "object" } }, required: ["organizationId", "projectId", "environmentId", "kind", "key", "decision"] } },
997
1026
  { name: "create_observation", description: "Submit one scoped observation for discovery; it does not publish behavior.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, id: { type: "string" }, content: { type: "object" }, consent: { type: "boolean" } }, required: ["organizationId", "projectId", "environmentId", "id", "content", "consent"] } },
998
1027
  { name: "start_evaluation", description: "Start a local evaluation for an existing artifact.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, id: { type: "string" }, targetArtifact: { type: "string" }, dataset: { type: "array" }, assertions: { type: "array" } }, required: ["organizationId", "projectId", "environmentId", "id", "targetArtifact", "dataset", "assertions"] } },
1028
+ { name: "create_evaluation_plan", description: "Create an immutable OFF/current-on evaluation plan for a scoped behavior target.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, id: { type: "string" }, suiteId: { type: "string" }, suiteVersion: { type: "string" }, suiteDigest: { type: "string" }, datasetSnapshotDigest: { type: "string" }, evaluationPolicyDigest: { type: "string" }, arms: { type: "array" } }, required: ["organizationId", "projectId", "environmentId", "id", "suiteId", "suiteVersion", "suiteDigest", "datasetSnapshotDigest", "evaluationPolicyDigest", "arms"] } },
1029
+ { name: "seal_evaluation_plan", description: "Seal an evaluation plan so its suite, dataset, and execution arms cannot drift.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, planId: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "planId"] } },
1030
+ { name: "create_improvement_proposal", description: "Create a Teach improvement proposal from a completed comparative evaluation.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, evaluationId: { type: "string" }, id: { type: "string" }, basePackId: { type: "string" }, basePackDigest: { type: "string" }, behaviorSet: { type: "object" } }, required: ["organizationId", "projectId", "environmentId", "evaluationId", "id", "basePackId", "basePackDigest"] } },
1031
+ { name: "review_improvement_proposal", description: "Review a Teach improvement proposal without mutating canonical runtime state.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, proposalId: { type: "string" }, action: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "proposalId", "action"] } },
1032
+ { name: "create_behavior_revision_candidate", description: "Create an immutable behavior revision candidate from a reviewed Teach improvement proposal.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, id: { type: "string" }, sourceTeachProposalId: { type: "string" }, parentRevisionId: { type: "string" }, parentRevisionDigest: { type: "string" }, changeSet: { type: "object" } }, required: ["organizationId", "projectId", "environmentId", "id", "sourceTeachProposalId", "parentRevisionId", "parentRevisionDigest", "changeSet"] } },
1033
+ { name: "evaluate_behavior_revision_candidate", description: "Evaluate a candidate using provider-backed dataset assertions; client scores are not accepted.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, candidateId: { type: "string" }, dataset: { type: "array" }, assertions: { type: "array" } }, required: ["organizationId", "projectId", "environmentId", "candidateId", "dataset"] } },
1034
+ { name: "accept_behavior_revision_candidate", description: "Accept a candidate only when a passed evaluation is bound to its immutable digest.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, candidateId: { type: "string" }, candidateEvaluationId: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "candidateId", "candidateEvaluationId"] } },
1035
+ { name: "create_pack_revision", description: "Create a draft Pack Revision from an accepted behavior candidate.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, id: { type: "string" }, packKey: { type: "string" }, version: { type: "string" }, behaviorRevisionCandidateId: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "id", "packKey", "version", "behaviorRevisionCandidateId"] } },
1036
+ { name: "transition_pack_revision", description: "Validate, request approval, approve, or release a governed Pack Revision.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, revisionId: { type: "string" }, transition: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "revisionId", "transition"] } },
1037
+ { name: "materialize_pack_revision", description: "Materialize an approved Pack Revision into canonical runtime state.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, revisionId: { type: "string" }, packId: { type: "string" }, variables: { type: "object" } }, required: ["organizationId", "projectId", "environmentId", "revisionId", "packId"] } },
1038
+ { name: "get_pack_revision_diff", description: "Read the immutable lineage and change summary for a Pack Revision.", inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, revisionId: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "revisionId"] } },
999
1039
  { name: "compile_behavior_capsule", description: "Compile a persisted scoped Behavior VM capsule and return its receipt.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, programId: { type: "string" }, input: { type: "string" }, selection: { type: "object" }, candidates: { type: "array" } }, required: ["organizationId", "projectId", "environmentId", "programId", "input"] } },
1000
1040
  { name: "serve_behavior_projection", description: "Serve the active scoped behavior projection through the governed runtime boundary.", effectful: true, inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" }, programId: { type: "string" }, input: { type: "string" }, provider: { type: "string" }, protocol: { type: "string" } }, required: ["organizationId", "projectId", "environmentId", "input", "provider"] } },
1001
1041
  { name: "list_packs", description: "Read scoped behavior packs.", inputSchema: { type: "object", properties: { organizationId: { type: "string" }, projectId: { type: "string" }, environmentId: { type: "string" } }, required: ["organizationId", "projectId", "environmentId"] } },
@@ -1068,7 +1108,7 @@ function serveOfficialViraMcp(options) {
1068
1108
  });
1069
1109
  }
1070
1110
  return server;
1071
- });
1111
+ }, { legacy: "reject" });
1072
1112
  }
1073
1113
  var init_official_stdio = __esm({
1074
1114
  "../../apps/mcp-server/official-stdio.ts"() {
@@ -1289,13 +1329,24 @@ async function defaultMigrationPaths() {
1289
1329
  return entries.filter((entry) => entry.isFile() && /^\d+_.+\.sql$/i.test(entry.name)).map((entry) => resolve(migrationDirectory, entry.name)).sort((left, right) => left.localeCompare(right, "en"));
1290
1330
  }
1291
1331
  async function openPostgresRuntime(options = {}) {
1292
- const { pool, close } = createPostgresPool({ databaseUrl: options.databaseUrl, max: options.maxConnections, ssl: options.ssl });
1332
+ const maxConnections = options.maxConnections ?? Number(process.env.VIRA_DB_POOL_MAX ?? 10);
1333
+ const { pool, close } = createPostgresPool({ databaseUrl: options.databaseUrl, max: maxConnections, ssl: options.ssl });
1293
1334
  const database = createPostgresDatabase({ pool, databaseUrl: options.databaseUrl });
1294
1335
  try {
1295
1336
  if (!options.skipMigrations && process.env.VIRA_WORKER_SKIP_MIGRATIONS !== "true") {
1296
1337
  const migrations = [];
1297
1338
  const migrationPaths = options.migrationPaths ?? await defaultMigrationPaths();
1298
- for (const path of migrationPaths) migrations.push({ id: path.split(/[\\/]/).pop().replace(/\.sql$/i, ""), sql: await readFile(path, "utf8") });
1339
+ for (const path of migrationPaths) {
1340
+ const id = path.split(/[\\/]/).pop().replace(/\.sql$/i, "");
1341
+ const migration = { id, sql: await readFile(path, "utf8") };
1342
+ if (id === "001_vnext_foundation") {
1343
+ migration.legacyChecksums = ["d1a175e1b8af20bcf9bc650fb299626513532e4d18da429569251eff69475427"];
1344
+ }
1345
+ if (id === "019_postgres_explicit_public_deny_policies") {
1346
+ migration.legacyChecksums = ["162658a065737b36c0cedb6f1294d497074e69b5b744bbfe10e42363427c23a9"];
1347
+ }
1348
+ migrations.push(migration);
1349
+ }
1299
1350
  const client = await pool.connect();
1300
1351
  try {
1301
1352
  await applyPostgresMigrations(client, migrations);