@app-vitals/agent-lib 1.35.0 → 1.35.1

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 (2) hide show
  1. package/admin-types.ts +2 -222
  2. package/package.json +1 -1
package/admin-types.ts CHANGED
@@ -3087,168 +3087,6 @@ export interface paths {
3087
3087
  patch?: never;
3088
3088
  trace?: never;
3089
3089
  };
3090
- "/agents/{id}/github-reconcile/plan": {
3091
- parameters: {
3092
- query?: never;
3093
- header?: never;
3094
- path?: never;
3095
- cookie?: never;
3096
- };
3097
- get?: never;
3098
- put?: never;
3099
- /**
3100
- * Plan a GitHub repo reconcile for the agent
3101
- * @description Platform-admin only (session members, ops keys and agent keys get 403). Read-only: nothing is persisted or changed. Returns the diff, warnings, `planHash` and the open work the removals would affect. 200 with `status: skipped` and a `reason` when no githubUsername is bound or the enterprise Apps are not configured. 404 for an unknown agent.
3102
- */
3103
- post: {
3104
- parameters: {
3105
- query?: never;
3106
- header?: never;
3107
- path: {
3108
- id: string;
3109
- };
3110
- cookie?: never;
3111
- };
3112
- requestBody?: {
3113
- content: {
3114
- "application/json": components["schemas"]["GithubReconcilePlanBody"];
3115
- };
3116
- };
3117
- responses: {
3118
- /** @description Reconcile plan */
3119
- 200: {
3120
- headers: {
3121
- [name: string]: unknown;
3122
- };
3123
- content: {
3124
- "application/json": components["schemas"]["GithubReconcilePlanResult"];
3125
- };
3126
- };
3127
- /** @description Unauthorized */
3128
- 401: {
3129
- headers: {
3130
- [name: string]: unknown;
3131
- };
3132
- content: {
3133
- "application/json": components["schemas"]["Error"];
3134
- };
3135
- };
3136
- /** @description Platform admin required */
3137
- 403: {
3138
- headers: {
3139
- [name: string]: unknown;
3140
- };
3141
- content: {
3142
- "application/json": components["schemas"]["Error"];
3143
- };
3144
- };
3145
- /** @description Agent not found */
3146
- 404: {
3147
- headers: {
3148
- [name: string]: unknown;
3149
- };
3150
- content: {
3151
- "application/json": components["schemas"]["Error"];
3152
- };
3153
- };
3154
- };
3155
- };
3156
- delete?: never;
3157
- options?: never;
3158
- head?: never;
3159
- patch?: never;
3160
- trace?: never;
3161
- };
3162
- "/agents/{id}/github-reconcile/apply": {
3163
- parameters: {
3164
- query?: never;
3165
- header?: never;
3166
- path?: never;
3167
- cookie?: never;
3168
- };
3169
- get?: never;
3170
- put?: never;
3171
- /**
3172
- * Apply a reviewed GitHub repo reconcile plan
3173
- * @description Platform-admin only (session members, ops keys and agent keys get 403). Re-plans server-side and applies only when the fresh plan still matches `planHash` (409 otherwise). More than 10 removals need `confirmRemovals: true` (422 otherwise). Returns the audit id and result. 200 with `status: skipped` (unbound user or unconfigured Apps) or `status: noop` (nothing to change) is not an error. Open work on removed repos is blocked through the optional open-work port; a failure there is a warning.
3174
- */
3175
- post: {
3176
- parameters: {
3177
- query?: never;
3178
- header?: never;
3179
- path: {
3180
- id: string;
3181
- };
3182
- cookie?: never;
3183
- };
3184
- requestBody: {
3185
- content: {
3186
- "application/json": components["schemas"]["GithubReconcileApplyBody"];
3187
- };
3188
- };
3189
- responses: {
3190
- /** @description Apply result */
3191
- 200: {
3192
- headers: {
3193
- [name: string]: unknown;
3194
- };
3195
- content: {
3196
- "application/json": components["schemas"]["GithubReconcileApplyResult"];
3197
- };
3198
- };
3199
- /** @description Unauthorized */
3200
- 401: {
3201
- headers: {
3202
- [name: string]: unknown;
3203
- };
3204
- content: {
3205
- "application/json": components["schemas"]["Error"];
3206
- };
3207
- };
3208
- /** @description Platform admin required */
3209
- 403: {
3210
- headers: {
3211
- [name: string]: unknown;
3212
- };
3213
- content: {
3214
- "application/json": components["schemas"]["Error"];
3215
- };
3216
- };
3217
- /** @description Agent not found */
3218
- 404: {
3219
- headers: {
3220
- [name: string]: unknown;
3221
- };
3222
- content: {
3223
- "application/json": components["schemas"]["Error"];
3224
- };
3225
- };
3226
- /** @description Plan hash is stale; re-plan */
3227
- 409: {
3228
- headers: {
3229
- [name: string]: unknown;
3230
- };
3231
- content: {
3232
- "application/json": components["schemas"]["Error"];
3233
- };
3234
- };
3235
- /** @description Removal cap needs confirmRemovals */
3236
- 422: {
3237
- headers: {
3238
- [name: string]: unknown;
3239
- };
3240
- content: {
3241
- "application/json": components["schemas"]["Error"];
3242
- };
3243
- };
3244
- };
3245
- };
3246
- delete?: never;
3247
- options?: never;
3248
- head?: never;
3249
- patch?: never;
3250
- trace?: never;
3251
- };
3252
3090
  "/agents/{id}/github-installation/repos": {
3253
3091
  parameters: {
3254
3092
  query?: never;
@@ -3339,7 +3177,7 @@ export interface paths {
3339
3177
  put?: never;
3340
3178
  /**
3341
3179
  * Add repos to the agent App's installation
3342
- * @description Platform-admin only. Grants the agent's own GitHub App installation access to the named repos, with no plan step; the agent's configured repos are not changed. Writes one audit entry (GitHubReconcileAudit, planHash `direct:add`) recording the caller and repos. 404 unknown agent; 422 no GH_APP_ID; 409 when the App is not installed on a repo's org (nothing is changed or audited); 502 when GitHub refuses (a failed audit entry is written).
3180
+ * @description Platform-admin only. Grants the agent's own GitHub App installation access to the named repos; the agent's configured repos are not changed. Writes one audit entry (GitHubReconcileAudit, planHash `direct:add`) recording the caller and repos. 404 unknown agent; 422 no GH_APP_ID; 409 when the App is not installed on a repo's org (nothing is changed or audited); 502 when GitHub refuses (a failed audit entry is written).
3343
3181
  */
3344
3182
  post: {
3345
3183
  parameters: {
@@ -3447,7 +3285,7 @@ export interface paths {
3447
3285
  put?: never;
3448
3286
  /**
3449
3287
  * Remove repos from the agent App's installation
3450
- * @description Platform-admin only. Revokes the agent's own GitHub App installation access to the named repos, with no plan step; the agent's configured repos are not changed. Writes one audit entry (GitHubReconcileAudit, planHash `direct:remove`) recording the caller and repos. Same errors as the add route.
3288
+ * @description Platform-admin only. Revokes the agent's own GitHub App installation access to the named repos; the agent's configured repos are not changed. Writes one audit entry (GitHubReconcileAudit, planHash `direct:remove`) recording the caller and repos. Same errors as the add route.
3451
3289
  */
3452
3290
  post: {
3453
3291
  parameters: {
@@ -5494,64 +5332,6 @@ export interface components {
5494
5332
  checkedAt: string;
5495
5333
  };
5496
5334
  };
5497
- GithubReconcilePlanResult: {
5498
- /**
5499
- * @description `skipped` (not an error) when no GitHub username is bound or the Apps are not configured; `reason` says why.
5500
- * @enum {string}
5501
- */
5502
- status: "planned" | "skipped";
5503
- reason?: string;
5504
- planHash?: string;
5505
- empty?: boolean;
5506
- diff?: {
5507
- installationAdds: string[];
5508
- installationRemoves: string[];
5509
- configAdds: string[];
5510
- configRemoves: string[];
5511
- };
5512
- skippedOrgs?: {
5513
- org: string;
5514
- reason: string;
5515
- }[];
5516
- rejectedAdds?: {
5517
- repo: string;
5518
- reason: string;
5519
- }[];
5520
- warnings?: string[];
5521
- /** @description Open work the removals would block; empty when no open-work port is wired. */
5522
- affectedOpenWork?: {
5523
- id: string;
5524
- repo: string;
5525
- title?: string;
5526
- }[];
5527
- };
5528
- GithubReconcilePlanBody: {
5529
- /** @description Repos (owner/repo) to explicitly add to the agent's config and installation. */
5530
- addRepos?: string[];
5531
- };
5532
- GithubReconcileApplyResult: {
5533
- /** @enum {string} */
5534
- status: "applied" | "failed" | "noop" | "skipped";
5535
- reason?: string;
5536
- auditId?: string;
5537
- planHash?: string;
5538
- diff?: {
5539
- installationAdds: string[];
5540
- installationRemoves: string[];
5541
- configAdds: string[];
5542
- configRemoves: string[];
5543
- };
5544
- warnings?: string[];
5545
- error?: string;
5546
- };
5547
- GithubReconcileApplyBody: {
5548
- /** @description planHash of the plan the admin reviewed. */
5549
- planHash: string;
5550
- /** @description Must match the addRepos used when the plan was made. */
5551
- addRepos?: string[];
5552
- /** @description Required when the plan removes more than 10 repos. */
5553
- confirmRemovals?: boolean;
5554
- };
5555
5335
  GithubInstallationReposList: {
5556
5336
  appId: number;
5557
5337
  orgs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-lib",
3
- "version": "1.35.0",
3
+ "version": "1.35.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",