@sentinelconnector/cli 0.4.0 → 0.5.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.
@@ -2858,6 +2858,101 @@
2858
2858
  "query": [],
2859
2859
  "body": null
2860
2860
  },
2861
+ {
2862
+ "group": "modules",
2863
+ "name": "export-dashboard-module-sites",
2864
+ "method": "GET",
2865
+ "path": "/api/v1/modules/dashboard/status/{module_id}/sites/export",
2866
+ "policy": "read",
2867
+ "summary": "Download the sites that run a module",
2868
+ "description": "Every site running the module, as CSV, in list order.",
2869
+ "pathParams": [
2870
+ "module_id"
2871
+ ],
2872
+ "query": [
2873
+ {
2874
+ "name": "organization_id",
2875
+ "type": "integer",
2876
+ "required": false,
2877
+ "description": "Active organization scope"
2878
+ },
2879
+ {
2880
+ "name": "sort_by",
2881
+ "type": "string",
2882
+ "required": false,
2883
+ "values": [
2884
+ "site",
2885
+ "status",
2886
+ "last_updated"
2887
+ ],
2888
+ "description": "Column to sort by"
2889
+ },
2890
+ {
2891
+ "name": "sort_order",
2892
+ "type": "string",
2893
+ "required": false,
2894
+ "values": [
2895
+ "asc",
2896
+ "desc"
2897
+ ],
2898
+ "description": "Sort direction"
2899
+ }
2900
+ ],
2901
+ "body": null
2902
+ },
2903
+ {
2904
+ "group": "modules",
2905
+ "name": "export-dashboard-module-status",
2906
+ "method": "GET",
2907
+ "path": "/api/v1/modules/dashboard/status/export",
2908
+ "policy": "read",
2909
+ "summary": "Download the module status list",
2910
+ "description": "Every module the filters match, as CSV, in list order. Not paginated.",
2911
+ "pathParams": [],
2912
+ "query": [
2913
+ {
2914
+ "name": "search",
2915
+ "type": "string",
2916
+ "required": false,
2917
+ "description": "Search modules by name"
2918
+ },
2919
+ {
2920
+ "name": "security_only",
2921
+ "type": "boolean",
2922
+ "required": false,
2923
+ "description": "Show only modules with security updates"
2924
+ },
2925
+ {
2926
+ "name": "organization_id",
2927
+ "type": "integer",
2928
+ "required": false,
2929
+ "description": "Active organization scope"
2930
+ },
2931
+ {
2932
+ "name": "sort_by",
2933
+ "type": "string",
2934
+ "required": false,
2935
+ "values": [
2936
+ "name",
2937
+ "status",
2938
+ "sites",
2939
+ "last_updated"
2940
+ ],
2941
+ "description": "Column to sort by"
2942
+ },
2943
+ {
2944
+ "name": "sort_order",
2945
+ "type": "string",
2946
+ "required": false,
2947
+ "values": [
2948
+ "asc",
2949
+ "desc"
2950
+ ],
2951
+ "description": "Sort direction"
2952
+ }
2953
+ ],
2954
+ "body": null
2955
+ },
2861
2956
  {
2862
2957
  "group": "modules",
2863
2958
  "name": "get-dashboard-module-overview",
@@ -2883,14 +2978,56 @@
2883
2978
  ],
2884
2979
  "body": null
2885
2980
  },
2981
+ {
2982
+ "group": "modules",
2983
+ "name": "get-dashboard-module-sites",
2984
+ "method": "GET",
2985
+ "path": "/api/v1/modules/dashboard/status/{module_id}/sites",
2986
+ "policy": "read",
2987
+ "summary": "List the sites that run a module",
2988
+ "description": "Every live site of the organisation running the module, with its version.",
2989
+ "pathParams": [
2990
+ "module_id"
2991
+ ],
2992
+ "query": [
2993
+ {
2994
+ "name": "organization_id",
2995
+ "type": "integer",
2996
+ "required": false,
2997
+ "description": "Active organization scope"
2998
+ },
2999
+ {
3000
+ "name": "sort_by",
3001
+ "type": "string",
3002
+ "required": false,
3003
+ "values": [
3004
+ "site",
3005
+ "status",
3006
+ "last_updated"
3007
+ ],
3008
+ "description": "Column to sort by"
3009
+ },
3010
+ {
3011
+ "name": "sort_order",
3012
+ "type": "string",
3013
+ "required": false,
3014
+ "values": [
3015
+ "asc",
3016
+ "desc"
3017
+ ],
3018
+ "description": "Sort direction"
3019
+ }
3020
+ ],
3021
+ "body": null
3022
+ },
2886
3023
  {
2887
3024
  "group": "modules",
2888
3025
  "name": "get-dashboard-module-status",
2889
3026
  "method": "GET",
2890
3027
  "path": "/api/v1/modules/dashboard/status",
2891
3028
  "policy": "read",
2892
- "summary": "Get Dashboard Module Status",
2893
- "description": "Get module status overview for dashboard table.",
3029
+ "summary": "List the modules your sites run",
3030
+ "description": "One row per module the organisation's sites run, with every version.",
2894
3031
  "pathParams": [],
2895
3032
  "query": [
2896
3033
  {
@@ -2917,6 +3054,28 @@
2917
3054
  "required": false,
2918
3055
  "description": "Deprecated alias for organization_id"
2919
3056
  },
3057
+ {
3058
+ "name": "sort_by",
3059
+ "type": "string",
3060
+ "required": false,
3061
+ "values": [
3062
+ "name",
3063
+ "status",
3064
+ "sites",
3065
+ "last_updated"
3066
+ ],
3067
+ "description": "Column to sort by"
3068
+ },
3069
+ {
3070
+ "name": "sort_order",
3071
+ "type": "string",
3072
+ "required": false,
3073
+ "values": [
3074
+ "asc",
3075
+ "desc"
3076
+ ],
3077
+ "description": "Sort direction"
3078
+ },
2920
3079
  {
2921
3080
  "name": "page",
2922
3081
  "type": "integer",
@@ -5594,7 +5753,7 @@
5594
5753
  "path": "/api/v1/organizations/{organization_id}/users/{user_id}",
5595
5754
  "policy": "mfa",
5596
5755
  "summary": "Remove User From Organization",
5597
- "description": "Remove a user from an organization (superuser or org_admin).",
5756
+ "description": "Delete a member from this organisation (superuser or org_admin). When they then belong to no organisation, their login is deleted too, so an administrator can fully remove someone who only worked with them (#3404). A login that still belongs elsewhere is kept.",
5598
5757
  "pathParams": [
5599
5758
  "organization_id",
5600
5759
  "user_id"
@@ -5996,6 +6155,31 @@
5996
6155
  ]
5997
6156
  }
5998
6157
  },
6158
+ {
6159
+ "group": "organizations",
6160
+ "name": "update-member-status",
6161
+ "method": "PUT",
6162
+ "path": "/api/v1/organizations/{organization_id}/users/{user_id}/status",
6163
+ "policy": "mfa",
6164
+ "summary": "Deactivate or activate a member in this organisation",
6165
+ "description": "Deactivate pauses the person in this organisation only: they lose access here at once and keep their other organisations. Activate gives back the role they had. Organisation administrators of this organisation only (#3404).",
6166
+ "pathParams": [
6167
+ "organization_id",
6168
+ "user_id"
6169
+ ],
6170
+ "query": [],
6171
+ "body": {
6172
+ "required": true,
6173
+ "fields": [
6174
+ {
6175
+ "name": "is_active",
6176
+ "type": "boolean",
6177
+ "required": true,
6178
+ "description": ""
6179
+ }
6180
+ ]
6181
+ }
6182
+ },
5999
6183
  {
6000
6184
  "group": "organizations",
6001
6185
  "name": "update-organization",
@@ -6617,6 +6801,50 @@
6617
6801
  ]
6618
6802
  }
6619
6803
  },
6804
+ {
6805
+ "group": "patching",
6806
+ "name": "connect-gitlab-token",
6807
+ "method": "POST",
6808
+ "path": "/api/v1/patching/git-hosts/gitlab/token",
6809
+ "policy": "mfa",
6810
+ "summary": "Connect Gitlab Token",
6811
+ "description": "Connect GitLab.com with a group, project or personal access token. The token is checked with GitLab.com (active, expiry date, the ``api`` scope for updates or ``read_api`` for read only) and kept write-only in the vault; it is never returned. Works without the GitLab.com OAuth application. Organisation administrators with a recent second factor.",
6812
+ "pathParams": [],
6813
+ "query": [],
6814
+ "body": {
6815
+ "required": true,
6816
+ "fields": [
6817
+ {
6818
+ "name": "organization_id",
6819
+ "type": "integer",
6820
+ "required": true,
6821
+ "description": ""
6822
+ },
6823
+ {
6824
+ "name": "token",
6825
+ "type": "string",
6826
+ "required": true,
6827
+ "description": ""
6828
+ },
6829
+ {
6830
+ "name": "access",
6831
+ "type": "string",
6832
+ "required": false,
6833
+ "values": [
6834
+ "read",
6835
+ "write"
6836
+ ],
6837
+ "description": ""
6838
+ },
6839
+ {
6840
+ "name": "label",
6841
+ "type": "string",
6842
+ "required": false,
6843
+ "description": ""
6844
+ }
6845
+ ]
6846
+ }
6847
+ },
6620
6848
  {
6621
6849
  "group": "patching",
6622
6850
  "name": "connect-provider",
@@ -7549,6 +7777,18 @@
7549
7777
  ],
7550
7778
  "description": ""
7551
7779
  },
7780
+ {
7781
+ "name": "started_by",
7782
+ "type": "string",
7783
+ "required": false,
7784
+ "values": [
7785
+ "schedule",
7786
+ "autopilot",
7787
+ "person",
7788
+ "follow_up"
7789
+ ],
7790
+ "description": ""
7791
+ },
7552
7792
  {
7553
7793
  "name": "days",
7554
7794
  "type": "integer",
@@ -8170,6 +8410,46 @@
8170
8410
  ],
8171
8411
  "body": null
8172
8412
  },
8413
+ {
8414
+ "group": "patching",
8415
+ "name": "replace-gitlab-token",
8416
+ "method": "POST",
8417
+ "path": "/api/v1/patching/git-hosts/gitlab/token/{connection_id}",
8418
+ "policy": "mfa",
8419
+ "summary": "Replace Gitlab Token",
8420
+ "description": "Replace a GitLab.com connection's token with a new one of the same user. The new token must belong to the same group or project (a new bot of it is fine), or the same account for a personal token, so every site keeps its repository. Clears an error state.",
8421
+ "pathParams": [
8422
+ "connection_id"
8423
+ ],
8424
+ "query": [],
8425
+ "body": {
8426
+ "required": true,
8427
+ "fields": [
8428
+ {
8429
+ "name": "organization_id",
8430
+ "type": "integer",
8431
+ "required": true,
8432
+ "description": ""
8433
+ },
8434
+ {
8435
+ "name": "token",
8436
+ "type": "string",
8437
+ "required": true,
8438
+ "description": ""
8439
+ },
8440
+ {
8441
+ "name": "access",
8442
+ "type": "string",
8443
+ "required": false,
8444
+ "values": [
8445
+ "read",
8446
+ "write"
8447
+ ],
8448
+ "description": ""
8449
+ }
8450
+ ]
8451
+ }
8452
+ },
8173
8453
  {
8174
8454
  "group": "patching",
8175
8455
  "name": "revoke-secret",
@@ -9496,27 +9776,6 @@
9496
9776
  ]
9497
9777
  }
9498
9778
  },
9499
- {
9500
- "group": "sites",
9501
- "name": "create-upgrade-scan-key",
9502
- "method": "POST",
9503
- "path": "/api/v1/sites/{site_uuid}/upgrade-readiness/scan-key",
9504
- "policy": "dashboard_only",
9505
- "summary": "Create an upgrade scan key for a site",
9506
- "description": "Create the key the CI job sends its scan with. Shown once. Needs a fresh second-factor code. With ``replace``, a new key replaces the old one, which stops working at once. The key can only send scans for this site.",
9507
- "pathParams": [
9508
- "site_uuid"
9509
- ],
9510
- "query": [
9511
- {
9512
- "name": "replace",
9513
- "type": "boolean",
9514
- "required": false,
9515
- "description": "Replace the site's key if it has one. Without it, a site that has a key answers 409, so two people cannot replace each other's key unseen."
9516
- }
9517
- ],
9518
- "body": null
9519
- },
9520
9779
  {
9521
9780
  "group": "sites",
9522
9781
  "name": "delete-draft",
@@ -10547,20 +10806,6 @@
10547
10806
  ],
10548
10807
  "body": null
10549
10808
  },
10550
- {
10551
- "group": "sites",
10552
- "name": "get-upgrade-scan-key",
10553
- "method": "GET",
10554
- "path": "/api/v1/sites/{site_uuid}/upgrade-readiness/scan-key",
10555
- "policy": "read",
10556
- "summary": "See whether a site has an upgrade scan key",
10557
- "description": "The key's start, creation and last use. Never the key itself.",
10558
- "pathParams": [
10559
- "site_uuid"
10560
- ],
10561
- "query": [],
10562
- "body": null
10563
- },
10564
10809
  {
10565
10810
  "group": "sites",
10566
10811
  "name": "list-dependabot-alerts",
@@ -10798,6 +11043,27 @@
10798
11043
  ],
10799
11044
  "body": null
10800
11045
  },
11046
+ {
11047
+ "group": "sites",
11048
+ "name": "list-site-repository-branches",
11049
+ "method": "GET",
11050
+ "path": "/api/v1/sites/{site_uuid}/patching/repository/branches",
11051
+ "policy": "read",
11052
+ "summary": "List the branches of the site's repository",
11053
+ "description": "Branch names of the repository chosen for this site (#3227). For the enrolment picker: up to 100 names, default branch first. ``q`` narrows the list to names that contain it, and an exact name past the first page is still found. Names only; nothing is stored.",
11054
+ "pathParams": [
11055
+ "site_uuid"
11056
+ ],
11057
+ "query": [
11058
+ {
11059
+ "name": "q",
11060
+ "type": "string",
11061
+ "required": false,
11062
+ "description": ""
11063
+ }
11064
+ ],
11065
+ "body": null
11066
+ },
10801
11067
  {
10802
11068
  "group": "sites",
10803
11069
  "name": "list-stack-vulnerabilities",
@@ -11257,30 +11523,6 @@
11257
11523
  ]
11258
11524
  }
11259
11525
  },
11260
- {
11261
- "group": "sites",
11262
- "name": "put-upgrade-readiness-display",
11263
- "method": "PUT",
11264
- "path": "/api/v1/sites/{site_uuid}/upgrade-readiness/display",
11265
- "policy": "write",
11266
- "summary": "Show or hide Drupal upgrade readiness on a site",
11267
- "description": "Show or hide upgrade readiness on the site's Summary tab. Needs ``site:write`` (organisation administrators and site managers). Another organisation's site reads as missing. Hiding it keeps the stored result.",
11268
- "pathParams": [
11269
- "site_uuid"
11270
- ],
11271
- "query": [],
11272
- "body": {
11273
- "required": true,
11274
- "fields": [
11275
- {
11276
- "name": "shown",
11277
- "type": "boolean",
11278
- "required": true,
11279
- "description": ""
11280
- }
11281
- ]
11282
- }
11283
- },
11284
11526
  {
11285
11527
  "group": "sites",
11286
11528
  "name": "read-declared-stack",
@@ -11787,20 +12029,6 @@
11787
12029
  "query": [],
11788
12030
  "body": null
11789
12031
  },
11790
- {
11791
- "group": "sites",
11792
- "name": "revoke-upgrade-scan-key",
11793
- "method": "DELETE",
11794
- "path": "/api/v1/sites/{site_uuid}/upgrade-readiness/scan-key",
11795
- "policy": "dashboard_only",
11796
- "summary": "Revoke a site's upgrade scan key",
11797
- "description": "Stop the key working. Results already sent stay. Needs a fresh code.",
11798
- "pathParams": [
11799
- "site_uuid"
11800
- ],
11801
- "query": [],
11802
- "body": null
11803
- },
11804
12032
  {
11805
12033
  "group": "sites",
11806
12034
  "name": "rotate-site-api-key",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentinelconnector/cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Sentinel CLI (sentinel) and MCP server (sentinel-mcp) for customers",
5
5
  "private": false,
6
6
  "license": "UNLICENSED",
@@ -63,7 +63,8 @@ Each operation has a policy:
63
63
  Never ask for an authenticator, recovery or phone code, and never pass one on. A personal API token can
64
64
  never take an `mfa` step.
65
65
 
66
- Steps with the `mfa` policy include deploying a pull request, accepting Patching terms, acknowledging
66
+ Steps with the `mfa` policy include deploying a pull request, cancelling a queued manual deployment,
67
+ accepting Patching terms, acknowledging
67
68
  required checks, adding keys and secrets, and changing members and roles.
68
69
 
69
70
  ## Common jobs
@@ -104,6 +105,21 @@ Every deployment has a reference such as `dep_` followed by 32 letters and digit
104
105
  the organisation's deployments at `/app/deployments` and one deployment at `/app/deployments/<reference>`.
105
106
  Reading them needs Patching read, the same as jobs.
106
107
 
108
+ An accepted manual deployment keeps its recorded consent if its requester later loses deployment
109
+ permission or organisation membership. That change does not cancel it. The server still applies
110
+ the product, subscription, site and deployment safety checks. Autopilot has its own standing rules.
111
+
112
+ **Cancel a queued manual deployment.** Where the server and installed route list offer cancellation,
113
+ use it only after the person explicitly chooses to cancel and the deployment returns `can_cancel: true`.
114
+ The operation is `POST /sites/{site_uuid}/patching/deployments/{deployment_id}/cancel`. Current
115
+ organisation administrators and site managers with site access can take this `mfa` step. Over MCP,
116
+ give the person the dashboard link; never ask for or pass on a second-factor code. An accepted
117
+ cancellation returns `cancelled`: nothing was merged or sent to the hosting platform. If the worker
118
+ has started, 409 `deployment_not_cancellable` means the cancellation did not take effect; read the
119
+ deployment again. Cancellation does not stop a running deployment or reverse a merge. **Stop job**
120
+ stops preparation work, not a deployment. Do not use it as a substitute. If this client has no
121
+ cancellation operation, use **Cancel deployment** on the deployment's dashboard page when offered.
122
+
107
123
  - **List:** `sentinel patching list-organization-deployments --organization-id <id>`, or `sentinel_read`
108
124
  with that operation. Running deployments come first, then the newest. Filter with `--state` (`running`,
109
125
  `waiting`, `needs_a_look` or `done`) or `--site-uuid`. Each answer also gives the count in each state.