@sonisoft/now-sdk-ext-cli 3.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +500 -164
  2. package/bin/credstore-boot.js +67 -0
  3. package/bin/dev.js +4 -0
  4. package/bin/run.js +4 -0
  5. package/dist/commands/auth/delete.d.ts +17 -0
  6. package/dist/commands/auth/delete.d.ts.map +1 -0
  7. package/dist/commands/auth/delete.js +34 -0
  8. package/dist/commands/auth/delete.js.map +1 -0
  9. package/dist/commands/auth/doctor.d.ts +23 -0
  10. package/dist/commands/auth/doctor.d.ts.map +1 -0
  11. package/dist/commands/auth/doctor.js +75 -0
  12. package/dist/commands/auth/doctor.js.map +1 -0
  13. package/dist/commands/auth/list.d.ts +15 -0
  14. package/dist/commands/auth/list.d.ts.map +1 -0
  15. package/dist/commands/auth/list.js +42 -0
  16. package/dist/commands/auth/list.js.map +1 -0
  17. package/dist/commands/auth/use.d.ts +16 -0
  18. package/dist/commands/auth/use.d.ts.map +1 -0
  19. package/dist/commands/auth/use.js +20 -0
  20. package/dist/commands/auth/use.js.map +1 -0
  21. package/dist/common/authenticated-command.d.ts +10 -0
  22. package/dist/common/authenticated-command.d.ts.map +1 -1
  23. package/dist/common/authenticated-command.js +65 -12
  24. package/dist/common/authenticated-command.js.map +1 -1
  25. package/dist/common/cred-store-flag.d.ts +17 -0
  26. package/dist/common/cred-store-flag.d.ts.map +1 -0
  27. package/dist/common/cred-store-flag.js +23 -0
  28. package/dist/common/cred-store-flag.js.map +1 -0
  29. package/dist/common/scope-autocomplete.d.ts.map +1 -1
  30. package/dist/common/scope-autocomplete.js +8 -0
  31. package/dist/common/scope-autocomplete.js.map +1 -1
  32. package/oclif.manifest.json +1627 -902
  33. package/package.json +3 -2
@@ -36,6 +36,14 @@
36
36
  "multiple": false,
37
37
  "type": "option"
38
38
  },
39
+ "cred-store": {
40
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
41
+ "helpGroup": "GLOBAL",
42
+ "name": "cred-store",
43
+ "required": false,
44
+ "allowNo": false,
45
+ "type": "boolean"
46
+ },
39
47
  "log-level": {
40
48
  "helpGroup": "GLOBAL",
41
49
  "name": "log-level",
@@ -123,6 +131,14 @@
123
131
  "multiple": false,
124
132
  "type": "option"
125
133
  },
134
+ "cred-store": {
135
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
136
+ "helpGroup": "GLOBAL",
137
+ "name": "cred-store",
138
+ "required": false,
139
+ "allowNo": false,
140
+ "type": "boolean"
141
+ },
126
142
  "log-level": {
127
143
  "helpGroup": "GLOBAL",
128
144
  "name": "log-level",
@@ -275,6 +291,14 @@
275
291
  "multiple": false,
276
292
  "type": "option"
277
293
  },
294
+ "cred-store": {
295
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
296
+ "helpGroup": "GLOBAL",
297
+ "name": "cred-store",
298
+ "required": false,
299
+ "allowNo": false,
300
+ "type": "boolean"
301
+ },
278
302
  "log-level": {
279
303
  "helpGroup": "GLOBAL",
280
304
  "name": "log-level",
@@ -366,191 +390,6 @@
366
390
  "query.js"
367
391
  ]
368
392
  },
369
- "atf": {
370
- "aliases": [],
371
- "args": {},
372
- "description": "Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\nThis command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines and automated testing workflows. You can execute individual tests, entire test suites, and configure execution parameters such as browser type, OS, and performance mode.\n\nFeatures:\n • Execute individual tests or complete test suites\n • Real-time progress monitoring\n • JSON output for CI/CD integration\n • Detailed test results and summaries\n • Browser and environment configuration\n • Performance testing mode support",
373
- "examples": [
374
- {
375
- "description": "Execute a single ATF test by sys_id",
376
- "command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
377
- },
378
- {
379
- "description": "Execute a test suite by sys_id and wait for completion",
380
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
381
- },
382
- {
383
- "description": "Execute a test suite by name",
384
- "command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
385
- },
386
- {
387
- "description": "Execute with specific browser configuration",
388
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
389
- },
390
- {
391
- "description": "Execute as performance test with JSON output for CI/CD",
392
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
393
- },
394
- {
395
- "description": "Execute with custom poll interval (10 seconds)",
396
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
397
- }
398
- ],
399
- "flags": {
400
- "json": {
401
- "char": "j",
402
- "description": "Output results as JSON",
403
- "name": "json",
404
- "required": false,
405
- "allowNo": false,
406
- "type": "boolean"
407
- },
408
- "auth": {
409
- "char": "a",
410
- "description": "Auth alias to use.",
411
- "name": "auth",
412
- "required": false,
413
- "hasDynamicHelp": false,
414
- "multiple": false,
415
- "type": "option"
416
- },
417
- "log-level": {
418
- "helpGroup": "GLOBAL",
419
- "name": "log-level",
420
- "summary": "Specify level for logging.",
421
- "default": "info",
422
- "hasDynamicHelp": false,
423
- "multiple": false,
424
- "options": [
425
- "debug",
426
- "warn",
427
- "error",
428
- "info",
429
- "trace"
430
- ],
431
- "type": "option"
432
- },
433
- "test-id": {
434
- "char": "t",
435
- "description": "Test sys_id to execute",
436
- "exclusive": [
437
- "suite-id",
438
- "suite-name"
439
- ],
440
- "name": "test-id",
441
- "required": false,
442
- "hasDynamicHelp": false,
443
- "multiple": false,
444
- "type": "option"
445
- },
446
- "suite-id": {
447
- "char": "s",
448
- "description": "Test Suite sys_id to execute",
449
- "exclusive": [
450
- "test-id",
451
- "suite-name"
452
- ],
453
- "name": "suite-id",
454
- "required": false,
455
- "hasDynamicHelp": false,
456
- "multiple": false,
457
- "type": "option"
458
- },
459
- "suite-name": {
460
- "char": "n",
461
- "description": "Test Suite name to execute",
462
- "exclusive": [
463
- "test-id",
464
- "suite-id"
465
- ],
466
- "name": "suite-name",
467
- "required": false,
468
- "hasDynamicHelp": false,
469
- "multiple": false,
470
- "type": "option"
471
- },
472
- "wait": {
473
- "char": "w",
474
- "description": "Wait for test suite execution to complete and return results",
475
- "name": "wait",
476
- "required": false,
477
- "allowNo": false,
478
- "type": "boolean"
479
- },
480
- "poll-interval": {
481
- "char": "p",
482
- "description": "Polling interval in milliseconds when waiting for completion",
483
- "name": "poll-interval",
484
- "required": false,
485
- "default": 5000,
486
- "hasDynamicHelp": false,
487
- "multiple": false,
488
- "type": "option"
489
- },
490
- "browser": {
491
- "char": "b",
492
- "description": "Browser name for test execution (e.g., chrome, firefox)",
493
- "name": "browser",
494
- "required": false,
495
- "hasDynamicHelp": false,
496
- "multiple": false,
497
- "type": "option"
498
- },
499
- "browser-version": {
500
- "description": "Browser version for test execution",
501
- "name": "browser-version",
502
- "required": false,
503
- "hasDynamicHelp": false,
504
- "multiple": false,
505
- "type": "option"
506
- },
507
- "os-name": {
508
- "description": "Operating system name for test execution",
509
- "name": "os-name",
510
- "required": false,
511
- "hasDynamicHelp": false,
512
- "multiple": false,
513
- "type": "option"
514
- },
515
- "os-version": {
516
- "description": "Operating system version for test execution",
517
- "name": "os-version",
518
- "required": false,
519
- "hasDynamicHelp": false,
520
- "multiple": false,
521
- "type": "option"
522
- },
523
- "performance": {
524
- "description": "Run as performance test",
525
- "name": "performance",
526
- "required": false,
527
- "allowNo": false,
528
- "type": "boolean"
529
- },
530
- "cloud": {
531
- "description": "Run in cloud",
532
- "name": "cloud",
533
- "required": false,
534
- "allowNo": false,
535
- "type": "boolean"
536
- }
537
- },
538
- "hasDynamicHelp": false,
539
- "hiddenAliases": [],
540
- "id": "atf",
541
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
542
- "pluginName": "@sonisoft/now-sdk-ext-cli",
543
- "pluginType": "core",
544
- "strict": true,
545
- "enableJsonFlag": true,
546
- "isESM": true,
547
- "relativePath": [
548
- "dist",
549
- "commands",
550
- "atf",
551
- "index.js"
552
- ]
553
- },
554
393
  "app": {
555
394
  "aliases": [],
556
395
  "args": {},
@@ -586,6 +425,14 @@
586
425
  "multiple": false,
587
426
  "type": "option"
588
427
  },
428
+ "cred-store": {
429
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
430
+ "helpGroup": "GLOBAL",
431
+ "name": "cred-store",
432
+ "required": false,
433
+ "allowNo": false,
434
+ "type": "boolean"
435
+ },
589
436
  "log-level": {
590
437
  "helpGroup": "GLOBAL",
591
438
  "name": "log-level",
@@ -680,6 +527,14 @@
680
527
  "multiple": false,
681
528
  "type": "option"
682
529
  },
530
+ "cred-store": {
531
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
532
+ "helpGroup": "GLOBAL",
533
+ "name": "cred-store",
534
+ "required": false,
535
+ "allowNo": false,
536
+ "type": "boolean"
537
+ },
683
538
  "log-level": {
684
539
  "helpGroup": "GLOBAL",
685
540
  "name": "log-level",
@@ -773,6 +628,14 @@
773
628
  "multiple": false,
774
629
  "type": "option"
775
630
  },
631
+ "cred-store": {
632
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
633
+ "helpGroup": "GLOBAL",
634
+ "name": "cred-store",
635
+ "required": false,
636
+ "allowNo": false,
637
+ "type": "boolean"
638
+ },
776
639
  "log-level": {
777
640
  "helpGroup": "GLOBAL",
778
641
  "name": "log-level",
@@ -895,6 +758,14 @@
895
758
  "multiple": false,
896
759
  "type": "option"
897
760
  },
761
+ "cred-store": {
762
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
763
+ "helpGroup": "GLOBAL",
764
+ "name": "cred-store",
765
+ "required": false,
766
+ "allowNo": false,
767
+ "type": "boolean"
768
+ },
898
769
  "log-level": {
899
770
  "helpGroup": "GLOBAL",
900
771
  "name": "log-level",
@@ -979,6 +850,14 @@
979
850
  "multiple": false,
980
851
  "type": "option"
981
852
  },
853
+ "cred-store": {
854
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
855
+ "helpGroup": "GLOBAL",
856
+ "name": "cred-store",
857
+ "required": false,
858
+ "allowNo": false,
859
+ "type": "boolean"
860
+ },
982
861
  "log-level": {
983
862
  "helpGroup": "GLOBAL",
984
863
  "name": "log-level",
@@ -1030,25 +909,218 @@
1030
909
  "uninstall.js"
1031
910
  ]
1032
911
  },
1033
- "attachment:get": {
912
+ "atf": {
1034
913
  "aliases": [],
1035
914
  "args": {},
1036
- "description": "Get metadata for a specific attachment.",
915
+ "description": "Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\nThis command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines and automated testing workflows. You can execute individual tests, entire test suites, and configure execution parameters such as browser type, OS, and performance mode.\n\nFeatures:\n • Execute individual tests or complete test suites\n • Real-time progress monitoring\n • JSON output for CI/CD integration\n • Detailed test results and summaries\n • Browser and environment configuration\n • Performance testing mode support",
1037
916
  "examples": [
1038
917
  {
1039
- "command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
1040
- "description": "Get attachment metadata by sys_id"
918
+ "description": "Execute a single ATF test by sys_id",
919
+ "command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
1041
920
  },
1042
921
  {
1043
- "command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
1044
- "description": "Get attachment metadata as JSON"
922
+ "description": "Execute a test suite by sys_id and wait for completion",
923
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
924
+ },
925
+ {
926
+ "description": "Execute a test suite by name",
927
+ "command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
928
+ },
929
+ {
930
+ "description": "Execute with specific browser configuration",
931
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
932
+ },
933
+ {
934
+ "description": "Execute as performance test with JSON output for CI/CD",
935
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
936
+ },
937
+ {
938
+ "description": "Execute with custom poll interval (10 seconds)",
939
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
1045
940
  }
1046
941
  ],
1047
942
  "flags": {
1048
943
  "json": {
1049
- "description": "Format output as json.",
1050
- "helpGroup": "GLOBAL",
1051
- "name": "json",
944
+ "char": "j",
945
+ "description": "Output results as JSON",
946
+ "name": "json",
947
+ "required": false,
948
+ "allowNo": false,
949
+ "type": "boolean"
950
+ },
951
+ "auth": {
952
+ "char": "a",
953
+ "description": "Auth alias to use.",
954
+ "name": "auth",
955
+ "required": false,
956
+ "hasDynamicHelp": false,
957
+ "multiple": false,
958
+ "type": "option"
959
+ },
960
+ "cred-store": {
961
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
962
+ "helpGroup": "GLOBAL",
963
+ "name": "cred-store",
964
+ "required": false,
965
+ "allowNo": false,
966
+ "type": "boolean"
967
+ },
968
+ "log-level": {
969
+ "helpGroup": "GLOBAL",
970
+ "name": "log-level",
971
+ "summary": "Specify level for logging.",
972
+ "default": "info",
973
+ "hasDynamicHelp": false,
974
+ "multiple": false,
975
+ "options": [
976
+ "debug",
977
+ "warn",
978
+ "error",
979
+ "info",
980
+ "trace"
981
+ ],
982
+ "type": "option"
983
+ },
984
+ "test-id": {
985
+ "char": "t",
986
+ "description": "Test sys_id to execute",
987
+ "exclusive": [
988
+ "suite-id",
989
+ "suite-name"
990
+ ],
991
+ "name": "test-id",
992
+ "required": false,
993
+ "hasDynamicHelp": false,
994
+ "multiple": false,
995
+ "type": "option"
996
+ },
997
+ "suite-id": {
998
+ "char": "s",
999
+ "description": "Test Suite sys_id to execute",
1000
+ "exclusive": [
1001
+ "test-id",
1002
+ "suite-name"
1003
+ ],
1004
+ "name": "suite-id",
1005
+ "required": false,
1006
+ "hasDynamicHelp": false,
1007
+ "multiple": false,
1008
+ "type": "option"
1009
+ },
1010
+ "suite-name": {
1011
+ "char": "n",
1012
+ "description": "Test Suite name to execute",
1013
+ "exclusive": [
1014
+ "test-id",
1015
+ "suite-id"
1016
+ ],
1017
+ "name": "suite-name",
1018
+ "required": false,
1019
+ "hasDynamicHelp": false,
1020
+ "multiple": false,
1021
+ "type": "option"
1022
+ },
1023
+ "wait": {
1024
+ "char": "w",
1025
+ "description": "Wait for test suite execution to complete and return results",
1026
+ "name": "wait",
1027
+ "required": false,
1028
+ "allowNo": false,
1029
+ "type": "boolean"
1030
+ },
1031
+ "poll-interval": {
1032
+ "char": "p",
1033
+ "description": "Polling interval in milliseconds when waiting for completion",
1034
+ "name": "poll-interval",
1035
+ "required": false,
1036
+ "default": 5000,
1037
+ "hasDynamicHelp": false,
1038
+ "multiple": false,
1039
+ "type": "option"
1040
+ },
1041
+ "browser": {
1042
+ "char": "b",
1043
+ "description": "Browser name for test execution (e.g., chrome, firefox)",
1044
+ "name": "browser",
1045
+ "required": false,
1046
+ "hasDynamicHelp": false,
1047
+ "multiple": false,
1048
+ "type": "option"
1049
+ },
1050
+ "browser-version": {
1051
+ "description": "Browser version for test execution",
1052
+ "name": "browser-version",
1053
+ "required": false,
1054
+ "hasDynamicHelp": false,
1055
+ "multiple": false,
1056
+ "type": "option"
1057
+ },
1058
+ "os-name": {
1059
+ "description": "Operating system name for test execution",
1060
+ "name": "os-name",
1061
+ "required": false,
1062
+ "hasDynamicHelp": false,
1063
+ "multiple": false,
1064
+ "type": "option"
1065
+ },
1066
+ "os-version": {
1067
+ "description": "Operating system version for test execution",
1068
+ "name": "os-version",
1069
+ "required": false,
1070
+ "hasDynamicHelp": false,
1071
+ "multiple": false,
1072
+ "type": "option"
1073
+ },
1074
+ "performance": {
1075
+ "description": "Run as performance test",
1076
+ "name": "performance",
1077
+ "required": false,
1078
+ "allowNo": false,
1079
+ "type": "boolean"
1080
+ },
1081
+ "cloud": {
1082
+ "description": "Run in cloud",
1083
+ "name": "cloud",
1084
+ "required": false,
1085
+ "allowNo": false,
1086
+ "type": "boolean"
1087
+ }
1088
+ },
1089
+ "hasDynamicHelp": false,
1090
+ "hiddenAliases": [],
1091
+ "id": "atf",
1092
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1093
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1094
+ "pluginType": "core",
1095
+ "strict": true,
1096
+ "enableJsonFlag": true,
1097
+ "isESM": true,
1098
+ "relativePath": [
1099
+ "dist",
1100
+ "commands",
1101
+ "atf",
1102
+ "index.js"
1103
+ ]
1104
+ },
1105
+ "attachment:get": {
1106
+ "aliases": [],
1107
+ "args": {},
1108
+ "description": "Get metadata for a specific attachment.",
1109
+ "examples": [
1110
+ {
1111
+ "command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
1112
+ "description": "Get attachment metadata by sys_id"
1113
+ },
1114
+ {
1115
+ "command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
1116
+ "description": "Get attachment metadata as JSON"
1117
+ }
1118
+ ],
1119
+ "flags": {
1120
+ "json": {
1121
+ "description": "Format output as json.",
1122
+ "helpGroup": "GLOBAL",
1123
+ "name": "json",
1052
1124
  "allowNo": false,
1053
1125
  "type": "boolean"
1054
1126
  },
@@ -1061,6 +1133,14 @@
1061
1133
  "multiple": false,
1062
1134
  "type": "option"
1063
1135
  },
1136
+ "cred-store": {
1137
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1138
+ "helpGroup": "GLOBAL",
1139
+ "name": "cred-store",
1140
+ "required": false,
1141
+ "allowNo": false,
1142
+ "type": "boolean"
1143
+ },
1064
1144
  "log-level": {
1065
1145
  "helpGroup": "GLOBAL",
1066
1146
  "name": "log-level",
@@ -1134,6 +1214,14 @@
1134
1214
  "multiple": false,
1135
1215
  "type": "option"
1136
1216
  },
1217
+ "cred-store": {
1218
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1219
+ "helpGroup": "GLOBAL",
1220
+ "name": "cred-store",
1221
+ "required": false,
1222
+ "allowNo": false,
1223
+ "type": "boolean"
1224
+ },
1137
1225
  "log-level": {
1138
1226
  "helpGroup": "GLOBAL",
1139
1227
  "name": "log-level",
@@ -1225,6 +1313,14 @@
1225
1313
  "multiple": false,
1226
1314
  "type": "option"
1227
1315
  },
1316
+ "cred-store": {
1317
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1318
+ "helpGroup": "GLOBAL",
1319
+ "name": "cred-store",
1320
+ "required": false,
1321
+ "allowNo": false,
1322
+ "type": "boolean"
1323
+ },
1228
1324
  "log-level": {
1229
1325
  "helpGroup": "GLOBAL",
1230
1326
  "name": "log-level",
@@ -1324,6 +1420,14 @@
1324
1420
  "multiple": false,
1325
1421
  "type": "option"
1326
1422
  },
1423
+ "cred-store": {
1424
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1425
+ "helpGroup": "GLOBAL",
1426
+ "name": "cred-store",
1427
+ "required": false,
1428
+ "allowNo": false,
1429
+ "type": "boolean"
1430
+ },
1327
1431
  "log-level": {
1328
1432
  "helpGroup": "GLOBAL",
1329
1433
  "name": "log-level",
@@ -1404,6 +1508,14 @@
1404
1508
  "multiple": false,
1405
1509
  "type": "option"
1406
1510
  },
1511
+ "cred-store": {
1512
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1513
+ "helpGroup": "GLOBAL",
1514
+ "name": "cred-store",
1515
+ "required": false,
1516
+ "allowNo": false,
1517
+ "type": "boolean"
1518
+ },
1407
1519
  "log-level": {
1408
1520
  "helpGroup": "GLOBAL",
1409
1521
  "name": "log-level",
@@ -1493,6 +1605,14 @@
1493
1605
  "multiple": false,
1494
1606
  "type": "option"
1495
1607
  },
1608
+ "cred-store": {
1609
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1610
+ "helpGroup": "GLOBAL",
1611
+ "name": "cred-store",
1612
+ "required": false,
1613
+ "allowNo": false,
1614
+ "type": "boolean"
1615
+ },
1496
1616
  "log-level": {
1497
1617
  "helpGroup": "GLOBAL",
1498
1618
  "name": "log-level",
@@ -1601,6 +1721,14 @@
1601
1721
  "multiple": false,
1602
1722
  "type": "option"
1603
1723
  },
1724
+ "cred-store": {
1725
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1726
+ "helpGroup": "GLOBAL",
1727
+ "name": "cred-store",
1728
+ "required": false,
1729
+ "allowNo": false,
1730
+ "type": "boolean"
1731
+ },
1604
1732
  "log-level": {
1605
1733
  "helpGroup": "GLOBAL",
1606
1734
  "name": "log-level",
@@ -1752,6 +1880,14 @@
1752
1880
  "multiple": false,
1753
1881
  "type": "option"
1754
1882
  },
1883
+ "cred-store": {
1884
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1885
+ "helpGroup": "GLOBAL",
1886
+ "name": "cred-store",
1887
+ "required": false,
1888
+ "allowNo": false,
1889
+ "type": "boolean"
1890
+ },
1755
1891
  "log-level": {
1756
1892
  "helpGroup": "GLOBAL",
1757
1893
  "name": "log-level",
@@ -1795,49 +1931,246 @@
1795
1931
  "index.js"
1796
1932
  ]
1797
1933
  },
1798
- "flow:action": {
1934
+ "auth:delete": {
1799
1935
  "aliases": [],
1800
- "args": {},
1801
- "description": "Execute a Flow Designer action by scoped name.\n\nRuns an action using the sn_fd.FlowAPI ScriptableFlowRunner.\n\nFeatures:\n • Execute actions by scoped name\n • Pass input values as JSON\n • Foreground or background execution mode\n • Returns context ID, outputs, and debug information",
1936
+ "args": {
1937
+ "alias": {
1938
+ "description": "Alias to remove",
1939
+ "name": "alias",
1940
+ "required": false
1941
+ }
1942
+ },
1943
+ "description": "Remove a credential from the store.\n\nThis does not touch the OS keyring — a copy stored there before migrating remains.",
1802
1944
  "examples": [
1803
1945
  {
1804
- "description": "Run an action",
1805
- "command": "<%= config.bin %> <%= command.id %> --name global.create_record --inputs '{\"table\":\"incident\",\"values\":{\"short_description\":\"Test\"}}' --auth dev"
1946
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1947
+ "description": "Remove one alias"
1948
+ },
1949
+ {
1950
+ "command": "<%= config.bin %> <%= command.id %> --all",
1951
+ "description": "Remove every stored credential"
1806
1952
  }
1807
1953
  ],
1808
1954
  "flags": {
1809
- "json": {
1810
- "char": "j",
1811
- "description": "Output results as JSON",
1812
- "name": "json",
1955
+ "cred-store": {
1956
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1957
+ "helpGroup": "GLOBAL",
1958
+ "name": "cred-store",
1813
1959
  "required": false,
1814
1960
  "allowNo": false,
1815
1961
  "type": "boolean"
1816
1962
  },
1817
- "auth": {
1818
- "char": "a",
1819
- "description": "Auth alias to use.",
1820
- "name": "auth",
1963
+ "all": {
1964
+ "description": "Remove every stored credential",
1965
+ "name": "all",
1821
1966
  "required": false,
1822
- "hasDynamicHelp": false,
1823
- "multiple": false,
1824
- "type": "option"
1825
- },
1826
- "log-level": {
1827
- "helpGroup": "GLOBAL",
1828
- "name": "log-level",
1829
- "summary": "Specify level for logging.",
1830
- "default": "info",
1831
- "hasDynamicHelp": false,
1832
- "multiple": false,
1833
- "options": [
1834
- "debug",
1835
- "warn",
1836
- "error",
1837
- "info",
1838
- "trace"
1839
- ],
1840
- "type": "option"
1967
+ "allowNo": false,
1968
+ "type": "boolean"
1969
+ }
1970
+ },
1971
+ "hasDynamicHelp": false,
1972
+ "hiddenAliases": [],
1973
+ "id": "auth:delete",
1974
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1975
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1976
+ "pluginType": "core",
1977
+ "strict": true,
1978
+ "enableJsonFlag": false,
1979
+ "isESM": true,
1980
+ "relativePath": [
1981
+ "dist",
1982
+ "commands",
1983
+ "auth",
1984
+ "delete.js"
1985
+ ]
1986
+ },
1987
+ "auth:doctor": {
1988
+ "aliases": [],
1989
+ "args": {},
1990
+ "description": "Diagnose credential storage: whether the SDK shim is active, which backend is in use, and what is stored.",
1991
+ "examples": [
1992
+ {
1993
+ "command": "<%= config.bin %> <%= command.id %>",
1994
+ "description": "Check credential storage health"
1995
+ },
1996
+ {
1997
+ "command": "<%= config.bin %> <%= command.id %> --json",
1998
+ "description": "Machine-readable output for CI"
1999
+ }
2000
+ ],
2001
+ "flags": {
2002
+ "json": {
2003
+ "description": "Format output as json.",
2004
+ "helpGroup": "GLOBAL",
2005
+ "name": "json",
2006
+ "allowNo": false,
2007
+ "type": "boolean"
2008
+ },
2009
+ "cred-store": {
2010
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
2011
+ "helpGroup": "GLOBAL",
2012
+ "name": "cred-store",
2013
+ "required": false,
2014
+ "allowNo": false,
2015
+ "type": "boolean"
2016
+ }
2017
+ },
2018
+ "hasDynamicHelp": false,
2019
+ "hiddenAliases": [],
2020
+ "id": "auth:doctor",
2021
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2022
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
2023
+ "pluginType": "core",
2024
+ "strict": true,
2025
+ "enableJsonFlag": true,
2026
+ "isESM": true,
2027
+ "relativePath": [
2028
+ "dist",
2029
+ "commands",
2030
+ "auth",
2031
+ "doctor.js"
2032
+ ]
2033
+ },
2034
+ "auth:list": {
2035
+ "aliases": [],
2036
+ "args": {},
2037
+ "description": "List credentials in the headless-safe credential store.\n\nThese are the credentials the ServiceNow SDK reads via the sn-credstore shim, which works in non-interactive sessions where the OS keyring cannot be unlocked.\n\nSecrets are never printed.",
2038
+ "examples": [
2039
+ {
2040
+ "command": "<%= config.bin %> <%= command.id %>",
2041
+ "description": "List stored credentials"
2042
+ },
2043
+ {
2044
+ "command": "<%= config.bin %> <%= command.id %> --json",
2045
+ "description": "List as JSON for scripting"
2046
+ }
2047
+ ],
2048
+ "flags": {
2049
+ "json": {
2050
+ "description": "Format output as json.",
2051
+ "helpGroup": "GLOBAL",
2052
+ "name": "json",
2053
+ "allowNo": false,
2054
+ "type": "boolean"
2055
+ },
2056
+ "cred-store": {
2057
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
2058
+ "helpGroup": "GLOBAL",
2059
+ "name": "cred-store",
2060
+ "required": false,
2061
+ "allowNo": false,
2062
+ "type": "boolean"
2063
+ }
2064
+ },
2065
+ "hasDynamicHelp": false,
2066
+ "hiddenAliases": [],
2067
+ "id": "auth:list",
2068
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2069
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
2070
+ "pluginType": "core",
2071
+ "strict": true,
2072
+ "enableJsonFlag": true,
2073
+ "isESM": true,
2074
+ "relativePath": [
2075
+ "dist",
2076
+ "commands",
2077
+ "auth",
2078
+ "list.js"
2079
+ ]
2080
+ },
2081
+ "auth:use": {
2082
+ "aliases": [],
2083
+ "args": {
2084
+ "alias": {
2085
+ "description": "Alias to make the default",
2086
+ "name": "alias",
2087
+ "required": true
2088
+ }
2089
+ },
2090
+ "description": "Set the default credential alias.\n\nCommands run without --auth use this alias.",
2091
+ "examples": [
2092
+ {
2093
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
2094
+ "description": "Make dev206299 the default"
2095
+ }
2096
+ ],
2097
+ "flags": {
2098
+ "cred-store": {
2099
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
2100
+ "helpGroup": "GLOBAL",
2101
+ "name": "cred-store",
2102
+ "required": false,
2103
+ "allowNo": false,
2104
+ "type": "boolean"
2105
+ }
2106
+ },
2107
+ "hasDynamicHelp": false,
2108
+ "hiddenAliases": [],
2109
+ "id": "auth:use",
2110
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2111
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
2112
+ "pluginType": "core",
2113
+ "strict": true,
2114
+ "enableJsonFlag": false,
2115
+ "isESM": true,
2116
+ "relativePath": [
2117
+ "dist",
2118
+ "commands",
2119
+ "auth",
2120
+ "use.js"
2121
+ ]
2122
+ },
2123
+ "flow:action": {
2124
+ "aliases": [],
2125
+ "args": {},
2126
+ "description": "Execute a Flow Designer action by scoped name.\n\nRuns an action using the sn_fd.FlowAPI ScriptableFlowRunner.\n\nFeatures:\n • Execute actions by scoped name\n • Pass input values as JSON\n • Foreground or background execution mode\n • Returns context ID, outputs, and debug information",
2127
+ "examples": [
2128
+ {
2129
+ "description": "Run an action",
2130
+ "command": "<%= config.bin %> <%= command.id %> --name global.create_record --inputs '{\"table\":\"incident\",\"values\":{\"short_description\":\"Test\"}}' --auth dev"
2131
+ }
2132
+ ],
2133
+ "flags": {
2134
+ "json": {
2135
+ "char": "j",
2136
+ "description": "Output results as JSON",
2137
+ "name": "json",
2138
+ "required": false,
2139
+ "allowNo": false,
2140
+ "type": "boolean"
2141
+ },
2142
+ "auth": {
2143
+ "char": "a",
2144
+ "description": "Auth alias to use.",
2145
+ "name": "auth",
2146
+ "required": false,
2147
+ "hasDynamicHelp": false,
2148
+ "multiple": false,
2149
+ "type": "option"
2150
+ },
2151
+ "cred-store": {
2152
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2153
+ "helpGroup": "GLOBAL",
2154
+ "name": "cred-store",
2155
+ "required": false,
2156
+ "allowNo": false,
2157
+ "type": "boolean"
2158
+ },
2159
+ "log-level": {
2160
+ "helpGroup": "GLOBAL",
2161
+ "name": "log-level",
2162
+ "summary": "Specify level for logging.",
2163
+ "default": "info",
2164
+ "hasDynamicHelp": false,
2165
+ "multiple": false,
2166
+ "options": [
2167
+ "debug",
2168
+ "warn",
2169
+ "error",
2170
+ "info",
2171
+ "trace"
2172
+ ],
2173
+ "type": "option"
1841
2174
  },
1842
2175
  "name": {
1843
2176
  "char": "n",
@@ -1935,6 +2268,14 @@
1935
2268
  "multiple": false,
1936
2269
  "type": "option"
1937
2270
  },
2271
+ "cred-store": {
2272
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2273
+ "helpGroup": "GLOBAL",
2274
+ "name": "cred-store",
2275
+ "required": false,
2276
+ "allowNo": false,
2277
+ "type": "boolean"
2278
+ },
1938
2279
  "log-level": {
1939
2280
  "helpGroup": "GLOBAL",
1940
2281
  "name": "log-level",
@@ -2030,6 +2371,14 @@
2030
2371
  "multiple": false,
2031
2372
  "type": "option"
2032
2373
  },
2374
+ "cred-store": {
2375
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2376
+ "helpGroup": "GLOBAL",
2377
+ "name": "cred-store",
2378
+ "required": false,
2379
+ "allowNo": false,
2380
+ "type": "boolean"
2381
+ },
2033
2382
  "log-level": {
2034
2383
  "helpGroup": "GLOBAL",
2035
2384
  "name": "log-level",
@@ -2126,6 +2475,14 @@
2126
2475
  "multiple": false,
2127
2476
  "type": "option"
2128
2477
  },
2478
+ "cred-store": {
2479
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2480
+ "helpGroup": "GLOBAL",
2481
+ "name": "cred-store",
2482
+ "required": false,
2483
+ "allowNo": false,
2484
+ "type": "boolean"
2485
+ },
2129
2486
  "log-level": {
2130
2487
  "helpGroup": "GLOBAL",
2131
2488
  "name": "log-level",
@@ -2212,6 +2569,14 @@
2212
2569
  "multiple": false,
2213
2570
  "type": "option"
2214
2571
  },
2572
+ "cred-store": {
2573
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2574
+ "helpGroup": "GLOBAL",
2575
+ "name": "cred-store",
2576
+ "required": false,
2577
+ "allowNo": false,
2578
+ "type": "boolean"
2579
+ },
2215
2580
  "log-level": {
2216
2581
  "helpGroup": "GLOBAL",
2217
2582
  "name": "log-level",
@@ -2298,6 +2663,14 @@
2298
2663
  "multiple": false,
2299
2664
  "type": "option"
2300
2665
  },
2666
+ "cred-store": {
2667
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2668
+ "helpGroup": "GLOBAL",
2669
+ "name": "cred-store",
2670
+ "required": false,
2671
+ "allowNo": false,
2672
+ "type": "boolean"
2673
+ },
2301
2674
  "log-level": {
2302
2675
  "helpGroup": "GLOBAL",
2303
2676
  "name": "log-level",
@@ -2396,6 +2769,14 @@
2396
2769
  "multiple": false,
2397
2770
  "type": "option"
2398
2771
  },
2772
+ "cred-store": {
2773
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2774
+ "helpGroup": "GLOBAL",
2775
+ "name": "cred-store",
2776
+ "required": false,
2777
+ "allowNo": false,
2778
+ "type": "boolean"
2779
+ },
2399
2780
  "log-level": {
2400
2781
  "helpGroup": "GLOBAL",
2401
2782
  "name": "log-level",
@@ -2496,6 +2877,14 @@
2496
2877
  "multiple": false,
2497
2878
  "type": "option"
2498
2879
  },
2880
+ "cred-store": {
2881
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2882
+ "helpGroup": "GLOBAL",
2883
+ "name": "cred-store",
2884
+ "required": false,
2885
+ "allowNo": false,
2886
+ "type": "boolean"
2887
+ },
2499
2888
  "log-level": {
2500
2889
  "helpGroup": "GLOBAL",
2501
2890
  "name": "log-level",
@@ -2582,6 +2971,14 @@
2582
2971
  "multiple": false,
2583
2972
  "type": "option"
2584
2973
  },
2974
+ "cred-store": {
2975
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2976
+ "helpGroup": "GLOBAL",
2977
+ "name": "cred-store",
2978
+ "required": false,
2979
+ "allowNo": false,
2980
+ "type": "boolean"
2981
+ },
2585
2982
  "log-level": {
2586
2983
  "helpGroup": "GLOBAL",
2587
2984
  "name": "log-level",
@@ -2690,6 +3087,14 @@
2690
3087
  "multiple": false,
2691
3088
  "type": "option"
2692
3089
  },
3090
+ "cred-store": {
3091
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3092
+ "helpGroup": "GLOBAL",
3093
+ "name": "cred-store",
3094
+ "required": false,
3095
+ "allowNo": false,
3096
+ "type": "boolean"
3097
+ },
2693
3098
  "log-level": {
2694
3099
  "helpGroup": "GLOBAL",
2695
3100
  "name": "log-level",
@@ -2772,6 +3177,14 @@
2772
3177
  "multiple": false,
2773
3178
  "type": "option"
2774
3179
  },
3180
+ "cred-store": {
3181
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3182
+ "helpGroup": "GLOBAL",
3183
+ "name": "cred-store",
3184
+ "required": false,
3185
+ "allowNo": false,
3186
+ "type": "boolean"
3187
+ },
2775
3188
  "log-level": {
2776
3189
  "helpGroup": "GLOBAL",
2777
3190
  "name": "log-level",
@@ -2888,6 +3301,14 @@
2888
3301
  "multiple": false,
2889
3302
  "type": "option"
2890
3303
  },
3304
+ "cred-store": {
3305
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3306
+ "helpGroup": "GLOBAL",
3307
+ "name": "cred-store",
3308
+ "required": false,
3309
+ "allowNo": false,
3310
+ "type": "boolean"
3311
+ },
2891
3312
  "log-level": {
2892
3313
  "helpGroup": "GLOBAL",
2893
3314
  "name": "log-level",
@@ -2994,6 +3415,14 @@
2994
3415
  "multiple": false,
2995
3416
  "type": "option"
2996
3417
  },
3418
+ "cred-store": {
3419
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3420
+ "helpGroup": "GLOBAL",
3421
+ "name": "cred-store",
3422
+ "required": false,
3423
+ "allowNo": false,
3424
+ "type": "boolean"
3425
+ },
2997
3426
  "log-level": {
2998
3427
  "helpGroup": "GLOBAL",
2999
3428
  "name": "log-level",
@@ -3126,6 +3555,14 @@
3126
3555
  "multiple": false,
3127
3556
  "type": "option"
3128
3557
  },
3558
+ "cred-store": {
3559
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3560
+ "helpGroup": "GLOBAL",
3561
+ "name": "cred-store",
3562
+ "required": false,
3563
+ "allowNo": false,
3564
+ "type": "boolean"
3565
+ },
3129
3566
  "log-level": {
3130
3567
  "helpGroup": "GLOBAL",
3131
3568
  "name": "log-level",
@@ -3226,6 +3663,14 @@
3226
3663
  "multiple": false,
3227
3664
  "type": "option"
3228
3665
  },
3666
+ "cred-store": {
3667
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3668
+ "helpGroup": "GLOBAL",
3669
+ "name": "cred-store",
3670
+ "required": false,
3671
+ "allowNo": false,
3672
+ "type": "boolean"
3673
+ },
3229
3674
  "log-level": {
3230
3675
  "helpGroup": "GLOBAL",
3231
3676
  "name": "log-level",
@@ -3322,6 +3767,14 @@
3322
3767
  "multiple": false,
3323
3768
  "type": "option"
3324
3769
  },
3770
+ "cred-store": {
3771
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3772
+ "helpGroup": "GLOBAL",
3773
+ "name": "cred-store",
3774
+ "required": false,
3775
+ "allowNo": false,
3776
+ "type": "boolean"
3777
+ },
3325
3778
  "log-level": {
3326
3779
  "helpGroup": "GLOBAL",
3327
3780
  "name": "log-level",
@@ -3409,6 +3862,14 @@
3409
3862
  "multiple": false,
3410
3863
  "type": "option"
3411
3864
  },
3865
+ "cred-store": {
3866
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3867
+ "helpGroup": "GLOBAL",
3868
+ "name": "cred-store",
3869
+ "required": false,
3870
+ "allowNo": false,
3871
+ "type": "boolean"
3872
+ },
3412
3873
  "log-level": {
3413
3874
  "helpGroup": "GLOBAL",
3414
3875
  "name": "log-level",
@@ -3524,6 +3985,14 @@
3524
3985
  "multiple": false,
3525
3986
  "type": "option"
3526
3987
  },
3988
+ "cred-store": {
3989
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3990
+ "helpGroup": "GLOBAL",
3991
+ "name": "cred-store",
3992
+ "required": false,
3993
+ "allowNo": false,
3994
+ "type": "boolean"
3995
+ },
3527
3996
  "log-level": {
3528
3997
  "helpGroup": "GLOBAL",
3529
3998
  "name": "log-level",
@@ -3576,269 +4045,10 @@
3576
4045
  "syslog.js"
3577
4046
  ]
3578
4047
  },
3579
- "schema:field": {
4048
+ "scope": {
3580
4049
  "aliases": [],
3581
4050
  "args": {},
3582
- "description": "Get detailed information about a specific field on a ServiceNow table.\n\nThis command retrieves comprehensive details about a single field, including its type, constraints, choices, and other metadata. Useful for understanding field definitions during development.",
3583
- "examples": [
3584
- {
3585
- "description": "Explain the state field on incident table",
3586
- "command": "<%= config.bin %> <%= command.id %> --table incident --field state --auth dev"
3587
- },
3588
- {
3589
- "description": "Explain the priority field on incident table with JSON output",
3590
- "command": "<%= config.bin %> <%= command.id %> --table incident --field priority --json --auth dev"
3591
- }
3592
- ],
3593
- "flags": {
3594
- "json": {
3595
- "char": "j",
3596
- "description": "Output results as JSON",
3597
- "name": "json",
3598
- "required": false,
3599
- "allowNo": false,
3600
- "type": "boolean"
3601
- },
3602
- "auth": {
3603
- "char": "a",
3604
- "description": "Auth alias to use.",
3605
- "name": "auth",
3606
- "required": false,
3607
- "hasDynamicHelp": false,
3608
- "multiple": false,
3609
- "type": "option"
3610
- },
3611
- "log-level": {
3612
- "helpGroup": "GLOBAL",
3613
- "name": "log-level",
3614
- "summary": "Specify level for logging.",
3615
- "default": "info",
3616
- "hasDynamicHelp": false,
3617
- "multiple": false,
3618
- "options": [
3619
- "debug",
3620
- "warn",
3621
- "error",
3622
- "info",
3623
- "trace"
3624
- ],
3625
- "type": "option"
3626
- },
3627
- "table": {
3628
- "char": "t",
3629
- "description": "ServiceNow table name",
3630
- "name": "table",
3631
- "required": true,
3632
- "hasDynamicHelp": false,
3633
- "multiple": false,
3634
- "type": "option"
3635
- },
3636
- "field": {
3637
- "char": "f",
3638
- "description": "Field name to explain",
3639
- "name": "field",
3640
- "required": true,
3641
- "hasDynamicHelp": false,
3642
- "multiple": false,
3643
- "type": "option"
3644
- }
3645
- },
3646
- "hasDynamicHelp": false,
3647
- "hiddenAliases": [],
3648
- "id": "schema:field",
3649
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
3650
- "pluginName": "@sonisoft/now-sdk-ext-cli",
3651
- "pluginType": "core",
3652
- "strict": true,
3653
- "enableJsonFlag": true,
3654
- "isESM": true,
3655
- "relativePath": [
3656
- "dist",
3657
- "commands",
3658
- "schema",
3659
- "field.js"
3660
- ]
3661
- },
3662
- "schema": {
3663
- "aliases": [],
3664
- "args": {},
3665
- "description": "Discover and inspect a ServiceNow table schema including fields, types, and relationships.\n\nThis command retrieves the full schema definition for a ServiceNow table, including all fields, their types, constraints, and optionally choices, relationships, UI policies, and business rules.\n\nFeatures:\n • List all fields with types, lengths, and constraints\n • Optionally include field choices\n • Optionally include table relationships\n • Optionally include UI policies\n • Optionally include business rules\n • JSON output for CI/CD integration",
3666
- "examples": [
3667
- {
3668
- "description": "Discover incident table schema",
3669
- "command": "<%= config.bin %> <%= command.id %> --table incident --auth dev"
3670
- },
3671
- {
3672
- "description": "Include choices and relationships",
3673
- "command": "<%= config.bin %> <%= command.id %> --table incident --include-choices --include-relationships --auth dev"
3674
- }
3675
- ],
3676
- "flags": {
3677
- "json": {
3678
- "char": "j",
3679
- "description": "Output results as JSON",
3680
- "name": "json",
3681
- "required": false,
3682
- "allowNo": false,
3683
- "type": "boolean"
3684
- },
3685
- "auth": {
3686
- "char": "a",
3687
- "description": "Auth alias to use.",
3688
- "name": "auth",
3689
- "required": false,
3690
- "hasDynamicHelp": false,
3691
- "multiple": false,
3692
- "type": "option"
3693
- },
3694
- "log-level": {
3695
- "helpGroup": "GLOBAL",
3696
- "name": "log-level",
3697
- "summary": "Specify level for logging.",
3698
- "default": "info",
3699
- "hasDynamicHelp": false,
3700
- "multiple": false,
3701
- "options": [
3702
- "debug",
3703
- "warn",
3704
- "error",
3705
- "info",
3706
- "trace"
3707
- ],
3708
- "type": "option"
3709
- },
3710
- "table": {
3711
- "char": "t",
3712
- "description": "ServiceNow table name to discover schema for",
3713
- "name": "table",
3714
- "required": true,
3715
- "hasDynamicHelp": false,
3716
- "multiple": false,
3717
- "type": "option"
3718
- },
3719
- "include-choices": {
3720
- "description": "Include field choices in the schema output",
3721
- "name": "include-choices",
3722
- "required": false,
3723
- "allowNo": false,
3724
- "type": "boolean"
3725
- },
3726
- "include-relationships": {
3727
- "description": "Include table relationships in the schema output",
3728
- "name": "include-relationships",
3729
- "required": false,
3730
- "allowNo": false,
3731
- "type": "boolean"
3732
- },
3733
- "include-ui-policies": {
3734
- "description": "Include UI policies in the schema output",
3735
- "name": "include-ui-policies",
3736
- "required": false,
3737
- "allowNo": false,
3738
- "type": "boolean"
3739
- },
3740
- "include-business-rules": {
3741
- "description": "Include business rules in the schema output",
3742
- "name": "include-business-rules",
3743
- "required": false,
3744
- "allowNo": false,
3745
- "type": "boolean"
3746
- }
3747
- },
3748
- "hasDynamicHelp": false,
3749
- "hiddenAliases": [],
3750
- "id": "schema",
3751
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
3752
- "pluginName": "@sonisoft/now-sdk-ext-cli",
3753
- "pluginType": "core",
3754
- "strict": true,
3755
- "enableJsonFlag": true,
3756
- "isESM": true,
3757
- "relativePath": [
3758
- "dist",
3759
- "commands",
3760
- "schema",
3761
- "index.js"
3762
- ]
3763
- },
3764
- "schema:validate-catalog": {
3765
- "aliases": [],
3766
- "args": {},
3767
- "description": "Validate a ServiceNow catalog item configuration for common issues.\n\nThis command checks a catalog item configuration and reports any validation issues, warnings, or errors found. Useful for ensuring catalog items are properly configured before deployment.",
3768
- "examples": [
3769
- {
3770
- "description": "Validate a catalog item by sys_id",
3771
- "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --auth dev"
3772
- },
3773
- {
3774
- "description": "Validate a catalog item with JSON output",
3775
- "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --json --auth dev"
3776
- }
3777
- ],
3778
- "flags": {
3779
- "json": {
3780
- "char": "j",
3781
- "description": "Output results as JSON",
3782
- "name": "json",
3783
- "required": false,
3784
- "allowNo": false,
3785
- "type": "boolean"
3786
- },
3787
- "auth": {
3788
- "char": "a",
3789
- "description": "Auth alias to use.",
3790
- "name": "auth",
3791
- "required": false,
3792
- "hasDynamicHelp": false,
3793
- "multiple": false,
3794
- "type": "option"
3795
- },
3796
- "log-level": {
3797
- "helpGroup": "GLOBAL",
3798
- "name": "log-level",
3799
- "summary": "Specify level for logging.",
3800
- "default": "info",
3801
- "hasDynamicHelp": false,
3802
- "multiple": false,
3803
- "options": [
3804
- "debug",
3805
- "warn",
3806
- "error",
3807
- "info",
3808
- "trace"
3809
- ],
3810
- "type": "option"
3811
- },
3812
- "sys-id": {
3813
- "char": "s",
3814
- "description": "Catalog item sys_id to validate",
3815
- "name": "sys-id",
3816
- "required": true,
3817
- "hasDynamicHelp": false,
3818
- "multiple": false,
3819
- "type": "option"
3820
- }
3821
- },
3822
- "hasDynamicHelp": false,
3823
- "hiddenAliases": [],
3824
- "id": "schema:validate-catalog",
3825
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
3826
- "pluginName": "@sonisoft/now-sdk-ext-cli",
3827
- "pluginType": "core",
3828
- "strict": true,
3829
- "enableJsonFlag": true,
3830
- "isESM": true,
3831
- "relativePath": [
3832
- "dist",
3833
- "commands",
3834
- "schema",
3835
- "validate-catalog.js"
3836
- ]
3837
- },
3838
- "scope": {
3839
- "aliases": [],
3840
- "args": {},
3841
- "description": "Get the current application scope or list available applications.",
4051
+ "description": "Get the current application scope or list available applications.",
3842
4052
  "examples": [
3843
4053
  {
3844
4054
  "command": "<%= config.bin %> <%= command.id %> --auth dev",
@@ -3870,6 +4080,14 @@
3870
4080
  "multiple": false,
3871
4081
  "type": "option"
3872
4082
  },
4083
+ "cred-store": {
4084
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4085
+ "helpGroup": "GLOBAL",
4086
+ "name": "cred-store",
4087
+ "required": false,
4088
+ "allowNo": false,
4089
+ "type": "boolean"
4090
+ },
3873
4091
  "log-level": {
3874
4092
  "helpGroup": "GLOBAL",
3875
4093
  "name": "log-level",
@@ -3942,6 +4160,14 @@
3942
4160
  "multiple": false,
3943
4161
  "type": "option"
3944
4162
  },
4163
+ "cred-store": {
4164
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4165
+ "helpGroup": "GLOBAL",
4166
+ "name": "cred-store",
4167
+ "required": false,
4168
+ "allowNo": false,
4169
+ "type": "boolean"
4170
+ },
3945
4171
  "log-level": {
3946
4172
  "helpGroup": "GLOBAL",
3947
4173
  "name": "log-level",
@@ -4019,6 +4245,14 @@
4019
4245
  "multiple": false,
4020
4246
  "type": "option"
4021
4247
  },
4248
+ "cred-store": {
4249
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4250
+ "helpGroup": "GLOBAL",
4251
+ "name": "cred-store",
4252
+ "required": false,
4253
+ "allowNo": false,
4254
+ "type": "boolean"
4255
+ },
4022
4256
  "log-level": {
4023
4257
  "helpGroup": "GLOBAL",
4024
4258
  "name": "log-level",
@@ -4121,6 +4355,14 @@
4121
4355
  "multiple": false,
4122
4356
  "type": "option"
4123
4357
  },
4358
+ "cred-store": {
4359
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4360
+ "helpGroup": "GLOBAL",
4361
+ "name": "cred-store",
4362
+ "required": false,
4363
+ "allowNo": false,
4364
+ "type": "boolean"
4365
+ },
4124
4366
  "log-level": {
4125
4367
  "helpGroup": "GLOBAL",
4126
4368
  "name": "log-level",
@@ -4223,6 +4465,14 @@
4223
4465
  "multiple": false,
4224
4466
  "type": "option"
4225
4467
  },
4468
+ "cred-store": {
4469
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4470
+ "helpGroup": "GLOBAL",
4471
+ "name": "cred-store",
4472
+ "required": false,
4473
+ "allowNo": false,
4474
+ "type": "boolean"
4475
+ },
4226
4476
  "log-level": {
4227
4477
  "helpGroup": "GLOBAL",
4228
4478
  "name": "log-level",
@@ -4281,29 +4531,26 @@
4281
4531
  "sync.js"
4282
4532
  ]
4283
4533
  },
4284
- "store:install": {
4534
+ "schema:field": {
4285
4535
  "aliases": [],
4286
4536
  "args": {},
4287
- "description": "Install an application from the ServiceNow Store.",
4537
+ "description": "Get detailed information about a specific field on a ServiceNow table.\n\nThis command retrieves comprehensive details about a single field, including its type, constraints, choices, and other metadata. Useful for understanding field definitions during development.",
4288
4538
  "examples": [
4289
4539
  {
4290
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
4291
- "description": "Install a store application and wait for completion"
4292
- },
4293
- {
4294
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
4295
- "description": "Install without waiting for completion"
4540
+ "description": "Explain the state field on incident table",
4541
+ "command": "<%= config.bin %> <%= command.id %> --table incident --field state --auth dev"
4296
4542
  },
4297
4543
  {
4298
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
4299
- "description": "Install with demo data"
4544
+ "description": "Explain the priority field on incident table with JSON output",
4545
+ "command": "<%= config.bin %> <%= command.id %> --table incident --field priority --json --auth dev"
4300
4546
  }
4301
4547
  ],
4302
4548
  "flags": {
4303
4549
  "json": {
4304
- "description": "Format output as json.",
4305
- "helpGroup": "GLOBAL",
4550
+ "char": "j",
4551
+ "description": "Output results as JSON",
4306
4552
  "name": "json",
4553
+ "required": false,
4307
4554
  "allowNo": false,
4308
4555
  "type": "boolean"
4309
4556
  },
@@ -4316,6 +4563,14 @@
4316
4563
  "multiple": false,
4317
4564
  "type": "option"
4318
4565
  },
4566
+ "cred-store": {
4567
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4568
+ "helpGroup": "GLOBAL",
4569
+ "name": "cred-store",
4570
+ "required": false,
4571
+ "allowNo": false,
4572
+ "type": "boolean"
4573
+ },
4319
4574
  "log-level": {
4320
4575
  "helpGroup": "GLOBAL",
4321
4576
  "name": "log-level",
@@ -4332,51 +4587,19 @@
4332
4587
  ],
4333
4588
  "type": "option"
4334
4589
  },
4335
- "app-id": {
4336
- "char": "a",
4337
- "description": "Store application sys_id",
4338
- "name": "app-id",
4590
+ "table": {
4591
+ "char": "t",
4592
+ "description": "ServiceNow table name",
4593
+ "name": "table",
4339
4594
  "required": true,
4340
4595
  "hasDynamicHelp": false,
4341
4596
  "multiple": false,
4342
4597
  "type": "option"
4343
4598
  },
4344
- "demo-data": {
4345
- "description": "Load demo data during installation",
4346
- "name": "demo-data",
4347
- "required": false,
4348
- "allowNo": false,
4349
- "type": "boolean"
4350
- },
4351
- "no-wait": {
4352
- "description": "Do not wait for installation to complete",
4353
- "name": "no-wait",
4354
- "required": false,
4355
- "allowNo": false,
4356
- "type": "boolean"
4357
- },
4358
- "poll-interval": {
4359
- "description": "Polling interval in milliseconds",
4360
- "name": "poll-interval",
4361
- "required": false,
4362
- "default": 5000,
4363
- "hasDynamicHelp": false,
4364
- "multiple": false,
4365
- "type": "option"
4366
- },
4367
- "timeout": {
4368
- "description": "Installation timeout in milliseconds",
4369
- "name": "timeout",
4370
- "required": false,
4371
- "default": 1800000,
4372
- "hasDynamicHelp": false,
4373
- "multiple": false,
4374
- "type": "option"
4375
- },
4376
- "version": {
4377
- "char": "v",
4378
- "description": "Application version to install",
4379
- "name": "version",
4599
+ "field": {
4600
+ "char": "f",
4601
+ "description": "Field name to explain",
4602
+ "name": "field",
4380
4603
  "required": true,
4381
4604
  "hasDynamicHelp": false,
4382
4605
  "multiple": false,
@@ -4385,7 +4608,7 @@
4385
4608
  },
4386
4609
  "hasDynamicHelp": false,
4387
4610
  "hiddenAliases": [],
4388
- "id": "store:install",
4611
+ "id": "schema:field",
4389
4612
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4390
4613
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4391
4614
  "pluginType": "core",
@@ -4395,33 +4618,30 @@
4395
4618
  "relativePath": [
4396
4619
  "dist",
4397
4620
  "commands",
4398
- "store",
4399
- "install.js"
4621
+ "schema",
4622
+ "field.js"
4400
4623
  ]
4401
4624
  },
4402
- "store:search": {
4625
+ "schema": {
4403
4626
  "aliases": [],
4404
4627
  "args": {},
4405
- "description": "Search for applications in the ServiceNow Store.",
4628
+ "description": "Discover and inspect a ServiceNow table schema including fields, types, and relationships.\n\nThis command retrieves the full schema definition for a ServiceNow table, including all fields, their types, constraints, and optionally choices, relationships, UI policies, and business rules.\n\nFeatures:\n • List all fields with types, lengths, and constraints\n • Optionally include field choices\n • Optionally include table relationships\n • Optionally include UI policies\n • Optionally include business rules\n • JSON output for CI/CD integration",
4406
4629
  "examples": [
4407
4630
  {
4408
- "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
4409
- "description": "Search for applications matching a term"
4410
- },
4411
- {
4412
- "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
4413
- "description": "List installed applications"
4631
+ "description": "Discover incident table schema",
4632
+ "command": "<%= config.bin %> <%= command.id %> --table incident --auth dev"
4414
4633
  },
4415
4634
  {
4416
- "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
4417
- "description": "List applications with available updates"
4635
+ "description": "Include choices and relationships",
4636
+ "command": "<%= config.bin %> <%= command.id %> --table incident --include-choices --include-relationships --auth dev"
4418
4637
  }
4419
4638
  ],
4420
4639
  "flags": {
4421
4640
  "json": {
4422
- "description": "Format output as json.",
4423
- "helpGroup": "GLOBAL",
4641
+ "char": "j",
4642
+ "description": "Output results as JSON",
4424
4643
  "name": "json",
4644
+ "required": false,
4425
4645
  "allowNo": false,
4426
4646
  "type": "boolean"
4427
4647
  },
@@ -4434,6 +4654,14 @@
4434
4654
  "multiple": false,
4435
4655
  "type": "option"
4436
4656
  },
4657
+ "cred-store": {
4658
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4659
+ "helpGroup": "GLOBAL",
4660
+ "name": "cred-store",
4661
+ "required": false,
4662
+ "allowNo": false,
4663
+ "type": "boolean"
4664
+ },
4437
4665
  "log-level": {
4438
4666
  "helpGroup": "GLOBAL",
4439
4667
  "name": "log-level",
@@ -4450,34 +4678,121 @@
4450
4678
  ],
4451
4679
  "type": "option"
4452
4680
  },
4453
- "limit": {
4454
- "description": "Maximum number of results to return",
4455
- "name": "limit",
4681
+ "table": {
4682
+ "char": "t",
4683
+ "description": "ServiceNow table name to discover schema for",
4684
+ "name": "table",
4685
+ "required": true,
4686
+ "hasDynamicHelp": false,
4687
+ "multiple": false,
4688
+ "type": "option"
4689
+ },
4690
+ "include-choices": {
4691
+ "description": "Include field choices in the schema output",
4692
+ "name": "include-choices",
4693
+ "required": false,
4694
+ "allowNo": false,
4695
+ "type": "boolean"
4696
+ },
4697
+ "include-relationships": {
4698
+ "description": "Include table relationships in the schema output",
4699
+ "name": "include-relationships",
4700
+ "required": false,
4701
+ "allowNo": false,
4702
+ "type": "boolean"
4703
+ },
4704
+ "include-ui-policies": {
4705
+ "description": "Include UI policies in the schema output",
4706
+ "name": "include-ui-policies",
4707
+ "required": false,
4708
+ "allowNo": false,
4709
+ "type": "boolean"
4710
+ },
4711
+ "include-business-rules": {
4712
+ "description": "Include business rules in the schema output",
4713
+ "name": "include-business-rules",
4714
+ "required": false,
4715
+ "allowNo": false,
4716
+ "type": "boolean"
4717
+ }
4718
+ },
4719
+ "hasDynamicHelp": false,
4720
+ "hiddenAliases": [],
4721
+ "id": "schema",
4722
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4723
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
4724
+ "pluginType": "core",
4725
+ "strict": true,
4726
+ "enableJsonFlag": true,
4727
+ "isESM": true,
4728
+ "relativePath": [
4729
+ "dist",
4730
+ "commands",
4731
+ "schema",
4732
+ "index.js"
4733
+ ]
4734
+ },
4735
+ "schema:validate-catalog": {
4736
+ "aliases": [],
4737
+ "args": {},
4738
+ "description": "Validate a ServiceNow catalog item configuration for common issues.\n\nThis command checks a catalog item configuration and reports any validation issues, warnings, or errors found. Useful for ensuring catalog items are properly configured before deployment.",
4739
+ "examples": [
4740
+ {
4741
+ "description": "Validate a catalog item by sys_id",
4742
+ "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --auth dev"
4743
+ },
4744
+ {
4745
+ "description": "Validate a catalog item with JSON output",
4746
+ "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --json --auth dev"
4747
+ }
4748
+ ],
4749
+ "flags": {
4750
+ "json": {
4751
+ "char": "j",
4752
+ "description": "Output results as JSON",
4753
+ "name": "json",
4754
+ "required": false,
4755
+ "allowNo": false,
4756
+ "type": "boolean"
4757
+ },
4758
+ "auth": {
4759
+ "char": "a",
4760
+ "description": "Auth alias to use.",
4761
+ "name": "auth",
4456
4762
  "required": false,
4457
- "default": 20,
4458
4763
  "hasDynamicHelp": false,
4459
4764
  "multiple": false,
4460
4765
  "type": "option"
4461
4766
  },
4462
- "tab": {
4463
- "description": "Store tab context to search",
4464
- "name": "tab",
4767
+ "cred-store": {
4768
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4769
+ "helpGroup": "GLOBAL",
4770
+ "name": "cred-store",
4465
4771
  "required": false,
4466
- "default": "available_for_you",
4772
+ "allowNo": false,
4773
+ "type": "boolean"
4774
+ },
4775
+ "log-level": {
4776
+ "helpGroup": "GLOBAL",
4777
+ "name": "log-level",
4778
+ "summary": "Specify level for logging.",
4779
+ "default": "info",
4467
4780
  "hasDynamicHelp": false,
4468
4781
  "multiple": false,
4469
4782
  "options": [
4470
- "available_for_you",
4471
- "installed",
4472
- "updates"
4783
+ "debug",
4784
+ "warn",
4785
+ "error",
4786
+ "info",
4787
+ "trace"
4473
4788
  ],
4474
4789
  "type": "option"
4475
4790
  },
4476
- "term": {
4477
- "char": "t",
4478
- "description": "Search term",
4479
- "name": "term",
4480
- "required": false,
4791
+ "sys-id": {
4792
+ "char": "s",
4793
+ "description": "Catalog item sys_id to validate",
4794
+ "name": "sys-id",
4795
+ "required": true,
4481
4796
  "hasDynamicHelp": false,
4482
4797
  "multiple": false,
4483
4798
  "type": "option"
@@ -4485,7 +4800,7 @@
4485
4800
  },
4486
4801
  "hasDynamicHelp": false,
4487
4802
  "hiddenAliases": [],
4488
- "id": "store:search",
4803
+ "id": "schema:validate-catalog",
4489
4804
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4490
4805
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4491
4806
  "pluginType": "core",
@@ -4495,26 +4810,26 @@
4495
4810
  "relativePath": [
4496
4811
  "dist",
4497
4812
  "commands",
4498
- "store",
4499
- "search.js"
4813
+ "schema",
4814
+ "validate-catalog.js"
4500
4815
  ]
4501
4816
  },
4502
- "store:update": {
4817
+ "search:add-table": {
4503
4818
  "aliases": [],
4504
4819
  "args": {},
4505
- "description": "Update a ServiceNow Store application to a new version.",
4820
+ "description": "Add a table to a code search group on a ServiceNow instance.\n\nThis command registers a new table and its searchable fields with a search group, making the table's records discoverable through code search. This is useful when you need to include custom tables in code search results.\n\nFeatures:\n • Add custom tables to search groups\n • Specify which fields should be indexed\n • JSON output for scripting and automation",
4506
4821
  "examples": [
4507
4822
  {
4508
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
4509
- "description": "Update a store application and wait for completion"
4823
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
4824
+ "description": "Add a table to a search group"
4510
4825
  },
4511
4826
  {
4512
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
4513
- "description": "Update without waiting for completion"
4827
+ "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
4828
+ "description": "Add a table with multiple search fields"
4514
4829
  },
4515
4830
  {
4516
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
4517
- "description": "Update with custom timeout (1 hour)"
4831
+ "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
4832
+ "description": "Add a table with JSON output"
4518
4833
  }
4519
4834
  ],
4520
4835
  "flags": {
@@ -4534,6 +4849,14 @@
4534
4849
  "multiple": false,
4535
4850
  "type": "option"
4536
4851
  },
4852
+ "cred-store": {
4853
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4854
+ "helpGroup": "GLOBAL",
4855
+ "name": "cred-store",
4856
+ "required": false,
4857
+ "allowNo": false,
4858
+ "type": "boolean"
4859
+ },
4537
4860
  "log-level": {
4538
4861
  "helpGroup": "GLOBAL",
4539
4862
  "name": "log-level",
@@ -4550,44 +4873,28 @@
4550
4873
  ],
4551
4874
  "type": "option"
4552
4875
  },
4553
- "app-id": {
4554
- "char": "a",
4555
- "description": "Store application sys_id",
4556
- "name": "app-id",
4876
+ "search-fields": {
4877
+ "char": "f",
4878
+ "description": "Comma-separated list of fields to index for search",
4879
+ "name": "search-fields",
4557
4880
  "required": true,
4558
4881
  "hasDynamicHelp": false,
4559
4882
  "multiple": false,
4560
4883
  "type": "option"
4561
4884
  },
4562
- "no-wait": {
4563
- "description": "Do not wait for update to complete",
4564
- "name": "no-wait",
4565
- "required": false,
4566
- "allowNo": false,
4567
- "type": "boolean"
4568
- },
4569
- "poll-interval": {
4570
- "description": "Polling interval in milliseconds",
4571
- "name": "poll-interval",
4572
- "required": false,
4573
- "default": 5000,
4574
- "hasDynamicHelp": false,
4575
- "multiple": false,
4576
- "type": "option"
4577
- },
4578
- "timeout": {
4579
- "description": "Update timeout in milliseconds",
4580
- "name": "timeout",
4581
- "required": false,
4582
- "default": 1800000,
4885
+ "search-group": {
4886
+ "char": "g",
4887
+ "description": "Search group to add the table to",
4888
+ "name": "search-group",
4889
+ "required": true,
4583
4890
  "hasDynamicHelp": false,
4584
4891
  "multiple": false,
4585
4892
  "type": "option"
4586
4893
  },
4587
- "version": {
4588
- "char": "v",
4589
- "description": "Target application version",
4590
- "name": "version",
4894
+ "table": {
4895
+ "char": "t",
4896
+ "description": "Table name to add to the search group",
4897
+ "name": "table",
4591
4898
  "required": true,
4592
4899
  "hasDynamicHelp": false,
4593
4900
  "multiple": false,
@@ -4596,7 +4903,7 @@
4596
4903
  },
4597
4904
  "hasDynamicHelp": false,
4598
4905
  "hiddenAliases": [],
4599
- "id": "store:update",
4906
+ "id": "search:add-table",
4600
4907
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4601
4908
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4602
4909
  "pluginType": "core",
@@ -4606,18 +4913,22 @@
4606
4913
  "relativePath": [
4607
4914
  "dist",
4608
4915
  "commands",
4609
- "store",
4610
- "update.js"
4916
+ "search",
4917
+ "add-table.js"
4611
4918
  ]
4612
4919
  },
4613
- "store:validate": {
4920
+ "search:groups": {
4614
4921
  "aliases": [],
4615
4922
  "args": {},
4616
- "description": "Validate a batch installation definition file.",
4923
+ "description": "List all available code search groups on a ServiceNow instance.\n\nSearch groups organize searchable tables into logical categories. Use this command to discover which search groups are configured, then use the group names with other search commands to narrow your search scope.\n\nFeatures:\n • List all configured search groups\n • JSON output for scripting and automation",
4617
4924
  "examples": [
4618
4925
  {
4619
- "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
4620
- "description": "Validate a batch definition file"
4926
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
4927
+ "description": "List all search groups"
4928
+ },
4929
+ {
4930
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
4931
+ "description": "List search groups with JSON output"
4621
4932
  }
4622
4933
  ],
4623
4934
  "flags": {
@@ -4637,6 +4948,14 @@
4637
4948
  "multiple": false,
4638
4949
  "type": "option"
4639
4950
  },
4951
+ "cred-store": {
4952
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4953
+ "helpGroup": "GLOBAL",
4954
+ "name": "cred-store",
4955
+ "required": false,
4956
+ "allowNo": false,
4957
+ "type": "boolean"
4958
+ },
4640
4959
  "log-level": {
4641
4960
  "helpGroup": "GLOBAL",
4642
4961
  "name": "log-level",
@@ -4652,20 +4971,11 @@
4652
4971
  "trace"
4653
4972
  ],
4654
4973
  "type": "option"
4655
- },
4656
- "file": {
4657
- "char": "f",
4658
- "description": "Path to batch definition JSON file",
4659
- "name": "file",
4660
- "required": true,
4661
- "hasDynamicHelp": false,
4662
- "multiple": false,
4663
- "type": "option"
4664
4974
  }
4665
4975
  },
4666
4976
  "hasDynamicHelp": false,
4667
4977
  "hiddenAliases": [],
4668
- "id": "store:validate",
4978
+ "id": "search:groups",
4669
4979
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4670
4980
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4671
4981
  "pluginType": "core",
@@ -4675,22 +4985,30 @@
4675
4985
  "relativePath": [
4676
4986
  "dist",
4677
4987
  "commands",
4678
- "store",
4679
- "validate.js"
4988
+ "search",
4989
+ "groups.js"
4680
4990
  ]
4681
4991
  },
4682
- "task:approve": {
4992
+ "search": {
4683
4993
  "aliases": [],
4684
4994
  "args": {},
4685
- "description": "Approve a ServiceNow change request.\n\nThis command approves a change request identified by its number. You can optionally provide approval comments.\n\nFeatures:\n - Approve change requests\n - Optionally add approval comments\n - Auto-resolves change request number to sys_id",
4995
+ "description": "Search platform code across a ServiceNow instance.\n\nThis command allows you to search through code stored on the platform, including scripts, business rules, UI pages, and other scriptable records. You can search globally, within a specific application scope, or within a specific table and search group.\n\nFeatures:\n • Full-text code search across the platform\n • Scope-specific search within application boundaries\n • Table-specific search within a search group\n • JSON output for CI/CD integration\n • Configurable result limits",
4686
4996
  "examples": [
4687
4997
  {
4688
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
4689
- "description": "Approve a change request"
4998
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
4999
+ "description": "Search for a term across the entire instance"
4690
5000
  },
4691
5001
  {
4692
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
4693
- "description": "Approve a change request with comments"
5002
+ "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
5003
+ "description": "Search within a specific application scope"
5004
+ },
5005
+ {
5006
+ "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
5007
+ "description": "Search within a specific table and search group"
5008
+ },
5009
+ {
5010
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
5011
+ "description": "Search with a result limit and JSON output"
4694
5012
  }
4695
5013
  ],
4696
5014
  "flags": {
@@ -4710,6 +5028,14 @@
4710
5028
  "multiple": false,
4711
5029
  "type": "option"
4712
5030
  },
5031
+ "cred-store": {
5032
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5033
+ "helpGroup": "GLOBAL",
5034
+ "name": "cred-store",
5035
+ "required": false,
5036
+ "allowNo": false,
5037
+ "type": "boolean"
5038
+ },
4713
5039
  "log-level": {
4714
5040
  "helpGroup": "GLOBAL",
4715
5041
  "name": "log-level",
@@ -4726,19 +5052,45 @@
4726
5052
  ],
4727
5053
  "type": "option"
4728
5054
  },
4729
- "comments": {
4730
- "char": "c",
4731
- "description": "Approval comments",
4732
- "name": "comments",
5055
+ "limit": {
5056
+ "char": "l",
5057
+ "description": "Maximum number of results to return",
5058
+ "name": "limit",
4733
5059
  "required": false,
4734
5060
  "hasDynamicHelp": false,
4735
5061
  "multiple": false,
4736
5062
  "type": "option"
4737
5063
  },
4738
- "number": {
4739
- "char": "n",
4740
- "description": "Change request number (e.g., CHG0010001)",
4741
- "name": "number",
5064
+ "scope": {
5065
+ "char": "s",
5066
+ "description": "Application scope to search within",
5067
+ "name": "scope",
5068
+ "required": false,
5069
+ "hasDynamicHelp": false,
5070
+ "multiple": false,
5071
+ "type": "option"
5072
+ },
5073
+ "search-group": {
5074
+ "char": "g",
5075
+ "description": "Search group to search within (required when using --table)",
5076
+ "name": "search-group",
5077
+ "required": false,
5078
+ "hasDynamicHelp": false,
5079
+ "multiple": false,
5080
+ "type": "option"
5081
+ },
5082
+ "table": {
5083
+ "description": "Table name to search within (requires --search-group)",
5084
+ "name": "table",
5085
+ "required": false,
5086
+ "hasDynamicHelp": false,
5087
+ "multiple": false,
5088
+ "type": "option"
5089
+ },
5090
+ "term": {
5091
+ "char": "t",
5092
+ "description": "Search term to look for in platform code",
5093
+ "name": "term",
4742
5094
  "required": true,
4743
5095
  "hasDynamicHelp": false,
4744
5096
  "multiple": false,
@@ -4747,7 +5099,7 @@
4747
5099
  },
4748
5100
  "hasDynamicHelp": false,
4749
5101
  "hiddenAliases": [],
4750
- "id": "task:approve",
5102
+ "id": "search",
4751
5103
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4752
5104
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4753
5105
  "pluginType": "core",
@@ -4757,26 +5109,22 @@
4757
5109
  "relativePath": [
4758
5110
  "dist",
4759
5111
  "commands",
4760
- "task",
4761
- "approve.js"
5112
+ "search",
5113
+ "index.js"
4762
5114
  ]
4763
5115
  },
4764
- "task:assign": {
5116
+ "search:tables": {
4765
5117
  "aliases": [],
4766
5118
  "args": {},
4767
- "description": "Assign a ServiceNow task to a user or group.\n\nThis command assigns a task record identified by its number to a specified user and/or group. You can assign to a user, a group, or both simultaneously.\n\nFeatures:\n - Assign tasks to individual users\n - Assign tasks to assignment groups\n - Assign to both user and group at once\n - Supports any task-based table\n - Auto-resolves task number to sys_id",
5119
+ "description": "List tables configured for a specific code search group.\n\nEach search group contains one or more tables that are indexed for code search. Use this command to discover which tables belong to a search group, including the fields that are searchable on each table.\n\nFeatures:\n • List all tables in a search group\n • View searchable fields per table\n • JSON output for scripting and automation",
4768
5120
  "examples": [
4769
5121
  {
4770
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
4771
- "description": "Assign an incident to a user"
4772
- },
4773
- {
4774
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
4775
- "description": "Assign an incident to a user and group"
5122
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
5123
+ "description": "List tables in a search group"
4776
5124
  },
4777
5125
  {
4778
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
4779
- "description": "Assign a change request to a user"
5126
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
5127
+ "description": "List tables with JSON output"
4780
5128
  }
4781
5129
  ],
4782
5130
  "flags": {
@@ -4796,6 +5144,14 @@
4796
5144
  "multiple": false,
4797
5145
  "type": "option"
4798
5146
  },
5147
+ "cred-store": {
5148
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5149
+ "helpGroup": "GLOBAL",
5150
+ "name": "cred-store",
5151
+ "required": false,
5152
+ "allowNo": false,
5153
+ "type": "boolean"
5154
+ },
4799
5155
  "log-level": {
4800
5156
  "helpGroup": "GLOBAL",
4801
5157
  "name": "log-level",
@@ -4812,37 +5168,10 @@
4812
5168
  ],
4813
5169
  "type": "option"
4814
5170
  },
4815
- "group": {
5171
+ "search-group": {
4816
5172
  "char": "g",
4817
- "description": "Assignment group",
4818
- "name": "group",
4819
- "required": false,
4820
- "hasDynamicHelp": false,
4821
- "multiple": false,
4822
- "type": "option"
4823
- },
4824
- "number": {
4825
- "char": "n",
4826
- "description": "Task number (e.g., INC0010001)",
4827
- "name": "number",
4828
- "required": true,
4829
- "hasDynamicHelp": false,
4830
- "multiple": false,
4831
- "type": "option"
4832
- },
4833
- "table": {
4834
- "description": "ServiceNow table name",
4835
- "name": "table",
4836
- "required": false,
4837
- "default": "task",
4838
- "hasDynamicHelp": false,
4839
- "multiple": false,
4840
- "type": "option"
4841
- },
4842
- "user": {
4843
- "char": "u",
4844
- "description": "User to assign the task to",
4845
- "name": "user",
5173
+ "description": "Search group name to list tables for",
5174
+ "name": "search-group",
4846
5175
  "required": true,
4847
5176
  "hasDynamicHelp": false,
4848
5177
  "multiple": false,
@@ -4851,7 +5180,7 @@
4851
5180
  },
4852
5181
  "hasDynamicHelp": false,
4853
5182
  "hiddenAliases": [],
4854
- "id": "task:assign",
5183
+ "id": "search:tables",
4855
5184
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4856
5185
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4857
5186
  "pluginType": "core",
@@ -4861,22 +5190,26 @@
4861
5190
  "relativePath": [
4862
5191
  "dist",
4863
5192
  "commands",
4864
- "task",
4865
- "assign.js"
5193
+ "search",
5194
+ "tables.js"
4866
5195
  ]
4867
5196
  },
4868
- "task:close": {
5197
+ "store:install": {
4869
5198
  "aliases": [],
4870
5199
  "args": {},
4871
- "description": "Close a ServiceNow incident.\n\nThis command closes an incident identified by its number, setting the close notes and optionally a close code. The incident must be in a state that allows closure.\n\nFeatures:\n - Close incidents with close notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
5200
+ "description": "Install an application from the ServiceNow Store.",
4872
5201
  "examples": [
4873
5202
  {
4874
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
4875
- "description": "Close an incident with close notes"
5203
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
5204
+ "description": "Install a store application and wait for completion"
4876
5205
  },
4877
5206
  {
4878
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
4879
- "description": "Close with a specific close code"
5207
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
5208
+ "description": "Install without waiting for completion"
5209
+ },
5210
+ {
5211
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
5212
+ "description": "Install with demo data"
4880
5213
  }
4881
5214
  ],
4882
5215
  "flags": {
@@ -4896,6 +5229,14 @@
4896
5229
  "multiple": false,
4897
5230
  "type": "option"
4898
5231
  },
5232
+ "cred-store": {
5233
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5234
+ "helpGroup": "GLOBAL",
5235
+ "name": "cred-store",
5236
+ "required": false,
5237
+ "allowNo": false,
5238
+ "type": "boolean"
5239
+ },
4899
5240
  "log-level": {
4900
5241
  "helpGroup": "GLOBAL",
4901
5242
  "name": "log-level",
@@ -4912,26 +5253,51 @@
4912
5253
  ],
4913
5254
  "type": "option"
4914
5255
  },
4915
- "close-code": {
4916
- "description": "Close code for the closure",
4917
- "name": "close-code",
5256
+ "app-id": {
5257
+ "char": "a",
5258
+ "description": "Store application sys_id",
5259
+ "name": "app-id",
5260
+ "required": true,
5261
+ "hasDynamicHelp": false,
5262
+ "multiple": false,
5263
+ "type": "option"
5264
+ },
5265
+ "demo-data": {
5266
+ "description": "Load demo data during installation",
5267
+ "name": "demo-data",
5268
+ "required": false,
5269
+ "allowNo": false,
5270
+ "type": "boolean"
5271
+ },
5272
+ "no-wait": {
5273
+ "description": "Do not wait for installation to complete",
5274
+ "name": "no-wait",
5275
+ "required": false,
5276
+ "allowNo": false,
5277
+ "type": "boolean"
5278
+ },
5279
+ "poll-interval": {
5280
+ "description": "Polling interval in milliseconds",
5281
+ "name": "poll-interval",
4918
5282
  "required": false,
5283
+ "default": 5000,
4919
5284
  "hasDynamicHelp": false,
4920
5285
  "multiple": false,
4921
5286
  "type": "option"
4922
5287
  },
4923
- "notes": {
4924
- "description": "Close notes",
4925
- "name": "notes",
4926
- "required": true,
5288
+ "timeout": {
5289
+ "description": "Installation timeout in milliseconds",
5290
+ "name": "timeout",
5291
+ "required": false,
5292
+ "default": 1800000,
4927
5293
  "hasDynamicHelp": false,
4928
5294
  "multiple": false,
4929
5295
  "type": "option"
4930
5296
  },
4931
- "number": {
4932
- "char": "n",
4933
- "description": "Incident number (e.g., INC0010001)",
4934
- "name": "number",
5297
+ "version": {
5298
+ "char": "v",
5299
+ "description": "Application version to install",
5300
+ "name": "version",
4935
5301
  "required": true,
4936
5302
  "hasDynamicHelp": false,
4937
5303
  "multiple": false,
@@ -4940,7 +5306,7 @@
4940
5306
  },
4941
5307
  "hasDynamicHelp": false,
4942
5308
  "hiddenAliases": [],
4943
- "id": "task:close",
5309
+ "id": "store:install",
4944
5310
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4945
5311
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4946
5312
  "pluginType": "core",
@@ -4950,26 +5316,26 @@
4950
5316
  "relativePath": [
4951
5317
  "dist",
4952
5318
  "commands",
4953
- "task",
4954
- "close.js"
5319
+ "store",
5320
+ "install.js"
4955
5321
  ]
4956
5322
  },
4957
- "task:comment": {
5323
+ "store:search": {
4958
5324
  "aliases": [],
4959
5325
  "args": {},
4960
- "description": "Add a comment or work note to a ServiceNow task.\n\nThis command adds a comment or work note to a task record identified by its number. By default, comments are added as customer-visible comments. Use the --work-note flag to add an internal work note instead.\n\nFeatures:\n - Add customer-visible comments to any task\n - Add internal work notes visible only to fulfiller teams\n - Supports any task-based table (incident, change_request, etc.)\n - Auto-resolves task number to sys_id",
5326
+ "description": "Search for applications in the ServiceNow Store.",
4961
5327
  "examples": [
4962
5328
  {
4963
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
4964
- "description": "Add a comment to an incident"
5329
+ "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
5330
+ "description": "Search for applications matching a term"
4965
5331
  },
4966
5332
  {
4967
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
4968
- "description": "Add a work note to an incident"
5333
+ "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
5334
+ "description": "List installed applications"
4969
5335
  },
4970
5336
  {
4971
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
4972
- "description": "Add a comment to a change request"
5337
+ "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
5338
+ "description": "List applications with available updates"
4973
5339
  }
4974
5340
  ],
4975
5341
  "flags": {
@@ -4989,6 +5355,14 @@
4989
5355
  "multiple": false,
4990
5356
  "type": "option"
4991
5357
  },
5358
+ "cred-store": {
5359
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5360
+ "helpGroup": "GLOBAL",
5361
+ "name": "cred-store",
5362
+ "required": false,
5363
+ "allowNo": false,
5364
+ "type": "boolean"
5365
+ },
4992
5366
  "log-level": {
4993
5367
  "helpGroup": "GLOBAL",
4994
5368
  "name": "log-level",
@@ -5005,44 +5379,42 @@
5005
5379
  ],
5006
5380
  "type": "option"
5007
5381
  },
5008
- "comment": {
5009
- "char": "c",
5010
- "description": "Comment text to add",
5011
- "name": "comment",
5012
- "required": true,
5382
+ "limit": {
5383
+ "description": "Maximum number of results to return",
5384
+ "name": "limit",
5385
+ "required": false,
5386
+ "default": 20,
5013
5387
  "hasDynamicHelp": false,
5014
5388
  "multiple": false,
5015
5389
  "type": "option"
5016
5390
  },
5017
- "number": {
5018
- "char": "n",
5019
- "description": "Task number (e.g., INC0010001)",
5020
- "name": "number",
5021
- "required": true,
5391
+ "tab": {
5392
+ "description": "Store tab context to search",
5393
+ "name": "tab",
5394
+ "required": false,
5395
+ "default": "available_for_you",
5022
5396
  "hasDynamicHelp": false,
5023
5397
  "multiple": false,
5398
+ "options": [
5399
+ "available_for_you",
5400
+ "installed",
5401
+ "updates"
5402
+ ],
5024
5403
  "type": "option"
5025
5404
  },
5026
- "table": {
5027
- "description": "ServiceNow table name",
5028
- "name": "table",
5405
+ "term": {
5406
+ "char": "t",
5407
+ "description": "Search term",
5408
+ "name": "term",
5029
5409
  "required": false,
5030
- "default": "task",
5031
5410
  "hasDynamicHelp": false,
5032
5411
  "multiple": false,
5033
5412
  "type": "option"
5034
- },
5035
- "work-note": {
5036
- "description": "Add as work note instead of comment",
5037
- "name": "work-note",
5038
- "required": false,
5039
- "allowNo": false,
5040
- "type": "boolean"
5041
5413
  }
5042
5414
  },
5043
5415
  "hasDynamicHelp": false,
5044
5416
  "hiddenAliases": [],
5045
- "id": "task:comment",
5417
+ "id": "store:search",
5046
5418
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5047
5419
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5048
5420
  "pluginType": "core",
@@ -5052,26 +5424,26 @@
5052
5424
  "relativePath": [
5053
5425
  "dist",
5054
5426
  "commands",
5055
- "task",
5056
- "comment.js"
5427
+ "store",
5428
+ "search.js"
5057
5429
  ]
5058
5430
  },
5059
- "task:find": {
5431
+ "store:update": {
5060
5432
  "aliases": [],
5061
5433
  "args": {},
5062
- "description": "Find a ServiceNow task by its number.\n\nThis command looks up a task record by its number in the specified table. Returns the full task details including sys_id, description, state, and assignment information.\n\nFeatures:\n - Look up any task by number\n - Supports any task-based table\n - JSON output for scripting and automation",
5434
+ "description": "Update a ServiceNow Store application to a new version.",
5063
5435
  "examples": [
5064
5436
  {
5065
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
5066
- "description": "Find an incident by number"
5437
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
5438
+ "description": "Update a store application and wait for completion"
5067
5439
  },
5068
5440
  {
5069
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
5070
- "description": "Find a change request by number"
5441
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
5442
+ "description": "Update without waiting for completion"
5071
5443
  },
5072
5444
  {
5073
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
5074
- "description": "Find an incident and output as JSON"
5445
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
5446
+ "description": "Update with custom timeout (1 hour)"
5075
5447
  }
5076
5448
  ],
5077
5449
  "flags": {
@@ -5091,6 +5463,14 @@
5091
5463
  "multiple": false,
5092
5464
  "type": "option"
5093
5465
  },
5466
+ "cred-store": {
5467
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5468
+ "helpGroup": "GLOBAL",
5469
+ "name": "cred-store",
5470
+ "required": false,
5471
+ "allowNo": false,
5472
+ "type": "boolean"
5473
+ },
5094
5474
  "log-level": {
5095
5475
  "helpGroup": "GLOBAL",
5096
5476
  "name": "log-level",
@@ -5107,20 +5487,45 @@
5107
5487
  ],
5108
5488
  "type": "option"
5109
5489
  },
5110
- "number": {
5111
- "char": "n",
5112
- "description": "Task number (e.g., INC0010001, CHG0010001)",
5113
- "name": "number",
5490
+ "app-id": {
5491
+ "char": "a",
5492
+ "description": "Store application sys_id",
5493
+ "name": "app-id",
5114
5494
  "required": true,
5115
5495
  "hasDynamicHelp": false,
5116
5496
  "multiple": false,
5117
5497
  "type": "option"
5118
5498
  },
5119
- "table": {
5120
- "description": "ServiceNow table name",
5121
- "name": "table",
5499
+ "no-wait": {
5500
+ "description": "Do not wait for update to complete",
5501
+ "name": "no-wait",
5122
5502
  "required": false,
5123
- "default": "task",
5503
+ "allowNo": false,
5504
+ "type": "boolean"
5505
+ },
5506
+ "poll-interval": {
5507
+ "description": "Polling interval in milliseconds",
5508
+ "name": "poll-interval",
5509
+ "required": false,
5510
+ "default": 5000,
5511
+ "hasDynamicHelp": false,
5512
+ "multiple": false,
5513
+ "type": "option"
5514
+ },
5515
+ "timeout": {
5516
+ "description": "Update timeout in milliseconds",
5517
+ "name": "timeout",
5518
+ "required": false,
5519
+ "default": 1800000,
5520
+ "hasDynamicHelp": false,
5521
+ "multiple": false,
5522
+ "type": "option"
5523
+ },
5524
+ "version": {
5525
+ "char": "v",
5526
+ "description": "Target application version",
5527
+ "name": "version",
5528
+ "required": true,
5124
5529
  "hasDynamicHelp": false,
5125
5530
  "multiple": false,
5126
5531
  "type": "option"
@@ -5128,7 +5533,7 @@
5128
5533
  },
5129
5534
  "hasDynamicHelp": false,
5130
5535
  "hiddenAliases": [],
5131
- "id": "task:find",
5536
+ "id": "store:update",
5132
5537
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5133
5538
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5134
5539
  "pluginType": "core",
@@ -5138,22 +5543,18 @@
5138
5543
  "relativePath": [
5139
5544
  "dist",
5140
5545
  "commands",
5141
- "task",
5142
- "find.js"
5546
+ "store",
5547
+ "update.js"
5143
5548
  ]
5144
5549
  },
5145
- "task:resolve": {
5550
+ "store:validate": {
5146
5551
  "aliases": [],
5147
5552
  "args": {},
5148
- "description": "Resolve a ServiceNow incident with resolution notes.\n\nThis command resolves an incident identified by its number, setting the resolution notes and optionally a close code. The incident must be in a state that allows resolution.\n\nFeatures:\n - Resolve incidents with resolution notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
5553
+ "description": "Validate a batch installation definition file.",
5149
5554
  "examples": [
5150
5555
  {
5151
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
5152
- "description": "Resolve an incident with resolution notes"
5153
- },
5154
- {
5155
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
5156
- "description": "Resolve with a specific close code"
5556
+ "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
5557
+ "description": "Validate a batch definition file"
5157
5558
  }
5158
5559
  ],
5159
5560
  "flags": {
@@ -5173,42 +5574,34 @@
5173
5574
  "multiple": false,
5174
5575
  "type": "option"
5175
5576
  },
5176
- "log-level": {
5577
+ "cred-store": {
5578
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5177
5579
  "helpGroup": "GLOBAL",
5178
- "name": "log-level",
5179
- "summary": "Specify level for logging.",
5180
- "default": "info",
5181
- "hasDynamicHelp": false,
5182
- "multiple": false,
5183
- "options": [
5184
- "debug",
5185
- "warn",
5186
- "error",
5187
- "info",
5188
- "trace"
5189
- ],
5190
- "type": "option"
5191
- },
5192
- "close-code": {
5193
- "description": "Close code for the resolution",
5194
- "name": "close-code",
5580
+ "name": "cred-store",
5195
5581
  "required": false,
5196
- "hasDynamicHelp": false,
5197
- "multiple": false,
5198
- "type": "option"
5582
+ "allowNo": false,
5583
+ "type": "boolean"
5199
5584
  },
5200
- "notes": {
5201
- "description": "Resolution notes",
5202
- "name": "notes",
5203
- "required": true,
5585
+ "log-level": {
5586
+ "helpGroup": "GLOBAL",
5587
+ "name": "log-level",
5588
+ "summary": "Specify level for logging.",
5589
+ "default": "info",
5204
5590
  "hasDynamicHelp": false,
5205
5591
  "multiple": false,
5592
+ "options": [
5593
+ "debug",
5594
+ "warn",
5595
+ "error",
5596
+ "info",
5597
+ "trace"
5598
+ ],
5206
5599
  "type": "option"
5207
5600
  },
5208
- "number": {
5209
- "char": "n",
5210
- "description": "Incident number (e.g., INC0010001)",
5211
- "name": "number",
5601
+ "file": {
5602
+ "char": "f",
5603
+ "description": "Path to batch definition JSON file",
5604
+ "name": "file",
5212
5605
  "required": true,
5213
5606
  "hasDynamicHelp": false,
5214
5607
  "multiple": false,
@@ -5217,7 +5610,7 @@
5217
5610
  },
5218
5611
  "hasDynamicHelp": false,
5219
5612
  "hiddenAliases": [],
5220
- "id": "task:resolve",
5613
+ "id": "store:validate",
5221
5614
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5222
5615
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5223
5616
  "pluginType": "core",
@@ -5227,8 +5620,8 @@
5227
5620
  "relativePath": [
5228
5621
  "dist",
5229
5622
  "commands",
5230
- "task",
5231
- "resolve.js"
5623
+ "store",
5624
+ "validate.js"
5232
5625
  ]
5233
5626
  },
5234
5627
  "update-set:clone": {
@@ -5262,6 +5655,14 @@
5262
5655
  "multiple": false,
5263
5656
  "type": "option"
5264
5657
  },
5658
+ "cred-store": {
5659
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5660
+ "helpGroup": "GLOBAL",
5661
+ "name": "cred-store",
5662
+ "required": false,
5663
+ "allowNo": false,
5664
+ "type": "boolean"
5665
+ },
5265
5666
  "log-level": {
5266
5667
  "helpGroup": "GLOBAL",
5267
5668
  "name": "log-level",
@@ -5348,6 +5749,14 @@
5348
5749
  "multiple": false,
5349
5750
  "type": "option"
5350
5751
  },
5752
+ "cred-store": {
5753
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5754
+ "helpGroup": "GLOBAL",
5755
+ "name": "cred-store",
5756
+ "required": false,
5757
+ "allowNo": false,
5758
+ "type": "boolean"
5759
+ },
5351
5760
  "log-level": {
5352
5761
  "helpGroup": "GLOBAL",
5353
5762
  "name": "log-level",
@@ -5442,6 +5851,14 @@
5442
5851
  "multiple": false,
5443
5852
  "type": "option"
5444
5853
  },
5854
+ "cred-store": {
5855
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5856
+ "helpGroup": "GLOBAL",
5857
+ "name": "cred-store",
5858
+ "required": false,
5859
+ "allowNo": false,
5860
+ "type": "boolean"
5861
+ },
5445
5862
  "log-level": {
5446
5863
  "helpGroup": "GLOBAL",
5447
5864
  "name": "log-level",
@@ -5519,6 +5936,14 @@
5519
5936
  "multiple": false,
5520
5937
  "type": "option"
5521
5938
  },
5939
+ "cred-store": {
5940
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5941
+ "helpGroup": "GLOBAL",
5942
+ "name": "cred-store",
5943
+ "required": false,
5944
+ "allowNo": false,
5945
+ "type": "boolean"
5946
+ },
5522
5947
  "log-level": {
5523
5948
  "helpGroup": "GLOBAL",
5524
5949
  "name": "log-level",
@@ -5601,6 +6026,14 @@
5601
6026
  "multiple": false,
5602
6027
  "type": "option"
5603
6028
  },
6029
+ "cred-store": {
6030
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6031
+ "helpGroup": "GLOBAL",
6032
+ "name": "cred-store",
6033
+ "required": false,
6034
+ "allowNo": false,
6035
+ "type": "boolean"
6036
+ },
5604
6037
  "log-level": {
5605
6038
  "helpGroup": "GLOBAL",
5606
6039
  "name": "log-level",
@@ -5678,6 +6111,14 @@
5678
6111
  "multiple": false,
5679
6112
  "type": "option"
5680
6113
  },
6114
+ "cred-store": {
6115
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6116
+ "helpGroup": "GLOBAL",
6117
+ "name": "cred-store",
6118
+ "required": false,
6119
+ "allowNo": false,
6120
+ "type": "boolean"
6121
+ },
5681
6122
  "log-level": {
5682
6123
  "helpGroup": "GLOBAL",
5683
6124
  "name": "log-level",
@@ -5766,6 +6207,14 @@
5766
6207
  "multiple": false,
5767
6208
  "type": "option"
5768
6209
  },
6210
+ "cred-store": {
6211
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6212
+ "helpGroup": "GLOBAL",
6213
+ "name": "cred-store",
6214
+ "required": false,
6215
+ "allowNo": false,
6216
+ "type": "boolean"
6217
+ },
5769
6218
  "log-level": {
5770
6219
  "helpGroup": "GLOBAL",
5771
6220
  "name": "log-level",
@@ -5839,6 +6288,14 @@
5839
6288
  "multiple": false,
5840
6289
  "type": "option"
5841
6290
  },
6291
+ "cred-store": {
6292
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6293
+ "helpGroup": "GLOBAL",
6294
+ "name": "cred-store",
6295
+ "required": false,
6296
+ "allowNo": false,
6297
+ "type": "boolean"
6298
+ },
5842
6299
  "log-level": {
5843
6300
  "helpGroup": "GLOBAL",
5844
6301
  "name": "log-level",
@@ -5926,6 +6383,14 @@
5926
6383
  "multiple": false,
5927
6384
  "type": "option"
5928
6385
  },
6386
+ "cred-store": {
6387
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6388
+ "helpGroup": "GLOBAL",
6389
+ "name": "cred-store",
6390
+ "required": false,
6391
+ "allowNo": false,
6392
+ "type": "boolean"
6393
+ },
5929
6394
  "log-level": {
5930
6395
  "helpGroup": "GLOBAL",
5931
6396
  "name": "log-level",
@@ -6018,6 +6483,14 @@
6018
6483
  "multiple": false,
6019
6484
  "type": "option"
6020
6485
  },
6486
+ "cred-store": {
6487
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6488
+ "helpGroup": "GLOBAL",
6489
+ "name": "cred-store",
6490
+ "required": false,
6491
+ "allowNo": false,
6492
+ "type": "boolean"
6493
+ },
6021
6494
  "log-level": {
6022
6495
  "helpGroup": "GLOBAL",
6023
6496
  "name": "log-level",
@@ -6044,9 +6517,211 @@
6044
6517
  "type": "option"
6045
6518
  },
6046
6519
  "table": {
6047
- "char": "t",
6048
- "description": "Target table to import records into",
6520
+ "char": "t",
6521
+ "description": "Target table to import records into",
6522
+ "name": "table",
6523
+ "required": true,
6524
+ "hasDynamicHelp": false,
6525
+ "multiple": false,
6526
+ "type": "option"
6527
+ }
6528
+ },
6529
+ "hasDynamicHelp": false,
6530
+ "hiddenAliases": [],
6531
+ "id": "xml:import",
6532
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6533
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
6534
+ "pluginType": "core",
6535
+ "strict": true,
6536
+ "enableJsonFlag": true,
6537
+ "isESM": true,
6538
+ "relativePath": [
6539
+ "dist",
6540
+ "commands",
6541
+ "xml",
6542
+ "import.js"
6543
+ ]
6544
+ },
6545
+ "task:approve": {
6546
+ "aliases": [],
6547
+ "args": {},
6548
+ "description": "Approve a ServiceNow change request.\n\nThis command approves a change request identified by its number. You can optionally provide approval comments.\n\nFeatures:\n - Approve change requests\n - Optionally add approval comments\n - Auto-resolves change request number to sys_id",
6549
+ "examples": [
6550
+ {
6551
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
6552
+ "description": "Approve a change request"
6553
+ },
6554
+ {
6555
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
6556
+ "description": "Approve a change request with comments"
6557
+ }
6558
+ ],
6559
+ "flags": {
6560
+ "json": {
6561
+ "description": "Format output as json.",
6562
+ "helpGroup": "GLOBAL",
6563
+ "name": "json",
6564
+ "allowNo": false,
6565
+ "type": "boolean"
6566
+ },
6567
+ "auth": {
6568
+ "char": "a",
6569
+ "description": "Auth alias to use.",
6570
+ "name": "auth",
6571
+ "required": false,
6572
+ "hasDynamicHelp": false,
6573
+ "multiple": false,
6574
+ "type": "option"
6575
+ },
6576
+ "cred-store": {
6577
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6578
+ "helpGroup": "GLOBAL",
6579
+ "name": "cred-store",
6580
+ "required": false,
6581
+ "allowNo": false,
6582
+ "type": "boolean"
6583
+ },
6584
+ "log-level": {
6585
+ "helpGroup": "GLOBAL",
6586
+ "name": "log-level",
6587
+ "summary": "Specify level for logging.",
6588
+ "default": "info",
6589
+ "hasDynamicHelp": false,
6590
+ "multiple": false,
6591
+ "options": [
6592
+ "debug",
6593
+ "warn",
6594
+ "error",
6595
+ "info",
6596
+ "trace"
6597
+ ],
6598
+ "type": "option"
6599
+ },
6600
+ "comments": {
6601
+ "char": "c",
6602
+ "description": "Approval comments",
6603
+ "name": "comments",
6604
+ "required": false,
6605
+ "hasDynamicHelp": false,
6606
+ "multiple": false,
6607
+ "type": "option"
6608
+ },
6609
+ "number": {
6610
+ "char": "n",
6611
+ "description": "Change request number (e.g., CHG0010001)",
6612
+ "name": "number",
6613
+ "required": true,
6614
+ "hasDynamicHelp": false,
6615
+ "multiple": false,
6616
+ "type": "option"
6617
+ }
6618
+ },
6619
+ "hasDynamicHelp": false,
6620
+ "hiddenAliases": [],
6621
+ "id": "task:approve",
6622
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6623
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
6624
+ "pluginType": "core",
6625
+ "strict": true,
6626
+ "enableJsonFlag": true,
6627
+ "isESM": true,
6628
+ "relativePath": [
6629
+ "dist",
6630
+ "commands",
6631
+ "task",
6632
+ "approve.js"
6633
+ ]
6634
+ },
6635
+ "task:assign": {
6636
+ "aliases": [],
6637
+ "args": {},
6638
+ "description": "Assign a ServiceNow task to a user or group.\n\nThis command assigns a task record identified by its number to a specified user and/or group. You can assign to a user, a group, or both simultaneously.\n\nFeatures:\n - Assign tasks to individual users\n - Assign tasks to assignment groups\n - Assign to both user and group at once\n - Supports any task-based table\n - Auto-resolves task number to sys_id",
6639
+ "examples": [
6640
+ {
6641
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
6642
+ "description": "Assign an incident to a user"
6643
+ },
6644
+ {
6645
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
6646
+ "description": "Assign an incident to a user and group"
6647
+ },
6648
+ {
6649
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
6650
+ "description": "Assign a change request to a user"
6651
+ }
6652
+ ],
6653
+ "flags": {
6654
+ "json": {
6655
+ "description": "Format output as json.",
6656
+ "helpGroup": "GLOBAL",
6657
+ "name": "json",
6658
+ "allowNo": false,
6659
+ "type": "boolean"
6660
+ },
6661
+ "auth": {
6662
+ "char": "a",
6663
+ "description": "Auth alias to use.",
6664
+ "name": "auth",
6665
+ "required": false,
6666
+ "hasDynamicHelp": false,
6667
+ "multiple": false,
6668
+ "type": "option"
6669
+ },
6670
+ "cred-store": {
6671
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6672
+ "helpGroup": "GLOBAL",
6673
+ "name": "cred-store",
6674
+ "required": false,
6675
+ "allowNo": false,
6676
+ "type": "boolean"
6677
+ },
6678
+ "log-level": {
6679
+ "helpGroup": "GLOBAL",
6680
+ "name": "log-level",
6681
+ "summary": "Specify level for logging.",
6682
+ "default": "info",
6683
+ "hasDynamicHelp": false,
6684
+ "multiple": false,
6685
+ "options": [
6686
+ "debug",
6687
+ "warn",
6688
+ "error",
6689
+ "info",
6690
+ "trace"
6691
+ ],
6692
+ "type": "option"
6693
+ },
6694
+ "group": {
6695
+ "char": "g",
6696
+ "description": "Assignment group",
6697
+ "name": "group",
6698
+ "required": false,
6699
+ "hasDynamicHelp": false,
6700
+ "multiple": false,
6701
+ "type": "option"
6702
+ },
6703
+ "number": {
6704
+ "char": "n",
6705
+ "description": "Task number (e.g., INC0010001)",
6706
+ "name": "number",
6707
+ "required": true,
6708
+ "hasDynamicHelp": false,
6709
+ "multiple": false,
6710
+ "type": "option"
6711
+ },
6712
+ "table": {
6713
+ "description": "ServiceNow table name",
6049
6714
  "name": "table",
6715
+ "required": false,
6716
+ "default": "task",
6717
+ "hasDynamicHelp": false,
6718
+ "multiple": false,
6719
+ "type": "option"
6720
+ },
6721
+ "user": {
6722
+ "char": "u",
6723
+ "description": "User to assign the task to",
6724
+ "name": "user",
6050
6725
  "required": true,
6051
6726
  "hasDynamicHelp": false,
6052
6727
  "multiple": false,
@@ -6055,7 +6730,7 @@
6055
6730
  },
6056
6731
  "hasDynamicHelp": false,
6057
6732
  "hiddenAliases": [],
6058
- "id": "xml:import",
6733
+ "id": "task:assign",
6059
6734
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6060
6735
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6061
6736
  "pluginType": "core",
@@ -6065,26 +6740,22 @@
6065
6740
  "relativePath": [
6066
6741
  "dist",
6067
6742
  "commands",
6068
- "xml",
6069
- "import.js"
6743
+ "task",
6744
+ "assign.js"
6070
6745
  ]
6071
6746
  },
6072
- "search:add-table": {
6747
+ "task:close": {
6073
6748
  "aliases": [],
6074
6749
  "args": {},
6075
- "description": "Add a table to a code search group on a ServiceNow instance.\n\nThis command registers a new table and its searchable fields with a search group, making the table's records discoverable through code search. This is useful when you need to include custom tables in code search results.\n\nFeatures:\n • Add custom tables to search groups\n • Specify which fields should be indexed\n • JSON output for scripting and automation",
6750
+ "description": "Close a ServiceNow incident.\n\nThis command closes an incident identified by its number, setting the close notes and optionally a close code. The incident must be in a state that allows closure.\n\nFeatures:\n - Close incidents with close notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
6076
6751
  "examples": [
6077
6752
  {
6078
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
6079
- "description": "Add a table to a search group"
6080
- },
6081
- {
6082
- "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
6083
- "description": "Add a table with multiple search fields"
6753
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
6754
+ "description": "Close an incident with close notes"
6084
6755
  },
6085
6756
  {
6086
- "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
6087
- "description": "Add a table with JSON output"
6757
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
6758
+ "description": "Close with a specific close code"
6088
6759
  }
6089
6760
  ],
6090
6761
  "flags": {
@@ -6104,6 +6775,14 @@
6104
6775
  "multiple": false,
6105
6776
  "type": "option"
6106
6777
  },
6778
+ "cred-store": {
6779
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6780
+ "helpGroup": "GLOBAL",
6781
+ "name": "cred-store",
6782
+ "required": false,
6783
+ "allowNo": false,
6784
+ "type": "boolean"
6785
+ },
6107
6786
  "log-level": {
6108
6787
  "helpGroup": "GLOBAL",
6109
6788
  "name": "log-level",
@@ -6120,28 +6799,26 @@
6120
6799
  ],
6121
6800
  "type": "option"
6122
6801
  },
6123
- "search-fields": {
6124
- "char": "f",
6125
- "description": "Comma-separated list of fields to index for search",
6126
- "name": "search-fields",
6127
- "required": true,
6802
+ "close-code": {
6803
+ "description": "Close code for the closure",
6804
+ "name": "close-code",
6805
+ "required": false,
6128
6806
  "hasDynamicHelp": false,
6129
6807
  "multiple": false,
6130
6808
  "type": "option"
6131
6809
  },
6132
- "search-group": {
6133
- "char": "g",
6134
- "description": "Search group to add the table to",
6135
- "name": "search-group",
6810
+ "notes": {
6811
+ "description": "Close notes",
6812
+ "name": "notes",
6136
6813
  "required": true,
6137
6814
  "hasDynamicHelp": false,
6138
6815
  "multiple": false,
6139
6816
  "type": "option"
6140
6817
  },
6141
- "table": {
6142
- "char": "t",
6143
- "description": "Table name to add to the search group",
6144
- "name": "table",
6818
+ "number": {
6819
+ "char": "n",
6820
+ "description": "Incident number (e.g., INC0010001)",
6821
+ "name": "number",
6145
6822
  "required": true,
6146
6823
  "hasDynamicHelp": false,
6147
6824
  "multiple": false,
@@ -6150,7 +6827,7 @@
6150
6827
  },
6151
6828
  "hasDynamicHelp": false,
6152
6829
  "hiddenAliases": [],
6153
- "id": "search:add-table",
6830
+ "id": "task:close",
6154
6831
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6155
6832
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6156
6833
  "pluginType": "core",
@@ -6160,22 +6837,26 @@
6160
6837
  "relativePath": [
6161
6838
  "dist",
6162
6839
  "commands",
6163
- "search",
6164
- "add-table.js"
6840
+ "task",
6841
+ "close.js"
6165
6842
  ]
6166
6843
  },
6167
- "search:groups": {
6844
+ "task:comment": {
6168
6845
  "aliases": [],
6169
6846
  "args": {},
6170
- "description": "List all available code search groups on a ServiceNow instance.\n\nSearch groups organize searchable tables into logical categories. Use this command to discover which search groups are configured, then use the group names with other search commands to narrow your search scope.\n\nFeatures:\n • List all configured search groups\n • JSON output for scripting and automation",
6847
+ "description": "Add a comment or work note to a ServiceNow task.\n\nThis command adds a comment or work note to a task record identified by its number. By default, comments are added as customer-visible comments. Use the --work-note flag to add an internal work note instead.\n\nFeatures:\n - Add customer-visible comments to any task\n - Add internal work notes visible only to fulfiller teams\n - Supports any task-based table (incident, change_request, etc.)\n - Auto-resolves task number to sys_id",
6171
6848
  "examples": [
6172
6849
  {
6173
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6174
- "description": "List all search groups"
6850
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
6851
+ "description": "Add a comment to an incident"
6175
6852
  },
6176
6853
  {
6177
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6178
- "description": "List search groups with JSON output"
6854
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
6855
+ "description": "Add a work note to an incident"
6856
+ },
6857
+ {
6858
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
6859
+ "description": "Add a comment to a change request"
6179
6860
  }
6180
6861
  ],
6181
6862
  "flags": {
@@ -6195,6 +6876,14 @@
6195
6876
  "multiple": false,
6196
6877
  "type": "option"
6197
6878
  },
6879
+ "cred-store": {
6880
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6881
+ "helpGroup": "GLOBAL",
6882
+ "name": "cred-store",
6883
+ "required": false,
6884
+ "allowNo": false,
6885
+ "type": "boolean"
6886
+ },
6198
6887
  "log-level": {
6199
6888
  "helpGroup": "GLOBAL",
6200
6889
  "name": "log-level",
@@ -6210,11 +6899,45 @@
6210
6899
  "trace"
6211
6900
  ],
6212
6901
  "type": "option"
6902
+ },
6903
+ "comment": {
6904
+ "char": "c",
6905
+ "description": "Comment text to add",
6906
+ "name": "comment",
6907
+ "required": true,
6908
+ "hasDynamicHelp": false,
6909
+ "multiple": false,
6910
+ "type": "option"
6911
+ },
6912
+ "number": {
6913
+ "char": "n",
6914
+ "description": "Task number (e.g., INC0010001)",
6915
+ "name": "number",
6916
+ "required": true,
6917
+ "hasDynamicHelp": false,
6918
+ "multiple": false,
6919
+ "type": "option"
6920
+ },
6921
+ "table": {
6922
+ "description": "ServiceNow table name",
6923
+ "name": "table",
6924
+ "required": false,
6925
+ "default": "task",
6926
+ "hasDynamicHelp": false,
6927
+ "multiple": false,
6928
+ "type": "option"
6929
+ },
6930
+ "work-note": {
6931
+ "description": "Add as work note instead of comment",
6932
+ "name": "work-note",
6933
+ "required": false,
6934
+ "allowNo": false,
6935
+ "type": "boolean"
6213
6936
  }
6214
6937
  },
6215
6938
  "hasDynamicHelp": false,
6216
6939
  "hiddenAliases": [],
6217
- "id": "search:groups",
6940
+ "id": "task:comment",
6218
6941
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6219
6942
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6220
6943
  "pluginType": "core",
@@ -6224,30 +6947,26 @@
6224
6947
  "relativePath": [
6225
6948
  "dist",
6226
6949
  "commands",
6227
- "search",
6228
- "groups.js"
6950
+ "task",
6951
+ "comment.js"
6229
6952
  ]
6230
6953
  },
6231
- "search": {
6954
+ "task:find": {
6232
6955
  "aliases": [],
6233
6956
  "args": {},
6234
- "description": "Search platform code across a ServiceNow instance.\n\nThis command allows you to search through code stored on the platform, including scripts, business rules, UI pages, and other scriptable records. You can search globally, within a specific application scope, or within a specific table and search group.\n\nFeatures:\n • Full-text code search across the platform\n • Scope-specific search within application boundaries\n • Table-specific search within a search group\n • JSON output for CI/CD integration\n • Configurable result limits",
6957
+ "description": "Find a ServiceNow task by its number.\n\nThis command looks up a task record by its number in the specified table. Returns the full task details including sys_id, description, state, and assignment information.\n\nFeatures:\n - Look up any task by number\n - Supports any task-based table\n - JSON output for scripting and automation",
6235
6958
  "examples": [
6236
6959
  {
6237
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
6238
- "description": "Search for a term across the entire instance"
6239
- },
6240
- {
6241
- "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
6242
- "description": "Search within a specific application scope"
6960
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
6961
+ "description": "Find an incident by number"
6243
6962
  },
6244
6963
  {
6245
- "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
6246
- "description": "Search within a specific table and search group"
6964
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
6965
+ "description": "Find a change request by number"
6247
6966
  },
6248
6967
  {
6249
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
6250
- "description": "Search with a result limit and JSON output"
6968
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
6969
+ "description": "Find an incident and output as JSON"
6251
6970
  }
6252
6971
  ],
6253
6972
  "flags": {
@@ -6267,6 +6986,14 @@
6267
6986
  "multiple": false,
6268
6987
  "type": "option"
6269
6988
  },
6989
+ "cred-store": {
6990
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6991
+ "helpGroup": "GLOBAL",
6992
+ "name": "cred-store",
6993
+ "required": false,
6994
+ "allowNo": false,
6995
+ "type": "boolean"
6996
+ },
6270
6997
  "log-level": {
6271
6998
  "helpGroup": "GLOBAL",
6272
6999
  "name": "log-level",
@@ -6283,46 +7010,20 @@
6283
7010
  ],
6284
7011
  "type": "option"
6285
7012
  },
6286
- "limit": {
6287
- "char": "l",
6288
- "description": "Maximum number of results to return",
6289
- "name": "limit",
6290
- "required": false,
6291
- "hasDynamicHelp": false,
6292
- "multiple": false,
6293
- "type": "option"
6294
- },
6295
- "scope": {
6296
- "char": "s",
6297
- "description": "Application scope to search within",
6298
- "name": "scope",
6299
- "required": false,
6300
- "hasDynamicHelp": false,
6301
- "multiple": false,
6302
- "type": "option"
6303
- },
6304
- "search-group": {
6305
- "char": "g",
6306
- "description": "Search group to search within (required when using --table)",
6307
- "name": "search-group",
6308
- "required": false,
7013
+ "number": {
7014
+ "char": "n",
7015
+ "description": "Task number (e.g., INC0010001, CHG0010001)",
7016
+ "name": "number",
7017
+ "required": true,
6309
7018
  "hasDynamicHelp": false,
6310
7019
  "multiple": false,
6311
7020
  "type": "option"
6312
7021
  },
6313
7022
  "table": {
6314
- "description": "Table name to search within (requires --search-group)",
7023
+ "description": "ServiceNow table name",
6315
7024
  "name": "table",
6316
7025
  "required": false,
6317
- "hasDynamicHelp": false,
6318
- "multiple": false,
6319
- "type": "option"
6320
- },
6321
- "term": {
6322
- "char": "t",
6323
- "description": "Search term to look for in platform code",
6324
- "name": "term",
6325
- "required": true,
7026
+ "default": "task",
6326
7027
  "hasDynamicHelp": false,
6327
7028
  "multiple": false,
6328
7029
  "type": "option"
@@ -6330,7 +7031,7 @@
6330
7031
  },
6331
7032
  "hasDynamicHelp": false,
6332
7033
  "hiddenAliases": [],
6333
- "id": "search",
7034
+ "id": "task:find",
6334
7035
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6335
7036
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6336
7037
  "pluginType": "core",
@@ -6340,22 +7041,22 @@
6340
7041
  "relativePath": [
6341
7042
  "dist",
6342
7043
  "commands",
6343
- "search",
6344
- "index.js"
7044
+ "task",
7045
+ "find.js"
6345
7046
  ]
6346
7047
  },
6347
- "search:tables": {
7048
+ "task:resolve": {
6348
7049
  "aliases": [],
6349
7050
  "args": {},
6350
- "description": "List tables configured for a specific code search group.\n\nEach search group contains one or more tables that are indexed for code search. Use this command to discover which tables belong to a search group, including the fields that are searchable on each table.\n\nFeatures:\n • List all tables in a search group\n • View searchable fields per table\n • JSON output for scripting and automation",
7051
+ "description": "Resolve a ServiceNow incident with resolution notes.\n\nThis command resolves an incident identified by its number, setting the resolution notes and optionally a close code. The incident must be in a state that allows resolution.\n\nFeatures:\n - Resolve incidents with resolution notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
6351
7052
  "examples": [
6352
7053
  {
6353
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
6354
- "description": "List tables in a search group"
7054
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
7055
+ "description": "Resolve an incident with resolution notes"
6355
7056
  },
6356
7057
  {
6357
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
6358
- "description": "List tables with JSON output"
7058
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
7059
+ "description": "Resolve with a specific close code"
6359
7060
  }
6360
7061
  ],
6361
7062
  "flags": {
@@ -6375,6 +7076,14 @@
6375
7076
  "multiple": false,
6376
7077
  "type": "option"
6377
7078
  },
7079
+ "cred-store": {
7080
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
7081
+ "helpGroup": "GLOBAL",
7082
+ "name": "cred-store",
7083
+ "required": false,
7084
+ "allowNo": false,
7085
+ "type": "boolean"
7086
+ },
6378
7087
  "log-level": {
6379
7088
  "helpGroup": "GLOBAL",
6380
7089
  "name": "log-level",
@@ -6391,10 +7100,26 @@
6391
7100
  ],
6392
7101
  "type": "option"
6393
7102
  },
6394
- "search-group": {
6395
- "char": "g",
6396
- "description": "Search group name to list tables for",
6397
- "name": "search-group",
7103
+ "close-code": {
7104
+ "description": "Close code for the resolution",
7105
+ "name": "close-code",
7106
+ "required": false,
7107
+ "hasDynamicHelp": false,
7108
+ "multiple": false,
7109
+ "type": "option"
7110
+ },
7111
+ "notes": {
7112
+ "description": "Resolution notes",
7113
+ "name": "notes",
7114
+ "required": true,
7115
+ "hasDynamicHelp": false,
7116
+ "multiple": false,
7117
+ "type": "option"
7118
+ },
7119
+ "number": {
7120
+ "char": "n",
7121
+ "description": "Incident number (e.g., INC0010001)",
7122
+ "name": "number",
6398
7123
  "required": true,
6399
7124
  "hasDynamicHelp": false,
6400
7125
  "multiple": false,
@@ -6403,7 +7128,7 @@
6403
7128
  },
6404
7129
  "hasDynamicHelp": false,
6405
7130
  "hiddenAliases": [],
6406
- "id": "search:tables",
7131
+ "id": "task:resolve",
6407
7132
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6408
7133
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6409
7134
  "pluginType": "core",
@@ -6413,10 +7138,10 @@
6413
7138
  "relativePath": [
6414
7139
  "dist",
6415
7140
  "commands",
6416
- "search",
6417
- "tables.js"
7141
+ "task",
7142
+ "resolve.js"
6418
7143
  ]
6419
7144
  }
6420
7145
  },
6421
- "version": "3.0.0"
7146
+ "version": "5.0.0"
6422
7147
  }