@ultimat3/mcp 31.21.0 → 31.22.1

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/CLAUDE.md CHANGED
@@ -22,7 +22,7 @@ import. The CLI wires it.
22
22
  | `server-resources.ts` | `resources/read`'s three outcomes, audited, provider in a `try` |
23
23
  | `from-action.ts` | action/query → tool; the "one authz system" projection; `toolsFrom` (sweep, skips) vs `toolsListed` (written out, refuses) |
24
24
  | `resources.ts` | resources + prompts, stable `ultimate://` URIs |
25
- | `dev-server.ts` · `dev-ui-*.ts` · `dev-graph-tool.ts` | the 19 dev tools: 13 here (`routes.list` … `logs.tail`), the five `ui.*`, `graph.query`. Depends only on an injected `DevHost` |
25
+ | `dev-server.ts` · `dev-ui-*.ts` · `dev-graph-tool.ts` · `dev-agent-tools.ts` | 23 dev tools: 13 here, five `ui.*`, `graph.query`, four agent tools (`db.explain` …). Only an injected `DevHost` |
26
26
  | `dev-host.ts` | wires `describe*` from entity/action/query/jobs into a `DevHost` |
27
27
  | `transport-http.ts` | `POST /mcp` route descriptor, bearer → agent actor, and the per-caller rate limit it enforces itself; it keeps the order |
28
28
  | `transport-http-answers.ts` | the pre-dispatch answers (401, 403 not-an-agent / origin, 421, 429) and the per-address failure meter |
@@ -39,7 +39,7 @@ import. The CLI wires it.
39
39
  | `exposed.ts` | `include: 'exposed'` — the action/query registries → primitives |
40
40
  | `include-early.ts` | `assertIncludeCurrent`, the mount's after-scan check (`X_MCP_INCLUDE_EARLY`) — [history](../../docs/history/mcp.md) |
41
41
  | `scopes.ts` | the `scopes:` map — outcome 2's declaration surface and its three boot refusals |
42
- | `readonly-sql.ts` · `readonly-sql-calls.ts` | layer 3 of `db.query` — the single-read parse — and `db.migrate`'s branch check · the banned call families |
42
+ | `readonly-sql.ts` · `readonly-sql-calls.ts` · `explain-sql.ts` | layer 3 of `db.query` — the single-read parse — and `db.migrate`'s branch check · the banned call families · `db.explain`'s screen |
43
43
  | `query-page.ts` | a list query tool's ONE bounded page, `_after` cursor |
44
44
  | `query-limits.ts` | layer 4 of `db.query` — the row, byte and timeout ceilings, and what truncation reports |
45
45
  | `meta-surface.ts` · `meta-catalog-render.ts` | `surface: 'meta'` catalog, `groups:` boot checks (dispatch: `server.ts`) · its text, `catalogDetail` |
package/README.md CHANGED
@@ -17,19 +17,23 @@ defineAppMcp({ include: 'exposed' });
17
17
  | Tool | Scope | Answers |
18
18
  |---|---|---|
19
19
  | `routes.list` | `dev:read` | route table — url, render mode, offline strategy, hydrate, budget |
20
- | `schema.describe` | `dev:read` | entities with columns, types, invariants |
20
+ | `schema.describe` | `dev:read` | entities with columns, types, invariants; `{ entity }` narrows to one by name or table |
21
21
  | `policies.list` | `dev:read` | every policy: permission, subject, enforcement points |
22
22
  | `actions.describe` | `dev:read` | actions + queries: input/output schema, policy, cache tags, MCP exposure |
23
23
  | `jobs.inspect` | `dev:read` | job definitions, retry policy, steps (omit `name` for all) |
24
24
  | `queue.depth` | `dev:read` | pending / running / failed per queue |
25
25
  | `manifest.read` | `dev:read` | `x.manifest.json` verbatim |
26
26
  | `errors.explain` | `dev:read` | stable `X_*` code → cause + exact fix command + docs |
27
+ | `docs.search` | `dev:read` | `x docs <query> --json` run in process — the installed docs, ranked; an `X_*` code is redirected to `errors.explain` |
28
+ | `verify.narrow` | `dev:read` | `{ file }` → the steps `x verify --changed` selects for that file alone and the narrowest commands (`x test --filter`, `x verify --only …`). Runs nothing |
27
29
  | `graph.query` | `dev:read` | `{ node }` → what a change to a file or primitive reaches (`x impact`'s answer); `{ from, to }` → the chain of edges linking two nodes (`x graph --from --to`). The CLI answers through `DevCapabilities.queryGraph`: the graph is `@ultimat3/manifest`'s |
28
30
  | `db.query` | `db:read` | **read-only, enforced four ways** — SELECT-only role, `BEGIN READ ONLY`, one-statement parse, 5s/1000-row/256 KiB caps |
31
+ | `db.explain` | `db:read` | the plan of ONE `SELECT` / `WITH … SELECT` as `EXPLAIN (FORMAT JSON)`; `analyze: true` executes it inside `db.query`'s role, `BEGIN READ ONLY` and 5 s timeout. `db.query`'s parse runs first (a write in a CTE or after `;` is `X_MCP_QUERY_REJECTED`); a production database is `X_EXPLAIN_PRODUCTION_DATABASE`, `x explain`'s rule |
29
32
  | `db.migrate` | `db:migrate` | **branch DB only** — refuses production and any non-branch target |
30
33
  | `tests.run` | `dev:test` | `x test [--filter]` — the shell's runner and environment (executes project code) |
31
34
  | `verify.run` | `dev:test` | `x verify` — the shippable contract; `only` is `--only` |
32
35
  | `logs.tail` | `dev:logs` | last N lines, optionally per runtime role |
36
+ | `requests.statements` | `dev:logs` | the running `x dev`'s recent requests (or one `requestId`): SQL statement count, repeated statements, N+1 verdicts with their fix — read off its `/_x/timeline` |
33
37
 
34
38
  `db.query` and `db.migrate` are gated *and* say so in their own description, so a model that
35
39
  reads only the catalog still knows what it is holding.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/mcp",
3
- "version": "31.21.0",
3
+ "version": "31.22.1",
4
4
  "description": "MCP server, dev tools, and the action-to-tool projection \u2014 one authz system, two surfaces",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -44,15 +44,15 @@
44
44
  "test": "bun test"
45
45
  },
46
46
  "dependencies": {
47
- "@ultimat3/action": "31.21.0",
48
- "@ultimat3/auth": "31.21.0",
49
- "@ultimat3/core": "31.21.0",
50
- "@ultimat3/db": "31.21.0",
51
- "@ultimat3/entity": "31.21.0",
52
- "@ultimat3/http": "31.21.0",
53
- "@ultimat3/jobs": "31.21.0",
54
- "@ultimat3/policy": "31.21.0",
55
- "@ultimat3/query": "31.21.0",
56
- "@ultimat3/schema": "31.21.0"
47
+ "@ultimat3/action": "31.22.1",
48
+ "@ultimat3/auth": "31.22.1",
49
+ "@ultimat3/core": "31.22.1",
50
+ "@ultimat3/db": "31.22.1",
51
+ "@ultimat3/entity": "31.22.1",
52
+ "@ultimat3/http": "31.22.1",
53
+ "@ultimat3/jobs": "31.22.1",
54
+ "@ultimat3/policy": "31.22.1",
55
+ "@ultimat3/query": "31.22.1",
56
+ "@ultimat3/schema": "31.22.1"
57
57
  }
58
58
  }
@@ -0,0 +1,182 @@
1
+ // The four dev tools that answer an agent's next question without a shell round trip: `docs.search`
2
+ // (`x docs`), `db.explain` (a plan, `ANALYZE` inside the read-only transaction), `requests.statements`
3
+ // (`x dev`'s per-request statement ledger) and `verify.narrow` (what to run after editing a file).
4
+ // Each is a projection: the CLI answers through `DevAgentHost`, from the command that already exists.
5
+
6
+ import { NotImplementedError } from '@ultimat3/core';
7
+ import { EXPLAIN_GUARD, explainStatement, planOf } from './explain-sql';
8
+ import type { QueryLimits, QueryRows } from './query-limits';
9
+ import { QUERY_LIMITS } from './query-limits';
10
+ import { PARSE_GUARD } from './readonly-sql';
11
+ import type { AnyMcpTool, ToolArgs } from './registry';
12
+ import { jsonResult } from './registry';
13
+
14
+ /** The ceilings `db.explain` runs under: `db.query`'s timeout, and the one row EXPLAIN answers. */
15
+ export const EXPLAIN_LIMITS: QueryLimits = Object.freeze({ ...QUERY_LIMITS, maxRows: 1 });
16
+
17
+ /** Requests `requests.statements` reads by default and at most — the dev recorder's own scale. */
18
+ export const REQUEST_STATEMENT_LIMITS = Object.freeze({ default: 10, max: 50 });
19
+
20
+ export interface DevAgentHost {
21
+ /** `x docs <query> --limit <n> --json`, run in process: its `summary`, `lines` and `data`. */
22
+ searchDocs(query: string, limit: number): Promise<unknown>;
23
+ /**
24
+ * Run the EXPLAIN `explainStatement` built, under `db.query`'s layers 1–2 (SELECT-only role,
25
+ * `BEGIN READ ONLY`, `limits.timeoutMs`). Refuses a production database the way `x explain` does.
26
+ */
27
+ explainQuery(statement: string, limits: QueryLimits): Promise<QueryRows>;
28
+ /** The running `x dev`'s recent requests, each with its statement count and N+1 verdicts. */
29
+ requestStatements(input: {
30
+ readonly requestId: string | undefined;
31
+ readonly limit: number;
32
+ }): Promise<unknown>;
33
+ /** The `x verify --changed` plan for ONE file, as the commands that run it. Runs nothing. */
34
+ narrowVerify(file: string): Promise<unknown>;
35
+ }
36
+
37
+ /** The host's capability, or one that refuses: `DevCapabilities` holds these as optional. */
38
+ const absent = (tool: string, capability: string) => async (): Promise<never> => {
39
+ throw new NotImplementedError({
40
+ cause: `${tool} on a dev host with no ${capability} is not implemented in this build`,
41
+ fix: 'x mcp serve --transport stdio # the CLI host answers every dev tool',
42
+ });
43
+ };
44
+
45
+ /** A whole `DevAgentHost` over one that may lack some of its four answers. */
46
+ export function agentHostOf(host: Partial<DevAgentHost>): DevAgentHost {
47
+ return {
48
+ searchDocs: host.searchDocs?.bind(host) ?? absent('docs.search', 'searchDocs'),
49
+ explainQuery: host.explainQuery?.bind(host) ?? absent('db.explain', 'explainQuery'),
50
+ requestStatements:
51
+ host.requestStatements?.bind(host) ?? absent('requests.statements', 'requestStatements'),
52
+ narrowVerify: host.narrowVerify?.bind(host) ?? absent('verify.narrow', 'narrowVerify'),
53
+ };
54
+ }
55
+
56
+ const text = (args: ToolArgs, key: string): string | undefined => {
57
+ const value = args[key];
58
+ return typeof value === 'string' && value.trim() !== '' ? value : undefined;
59
+ };
60
+
61
+ const count = (args: ToolArgs, key: string, fallback: number): number => {
62
+ const value = args[key];
63
+ return typeof value === 'number' && Number.isInteger(value) ? value : fallback;
64
+ };
65
+
66
+ /** The scopes these tools sit under, handed in by `devTools` so `DEV_SCOPES` stays one table. */
67
+ export interface AgentToolScopes {
68
+ readonly read: string;
69
+ readonly logs: string;
70
+ readonly dbRead: string;
71
+ }
72
+
73
+ export function agentTools(host: DevAgentHost, scopes: AgentToolScopes): readonly AnyMcpTool[] {
74
+ return [
75
+ {
76
+ name: 'docs.search',
77
+ description:
78
+ 'x docs as a tool: the installed framework docs (packages and wiki), ranked for a question, ' +
79
+ 'a topic or a symbol. An X_* code is redirected to errors.explain. Offline; runs nothing.',
80
+ scope: scopes.read,
81
+ destructive: false,
82
+ inputSchema: {
83
+ type: 'object',
84
+ properties: {
85
+ query: { type: 'string', minLength: 1, description: 'e.g. "paginate a query"' },
86
+ limit: { type: 'integer', minimum: 1, maximum: 20, default: 5 },
87
+ },
88
+ required: ['query'],
89
+ additionalProperties: false,
90
+ },
91
+ async handle(args: ToolArgs) {
92
+ return jsonResult(
93
+ await host.searchDocs(text(args, 'query') ?? '', count(args, 'limit', 5)),
94
+ );
95
+ },
96
+ },
97
+ {
98
+ name: 'db.explain',
99
+ description:
100
+ 'The query plan of ONE SELECT or WITH … SELECT, as EXPLAIN (FORMAT JSON). `analyze: true` ' +
101
+ 'executes it — inside the same SELECT-only role and READ ONLY transaction as db.query, ' +
102
+ `under its ${QUERY_LIMITS.timeoutMs}ms timeout. Writes, a second statement and ` +
103
+ 'data-modifying CTEs are refused (X_MCP_QUERY_REJECTED); a production database too.',
104
+ scope: scopes.dbRead,
105
+ destructive: false,
106
+ inputSchema: {
107
+ type: 'object',
108
+ properties: {
109
+ sql: { type: 'string', description: 'The bare SELECT; db.explain writes the EXPLAIN.' },
110
+ analyze: { type: 'boolean', default: false, description: 'Execute for real timings.' },
111
+ },
112
+ required: ['sql'],
113
+ additionalProperties: false,
114
+ },
115
+ async handle(args: ToolArgs) {
116
+ const analyze = args['analyze'] === true;
117
+ // Screened here, before the host sees a byte — the same place `db.query` screens.
118
+ const statement = explainStatement(String(args['sql']), analyze);
119
+ const rows = await host.explainQuery(statement, EXPLAIN_LIMITS);
120
+ return jsonResult({
121
+ analyzed: analyze,
122
+ statement,
123
+ plan: planOf(rows.rows[0]?.[0]),
124
+ guards: [PARSE_GUARD, EXPLAIN_GUARD, ...rows.guards],
125
+ });
126
+ },
127
+ },
128
+ {
129
+ name: 'requests.statements',
130
+ description:
131
+ "Statements per request from the running x dev's ledger: each recent request with its SQL " +
132
+ 'count, repeated statements and N+1 verdicts (X_N_PLUS_ONE_QUERY/WRITE, with the fix). ' +
133
+ 'Pass requestId for one request. Needs x dev running.',
134
+ scope: scopes.logs,
135
+ destructive: false,
136
+ inputSchema: {
137
+ type: 'object',
138
+ properties: {
139
+ requestId: { type: 'string', description: 'One request; omit for the most recent.' },
140
+ limit: {
141
+ type: 'integer',
142
+ minimum: 1,
143
+ maximum: REQUEST_STATEMENT_LIMITS.max,
144
+ default: REQUEST_STATEMENT_LIMITS.default,
145
+ },
146
+ },
147
+ additionalProperties: false,
148
+ },
149
+ async handle(args: ToolArgs) {
150
+ return jsonResult(
151
+ await host.requestStatements({
152
+ requestId: text(args, 'requestId'),
153
+ limit: count(args, 'limit', REQUEST_STATEMENT_LIMITS.default),
154
+ }),
155
+ );
156
+ },
157
+ },
158
+ {
159
+ name: 'verify.narrow',
160
+ description:
161
+ 'What to run after editing one file: the x verify steps its change selects (the ' +
162
+ '--changed plan) and the narrowest commands for them. Runs nothing; verify.run runs them.',
163
+ scope: scopes.read,
164
+ destructive: false,
165
+ inputSchema: {
166
+ type: 'object',
167
+ properties: {
168
+ file: {
169
+ type: 'string',
170
+ minLength: 1,
171
+ description: 'App-relative, e.g. apps/web/app/page.tsx',
172
+ },
173
+ },
174
+ required: ['file'],
175
+ additionalProperties: false,
176
+ },
177
+ async handle(args: ToolArgs) {
178
+ return jsonResult(await host.narrowVerify(text(args, 'file') ?? ''));
179
+ },
180
+ },
181
+ ];
182
+ }
@@ -0,0 +1,39 @@
1
+ // `schema.describe`'s argument and answer: every entity, or the one an agent names. Its own file
2
+ // because `dev-server.ts` is at its ceiling, and the narrowing is the only logic the tool has.
3
+
4
+ import type { McpToolResult } from './registry';
5
+ import { jsonResult, textResult } from './registry';
6
+ import type { JsonSchema } from './wire';
7
+
8
+ export const ENTITY_ARG: JsonSchema = {
9
+ type: 'object',
10
+ properties: {
11
+ entity: { type: 'string', description: 'One entity, by name (post) or table (posts).' },
12
+ },
13
+ additionalProperties: false,
14
+ };
15
+
16
+ /**
17
+ * `schema.describe`, whole or for one entity. It took no arguments, so `{ entity: 'post' }` — the
18
+ * call an agent makes first — was refused as X_INPUT_INVALID with a fix naming `x actions show`,
19
+ * a command about actions. An unknown name answers the names there are, never an empty list.
20
+ */
21
+ export function describeSchema(entities: unknown, wanted: unknown): McpToolResult {
22
+ if (typeof wanted !== 'string' || !Array.isArray(entities)) return jsonResult(entities);
23
+ // Widened to `unknown`, never left as `Array.isArray`'s `any[]`: the host's answer is unchecked.
24
+ const list: readonly unknown[] = entities;
25
+ const field = (entry: unknown, key: string): unknown =>
26
+ typeof entry === 'object' && entry !== null
27
+ ? (entry as Record<string, unknown>)[key]
28
+ : undefined;
29
+ const found = list.filter(
30
+ (entry) => field(entry, 'name') === wanted || field(entry, 'table') === wanted,
31
+ );
32
+ if (found.length > 0) return jsonResult(found);
33
+ const known = list.map((entry) => field(entry, 'name')).filter((n) => typeof n === 'string');
34
+ return textResult(
35
+ `no entity named ${JSON.stringify(wanted)}; known: ${known.join(', ') || '(none)'} — ` +
36
+ 'call schema.describe with one of them, or with no entity for all',
37
+ true,
38
+ );
39
+ }
package/src/dev-server.ts CHANGED
@@ -10,8 +10,11 @@
10
10
  // packages of this same tier, and the shell-side capabilities (db, tests, logs) belong to
11
11
  // the CLI, so this file defines the interface and the CLI satisfies it.
12
12
 
13
+ import type { DevAgentHost } from './dev-agent-tools';
14
+ import { agentHostOf, agentTools } from './dev-agent-tools';
13
15
  import type { DevGraphHost } from './dev-graph-tool';
14
16
  import { graphTool } from './dev-graph-tool';
17
+ import { describeSchema, ENTITY_ARG } from './dev-schema-describe';
15
18
  import type { UiInteractInput, UiInteractResult } from './dev-ui-interact';
16
19
  import { uiInteractTools } from './dev-ui-interact';
17
20
  import type {
@@ -138,6 +141,12 @@ export interface DevIntrospection {
138
141
  */
139
142
  export interface DevCapabilities extends DevGraphHost {
140
143
  readonly database: DatabaseTarget;
144
+ // The four agent tools' answers (`dev-agent-tools.ts`), optional so a host written against an
145
+ // earlier 31.x still compiles: a host without one answers that tool X_NOT_IMPLEMENTED.
146
+ readonly searchDocs?: DevAgentHost['searchDocs'];
147
+ readonly explainQuery?: DevAgentHost['explainQuery'];
148
+ readonly requestStatements?: DevAgentHost['requestStatements'];
149
+ readonly narrowVerify?: DevAgentHost['narrowVerify'];
141
150
  /**
142
151
  * Run one already-parsed read-only statement under layers 1–2 (a SELECT-only role, a
143
152
  * `BEGIN READ ONLY` transaction, `limits.timeoutMs`) and return at most `limits.maxRows + 1`
@@ -202,8 +211,11 @@ export function devTools(host: DevHost): readonly AnyMcpTool[] {
202
211
  () => jsonResult(host.routes()),
203
212
  ),
204
213
 
205
- read('schema.describe', 'Entities with columns, types and invariants.', NO_ARGS, () =>
206
- jsonResult(host.entities()),
214
+ read(
215
+ 'schema.describe',
216
+ 'Entities with columns, types and invariants. `entity` narrows to one, by name or table.',
217
+ ENTITY_ARG,
218
+ (args) => describeSchema(host.entities(), args['entity']),
207
219
  ),
208
220
 
209
221
  read(
@@ -241,6 +253,13 @@ export function devTools(host: DevHost): readonly AnyMcpTool[] {
241
253
  // What an edit reaches, before it is made: `x impact` / `x graph --from --to` as a tool.
242
254
  graphTool(host, DEV_SCOPES.read),
243
255
 
256
+ // `docs.search`, `db.explain`, `requests.statements`, `verify.narrow` (`dev-agent-tools.ts`).
257
+ ...agentTools(agentHostOf(host), {
258
+ read: DEV_SCOPES.read,
259
+ logs: DEV_SCOPES.logs,
260
+ dbRead: DEV_SCOPES.dbRead,
261
+ }),
262
+
244
263
  read(
245
264
  'errors.explain',
246
265
  'Explain a stable X_* error code: cause, exact fix command, docs link.',
@@ -0,0 +1,54 @@
1
+ // `db.explain`'s statement: the caller's SELECT, screened by `db.query`'s own layer 3, then wrapped
2
+ // in the one EXPLAIN this tool sends. The caller never writes `EXPLAIN` or `ANALYZE` itself — the
3
+ // wrapper is built here, so `ANALYZE` exists only in text this file produced, around a statement
4
+ // the read-only parse already passed, inside the host's `BEGIN READ ONLY` transaction.
5
+
6
+ import { McpQueryRejectedError } from './errors';
7
+ import { assertReadOnlyQuery } from './readonly-sql';
8
+
9
+ /** The two leaders `db.explain` plans. `explain`, `show`, `table` and `values` are `db.query`'s. */
10
+ const PLAN_LEADERS: ReadonlySet<string> = new Set(['select', 'with']);
11
+
12
+ const LEADER = /^[a-z_]+/;
13
+
14
+ /** Named in `db.explain`'s `guards`, beside `db.query`'s `parse:single-read`. */
15
+ export const EXPLAIN_GUARD = 'parse:select-only';
16
+
17
+ /**
18
+ * Throw unless `sql` is ONE `SELECT` or `WITH … SELECT`, and answer the EXPLAIN that plans it.
19
+ *
20
+ * Every refusal `db.query` makes is made first and verbatim — a second statement after `;`, a
21
+ * data-modifying CTE (`WITH d AS (DELETE …) SELECT …`), a locking clause, a banned call — because
22
+ * `ANALYZE` executes the plan, and a statement this tool executes is held to the read-only bar.
23
+ * The leader check runs first, so `explain analyze …` is told to drop its own EXPLAIN rather than
24
+ * handed `db.query`'s write refusal for the word `analyze`. It reads the verbatim text, so a
25
+ * statement that opens with a comment is refused rather than stripped — the SELECT comes first.
26
+ */
27
+ export function explainStatement(sql: string, analyze: boolean): string {
28
+ const leader = LEADER.exec(sql.trimStart().toLowerCase())?.[0] ?? '';
29
+ if (!PLAN_LEADERS.has(leader)) {
30
+ throw new McpQueryRejectedError({
31
+ cause: `db.explain plans one SELECT or WITH … SELECT, and the statement begins with "${leader === '' ? sql.trimStart().slice(0, 2) : leader}"`,
32
+ fix: 'db.explain({ sql: "select id from posts where author_id = 1", analyze: true }) # send the bare SELECT; db.explain writes the EXPLAIN',
33
+ });
34
+ }
35
+ const statement = assertReadOnlyQuery(sql);
36
+ // `BUFFERS` only beside `ANALYZE`: without execution there are no buffers to count, and the
37
+ // option alone is refused by the Postgres versions PGlite tracks.
38
+ const options = analyze ? 'ANALYZE, BUFFERS, FORMAT JSON' : 'FORMAT JSON';
39
+ return `EXPLAIN (${options}) ${statement}`;
40
+ }
41
+
42
+ /**
43
+ * The plan out of EXPLAIN's single `QUERY PLAN` cell. A driver hands `json` back parsed or as
44
+ * text depending on its type parsers, so both are read; anything else is returned as it came,
45
+ * never guessed into a shape.
46
+ */
47
+ export function planOf(cell: unknown): unknown {
48
+ if (typeof cell !== 'string') return cell;
49
+ try {
50
+ return JSON.parse(cell) as unknown;
51
+ } catch {
52
+ return cell;
53
+ }
54
+ }