@app-vitals/agent-lib 1.28.0 → 1.29.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.
- package/admin-types.ts +220 -0
- package/package.json +1 -1
package/admin-types.ts
CHANGED
|
@@ -3018,6 +3018,168 @@ export interface paths {
|
|
|
3018
3018
|
patch?: never;
|
|
3019
3019
|
trace?: never;
|
|
3020
3020
|
};
|
|
3021
|
+
"/agents/{id}/github-reconcile/plan": {
|
|
3022
|
+
parameters: {
|
|
3023
|
+
query?: never;
|
|
3024
|
+
header?: never;
|
|
3025
|
+
path?: never;
|
|
3026
|
+
cookie?: never;
|
|
3027
|
+
};
|
|
3028
|
+
get?: never;
|
|
3029
|
+
put?: never;
|
|
3030
|
+
/**
|
|
3031
|
+
* Plan a GitHub repo reconcile for the agent
|
|
3032
|
+
* @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.
|
|
3033
|
+
*/
|
|
3034
|
+
post: {
|
|
3035
|
+
parameters: {
|
|
3036
|
+
query?: never;
|
|
3037
|
+
header?: never;
|
|
3038
|
+
path: {
|
|
3039
|
+
id: string;
|
|
3040
|
+
};
|
|
3041
|
+
cookie?: never;
|
|
3042
|
+
};
|
|
3043
|
+
requestBody?: {
|
|
3044
|
+
content: {
|
|
3045
|
+
"application/json": components["schemas"]["GithubReconcilePlanBody"];
|
|
3046
|
+
};
|
|
3047
|
+
};
|
|
3048
|
+
responses: {
|
|
3049
|
+
/** @description Reconcile plan */
|
|
3050
|
+
200: {
|
|
3051
|
+
headers: {
|
|
3052
|
+
[name: string]: unknown;
|
|
3053
|
+
};
|
|
3054
|
+
content: {
|
|
3055
|
+
"application/json": components["schemas"]["GithubReconcilePlanResult"];
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
/** @description Unauthorized */
|
|
3059
|
+
401: {
|
|
3060
|
+
headers: {
|
|
3061
|
+
[name: string]: unknown;
|
|
3062
|
+
};
|
|
3063
|
+
content: {
|
|
3064
|
+
"application/json": components["schemas"]["Error"];
|
|
3065
|
+
};
|
|
3066
|
+
};
|
|
3067
|
+
/** @description Platform admin required */
|
|
3068
|
+
403: {
|
|
3069
|
+
headers: {
|
|
3070
|
+
[name: string]: unknown;
|
|
3071
|
+
};
|
|
3072
|
+
content: {
|
|
3073
|
+
"application/json": components["schemas"]["Error"];
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
/** @description Agent not found */
|
|
3077
|
+
404: {
|
|
3078
|
+
headers: {
|
|
3079
|
+
[name: string]: unknown;
|
|
3080
|
+
};
|
|
3081
|
+
content: {
|
|
3082
|
+
"application/json": components["schemas"]["Error"];
|
|
3083
|
+
};
|
|
3084
|
+
};
|
|
3085
|
+
};
|
|
3086
|
+
};
|
|
3087
|
+
delete?: never;
|
|
3088
|
+
options?: never;
|
|
3089
|
+
head?: never;
|
|
3090
|
+
patch?: never;
|
|
3091
|
+
trace?: never;
|
|
3092
|
+
};
|
|
3093
|
+
"/agents/{id}/github-reconcile/apply": {
|
|
3094
|
+
parameters: {
|
|
3095
|
+
query?: never;
|
|
3096
|
+
header?: never;
|
|
3097
|
+
path?: never;
|
|
3098
|
+
cookie?: never;
|
|
3099
|
+
};
|
|
3100
|
+
get?: never;
|
|
3101
|
+
put?: never;
|
|
3102
|
+
/**
|
|
3103
|
+
* Apply a reviewed GitHub repo reconcile plan
|
|
3104
|
+
* @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.
|
|
3105
|
+
*/
|
|
3106
|
+
post: {
|
|
3107
|
+
parameters: {
|
|
3108
|
+
query?: never;
|
|
3109
|
+
header?: never;
|
|
3110
|
+
path: {
|
|
3111
|
+
id: string;
|
|
3112
|
+
};
|
|
3113
|
+
cookie?: never;
|
|
3114
|
+
};
|
|
3115
|
+
requestBody: {
|
|
3116
|
+
content: {
|
|
3117
|
+
"application/json": components["schemas"]["GithubReconcileApplyBody"];
|
|
3118
|
+
};
|
|
3119
|
+
};
|
|
3120
|
+
responses: {
|
|
3121
|
+
/** @description Apply result */
|
|
3122
|
+
200: {
|
|
3123
|
+
headers: {
|
|
3124
|
+
[name: string]: unknown;
|
|
3125
|
+
};
|
|
3126
|
+
content: {
|
|
3127
|
+
"application/json": components["schemas"]["GithubReconcileApplyResult"];
|
|
3128
|
+
};
|
|
3129
|
+
};
|
|
3130
|
+
/** @description Unauthorized */
|
|
3131
|
+
401: {
|
|
3132
|
+
headers: {
|
|
3133
|
+
[name: string]: unknown;
|
|
3134
|
+
};
|
|
3135
|
+
content: {
|
|
3136
|
+
"application/json": components["schemas"]["Error"];
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
/** @description Platform admin required */
|
|
3140
|
+
403: {
|
|
3141
|
+
headers: {
|
|
3142
|
+
[name: string]: unknown;
|
|
3143
|
+
};
|
|
3144
|
+
content: {
|
|
3145
|
+
"application/json": components["schemas"]["Error"];
|
|
3146
|
+
};
|
|
3147
|
+
};
|
|
3148
|
+
/** @description Agent not found */
|
|
3149
|
+
404: {
|
|
3150
|
+
headers: {
|
|
3151
|
+
[name: string]: unknown;
|
|
3152
|
+
};
|
|
3153
|
+
content: {
|
|
3154
|
+
"application/json": components["schemas"]["Error"];
|
|
3155
|
+
};
|
|
3156
|
+
};
|
|
3157
|
+
/** @description Plan hash is stale; re-plan */
|
|
3158
|
+
409: {
|
|
3159
|
+
headers: {
|
|
3160
|
+
[name: string]: unknown;
|
|
3161
|
+
};
|
|
3162
|
+
content: {
|
|
3163
|
+
"application/json": components["schemas"]["Error"];
|
|
3164
|
+
};
|
|
3165
|
+
};
|
|
3166
|
+
/** @description Removal cap needs confirmRemovals */
|
|
3167
|
+
422: {
|
|
3168
|
+
headers: {
|
|
3169
|
+
[name: string]: unknown;
|
|
3170
|
+
};
|
|
3171
|
+
content: {
|
|
3172
|
+
"application/json": components["schemas"]["Error"];
|
|
3173
|
+
};
|
|
3174
|
+
};
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
delete?: never;
|
|
3178
|
+
options?: never;
|
|
3179
|
+
head?: never;
|
|
3180
|
+
patch?: never;
|
|
3181
|
+
trace?: never;
|
|
3182
|
+
};
|
|
3021
3183
|
"/agents/{id}/config": {
|
|
3022
3184
|
parameters: {
|
|
3023
3185
|
query?: never;
|
|
@@ -4783,6 +4945,64 @@ export interface components {
|
|
|
4783
4945
|
checkedAt: string;
|
|
4784
4946
|
};
|
|
4785
4947
|
};
|
|
4948
|
+
GithubReconcilePlanResult: {
|
|
4949
|
+
/**
|
|
4950
|
+
* @description `skipped` (not an error) when no GitHub username is bound or the Apps are not configured; `reason` says why.
|
|
4951
|
+
* @enum {string}
|
|
4952
|
+
*/
|
|
4953
|
+
status: "planned" | "skipped";
|
|
4954
|
+
reason?: string;
|
|
4955
|
+
planHash?: string;
|
|
4956
|
+
empty?: boolean;
|
|
4957
|
+
diff?: {
|
|
4958
|
+
installationAdds: string[];
|
|
4959
|
+
installationRemoves: string[];
|
|
4960
|
+
configAdds: string[];
|
|
4961
|
+
configRemoves: string[];
|
|
4962
|
+
};
|
|
4963
|
+
skippedOrgs?: {
|
|
4964
|
+
org: string;
|
|
4965
|
+
reason: string;
|
|
4966
|
+
}[];
|
|
4967
|
+
rejectedAdds?: {
|
|
4968
|
+
repo: string;
|
|
4969
|
+
reason: string;
|
|
4970
|
+
}[];
|
|
4971
|
+
warnings?: string[];
|
|
4972
|
+
/** @description Open work the removals would block; empty when no open-work port is wired. */
|
|
4973
|
+
affectedOpenWork?: {
|
|
4974
|
+
id: string;
|
|
4975
|
+
repo: string;
|
|
4976
|
+
title?: string;
|
|
4977
|
+
}[];
|
|
4978
|
+
};
|
|
4979
|
+
GithubReconcilePlanBody: {
|
|
4980
|
+
/** @description Repos (owner/repo) to explicitly add to the agent's config and installation. */
|
|
4981
|
+
addRepos?: string[];
|
|
4982
|
+
};
|
|
4983
|
+
GithubReconcileApplyResult: {
|
|
4984
|
+
/** @enum {string} */
|
|
4985
|
+
status: "applied" | "failed" | "noop" | "skipped";
|
|
4986
|
+
reason?: string;
|
|
4987
|
+
auditId?: string;
|
|
4988
|
+
planHash?: string;
|
|
4989
|
+
diff?: {
|
|
4990
|
+
installationAdds: string[];
|
|
4991
|
+
installationRemoves: string[];
|
|
4992
|
+
configAdds: string[];
|
|
4993
|
+
configRemoves: string[];
|
|
4994
|
+
};
|
|
4995
|
+
warnings?: string[];
|
|
4996
|
+
error?: string;
|
|
4997
|
+
};
|
|
4998
|
+
GithubReconcileApplyBody: {
|
|
4999
|
+
/** @description planHash of the plan the admin reviewed. */
|
|
5000
|
+
planHash: string;
|
|
5001
|
+
/** @description Must match the addRepos used when the plan was made. */
|
|
5002
|
+
addRepos?: string[];
|
|
5003
|
+
/** @description Required when the plan removes more than 10 repos. */
|
|
5004
|
+
confirmRemovals?: boolean;
|
|
5005
|
+
};
|
|
4786
5006
|
AgentConfigResponse: {
|
|
4787
5007
|
/**
|
|
4788
5008
|
* @example {
|