@app-vitals/agent-lib 1.127.0 → 1.128.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 +316 -0
  2. package/package.json +1 -1
package/admin-types.ts CHANGED
@@ -2409,6 +2409,245 @@ export interface paths {
2409
2409
  patch?: never;
2410
2410
  trace?: never;
2411
2411
  };
2412
+ "/agents/{id}/github-apps": {
2413
+ parameters: {
2414
+ query?: never;
2415
+ header?: never;
2416
+ path?: never;
2417
+ cookie?: never;
2418
+ };
2419
+ /**
2420
+ * List GitHub Apps
2421
+ * @description Returns the agent's GitHub Apps in priority order (lowest wins). Private keys and client secrets are write-only: only `hasPrivateKey` / `hasClientSecret` flags are returned.
2422
+ */
2423
+ get: {
2424
+ parameters: {
2425
+ query?: never;
2426
+ header?: never;
2427
+ path: {
2428
+ id: string;
2429
+ };
2430
+ cookie?: never;
2431
+ };
2432
+ requestBody?: never;
2433
+ responses: {
2434
+ /** @description List of GitHub Apps */
2435
+ 200: {
2436
+ headers: {
2437
+ [name: string]: unknown;
2438
+ };
2439
+ content: {
2440
+ "application/json": components["schemas"]["AgentGitHubAppsWrapper"];
2441
+ };
2442
+ };
2443
+ /** @description GitHub Apps not configured */
2444
+ 503: {
2445
+ headers: {
2446
+ [name: string]: unknown;
2447
+ };
2448
+ content: {
2449
+ "application/json": components["schemas"]["Error"];
2450
+ };
2451
+ };
2452
+ };
2453
+ };
2454
+ put?: never;
2455
+ /**
2456
+ * Add a GitHub App
2457
+ * @description Adds a GitHub App to the agent. The private key and client secret are encrypted and never returned. 409 when the agent already has this `appId`; 422 on an invalid field.
2458
+ */
2459
+ post: {
2460
+ parameters: {
2461
+ query?: never;
2462
+ header?: never;
2463
+ path: {
2464
+ id: string;
2465
+ };
2466
+ cookie?: never;
2467
+ };
2468
+ requestBody?: {
2469
+ content: {
2470
+ "application/json": components["schemas"]["CreateAgentGitHubAppBody"];
2471
+ };
2472
+ };
2473
+ responses: {
2474
+ /** @description GitHub App added */
2475
+ 201: {
2476
+ headers: {
2477
+ [name: string]: unknown;
2478
+ };
2479
+ content: {
2480
+ "application/json": components["schemas"]["AgentGitHubAppWrapper"];
2481
+ };
2482
+ };
2483
+ /** @description Bad request */
2484
+ 400: {
2485
+ headers: {
2486
+ [name: string]: unknown;
2487
+ };
2488
+ content: {
2489
+ "application/json": components["schemas"]["Error"];
2490
+ };
2491
+ };
2492
+ /** @description App already added */
2493
+ 409: {
2494
+ headers: {
2495
+ [name: string]: unknown;
2496
+ };
2497
+ content: {
2498
+ "application/json": components["schemas"]["Error"];
2499
+ };
2500
+ };
2501
+ /** @description Invalid field */
2502
+ 422: {
2503
+ headers: {
2504
+ [name: string]: unknown;
2505
+ };
2506
+ content: {
2507
+ "application/json": components["schemas"]["Error"];
2508
+ };
2509
+ };
2510
+ /** @description GitHub Apps not configured */
2511
+ 503: {
2512
+ headers: {
2513
+ [name: string]: unknown;
2514
+ };
2515
+ content: {
2516
+ "application/json": components["schemas"]["Error"];
2517
+ };
2518
+ };
2519
+ };
2520
+ };
2521
+ delete?: never;
2522
+ options?: never;
2523
+ head?: never;
2524
+ patch?: never;
2525
+ trace?: never;
2526
+ };
2527
+ "/agents/{id}/github-apps/{appRowId}": {
2528
+ parameters: {
2529
+ query?: never;
2530
+ header?: never;
2531
+ path?: never;
2532
+ cookie?: never;
2533
+ };
2534
+ get?: never;
2535
+ put?: never;
2536
+ post?: never;
2537
+ /**
2538
+ * Remove a GitHub App
2539
+ * @description Removes the app row by id. 404 when the id does not exist or belongs to a different agent.
2540
+ */
2541
+ delete: {
2542
+ parameters: {
2543
+ query?: never;
2544
+ header?: never;
2545
+ path: {
2546
+ id: string;
2547
+ appRowId: string;
2548
+ };
2549
+ cookie?: never;
2550
+ };
2551
+ requestBody?: never;
2552
+ responses: {
2553
+ /** @description GitHub App removed */
2554
+ 204: {
2555
+ headers: {
2556
+ [name: string]: unknown;
2557
+ };
2558
+ content?: never;
2559
+ };
2560
+ /** @description GitHub App not found */
2561
+ 404: {
2562
+ headers: {
2563
+ [name: string]: unknown;
2564
+ };
2565
+ content: {
2566
+ "application/json": components["schemas"]["Error"];
2567
+ };
2568
+ };
2569
+ /** @description GitHub Apps not configured */
2570
+ 503: {
2571
+ headers: {
2572
+ [name: string]: unknown;
2573
+ };
2574
+ content: {
2575
+ "application/json": components["schemas"]["Error"];
2576
+ };
2577
+ };
2578
+ };
2579
+ };
2580
+ options?: never;
2581
+ head?: never;
2582
+ /**
2583
+ * Update a GitHub App
2584
+ * @description Partial update: omitted fields are unchanged, null clears a nullable field. `privateKey` / `clientSecret` replace the stored secret and are never returned.
2585
+ */
2586
+ patch: {
2587
+ parameters: {
2588
+ query?: never;
2589
+ header?: never;
2590
+ path: {
2591
+ id: string;
2592
+ appRowId: string;
2593
+ };
2594
+ cookie?: never;
2595
+ };
2596
+ requestBody?: {
2597
+ content: {
2598
+ "application/json": components["schemas"]["UpdateAgentGitHubAppBody"];
2599
+ };
2600
+ };
2601
+ responses: {
2602
+ /** @description GitHub App updated */
2603
+ 200: {
2604
+ headers: {
2605
+ [name: string]: unknown;
2606
+ };
2607
+ content: {
2608
+ "application/json": components["schemas"]["AgentGitHubAppWrapper"];
2609
+ };
2610
+ };
2611
+ /** @description Bad request */
2612
+ 400: {
2613
+ headers: {
2614
+ [name: string]: unknown;
2615
+ };
2616
+ content: {
2617
+ "application/json": components["schemas"]["Error"];
2618
+ };
2619
+ };
2620
+ /** @description GitHub App not found */
2621
+ 404: {
2622
+ headers: {
2623
+ [name: string]: unknown;
2624
+ };
2625
+ content: {
2626
+ "application/json": components["schemas"]["Error"];
2627
+ };
2628
+ };
2629
+ /** @description Invalid field */
2630
+ 422: {
2631
+ headers: {
2632
+ [name: string]: unknown;
2633
+ };
2634
+ content: {
2635
+ "application/json": components["schemas"]["Error"];
2636
+ };
2637
+ };
2638
+ /** @description GitHub Apps not configured */
2639
+ 503: {
2640
+ headers: {
2641
+ [name: string]: unknown;
2642
+ };
2643
+ content: {
2644
+ "application/json": components["schemas"]["Error"];
2645
+ };
2646
+ };
2647
+ };
2648
+ };
2649
+ trace?: never;
2650
+ };
2412
2651
  "/agents/all/cron-runs/stats": {
2413
2652
  parameters: {
2414
2653
  query?: never;
@@ -5694,6 +5933,71 @@ export interface components {
5694
5933
  /** @example main */
5695
5934
  ref?: string | null;
5696
5935
  };
5936
+ AgentGitHubAppsWrapper: {
5937
+ apps: components["schemas"]["AgentGitHubApp"][];
5938
+ };
5939
+ AgentGitHubApp: {
5940
+ /** @example clx1234567890 */
5941
+ id: string;
5942
+ /** @example clx1234567890 */
5943
+ agentId: string;
5944
+ /** @example 12345 */
5945
+ appId: string;
5946
+ /** @example my-app */
5947
+ slug: string | null;
5948
+ /** @example Iv1.abcdef0123456789 */
5949
+ clientId: string | null;
5950
+ /** @example 9876543 */
5951
+ installationId: string | null;
5952
+ /** @example 0 */
5953
+ priority: number;
5954
+ /** @example true */
5955
+ hasPrivateKey: boolean;
5956
+ /** @example false */
5957
+ hasClientSecret: boolean;
5958
+ /**
5959
+ * Format: date-time
5960
+ * @example 2026-01-01T00:00:00.000Z
5961
+ */
5962
+ createdAt: string;
5963
+ /**
5964
+ * Format: date-time
5965
+ * @example 2026-01-01T00:00:00.000Z
5966
+ */
5967
+ updatedAt: string;
5968
+ };
5969
+ AgentGitHubAppWrapper: {
5970
+ app: components["schemas"]["AgentGitHubApp"];
5971
+ };
5972
+ CreateAgentGitHubAppBody: {
5973
+ /** @example 12345 */
5974
+ appId: string;
5975
+ /** @example my-app */
5976
+ slug?: string | null;
5977
+ /** @example Iv1.abcdef0123456789 */
5978
+ clientId?: string | null;
5979
+ /** @description PEM private key. Write-only: never returned. */
5980
+ privateKey: string;
5981
+ /** @description OAuth client secret. Write-only: never returned. */
5982
+ clientSecret?: string | null;
5983
+ /** @example 9876543 */
5984
+ installationId?: string | null;
5985
+ /**
5986
+ * @description Lowest wins when two apps are installed on the same owner. Defaults to one past the agent's highest.
5987
+ * @example 0
5988
+ */
5989
+ priority?: number;
5990
+ };
5991
+ UpdateAgentGitHubAppBody: {
5992
+ slug?: string | null;
5993
+ clientId?: string | null;
5994
+ /** @description Replaces the stored key. Write-only. */
5995
+ privateKey?: string;
5996
+ /** @description Replaces the stored secret; null clears it. Write-only. */
5997
+ clientSecret?: string | null;
5998
+ installationId?: string | null;
5999
+ priority?: number;
6000
+ };
5697
6001
  CronRunTokenStats: {
5698
6002
  totals: components["schemas"]["TokenAggregate"];
5699
6003
  byAgent: components["schemas"]["KeyedTokenAggregate"][];
@@ -6119,6 +6423,7 @@ export interface components {
6119
6423
  allowedTools: string[];
6120
6424
  plugins: components["schemas"]["AgentConfigPlugin"][];
6121
6425
  marketplaces?: components["schemas"]["AgentConfigMarketplace"][];
6426
+ apps?: components["schemas"]["AgentConfigGitHubApp"][];
6122
6427
  /**
6123
6428
  * @example [
6124
6429
  * "org/repo1",
@@ -6201,6 +6506,17 @@ export interface components {
6201
6506
  /** @example main */
6202
6507
  ref: string | null;
6203
6508
  };
6509
+ AgentConfigGitHubApp: {
6510
+ id: string;
6511
+ /** @example 12345 */
6512
+ appId: string;
6513
+ slug: string | null;
6514
+ clientId: string | null;
6515
+ installationId: string | null;
6516
+ priority: number;
6517
+ privateKey: string;
6518
+ clientSecret: string | null;
6519
+ };
6204
6520
  AgentConfigFeatures: {
6205
6521
  /**
6206
6522
  * @description Reserved for the repo-access check (COS-44.1).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-lib",
3
- "version": "1.127.0",
3
+ "version": "1.128.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",