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

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 +1333 -45
  2. package/dist/schemas/loadCookie_v3.schema.json +225 -0
  3. package/dist/schemas/report_v3.schema.json +1321 -43
  4. package/dist/schemas/resolvedTests_v3.schema.json +2642 -76
  5. package/dist/schemas/saveCookie_v3.schema.json +251 -0
  6. package/dist/schemas/spec_v3.schema.json +1321 -43
  7. package/dist/schemas/step_v3.schema.json +639 -0
  8. package/dist/schemas/test_v3.schema.json +1321 -43
  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 +134 -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 +1333 -45
  16. package/src/schemas/output_schemas/loadCookie_v3.schema.json +225 -0
  17. package/src/schemas/output_schemas/report_v3.schema.json +1321 -43
  18. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +2642 -76
  19. package/src/schemas/output_schemas/saveCookie_v3.schema.json +251 -0
  20. package/src/schemas/output_schemas/spec_v3.schema.json +1321 -43
  21. package/src/schemas/output_schemas/step_v3.schema.json +639 -0
  22. package/src/schemas/output_schemas/test_v3.schema.json +1321 -43
  23. package/src/schemas/schemas.json +8810 -7
  24. package/src/schemas/src_schemas/config_v3.schema.json +2 -0
  25. package/src/schemas/src_schemas/loadCookie_v3.schema.json +109 -0
  26. package/src/schemas/src_schemas/saveCookie_v3.schema.json +122 -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,328 @@
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
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
4654
+ "transform": [
4655
+ "trim"
4656
+ ]
4657
+ },
4658
+ "directory": {
4659
+ "type": "string",
4660
+ "title": "Directory path",
4661
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4662
+ "transform": [
4663
+ "trim"
4664
+ ]
4665
+ },
4666
+ "overwrite": {
4667
+ "type": "boolean",
4668
+ "title": "Overwrite existing file",
4669
+ "description": "Whether to overwrite existing cookie file.",
4670
+ "default": false
4671
+ },
4672
+ "domain": {
4673
+ "type": "string",
4674
+ "title": "Cookie domain",
4675
+ "description": "Specific domain to filter the cookie by (optional).",
4676
+ "transform": [
4677
+ "trim"
4678
+ ]
4679
+ }
4680
+ },
4681
+ "required": [
4682
+ "name"
4683
+ ],
4684
+ "anyOf": [
4685
+ {
4686
+ "required": [
4687
+ "path"
4688
+ ],
4689
+ "not": {
4690
+ "required": [
4691
+ "variable"
4692
+ ]
4693
+ }
4694
+ },
4695
+ {
4696
+ "required": [
4697
+ "variable"
4698
+ ],
4699
+ "not": {
4700
+ "anyOf": [
4701
+ {
4702
+ "required": [
4703
+ "path"
4704
+ ]
4705
+ },
4706
+ {
4707
+ "required": [
4708
+ "directory"
4709
+ ]
4710
+ },
4711
+ {
4712
+ "required": [
4713
+ "overwrite"
4714
+ ]
4715
+ }
4716
+ ]
4717
+ }
4718
+ }
4719
+ ],
4720
+ "title": "Save cookie (detailed)"
4721
+ }
4722
+ ],
4723
+ "components": {
4724
+ "schemas": {
4725
+ "string": {
4726
+ "type": "string",
4727
+ "title": "Cookie name",
4728
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
4729
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4730
+ "transform": [
4731
+ "trim"
4732
+ ]
4733
+ },
4734
+ "object": {
4735
+ "type": "object",
4736
+ "additionalProperties": false,
4737
+ "properties": {
4738
+ "$schema": {
4739
+ "description": "Optional self-describing schema URI for linters",
4740
+ "type": "string",
4741
+ "format": "uri-reference"
4742
+ },
4743
+ "name": {
4744
+ "type": "string",
4745
+ "title": "Cookie name",
4746
+ "description": "Name of the specific cookie to save.",
4747
+ "pattern": "^[A-Za-z0-9_.-]+$",
4748
+ "transform": [
4749
+ "trim"
4750
+ ]
4751
+ },
4752
+ "variable": {
4753
+ "type": "string",
4754
+ "title": "Environment variable name",
4755
+ "description": "Environment variable name to store the cookie as JSON string.",
4756
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
4757
+ "transform": [
4758
+ "trim"
4759
+ ]
4760
+ },
4761
+ "path": {
4762
+ "type": "string",
4763
+ "title": "Cookie file path",
4764
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
4765
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
4766
+ "transform": [
4767
+ "trim"
4768
+ ]
4769
+ },
4770
+ "directory": {
4771
+ "type": "string",
4772
+ "title": "Directory path",
4773
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
4774
+ "transform": [
4775
+ "trim"
4776
+ ]
4777
+ },
4778
+ "overwrite": {
4779
+ "type": "boolean",
4780
+ "title": "Overwrite existing file",
4781
+ "description": "Whether to overwrite existing cookie file.",
4782
+ "default": false
4783
+ },
4784
+ "domain": {
4785
+ "type": "string",
4786
+ "title": "Cookie domain",
4787
+ "description": "Specific domain to filter the cookie by (optional).",
4788
+ "transform": [
4789
+ "trim"
4790
+ ]
4791
+ }
4792
+ },
4793
+ "required": [
4794
+ "name"
4795
+ ],
4796
+ "anyOf": [
4797
+ {
4798
+ "required": [
4799
+ "path"
4800
+ ],
4801
+ "not": {
4802
+ "required": [
4803
+ "variable"
4804
+ ]
4805
+ }
4806
+ },
4807
+ {
4808
+ "required": [
4809
+ "variable"
4810
+ ],
4811
+ "not": {
4812
+ "anyOf": [
4813
+ {
4814
+ "required": [
4815
+ "path"
4816
+ ]
4817
+ },
4818
+ {
4819
+ "required": [
4820
+ "directory"
4821
+ ]
4822
+ },
4823
+ {
4824
+ "required": [
4825
+ "overwrite"
4826
+ ]
4827
+ }
4828
+ ]
4829
+ }
4830
+ }
4831
+ ],
4832
+ "title": "Save cookie (detailed)"
4833
+ }
4834
+ }
4835
+ },
4836
+ "examples": [
4837
+ "session_token",
4838
+ {
4839
+ "name": "auth_cookie",
4840
+ "path": "auth-cookie.txt"
4841
+ },
4842
+ {
4843
+ "name": "session_token",
4844
+ "variable": "SESSION_TOKEN"
4845
+ },
4846
+ {
4847
+ "name": "user_session",
4848
+ "path": "user-session.txt",
4849
+ "directory": "./test-data",
4850
+ "overwrite": true
4851
+ },
4852
+ {
4853
+ "name": "login_token",
4854
+ "path": "login-token.txt",
4855
+ "domain": "app.example.com"
4856
+ }
4857
+ ]
4858
+ }
4859
+ },
4860
+ "title": "saveCookie"
4861
+ }
4862
+ ]
4863
+ },
4538
4864
  {
4539
4865
  "allOf": [
4540
4866
  {
@@ -4933,36 +5259,332 @@
4933
5259
  "title": "Common"
4934
5260
  },
4935
5261
  {
4936
- "title": "wait",
5262
+ "title": "loadCookie",
4937
5263
  "type": "object",
4938
5264
  "required": [
4939
- "wait"
5265
+ "loadCookie"
4940
5266
  ],
4941
5267
  "properties": {
4942
- "wait": {
5268
+ "loadCookie": {
4943
5269
  "$schema": "http://json-schema.org/draft-07/schema#",
4944
- "title": "wait",
4945
- "description": "Pause (in milliseconds) before performing the next action.",
4946
- "default": 5000,
5270
+ "title": "loadCookie",
5271
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
4947
5272
  "anyOf": [
4948
5273
  {
4949
- "type": "number",
4950
- "title": "Wait (simple)"
4951
- },
4952
- {
4953
- "title": "Wait (environment variable)",
4954
5274
  "type": "string",
4955
- "pattern": "(\\$[A-Za-z0-9_]+)",
5275
+ "title": "Cookie name or file path",
5276
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5277
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
4956
5278
  "transform": [
4957
5279
  "trim"
4958
5280
  ]
4959
5281
  },
4960
5282
  {
4961
- "type": "boolean",
4962
- "title": "Wait (boolean)"
4963
- }
4964
- ],
4965
- "components": {
5283
+ "type": "object",
5284
+ "additionalProperties": false,
5285
+ "required": [
5286
+ "name"
5287
+ ],
5288
+ "anyOf": [
5289
+ {
5290
+ "required": [
5291
+ "path"
5292
+ ],
5293
+ "not": {
5294
+ "required": [
5295
+ "variable"
5296
+ ]
5297
+ }
5298
+ },
5299
+ {
5300
+ "required": [
5301
+ "variable"
5302
+ ],
5303
+ "not": {
5304
+ "anyOf": [
5305
+ {
5306
+ "required": [
5307
+ "path"
5308
+ ]
5309
+ },
5310
+ {
5311
+ "required": [
5312
+ "directory"
5313
+ ]
5314
+ }
5315
+ ]
5316
+ }
5317
+ }
5318
+ ],
5319
+ "properties": {
5320
+ "$schema": {
5321
+ "description": "Optional self-describing schema URI for linters",
5322
+ "type": "string",
5323
+ "format": "uri-reference"
5324
+ },
5325
+ "name": {
5326
+ "type": "string",
5327
+ "title": "Cookie name",
5328
+ "description": "Name of the specific cookie to load.",
5329
+ "pattern": "^[A-Za-z0-9_.-]+$",
5330
+ "transform": [
5331
+ "trim"
5332
+ ]
5333
+ },
5334
+ "variable": {
5335
+ "type": "string",
5336
+ "title": "Environment variable name",
5337
+ "description": "Environment variable name containing the cookie as JSON string.",
5338
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5339
+ "transform": [
5340
+ "trim"
5341
+ ]
5342
+ },
5343
+ "path": {
5344
+ "type": "string",
5345
+ "title": "Cookie file path",
5346
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5347
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
5348
+ "transform": [
5349
+ "trim"
5350
+ ]
5351
+ },
5352
+ "directory": {
5353
+ "type": "string",
5354
+ "title": "Directory path",
5355
+ "description": "Directory containing the cookie file.",
5356
+ "transform": [
5357
+ "trim"
5358
+ ]
5359
+ },
5360
+ "domain": {
5361
+ "type": "string",
5362
+ "title": "Cookie domain",
5363
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5364
+ "transform": [
5365
+ "trim"
5366
+ ]
5367
+ }
5368
+ },
5369
+ "title": "Load cookie (detailed)"
5370
+ }
5371
+ ],
5372
+ "components": {
5373
+ "schemas": {
5374
+ "string": {
5375
+ "type": "string",
5376
+ "title": "Cookie name or file path",
5377
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
5378
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
5379
+ "transform": [
5380
+ "trim"
5381
+ ]
5382
+ },
5383
+ "object": {
5384
+ "type": "object",
5385
+ "additionalProperties": false,
5386
+ "required": [
5387
+ "name"
5388
+ ],
5389
+ "anyOf": [
5390
+ {
5391
+ "required": [
5392
+ "path"
5393
+ ],
5394
+ "not": {
5395
+ "required": [
5396
+ "variable"
5397
+ ]
5398
+ }
5399
+ },
5400
+ {
5401
+ "required": [
5402
+ "variable"
5403
+ ],
5404
+ "not": {
5405
+ "anyOf": [
5406
+ {
5407
+ "required": [
5408
+ "path"
5409
+ ]
5410
+ },
5411
+ {
5412
+ "required": [
5413
+ "directory"
5414
+ ]
5415
+ }
5416
+ ]
5417
+ }
5418
+ }
5419
+ ],
5420
+ "properties": {
5421
+ "$schema": {
5422
+ "description": "Optional self-describing schema URI for linters",
5423
+ "type": "string",
5424
+ "format": "uri-reference"
5425
+ },
5426
+ "name": {
5427
+ "type": "string",
5428
+ "title": "Cookie name",
5429
+ "description": "Name of the specific cookie to load.",
5430
+ "pattern": "^[A-Za-z0-9_.-]+$",
5431
+ "transform": [
5432
+ "trim"
5433
+ ]
5434
+ },
5435
+ "variable": {
5436
+ "type": "string",
5437
+ "title": "Environment variable name",
5438
+ "description": "Environment variable name containing the cookie as JSON string.",
5439
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
5440
+ "transform": [
5441
+ "trim"
5442
+ ]
5443
+ },
5444
+ "path": {
5445
+ "type": "string",
5446
+ "title": "Cookie file path",
5447
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
5448
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
5449
+ "transform": [
5450
+ "trim"
5451
+ ]
5452
+ },
5453
+ "directory": {
5454
+ "type": "string",
5455
+ "title": "Directory path",
5456
+ "description": "Directory containing the cookie file.",
5457
+ "transform": [
5458
+ "trim"
5459
+ ]
5460
+ },
5461
+ "domain": {
5462
+ "type": "string",
5463
+ "title": "Cookie domain",
5464
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
5465
+ "transform": [
5466
+ "trim"
5467
+ ]
5468
+ }
5469
+ },
5470
+ "title": "Load cookie (detailed)"
5471
+ }
5472
+ }
5473
+ },
5474
+ "examples": [
5475
+ "session_token",
5476
+ "./test-data/auth-session.txt",
5477
+ {
5478
+ "name": "auth_cookie",
5479
+ "variable": "AUTH_COOKIE"
5480
+ },
5481
+ {
5482
+ "name": "session_token",
5483
+ "path": "session-token.txt",
5484
+ "directory": "./test-data"
5485
+ },
5486
+ {
5487
+ "name": "user_session",
5488
+ "path": "saved-cookies.txt",
5489
+ "domain": "app.example.com"
5490
+ }
5491
+ ]
5492
+ }
5493
+ }
5494
+ }
5495
+ ]
5496
+ },
5497
+ {
5498
+ "allOf": [
5499
+ {
5500
+ "type": "object",
5501
+ "dynamicDefaults": {
5502
+ "stepId": "uuid"
5503
+ },
5504
+ "properties": {
5505
+ "$schema": {
5506
+ "description": "JSON Schema for this object.",
5507
+ "type": "string",
5508
+ "enum": [
5509
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
5510
+ ]
5511
+ },
5512
+ "stepId": {
5513
+ "type": "string",
5514
+ "description": "ID of the step."
5515
+ },
5516
+ "description": {
5517
+ "type": "string",
5518
+ "description": "Description of the step."
5519
+ },
5520
+ "unsafe": {
5521
+ "type": "boolean",
5522
+ "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.",
5523
+ "default": false
5524
+ },
5525
+ "outputs": {
5526
+ "type": "object",
5527
+ "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.",
5528
+ "default": {},
5529
+ "patternProperties": {
5530
+ "^[A-Za-z0-9_]+$": {
5531
+ "type": "string",
5532
+ "description": "Runtime expression for a user-defined output value."
5533
+ }
5534
+ },
5535
+ "title": "Outputs (step)"
5536
+ },
5537
+ "variables": {
5538
+ "type": "object",
5539
+ "description": "Environment variables to set from user-defined expressions.",
5540
+ "default": {},
5541
+ "patternProperties": {
5542
+ "^[A-Za-z0-9_]+$": {
5543
+ "type": "string",
5544
+ "description": "Runtime expression for a user-defined output value."
5545
+ }
5546
+ },
5547
+ "title": "Variables (step)"
5548
+ },
5549
+ "breakpoint": {
5550
+ "type": "boolean",
5551
+ "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.",
5552
+ "default": false
5553
+ }
5554
+ },
5555
+ "title": "Common"
5556
+ },
5557
+ {
5558
+ "title": "wait",
5559
+ "type": "object",
5560
+ "required": [
5561
+ "wait"
5562
+ ],
5563
+ "properties": {
5564
+ "wait": {
5565
+ "$schema": "http://json-schema.org/draft-07/schema#",
5566
+ "title": "wait",
5567
+ "description": "Pause (in milliseconds) before performing the next action.",
5568
+ "default": 5000,
5569
+ "anyOf": [
5570
+ {
5571
+ "type": "number",
5572
+ "title": "Wait (simple)"
5573
+ },
5574
+ {
5575
+ "title": "Wait (environment variable)",
5576
+ "type": "string",
5577
+ "pattern": "(\\$[A-Za-z0-9_]+)",
5578
+ "transform": [
5579
+ "trim"
5580
+ ]
5581
+ },
5582
+ {
5583
+ "type": "boolean",
5584
+ "title": "Wait (boolean)"
5585
+ }
5586
+ ],
5587
+ "components": {
4966
5588
  "schemas": {
4967
5589
  "string": {
4968
5590
  "title": "Wait (environment variable)",
@@ -5111,6 +5733,27 @@
5111
5733
  {
5112
5734
  "loadVariables": "variables.env"
5113
5735
  },
5736
+ {
5737
+ "saveCookie": "session_token"
5738
+ },
5739
+ {
5740
+ "saveCookie": {
5741
+ "name": "auth_cookie",
5742
+ "path": "auth-session.txt",
5743
+ "directory": "./test-data",
5744
+ "overwrite": true
5745
+ }
5746
+ },
5747
+ {
5748
+ "loadCookie": "session_token"
5749
+ },
5750
+ {
5751
+ "loadCookie": {
5752
+ "name": "auth_cookie",
5753
+ "path": "auth-session.txt",
5754
+ "directory": "./test-data"
5755
+ }
5756
+ },
5114
5757
  {
5115
5758
  "find": "Find me!"
5116
5759
  },
@@ -5984,10 +6627,12 @@
5984
6627
  "find",
5985
6628
  "goTo",
5986
6629
  "httpRequest",
6630
+ "loadCookie",
5987
6631
  "loadVariables",
5988
6632
  "record",
5989
6633
  "runCode",
5990
6634
  "runShell",
6635
+ "saveCookie",
5991
6636
  "screenshot",
5992
6637
  "stopRecord",
5993
6638
  "type",
@@ -6006,10 +6651,12 @@
6006
6651
  "find",
6007
6652
  "goTo",
6008
6653
  "httpRequest",
6654
+ "loadCookie",
6009
6655
  "loadVariables",
6010
6656
  "record",
6011
6657
  "runCode",
6012
6658
  "runShell",
6659
+ "saveCookie",
6013
6660
  "screenshot",
6014
6661
  "stopRecord",
6015
6662
  "type",
@@ -9834,16 +10481,338 @@
9834
10481
  {
9835
10482
  "type": "object",
9836
10483
  "required": [
9837
- "record"
10484
+ "saveCookie"
9838
10485
  ],
9839
10486
  "properties": {
9840
- "record": {
10487
+ "saveCookie": {
9841
10488
  "$schema": "http://json-schema.org/draft-07/schema#",
9842
- "title": "record",
9843
- "description": "Start recording the current browser viewport. Must be followed by a `stopRecord` step. Only runs in Chrome browsers when they are visible. Supported extensions: [ '.mp4', '.webm', '.gif' ]",
10489
+ "title": "saveCookie",
10490
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
9844
10491
  "anyOf": [
9845
10492
  {
9846
- "title": "Record (simple)",
10493
+ "type": "string",
10494
+ "title": "Cookie name",
10495
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10496
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10497
+ "transform": [
10498
+ "trim"
10499
+ ]
10500
+ },
10501
+ {
10502
+ "type": "object",
10503
+ "additionalProperties": false,
10504
+ "properties": {
10505
+ "$schema": {
10506
+ "description": "Optional self-describing schema URI for linters",
10507
+ "type": "string",
10508
+ "format": "uri-reference"
10509
+ },
10510
+ "name": {
10511
+ "type": "string",
10512
+ "title": "Cookie name",
10513
+ "description": "Name of the specific cookie to save.",
10514
+ "pattern": "^[A-Za-z0-9_.-]+$",
10515
+ "transform": [
10516
+ "trim"
10517
+ ]
10518
+ },
10519
+ "variable": {
10520
+ "type": "string",
10521
+ "title": "Environment variable name",
10522
+ "description": "Environment variable name to store the cookie as JSON string.",
10523
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10524
+ "transform": [
10525
+ "trim"
10526
+ ]
10527
+ },
10528
+ "path": {
10529
+ "type": "string",
10530
+ "title": "Cookie file path",
10531
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10532
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
10533
+ "transform": [
10534
+ "trim"
10535
+ ]
10536
+ },
10537
+ "directory": {
10538
+ "type": "string",
10539
+ "title": "Directory path",
10540
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10541
+ "transform": [
10542
+ "trim"
10543
+ ]
10544
+ },
10545
+ "overwrite": {
10546
+ "type": "boolean",
10547
+ "title": "Overwrite existing file",
10548
+ "description": "Whether to overwrite existing cookie file.",
10549
+ "default": false
10550
+ },
10551
+ "domain": {
10552
+ "type": "string",
10553
+ "title": "Cookie domain",
10554
+ "description": "Specific domain to filter the cookie by (optional).",
10555
+ "transform": [
10556
+ "trim"
10557
+ ]
10558
+ }
10559
+ },
10560
+ "required": [
10561
+ "name"
10562
+ ],
10563
+ "anyOf": [
10564
+ {
10565
+ "required": [
10566
+ "path"
10567
+ ],
10568
+ "not": {
10569
+ "required": [
10570
+ "variable"
10571
+ ]
10572
+ }
10573
+ },
10574
+ {
10575
+ "required": [
10576
+ "variable"
10577
+ ],
10578
+ "not": {
10579
+ "anyOf": [
10580
+ {
10581
+ "required": [
10582
+ "path"
10583
+ ]
10584
+ },
10585
+ {
10586
+ "required": [
10587
+ "directory"
10588
+ ]
10589
+ },
10590
+ {
10591
+ "required": [
10592
+ "overwrite"
10593
+ ]
10594
+ }
10595
+ ]
10596
+ }
10597
+ }
10598
+ ],
10599
+ "title": "Save cookie (detailed)"
10600
+ }
10601
+ ],
10602
+ "components": {
10603
+ "schemas": {
10604
+ "string": {
10605
+ "type": "string",
10606
+ "title": "Cookie name",
10607
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
10608
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10609
+ "transform": [
10610
+ "trim"
10611
+ ]
10612
+ },
10613
+ "object": {
10614
+ "type": "object",
10615
+ "additionalProperties": false,
10616
+ "properties": {
10617
+ "$schema": {
10618
+ "description": "Optional self-describing schema URI for linters",
10619
+ "type": "string",
10620
+ "format": "uri-reference"
10621
+ },
10622
+ "name": {
10623
+ "type": "string",
10624
+ "title": "Cookie name",
10625
+ "description": "Name of the specific cookie to save.",
10626
+ "pattern": "^[A-Za-z0-9_.-]+$",
10627
+ "transform": [
10628
+ "trim"
10629
+ ]
10630
+ },
10631
+ "variable": {
10632
+ "type": "string",
10633
+ "title": "Environment variable name",
10634
+ "description": "Environment variable name to store the cookie as JSON string.",
10635
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
10636
+ "transform": [
10637
+ "trim"
10638
+ ]
10639
+ },
10640
+ "path": {
10641
+ "type": "string",
10642
+ "title": "Cookie file path",
10643
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
10644
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
10645
+ "transform": [
10646
+ "trim"
10647
+ ]
10648
+ },
10649
+ "directory": {
10650
+ "type": "string",
10651
+ "title": "Directory path",
10652
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
10653
+ "transform": [
10654
+ "trim"
10655
+ ]
10656
+ },
10657
+ "overwrite": {
10658
+ "type": "boolean",
10659
+ "title": "Overwrite existing file",
10660
+ "description": "Whether to overwrite existing cookie file.",
10661
+ "default": false
10662
+ },
10663
+ "domain": {
10664
+ "type": "string",
10665
+ "title": "Cookie domain",
10666
+ "description": "Specific domain to filter the cookie by (optional).",
10667
+ "transform": [
10668
+ "trim"
10669
+ ]
10670
+ }
10671
+ },
10672
+ "required": [
10673
+ "name"
10674
+ ],
10675
+ "anyOf": [
10676
+ {
10677
+ "required": [
10678
+ "path"
10679
+ ],
10680
+ "not": {
10681
+ "required": [
10682
+ "variable"
10683
+ ]
10684
+ }
10685
+ },
10686
+ {
10687
+ "required": [
10688
+ "variable"
10689
+ ],
10690
+ "not": {
10691
+ "anyOf": [
10692
+ {
10693
+ "required": [
10694
+ "path"
10695
+ ]
10696
+ },
10697
+ {
10698
+ "required": [
10699
+ "directory"
10700
+ ]
10701
+ },
10702
+ {
10703
+ "required": [
10704
+ "overwrite"
10705
+ ]
10706
+ }
10707
+ ]
10708
+ }
10709
+ }
10710
+ ],
10711
+ "title": "Save cookie (detailed)"
10712
+ }
10713
+ }
10714
+ },
10715
+ "examples": [
10716
+ "session_token",
10717
+ {
10718
+ "name": "auth_cookie",
10719
+ "path": "auth-cookie.txt"
10720
+ },
10721
+ {
10722
+ "name": "session_token",
10723
+ "variable": "SESSION_TOKEN"
10724
+ },
10725
+ {
10726
+ "name": "user_session",
10727
+ "path": "user-session.txt",
10728
+ "directory": "./test-data",
10729
+ "overwrite": true
10730
+ },
10731
+ {
10732
+ "name": "login_token",
10733
+ "path": "login-token.txt",
10734
+ "domain": "app.example.com"
10735
+ }
10736
+ ]
10737
+ }
10738
+ },
10739
+ "title": "saveCookie"
10740
+ }
10741
+ ]
10742
+ },
10743
+ {
10744
+ "allOf": [
10745
+ {
10746
+ "type": "object",
10747
+ "dynamicDefaults": {
10748
+ "stepId": "uuid"
10749
+ },
10750
+ "properties": {
10751
+ "$schema": {
10752
+ "description": "JSON Schema for this object.",
10753
+ "type": "string",
10754
+ "enum": [
10755
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
10756
+ ]
10757
+ },
10758
+ "stepId": {
10759
+ "type": "string",
10760
+ "description": "ID of the step."
10761
+ },
10762
+ "description": {
10763
+ "type": "string",
10764
+ "description": "Description of the step."
10765
+ },
10766
+ "unsafe": {
10767
+ "type": "boolean",
10768
+ "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.",
10769
+ "default": false
10770
+ },
10771
+ "outputs": {
10772
+ "type": "object",
10773
+ "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.",
10774
+ "default": {},
10775
+ "patternProperties": {
10776
+ "^[A-Za-z0-9_]+$": {
10777
+ "type": "string",
10778
+ "description": "Runtime expression for a user-defined output value."
10779
+ }
10780
+ },
10781
+ "title": "Outputs (step)"
10782
+ },
10783
+ "variables": {
10784
+ "type": "object",
10785
+ "description": "Environment variables to set from user-defined expressions.",
10786
+ "default": {},
10787
+ "patternProperties": {
10788
+ "^[A-Za-z0-9_]+$": {
10789
+ "type": "string",
10790
+ "description": "Runtime expression for a user-defined output value."
10791
+ }
10792
+ },
10793
+ "title": "Variables (step)"
10794
+ },
10795
+ "breakpoint": {
10796
+ "type": "boolean",
10797
+ "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.",
10798
+ "default": false
10799
+ }
10800
+ },
10801
+ "title": "Common"
10802
+ },
10803
+ {
10804
+ "type": "object",
10805
+ "required": [
10806
+ "record"
10807
+ ],
10808
+ "properties": {
10809
+ "record": {
10810
+ "$schema": "http://json-schema.org/draft-07/schema#",
10811
+ "title": "record",
10812
+ "description": "Start recording the current browser viewport. Must be followed by a `stopRecord` step. Only runs in Chrome browsers when they are visible. Supported extensions: [ '.mp4', '.webm', '.gif' ]",
10813
+ "anyOf": [
10814
+ {
10815
+ "title": "Record (simple)",
9847
10816
  "type": "string",
9848
10817
  "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
9849
10818
  "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)",
@@ -10169,33 +11138,329 @@
10169
11138
  "title": "Common"
10170
11139
  },
10171
11140
  {
10172
- "title": "wait",
11141
+ "title": "loadCookie",
10173
11142
  "type": "object",
10174
11143
  "required": [
10175
- "wait"
11144
+ "loadCookie"
10176
11145
  ],
10177
11146
  "properties": {
10178
- "wait": {
11147
+ "loadCookie": {
10179
11148
  "$schema": "http://json-schema.org/draft-07/schema#",
10180
- "title": "wait",
10181
- "description": "Pause (in milliseconds) before performing the next action.",
10182
- "default": 5000,
11149
+ "title": "loadCookie",
11150
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
10183
11151
  "anyOf": [
10184
11152
  {
10185
- "type": "number",
10186
- "title": "Wait (simple)"
10187
- },
10188
- {
10189
- "title": "Wait (environment variable)",
10190
11153
  "type": "string",
10191
- "pattern": "(\\$[A-Za-z0-9_]+)",
11154
+ "title": "Cookie name or file path",
11155
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11156
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
10192
11157
  "transform": [
10193
11158
  "trim"
10194
11159
  ]
10195
11160
  },
10196
11161
  {
10197
- "type": "boolean",
10198
- "title": "Wait (boolean)"
11162
+ "type": "object",
11163
+ "additionalProperties": false,
11164
+ "required": [
11165
+ "name"
11166
+ ],
11167
+ "anyOf": [
11168
+ {
11169
+ "required": [
11170
+ "path"
11171
+ ],
11172
+ "not": {
11173
+ "required": [
11174
+ "variable"
11175
+ ]
11176
+ }
11177
+ },
11178
+ {
11179
+ "required": [
11180
+ "variable"
11181
+ ],
11182
+ "not": {
11183
+ "anyOf": [
11184
+ {
11185
+ "required": [
11186
+ "path"
11187
+ ]
11188
+ },
11189
+ {
11190
+ "required": [
11191
+ "directory"
11192
+ ]
11193
+ }
11194
+ ]
11195
+ }
11196
+ }
11197
+ ],
11198
+ "properties": {
11199
+ "$schema": {
11200
+ "description": "Optional self-describing schema URI for linters",
11201
+ "type": "string",
11202
+ "format": "uri-reference"
11203
+ },
11204
+ "name": {
11205
+ "type": "string",
11206
+ "title": "Cookie name",
11207
+ "description": "Name of the specific cookie to load.",
11208
+ "pattern": "^[A-Za-z0-9_.-]+$",
11209
+ "transform": [
11210
+ "trim"
11211
+ ]
11212
+ },
11213
+ "variable": {
11214
+ "type": "string",
11215
+ "title": "Environment variable name",
11216
+ "description": "Environment variable name containing the cookie as JSON string.",
11217
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11218
+ "transform": [
11219
+ "trim"
11220
+ ]
11221
+ },
11222
+ "path": {
11223
+ "type": "string",
11224
+ "title": "Cookie file path",
11225
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11226
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
11227
+ "transform": [
11228
+ "trim"
11229
+ ]
11230
+ },
11231
+ "directory": {
11232
+ "type": "string",
11233
+ "title": "Directory path",
11234
+ "description": "Directory containing the cookie file.",
11235
+ "transform": [
11236
+ "trim"
11237
+ ]
11238
+ },
11239
+ "domain": {
11240
+ "type": "string",
11241
+ "title": "Cookie domain",
11242
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11243
+ "transform": [
11244
+ "trim"
11245
+ ]
11246
+ }
11247
+ },
11248
+ "title": "Load cookie (detailed)"
11249
+ }
11250
+ ],
11251
+ "components": {
11252
+ "schemas": {
11253
+ "string": {
11254
+ "type": "string",
11255
+ "title": "Cookie name or file path",
11256
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
11257
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
11258
+ "transform": [
11259
+ "trim"
11260
+ ]
11261
+ },
11262
+ "object": {
11263
+ "type": "object",
11264
+ "additionalProperties": false,
11265
+ "required": [
11266
+ "name"
11267
+ ],
11268
+ "anyOf": [
11269
+ {
11270
+ "required": [
11271
+ "path"
11272
+ ],
11273
+ "not": {
11274
+ "required": [
11275
+ "variable"
11276
+ ]
11277
+ }
11278
+ },
11279
+ {
11280
+ "required": [
11281
+ "variable"
11282
+ ],
11283
+ "not": {
11284
+ "anyOf": [
11285
+ {
11286
+ "required": [
11287
+ "path"
11288
+ ]
11289
+ },
11290
+ {
11291
+ "required": [
11292
+ "directory"
11293
+ ]
11294
+ }
11295
+ ]
11296
+ }
11297
+ }
11298
+ ],
11299
+ "properties": {
11300
+ "$schema": {
11301
+ "description": "Optional self-describing schema URI for linters",
11302
+ "type": "string",
11303
+ "format": "uri-reference"
11304
+ },
11305
+ "name": {
11306
+ "type": "string",
11307
+ "title": "Cookie name",
11308
+ "description": "Name of the specific cookie to load.",
11309
+ "pattern": "^[A-Za-z0-9_.-]+$",
11310
+ "transform": [
11311
+ "trim"
11312
+ ]
11313
+ },
11314
+ "variable": {
11315
+ "type": "string",
11316
+ "title": "Environment variable name",
11317
+ "description": "Environment variable name containing the cookie as JSON string.",
11318
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
11319
+ "transform": [
11320
+ "trim"
11321
+ ]
11322
+ },
11323
+ "path": {
11324
+ "type": "string",
11325
+ "title": "Cookie file path",
11326
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
11327
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
11328
+ "transform": [
11329
+ "trim"
11330
+ ]
11331
+ },
11332
+ "directory": {
11333
+ "type": "string",
11334
+ "title": "Directory path",
11335
+ "description": "Directory containing the cookie file.",
11336
+ "transform": [
11337
+ "trim"
11338
+ ]
11339
+ },
11340
+ "domain": {
11341
+ "type": "string",
11342
+ "title": "Cookie domain",
11343
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
11344
+ "transform": [
11345
+ "trim"
11346
+ ]
11347
+ }
11348
+ },
11349
+ "title": "Load cookie (detailed)"
11350
+ }
11351
+ }
11352
+ },
11353
+ "examples": [
11354
+ "session_token",
11355
+ "./test-data/auth-session.txt",
11356
+ {
11357
+ "name": "auth_cookie",
11358
+ "variable": "AUTH_COOKIE"
11359
+ },
11360
+ {
11361
+ "name": "session_token",
11362
+ "path": "session-token.txt",
11363
+ "directory": "./test-data"
11364
+ },
11365
+ {
11366
+ "name": "user_session",
11367
+ "path": "saved-cookies.txt",
11368
+ "domain": "app.example.com"
11369
+ }
11370
+ ]
11371
+ }
11372
+ }
11373
+ }
11374
+ ]
11375
+ },
11376
+ {
11377
+ "allOf": [
11378
+ {
11379
+ "type": "object",
11380
+ "dynamicDefaults": {
11381
+ "stepId": "uuid"
11382
+ },
11383
+ "properties": {
11384
+ "$schema": {
11385
+ "description": "JSON Schema for this object.",
11386
+ "type": "string",
11387
+ "enum": [
11388
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
11389
+ ]
11390
+ },
11391
+ "stepId": {
11392
+ "type": "string",
11393
+ "description": "ID of the step."
11394
+ },
11395
+ "description": {
11396
+ "type": "string",
11397
+ "description": "Description of the step."
11398
+ },
11399
+ "unsafe": {
11400
+ "type": "boolean",
11401
+ "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.",
11402
+ "default": false
11403
+ },
11404
+ "outputs": {
11405
+ "type": "object",
11406
+ "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.",
11407
+ "default": {},
11408
+ "patternProperties": {
11409
+ "^[A-Za-z0-9_]+$": {
11410
+ "type": "string",
11411
+ "description": "Runtime expression for a user-defined output value."
11412
+ }
11413
+ },
11414
+ "title": "Outputs (step)"
11415
+ },
11416
+ "variables": {
11417
+ "type": "object",
11418
+ "description": "Environment variables to set from user-defined expressions.",
11419
+ "default": {},
11420
+ "patternProperties": {
11421
+ "^[A-Za-z0-9_]+$": {
11422
+ "type": "string",
11423
+ "description": "Runtime expression for a user-defined output value."
11424
+ }
11425
+ },
11426
+ "title": "Variables (step)"
11427
+ },
11428
+ "breakpoint": {
11429
+ "type": "boolean",
11430
+ "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.",
11431
+ "default": false
11432
+ }
11433
+ },
11434
+ "title": "Common"
11435
+ },
11436
+ {
11437
+ "title": "wait",
11438
+ "type": "object",
11439
+ "required": [
11440
+ "wait"
11441
+ ],
11442
+ "properties": {
11443
+ "wait": {
11444
+ "$schema": "http://json-schema.org/draft-07/schema#",
11445
+ "title": "wait",
11446
+ "description": "Pause (in milliseconds) before performing the next action.",
11447
+ "default": 5000,
11448
+ "anyOf": [
11449
+ {
11450
+ "type": "number",
11451
+ "title": "Wait (simple)"
11452
+ },
11453
+ {
11454
+ "title": "Wait (environment variable)",
11455
+ "type": "string",
11456
+ "pattern": "(\\$[A-Za-z0-9_]+)",
11457
+ "transform": [
11458
+ "trim"
11459
+ ]
11460
+ },
11461
+ {
11462
+ "type": "boolean",
11463
+ "title": "Wait (boolean)"
10199
11464
  }
10200
11465
  ],
10201
11466
  "components": {
@@ -10347,6 +11612,27 @@
10347
11612
  {
10348
11613
  "loadVariables": "variables.env"
10349
11614
  },
11615
+ {
11616
+ "saveCookie": "session_token"
11617
+ },
11618
+ {
11619
+ "saveCookie": {
11620
+ "name": "auth_cookie",
11621
+ "path": "auth-session.txt",
11622
+ "directory": "./test-data",
11623
+ "overwrite": true
11624
+ }
11625
+ },
11626
+ {
11627
+ "loadCookie": "session_token"
11628
+ },
11629
+ {
11630
+ "loadCookie": {
11631
+ "name": "auth_cookie",
11632
+ "path": "auth-session.txt",
11633
+ "directory": "./test-data"
11634
+ }
11635
+ },
10350
11636
  {
10351
11637
  "find": "Find me!"
10352
11638
  },
@@ -10595,10 +11881,12 @@
10595
11881
  "find",
10596
11882
  "goTo",
10597
11883
  "httpRequest",
11884
+ "loadCookie",
10598
11885
  "loadVariables",
10599
11886
  "record",
10600
11887
  "runCode",
10601
11888
  "runShell",
11889
+ "saveCookie",
10602
11890
  "screenshot",
10603
11891
  "stopRecord",
10604
11892
  "type",
@@ -15843,30 +17131,352 @@
15843
17131
  {
15844
17132
  "type": "object",
15845
17133
  "required": [
15846
- "record"
17134
+ "saveCookie"
15847
17135
  ],
15848
17136
  "properties": {
15849
- "record": {
17137
+ "saveCookie": {
15850
17138
  "$schema": "http://json-schema.org/draft-07/schema#",
15851
- "title": "record",
15852
- "description": "Start recording the current browser viewport. Must be followed by a `stopRecord` step. Only runs in Chrome browsers when they are visible. Supported extensions: [ '.mp4', '.webm', '.gif' ]",
17139
+ "title": "saveCookie",
17140
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
15853
17141
  "anyOf": [
15854
17142
  {
15855
- "title": "Record (simple)",
15856
17143
  "type": "string",
15857
- "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
15858
- "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)",
17144
+ "title": "Cookie name",
17145
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
17146
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
15859
17147
  "transform": [
15860
17148
  "trim"
15861
17149
  ]
15862
17150
  },
15863
17151
  {
15864
17152
  "type": "object",
17153
+ "additionalProperties": false,
15865
17154
  "properties": {
15866
- "path": {
17155
+ "$schema": {
17156
+ "description": "Optional self-describing schema URI for linters",
15867
17157
  "type": "string",
15868
- "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
15869
- "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)",
17158
+ "format": "uri-reference"
17159
+ },
17160
+ "name": {
17161
+ "type": "string",
17162
+ "title": "Cookie name",
17163
+ "description": "Name of the specific cookie to save.",
17164
+ "pattern": "^[A-Za-z0-9_.-]+$",
17165
+ "transform": [
17166
+ "trim"
17167
+ ]
17168
+ },
17169
+ "variable": {
17170
+ "type": "string",
17171
+ "title": "Environment variable name",
17172
+ "description": "Environment variable name to store the cookie as JSON string.",
17173
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17174
+ "transform": [
17175
+ "trim"
17176
+ ]
17177
+ },
17178
+ "path": {
17179
+ "type": "string",
17180
+ "title": "Cookie file path",
17181
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
17182
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
17183
+ "transform": [
17184
+ "trim"
17185
+ ]
17186
+ },
17187
+ "directory": {
17188
+ "type": "string",
17189
+ "title": "Directory path",
17190
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
17191
+ "transform": [
17192
+ "trim"
17193
+ ]
17194
+ },
17195
+ "overwrite": {
17196
+ "type": "boolean",
17197
+ "title": "Overwrite existing file",
17198
+ "description": "Whether to overwrite existing cookie file.",
17199
+ "default": false
17200
+ },
17201
+ "domain": {
17202
+ "type": "string",
17203
+ "title": "Cookie domain",
17204
+ "description": "Specific domain to filter the cookie by (optional).",
17205
+ "transform": [
17206
+ "trim"
17207
+ ]
17208
+ }
17209
+ },
17210
+ "required": [
17211
+ "name"
17212
+ ],
17213
+ "anyOf": [
17214
+ {
17215
+ "required": [
17216
+ "path"
17217
+ ],
17218
+ "not": {
17219
+ "required": [
17220
+ "variable"
17221
+ ]
17222
+ }
17223
+ },
17224
+ {
17225
+ "required": [
17226
+ "variable"
17227
+ ],
17228
+ "not": {
17229
+ "anyOf": [
17230
+ {
17231
+ "required": [
17232
+ "path"
17233
+ ]
17234
+ },
17235
+ {
17236
+ "required": [
17237
+ "directory"
17238
+ ]
17239
+ },
17240
+ {
17241
+ "required": [
17242
+ "overwrite"
17243
+ ]
17244
+ }
17245
+ ]
17246
+ }
17247
+ }
17248
+ ],
17249
+ "title": "Save cookie (detailed)"
17250
+ }
17251
+ ],
17252
+ "components": {
17253
+ "schemas": {
17254
+ "string": {
17255
+ "type": "string",
17256
+ "title": "Cookie name",
17257
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
17258
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17259
+ "transform": [
17260
+ "trim"
17261
+ ]
17262
+ },
17263
+ "object": {
17264
+ "type": "object",
17265
+ "additionalProperties": false,
17266
+ "properties": {
17267
+ "$schema": {
17268
+ "description": "Optional self-describing schema URI for linters",
17269
+ "type": "string",
17270
+ "format": "uri-reference"
17271
+ },
17272
+ "name": {
17273
+ "type": "string",
17274
+ "title": "Cookie name",
17275
+ "description": "Name of the specific cookie to save.",
17276
+ "pattern": "^[A-Za-z0-9_.-]+$",
17277
+ "transform": [
17278
+ "trim"
17279
+ ]
17280
+ },
17281
+ "variable": {
17282
+ "type": "string",
17283
+ "title": "Environment variable name",
17284
+ "description": "Environment variable name to store the cookie as JSON string.",
17285
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17286
+ "transform": [
17287
+ "trim"
17288
+ ]
17289
+ },
17290
+ "path": {
17291
+ "type": "string",
17292
+ "title": "Cookie file path",
17293
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
17294
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
17295
+ "transform": [
17296
+ "trim"
17297
+ ]
17298
+ },
17299
+ "directory": {
17300
+ "type": "string",
17301
+ "title": "Directory path",
17302
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
17303
+ "transform": [
17304
+ "trim"
17305
+ ]
17306
+ },
17307
+ "overwrite": {
17308
+ "type": "boolean",
17309
+ "title": "Overwrite existing file",
17310
+ "description": "Whether to overwrite existing cookie file.",
17311
+ "default": false
17312
+ },
17313
+ "domain": {
17314
+ "type": "string",
17315
+ "title": "Cookie domain",
17316
+ "description": "Specific domain to filter the cookie by (optional).",
17317
+ "transform": [
17318
+ "trim"
17319
+ ]
17320
+ }
17321
+ },
17322
+ "required": [
17323
+ "name"
17324
+ ],
17325
+ "anyOf": [
17326
+ {
17327
+ "required": [
17328
+ "path"
17329
+ ],
17330
+ "not": {
17331
+ "required": [
17332
+ "variable"
17333
+ ]
17334
+ }
17335
+ },
17336
+ {
17337
+ "required": [
17338
+ "variable"
17339
+ ],
17340
+ "not": {
17341
+ "anyOf": [
17342
+ {
17343
+ "required": [
17344
+ "path"
17345
+ ]
17346
+ },
17347
+ {
17348
+ "required": [
17349
+ "directory"
17350
+ ]
17351
+ },
17352
+ {
17353
+ "required": [
17354
+ "overwrite"
17355
+ ]
17356
+ }
17357
+ ]
17358
+ }
17359
+ }
17360
+ ],
17361
+ "title": "Save cookie (detailed)"
17362
+ }
17363
+ }
17364
+ },
17365
+ "examples": [
17366
+ "session_token",
17367
+ {
17368
+ "name": "auth_cookie",
17369
+ "path": "auth-cookie.txt"
17370
+ },
17371
+ {
17372
+ "name": "session_token",
17373
+ "variable": "SESSION_TOKEN"
17374
+ },
17375
+ {
17376
+ "name": "user_session",
17377
+ "path": "user-session.txt",
17378
+ "directory": "./test-data",
17379
+ "overwrite": true
17380
+ },
17381
+ {
17382
+ "name": "login_token",
17383
+ "path": "login-token.txt",
17384
+ "domain": "app.example.com"
17385
+ }
17386
+ ]
17387
+ }
17388
+ },
17389
+ "title": "saveCookie"
17390
+ }
17391
+ ]
17392
+ },
17393
+ {
17394
+ "allOf": [
17395
+ {
17396
+ "type": "object",
17397
+ "dynamicDefaults": {
17398
+ "stepId": "uuid"
17399
+ },
17400
+ "properties": {
17401
+ "$schema": {
17402
+ "description": "JSON Schema for this object.",
17403
+ "type": "string",
17404
+ "enum": [
17405
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
17406
+ ]
17407
+ },
17408
+ "stepId": {
17409
+ "type": "string",
17410
+ "description": "ID of the step."
17411
+ },
17412
+ "description": {
17413
+ "type": "string",
17414
+ "description": "Description of the step."
17415
+ },
17416
+ "unsafe": {
17417
+ "type": "boolean",
17418
+ "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.",
17419
+ "default": false
17420
+ },
17421
+ "outputs": {
17422
+ "type": "object",
17423
+ "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.",
17424
+ "default": {},
17425
+ "patternProperties": {
17426
+ "^[A-Za-z0-9_]+$": {
17427
+ "type": "string",
17428
+ "description": "Runtime expression for a user-defined output value."
17429
+ }
17430
+ },
17431
+ "title": "Outputs (step)"
17432
+ },
17433
+ "variables": {
17434
+ "type": "object",
17435
+ "description": "Environment variables to set from user-defined expressions.",
17436
+ "default": {},
17437
+ "patternProperties": {
17438
+ "^[A-Za-z0-9_]+$": {
17439
+ "type": "string",
17440
+ "description": "Runtime expression for a user-defined output value."
17441
+ }
17442
+ },
17443
+ "title": "Variables (step)"
17444
+ },
17445
+ "breakpoint": {
17446
+ "type": "boolean",
17447
+ "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.",
17448
+ "default": false
17449
+ }
17450
+ },
17451
+ "title": "Common"
17452
+ },
17453
+ {
17454
+ "type": "object",
17455
+ "required": [
17456
+ "record"
17457
+ ],
17458
+ "properties": {
17459
+ "record": {
17460
+ "$schema": "http://json-schema.org/draft-07/schema#",
17461
+ "title": "record",
17462
+ "description": "Start recording the current browser viewport. Must be followed by a `stopRecord` step. Only runs in Chrome browsers when they are visible. Supported extensions: [ '.mp4', '.webm', '.gif' ]",
17463
+ "anyOf": [
17464
+ {
17465
+ "title": "Record (simple)",
17466
+ "type": "string",
17467
+ "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
17468
+ "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)",
17469
+ "transform": [
17470
+ "trim"
17471
+ ]
17472
+ },
17473
+ {
17474
+ "type": "object",
17475
+ "properties": {
17476
+ "path": {
17477
+ "type": "string",
17478
+ "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
17479
+ "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)",
15870
17480
  "transform": [
15871
17481
  "trim"
15872
17482
  ]
@@ -16178,17 +17788,313 @@
16178
17788
  "title": "Common"
16179
17789
  },
16180
17790
  {
16181
- "title": "wait",
17791
+ "title": "loadCookie",
16182
17792
  "type": "object",
16183
17793
  "required": [
16184
- "wait"
17794
+ "loadCookie"
16185
17795
  ],
16186
17796
  "properties": {
16187
- "wait": {
17797
+ "loadCookie": {
16188
17798
  "$schema": "http://json-schema.org/draft-07/schema#",
16189
- "title": "wait",
16190
- "description": "Pause (in milliseconds) before performing the next action.",
16191
- "default": 5000,
17799
+ "title": "loadCookie",
17800
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
17801
+ "anyOf": [
17802
+ {
17803
+ "type": "string",
17804
+ "title": "Cookie name or file path",
17805
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
17806
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17807
+ "transform": [
17808
+ "trim"
17809
+ ]
17810
+ },
17811
+ {
17812
+ "type": "object",
17813
+ "additionalProperties": false,
17814
+ "required": [
17815
+ "name"
17816
+ ],
17817
+ "anyOf": [
17818
+ {
17819
+ "required": [
17820
+ "path"
17821
+ ],
17822
+ "not": {
17823
+ "required": [
17824
+ "variable"
17825
+ ]
17826
+ }
17827
+ },
17828
+ {
17829
+ "required": [
17830
+ "variable"
17831
+ ],
17832
+ "not": {
17833
+ "anyOf": [
17834
+ {
17835
+ "required": [
17836
+ "path"
17837
+ ]
17838
+ },
17839
+ {
17840
+ "required": [
17841
+ "directory"
17842
+ ]
17843
+ }
17844
+ ]
17845
+ }
17846
+ }
17847
+ ],
17848
+ "properties": {
17849
+ "$schema": {
17850
+ "description": "Optional self-describing schema URI for linters",
17851
+ "type": "string",
17852
+ "format": "uri-reference"
17853
+ },
17854
+ "name": {
17855
+ "type": "string",
17856
+ "title": "Cookie name",
17857
+ "description": "Name of the specific cookie to load.",
17858
+ "pattern": "^[A-Za-z0-9_.-]+$",
17859
+ "transform": [
17860
+ "trim"
17861
+ ]
17862
+ },
17863
+ "variable": {
17864
+ "type": "string",
17865
+ "title": "Environment variable name",
17866
+ "description": "Environment variable name containing the cookie as JSON string.",
17867
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17868
+ "transform": [
17869
+ "trim"
17870
+ ]
17871
+ },
17872
+ "path": {
17873
+ "type": "string",
17874
+ "title": "Cookie file path",
17875
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
17876
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
17877
+ "transform": [
17878
+ "trim"
17879
+ ]
17880
+ },
17881
+ "directory": {
17882
+ "type": "string",
17883
+ "title": "Directory path",
17884
+ "description": "Directory containing the cookie file.",
17885
+ "transform": [
17886
+ "trim"
17887
+ ]
17888
+ },
17889
+ "domain": {
17890
+ "type": "string",
17891
+ "title": "Cookie domain",
17892
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
17893
+ "transform": [
17894
+ "trim"
17895
+ ]
17896
+ }
17897
+ },
17898
+ "title": "Load cookie (detailed)"
17899
+ }
17900
+ ],
17901
+ "components": {
17902
+ "schemas": {
17903
+ "string": {
17904
+ "type": "string",
17905
+ "title": "Cookie name or file path",
17906
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
17907
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
17908
+ "transform": [
17909
+ "trim"
17910
+ ]
17911
+ },
17912
+ "object": {
17913
+ "type": "object",
17914
+ "additionalProperties": false,
17915
+ "required": [
17916
+ "name"
17917
+ ],
17918
+ "anyOf": [
17919
+ {
17920
+ "required": [
17921
+ "path"
17922
+ ],
17923
+ "not": {
17924
+ "required": [
17925
+ "variable"
17926
+ ]
17927
+ }
17928
+ },
17929
+ {
17930
+ "required": [
17931
+ "variable"
17932
+ ],
17933
+ "not": {
17934
+ "anyOf": [
17935
+ {
17936
+ "required": [
17937
+ "path"
17938
+ ]
17939
+ },
17940
+ {
17941
+ "required": [
17942
+ "directory"
17943
+ ]
17944
+ }
17945
+ ]
17946
+ }
17947
+ }
17948
+ ],
17949
+ "properties": {
17950
+ "$schema": {
17951
+ "description": "Optional self-describing schema URI for linters",
17952
+ "type": "string",
17953
+ "format": "uri-reference"
17954
+ },
17955
+ "name": {
17956
+ "type": "string",
17957
+ "title": "Cookie name",
17958
+ "description": "Name of the specific cookie to load.",
17959
+ "pattern": "^[A-Za-z0-9_.-]+$",
17960
+ "transform": [
17961
+ "trim"
17962
+ ]
17963
+ },
17964
+ "variable": {
17965
+ "type": "string",
17966
+ "title": "Environment variable name",
17967
+ "description": "Environment variable name containing the cookie as JSON string.",
17968
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
17969
+ "transform": [
17970
+ "trim"
17971
+ ]
17972
+ },
17973
+ "path": {
17974
+ "type": "string",
17975
+ "title": "Cookie file path",
17976
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
17977
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
17978
+ "transform": [
17979
+ "trim"
17980
+ ]
17981
+ },
17982
+ "directory": {
17983
+ "type": "string",
17984
+ "title": "Directory path",
17985
+ "description": "Directory containing the cookie file.",
17986
+ "transform": [
17987
+ "trim"
17988
+ ]
17989
+ },
17990
+ "domain": {
17991
+ "type": "string",
17992
+ "title": "Cookie domain",
17993
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
17994
+ "transform": [
17995
+ "trim"
17996
+ ]
17997
+ }
17998
+ },
17999
+ "title": "Load cookie (detailed)"
18000
+ }
18001
+ }
18002
+ },
18003
+ "examples": [
18004
+ "session_token",
18005
+ "./test-data/auth-session.txt",
18006
+ {
18007
+ "name": "auth_cookie",
18008
+ "variable": "AUTH_COOKIE"
18009
+ },
18010
+ {
18011
+ "name": "session_token",
18012
+ "path": "session-token.txt",
18013
+ "directory": "./test-data"
18014
+ },
18015
+ {
18016
+ "name": "user_session",
18017
+ "path": "saved-cookies.txt",
18018
+ "domain": "app.example.com"
18019
+ }
18020
+ ]
18021
+ }
18022
+ }
18023
+ }
18024
+ ]
18025
+ },
18026
+ {
18027
+ "allOf": [
18028
+ {
18029
+ "type": "object",
18030
+ "dynamicDefaults": {
18031
+ "stepId": "uuid"
18032
+ },
18033
+ "properties": {
18034
+ "$schema": {
18035
+ "description": "JSON Schema for this object.",
18036
+ "type": "string",
18037
+ "enum": [
18038
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
18039
+ ]
18040
+ },
18041
+ "stepId": {
18042
+ "type": "string",
18043
+ "description": "ID of the step."
18044
+ },
18045
+ "description": {
18046
+ "type": "string",
18047
+ "description": "Description of the step."
18048
+ },
18049
+ "unsafe": {
18050
+ "type": "boolean",
18051
+ "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.",
18052
+ "default": false
18053
+ },
18054
+ "outputs": {
18055
+ "type": "object",
18056
+ "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.",
18057
+ "default": {},
18058
+ "patternProperties": {
18059
+ "^[A-Za-z0-9_]+$": {
18060
+ "type": "string",
18061
+ "description": "Runtime expression for a user-defined output value."
18062
+ }
18063
+ },
18064
+ "title": "Outputs (step)"
18065
+ },
18066
+ "variables": {
18067
+ "type": "object",
18068
+ "description": "Environment variables to set from user-defined expressions.",
18069
+ "default": {},
18070
+ "patternProperties": {
18071
+ "^[A-Za-z0-9_]+$": {
18072
+ "type": "string",
18073
+ "description": "Runtime expression for a user-defined output value."
18074
+ }
18075
+ },
18076
+ "title": "Variables (step)"
18077
+ },
18078
+ "breakpoint": {
18079
+ "type": "boolean",
18080
+ "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.",
18081
+ "default": false
18082
+ }
18083
+ },
18084
+ "title": "Common"
18085
+ },
18086
+ {
18087
+ "title": "wait",
18088
+ "type": "object",
18089
+ "required": [
18090
+ "wait"
18091
+ ],
18092
+ "properties": {
18093
+ "wait": {
18094
+ "$schema": "http://json-schema.org/draft-07/schema#",
18095
+ "title": "wait",
18096
+ "description": "Pause (in milliseconds) before performing the next action.",
18097
+ "default": 5000,
16192
18098
  "anyOf": [
16193
18099
  {
16194
18100
  "type": "number",
@@ -16356,6 +18262,27 @@
16356
18262
  {
16357
18263
  "loadVariables": "variables.env"
16358
18264
  },
18265
+ {
18266
+ "saveCookie": "session_token"
18267
+ },
18268
+ {
18269
+ "saveCookie": {
18270
+ "name": "auth_cookie",
18271
+ "path": "auth-session.txt",
18272
+ "directory": "./test-data",
18273
+ "overwrite": true
18274
+ }
18275
+ },
18276
+ {
18277
+ "loadCookie": "session_token"
18278
+ },
18279
+ {
18280
+ "loadCookie": {
18281
+ "name": "auth_cookie",
18282
+ "path": "auth-session.txt",
18283
+ "directory": "./test-data"
18284
+ }
18285
+ },
16359
18286
  {
16360
18287
  "find": "Find me!"
16361
18288
  },
@@ -20566,38 +22493,360 @@
20566
22493
  "static/images/image.png",
20567
22494
  "/User/manny/projects/doc-detective/static/images/image.png",
20568
22495
  {
20569
- "path": "image.png",
20570
- "directory": "static/images",
20571
- "maxVariation": 0.1,
20572
- "overwrite": "aboveVariation",
20573
- "crop": "#elementToScreenshot"
22496
+ "path": "image.png",
22497
+ "directory": "static/images",
22498
+ "maxVariation": 0.1,
22499
+ "overwrite": "aboveVariation",
22500
+ "crop": "#elementToScreenshot"
22501
+ },
22502
+ {
22503
+ "path": "image.png",
22504
+ "directory": "static/images",
22505
+ "maxVariation": 0.1,
22506
+ "overwrite": "aboveVariation"
22507
+ },
22508
+ {
22509
+ "path": "image.png",
22510
+ "directory": "static/images",
22511
+ "maxVariation": 0.1,
22512
+ "overwrite": "aboveVariation",
22513
+ "crop": {
22514
+ "selector": "#elementToScreenshot",
22515
+ "elementText": "Element text",
22516
+ "padding": {
22517
+ "top": 0,
22518
+ "right": 0,
22519
+ "bottom": 0,
22520
+ "left": 0
22521
+ }
22522
+ }
22523
+ }
22524
+ ]
22525
+ }
22526
+ },
22527
+ "title": "screenshot"
22528
+ }
22529
+ ]
22530
+ },
22531
+ {
22532
+ "allOf": [
22533
+ {
22534
+ "type": "object",
22535
+ "dynamicDefaults": {
22536
+ "stepId": "uuid"
22537
+ },
22538
+ "properties": {
22539
+ "$schema": {
22540
+ "description": "JSON Schema for this object.",
22541
+ "type": "string",
22542
+ "enum": [
22543
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
22544
+ ]
22545
+ },
22546
+ "stepId": {
22547
+ "type": "string",
22548
+ "description": "ID of the step."
22549
+ },
22550
+ "description": {
22551
+ "type": "string",
22552
+ "description": "Description of the step."
22553
+ },
22554
+ "unsafe": {
22555
+ "type": "boolean",
22556
+ "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.",
22557
+ "default": false
22558
+ },
22559
+ "outputs": {
22560
+ "type": "object",
22561
+ "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.",
22562
+ "default": {},
22563
+ "patternProperties": {
22564
+ "^[A-Za-z0-9_]+$": {
22565
+ "type": "string",
22566
+ "description": "Runtime expression for a user-defined output value."
22567
+ }
22568
+ },
22569
+ "title": "Outputs (step)"
22570
+ },
22571
+ "variables": {
22572
+ "type": "object",
22573
+ "description": "Environment variables to set from user-defined expressions.",
22574
+ "default": {},
22575
+ "patternProperties": {
22576
+ "^[A-Za-z0-9_]+$": {
22577
+ "type": "string",
22578
+ "description": "Runtime expression for a user-defined output value."
22579
+ }
22580
+ },
22581
+ "title": "Variables (step)"
22582
+ },
22583
+ "breakpoint": {
22584
+ "type": "boolean",
22585
+ "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.",
22586
+ "default": false
22587
+ }
22588
+ },
22589
+ "title": "Common"
22590
+ },
22591
+ {
22592
+ "type": "object",
22593
+ "required": [
22594
+ "saveCookie"
22595
+ ],
22596
+ "properties": {
22597
+ "saveCookie": {
22598
+ "$schema": "http://json-schema.org/draft-07/schema#",
22599
+ "title": "saveCookie",
22600
+ "description": "Save a specific browser cookie to a file or environment variable for later reuse.",
22601
+ "anyOf": [
22602
+ {
22603
+ "type": "string",
22604
+ "title": "Cookie name",
22605
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
22606
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
22607
+ "transform": [
22608
+ "trim"
22609
+ ]
22610
+ },
22611
+ {
22612
+ "type": "object",
22613
+ "additionalProperties": false,
22614
+ "properties": {
22615
+ "$schema": {
22616
+ "description": "Optional self-describing schema URI for linters",
22617
+ "type": "string",
22618
+ "format": "uri-reference"
22619
+ },
22620
+ "name": {
22621
+ "type": "string",
22622
+ "title": "Cookie name",
22623
+ "description": "Name of the specific cookie to save.",
22624
+ "pattern": "^[A-Za-z0-9_.-]+$",
22625
+ "transform": [
22626
+ "trim"
22627
+ ]
22628
+ },
22629
+ "variable": {
22630
+ "type": "string",
22631
+ "title": "Environment variable name",
22632
+ "description": "Environment variable name to store the cookie as JSON string.",
22633
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
22634
+ "transform": [
22635
+ "trim"
22636
+ ]
22637
+ },
22638
+ "path": {
22639
+ "type": "string",
22640
+ "title": "Cookie file path",
22641
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
22642
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
22643
+ "transform": [
22644
+ "trim"
22645
+ ]
22646
+ },
22647
+ "directory": {
22648
+ "type": "string",
22649
+ "title": "Directory path",
22650
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
22651
+ "transform": [
22652
+ "trim"
22653
+ ]
22654
+ },
22655
+ "overwrite": {
22656
+ "type": "boolean",
22657
+ "title": "Overwrite existing file",
22658
+ "description": "Whether to overwrite existing cookie file.",
22659
+ "default": false
22660
+ },
22661
+ "domain": {
22662
+ "type": "string",
22663
+ "title": "Cookie domain",
22664
+ "description": "Specific domain to filter the cookie by (optional).",
22665
+ "transform": [
22666
+ "trim"
22667
+ ]
22668
+ }
22669
+ },
22670
+ "required": [
22671
+ "name"
22672
+ ],
22673
+ "anyOf": [
22674
+ {
22675
+ "required": [
22676
+ "path"
22677
+ ],
22678
+ "not": {
22679
+ "required": [
22680
+ "variable"
22681
+ ]
22682
+ }
22683
+ },
22684
+ {
22685
+ "required": [
22686
+ "variable"
22687
+ ],
22688
+ "not": {
22689
+ "anyOf": [
22690
+ {
22691
+ "required": [
22692
+ "path"
22693
+ ]
22694
+ },
22695
+ {
22696
+ "required": [
22697
+ "directory"
22698
+ ]
22699
+ },
22700
+ {
22701
+ "required": [
22702
+ "overwrite"
22703
+ ]
22704
+ }
22705
+ ]
22706
+ }
22707
+ }
22708
+ ],
22709
+ "title": "Save cookie (detailed)"
22710
+ }
22711
+ ],
22712
+ "components": {
22713
+ "schemas": {
22714
+ "string": {
22715
+ "type": "string",
22716
+ "title": "Cookie name",
22717
+ "description": "Name of the specific cookie to save. Will be saved to a default file path or environment variable.",
22718
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
22719
+ "transform": [
22720
+ "trim"
22721
+ ]
22722
+ },
22723
+ "object": {
22724
+ "type": "object",
22725
+ "additionalProperties": false,
22726
+ "properties": {
22727
+ "$schema": {
22728
+ "description": "Optional self-describing schema URI for linters",
22729
+ "type": "string",
22730
+ "format": "uri-reference"
22731
+ },
22732
+ "name": {
22733
+ "type": "string",
22734
+ "title": "Cookie name",
22735
+ "description": "Name of the specific cookie to save.",
22736
+ "pattern": "^[A-Za-z0-9_.-]+$",
22737
+ "transform": [
22738
+ "trim"
22739
+ ]
22740
+ },
22741
+ "variable": {
22742
+ "type": "string",
22743
+ "title": "Environment variable name",
22744
+ "description": "Environment variable name to store the cookie as JSON string.",
22745
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
22746
+ "transform": [
22747
+ "trim"
22748
+ ]
22749
+ },
22750
+ "path": {
22751
+ "type": "string",
22752
+ "title": "Cookie file path",
22753
+ "description": "File path to save the cookie, relative to directory. Uses Netscape cookie format.",
22754
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
22755
+ "transform": [
22756
+ "trim"
22757
+ ]
22758
+ },
22759
+ "directory": {
22760
+ "type": "string",
22761
+ "title": "Directory path",
22762
+ "description": "Directory to save the cookie file. If not specified, uses output directory.",
22763
+ "transform": [
22764
+ "trim"
22765
+ ]
22766
+ },
22767
+ "overwrite": {
22768
+ "type": "boolean",
22769
+ "title": "Overwrite existing file",
22770
+ "description": "Whether to overwrite existing cookie file.",
22771
+ "default": false
22772
+ },
22773
+ "domain": {
22774
+ "type": "string",
22775
+ "title": "Cookie domain",
22776
+ "description": "Specific domain to filter the cookie by (optional).",
22777
+ "transform": [
22778
+ "trim"
22779
+ ]
22780
+ }
22781
+ },
22782
+ "required": [
22783
+ "name"
22784
+ ],
22785
+ "anyOf": [
22786
+ {
22787
+ "required": [
22788
+ "path"
22789
+ ],
22790
+ "not": {
22791
+ "required": [
22792
+ "variable"
22793
+ ]
22794
+ }
22795
+ },
22796
+ {
22797
+ "required": [
22798
+ "variable"
22799
+ ],
22800
+ "not": {
22801
+ "anyOf": [
22802
+ {
22803
+ "required": [
22804
+ "path"
22805
+ ]
22806
+ },
22807
+ {
22808
+ "required": [
22809
+ "directory"
22810
+ ]
22811
+ },
22812
+ {
22813
+ "required": [
22814
+ "overwrite"
22815
+ ]
22816
+ }
22817
+ ]
22818
+ }
22819
+ }
22820
+ ],
22821
+ "title": "Save cookie (detailed)"
22822
+ }
22823
+ }
22824
+ },
22825
+ "examples": [
22826
+ "session_token",
22827
+ {
22828
+ "name": "auth_cookie",
22829
+ "path": "auth-cookie.txt"
22830
+ },
22831
+ {
22832
+ "name": "session_token",
22833
+ "variable": "SESSION_TOKEN"
20574
22834
  },
20575
22835
  {
20576
- "path": "image.png",
20577
- "directory": "static/images",
20578
- "maxVariation": 0.1,
20579
- "overwrite": "aboveVariation"
22836
+ "name": "user_session",
22837
+ "path": "user-session.txt",
22838
+ "directory": "./test-data",
22839
+ "overwrite": true
20580
22840
  },
20581
22841
  {
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
- }
22842
+ "name": "login_token",
22843
+ "path": "login-token.txt",
22844
+ "domain": "app.example.com"
20596
22845
  }
20597
22846
  ]
20598
22847
  }
20599
22848
  },
20600
- "title": "screenshot"
22849
+ "title": "saveCookie"
20601
22850
  }
20602
22851
  ]
20603
22852
  },
@@ -20938,6 +23187,302 @@
20938
23187
  }
20939
23188
  ]
20940
23189
  },
23190
+ {
23191
+ "allOf": [
23192
+ {
23193
+ "type": "object",
23194
+ "dynamicDefaults": {
23195
+ "stepId": "uuid"
23196
+ },
23197
+ "properties": {
23198
+ "$schema": {
23199
+ "description": "JSON Schema for this object.",
23200
+ "type": "string",
23201
+ "enum": [
23202
+ "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json"
23203
+ ]
23204
+ },
23205
+ "stepId": {
23206
+ "type": "string",
23207
+ "description": "ID of the step."
23208
+ },
23209
+ "description": {
23210
+ "type": "string",
23211
+ "description": "Description of the step."
23212
+ },
23213
+ "unsafe": {
23214
+ "type": "boolean",
23215
+ "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.",
23216
+ "default": false
23217
+ },
23218
+ "outputs": {
23219
+ "type": "object",
23220
+ "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.",
23221
+ "default": {},
23222
+ "patternProperties": {
23223
+ "^[A-Za-z0-9_]+$": {
23224
+ "type": "string",
23225
+ "description": "Runtime expression for a user-defined output value."
23226
+ }
23227
+ },
23228
+ "title": "Outputs (step)"
23229
+ },
23230
+ "variables": {
23231
+ "type": "object",
23232
+ "description": "Environment variables to set from user-defined expressions.",
23233
+ "default": {},
23234
+ "patternProperties": {
23235
+ "^[A-Za-z0-9_]+$": {
23236
+ "type": "string",
23237
+ "description": "Runtime expression for a user-defined output value."
23238
+ }
23239
+ },
23240
+ "title": "Variables (step)"
23241
+ },
23242
+ "breakpoint": {
23243
+ "type": "boolean",
23244
+ "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.",
23245
+ "default": false
23246
+ }
23247
+ },
23248
+ "title": "Common"
23249
+ },
23250
+ {
23251
+ "title": "loadCookie",
23252
+ "type": "object",
23253
+ "required": [
23254
+ "loadCookie"
23255
+ ],
23256
+ "properties": {
23257
+ "loadCookie": {
23258
+ "$schema": "http://json-schema.org/draft-07/schema#",
23259
+ "title": "loadCookie",
23260
+ "description": "Load a specific cookie from a file or environment variable into the browser.",
23261
+ "anyOf": [
23262
+ {
23263
+ "type": "string",
23264
+ "title": "Cookie name or file path",
23265
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
23266
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
23267
+ "transform": [
23268
+ "trim"
23269
+ ]
23270
+ },
23271
+ {
23272
+ "type": "object",
23273
+ "additionalProperties": false,
23274
+ "required": [
23275
+ "name"
23276
+ ],
23277
+ "anyOf": [
23278
+ {
23279
+ "required": [
23280
+ "path"
23281
+ ],
23282
+ "not": {
23283
+ "required": [
23284
+ "variable"
23285
+ ]
23286
+ }
23287
+ },
23288
+ {
23289
+ "required": [
23290
+ "variable"
23291
+ ],
23292
+ "not": {
23293
+ "anyOf": [
23294
+ {
23295
+ "required": [
23296
+ "path"
23297
+ ]
23298
+ },
23299
+ {
23300
+ "required": [
23301
+ "directory"
23302
+ ]
23303
+ }
23304
+ ]
23305
+ }
23306
+ }
23307
+ ],
23308
+ "properties": {
23309
+ "$schema": {
23310
+ "description": "Optional self-describing schema URI for linters",
23311
+ "type": "string",
23312
+ "format": "uri-reference"
23313
+ },
23314
+ "name": {
23315
+ "type": "string",
23316
+ "title": "Cookie name",
23317
+ "description": "Name of the specific cookie to load.",
23318
+ "pattern": "^[A-Za-z0-9_.-]+$",
23319
+ "transform": [
23320
+ "trim"
23321
+ ]
23322
+ },
23323
+ "variable": {
23324
+ "type": "string",
23325
+ "title": "Environment variable name",
23326
+ "description": "Environment variable name containing the cookie as JSON string.",
23327
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
23328
+ "transform": [
23329
+ "trim"
23330
+ ]
23331
+ },
23332
+ "path": {
23333
+ "type": "string",
23334
+ "title": "Cookie file path",
23335
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
23336
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
23337
+ "transform": [
23338
+ "trim"
23339
+ ]
23340
+ },
23341
+ "directory": {
23342
+ "type": "string",
23343
+ "title": "Directory path",
23344
+ "description": "Directory containing the cookie file.",
23345
+ "transform": [
23346
+ "trim"
23347
+ ]
23348
+ },
23349
+ "domain": {
23350
+ "type": "string",
23351
+ "title": "Cookie domain",
23352
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
23353
+ "transform": [
23354
+ "trim"
23355
+ ]
23356
+ }
23357
+ },
23358
+ "title": "Load cookie (detailed)"
23359
+ }
23360
+ ],
23361
+ "components": {
23362
+ "schemas": {
23363
+ "string": {
23364
+ "type": "string",
23365
+ "title": "Cookie name or file path",
23366
+ "description": "Name of the specific cookie to load from default location, or file path to cookie file.",
23367
+ "pattern": "^[A-Za-z0-9_./\\-]+$",
23368
+ "transform": [
23369
+ "trim"
23370
+ ]
23371
+ },
23372
+ "object": {
23373
+ "type": "object",
23374
+ "additionalProperties": false,
23375
+ "required": [
23376
+ "name"
23377
+ ],
23378
+ "anyOf": [
23379
+ {
23380
+ "required": [
23381
+ "path"
23382
+ ],
23383
+ "not": {
23384
+ "required": [
23385
+ "variable"
23386
+ ]
23387
+ }
23388
+ },
23389
+ {
23390
+ "required": [
23391
+ "variable"
23392
+ ],
23393
+ "not": {
23394
+ "anyOf": [
23395
+ {
23396
+ "required": [
23397
+ "path"
23398
+ ]
23399
+ },
23400
+ {
23401
+ "required": [
23402
+ "directory"
23403
+ ]
23404
+ }
23405
+ ]
23406
+ }
23407
+ }
23408
+ ],
23409
+ "properties": {
23410
+ "$schema": {
23411
+ "description": "Optional self-describing schema URI for linters",
23412
+ "type": "string",
23413
+ "format": "uri-reference"
23414
+ },
23415
+ "name": {
23416
+ "type": "string",
23417
+ "title": "Cookie name",
23418
+ "description": "Name of the specific cookie to load.",
23419
+ "pattern": "^[A-Za-z0-9_.-]+$",
23420
+ "transform": [
23421
+ "trim"
23422
+ ]
23423
+ },
23424
+ "variable": {
23425
+ "type": "string",
23426
+ "title": "Environment variable name",
23427
+ "description": "Environment variable name containing the cookie as JSON string.",
23428
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
23429
+ "transform": [
23430
+ "trim"
23431
+ ]
23432
+ },
23433
+ "path": {
23434
+ "type": "string",
23435
+ "title": "Cookie file path",
23436
+ "description": "File path to cookie file, relative to directory. Supports Netscape cookie format.",
23437
+ "pattern": "^(?:[A-Za-z0-9_.-]+\\.(?:txt|cookies)|\\$[A-Za-z_][A-Za-z0-9_]*)$",
23438
+ "transform": [
23439
+ "trim"
23440
+ ]
23441
+ },
23442
+ "directory": {
23443
+ "type": "string",
23444
+ "title": "Directory path",
23445
+ "description": "Directory containing the cookie file.",
23446
+ "transform": [
23447
+ "trim"
23448
+ ]
23449
+ },
23450
+ "domain": {
23451
+ "type": "string",
23452
+ "title": "Cookie domain",
23453
+ "description": "Specific domain to filter the cookie by when loading from multi-cookie file (optional).",
23454
+ "transform": [
23455
+ "trim"
23456
+ ]
23457
+ }
23458
+ },
23459
+ "title": "Load cookie (detailed)"
23460
+ }
23461
+ }
23462
+ },
23463
+ "examples": [
23464
+ "session_token",
23465
+ "./test-data/auth-session.txt",
23466
+ {
23467
+ "name": "auth_cookie",
23468
+ "variable": "AUTH_COOKIE"
23469
+ },
23470
+ {
23471
+ "name": "session_token",
23472
+ "path": "session-token.txt",
23473
+ "directory": "./test-data"
23474
+ },
23475
+ {
23476
+ "name": "user_session",
23477
+ "path": "saved-cookies.txt",
23478
+ "domain": "app.example.com"
23479
+ }
23480
+ ]
23481
+ }
23482
+ }
23483
+ }
23484
+ ]
23485
+ },
20941
23486
  {
20942
23487
  "allOf": [
20943
23488
  {
@@ -21177,6 +23722,27 @@
21177
23722
  {
21178
23723
  "loadVariables": "variables.env"
21179
23724
  },
23725
+ {
23726
+ "saveCookie": "session_token"
23727
+ },
23728
+ {
23729
+ "saveCookie": {
23730
+ "name": "auth_cookie",
23731
+ "path": "auth-session.txt",
23732
+ "directory": "./test-data",
23733
+ "overwrite": true
23734
+ }
23735
+ },
23736
+ {
23737
+ "loadCookie": "session_token"
23738
+ },
23739
+ {
23740
+ "loadCookie": {
23741
+ "name": "auth_cookie",
23742
+ "path": "auth-session.txt",
23743
+ "directory": "./test-data"
23744
+ }
23745
+ },
21180
23746
  {
21181
23747
  "find": "Find me!"
21182
23748
  },