@app-vitals/agent-lib 0.3.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.
Files changed (2) hide show
  1. package/admin-types.ts +133 -3
  2. package/package.json +1 -1
package/admin-types.ts CHANGED
@@ -145,7 +145,9 @@ export interface paths {
145
145
  [name: string]: unknown;
146
146
  };
147
147
  content: {
148
- "application/json": components["schemas"]["ProvisionAgentResult"] | components["schemas"]["ProvisionSkippedResult"];
148
+ "application/json":
149
+ | components["schemas"]["ProvisionAgentResult"]
150
+ | components["schemas"]["ProvisionSkippedResult"];
149
151
  };
150
152
  };
151
153
  /** @description Forbidden */
@@ -1781,7 +1783,13 @@ export interface paths {
1781
1783
  header?: never;
1782
1784
  path: {
1783
1785
  id: string;
1784
- phase: "prd" | "plan-session" | "review" | "patch" | "deploy" | "dev-task";
1786
+ phase:
1787
+ | "prd"
1788
+ | "plan-session"
1789
+ | "review"
1790
+ | "patch"
1791
+ | "deploy"
1792
+ | "dev-task";
1785
1793
  };
1786
1794
  cookie?: never;
1787
1795
  };
@@ -2871,6 +2879,84 @@ export interface paths {
2871
2879
  patch?: never;
2872
2880
  trace?: never;
2873
2881
  };
2882
+ "/agents/{id}/crons/{cronId}/run-now": {
2883
+ parameters: {
2884
+ query?: never;
2885
+ header?: never;
2886
+ path?: never;
2887
+ cookie?: never;
2888
+ };
2889
+ get?: never;
2890
+ put?: never;
2891
+ /**
2892
+ * Request an immediate run of a cron job
2893
+ * @description Asks the agent's runtime to run the cron job once, now, with the job's own stored prompt. Takes no request body (any body is 400). Stamps `runRequestedAt` on the job and writes an AgentCronRunRequest audit row before returning 202; the runtime honours a fresh request (under 15 minutes old) once on its next cron sync. Callers: `*`, `platform.ops`, or the agent's own key. 404 unless SHIPWRIGHT_CRON_RUN_NOW_ENABLED is `enabled`; 409 when the trial-expiry lockdown disabled the cron.
2894
+ */
2895
+ post: {
2896
+ parameters: {
2897
+ query?: never;
2898
+ header?: never;
2899
+ path: {
2900
+ id: string;
2901
+ cronId: string;
2902
+ };
2903
+ cookie?: never;
2904
+ };
2905
+ requestBody?: never;
2906
+ responses: {
2907
+ /** @description Run requested */
2908
+ 202: {
2909
+ headers: {
2910
+ [name: string]: unknown;
2911
+ };
2912
+ content: {
2913
+ "application/json": components["schemas"]["CronRunNowResponse"];
2914
+ };
2915
+ };
2916
+ /** @description A request body was sent */
2917
+ 400: {
2918
+ headers: {
2919
+ [name: string]: unknown;
2920
+ };
2921
+ content: {
2922
+ "application/json": components["schemas"]["Error"];
2923
+ };
2924
+ };
2925
+ /** @description Caller not allowed */
2926
+ 403: {
2927
+ headers: {
2928
+ [name: string]: unknown;
2929
+ };
2930
+ content: {
2931
+ "application/json": components["schemas"]["Error"];
2932
+ };
2933
+ };
2934
+ /** @description Cron not found, or cron run-now disabled */
2935
+ 404: {
2936
+ headers: {
2937
+ [name: string]: unknown;
2938
+ };
2939
+ content: {
2940
+ "application/json": components["schemas"]["Error"];
2941
+ };
2942
+ };
2943
+ /** @description Cron disabled by lockdown */
2944
+ 409: {
2945
+ headers: {
2946
+ [name: string]: unknown;
2947
+ };
2948
+ content: {
2949
+ "application/json": components["schemas"]["Error"];
2950
+ };
2951
+ };
2952
+ };
2953
+ };
2954
+ delete?: never;
2955
+ options?: never;
2956
+ head?: never;
2957
+ patch?: never;
2958
+ trace?: never;
2959
+ };
2874
2960
  "/agents/{id}/ask": {
2875
2961
  parameters: {
2876
2962
  query?: never;
@@ -3259,6 +3345,13 @@ export interface components {
3259
3345
  CronWrapper: {
3260
3346
  cron: components["schemas"]["AgentCronJob"];
3261
3347
  };
3348
+ CronRunNowResponse: {
3349
+ /**
3350
+ * Format: date-time
3351
+ * @example 2026-10-26T12:00:00.000Z
3352
+ */
3353
+ requestedAt: string;
3354
+ };
3262
3355
  AgentCronJob: {
3263
3356
  /** @example clx1234567890 */
3264
3357
  id: string;
@@ -3284,6 +3377,12 @@ export interface components {
3284
3377
  system: boolean;
3285
3378
  /** @example null */
3286
3379
  parentCronId: string | null;
3380
+ /**
3381
+ * Format: date-time
3382
+ * @description Set by POST .../run-now; the runtime honours it once while fresh (15 minutes) and run creation with commandVariant run-now clears it.
3383
+ * @example null
3384
+ */
3385
+ runRequestedAt: string | null;
3287
3386
  /**
3288
3387
  * Format: date-time
3289
3388
  * @example 2026-01-01T00:00:00.000Z
@@ -3790,7 +3889,13 @@ export interface components {
3790
3889
  * @example review
3791
3890
  * @enum {string}
3792
3891
  */
3793
- phase: "prd" | "plan-session" | "review" | "patch" | "deploy" | "dev-task";
3892
+ phase:
3893
+ | "prd"
3894
+ | "plan-session"
3895
+ | "review"
3896
+ | "patch"
3897
+ | "deploy"
3898
+ | "dev-task";
3794
3899
  /** @example shipwright:code-reviewer */
3795
3900
  subagentType: string | null;
3796
3901
  /**
@@ -4038,6 +4143,8 @@ export interface components {
4038
4143
  */
4039
4144
  reportedAt: string;
4040
4145
  installations: components["schemas"]["GitHubInstallation"][];
4146
+ /** @description Latest per-repo access probe result; null until a runtime with the repo-access check enabled reports one. */
4147
+ repoAccess: components["schemas"]["RepoAccessEntry"][] | null;
4041
4148
  /**
4042
4149
  * Format: date-time
4043
4150
  * @example 2026-01-01T00:00:00.000Z
@@ -4057,6 +4164,27 @@ export interface components {
4057
4164
  */
4058
4165
  lastError?: string | null;
4059
4166
  };
4167
+ RepoAccessEntry: {
4168
+ /** @example agent */
4169
+ repo: string;
4170
+ /** @example app-vitals */
4171
+ owner: string;
4172
+ /** @example true */
4173
+ read: boolean;
4174
+ /** @example false */
4175
+ write: boolean;
4176
+ /**
4177
+ * Format: date-time
4178
+ * @example 2026-01-01T00:00:00.000Z
4179
+ */
4180
+ checkedAt: string;
4181
+ /**
4182
+ * @description Why the probe could not read the repo; absent when the probe succeeded.
4183
+ * @example not_found
4184
+ * @enum {string}
4185
+ */
4186
+ error?: "not_found" | "forbidden" | "rate_limited" | "network";
4187
+ };
4060
4188
  PutGitHubInstallationsBody: {
4061
4189
  /**
4062
4190
  * Format: date-time
@@ -4064,6 +4192,8 @@ export interface components {
4064
4192
  */
4065
4193
  reportedAt: string;
4066
4194
  installations: components["schemas"]["GitHubInstallation"][];
4195
+ /** @description Per-repo access probe result (COS-44.1). Omit to leave the stored result unchanged; send [] to clear it. */
4196
+ repos?: components["schemas"]["RepoAccessEntry"][];
4067
4197
  };
4068
4198
  AgentConfigResponse: {
4069
4199
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-lib",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",