@getmagical/cli 0.14.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16688,6 +16688,11 @@ var automatedVerificationRecordKindSchema = z35.enum([
16688
16688
  "automated_check",
16689
16689
  "automated_batch"
16690
16690
  ]);
16691
+ var verificationRecordKindSchema = z35.enum([
16692
+ "automated_check",
16693
+ "automated_batch",
16694
+ "human_check"
16695
+ ]);
16691
16696
  var verificationRecordStatusSchema = z35.enum([
16692
16697
  "started",
16693
16698
  "completed",
@@ -16791,7 +16796,13 @@ var verificationRuntimeSchema = z36.strictObject({
16791
16796
  configured_model: z36.string().nullable(),
16792
16797
  session_id: z36.string().nullable(),
16793
16798
  agent_id: z36.string().nullable(),
16794
- invocation: z36.enum(["interactive", "scheduled", "worker", "unknown"]),
16799
+ invocation: z36.enum([
16800
+ "interactive",
16801
+ "scheduled",
16802
+ "worker",
16803
+ "unknown",
16804
+ "human_helper"
16805
+ ]),
16795
16806
  scheduled_task_id: z36.string().nullable(),
16796
16807
  auth_mode: z36.enum(["saved_login", "api_key", "unknown"]),
16797
16808
  credential_ref: z36.string().nullable()
@@ -17141,6 +17152,9 @@ var verificationStorageRecordSchema = z36.union([
17141
17152
  ]);
17142
17153
  var verificationRecordPayloadSchema = z36.custom((value) => verificationStorageRecordSchema.safeParse(value).success, { message: "Invalid verification record payload." });
17143
17154
 
17155
+ // ../common/dist/src/zod-schemas/verification-records/verification-verdict.constants.js
17156
+ var VERIFICATION_VERDICT_LIST_DEFAULT_LIMIT = 20;
17157
+
17144
17158
  // ../common/dist/src/utils/automation-run-evidence.util.js
17145
17159
  var PORTAL_FILE_EXTENSIONS = [".csv", ".pdf"];
17146
17160
  var MAX_SCAN_DEPTH = 8;
@@ -18226,7 +18240,7 @@ mutation VerificationRecordUpload($records: [JSON!]!) {
18226
18240
  kind: "query",
18227
18241
  inputSchema: z38.object({
18228
18242
  id: z38.string().min(1),
18229
- kind: z38.enum(["automated_check", "automated_batch"])
18243
+ kind: z38.enum(["automated_check", "automated_batch", "human_check"])
18230
18244
  }),
18231
18245
  cli: {
18232
18246
  name: "get-verification-record",
@@ -18241,7 +18255,7 @@ mutation VerificationRecordUpload($records: [JSON!]!) {
18241
18255
  required: true
18242
18256
  }),
18243
18257
  stringOption({
18244
- description: "Record kind: automated_check or automated_batch.",
18258
+ description: "Record kind: automated_check, automated_batch, or human_check.",
18245
18259
  flagName: "kind",
18246
18260
  inputKey: "kind",
18247
18261
  required: true
@@ -18263,8 +18277,10 @@ query VerificationRecordGet($id: ID!, $kind: String!) {
18263
18277
  automationId: z38.string().min(1).optional(),
18264
18278
  automationRunId: z38.string().min(1).optional(),
18265
18279
  batchId: z38.string().min(1).optional(),
18280
+ workItemId: z38.string().min(1).optional(),
18281
+ judgeCheckId: z38.string().min(1).optional(),
18266
18282
  subjectCheckId: z38.string().min(1).optional(),
18267
- kind: z38.enum(["automated_check", "automated_batch"]).optional(),
18283
+ kind: z38.enum(["automated_check", "automated_batch", "human_check"]).optional(),
18268
18284
  from: z38.string().min(1).optional(),
18269
18285
  to: z38.string().min(1).optional(),
18270
18286
  limit: z38.number().int().min(1).max(100).default(20),
@@ -18292,12 +18308,22 @@ query VerificationRecordGet($id: ID!, $kind: String!) {
18292
18308
  inputKey: "batchId"
18293
18309
  }),
18294
18310
  stringOption({
18295
- description: "Reserved for future human reviews. Current automated records have no subject check and do not match this filter.",
18311
+ description: "Filter by work item ID.",
18312
+ flagName: "work-item-id",
18313
+ inputKey: "workItemId"
18314
+ }),
18315
+ stringOption({
18316
+ description: "Filter human results by paired automated check ID.",
18317
+ flagName: "judge-check-id",
18318
+ inputKey: "judgeCheckId"
18319
+ }),
18320
+ stringOption({
18321
+ description: "Compatibility alias for --judge-check-id.",
18296
18322
  flagName: "subject-check-id",
18297
18323
  inputKey: "subjectCheckId"
18298
18324
  }),
18299
18325
  stringOption({
18300
- description: "Record kind: automated_check or automated_batch.",
18326
+ description: "Record kind: automated_check, automated_batch, or human_check.",
18301
18327
  flagName: "kind",
18302
18328
  inputKey: "kind"
18303
18329
  }),
@@ -18330,6 +18356,8 @@ query VerificationRecordList(
18330
18356
  $automationId: ID
18331
18357
  $automationRunId: ID
18332
18358
  $batchId: ID
18359
+ $workItemId: ID
18360
+ $judgeCheckId: ID
18333
18361
  $subjectCheckId: ID
18334
18362
  $kind: String
18335
18363
  $from: String
@@ -18341,6 +18369,8 @@ query VerificationRecordList(
18341
18369
  automationId: $automationId
18342
18370
  automationRunId: $automationRunId
18343
18371
  batchId: $batchId
18372
+ workItemId: $workItemId
18373
+ judgeCheckId: $judgeCheckId
18344
18374
  subjectCheckId: $subjectCheckId
18345
18375
  kind: $kind
18346
18376
  from: $from
@@ -18348,6 +18378,136 @@ query VerificationRecordList(
18348
18378
  limit: $limit
18349
18379
  cursor: $cursor
18350
18380
  )
18381
+ }`
18382
+ }),
18383
+ createOperationSpec({
18384
+ operationName: "VerificationVerdictGet",
18385
+ apiKeyAccess: apiKeyAccessPolicies.runRead,
18386
+ kind: "query",
18387
+ inputSchema: z38.object({
18388
+ id: z38.uuid(),
18389
+ subject: z38.enum(["run", "work_item"])
18390
+ }),
18391
+ cli: {
18392
+ name: "get-verification-verdicts",
18393
+ path: ["verification-verdicts", "get"],
18394
+ description: "Get the judge verdict and all human verdicts for a run or work item.",
18395
+ resultKey: "verificationVerdictGet",
18396
+ options: [
18397
+ stringOption({
18398
+ description: "Run or work-item ID, according to subject.",
18399
+ flagName: "id",
18400
+ inputKey: "id",
18401
+ required: true
18402
+ }),
18403
+ stringOption({
18404
+ description: "Subject kind: run or work_item.",
18405
+ flagName: "subject",
18406
+ inputKey: "subject",
18407
+ required: true
18408
+ })
18409
+ ]
18410
+ },
18411
+ mcp: { exposed: false, fileName: "verificationVerdictGet.graphql" },
18412
+ scope: "organization",
18413
+ document: `# Get the current judge verdict and every human verdict for one subject
18414
+ query VerificationVerdictGet($id: ID!, $subject: String!) {
18415
+ verificationVerdictGet(id: $id, subject: $subject)
18416
+ }`
18417
+ }),
18418
+ createOperationSpec({
18419
+ operationName: "VerificationVerdictList",
18420
+ apiKeyAccess: apiKeyAccessPolicies.runRead,
18421
+ kind: "query",
18422
+ inputSchema: z38.object({
18423
+ automationId: z38.uuid().optional(),
18424
+ automationRunId: z38.uuid().optional(),
18425
+ workItemId: z38.uuid().optional(),
18426
+ source: z38.enum(["judge", "human"]).optional(),
18427
+ sampled: z38.boolean().optional(),
18428
+ from: z38.iso.datetime({ offset: true }).optional(),
18429
+ to: z38.iso.datetime({ offset: true }).optional(),
18430
+ limit: z38.number().int().min(1).max(100).default(VERIFICATION_VERDICT_LIST_DEFAULT_LIMIT),
18431
+ cursor: z38.string().min(1).optional()
18432
+ }),
18433
+ cli: {
18434
+ name: "list-verification-verdicts",
18435
+ path: ["verification-verdicts", "list"],
18436
+ description: "List current verdicts, newest first. Omitted filters include all values.",
18437
+ resultKey: "verificationVerdictList",
18438
+ options: [
18439
+ stringOption({
18440
+ description: "Filter by automation ID.",
18441
+ flagName: "automation-id",
18442
+ inputKey: "automationId"
18443
+ }),
18444
+ stringOption({
18445
+ description: "Filter by run ID.",
18446
+ flagName: "run-id",
18447
+ inputKey: "automationRunId"
18448
+ }),
18449
+ stringOption({
18450
+ description: "Return only work-item-subject verdicts for this work item; excludes run-subject verdicts for its runs.",
18451
+ flagName: "work-item-id",
18452
+ inputKey: "workItemId"
18453
+ }),
18454
+ stringOption({
18455
+ description: "Filter by source: judge or human. Omit to include both.",
18456
+ flagName: "source",
18457
+ inputKey: "source"
18458
+ }),
18459
+ jsonOption({
18460
+ description: "Filter by sampled status: true or false. Omit to include both.",
18461
+ flagName: "sampled",
18462
+ inputKey: "sampled"
18463
+ }),
18464
+ stringOption({
18465
+ description: "Inclusive decided-at lower bound as an ISO timestamp.",
18466
+ flagName: "from",
18467
+ inputKey: "from"
18468
+ }),
18469
+ stringOption({
18470
+ description: "Inclusive decided-at upper bound as an ISO timestamp.",
18471
+ flagName: "to",
18472
+ inputKey: "to"
18473
+ }),
18474
+ numberOption({
18475
+ description: `Maximum verdicts to return. Defaults to ${VERIFICATION_VERDICT_LIST_DEFAULT_LIMIT}; maximum 100.`,
18476
+ flagName: "limit",
18477
+ inputKey: "limit"
18478
+ }),
18479
+ stringOption({
18480
+ description: "Opaque pagination cursor from a previous response.",
18481
+ flagName: "cursor",
18482
+ inputKey: "cursor"
18483
+ })
18484
+ ]
18485
+ },
18486
+ mcp: { exposed: false, fileName: "verificationVerdictList.graphql" },
18487
+ scope: "organization",
18488
+ document: `# List current verification verdicts with optional filters and cursor pagination
18489
+ query VerificationVerdictList(
18490
+ $automationId: ID
18491
+ $automationRunId: ID
18492
+ $workItemId: ID
18493
+ $source: String
18494
+ $sampled: Boolean
18495
+ $from: String
18496
+ $to: String
18497
+ $limit: Int
18498
+ $cursor: String
18499
+ ) {
18500
+ verificationVerdictList(
18501
+ automationId: $automationId
18502
+ automationRunId: $automationRunId
18503
+ workItemId: $workItemId
18504
+ source: $source
18505
+ sampled: $sampled
18506
+ from: $from
18507
+ to: $to
18508
+ limit: $limit
18509
+ cursor: $cursor
18510
+ )
18351
18511
  }`
18352
18512
  }),
18353
18513
  createOperationSpec({