doc-detective-common 3.1.2-dev.2 → 3.1.2-dev.4

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 (27) hide show
  1. package/dist/schemas/config_v3.schema.json +1307 -25
  2. package/dist/schemas/loadCookie_v3.schema.json +228 -0
  3. package/dist/schemas/report_v3.schema.json +1296 -24
  4. package/dist/schemas/resolvedTests_v3.schema.json +2622 -68
  5. package/dist/schemas/saveCookie_v3.schema.json +245 -0
  6. package/dist/schemas/spec_v3.schema.json +1296 -24
  7. package/dist/schemas/step_v3.schema.json +636 -0
  8. package/dist/schemas/test_v3.schema.json +1296 -24
  9. package/package.json +5 -5
  10. package/src/schemas/build/config_v3.schema.json +2 -0
  11. package/src/schemas/build/loadCookie_v3.schema.json +138 -0
  12. package/src/schemas/build/saveCookie_v3.schema.json +149 -0
  13. package/src/schemas/build/step_v3.schema.json +59 -0
  14. package/src/schemas/dereferenceSchemas.js +2 -0
  15. package/src/schemas/output_schemas/config_v3.schema.json +1307 -25
  16. package/src/schemas/output_schemas/loadCookie_v3.schema.json +228 -0
  17. package/src/schemas/output_schemas/report_v3.schema.json +1296 -24
  18. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +2622 -68
  19. package/src/schemas/output_schemas/saveCookie_v3.schema.json +245 -0
  20. package/src/schemas/output_schemas/spec_v3.schema.json +1296 -24
  21. package/src/schemas/output_schemas/step_v3.schema.json +636 -0
  22. package/src/schemas/output_schemas/test_v3.schema.json +1296 -24
  23. package/src/schemas/schemas.json +8835 -74
  24. package/src/schemas/src_schemas/config_v3.schema.json +2 -0
  25. package/src/schemas/src_schemas/loadCookie_v3.schema.json +113 -0
  26. package/src/schemas/src_schemas/saveCookie_v3.schema.json +124 -0
  27. package/src/schemas/src_schemas/step_v3.schema.json +55 -0
@@ -748,10 +748,12 @@
748
748
  "find",
749
749
  "goTo",
750
750
  "httpRequest",
751
+ "loadCookie",
751
752
  "loadVariables",
752
753
  "record",
753
754
  "runCode",
754
755
  "runShell",
756
+ "saveCookie",
755
757
  "screenshot",
756
758
  "stopRecord",
757
759
  "type",
@@ -770,10 +772,12 @@
770
772
  "find",
771
773
  "goTo",
772
774
  "httpRequest",
775
+ "loadCookie",
773
776
  "loadVariables",
774
777
  "record",
775
778
  "runCode",
776
779
  "runShell",
780
+ "saveCookie",
777
781
  "screenshot",
778
782
  "stopRecord",
779
783
  "type",
@@ -4535,6 +4539,322 @@
4535
4539
  }
4536
4540
  ]
4537
4541
  },
4542
+ {
4543
+ "allOf": [
4544
+ {
4545
+ "type": "object",
4546
+ "dynamicDefaults": {
4547
+ "stepId": "uuid"
4548
+ },
4549
+ "properties": {
4550
+ "$schema": {
4551
+ "description": "JSON Schema for this object.",
4552
+ "type": "string",
4553
+ "enum": [
4554
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
4555
+ ]
4556
+ },
4557
+ "stepId": {
4558
+ "type": "string",
4559
+ "description": "ID of the step."
4560
+ },
4561
+ "description": {
4562
+ "type": "string",
4563
+ "description": "Description of the step."
4564
+ },
4565
+ "unsafe": {
4566
+ "type": "boolean",
4567
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
4568
+ "default": false
4569
+ },
4570
+ "outputs": {
4571
+ "type": "object",
4572
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
4573
+ "default": {},
4574
+ "patternProperties": {
4575
+ "^[A-Za-z0-9_]+$": {
4576
+ "type": "string",
4577
+ "description": "Runtime expression for a user-defined output value."
4578
+ }
4579
+ },
4580
+ "title": "Outputs (step)"
4581
+ },
4582
+ "variables": {
4583
+ "type": "object",
4584
+ "description": "Environment variables to set from user-defined expressions.",
4585
+ "default": {},
4586
+ "patternProperties": {
4587
+ "^[A-Za-z0-9_]+$": {
4588
+ "type": "string",
4589
+ "description": "Runtime expression for a user-defined output value."
4590
+ }
4591
+ },
4592
+ "title": "Variables (step)"
4593
+ },
4594
+ "breakpoint": {
4595
+ "type": "boolean",
4596
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
4597
+ "default": false
4598
+ }
4599
+ },
4600
+ "title": "Common"
4601
+ },
4602
+ {
4603
+ "type": "object",
4604
+ "required": [
4605
+ "saveCookie"
4606
+ ],
4607
+ "properties": {
4608
+ "saveCookie": {
4609
+ "$schema": "http://json-schema.org/draft-07/schema#",
4610
+ "title": "saveCookie",
4611
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
4612
+ "anyOf": [
4613
+ {
4614
+ "type": "string",
4615
+ "title": "Cookie name",
4616
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4617
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4618
+ "transform": [
4619
+ "trim"
4620
+ ]
4621
+ },
4622
+ {
4623
+ "type": "object",
4624
+ "additionalProperties": false,
4625
+ "properties": {
4626
+ "$schema": {
4627
+ "description": "Optional self-describing schema URI for linters",
4628
+ "type": "string",
4629
+ "format": "uri-reference"
4630
+ },
4631
+ "name": {
4632
+ "type": "string",
4633
+ "title": "Cookie name",
4634
+ "description": "Name of the specific cookie to save.",
4635
+ "pattern": "^[A-Za-z0-9_.-]+$",
4636
+ "transform": [
4637
+ "trim"
4638
+ ]
4639
+ },
4640
+ "variable": {
4641
+ "type": "string",
4642
+ "title": "Environment variable name",
4643
+ "description": "Environment variable name to store the cookie as JSON string.",
4644
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4645
+ "transform": [
4646
+ "trim"
4647
+ ]
4648
+ },
4649
+ "path": {
4650
+ "type": "string",
4651
+ "title": "Cookie file path",
4652
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4653
+ "transform": [
4654
+ "trim"
4655
+ ]
4656
+ },
4657
+ "directory": {
4658
+ "type": "string",
4659
+ "title": "Directory path",
4660
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4661
+ "transform": [
4662
+ "trim"
4663
+ ]
4664
+ },
4665
+ "overwrite": {
4666
+ "type": "boolean",
4667
+ "title": "Overwrite existing file",
4668
+ "description": "Whether to overwrite existing cookie file.",
4669
+ "default": false
4670
+ },
4671
+ "domain": {
4672
+ "type": "string",
4673
+ "title": "Cookie domain",
4674
+ "description": "Specific domain to filter the cookie by (optional).",
4675
+ "transform": [
4676
+ "trim"
4677
+ ]
4678
+ }
4679
+ },
4680
+ "required": [
4681
+ "name"
4682
+ ],
4683
+ "anyOf": [
4684
+ {
4685
+ "required": [
4686
+ "path"
4687
+ ],
4688
+ "not": {
4689
+ "required": [
4690
+ "variable"
4691
+ ]
4692
+ }
4693
+ },
4694
+ {
4695
+ "required": [
4696
+ "variable"
4697
+ ],
4698
+ "not": {
4699
+ "anyOf": [
4700
+ {
4701
+ "required": [
4702
+ "path"
4703
+ ]
4704
+ },
4705
+ {
4706
+ "required": [
4707
+ "directory"
4708
+ ]
4709
+ }
4710
+ ]
4711
+ }
4712
+ }
4713
+ ],
4714
+ "title": "Save cookie (detailed)"
4715
+ }
4716
+ ],
4717
+ "components": {
4718
+ "schemas": {
4719
+ "string": {
4720
+ "type": "string",
4721
+ "title": "Cookie name",
4722
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4723
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4724
+ "transform": [
4725
+ "trim"
4726
+ ]
4727
+ },
4728
+ "object": {
4729
+ "type": "object",
4730
+ "additionalProperties": false,
4731
+ "properties": {
4732
+ "$schema": {
4733
+ "description": "Optional self-describing schema URI for linters",
4734
+ "type": "string",
4735
+ "format": "uri-reference"
4736
+ },
4737
+ "name": {
4738
+ "type": "string",
4739
+ "title": "Cookie name",
4740
+ "description": "Name of the specific cookie to save.",
4741
+ "pattern": "^[A-Za-z0-9_.-]+$",
4742
+ "transform": [
4743
+ "trim"
4744
+ ]
4745
+ },
4746
+ "variable": {
4747
+ "type": "string",
4748
+ "title": "Environment variable name",
4749
+ "description": "Environment variable name to store the cookie as JSON string.",
4750
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4751
+ "transform": [
4752
+ "trim"
4753
+ ]
4754
+ },
4755
+ "path": {
4756
+ "type": "string",
4757
+ "title": "Cookie file path",
4758
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4759
+ "transform": [
4760
+ "trim"
4761
+ ]
4762
+ },
4763
+ "directory": {
4764
+ "type": "string",
4765
+ "title": "Directory path",
4766
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4767
+ "transform": [
4768
+ "trim"
4769
+ ]
4770
+ },
4771
+ "overwrite": {
4772
+ "type": "boolean",
4773
+ "title": "Overwrite existing file",
4774
+ "description": "Whether to overwrite existing cookie file.",
4775
+ "default": false
4776
+ },
4777
+ "domain": {
4778
+ "type": "string",
4779
+ "title": "Cookie domain",
4780
+ "description": "Specific domain to filter the cookie by (optional).",
4781
+ "transform": [
4782
+ "trim"
4783
+ ]
4784
+ }
4785
+ },
4786
+ "required": [
4787
+ "name"
4788
+ ],
4789
+ "anyOf": [
4790
+ {
4791
+ "required": [
4792
+ "path"
4793
+ ],
4794
+ "not": {
4795
+ "required": [
4796
+ "variable"
4797
+ ]
4798
+ }
4799
+ },
4800
+ {
4801
+ "required": [
4802
+ "variable"
4803
+ ],
4804
+ "not": {
4805
+ "anyOf": [
4806
+ {
4807
+ "required": [
4808
+ "path"
4809
+ ]
4810
+ },
4811
+ {
4812
+ "required": [
4813
+ "directory"
4814
+ ]
4815
+ }
4816
+ ]
4817
+ }
4818
+ }
4819
+ ],
4820
+ "title": "Save cookie (detailed)"
4821
+ }
4822
+ }
4823
+ },
4824
+ "examples": [
4825
+ "session_token",
4826
+ "test_env_cookie",
4827
+ {
4828
+ "name": "auth_cookie",
4829
+ "path": "auth-cookie.txt"
4830
+ },
4831
+ {
4832
+ "name": "session_token",
4833
+ "variable": "SESSION_TOKEN"
4834
+ },
4835
+ {
4836
+ "name": "test_cookie",
4837
+ "path": "test-cookie.txt",
4838
+ "overwrite": true
4839
+ },
4840
+ {
4841
+ "name": "user_session",
4842
+ "path": "user-session.txt",
4843
+ "directory": "./test-data",
4844
+ "overwrite": true
4845
+ },
4846
+ {
4847
+ "name": "login_token",
4848
+ "path": "login-token.txt",
4849
+ "domain": "app.example.com"
4850
+ }
4851
+ ]
4852
+ }
4853
+ },
4854
+ "title": "saveCookie"
4855
+ }
4856
+ ]
4857
+ },
4538
4858
  {
4539
4859
  "allOf": [
4540
4860
  {
@@ -4872,6 +5192,305 @@
4872
5192
  }
4873
5193
  ]
4874
5194
  },
5195
+ {
5196
+ "allOf": [
5197
+ {
5198
+ "type": "object",
5199
+ "dynamicDefaults": {
5200
+ "stepId": "uuid"
5201
+ },
5202
+ "properties": {
5203
+ "$schema": {
5204
+ "description": "JSON Schema for this object.",
5205
+ "type": "string",
5206
+ "enum": [
5207
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
5208
+ ]
5209
+ },
5210
+ "stepId": {
5211
+ "type": "string",
5212
+ "description": "ID of the step."
5213
+ },
5214
+ "description": {
5215
+ "type": "string",
5216
+ "description": "Description of the step."
5217
+ },
5218
+ "unsafe": {
5219
+ "type": "boolean",
5220
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
5221
+ "default": false
5222
+ },
5223
+ "outputs": {
5224
+ "type": "object",
5225
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
5226
+ "default": {},
5227
+ "patternProperties": {
5228
+ "^[A-Za-z0-9_]+$": {
5229
+ "type": "string",
5230
+ "description": "Runtime expression for a user-defined output value."
5231
+ }
5232
+ },
5233
+ "title": "Outputs (step)"
5234
+ },
5235
+ "variables": {
5236
+ "type": "object",
5237
+ "description": "Environment variables to set from user-defined expressions.",
5238
+ "default": {},
5239
+ "patternProperties": {
5240
+ "^[A-Za-z0-9_]+$": {
5241
+ "type": "string",
5242
+ "description": "Runtime expression for a user-defined output value."
5243
+ }
5244
+ },
5245
+ "title": "Variables (step)"
5246
+ },
5247
+ "breakpoint": {
5248
+ "type": "boolean",
5249
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
5250
+ "default": false
5251
+ }
5252
+ },
5253
+ "title": "Common"
5254
+ },
5255
+ {
5256
+ "title": "loadCookie",
5257
+ "type": "object",
5258
+ "required": [
5259
+ "loadCookie"
5260
+ ],
5261
+ "properties": {
5262
+ "loadCookie": {
5263
+ "$schema": "http://json-schema.org/draft-07/schema#",
5264
+ "title": "loadCookie",
5265
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
5266
+ "anyOf": [
5267
+ {
5268
+ "type": "string",
5269
+ "title": "Cookie name or file path",
5270
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5271
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5272
+ "transform": [
5273
+ "trim"
5274
+ ]
5275
+ },
5276
+ {
5277
+ "type": "object",
5278
+ "additionalProperties": false,
5279
+ "required": [
5280
+ "name"
5281
+ ],
5282
+ "anyOf": [
5283
+ {
5284
+ "required": [
5285
+ "path"
5286
+ ],
5287
+ "not": {
5288
+ "required": [
5289
+ "variable"
5290
+ ]
5291
+ }
5292
+ },
5293
+ {
5294
+ "required": [
5295
+ "variable"
5296
+ ],
5297
+ "not": {
5298
+ "anyOf": [
5299
+ {
5300
+ "required": [
5301
+ "path"
5302
+ ]
5303
+ },
5304
+ {
5305
+ "required": [
5306
+ "directory"
5307
+ ]
5308
+ }
5309
+ ]
5310
+ }
5311
+ }
5312
+ ],
5313
+ "properties": {
5314
+ "$schema": {
5315
+ "description": "Optional self-describing schema URI for linters",
5316
+ "type": "string",
5317
+ "format": "uri-reference"
5318
+ },
5319
+ "name": {
5320
+ "type": "string",
5321
+ "title": "Cookie name",
5322
+ "description": "Name of the specific cookie to load.",
5323
+ "pattern": "^[A-Za-z0-9_.-]+$",
5324
+ "transform": [
5325
+ "trim"
5326
+ ]
5327
+ },
5328
+ "variable": {
5329
+ "type": "string",
5330
+ "title": "Environment variable name",
5331
+ "description": "Environment variable name containing the cookie as JSON string.",
5332
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5333
+ "transform": [
5334
+ "trim"
5335
+ ]
5336
+ },
5337
+ "path": {
5338
+ "type": "string",
5339
+ "title": "Cookie file path",
5340
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5341
+ "transform": [
5342
+ "trim"
5343
+ ]
5344
+ },
5345
+ "directory": {
5346
+ "type": "string",
5347
+ "title": "Directory path",
5348
+ "description": "Directory containing the cookie file.",
5349
+ "transform": [
5350
+ "trim"
5351
+ ]
5352
+ },
5353
+ "domain": {
5354
+ "type": "string",
5355
+ "title": "Cookie domain",
5356
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5357
+ "transform": [
5358
+ "trim"
5359
+ ]
5360
+ }
5361
+ },
5362
+ "title": "Load cookie (detailed)"
5363
+ }
5364
+ ],
5365
+ "components": {
5366
+ "schemas": {
5367
+ "string": {
5368
+ "type": "string",
5369
+ "title": "Cookie name or file path",
5370
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5371
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5372
+ "transform": [
5373
+ "trim"
5374
+ ]
5375
+ },
5376
+ "object": {
5377
+ "type": "object",
5378
+ "additionalProperties": false,
5379
+ "required": [
5380
+ "name"
5381
+ ],
5382
+ "anyOf": [
5383
+ {
5384
+ "required": [
5385
+ "path"
5386
+ ],
5387
+ "not": {
5388
+ "required": [
5389
+ "variable"
5390
+ ]
5391
+ }
5392
+ },
5393
+ {
5394
+ "required": [
5395
+ "variable"
5396
+ ],
5397
+ "not": {
5398
+ "anyOf": [
5399
+ {
5400
+ "required": [
5401
+ "path"
5402
+ ]
5403
+ },
5404
+ {
5405
+ "required": [
5406
+ "directory"
5407
+ ]
5408
+ }
5409
+ ]
5410
+ }
5411
+ }
5412
+ ],
5413
+ "properties": {
5414
+ "$schema": {
5415
+ "description": "Optional self-describing schema URI for linters",
5416
+ "type": "string",
5417
+ "format": "uri-reference"
5418
+ },
5419
+ "name": {
5420
+ "type": "string",
5421
+ "title": "Cookie name",
5422
+ "description": "Name of the specific cookie to load.",
5423
+ "pattern": "^[A-Za-z0-9_.-]+$",
5424
+ "transform": [
5425
+ "trim"
5426
+ ]
5427
+ },
5428
+ "variable": {
5429
+ "type": "string",
5430
+ "title": "Environment variable name",
5431
+ "description": "Environment variable name containing the cookie as JSON string.",
5432
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5433
+ "transform": [
5434
+ "trim"
5435
+ ]
5436
+ },
5437
+ "path": {
5438
+ "type": "string",
5439
+ "title": "Cookie file path",
5440
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5441
+ "transform": [
5442
+ "trim"
5443
+ ]
5444
+ },
5445
+ "directory": {
5446
+ "type": "string",
5447
+ "title": "Directory path",
5448
+ "description": "Directory containing the cookie file.",
5449
+ "transform": [
5450
+ "trim"
5451
+ ]
5452
+ },
5453
+ "domain": {
5454
+ "type": "string",
5455
+ "title": "Cookie domain",
5456
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5457
+ "transform": [
5458
+ "trim"
5459
+ ]
5460
+ }
5461
+ },
5462
+ "title": "Load cookie (detailed)"
5463
+ }
5464
+ }
5465
+ },
5466
+ "examples": [
5467
+ "session_token",
5468
+ "./test-data/auth-session.txt",
5469
+ "test_env_cookie",
5470
+ {
5471
+ "name": "auth_cookie",
5472
+ "variable": "AUTH_COOKIE"
5473
+ },
5474
+ {
5475
+ "name": "test_cookie",
5476
+ "path": "test-cookie.txt"
5477
+ },
5478
+ {
5479
+ "name": "session_token",
5480
+ "path": "session-token.txt",
5481
+ "directory": "./test-data"
5482
+ },
5483
+ {
5484
+ "name": "user_session",
5485
+ "path": "saved-cookies.txt",
5486
+ "domain": "app.example.com"
5487
+ }
5488
+ ]
5489
+ }
5490
+ }
5491
+ }
5492
+ ]
5493
+ },
4875
5494
  {
4876
5495
  "allOf": [
4877
5496
  {
@@ -5099,17 +5718,38 @@
5099
5718
  "record": "static/media/video.mp4"
5100
5719
  },
5101
5720
  {
5102
- "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
5721
+ "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
5722
+ },
5723
+ {
5724
+ "record": {
5725
+ "path": "video.mp4",
5726
+ "directory": "static/media",
5727
+ "overwrite": true
5728
+ }
5729
+ },
5730
+ {
5731
+ "loadVariables": "variables.env"
5732
+ },
5733
+ {
5734
+ "saveCookie": "session_token"
5103
5735
  },
5104
5736
  {
5105
- "record": {
5106
- "path": "video.mp4",
5107
- "directory": "static/media",
5737
+ "saveCookie": {
5738
+ "name": "auth_cookie",
5739
+ "path": "auth-session.txt",
5740
+ "directory": "./test-data",
5108
5741
  "overwrite": true
5109
5742
  }
5110
5743
  },
5111
5744
  {
5112
- "loadVariables": "variables.env"
5745
+ "loadCookie": "session_token"
5746
+ },
5747
+ {
5748
+ "loadCookie": {
5749
+ "name": "auth_cookie",
5750
+ "path": "auth-session.txt",
5751
+ "directory": "./test-data"
5752
+ }
5113
5753
  },
5114
5754
  {
5115
5755
  "find": "Find me!"
@@ -5984,10 +6624,12 @@
5984
6624
  "find",
5985
6625
  "goTo",
5986
6626
  "httpRequest",
6627
+ "loadCookie",
5987
6628
  "loadVariables",
5988
6629
  "record",
5989
6630
  "runCode",
5990
6631
  "runShell",
6632
+ "saveCookie",
5991
6633
  "screenshot",
5992
6634
  "stopRecord",
5993
6635
  "type",
@@ -6006,10 +6648,12 @@
6006
6648
  "find",
6007
6649
  "goTo",
6008
6650
  "httpRequest",
6651
+ "loadCookie",
6009
6652
  "loadVariables",
6010
6653
  "record",
6011
6654
  "runCode",
6012
6655
  "runShell",
6656
+ "saveCookie",
6013
6657
  "screenshot",
6014
6658
  "stopRecord",
6015
6659
  "type",
@@ -9743,31 +10387,347 @@
9743
10387
  "crop": "#elementToScreenshot"
9744
10388
  },
9745
10389
  {
9746
- "path": "image.png",
9747
- "directory": "static/images",
9748
- "maxVariation": 0.1,
9749
- "overwrite": "aboveVariation"
10390
+ "path": "image.png",
10391
+ "directory": "static/images",
10392
+ "maxVariation": 0.1,
10393
+ "overwrite": "aboveVariation"
10394
+ },
10395
+ {
10396
+ "path": "image.png",
10397
+ "directory": "static/images",
10398
+ "maxVariation": 0.1,
10399
+ "overwrite": "aboveVariation",
10400
+ "crop": {
10401
+ "selector": "#elementToScreenshot",
10402
+ "elementText": "Element text",
10403
+ "padding": {
10404
+ "top": 0,
10405
+ "right": 0,
10406
+ "bottom": 0,
10407
+ "left": 0
10408
+ }
10409
+ }
10410
+ }
10411
+ ]
10412
+ }
10413
+ },
10414
+ "title": "screenshot"
10415
+ }
10416
+ ]
10417
+ },
10418
+ {
10419
+ "allOf": [
10420
+ {
10421
+ "type": "object",
10422
+ "dynamicDefaults": {
10423
+ "stepId": "uuid"
10424
+ },
10425
+ "properties": {
10426
+ "$schema": {
10427
+ "description": "JSON Schema for this object.",
10428
+ "type": "string",
10429
+ "enum": [
10430
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
10431
+ ]
10432
+ },
10433
+ "stepId": {
10434
+ "type": "string",
10435
+ "description": "ID of the step."
10436
+ },
10437
+ "description": {
10438
+ "type": "string",
10439
+ "description": "Description of the step."
10440
+ },
10441
+ "unsafe": {
10442
+ "type": "boolean",
10443
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
10444
+ "default": false
10445
+ },
10446
+ "outputs": {
10447
+ "type": "object",
10448
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
10449
+ "default": {},
10450
+ "patternProperties": {
10451
+ "^[A-Za-z0-9_]+$": {
10452
+ "type": "string",
10453
+ "description": "Runtime expression for a user-defined output value."
10454
+ }
10455
+ },
10456
+ "title": "Outputs (step)"
10457
+ },
10458
+ "variables": {
10459
+ "type": "object",
10460
+ "description": "Environment variables to set from user-defined expressions.",
10461
+ "default": {},
10462
+ "patternProperties": {
10463
+ "^[A-Za-z0-9_]+$": {
10464
+ "type": "string",
10465
+ "description": "Runtime expression for a user-defined output value."
10466
+ }
10467
+ },
10468
+ "title": "Variables (step)"
10469
+ },
10470
+ "breakpoint": {
10471
+ "type": "boolean",
10472
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
10473
+ "default": false
10474
+ }
10475
+ },
10476
+ "title": "Common"
10477
+ },
10478
+ {
10479
+ "type": "object",
10480
+ "required": [
10481
+ "saveCookie"
10482
+ ],
10483
+ "properties": {
10484
+ "saveCookie": {
10485
+ "$schema": "http://json-schema.org/draft-07/schema#",
10486
+ "title": "saveCookie",
10487
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
10488
+ "anyOf": [
10489
+ {
10490
+ "type": "string",
10491
+ "title": "Cookie name",
10492
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10493
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10494
+ "transform": [
10495
+ "trim"
10496
+ ]
10497
+ },
10498
+ {
10499
+ "type": "object",
10500
+ "additionalProperties": false,
10501
+ "properties": {
10502
+ "$schema": {
10503
+ "description": "Optional self-describing schema URI for linters",
10504
+ "type": "string",
10505
+ "format": "uri-reference"
10506
+ },
10507
+ "name": {
10508
+ "type": "string",
10509
+ "title": "Cookie name",
10510
+ "description": "Name of the specific cookie to save.",
10511
+ "pattern": "^[A-Za-z0-9_.-]+$",
10512
+ "transform": [
10513
+ "trim"
10514
+ ]
10515
+ },
10516
+ "variable": {
10517
+ "type": "string",
10518
+ "title": "Environment variable name",
10519
+ "description": "Environment variable name to store the cookie as JSON string.",
10520
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10521
+ "transform": [
10522
+ "trim"
10523
+ ]
10524
+ },
10525
+ "path": {
10526
+ "type": "string",
10527
+ "title": "Cookie file path",
10528
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10529
+ "transform": [
10530
+ "trim"
10531
+ ]
10532
+ },
10533
+ "directory": {
10534
+ "type": "string",
10535
+ "title": "Directory path",
10536
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10537
+ "transform": [
10538
+ "trim"
10539
+ ]
10540
+ },
10541
+ "overwrite": {
10542
+ "type": "boolean",
10543
+ "title": "Overwrite existing file",
10544
+ "description": "Whether to overwrite existing cookie file.",
10545
+ "default": false
10546
+ },
10547
+ "domain": {
10548
+ "type": "string",
10549
+ "title": "Cookie domain",
10550
+ "description": "Specific domain to filter the cookie by (optional).",
10551
+ "transform": [
10552
+ "trim"
10553
+ ]
10554
+ }
10555
+ },
10556
+ "required": [
10557
+ "name"
10558
+ ],
10559
+ "anyOf": [
10560
+ {
10561
+ "required": [
10562
+ "path"
10563
+ ],
10564
+ "not": {
10565
+ "required": [
10566
+ "variable"
10567
+ ]
10568
+ }
10569
+ },
10570
+ {
10571
+ "required": [
10572
+ "variable"
10573
+ ],
10574
+ "not": {
10575
+ "anyOf": [
10576
+ {
10577
+ "required": [
10578
+ "path"
10579
+ ]
10580
+ },
10581
+ {
10582
+ "required": [
10583
+ "directory"
10584
+ ]
10585
+ }
10586
+ ]
10587
+ }
10588
+ }
10589
+ ],
10590
+ "title": "Save cookie (detailed)"
10591
+ }
10592
+ ],
10593
+ "components": {
10594
+ "schemas": {
10595
+ "string": {
10596
+ "type": "string",
10597
+ "title": "Cookie name",
10598
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10599
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10600
+ "transform": [
10601
+ "trim"
10602
+ ]
10603
+ },
10604
+ "object": {
10605
+ "type": "object",
10606
+ "additionalProperties": false,
10607
+ "properties": {
10608
+ "$schema": {
10609
+ "description": "Optional self-describing schema URI for linters",
10610
+ "type": "string",
10611
+ "format": "uri-reference"
10612
+ },
10613
+ "name": {
10614
+ "type": "string",
10615
+ "title": "Cookie name",
10616
+ "description": "Name of the specific cookie to save.",
10617
+ "pattern": "^[A-Za-z0-9_.-]+$",
10618
+ "transform": [
10619
+ "trim"
10620
+ ]
10621
+ },
10622
+ "variable": {
10623
+ "type": "string",
10624
+ "title": "Environment variable name",
10625
+ "description": "Environment variable name to store the cookie as JSON string.",
10626
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10627
+ "transform": [
10628
+ "trim"
10629
+ ]
10630
+ },
10631
+ "path": {
10632
+ "type": "string",
10633
+ "title": "Cookie file path",
10634
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10635
+ "transform": [
10636
+ "trim"
10637
+ ]
10638
+ },
10639
+ "directory": {
10640
+ "type": "string",
10641
+ "title": "Directory path",
10642
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10643
+ "transform": [
10644
+ "trim"
10645
+ ]
10646
+ },
10647
+ "overwrite": {
10648
+ "type": "boolean",
10649
+ "title": "Overwrite existing file",
10650
+ "description": "Whether to overwrite existing cookie file.",
10651
+ "default": false
10652
+ },
10653
+ "domain": {
10654
+ "type": "string",
10655
+ "title": "Cookie domain",
10656
+ "description": "Specific domain to filter the cookie by (optional).",
10657
+ "transform": [
10658
+ "trim"
10659
+ ]
10660
+ }
10661
+ },
10662
+ "required": [
10663
+ "name"
10664
+ ],
10665
+ "anyOf": [
10666
+ {
10667
+ "required": [
10668
+ "path"
10669
+ ],
10670
+ "not": {
10671
+ "required": [
10672
+ "variable"
10673
+ ]
10674
+ }
10675
+ },
10676
+ {
10677
+ "required": [
10678
+ "variable"
10679
+ ],
10680
+ "not": {
10681
+ "anyOf": [
10682
+ {
10683
+ "required": [
10684
+ "path"
10685
+ ]
10686
+ },
10687
+ {
10688
+ "required": [
10689
+ "directory"
10690
+ ]
10691
+ }
10692
+ ]
10693
+ }
10694
+ }
10695
+ ],
10696
+ "title": "Save cookie (detailed)"
10697
+ }
10698
+ }
10699
+ },
10700
+ "examples": [
10701
+ "session_token",
10702
+ "test_env_cookie",
10703
+ {
10704
+ "name": "auth_cookie",
10705
+ "path": "auth-cookie.txt"
10706
+ },
10707
+ {
10708
+ "name": "session_token",
10709
+ "variable": "SESSION_TOKEN"
10710
+ },
10711
+ {
10712
+ "name": "test_cookie",
10713
+ "path": "test-cookie.txt",
10714
+ "overwrite": true
9750
10715
  },
9751
10716
  {
9752
- "path": "image.png",
9753
- "directory": "static/images",
9754
- "maxVariation": 0.1,
9755
- "overwrite": "aboveVariation",
9756
- "crop": {
9757
- "selector": "#elementToScreenshot",
9758
- "elementText": "Element text",
9759
- "padding": {
9760
- "top": 0,
9761
- "right": 0,
9762
- "bottom": 0,
9763
- "left": 0
9764
- }
9765
- }
10717
+ "name": "user_session",
10718
+ "path": "user-session.txt",
10719
+ "directory": "./test-data",
10720
+ "overwrite": true
10721
+ },
10722
+ {
10723
+ "name": "login_token",
10724
+ "path": "login-token.txt",
10725
+ "domain": "app.example.com"
9766
10726
  }
9767
10727
  ]
9768
10728
  }
9769
10729
  },
9770
- "title": "screenshot"
10730
+ "title": "saveCookie"
9771
10731
  }
9772
10732
  ]
9773
10733
  },
@@ -10108,6 +11068,305 @@
10108
11068
  }
10109
11069
  ]
10110
11070
  },
11071
+ {
11072
+ "allOf": [
11073
+ {
11074
+ "type": "object",
11075
+ "dynamicDefaults": {
11076
+ "stepId": "uuid"
11077
+ },
11078
+ "properties": {
11079
+ "$schema": {
11080
+ "description": "JSON Schema for this object.",
11081
+ "type": "string",
11082
+ "enum": [
11083
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
11084
+ ]
11085
+ },
11086
+ "stepId": {
11087
+ "type": "string",
11088
+ "description": "ID of the step."
11089
+ },
11090
+ "description": {
11091
+ "type": "string",
11092
+ "description": "Description of the step."
11093
+ },
11094
+ "unsafe": {
11095
+ "type": "boolean",
11096
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
11097
+ "default": false
11098
+ },
11099
+ "outputs": {
11100
+ "type": "object",
11101
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
11102
+ "default": {},
11103
+ "patternProperties": {
11104
+ "^[A-Za-z0-9_]+$": {
11105
+ "type": "string",
11106
+ "description": "Runtime expression for a user-defined output value."
11107
+ }
11108
+ },
11109
+ "title": "Outputs (step)"
11110
+ },
11111
+ "variables": {
11112
+ "type": "object",
11113
+ "description": "Environment variables to set from user-defined expressions.",
11114
+ "default": {},
11115
+ "patternProperties": {
11116
+ "^[A-Za-z0-9_]+$": {
11117
+ "type": "string",
11118
+ "description": "Runtime expression for a user-defined output value."
11119
+ }
11120
+ },
11121
+ "title": "Variables (step)"
11122
+ },
11123
+ "breakpoint": {
11124
+ "type": "boolean",
11125
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
11126
+ "default": false
11127
+ }
11128
+ },
11129
+ "title": "Common"
11130
+ },
11131
+ {
11132
+ "title": "loadCookie",
11133
+ "type": "object",
11134
+ "required": [
11135
+ "loadCookie"
11136
+ ],
11137
+ "properties": {
11138
+ "loadCookie": {
11139
+ "$schema": "http://json-schema.org/draft-07/schema#",
11140
+ "title": "loadCookie",
11141
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
11142
+ "anyOf": [
11143
+ {
11144
+ "type": "string",
11145
+ "title": "Cookie name or file path",
11146
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11147
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11148
+ "transform": [
11149
+ "trim"
11150
+ ]
11151
+ },
11152
+ {
11153
+ "type": "object",
11154
+ "additionalProperties": false,
11155
+ "required": [
11156
+ "name"
11157
+ ],
11158
+ "anyOf": [
11159
+ {
11160
+ "required": [
11161
+ "path"
11162
+ ],
11163
+ "not": {
11164
+ "required": [
11165
+ "variable"
11166
+ ]
11167
+ }
11168
+ },
11169
+ {
11170
+ "required": [
11171
+ "variable"
11172
+ ],
11173
+ "not": {
11174
+ "anyOf": [
11175
+ {
11176
+ "required": [
11177
+ "path"
11178
+ ]
11179
+ },
11180
+ {
11181
+ "required": [
11182
+ "directory"
11183
+ ]
11184
+ }
11185
+ ]
11186
+ }
11187
+ }
11188
+ ],
11189
+ "properties": {
11190
+ "$schema": {
11191
+ "description": "Optional self-describing schema URI for linters",
11192
+ "type": "string",
11193
+ "format": "uri-reference"
11194
+ },
11195
+ "name": {
11196
+ "type": "string",
11197
+ "title": "Cookie name",
11198
+ "description": "Name of the specific cookie to load.",
11199
+ "pattern": "^[A-Za-z0-9_.-]+$",
11200
+ "transform": [
11201
+ "trim"
11202
+ ]
11203
+ },
11204
+ "variable": {
11205
+ "type": "string",
11206
+ "title": "Environment variable name",
11207
+ "description": "Environment variable name containing the cookie as JSON string.",
11208
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11209
+ "transform": [
11210
+ "trim"
11211
+ ]
11212
+ },
11213
+ "path": {
11214
+ "type": "string",
11215
+ "title": "Cookie file path",
11216
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11217
+ "transform": [
11218
+ "trim"
11219
+ ]
11220
+ },
11221
+ "directory": {
11222
+ "type": "string",
11223
+ "title": "Directory path",
11224
+ "description": "Directory containing the cookie file.",
11225
+ "transform": [
11226
+ "trim"
11227
+ ]
11228
+ },
11229
+ "domain": {
11230
+ "type": "string",
11231
+ "title": "Cookie domain",
11232
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11233
+ "transform": [
11234
+ "trim"
11235
+ ]
11236
+ }
11237
+ },
11238
+ "title": "Load cookie (detailed)"
11239
+ }
11240
+ ],
11241
+ "components": {
11242
+ "schemas": {
11243
+ "string": {
11244
+ "type": "string",
11245
+ "title": "Cookie name or file path",
11246
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11247
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11248
+ "transform": [
11249
+ "trim"
11250
+ ]
11251
+ },
11252
+ "object": {
11253
+ "type": "object",
11254
+ "additionalProperties": false,
11255
+ "required": [
11256
+ "name"
11257
+ ],
11258
+ "anyOf": [
11259
+ {
11260
+ "required": [
11261
+ "path"
11262
+ ],
11263
+ "not": {
11264
+ "required": [
11265
+ "variable"
11266
+ ]
11267
+ }
11268
+ },
11269
+ {
11270
+ "required": [
11271
+ "variable"
11272
+ ],
11273
+ "not": {
11274
+ "anyOf": [
11275
+ {
11276
+ "required": [
11277
+ "path"
11278
+ ]
11279
+ },
11280
+ {
11281
+ "required": [
11282
+ "directory"
11283
+ ]
11284
+ }
11285
+ ]
11286
+ }
11287
+ }
11288
+ ],
11289
+ "properties": {
11290
+ "$schema": {
11291
+ "description": "Optional self-describing schema URI for linters",
11292
+ "type": "string",
11293
+ "format": "uri-reference"
11294
+ },
11295
+ "name": {
11296
+ "type": "string",
11297
+ "title": "Cookie name",
11298
+ "description": "Name of the specific cookie to load.",
11299
+ "pattern": "^[A-Za-z0-9_.-]+$",
11300
+ "transform": [
11301
+ "trim"
11302
+ ]
11303
+ },
11304
+ "variable": {
11305
+ "type": "string",
11306
+ "title": "Environment variable name",
11307
+ "description": "Environment variable name containing the cookie as JSON string.",
11308
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11309
+ "transform": [
11310
+ "trim"
11311
+ ]
11312
+ },
11313
+ "path": {
11314
+ "type": "string",
11315
+ "title": "Cookie file path",
11316
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11317
+ "transform": [
11318
+ "trim"
11319
+ ]
11320
+ },
11321
+ "directory": {
11322
+ "type": "string",
11323
+ "title": "Directory path",
11324
+ "description": "Directory containing the cookie file.",
11325
+ "transform": [
11326
+ "trim"
11327
+ ]
11328
+ },
11329
+ "domain": {
11330
+ "type": "string",
11331
+ "title": "Cookie domain",
11332
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11333
+ "transform": [
11334
+ "trim"
11335
+ ]
11336
+ }
11337
+ },
11338
+ "title": "Load cookie (detailed)"
11339
+ }
11340
+ }
11341
+ },
11342
+ "examples": [
11343
+ "session_token",
11344
+ "./test-data/auth-session.txt",
11345
+ "test_env_cookie",
11346
+ {
11347
+ "name": "auth_cookie",
11348
+ "variable": "AUTH_COOKIE"
11349
+ },
11350
+ {
11351
+ "name": "test_cookie",
11352
+ "path": "test-cookie.txt"
11353
+ },
11354
+ {
11355
+ "name": "session_token",
11356
+ "path": "session-token.txt",
11357
+ "directory": "./test-data"
11358
+ },
11359
+ {
11360
+ "name": "user_session",
11361
+ "path": "saved-cookies.txt",
11362
+ "domain": "app.example.com"
11363
+ }
11364
+ ]
11365
+ }
11366
+ }
11367
+ }
11368
+ ]
11369
+ },
10111
11370
  {
10112
11371
  "allOf": [
10113
11372
  {
@@ -10335,17 +11594,38 @@
10335
11594
  "record": "static/media/video.mp4"
10336
11595
  },
10337
11596
  {
10338
- "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
11597
+ "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
11598
+ },
11599
+ {
11600
+ "record": {
11601
+ "path": "video.mp4",
11602
+ "directory": "static/media",
11603
+ "overwrite": true
11604
+ }
11605
+ },
11606
+ {
11607
+ "loadVariables": "variables.env"
11608
+ },
11609
+ {
11610
+ "saveCookie": "session_token"
10339
11611
  },
10340
11612
  {
10341
- "record": {
10342
- "path": "video.mp4",
10343
- "directory": "static/media",
11613
+ "saveCookie": {
11614
+ "name": "auth_cookie",
11615
+ "path": "auth-session.txt",
11616
+ "directory": "./test-data",
10344
11617
  "overwrite": true
10345
11618
  }
10346
11619
  },
10347
11620
  {
10348
- "loadVariables": "variables.env"
11621
+ "loadCookie": "session_token"
11622
+ },
11623
+ {
11624
+ "loadCookie": {
11625
+ "name": "auth_cookie",
11626
+ "path": "auth-session.txt",
11627
+ "directory": "./test-data"
11628
+ }
10349
11629
  },
10350
11630
  {
10351
11631
  "find": "Find me!"
@@ -10595,10 +11875,12 @@
10595
11875
  "find",
10596
11876
  "goTo",
10597
11877
  "httpRequest",
11878
+ "loadCookie",
10598
11879
  "loadVariables",
10599
11880
  "record",
10600
11881
  "runCode",
10601
11882
  "runShell",
11883
+ "saveCookie",
10602
11884
  "screenshot",
10603
11885
  "stopRecord",
10604
11886
  "type",
@@ -15758,25 +17040,341 @@
15758
17040
  "overwrite": "aboveVariation"
15759
17041
  },
15760
17042
  {
15761
- "path": "image.png",
15762
- "directory": "static/images",
15763
- "maxVariation": 0.1,
15764
- "overwrite": "aboveVariation",
15765
- "crop": {
15766
- "selector": "#elementToScreenshot",
15767
- "elementText": "Element text",
15768
- "padding": {
15769
- "top": 0,
15770
- "right": 0,
15771
- "bottom": 0,
15772
- "left": 0
15773
- }
15774
- }
17043
+ "path": "image.png",
17044
+ "directory": "static/images",
17045
+ "maxVariation": 0.1,
17046
+ "overwrite": "aboveVariation",
17047
+ "crop": {
17048
+ "selector": "#elementToScreenshot",
17049
+ "elementText": "Element text",
17050
+ "padding": {
17051
+ "top": 0,
17052
+ "right": 0,
17053
+ "bottom": 0,
17054
+ "left": 0
17055
+ }
17056
+ }
17057
+ }
17058
+ ]
17059
+ }
17060
+ },
17061
+ "title": "screenshot"
17062
+ }
17063
+ ]
17064
+ },
17065
+ {
17066
+ "allOf": [
17067
+ {
17068
+ "type": "object",
17069
+ "dynamicDefaults": {
17070
+ "stepId": "uuid"
17071
+ },
17072
+ "properties": {
17073
+ "$schema": {
17074
+ "description": "JSON Schema for this object.",
17075
+ "type": "string",
17076
+ "enum": [
17077
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
17078
+ ]
17079
+ },
17080
+ "stepId": {
17081
+ "type": "string",
17082
+ "description": "ID of the step."
17083
+ },
17084
+ "description": {
17085
+ "type": "string",
17086
+ "description": "Description of the step."
17087
+ },
17088
+ "unsafe": {
17089
+ "type": "boolean",
17090
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
17091
+ "default": false
17092
+ },
17093
+ "outputs": {
17094
+ "type": "object",
17095
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
17096
+ "default": {},
17097
+ "patternProperties": {
17098
+ "^[A-Za-z0-9_]+$": {
17099
+ "type": "string",
17100
+ "description": "Runtime expression for a user-defined output value."
17101
+ }
17102
+ },
17103
+ "title": "Outputs (step)"
17104
+ },
17105
+ "variables": {
17106
+ "type": "object",
17107
+ "description": "Environment variables to set from user-defined expressions.",
17108
+ "default": {},
17109
+ "patternProperties": {
17110
+ "^[A-Za-z0-9_]+$": {
17111
+ "type": "string",
17112
+ "description": "Runtime expression for a user-defined output value."
17113
+ }
17114
+ },
17115
+ "title": "Variables (step)"
17116
+ },
17117
+ "breakpoint": {
17118
+ "type": "boolean",
17119
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
17120
+ "default": false
17121
+ }
17122
+ },
17123
+ "title": "Common"
17124
+ },
17125
+ {
17126
+ "type": "object",
17127
+ "required": [
17128
+ "saveCookie"
17129
+ ],
17130
+ "properties": {
17131
+ "saveCookie": {
17132
+ "$schema": "http://json-schema.org/draft-07/schema#",
17133
+ "title": "saveCookie",
17134
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
17135
+ "anyOf": [
17136
+ {
17137
+ "type": "string",
17138
+ "title": "Cookie name",
17139
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
17140
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17141
+ "transform": [
17142
+ "trim"
17143
+ ]
17144
+ },
17145
+ {
17146
+ "type": "object",
17147
+ "additionalProperties": false,
17148
+ "properties": {
17149
+ "$schema": {
17150
+ "description": "Optional self-describing schema URI for linters",
17151
+ "type": "string",
17152
+ "format": "uri-reference"
17153
+ },
17154
+ "name": {
17155
+ "type": "string",
17156
+ "title": "Cookie name",
17157
+ "description": "Name of the specific cookie to save.",
17158
+ "pattern": "^[A-Za-z0-9_.-]+$",
17159
+ "transform": [
17160
+ "trim"
17161
+ ]
17162
+ },
17163
+ "variable": {
17164
+ "type": "string",
17165
+ "title": "Environment variable name",
17166
+ "description": "Environment variable name to store the cookie as JSON string.",
17167
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17168
+ "transform": [
17169
+ "trim"
17170
+ ]
17171
+ },
17172
+ "path": {
17173
+ "type": "string",
17174
+ "title": "Cookie file path",
17175
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
17176
+ "transform": [
17177
+ "trim"
17178
+ ]
17179
+ },
17180
+ "directory": {
17181
+ "type": "string",
17182
+ "title": "Directory path",
17183
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
17184
+ "transform": [
17185
+ "trim"
17186
+ ]
17187
+ },
17188
+ "overwrite": {
17189
+ "type": "boolean",
17190
+ "title": "Overwrite existing file",
17191
+ "description": "Whether to overwrite existing cookie file.",
17192
+ "default": false
17193
+ },
17194
+ "domain": {
17195
+ "type": "string",
17196
+ "title": "Cookie domain",
17197
+ "description": "Specific domain to filter the cookie by (optional).",
17198
+ "transform": [
17199
+ "trim"
17200
+ ]
17201
+ }
17202
+ },
17203
+ "required": [
17204
+ "name"
17205
+ ],
17206
+ "anyOf": [
17207
+ {
17208
+ "required": [
17209
+ "path"
17210
+ ],
17211
+ "not": {
17212
+ "required": [
17213
+ "variable"
17214
+ ]
17215
+ }
17216
+ },
17217
+ {
17218
+ "required": [
17219
+ "variable"
17220
+ ],
17221
+ "not": {
17222
+ "anyOf": [
17223
+ {
17224
+ "required": [
17225
+ "path"
17226
+ ]
17227
+ },
17228
+ {
17229
+ "required": [
17230
+ "directory"
17231
+ ]
17232
+ }
17233
+ ]
17234
+ }
17235
+ }
17236
+ ],
17237
+ "title": "Save cookie (detailed)"
17238
+ }
17239
+ ],
17240
+ "components": {
17241
+ "schemas": {
17242
+ "string": {
17243
+ "type": "string",
17244
+ "title": "Cookie name",
17245
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
17246
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17247
+ "transform": [
17248
+ "trim"
17249
+ ]
17250
+ },
17251
+ "object": {
17252
+ "type": "object",
17253
+ "additionalProperties": false,
17254
+ "properties": {
17255
+ "$schema": {
17256
+ "description": "Optional self-describing schema URI for linters",
17257
+ "type": "string",
17258
+ "format": "uri-reference"
17259
+ },
17260
+ "name": {
17261
+ "type": "string",
17262
+ "title": "Cookie name",
17263
+ "description": "Name of the specific cookie to save.",
17264
+ "pattern": "^[A-Za-z0-9_.-]+$",
17265
+ "transform": [
17266
+ "trim"
17267
+ ]
17268
+ },
17269
+ "variable": {
17270
+ "type": "string",
17271
+ "title": "Environment variable name",
17272
+ "description": "Environment variable name to store the cookie as JSON string.",
17273
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17274
+ "transform": [
17275
+ "trim"
17276
+ ]
17277
+ },
17278
+ "path": {
17279
+ "type": "string",
17280
+ "title": "Cookie file path",
17281
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
17282
+ "transform": [
17283
+ "trim"
17284
+ ]
17285
+ },
17286
+ "directory": {
17287
+ "type": "string",
17288
+ "title": "Directory path",
17289
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
17290
+ "transform": [
17291
+ "trim"
17292
+ ]
17293
+ },
17294
+ "overwrite": {
17295
+ "type": "boolean",
17296
+ "title": "Overwrite existing file",
17297
+ "description": "Whether to overwrite existing cookie file.",
17298
+ "default": false
17299
+ },
17300
+ "domain": {
17301
+ "type": "string",
17302
+ "title": "Cookie domain",
17303
+ "description": "Specific domain to filter the cookie by (optional).",
17304
+ "transform": [
17305
+ "trim"
17306
+ ]
17307
+ }
17308
+ },
17309
+ "required": [
17310
+ "name"
17311
+ ],
17312
+ "anyOf": [
17313
+ {
17314
+ "required": [
17315
+ "path"
17316
+ ],
17317
+ "not": {
17318
+ "required": [
17319
+ "variable"
17320
+ ]
17321
+ }
17322
+ },
17323
+ {
17324
+ "required": [
17325
+ "variable"
17326
+ ],
17327
+ "not": {
17328
+ "anyOf": [
17329
+ {
17330
+ "required": [
17331
+ "path"
17332
+ ]
17333
+ },
17334
+ {
17335
+ "required": [
17336
+ "directory"
17337
+ ]
17338
+ }
17339
+ ]
17340
+ }
17341
+ }
17342
+ ],
17343
+ "title": "Save cookie (detailed)"
17344
+ }
17345
+ }
17346
+ },
17347
+ "examples": [
17348
+ "session_token",
17349
+ "test_env_cookie",
17350
+ {
17351
+ "name": "auth_cookie",
17352
+ "path": "auth-cookie.txt"
17353
+ },
17354
+ {
17355
+ "name": "session_token",
17356
+ "variable": "SESSION_TOKEN"
17357
+ },
17358
+ {
17359
+ "name": "test_cookie",
17360
+ "path": "test-cookie.txt",
17361
+ "overwrite": true
17362
+ },
17363
+ {
17364
+ "name": "user_session",
17365
+ "path": "user-session.txt",
17366
+ "directory": "./test-data",
17367
+ "overwrite": true
17368
+ },
17369
+ {
17370
+ "name": "login_token",
17371
+ "path": "login-token.txt",
17372
+ "domain": "app.example.com"
15775
17373
  }
15776
17374
  ]
15777
17375
  }
15778
17376
  },
15779
- "title": "screenshot"
17377
+ "title": "saveCookie"
15780
17378
  }
15781
17379
  ]
15782
17380
  },
@@ -16117,6 +17715,305 @@
16117
17715
  }
16118
17716
  ]
16119
17717
  },
17718
+ {
17719
+ "allOf": [
17720
+ {
17721
+ "type": "object",
17722
+ "dynamicDefaults": {
17723
+ "stepId": "uuid"
17724
+ },
17725
+ "properties": {
17726
+ "$schema": {
17727
+ "description": "JSON Schema for this object.",
17728
+ "type": "string",
17729
+ "enum": [
17730
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
17731
+ ]
17732
+ },
17733
+ "stepId": {
17734
+ "type": "string",
17735
+ "description": "ID of the step."
17736
+ },
17737
+ "description": {
17738
+ "type": "string",
17739
+ "description": "Description of the step."
17740
+ },
17741
+ "unsafe": {
17742
+ "type": "boolean",
17743
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
17744
+ "default": false
17745
+ },
17746
+ "outputs": {
17747
+ "type": "object",
17748
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
17749
+ "default": {},
17750
+ "patternProperties": {
17751
+ "^[A-Za-z0-9_]+$": {
17752
+ "type": "string",
17753
+ "description": "Runtime expression for a user-defined output value."
17754
+ }
17755
+ },
17756
+ "title": "Outputs (step)"
17757
+ },
17758
+ "variables": {
17759
+ "type": "object",
17760
+ "description": "Environment variables to set from user-defined expressions.",
17761
+ "default": {},
17762
+ "patternProperties": {
17763
+ "^[A-Za-z0-9_]+$": {
17764
+ "type": "string",
17765
+ "description": "Runtime expression for a user-defined output value."
17766
+ }
17767
+ },
17768
+ "title": "Variables (step)"
17769
+ },
17770
+ "breakpoint": {
17771
+ "type": "boolean",
17772
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
17773
+ "default": false
17774
+ }
17775
+ },
17776
+ "title": "Common"
17777
+ },
17778
+ {
17779
+ "title": "loadCookie",
17780
+ "type": "object",
17781
+ "required": [
17782
+ "loadCookie"
17783
+ ],
17784
+ "properties": {
17785
+ "loadCookie": {
17786
+ "$schema": "http://json-schema.org/draft-07/schema#",
17787
+ "title": "loadCookie",
17788
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
17789
+ "anyOf": [
17790
+ {
17791
+ "type": "string",
17792
+ "title": "Cookie name or file path",
17793
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
17794
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17795
+ "transform": [
17796
+ "trim"
17797
+ ]
17798
+ },
17799
+ {
17800
+ "type": "object",
17801
+ "additionalProperties": false,
17802
+ "required": [
17803
+ "name"
17804
+ ],
17805
+ "anyOf": [
17806
+ {
17807
+ "required": [
17808
+ "path"
17809
+ ],
17810
+ "not": {
17811
+ "required": [
17812
+ "variable"
17813
+ ]
17814
+ }
17815
+ },
17816
+ {
17817
+ "required": [
17818
+ "variable"
17819
+ ],
17820
+ "not": {
17821
+ "anyOf": [
17822
+ {
17823
+ "required": [
17824
+ "path"
17825
+ ]
17826
+ },
17827
+ {
17828
+ "required": [
17829
+ "directory"
17830
+ ]
17831
+ }
17832
+ ]
17833
+ }
17834
+ }
17835
+ ],
17836
+ "properties": {
17837
+ "$schema": {
17838
+ "description": "Optional self-describing schema URI for linters",
17839
+ "type": "string",
17840
+ "format": "uri-reference"
17841
+ },
17842
+ "name": {
17843
+ "type": "string",
17844
+ "title": "Cookie name",
17845
+ "description": "Name of the specific cookie to load.",
17846
+ "pattern": "^[A-Za-z0-9_.-]+$",
17847
+ "transform": [
17848
+ "trim"
17849
+ ]
17850
+ },
17851
+ "variable": {
17852
+ "type": "string",
17853
+ "title": "Environment variable name",
17854
+ "description": "Environment variable name containing the cookie as JSON string.",
17855
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17856
+ "transform": [
17857
+ "trim"
17858
+ ]
17859
+ },
17860
+ "path": {
17861
+ "type": "string",
17862
+ "title": "Cookie file path",
17863
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
17864
+ "transform": [
17865
+ "trim"
17866
+ ]
17867
+ },
17868
+ "directory": {
17869
+ "type": "string",
17870
+ "title": "Directory path",
17871
+ "description": "Directory containing the cookie file.",
17872
+ "transform": [
17873
+ "trim"
17874
+ ]
17875
+ },
17876
+ "domain": {
17877
+ "type": "string",
17878
+ "title": "Cookie domain",
17879
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
17880
+ "transform": [
17881
+ "trim"
17882
+ ]
17883
+ }
17884
+ },
17885
+ "title": "Load cookie (detailed)"
17886
+ }
17887
+ ],
17888
+ "components": {
17889
+ "schemas": {
17890
+ "string": {
17891
+ "type": "string",
17892
+ "title": "Cookie name or file path",
17893
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
17894
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17895
+ "transform": [
17896
+ "trim"
17897
+ ]
17898
+ },
17899
+ "object": {
17900
+ "type": "object",
17901
+ "additionalProperties": false,
17902
+ "required": [
17903
+ "name"
17904
+ ],
17905
+ "anyOf": [
17906
+ {
17907
+ "required": [
17908
+ "path"
17909
+ ],
17910
+ "not": {
17911
+ "required": [
17912
+ "variable"
17913
+ ]
17914
+ }
17915
+ },
17916
+ {
17917
+ "required": [
17918
+ "variable"
17919
+ ],
17920
+ "not": {
17921
+ "anyOf": [
17922
+ {
17923
+ "required": [
17924
+ "path"
17925
+ ]
17926
+ },
17927
+ {
17928
+ "required": [
17929
+ "directory"
17930
+ ]
17931
+ }
17932
+ ]
17933
+ }
17934
+ }
17935
+ ],
17936
+ "properties": {
17937
+ "$schema": {
17938
+ "description": "Optional self-describing schema URI for linters",
17939
+ "type": "string",
17940
+ "format": "uri-reference"
17941
+ },
17942
+ "name": {
17943
+ "type": "string",
17944
+ "title": "Cookie name",
17945
+ "description": "Name of the specific cookie to load.",
17946
+ "pattern": "^[A-Za-z0-9_.-]+$",
17947
+ "transform": [
17948
+ "trim"
17949
+ ]
17950
+ },
17951
+ "variable": {
17952
+ "type": "string",
17953
+ "title": "Environment variable name",
17954
+ "description": "Environment variable name containing the cookie as JSON string.",
17955
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17956
+ "transform": [
17957
+ "trim"
17958
+ ]
17959
+ },
17960
+ "path": {
17961
+ "type": "string",
17962
+ "title": "Cookie file path",
17963
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
17964
+ "transform": [
17965
+ "trim"
17966
+ ]
17967
+ },
17968
+ "directory": {
17969
+ "type": "string",
17970
+ "title": "Directory path",
17971
+ "description": "Directory containing the cookie file.",
17972
+ "transform": [
17973
+ "trim"
17974
+ ]
17975
+ },
17976
+ "domain": {
17977
+ "type": "string",
17978
+ "title": "Cookie domain",
17979
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
17980
+ "transform": [
17981
+ "trim"
17982
+ ]
17983
+ }
17984
+ },
17985
+ "title": "Load cookie (detailed)"
17986
+ }
17987
+ }
17988
+ },
17989
+ "examples": [
17990
+ "session_token",
17991
+ "./test-data/auth-session.txt",
17992
+ "test_env_cookie",
17993
+ {
17994
+ "name": "auth_cookie",
17995
+ "variable": "AUTH_COOKIE"
17996
+ },
17997
+ {
17998
+ "name": "test_cookie",
17999
+ "path": "test-cookie.txt"
18000
+ },
18001
+ {
18002
+ "name": "session_token",
18003
+ "path": "session-token.txt",
18004
+ "directory": "./test-data"
18005
+ },
18006
+ {
18007
+ "name": "user_session",
18008
+ "path": "saved-cookies.txt",
18009
+ "domain": "app.example.com"
18010
+ }
18011
+ ]
18012
+ }
18013
+ }
18014
+ }
18015
+ ]
18016
+ },
16120
18017
  {
16121
18018
  "allOf": [
16122
18019
  {
@@ -16344,17 +18241,38 @@
16344
18241
  "record": "static/media/video.mp4"
16345
18242
  },
16346
18243
  {
16347
- "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
18244
+ "record": "/User/manny/projects/doc-detective/static/media/video.mp4"
18245
+ },
18246
+ {
18247
+ "record": {
18248
+ "path": "video.mp4",
18249
+ "directory": "static/media",
18250
+ "overwrite": true
18251
+ }
18252
+ },
18253
+ {
18254
+ "loadVariables": "variables.env"
18255
+ },
18256
+ {
18257
+ "saveCookie": "session_token"
16348
18258
  },
16349
18259
  {
16350
- "record": {
16351
- "path": "video.mp4",
16352
- "directory": "static/media",
18260
+ "saveCookie": {
18261
+ "name": "auth_cookie",
18262
+ "path": "auth-session.txt",
18263
+ "directory": "./test-data",
16353
18264
  "overwrite": true
16354
18265
  }
16355
18266
  },
16356
18267
  {
16357
- "loadVariables": "variables.env"
18268
+ "loadCookie": "session_token"
18269
+ },
18270
+ {
18271
+ "loadCookie": {
18272
+ "name": "auth_cookie",
18273
+ "path": "auth-session.txt",
18274
+ "directory": "./test-data"
18275
+ }
16358
18276
  },
16359
18277
  {
16360
18278
  "find": "Find me!"
@@ -20573,31 +22491,347 @@
20573
22491
  "crop": "#elementToScreenshot"
20574
22492
  },
20575
22493
  {
20576
- "path": "image.png",
20577
- "directory": "static/images",
20578
- "maxVariation": 0.1,
20579
- "overwrite": "aboveVariation"
22494
+ "path": "image.png",
22495
+ "directory": "static/images",
22496
+ "maxVariation": 0.1,
22497
+ "overwrite": "aboveVariation"
22498
+ },
22499
+ {
22500
+ "path": "image.png",
22501
+ "directory": "static/images",
22502
+ "maxVariation": 0.1,
22503
+ "overwrite": "aboveVariation",
22504
+ "crop": {
22505
+ "selector": "#elementToScreenshot",
22506
+ "elementText": "Element text",
22507
+ "padding": {
22508
+ "top": 0,
22509
+ "right": 0,
22510
+ "bottom": 0,
22511
+ "left": 0
22512
+ }
22513
+ }
22514
+ }
22515
+ ]
22516
+ }
22517
+ },
22518
+ "title": "screenshot"
22519
+ }
22520
+ ]
22521
+ },
22522
+ {
22523
+ "allOf": [
22524
+ {
22525
+ "type": "object",
22526
+ "dynamicDefaults": {
22527
+ "stepId": "uuid"
22528
+ },
22529
+ "properties": {
22530
+ "$schema": {
22531
+ "description": "JSON Schema for this object.",
22532
+ "type": "string",
22533
+ "enum": [
22534
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
22535
+ ]
22536
+ },
22537
+ "stepId": {
22538
+ "type": "string",
22539
+ "description": "ID of the step."
22540
+ },
22541
+ "description": {
22542
+ "type": "string",
22543
+ "description": "Description of the step."
22544
+ },
22545
+ "unsafe": {
22546
+ "type": "boolean",
22547
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
22548
+ "default": false
22549
+ },
22550
+ "outputs": {
22551
+ "type": "object",
22552
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
22553
+ "default": {},
22554
+ "patternProperties": {
22555
+ "^[A-Za-z0-9_]+$": {
22556
+ "type": "string",
22557
+ "description": "Runtime expression for a user-defined output value."
22558
+ }
22559
+ },
22560
+ "title": "Outputs (step)"
22561
+ },
22562
+ "variables": {
22563
+ "type": "object",
22564
+ "description": "Environment variables to set from user-defined expressions.",
22565
+ "default": {},
22566
+ "patternProperties": {
22567
+ "^[A-Za-z0-9_]+$": {
22568
+ "type": "string",
22569
+ "description": "Runtime expression for a user-defined output value."
22570
+ }
22571
+ },
22572
+ "title": "Variables (step)"
22573
+ },
22574
+ "breakpoint": {
22575
+ "type": "boolean",
22576
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
22577
+ "default": false
22578
+ }
22579
+ },
22580
+ "title": "Common"
22581
+ },
22582
+ {
22583
+ "type": "object",
22584
+ "required": [
22585
+ "saveCookie"
22586
+ ],
22587
+ "properties": {
22588
+ "saveCookie": {
22589
+ "$schema": "http://json-schema.org/draft-07/schema#",
22590
+ "title": "saveCookie",
22591
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
22592
+ "anyOf": [
22593
+ {
22594
+ "type": "string",
22595
+ "title": "Cookie name",
22596
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
22597
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
22598
+ "transform": [
22599
+ "trim"
22600
+ ]
22601
+ },
22602
+ {
22603
+ "type": "object",
22604
+ "additionalProperties": false,
22605
+ "properties": {
22606
+ "$schema": {
22607
+ "description": "Optional self-describing schema URI for linters",
22608
+ "type": "string",
22609
+ "format": "uri-reference"
22610
+ },
22611
+ "name": {
22612
+ "type": "string",
22613
+ "title": "Cookie name",
22614
+ "description": "Name of the specific cookie to save.",
22615
+ "pattern": "^[A-Za-z0-9_.-]+$",
22616
+ "transform": [
22617
+ "trim"
22618
+ ]
22619
+ },
22620
+ "variable": {
22621
+ "type": "string",
22622
+ "title": "Environment variable name",
22623
+ "description": "Environment variable name to store the cookie as JSON string.",
22624
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
22625
+ "transform": [
22626
+ "trim"
22627
+ ]
22628
+ },
22629
+ "path": {
22630
+ "type": "string",
22631
+ "title": "Cookie file path",
22632
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
22633
+ "transform": [
22634
+ "trim"
22635
+ ]
22636
+ },
22637
+ "directory": {
22638
+ "type": "string",
22639
+ "title": "Directory path",
22640
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
22641
+ "transform": [
22642
+ "trim"
22643
+ ]
22644
+ },
22645
+ "overwrite": {
22646
+ "type": "boolean",
22647
+ "title": "Overwrite existing file",
22648
+ "description": "Whether to overwrite existing cookie file.",
22649
+ "default": false
22650
+ },
22651
+ "domain": {
22652
+ "type": "string",
22653
+ "title": "Cookie domain",
22654
+ "description": "Specific domain to filter the cookie by (optional).",
22655
+ "transform": [
22656
+ "trim"
22657
+ ]
22658
+ }
22659
+ },
22660
+ "required": [
22661
+ "name"
22662
+ ],
22663
+ "anyOf": [
22664
+ {
22665
+ "required": [
22666
+ "path"
22667
+ ],
22668
+ "not": {
22669
+ "required": [
22670
+ "variable"
22671
+ ]
22672
+ }
22673
+ },
22674
+ {
22675
+ "required": [
22676
+ "variable"
22677
+ ],
22678
+ "not": {
22679
+ "anyOf": [
22680
+ {
22681
+ "required": [
22682
+ "path"
22683
+ ]
22684
+ },
22685
+ {
22686
+ "required": [
22687
+ "directory"
22688
+ ]
22689
+ }
22690
+ ]
22691
+ }
22692
+ }
22693
+ ],
22694
+ "title": "Save cookie (detailed)"
22695
+ }
22696
+ ],
22697
+ "components": {
22698
+ "schemas": {
22699
+ "string": {
22700
+ "type": "string",
22701
+ "title": "Cookie name",
22702
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
22703
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
22704
+ "transform": [
22705
+ "trim"
22706
+ ]
22707
+ },
22708
+ "object": {
22709
+ "type": "object",
22710
+ "additionalProperties": false,
22711
+ "properties": {
22712
+ "$schema": {
22713
+ "description": "Optional self-describing schema URI for linters",
22714
+ "type": "string",
22715
+ "format": "uri-reference"
22716
+ },
22717
+ "name": {
22718
+ "type": "string",
22719
+ "title": "Cookie name",
22720
+ "description": "Name of the specific cookie to save.",
22721
+ "pattern": "^[A-Za-z0-9_.-]+$",
22722
+ "transform": [
22723
+ "trim"
22724
+ ]
22725
+ },
22726
+ "variable": {
22727
+ "type": "string",
22728
+ "title": "Environment variable name",
22729
+ "description": "Environment variable name to store the cookie as JSON string.",
22730
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
22731
+ "transform": [
22732
+ "trim"
22733
+ ]
22734
+ },
22735
+ "path": {
22736
+ "type": "string",
22737
+ "title": "Cookie file path",
22738
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
22739
+ "transform": [
22740
+ "trim"
22741
+ ]
22742
+ },
22743
+ "directory": {
22744
+ "type": "string",
22745
+ "title": "Directory path",
22746
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
22747
+ "transform": [
22748
+ "trim"
22749
+ ]
22750
+ },
22751
+ "overwrite": {
22752
+ "type": "boolean",
22753
+ "title": "Overwrite existing file",
22754
+ "description": "Whether to overwrite existing cookie file.",
22755
+ "default": false
22756
+ },
22757
+ "domain": {
22758
+ "type": "string",
22759
+ "title": "Cookie domain",
22760
+ "description": "Specific domain to filter the cookie by (optional).",
22761
+ "transform": [
22762
+ "trim"
22763
+ ]
22764
+ }
22765
+ },
22766
+ "required": [
22767
+ "name"
22768
+ ],
22769
+ "anyOf": [
22770
+ {
22771
+ "required": [
22772
+ "path"
22773
+ ],
22774
+ "not": {
22775
+ "required": [
22776
+ "variable"
22777
+ ]
22778
+ }
22779
+ },
22780
+ {
22781
+ "required": [
22782
+ "variable"
22783
+ ],
22784
+ "not": {
22785
+ "anyOf": [
22786
+ {
22787
+ "required": [
22788
+ "path"
22789
+ ]
22790
+ },
22791
+ {
22792
+ "required": [
22793
+ "directory"
22794
+ ]
22795
+ }
22796
+ ]
22797
+ }
22798
+ }
22799
+ ],
22800
+ "title": "Save cookie (detailed)"
22801
+ }
22802
+ }
22803
+ },
22804
+ "examples": [
22805
+ "session_token",
22806
+ "test_env_cookie",
22807
+ {
22808
+ "name": "auth_cookie",
22809
+ "path": "auth-cookie.txt"
22810
+ },
22811
+ {
22812
+ "name": "session_token",
22813
+ "variable": "SESSION_TOKEN"
22814
+ },
22815
+ {
22816
+ "name": "test_cookie",
22817
+ "path": "test-cookie.txt",
22818
+ "overwrite": true
20580
22819
  },
20581
22820
  {
20582
- "path": "image.png",
20583
- "directory": "static/images",
20584
- "maxVariation": 0.1,
20585
- "overwrite": "aboveVariation",
20586
- "crop": {
20587
- "selector": "#elementToScreenshot",
20588
- "elementText": "Element text",
20589
- "padding": {
20590
- "top": 0,
20591
- "right": 0,
20592
- "bottom": 0,
20593
- "left": 0
20594
- }
20595
- }
22821
+ "name": "user_session",
22822
+ "path": "user-session.txt",
22823
+ "directory": "./test-data",
22824
+ "overwrite": true
22825
+ },
22826
+ {
22827
+ "name": "login_token",
22828
+ "path": "login-token.txt",
22829
+ "domain": "app.example.com"
20596
22830
  }
20597
22831
  ]
20598
22832
  }
20599
22833
  },
20600
- "title": "screenshot"
22834
+ "title": "saveCookie"
20601
22835
  }
20602
22836
  ]
20603
22837
  },
@@ -20938,6 +23172,305 @@
20938
23172
  }
20939
23173
  ]
20940
23174
  },
23175
+ {
23176
+ "allOf": [
23177
+ {
23178
+ "type": "object",
23179
+ "dynamicDefaults": {
23180
+ "stepId": "uuid"
23181
+ },
23182
+ "properties": {
23183
+ "$schema": {
23184
+ "description": "JSON Schema for this object.",
23185
+ "type": "string",
23186
+ "enum": [
23187
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
23188
+ ]
23189
+ },
23190
+ "stepId": {
23191
+ "type": "string",
23192
+ "description": "ID of the step."
23193
+ },
23194
+ "description": {
23195
+ "type": "string",
23196
+ "description": "Description of the step."
23197
+ },
23198
+ "unsafe": {
23199
+ "type": "boolean",
23200
+ "description": "Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the `allowUnsafeSteps` config property or the `--allow-unsafe` flag.",
23201
+ "default": false
23202
+ },
23203
+ "outputs": {
23204
+ "type": "object",
23205
+ "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
23206
+ "default": {},
23207
+ "patternProperties": {
23208
+ "^[A-Za-z0-9_]+$": {
23209
+ "type": "string",
23210
+ "description": "Runtime expression for a user-defined output value."
23211
+ }
23212
+ },
23213
+ "title": "Outputs (step)"
23214
+ },
23215
+ "variables": {
23216
+ "type": "object",
23217
+ "description": "Environment variables to set from user-defined expressions.",
23218
+ "default": {},
23219
+ "patternProperties": {
23220
+ "^[A-Za-z0-9_]+$": {
23221
+ "type": "string",
23222
+ "description": "Runtime expression for a user-defined output value."
23223
+ }
23224
+ },
23225
+ "title": "Variables (step)"
23226
+ },
23227
+ "breakpoint": {
23228
+ "type": "boolean",
23229
+ "description": "Whether or not this step should act as a breakpoint when debugging is enabled. When `true`, execution will pause at this step when debug mode is enabled.",
23230
+ "default": false
23231
+ }
23232
+ },
23233
+ "title": "Common"
23234
+ },
23235
+ {
23236
+ "title": "loadCookie",
23237
+ "type": "object",
23238
+ "required": [
23239
+ "loadCookie"
23240
+ ],
23241
+ "properties": {
23242
+ "loadCookie": {
23243
+ "$schema": "http://json-schema.org/draft-07/schema#",
23244
+ "title": "loadCookie",
23245
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
23246
+ "anyOf": [
23247
+ {
23248
+ "type": "string",
23249
+ "title": "Cookie name or file path",
23250
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
23251
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
23252
+ "transform": [
23253
+ "trim"
23254
+ ]
23255
+ },
23256
+ {
23257
+ "type": "object",
23258
+ "additionalProperties": false,
23259
+ "required": [
23260
+ "name"
23261
+ ],
23262
+ "anyOf": [
23263
+ {
23264
+ "required": [
23265
+ "path"
23266
+ ],
23267
+ "not": {
23268
+ "required": [
23269
+ "variable"
23270
+ ]
23271
+ }
23272
+ },
23273
+ {
23274
+ "required": [
23275
+ "variable"
23276
+ ],
23277
+ "not": {
23278
+ "anyOf": [
23279
+ {
23280
+ "required": [
23281
+ "path"
23282
+ ]
23283
+ },
23284
+ {
23285
+ "required": [
23286
+ "directory"
23287
+ ]
23288
+ }
23289
+ ]
23290
+ }
23291
+ }
23292
+ ],
23293
+ "properties": {
23294
+ "$schema": {
23295
+ "description": "Optional self-describing schema URI for linters",
23296
+ "type": "string",
23297
+ "format": "uri-reference"
23298
+ },
23299
+ "name": {
23300
+ "type": "string",
23301
+ "title": "Cookie name",
23302
+ "description": "Name of the specific cookie to load.",
23303
+ "pattern": "^[A-Za-z0-9_.-]+$",
23304
+ "transform": [
23305
+ "trim"
23306
+ ]
23307
+ },
23308
+ "variable": {
23309
+ "type": "string",
23310
+ "title": "Environment variable name",
23311
+ "description": "Environment variable name containing the cookie as JSON string.",
23312
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
23313
+ "transform": [
23314
+ "trim"
23315
+ ]
23316
+ },
23317
+ "path": {
23318
+ "type": "string",
23319
+ "title": "Cookie file path",
23320
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
23321
+ "transform": [
23322
+ "trim"
23323
+ ]
23324
+ },
23325
+ "directory": {
23326
+ "type": "string",
23327
+ "title": "Directory path",
23328
+ "description": "Directory containing the cookie file.",
23329
+ "transform": [
23330
+ "trim"
23331
+ ]
23332
+ },
23333
+ "domain": {
23334
+ "type": "string",
23335
+ "title": "Cookie domain",
23336
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
23337
+ "transform": [
23338
+ "trim"
23339
+ ]
23340
+ }
23341
+ },
23342
+ "title": "Load cookie (detailed)"
23343
+ }
23344
+ ],
23345
+ "components": {
23346
+ "schemas": {
23347
+ "string": {
23348
+ "type": "string",
23349
+ "title": "Cookie name or file path",
23350
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
23351
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
23352
+ "transform": [
23353
+ "trim"
23354
+ ]
23355
+ },
23356
+ "object": {
23357
+ "type": "object",
23358
+ "additionalProperties": false,
23359
+ "required": [
23360
+ "name"
23361
+ ],
23362
+ "anyOf": [
23363
+ {
23364
+ "required": [
23365
+ "path"
23366
+ ],
23367
+ "not": {
23368
+ "required": [
23369
+ "variable"
23370
+ ]
23371
+ }
23372
+ },
23373
+ {
23374
+ "required": [
23375
+ "variable"
23376
+ ],
23377
+ "not": {
23378
+ "anyOf": [
23379
+ {
23380
+ "required": [
23381
+ "path"
23382
+ ]
23383
+ },
23384
+ {
23385
+ "required": [
23386
+ "directory"
23387
+ ]
23388
+ }
23389
+ ]
23390
+ }
23391
+ }
23392
+ ],
23393
+ "properties": {
23394
+ "$schema": {
23395
+ "description": "Optional self-describing schema URI for linters",
23396
+ "type": "string",
23397
+ "format": "uri-reference"
23398
+ },
23399
+ "name": {
23400
+ "type": "string",
23401
+ "title": "Cookie name",
23402
+ "description": "Name of the specific cookie to load.",
23403
+ "pattern": "^[A-Za-z0-9_.-]+$",
23404
+ "transform": [
23405
+ "trim"
23406
+ ]
23407
+ },
23408
+ "variable": {
23409
+ "type": "string",
23410
+ "title": "Environment variable name",
23411
+ "description": "Environment variable name containing the cookie as JSON string.",
23412
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
23413
+ "transform": [
23414
+ "trim"
23415
+ ]
23416
+ },
23417
+ "path": {
23418
+ "type": "string",
23419
+ "title": "Cookie file path",
23420
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
23421
+ "transform": [
23422
+ "trim"
23423
+ ]
23424
+ },
23425
+ "directory": {
23426
+ "type": "string",
23427
+ "title": "Directory path",
23428
+ "description": "Directory containing the cookie file.",
23429
+ "transform": [
23430
+ "trim"
23431
+ ]
23432
+ },
23433
+ "domain": {
23434
+ "type": "string",
23435
+ "title": "Cookie domain",
23436
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
23437
+ "transform": [
23438
+ "trim"
23439
+ ]
23440
+ }
23441
+ },
23442
+ "title": "Load cookie (detailed)"
23443
+ }
23444
+ }
23445
+ },
23446
+ "examples": [
23447
+ "session_token",
23448
+ "./test-data/auth-session.txt",
23449
+ "test_env_cookie",
23450
+ {
23451
+ "name": "auth_cookie",
23452
+ "variable": "AUTH_COOKIE"
23453
+ },
23454
+ {
23455
+ "name": "test_cookie",
23456
+ "path": "test-cookie.txt"
23457
+ },
23458
+ {
23459
+ "name": "session_token",
23460
+ "path": "session-token.txt",
23461
+ "directory": "./test-data"
23462
+ },
23463
+ {
23464
+ "name": "user_session",
23465
+ "path": "saved-cookies.txt",
23466
+ "domain": "app.example.com"
23467
+ }
23468
+ ]
23469
+ }
23470
+ }
23471
+ }
23472
+ ]
23473
+ },
20941
23474
  {
20942
23475
  "allOf": [
20943
23476
  {
@@ -21177,6 +23710,27 @@
21177
23710
  {
21178
23711
  "loadVariables": "variables.env"
21179
23712
  },
23713
+ {
23714
+ "saveCookie": "session_token"
23715
+ },
23716
+ {
23717
+ "saveCookie": {
23718
+ "name": "auth_cookie",
23719
+ "path": "auth-session.txt",
23720
+ "directory": "./test-data",
23721
+ "overwrite": true
23722
+ }
23723
+ },
23724
+ {
23725
+ "loadCookie": "session_token"
23726
+ },
23727
+ {
23728
+ "loadCookie": {
23729
+ "name": "auth_cookie",
23730
+ "path": "auth-session.txt",
23731
+ "directory": "./test-data"
23732
+ }
23733
+ },
21180
23734
  {
21181
23735
  "find": "Find me!"
21182
23736
  },