@tiangong-lca/cli 0.1.8 → 0.1.10

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 (77) hide show
  1. package/README.md +18 -5
  2. package/assets/runtime/cli-runtime-descriptor.schema.json +138 -0
  3. package/assets/runtime/cli-runtime-expectation.schema.json +38 -0
  4. package/assets/runtime/runtime-bootstrap-lock.schema.json +254 -0
  5. package/assets/runtime/runtime-command-result.schema.json +95 -0
  6. package/assets/runtime/runtime-manifest.schema.json +380 -0
  7. package/dist/src/cli.d.ts +2 -0
  8. package/dist/src/cli.js +48 -2
  9. package/dist/src/cli.js.map +1 -1
  10. package/dist/src/lib/dataset-import-lca.js +2 -2
  11. package/dist/src/lib/dataset-import-lca.js.map +1 -1
  12. package/dist/src/lib/dataset-support-cache.d.ts +48 -0
  13. package/dist/src/lib/dataset-support-cache.js +265 -0
  14. package/dist/src/lib/dataset-support-cache.js.map +1 -0
  15. package/dist/src/lib/runtime/archive-writer.d.ts +7 -0
  16. package/dist/src/lib/runtime/archive-writer.js +89 -0
  17. package/dist/src/lib/runtime/archive-writer.js.map +1 -0
  18. package/dist/src/lib/runtime/archive.d.ts +2 -0
  19. package/dist/src/lib/runtime/archive.js +122 -0
  20. package/dist/src/lib/runtime/archive.js.map +1 -0
  21. package/dist/src/lib/runtime/command.d.ts +8 -0
  22. package/dist/src/lib/runtime/command.js +57 -0
  23. package/dist/src/lib/runtime/command.js.map +1 -0
  24. package/dist/src/lib/runtime/descriptor.d.ts +11 -0
  25. package/dist/src/lib/runtime/descriptor.js +126 -0
  26. package/dist/src/lib/runtime/descriptor.js.map +1 -0
  27. package/dist/src/lib/runtime/download.d.ts +9 -0
  28. package/dist/src/lib/runtime/download.js +118 -0
  29. package/dist/src/lib/runtime/download.js.map +1 -0
  30. package/dist/src/lib/runtime/exec-command.d.ts +7 -0
  31. package/dist/src/lib/runtime/exec-command.js +83 -0
  32. package/dist/src/lib/runtime/exec-command.js.map +1 -0
  33. package/dist/src/lib/runtime/execute.d.ts +11 -0
  34. package/dist/src/lib/runtime/execute.js +125 -0
  35. package/dist/src/lib/runtime/execute.js.map +1 -0
  36. package/dist/src/lib/runtime/files.d.ts +7 -0
  37. package/dist/src/lib/runtime/files.js +91 -0
  38. package/dist/src/lib/runtime/files.js.map +1 -0
  39. package/dist/src/lib/runtime/host.d.ts +8 -0
  40. package/dist/src/lib/runtime/host.js +37 -0
  41. package/dist/src/lib/runtime/host.js.map +1 -0
  42. package/dist/src/lib/runtime/leases.d.ts +12 -0
  43. package/dist/src/lib/runtime/leases.js +72 -0
  44. package/dist/src/lib/runtime/leases.js.map +1 -0
  45. package/dist/src/lib/runtime/managed-command.d.ts +6 -0
  46. package/dist/src/lib/runtime/managed-command.js +99 -0
  47. package/dist/src/lib/runtime/managed-command.js.map +1 -0
  48. package/dist/src/lib/runtime/manager.d.ts +33 -0
  49. package/dist/src/lib/runtime/manager.js +196 -0
  50. package/dist/src/lib/runtime/manager.js.map +1 -0
  51. package/dist/src/lib/runtime/manifest-types.d.ts +73 -0
  52. package/dist/src/lib/runtime/manifest-types.js +4 -0
  53. package/dist/src/lib/runtime/manifest-types.js.map +1 -0
  54. package/dist/src/lib/runtime/manifest-values.d.ts +15 -0
  55. package/dist/src/lib/runtime/manifest-values.js +124 -0
  56. package/dist/src/lib/runtime/manifest-values.js.map +1 -0
  57. package/dist/src/lib/runtime/manifest.d.ts +7 -0
  58. package/dist/src/lib/runtime/manifest.js +220 -0
  59. package/dist/src/lib/runtime/manifest.js.map +1 -0
  60. package/dist/src/lib/runtime/process.d.ts +3 -0
  61. package/dist/src/lib/runtime/process.js +55 -0
  62. package/dist/src/lib/runtime/process.js.map +1 -0
  63. package/dist/src/lib/runtime/storage.d.ts +8 -0
  64. package/dist/src/lib/runtime/storage.js +142 -0
  65. package/dist/src/lib/runtime/storage.js.map +1 -0
  66. package/dist/src/lib/runtime/types.d.ts +45 -0
  67. package/dist/src/lib/runtime/types.js +9 -0
  68. package/dist/src/lib/runtime/types.js.map +1 -0
  69. package/dist/src/lib/supabase-data-api-contract.d.ts +4 -4
  70. package/dist/src/lib/supabase-data-api-contract.js +2 -0
  71. package/dist/src/lib/supabase-data-api-contract.js.map +1 -1
  72. package/dist/src/main.js +13 -1
  73. package/dist/src/main.js.map +1 -1
  74. package/dist/src/runtime.d.ts +15 -0
  75. package/dist/src/runtime.js +22 -0
  76. package/dist/src/runtime.js.map +1 -0
  77. package/package.json +8 -2
@@ -0,0 +1,380 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:tiangong-lca:runtime-manifest:v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schema",
8
+ "bootstrap_protocol",
9
+ "product",
10
+ "minimum_hosts",
11
+ "workspace",
12
+ "components",
13
+ "launches"
14
+ ],
15
+ "properties": {
16
+ "schema": {
17
+ "const": "tiangong-lca.runtime-manifest.v1"
18
+ },
19
+ "bootstrap_protocol": {
20
+ "const": "tiangong-lca.runtime-bootstrap.v1"
21
+ },
22
+ "product": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["id", "version"],
26
+ "properties": {
27
+ "id": {
28
+ "type": "string",
29
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
30
+ },
31
+ "version": {
32
+ "type": "string",
33
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
34
+ }
35
+ }
36
+ },
37
+ "minimum_hosts": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "minProperties": 1,
41
+ "properties": {
42
+ "darwin-arm64": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["os_release", "glibc"],
46
+ "properties": {
47
+ "os_release": {
48
+ "type": "string",
49
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
50
+ },
51
+ "glibc": {
52
+ "type": "null"
53
+ }
54
+ }
55
+ },
56
+ "linux-x64": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["os_release", "glibc"],
60
+ "properties": {
61
+ "os_release": {
62
+ "type": "string",
63
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
64
+ },
65
+ "glibc": {
66
+ "type": "string",
67
+ "pattern": "^[0-9]+\\.[0-9]+$"
68
+ }
69
+ }
70
+ },
71
+ "linux-arm64": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["os_release", "glibc"],
75
+ "properties": {
76
+ "os_release": {
77
+ "type": "string",
78
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
79
+ },
80
+ "glibc": {
81
+ "type": "string",
82
+ "pattern": "^[0-9]+\\.[0-9]+$"
83
+ }
84
+ }
85
+ },
86
+ "win32-x64": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["os_release", "glibc"],
90
+ "properties": {
91
+ "os_release": {
92
+ "type": "string",
93
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
94
+ },
95
+ "glibc": {
96
+ "type": "null"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "workspace": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["read", "write"],
106
+ "properties": {
107
+ "read": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": ["schema", "features"],
113
+ "properties": {
114
+ "schema": {
115
+ "type": "string",
116
+ "minLength": 1,
117
+ "maxLength": 256
118
+ },
119
+ "features": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "maxLength": 256
125
+ },
126
+ "maxItems": 64,
127
+ "minItems": 0
128
+ }
129
+ }
130
+ },
131
+ "maxItems": 32,
132
+ "minItems": 0
133
+ },
134
+ "write": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["schema", "features"],
140
+ "properties": {
141
+ "schema": {
142
+ "type": "string",
143
+ "minLength": 1,
144
+ "maxLength": 256
145
+ },
146
+ "features": {
147
+ "type": "array",
148
+ "items": {
149
+ "type": "string",
150
+ "minLength": 1,
151
+ "maxLength": 256
152
+ },
153
+ "maxItems": 64,
154
+ "minItems": 0
155
+ }
156
+ }
157
+ },
158
+ "maxItems": 32,
159
+ "minItems": 0
160
+ }
161
+ }
162
+ },
163
+ "components": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "id",
170
+ "version",
171
+ "platform",
172
+ "archive",
173
+ "files",
174
+ "content_sha256",
175
+ "production_lock",
176
+ "sbom",
177
+ "licenses",
178
+ "provenance",
179
+ "protocols",
180
+ "asset_fingerprints"
181
+ ],
182
+ "properties": {
183
+ "id": {
184
+ "type": "string",
185
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
186
+ },
187
+ "version": {
188
+ "type": "string",
189
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
190
+ },
191
+ "platform": {
192
+ "enum": ["darwin-arm64", "linux-x64", "linux-arm64", "win32-x64"]
193
+ },
194
+ "archive": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "required": ["format", "url", "bytes", "sha256"],
198
+ "properties": {
199
+ "format": {
200
+ "const": "tar-gzip-ustar-v1"
201
+ },
202
+ "url": {
203
+ "type": "string",
204
+ "format": "uri",
205
+ "maxLength": 4096
206
+ },
207
+ "bytes": {
208
+ "type": "integer",
209
+ "minimum": 1,
210
+ "maximum": 536870912
211
+ },
212
+ "sha256": {
213
+ "type": "string",
214
+ "pattern": "^[0-9a-f]{64}$"
215
+ }
216
+ }
217
+ },
218
+ "files": {
219
+ "type": "array",
220
+ "items": {
221
+ "type": "object",
222
+ "additionalProperties": false,
223
+ "required": ["path", "bytes", "sha256", "mode"],
224
+ "properties": {
225
+ "path": {
226
+ "type": "string",
227
+ "minLength": 1,
228
+ "maxLength": 255
229
+ },
230
+ "bytes": {
231
+ "type": "integer",
232
+ "minimum": 0,
233
+ "maximum": 536870912
234
+ },
235
+ "sha256": {
236
+ "type": "string",
237
+ "pattern": "^[0-9a-f]{64}$"
238
+ },
239
+ "mode": {
240
+ "enum": [420, 493]
241
+ }
242
+ }
243
+ },
244
+ "maxItems": 50000,
245
+ "minItems": 1
246
+ },
247
+ "content_sha256": {
248
+ "type": "string",
249
+ "pattern": "^[0-9a-f]{64}$"
250
+ },
251
+ "production_lock": {
252
+ "type": "string",
253
+ "minLength": 1,
254
+ "maxLength": 255
255
+ },
256
+ "sbom": {
257
+ "type": "string",
258
+ "minLength": 1,
259
+ "maxLength": 255
260
+ },
261
+ "licenses": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "string",
265
+ "minLength": 1,
266
+ "maxLength": 255
267
+ },
268
+ "maxItems": 64,
269
+ "minItems": 1
270
+ },
271
+ "provenance": {
272
+ "type": "array",
273
+ "items": {
274
+ "type": "string",
275
+ "minLength": 1,
276
+ "maxLength": 255
277
+ },
278
+ "maxItems": 64,
279
+ "minItems": 1
280
+ },
281
+ "protocols": {
282
+ "type": "array",
283
+ "items": {
284
+ "type": "string",
285
+ "minLength": 1,
286
+ "maxLength": 256
287
+ },
288
+ "maxItems": 32,
289
+ "minItems": 1
290
+ },
291
+ "asset_fingerprints": {
292
+ "type": "object",
293
+ "maxProperties": 64,
294
+ "additionalProperties": {
295
+ "type": "string",
296
+ "pattern": "^[0-9a-f]{64}$"
297
+ }
298
+ }
299
+ }
300
+ },
301
+ "maxItems": 128,
302
+ "minItems": 1
303
+ },
304
+ "launches": {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "object",
308
+ "additionalProperties": false,
309
+ "required": ["id", "platform", "executable", "environment", "argv"],
310
+ "properties": {
311
+ "id": {
312
+ "type": "string",
313
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
314
+ },
315
+ "platform": {
316
+ "enum": ["darwin-arm64", "linux-x64", "linux-arm64", "win32-x64"]
317
+ },
318
+ "executable": {
319
+ "type": "object",
320
+ "additionalProperties": false,
321
+ "required": ["component", "path"],
322
+ "properties": {
323
+ "component": {
324
+ "type": "string",
325
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
326
+ },
327
+ "path": {
328
+ "type": "string",
329
+ "minLength": 1,
330
+ "maxLength": 255
331
+ }
332
+ }
333
+ },
334
+ "environment": {
335
+ "enum": ["isolated", "cli-auth"]
336
+ },
337
+ "argv": {
338
+ "type": "array",
339
+ "items": {
340
+ "oneOf": [
341
+ {
342
+ "type": "object",
343
+ "additionalProperties": false,
344
+ "required": ["component", "path"],
345
+ "properties": {
346
+ "component": {
347
+ "type": "string",
348
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
349
+ },
350
+ "path": {
351
+ "type": "string",
352
+ "minLength": 1,
353
+ "maxLength": 255
354
+ }
355
+ }
356
+ },
357
+ {
358
+ "type": "object",
359
+ "additionalProperties": false,
360
+ "required": ["literal"],
361
+ "properties": {
362
+ "literal": {
363
+ "type": "string",
364
+ "minLength": 1,
365
+ "maxLength": 4096
366
+ }
367
+ }
368
+ }
369
+ ]
370
+ },
371
+ "maxItems": 32,
372
+ "minItems": 0
373
+ }
374
+ }
375
+ },
376
+ "maxItems": 64,
377
+ "minItems": 1
378
+ }
379
+ }
380
+ }
package/dist/src/cli.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { DotEnvLoadResult } from './lib/dotenv.js';
2
2
  import type { FetchLike } from './lib/http.js';
3
+ import { type RunDatasetSupportCacheExportOptions, type DatasetSupportCacheExportReport } from './lib/dataset-support-cache.js';
3
4
  import { inspectSupabaseAuthStatus, loginWithSupabaseOAuth, logoutSupabaseUserSession } from './lib/supabase-session.js';
4
5
  import { type AuthIdentityReceipt, type RunAuthIdentityReceiptOptions } from './lib/auth-identity-receipt.js';
5
6
  import { type LifecyclemodelAutoBuildReport, type RunLifecyclemodelAutoBuildOptions } from './lib/lifecyclemodel-auto-build.js';
@@ -68,6 +69,7 @@ import { runFlowIdentity } from './lib/dataset-maintenance-flow-identity-run.js'
68
69
  import { verifyFlowIdentity } from './lib/dataset-maintenance-flow-identity-verify.js';
69
70
  import { type DatasetSourceUploadAttachmentsReport, type RunDatasetSourceUploadAttachmentsOptions } from './lib/dataset-source-upload-attachments.js';
70
71
  export type CliDeps = {
72
+ runDatasetSupportCacheExportImpl?: (options: RunDatasetSupportCacheExportOptions) => Promise<DatasetSupportCacheExportReport>;
71
73
  env: NodeJS.ProcessEnv;
72
74
  dotEnvStatus: DotEnvLoadResult;
73
75
  fetchImpl: FetchLike;
package/dist/src/cli.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import { parseArgs } from 'node:util';
2
+ import { runRuntimeCommand } from './lib/runtime/command.js';
2
3
  import { buildDoctorReport, readRuntimeEnv } from './lib/env.js';
3
4
  import { CliError, toErrorPayload } from './lib/errors.js';
4
5
  import { stringifyJson } from './lib/io.js';
5
6
  import { loadCliPackageVersion } from './lib/package-version.js';
7
+ import { runDatasetSupportCacheExport, } from './lib/dataset-support-cache.js';
6
8
  import { requireSupabaseRestRuntime } from './lib/supabase-client.js';
7
9
  import { inspectSupabaseAuthStatus, loginWithSupabaseOAuth, logoutSupabaseUserSession, } from './lib/supabase-session.js';
8
10
  import { OAUTH_LOGIN_TIMEOUT_MAX_MS } from './lib/oauth-loopback.js';
@@ -90,10 +92,11 @@ Usage:
90
92
  Commands:
91
93
  Implemented Commands:
92
94
  doctor show environment diagnostics
95
+ runtime describe | ensure | status | prune | lease-release | exec
93
96
  auth login | status | whoami | doctor-auth | logout | identity-receipt
94
97
  search flow | process | lifecyclemodel
95
98
  process get | list | identity-preflight | build-plan | scope-statistics | dedup-review | auto-build | resume-build | publish-build | complete-required-fields | save-draft | batch-build | refresh-references | verify-rows
96
- dataset contract get | context-pack | classification children/path/audit/apply | curation-queue build/next/verify | import-lca convert | author | patch apply | save-draft | source upload-attachments | validate | verify-remote | bilingual extract/apply/validate | evidence-search plan/run | references rewrite/refresh-remote | maintenance clear-account/plan/apply/verify/flow-identity
99
+ dataset support-cache export | contract get | context-pack | classification children/path/audit/apply | curation-queue build/next/verify | import-lca convert | author | patch apply | save-draft | source upload-attachments | validate | verify-remote | bilingual extract/apply/validate | evidence-search plan/run | references rewrite/refresh-remote | maintenance clear-account/plan/apply/verify/flow-identity
97
100
  flow get | list | identity-preflight | build-plan | fetch-rows | materialize-decisions | remediate | publish-version | publish-reviewed-data | build-alias-map | scan-process-flow-refs | plan-process-flow-repairs | apply-process-flow-repairs | regen-product | validate-processes
98
101
  lifecyclemodel auto-build | validate-build | publish-build | save-draft | graph | build-resulting-process | publish-resulting-process | orchestrate
99
102
  qa process | flow | lifecyclemodel
@@ -450,6 +453,7 @@ function renderDatasetHelp() {
450
453
  tiangong-lca dataset <subcommand> [options]
451
454
 
452
455
  Implemented Subcommands:
456
+ support-cache export Export complete observed canonical support rows through OAuth
453
457
  contract get Write TIDAS schema / methodology / ruleset contract artifacts
454
458
  context-pack Write an AI-ready TIDAS contract context pack
455
459
  classification Navigate bundled TIDAS classification schemas or apply selected classifications
@@ -979,7 +983,7 @@ Outputs written under --output-dir:
979
983
  - mapping.csv.gz when --write-mapping is used
980
984
 
981
985
  Runtime contract:
982
- - Linux x86_64/ARM64, macOS Intel/Apple Silicon, and Windows x86_64 are supported.
986
+ - Linux x86_64/ARM64, macOS Apple Silicon (arm64), and Windows x86_64 are supported.
983
987
  - Windows ARM64 is unsupported.
984
988
  - The binary must report tidas.operation-report.v1 and a stable 0.2.x version.
985
989
  - Import publication, cancellation cleanup, and domain validation remain owned by Rust tidas.
@@ -5804,6 +5808,8 @@ export async function executeCli(argv, deps) {
5804
5808
  if (!command || command === 'help' || flags.help) {
5805
5809
  return { exitCode: 0, stdout: `${renderMainHelp(deps.dotEnvStatus)}\n`, stderr: '' };
5806
5810
  }
5811
+ if (command === 'runtime')
5812
+ return await runRuntimeCommand(subcommand, commandArgs, undefined, deps.fetchImpl, deps.env);
5807
5813
  if (command === 'doctor') {
5808
5814
  const doctorFlags = parseDoctorFlags(commandArgs);
5809
5815
  if (doctorFlags.help) {
@@ -6321,6 +6327,46 @@ export async function executeCli(argv, deps) {
6321
6327
  stderr: '',
6322
6328
  };
6323
6329
  }
6330
+ if (command === 'dataset' && subcommand === 'support-cache') {
6331
+ const help = 'Usage: tiangong-lca dataset support-cache export --out-dir <fresh-dir> [--state-code <int>] [--page-size <1..5000>] [--timeout-ms <1..120000>] [--expected-project-ref <ref>] [--expected-user-id <uuid>] [--json]';
6332
+ const action = commandArgs[0];
6333
+ if (!action || action === '--help' || action === '-h')
6334
+ return { exitCode: 0, stdout: help + '\n', stderr: '' };
6335
+ if (action !== 'export')
6336
+ throw new CliError('dataset support-cache action must be export.', {
6337
+ code: 'DATASET_SUPPORT_CACHE_ACTION_INVALID',
6338
+ exitCode: 2,
6339
+ });
6340
+ const { values } = parseArgs({
6341
+ args: commandArgs.slice(1),
6342
+ strict: true,
6343
+ allowPositionals: false,
6344
+ options: {
6345
+ 'out-dir': { type: 'string' },
6346
+ 'state-code': { type: 'string', multiple: true },
6347
+ 'page-size': { type: 'string' },
6348
+ 'timeout-ms': { type: 'string' },
6349
+ 'expected-project-ref': { type: 'string' },
6350
+ 'expected-user-id': { type: 'string' },
6351
+ json: { type: 'boolean' },
6352
+ help: { type: 'boolean', short: 'h' },
6353
+ },
6354
+ });
6355
+ if (values.help)
6356
+ return { exitCode: 0, stdout: help + '\n', stderr: '' };
6357
+ const report = await (deps.runDatasetSupportCacheExportImpl ?? runDatasetSupportCacheExport)({
6358
+ outDir: values['out-dir'] ?? '',
6359
+ env: deps.env,
6360
+ fetchImpl: deps.fetchImpl,
6361
+ cliVersion: loadCliPackageVersion(import.meta.url),
6362
+ stateCodes: values['state-code']?.map((value) => value.trim() ? Number(value) : Number.NaN),
6363
+ pageSize: values['page-size'] === undefined ? undefined : Number(values['page-size']),
6364
+ timeoutMs: values['timeout-ms'] === undefined ? undefined : Number(values['timeout-ms']),
6365
+ expectedProjectRef: values['expected-project-ref'],
6366
+ expectedUserId: values['expected-user-id'],
6367
+ });
6368
+ return { exitCode: 0, stdout: stringifyJson(report, values.json ?? false), stderr: '' };
6369
+ }
6324
6370
  if (command === 'dataset' && subcommand === 'verify-remote') {
6325
6371
  const datasetFlags = parseDatasetRemoteVerifyFlags(commandArgs);
6326
6372
  if (datasetFlags.help) {