@app-vitals/agent-lib 1.81.0 → 1.83.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 (2) hide show
  1. package/admin-types.ts +111 -2
  2. package/package.json +1 -1
package/admin-types.ts CHANGED
@@ -3264,7 +3264,7 @@ export interface paths {
3264
3264
  };
3265
3265
  /**
3266
3266
  * List the repos on the agent App's installation
3267
- * @description Platform-admin only (session members, ops keys and agent keys get 403). Per org the agent's own GitHub App (its GH_APP_ID) is installed on, lists the installation's repos. When the agent has a bound githubUsername, each repo carries `userCanPush` from the access lookup only when that org's lookup result is complete; otherwise the field is omitted (never false). 404 for an unknown agent; 422 when the agent has no GH_APP_ID.
3267
+ * @description Platform-admin only (session members, ops keys and agent keys get 403). Per org the agent's own GitHub App (its GH_APP_ID) is installed on, lists the installation's repos from the background-synced cache; it makes no GitHub call. Sync detail (`complete`, `syncedAt`, `reposSeen`, `totalCount`, `lastError`, `rateLimitResetAt`) is reported per org and overall. When the agent has a bound githubUsername, each repo carries `userCanPush` from cached access rows only when that org's snapshot is complete and every repo has an answer; otherwise the field is omitted (never false). 404 for an unknown agent; 422 when the agent has no GH_APP_ID.
3268
3268
  */
3269
3269
  get: {
3270
3270
  parameters: {
@@ -3782,6 +3782,77 @@ export interface paths {
3782
3782
  patch?: never;
3783
3783
  trace?: never;
3784
3784
  };
3785
+ "/github-enterprise/refresh": {
3786
+ parameters: {
3787
+ query?: never;
3788
+ header?: never;
3789
+ path?: never;
3790
+ cookie?: never;
3791
+ };
3792
+ get?: never;
3793
+ put?: never;
3794
+ /**
3795
+ * Request a refresh of the GitHub cache
3796
+ * @description Admin-only. Marks the cached GitHub repo lists stale and clears retry waits so the background refresher works them next, then returns at once. It makes no GitHub call and does not wait for the refresher; reload the page to see progress. The refresher still honours its per-org lease and rate-limit window.
3797
+ */
3798
+ post: {
3799
+ parameters: {
3800
+ query?: never;
3801
+ header?: never;
3802
+ path?: never;
3803
+ cookie?: never;
3804
+ };
3805
+ requestBody?: never;
3806
+ responses: {
3807
+ /** @description Refresh requested */
3808
+ 202: {
3809
+ headers: {
3810
+ [name: string]: unknown;
3811
+ };
3812
+ content: {
3813
+ "application/json": {
3814
+ /** @enum {string} */
3815
+ status: "accepted";
3816
+ snapshots: number;
3817
+ accessPairs: number;
3818
+ };
3819
+ };
3820
+ };
3821
+ /** @description Unauthorized */
3822
+ 401: {
3823
+ headers: {
3824
+ [name: string]: unknown;
3825
+ };
3826
+ content: {
3827
+ "application/json": components["schemas"]["Error"];
3828
+ };
3829
+ };
3830
+ /** @description Forbidden (non-admin caller) */
3831
+ 403: {
3832
+ headers: {
3833
+ [name: string]: unknown;
3834
+ };
3835
+ content: {
3836
+ "application/json": components["schemas"]["Error"];
3837
+ };
3838
+ };
3839
+ /** @description Refresh is not available */
3840
+ 503: {
3841
+ headers: {
3842
+ [name: string]: unknown;
3843
+ };
3844
+ content: {
3845
+ "application/json": components["schemas"]["Error"];
3846
+ };
3847
+ };
3848
+ };
3849
+ };
3850
+ delete?: never;
3851
+ options?: never;
3852
+ head?: never;
3853
+ patch?: never;
3854
+ trace?: never;
3855
+ };
3785
3856
  "/github-enterprise/apps/{role}/validate": {
3786
3857
  parameters: {
3787
3858
  query?: never;
@@ -5952,11 +6023,49 @@ export interface components {
5952
6023
  };
5953
6024
  GithubInstallationReposList: {
5954
6025
  appId: number;
6026
+ /** @description Whether the cached crawl is complete. While false the list may be partial. */
6027
+ complete?: boolean;
6028
+ /** @description When the completed crawl finished (ISO 8601). */
6029
+ syncedAt?: string;
6030
+ /** @description Repos in the cache (the N of 'N of M'). */
6031
+ reposSeen?: number;
6032
+ /** @description GitHub's repo count, when known (the M). */
6033
+ totalCount?: number;
6034
+ lastError?: string;
6035
+ /** @description When the GitHub rate limit resets (ISO 8601). */
6036
+ rateLimitResetAt?: string;
6037
+ /** @description Failed refresh attempts; absent when zero. */
6038
+ attempts?: number;
6039
+ /** @description Next refresh attempt while backing off (ISO 8601). */
6040
+ nextAttemptAt?: string;
6041
+ /** @description Holder of a live refresh lease, if any. */
6042
+ leaseHolder?: string;
6043
+ /** @description Last refresh tick on the snapshot (ISO 8601). */
6044
+ lastTickAt?: string;
5955
6045
  orgs: {
5956
6046
  org: string;
6047
+ /** @description Whether the cached crawl is complete. While false the list may be partial. */
6048
+ complete?: boolean;
6049
+ /** @description When the completed crawl finished (ISO 8601). */
6050
+ syncedAt?: string;
6051
+ /** @description Repos in the cache (the N of 'N of M'). */
6052
+ reposSeen?: number;
6053
+ /** @description GitHub's repo count, when known (the M). */
6054
+ totalCount?: number;
6055
+ lastError?: string;
6056
+ /** @description When the GitHub rate limit resets (ISO 8601). */
6057
+ rateLimitResetAt?: string;
6058
+ /** @description Failed refresh attempts; absent when zero. */
6059
+ attempts?: number;
6060
+ /** @description Next refresh attempt while backing off (ISO 8601). */
6061
+ nextAttemptAt?: string;
6062
+ /** @description Holder of a live refresh lease, if any. */
6063
+ leaseHolder?: string;
6064
+ /** @description Last refresh tick on the snapshot (ISO 8601). */
6065
+ lastTickAt?: string;
5957
6066
  repos: {
5958
6067
  fullName: string;
5959
- /** @description Whether the agent's bound GitHub user can push. Omitted when no username is bound or the org's access lookup is incomplete; never reported as false for unknown. */
6068
+ /** @description Whether the agent's bound GitHub user can push, from cached access rows. Omitted when no username is bound or the org's access data is incomplete (a missing or errored pair is never reported as false). */
5960
6069
  userCanPush?: boolean;
5961
6070
  }[];
5962
6071
  }[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-lib",
3
- "version": "1.81.0",
3
+ "version": "1.83.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",