@axivoy/api 1.30.0 → 1.32.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.
@@ -443,6 +443,94 @@ export interface paths {
443
443
  patch?: never;
444
444
  trace?: never;
445
445
  };
446
+ "/ops/agents.improvements.get": {
447
+ parameters: {
448
+ query?: never;
449
+ header?: never;
450
+ path?: never;
451
+ cookie?: never;
452
+ };
453
+ get?: never;
454
+ put?: never;
455
+ /**
456
+ * Suggested agent change
457
+ * @description One suggestion: what changed against the active version, what each edit did on the runs it was tried on (helped, hurt, no observed effect, unclear), the lesson recorded, replay scores of the suggestion against the active version, credits used and the improver method version.
458
+ *
459
+ * Kind: `read`. Errors use the envelope `{error: {code, reason, message, fields}}`.
460
+ */
461
+ post: operations["ops.agents.improvements.get"];
462
+ delete?: never;
463
+ options?: never;
464
+ head?: never;
465
+ patch?: never;
466
+ trace?: never;
467
+ };
468
+ "/ops/agents.improvements.list": {
469
+ parameters: {
470
+ query?: never;
471
+ header?: never;
472
+ path?: never;
473
+ cookie?: never;
474
+ };
475
+ get?: never;
476
+ put?: never;
477
+ /**
478
+ * Suggested agent changes
479
+ * @description Improvement cycles and their suggestions for one agent, newest first, with status (running, suggested, kept as is, accepted, in trial, promoted, rolled back, rejected).
480
+ *
481
+ * Kind: `read`. Errors use the envelope `{error: {code, reason, message, fields}}`.
482
+ */
483
+ post: operations["ops.agents.improvements.list"];
484
+ delete?: never;
485
+ options?: never;
486
+ head?: never;
487
+ patch?: never;
488
+ trace?: never;
489
+ };
490
+ "/ops/agents.improvements.reject": {
491
+ parameters: {
492
+ query?: never;
493
+ header?: never;
494
+ path?: never;
495
+ cookie?: never;
496
+ };
497
+ get?: never;
498
+ put?: never;
499
+ /**
500
+ * Reject a suggested agent change
501
+ * @description Closes a suggestion without changing the agent. The reason is stored in the agent's lessons library as a person's verdict, so later cycles see it.
502
+ *
503
+ * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
504
+ */
505
+ post: operations["ops.agents.improvements.reject"];
506
+ delete?: never;
507
+ options?: never;
508
+ head?: never;
509
+ patch?: never;
510
+ trace?: never;
511
+ };
512
+ "/ops/agents.improvements.start": {
513
+ parameters: {
514
+ query?: never;
515
+ header?: never;
516
+ path?: never;
517
+ cookie?: never;
518
+ };
519
+ get?: never;
520
+ put?: never;
521
+ /**
522
+ * Look for improvements to an agent
523
+ * @description Async. Starts an improvement cycle for one tenant-built agent: the improver studies its recent runs, tries candidate changes by replay and in the sandbox, and leaves a suggestion (or keeps the agent as is) for a person to decide. Consumes AI credits from the sandbox allowance. Returns a task.
524
+ *
525
+ * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
526
+ */
527
+ post: operations["ops.agents.improvements.start"];
528
+ delete?: never;
529
+ options?: never;
530
+ head?: never;
531
+ patch?: never;
532
+ trace?: never;
533
+ };
446
534
  "/ops/agents.list": {
447
535
  parameters: {
448
536
  query?: never;
@@ -17055,6 +17143,146 @@ export interface paths {
17055
17143
  };
17056
17144
  }
17057
17145
  export interface webhooks {
17146
+ "agent.improvement.accepted": {
17147
+ parameters: {
17148
+ query?: never;
17149
+ header?: never;
17150
+ path?: never;
17151
+ cookie?: never;
17152
+ };
17153
+ get?: never;
17154
+ put?: never;
17155
+ /**
17156
+ * Agent change accepted
17157
+ * @description A person accepted a suggested change. It became a new version on trial: a share of new runs use it until the hourly review promotes or rolls it back.
17158
+ *
17159
+ * Version 1. Delivered at least once; dedupe by `id`.
17160
+ *
17161
+ * Read the current record with `agents.improvements.get` using `fetch.input`.
17162
+ *
17163
+ * Subscriptions can filter on: `agent_key` (Agent), `trial_share` (Percent of new runs on the new version).
17164
+ *
17165
+ * Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
17166
+ */
17167
+ post: operations["events.agent.improvement.accepted"];
17168
+ delete?: never;
17169
+ options?: never;
17170
+ head?: never;
17171
+ patch?: never;
17172
+ trace?: never;
17173
+ };
17174
+ "agent.improvement.rejected": {
17175
+ parameters: {
17176
+ query?: never;
17177
+ header?: never;
17178
+ path?: never;
17179
+ cookie?: never;
17180
+ };
17181
+ get?: never;
17182
+ put?: never;
17183
+ /**
17184
+ * Agent change rejected
17185
+ * @description A person rejected a suggested change. The agent did not change; the reason went into the agent's lessons so later cycles see it.
17186
+ *
17187
+ * Version 1. Delivered at least once; dedupe by `id`.
17188
+ *
17189
+ * Read the current record with `agents.improvements.get` using `fetch.input`.
17190
+ *
17191
+ * Subscriptions can filter on: `agent_key` (Agent).
17192
+ *
17193
+ * Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
17194
+ */
17195
+ post: operations["events.agent.improvement.rejected"];
17196
+ delete?: never;
17197
+ options?: never;
17198
+ head?: never;
17199
+ patch?: never;
17200
+ trace?: never;
17201
+ };
17202
+ "agent.improvement.suggested": {
17203
+ parameters: {
17204
+ query?: never;
17205
+ header?: never;
17206
+ path?: never;
17207
+ cookie?: never;
17208
+ };
17209
+ get?: never;
17210
+ put?: never;
17211
+ /**
17212
+ * Agent change suggested
17213
+ * @description The agent improver finished a cycle and left a suggested change that scored at least as well as the active version on replay. A person accepts or rejects it.
17214
+ *
17215
+ * Version 1. Delivered at least once; dedupe by `id`.
17216
+ *
17217
+ * Read the current record with `agents.improvements.get` using `fetch.input`.
17218
+ *
17219
+ * Subscriptions can filter on: `agent_key` (Agent), `credits_used` (AI credits the cycle used).
17220
+ *
17221
+ * Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
17222
+ */
17223
+ post: operations["events.agent.improvement.suggested"];
17224
+ delete?: never;
17225
+ options?: never;
17226
+ head?: never;
17227
+ patch?: never;
17228
+ trace?: never;
17229
+ };
17230
+ "agent.version_trial.promoted": {
17231
+ parameters: {
17232
+ query?: never;
17233
+ header?: never;
17234
+ path?: never;
17235
+ cookie?: never;
17236
+ };
17237
+ get?: never;
17238
+ put?: never;
17239
+ /**
17240
+ * Agent version trial promoted
17241
+ * @description A version on trial did no worse than the active version over its window, so it became the version every run uses.
17242
+ *
17243
+ * Version 1. Delivered at least once; dedupe by `id`.
17244
+ *
17245
+ * Read the current record with `agents.improvements.get` using `fetch.input`.
17246
+ *
17247
+ * Subscriptions can filter on: `agent_key` (Agent), `trial_runs` (Runs on the new version), `active_runs` (Runs on the active version).
17248
+ *
17249
+ * Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
17250
+ */
17251
+ post: operations["events.agent.version_trial.promoted"];
17252
+ delete?: never;
17253
+ options?: never;
17254
+ head?: never;
17255
+ patch?: never;
17256
+ trace?: never;
17257
+ };
17258
+ "agent.version_trial.rolled_back": {
17259
+ parameters: {
17260
+ query?: never;
17261
+ header?: never;
17262
+ path?: never;
17263
+ cookie?: never;
17264
+ };
17265
+ get?: never;
17266
+ put?: never;
17267
+ /**
17268
+ * Agent version trial rolled back
17269
+ * @description A version on trial did worse than the active version on at least one signal, or the agent was paused or pinned, so every run went back to the active version.
17270
+ *
17271
+ * Version 1. Delivered at least once; dedupe by `id`.
17272
+ *
17273
+ * Read the current record with `agents.improvements.get` using `fetch.input`.
17274
+ *
17275
+ * Subscriptions can filter on: `agent_key` (Agent), `reason` (Why it rolled back).
17276
+ *
17277
+ * Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
17278
+ */
17279
+ post: operations["events.agent.version_trial.rolled_back"];
17280
+ delete?: never;
17281
+ options?: never;
17282
+ head?: never;
17283
+ patch?: never;
17284
+ trace?: never;
17285
+ };
17058
17286
  "bank_connection.link_requested": {
17059
17287
  parameters: {
17060
17288
  query?: never;
@@ -20912,7 +21140,7 @@ export interface operations {
20912
21140
  };
20913
21141
  };
20914
21142
  };
20915
- "ops.agents.list": {
21143
+ "ops.agents.improvements.get": {
20916
21144
  parameters: {
20917
21145
  query?: never;
20918
21146
  header?: {
@@ -20926,17 +21154,14 @@ export interface operations {
20926
21154
  };
20927
21155
  requestBody?: {
20928
21156
  content: {
20929
- /** @example {} */
21157
+ /**
21158
+ * @example {
21159
+ * "improvement_id": 2
21160
+ * }
21161
+ */
20930
21162
  "application/json": {
20931
- /** @description Cursor from the previous page's next_cursor. */
20932
- cursor?: string | null;
20933
- /** @description Rows per page (default 25). */
20934
- limit?: number | null;
20935
- /**
20936
- * Format: date-time
20937
- * @description Only rows changed at or after this instant, oldest change first, with deleted rows as tombstones.
20938
- */
20939
- updated_since?: string | null;
21163
+ /** @description The improvement, from agents.improvements.list. */
21164
+ improvement_id: number;
20940
21165
  };
20941
21166
  };
20942
21167
  };
@@ -20950,109 +21175,77 @@ export interface operations {
20950
21175
  /**
20951
21176
  * @example {
20952
21177
  * "result": {
20953
- * "items": [
21178
+ * "id": 2,
21179
+ * "agent_key": "yard_helper",
21180
+ * "status": "suggested",
21181
+ * "base_version": 1,
21182
+ * "diff": [
21183
+ * {
21184
+ * "part": "instructions",
21185
+ * "before": "You keep the yard tidy.",
21186
+ * "after": "You keep the yard tidy. Check the gate log before answering."
21187
+ * }
21188
+ * ],
21189
+ * "edits": [
20954
21190
  * {
20955
- * "id": 1,
20956
- * "key": "fixture_desk",
20957
- * "name": "Fixture desk",
20958
- * "origin": "axivoy",
20959
- * "owner_name": null,
20960
- * "status": "off",
20961
- * "disabled_at": "2026-10-20T20:56:40Z",
20962
- * "disabled_cause": "person",
20963
- * "disabled_reason": "Too chatty",
20964
- * "disabled_by": "Dayne Huel",
20965
- * "platform_holds": [],
20966
- * "limit_reached": null,
20967
- * "active_version": 1,
20968
- * "max_runs_per_day": null,
20969
- * "max_tool_calls_per_run": null,
20970
- * "monthly_credit_budget": null,
20971
- * "runs_today": 1,
20972
- * "credits_used_this_month": 0,
20973
- * "credits_last_hour": 0,
20974
- * "refusals_last_hour": 0,
20975
- * "open_runs": 1,
20976
- * "rehearsals_running": 0,
20977
- * "last_run_at": "2026-10-20T20:56:40Z",
20978
- * "deleted": null
21191
+ * "part": "instructions",
21192
+ * "change": "Read the gate log first.",
21193
+ * "observed": "Fewer wrong answers.",
21194
+ * "verdict": "helped"
20979
21195
  * }
20980
21196
  * ],
20981
- * "next_cursor": null
21197
+ * "lesson": {
21198
+ * "cue": "Gate questions",
21199
+ * "lesson": "Read the gate log first.",
21200
+ * "evidence": "Two runs",
21201
+ * "confidence": "medium"
21202
+ * },
21203
+ * "replay_score_active": 0.7,
21204
+ * "replay_score_suggested": 0.8,
21205
+ * "credits_used": 0,
21206
+ * "method_version": null,
21207
+ * "created_at": "2026-10-21T07:26:58Z"
20982
21208
  * }
20983
21209
  * }
20984
21210
  */
20985
21211
  "application/json": {
20986
21212
  result: {
20987
- /** @description One page of rows. */
20988
- items: {
20989
- /** @description The row's id. */
20990
- id: number;
20991
- /** @description The agent's key, for example recruiting_desk */
20992
- key: string;
20993
- /** @description The agent's name */
20994
- name: string;
20995
- /** @description axivoy (made by Axivoy) or tenant (built in this workspace) */
20996
- origin: string;
20997
- /** @description Who owns the agent; null for Axivoy's agents */
20998
- owner_name?: string | null;
20999
- /** @description on, off, auto_paused, paused_by_axivoy or at_limit */
21000
- status: string;
21001
- /**
21002
- * Format: date-time
21003
- * @description When it was turned off
21004
- */
21005
- disabled_at?: string | null;
21006
- /** @description person or circuit_breaker */
21007
- disabled_cause?: string | null;
21008
- /** @description Why it was turned off, in the words of whoever did it */
21009
- disabled_reason?: string | null;
21010
- /** @description Who turned it off; null when the breaker did */
21011
- disabled_by?: string | null;
21012
- /** @description Holds Axivoy placed on the agent */
21013
- platform_holds: {
21014
- /** @description pause_tenant, pause_definition or pin_version */
21015
- kind: string;
21016
- /** @description The pinned version, for pin_version */
21017
- version?: number | null;
21018
- /**
21019
- * Format: date-time
21020
- * @description When Axivoy placed it
21021
- */
21022
- since?: string | null;
21023
- }[];
21024
- /** @description max_runs_per_day or monthly_credit_budget when one is used up */
21025
- limit_reached?: string | null;
21026
- /** @description The live version */
21027
- active_version?: number | null;
21028
- /** @description Runs per UTC day; null when unlimited */
21029
- max_runs_per_day?: number | null;
21030
- /** @description Tool calls per run; null when unlimited */
21031
- max_tool_calls_per_run?: number | null;
21032
- /** @description AI credits per UTC month; null when unlimited */
21033
- monthly_credit_budget?: number | null;
21034
- /** @description Runs started this UTC day */
21035
- runs_today: number;
21036
- /** @description AI credits used this UTC month */
21037
- credits_used_this_month: number;
21038
- /** @description AI credits used in the last hour */
21039
- credits_last_hour: number;
21040
- /** @description Tool calls that failed or were refused in the last hour */
21041
- refusals_last_hour: number;
21042
- /** @description Runs not finished yet */
21043
- open_runs: number;
21044
- /** @description Rehearsals not finished yet */
21045
- rehearsals_running: number;
21046
- /**
21047
- * Format: date-time
21048
- * @description When the latest run started
21049
- */
21050
- last_run_at?: string | null;
21051
- /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
21052
- deleted?: boolean | null;
21213
+ /** @description The improvement id */
21214
+ id: number;
21215
+ /** @description The agent's key */
21216
+ agent_key: string;
21217
+ /** @description running, suggested, kept_current, accepted, in_trial, promoted, rolled_back or rejected */
21218
+ status: string;
21219
+ /** @description Version number the cycle started from */
21220
+ base_version?: number | null;
21221
+ /** @description part, before and after for each changed part */
21222
+ diff: unknown[];
21223
+ /** @description Each edit tried and what it did */
21224
+ edits: {
21225
+ /** @description The part the edit changed */
21226
+ part: string;
21227
+ /** @description What changed */
21228
+ change: string;
21229
+ /** @description What it did on the runs it was tried on */
21230
+ observed: string;
21231
+ /** @description helped, hurt, no_observed_effect or confounded */
21232
+ verdict: string;
21053
21233
  }[];
21054
- /** @description Pass as cursor for the next page; null on the last page. */
21055
- next_cursor?: string | null;
21234
+ /** @description cue, lesson, evidence and confidence */
21235
+ lesson?: Record<string, never> | null;
21236
+ /** @description Replay score of the active version on the same runs */
21237
+ replay_score_active?: number | null;
21238
+ /** @description Replay score of the suggestion */
21239
+ replay_score_suggested?: number | null;
21240
+ /** @description AI credits the cycle used */
21241
+ credits_used: number;
21242
+ /** @description Improver prompts version and method commit, prompts@commit */
21243
+ method_version?: string | null;
21244
+ /**
21245
+ * Format: date-time
21246
+ * @description When the cycle started
21247
+ */
21248
+ created_at: string;
21056
21249
  };
21057
21250
  };
21058
21251
  };
@@ -21123,7 +21316,7 @@ export interface operations {
21123
21316
  };
21124
21317
  };
21125
21318
  };
21126
- "ops.agents.rehearse": {
21319
+ "ops.agents.improvements.list": {
21127
21320
  parameters: {
21128
21321
  query?: never;
21129
21322
  header?: {
@@ -21139,34 +21332,26 @@ export interface operations {
21139
21332
  content: {
21140
21333
  /**
21141
21334
  * @example {
21142
- * "agent_key": "fake_desk",
21143
- * "mode": "dry_run",
21144
- * "subject": {
21145
- * "id": 1
21146
- * }
21335
+ * "agent_key": "yard_helper"
21147
21336
  * }
21148
21337
  */
21149
21338
  "application/json": {
21150
21339
  /** @description The agent's key, for example recruiting_desk. */
21151
21340
  agent_key: string;
21152
- /** @description The version to try; the live version when left out. */
21153
- version?: number;
21154
21341
  /**
21155
- * @description dry_run: real records, nothing changed or sent. sandbox: practice data in the workspace's sandbox.
21342
+ * @description Only cycles in this status; all when left out.
21156
21343
  * @enum {string}
21157
21344
  */
21158
- mode: "dry_run" | "sandbox";
21159
- /** @description The record to try it on. Dry run: the record of the agent's latest run when left out. Sandbox: the newest practice record. */
21160
- subject?: {
21161
- /** @description The record type the agent works on; checked against the agent. */
21162
- type?: string;
21163
- /** @description The record id. */
21164
- id: number;
21165
- };
21166
- /** @description Dry run only: a recorded event (its id from events.list) to replay as the trigger; its record becomes the subject. */
21167
- event_id?: string;
21168
- /** @description Sandbox only: one of the agent's scenario keys. Seeds that scenario's practice record and wakes the agent with its event, so the same situation can be tried on any version. */
21169
- scenario?: string;
21345
+ status?: "running" | "suggested" | "kept_current" | "accepted" | "in_trial" | "promoted" | "rolled_back" | "rejected";
21346
+ /** @description Cursor from the previous page's next_cursor. */
21347
+ cursor?: string | null;
21348
+ /** @description Rows per page (default 25). */
21349
+ limit?: number | null;
21350
+ /**
21351
+ * Format: date-time
21352
+ * @description Only rows changed at or after this instant, oldest change first, with deleted rows as tombstones.
21353
+ */
21354
+ updated_since?: string | null;
21170
21355
  };
21171
21356
  };
21172
21357
  };
@@ -21180,23 +21365,58 @@ export interface operations {
21180
21365
  /**
21181
21366
  * @example {
21182
21367
  * "result": {
21183
- * "message": "Trying it without changing anything. The result shows here when it stops.",
21184
- * "task_id": "a171294f-f44f-49d9-a87b-6912387bf1e0",
21185
- * "run_id": 1,
21186
- * "status": "running"
21368
+ * "items": [
21369
+ * {
21370
+ * "id": 2,
21371
+ * "status": "suggested",
21372
+ * "base_version": 1,
21373
+ * "suggested_version": 2,
21374
+ * "credits_used": 0,
21375
+ * "method_version": null,
21376
+ * "created_at": "2026-10-21T07:26:58Z",
21377
+ * "deleted": null
21378
+ * },
21379
+ * {
21380
+ * "id": 1,
21381
+ * "status": "kept_current",
21382
+ * "base_version": 1,
21383
+ * "suggested_version": null,
21384
+ * "credits_used": 0,
21385
+ * "method_version": null,
21386
+ * "created_at": "2026-10-21T07:26:58Z",
21387
+ * "deleted": null
21388
+ * }
21389
+ * ],
21390
+ * "next_cursor": null
21187
21391
  * }
21188
21392
  * }
21189
21393
  */
21190
21394
  "application/json": {
21191
21395
  result: {
21192
- /** @description What happened, in the operator's words */
21193
- message: string;
21194
- /** @description Poll tasks.get; operation.task.completed fires when the rehearsal stops */
21195
- task_id: string;
21196
- /** @description The rehearsal run; its timeline shows what the agent would have done */
21197
- run_id: number;
21198
- /** @description running */
21199
- status: string;
21396
+ /** @description One page of rows. */
21397
+ items: {
21398
+ /** @description The row's id. */
21399
+ id: number;
21400
+ /** @description running, suggested, kept_current, accepted, in_trial, promoted, rolled_back or rejected */
21401
+ status: string;
21402
+ /** @description The version the cycle started from */
21403
+ base_version?: number | null;
21404
+ /** @description The suggested version, once there is one */
21405
+ suggested_version?: number | null;
21406
+ /** @description AI credits the cycle used */
21407
+ credits_used: number;
21408
+ /** @description The improver method and its pinned commit */
21409
+ method_version?: string | null;
21410
+ /**
21411
+ * Format: date-time
21412
+ * @description When the cycle started
21413
+ */
21414
+ created_at: string;
21415
+ /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
21416
+ deleted?: boolean | null;
21417
+ }[];
21418
+ /** @description Pass as cursor for the next page; null on the last page. */
21419
+ next_cursor?: string | null;
21200
21420
  };
21201
21421
  };
21202
21422
  };
@@ -21267,7 +21487,7 @@ export interface operations {
21267
21487
  };
21268
21488
  };
21269
21489
  };
21270
- "ops.agents.runs.cancel": {
21490
+ "ops.agents.improvements.reject": {
21271
21491
  parameters: {
21272
21492
  query?: never;
21273
21493
  header?: {
@@ -21283,15 +21503,15 @@ export interface operations {
21283
21503
  content: {
21284
21504
  /**
21285
21505
  * @example {
21286
- * "run_id": 1,
21287
- * "reason": "Wrong file"
21506
+ * "improvement_id": 2,
21507
+ * "reason": "Too wordy for the yard crew."
21288
21508
  * }
21289
21509
  */
21290
21510
  "application/json": {
21291
- /** @description The run to cancel (from agents.runs.list). */
21292
- run_id: number;
21293
- /** @description Why, for the run timeline and the audit log. */
21294
- reason?: string | null;
21511
+ /** @description The suggestion or change on trial to reject. */
21512
+ improvement_id: number;
21513
+ /** @description Why; later improvement cycles read it. */
21514
+ reason: string;
21295
21515
  };
21296
21516
  };
21297
21517
  };
@@ -21305,23 +21525,14 @@ export interface operations {
21305
21525
  /**
21306
21526
  * @example {
21307
21527
  * "result": {
21308
- * "message": "Run cancelled.",
21309
- * "status": "completed",
21310
- * "cancelled": true,
21311
- * "withdrawn_approvals_count": 0
21528
+ * "status": "rejected"
21312
21529
  * }
21313
21530
  * }
21314
21531
  */
21315
21532
  "application/json": {
21316
21533
  result: {
21317
- /** @description What happened, in the operator's words */
21318
- message: string;
21319
- /** @description The run status after the call */
21534
+ /** @description rejected */
21320
21535
  status: string;
21321
- /** @description False when the run had already ended */
21322
- cancelled: boolean;
21323
- /** @description Approvals the run was waiting on that were withdrawn */
21324
- withdrawn_approvals_count: number;
21325
21536
  };
21326
21537
  };
21327
21538
  };
@@ -21392,7 +21603,7 @@ export interface operations {
21392
21603
  };
21393
21604
  };
21394
21605
  };
21395
- "ops.agents.runs.list": {
21606
+ "ops.agents.improvements.start": {
21396
21607
  parameters: {
21397
21608
  query?: never;
21398
21609
  header?: {
@@ -21408,26 +21619,22 @@ export interface operations {
21408
21619
  content: {
21409
21620
  /**
21410
21621
  * @example {
21411
- * "agent_key": "fixture_desk"
21622
+ * "agent_key": "yard_helper",
21623
+ * "probes": "replay"
21412
21624
  * }
21413
21625
  */
21414
21626
  "application/json": {
21415
- /** @description The agent's key, for example recruiting_desk. */
21627
+ /** @description The agent's key. */
21416
21628
  agent_key: string;
21629
+ /** @description 1 to 3, default 1: candidates tried per dimension. */
21630
+ depth?: number;
21631
+ /** @description Default 10, at most 25. */
21632
+ max_situations?: number;
21417
21633
  /**
21418
- * @description running, parked (waiting for a person), finished, or cancelled; all when left out.
21419
- * @enum {string|null}
21420
- */
21421
- status?: "running" | "parked" | "finished" | "cancelled" | null;
21422
- /** @description Cursor from the previous page's next_cursor. */
21423
- cursor?: string | null;
21424
- /** @description Rows per page (default 25). */
21425
- limit?: number | null;
21426
- /**
21427
- * Format: date-time
21428
- * @description Only rows changed at or after this instant, oldest change first, with deleted rows as tombstones.
21634
+ * @description Default replay_and_sandbox.
21635
+ * @enum {string}
21429
21636
  */
21430
- updated_since?: string | null;
21637
+ probes?: "replay" | "replay_and_sandbox";
21431
21638
  };
21432
21639
  };
21433
21640
  };
@@ -21441,77 +21648,20 @@ export interface operations {
21441
21648
  /**
21442
21649
  * @example {
21443
21650
  * "result": {
21444
- * "items": [
21445
- * {
21446
- * "id": 2,
21447
- * "subject": "user:2",
21448
- * "status": "cancelled",
21449
- * "run_status": "completed",
21450
- * "reason": "run_cancelled",
21451
- * "steps": 0,
21452
- * "credits_used": 0,
21453
- * "last_operation_key": null,
21454
- * "started_at": null,
21455
- * "completed_at": null,
21456
- * "delegate": "ai_agent_run:2",
21457
- * "deleted": null
21458
- * },
21459
- * {
21460
- * "id": 1,
21461
- * "subject": "user:1",
21462
- * "status": "running",
21463
- * "run_status": "waiting",
21464
- * "reason": null,
21465
- * "steps": 0,
21466
- * "credits_used": 0,
21467
- * "last_operation_key": null,
21468
- * "started_at": "2026-10-20T19:10:09Z",
21469
- * "completed_at": null,
21470
- * "delegate": "ai_agent_run:1",
21471
- * "deleted": null
21472
- * }
21473
- * ],
21474
- * "next_cursor": null
21651
+ * "task_id": "63dafeff-2d0d-4c15-92f9-deea8c649068",
21652
+ * "improvement_id": 1,
21653
+ * "status": "running"
21475
21654
  * }
21476
21655
  * }
21477
21656
  */
21478
21657
  "application/json": {
21479
21658
  result: {
21480
- /** @description One page of rows. */
21481
- items: {
21482
- /** @description The row's id. */
21483
- id: number;
21484
- /** @description What the run is about, as type:id */
21485
- subject?: string | null;
21486
- /** @description running, parked, finished or cancelled */
21487
- status: string;
21488
- /** @description The run's own status: pending, active, waiting, paused, completed or failed */
21489
- run_status: string;
21490
- /** @description Why a parked run waits or how a finished run ended */
21491
- reason?: string | null;
21492
- /** @description Steps recorded so far */
21493
- steps: number;
21494
- /** @description AI credits the run used so far */
21495
- credits_used: number;
21496
- /** @description The operation or tool the run called last */
21497
- last_operation_key?: string | null;
21498
- /**
21499
- * Format: date-time
21500
- * @description When the run first thought
21501
- */
21502
- started_at?: string | null;
21503
- /**
21504
- * Format: date-time
21505
- * @description When the run ended
21506
- */
21507
- completed_at?: string | null;
21508
- /** @description What audit entries for this run record as the delegate */
21509
- delegate: string;
21510
- /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
21511
- deleted?: boolean | null;
21512
- }[];
21513
- /** @description Pass as cursor for the next page; null on the last page. */
21514
- next_cursor?: string | null;
21659
+ /** @description Poll tasks.get; operation.task.completed fires when the cycle ends */
21660
+ task_id: string;
21661
+ /** @description The new improvement; open it with agents.improvements.get */
21662
+ improvement_id: number;
21663
+ /** @description running */
21664
+ status: string;
21515
21665
  };
21516
21666
  };
21517
21667
  };
@@ -21582,7 +21732,7 @@ export interface operations {
21582
21732
  };
21583
21733
  };
21584
21734
  };
21585
- "ops.ai.jobs.list": {
21735
+ "ops.agents.list": {
21586
21736
  parameters: {
21587
21737
  query?: never;
21588
21738
  header?: {
@@ -21598,13 +21748,6 @@ export interface operations {
21598
21748
  content: {
21599
21749
  /** @example {} */
21600
21750
  "application/json": {
21601
- /**
21602
- * @description Only jobs in this status
21603
- * @enum {string|null}
21604
- */
21605
- status?: "pending" | "queued" | "running" | "succeeded" | "failed" | "cancelled" | null;
21606
- /** @description Only jobs of this type, for example rate_confirmation_extraction */
21607
- job_type?: string | null;
21608
21751
  /** @description Cursor from the previous page's next_cursor. */
21609
21752
  cursor?: string | null;
21610
21753
  /** @description Rows per page (default 25). */
@@ -21630,16 +21773,28 @@ export interface operations {
21630
21773
  * "items": [
21631
21774
  * {
21632
21775
  * "id": 1,
21633
- * "job_type": "stub",
21634
- * "status": "queued",
21635
- * "cancellable": true,
21636
- * "requested_by_user_id": 2,
21637
- * "requested_by_name": "Melisa Will",
21638
- * "attempt_count": 0,
21639
- * "max_attempts": 3,
21640
- * "correlation_id": "3275b72a-1934-4869-af78-d05aeabf6855",
21641
- * "created_at": "2026-10-20T08:18:19Z",
21642
- * "cancelled_at": null,
21776
+ * "key": "fixture_desk",
21777
+ * "name": "Fixture desk",
21778
+ * "origin": "axivoy",
21779
+ * "owner_name": null,
21780
+ * "status": "off",
21781
+ * "disabled_at": "2026-10-20T20:56:40Z",
21782
+ * "disabled_cause": "person",
21783
+ * "disabled_reason": "Too chatty",
21784
+ * "disabled_by": "Dayne Huel",
21785
+ * "platform_holds": [],
21786
+ * "limit_reached": null,
21787
+ * "active_version": 1,
21788
+ * "max_runs_per_day": null,
21789
+ * "max_tool_calls_per_run": null,
21790
+ * "monthly_credit_budget": null,
21791
+ * "runs_today": 1,
21792
+ * "credits_used_this_month": 0,
21793
+ * "credits_last_hour": 0,
21794
+ * "refusals_last_hour": 0,
21795
+ * "open_runs": 1,
21796
+ * "rehearsals_running": 0,
21797
+ * "last_run_at": "2026-10-20T20:56:40Z",
21643
21798
  * "deleted": null
21644
21799
  * }
21645
21800
  * ],
@@ -21653,32 +21808,702 @@ export interface operations {
21653
21808
  items: {
21654
21809
  /** @description The row's id. */
21655
21810
  id: number;
21656
- /** @description What the job does */
21657
- job_type: string;
21658
- /** @description Lifecycle status */
21811
+ /** @description The agent's key, for example recruiting_desk */
21812
+ key: string;
21813
+ /** @description The agent's name */
21814
+ name: string;
21815
+ /** @description axivoy (made by Axivoy) or tenant (built in this workspace) */
21816
+ origin: string;
21817
+ /** @description Who owns the agent; null for Axivoy's agents */
21818
+ owner_name?: string | null;
21819
+ /** @description on, off, auto_paused, paused_by_axivoy or at_limit */
21659
21820
  status: string;
21660
- /** @description True while ai.jobs.cancel can still stop it */
21661
- cancellable: boolean;
21662
- /** @description Who asked for it; null for a system job */
21663
- requested_by_user_id?: number | null;
21664
- /** @description Their name */
21665
- requested_by_name?: string | null;
21666
- /** @description Attempts so far */
21667
- attempt_count: number;
21668
- /** @description Attempts allowed */
21669
- max_attempts: number;
21670
- /** @description Correlation id shared with the audit log */
21671
- correlation_id?: string | null;
21672
21821
  /**
21673
21822
  * Format: date-time
21674
- * @description When it was queued
21823
+ * @description When it was turned off
21675
21824
  */
21676
- created_at: string;
21825
+ disabled_at?: string | null;
21826
+ /** @description person or circuit_breaker */
21827
+ disabled_cause?: string | null;
21828
+ /** @description Why it was turned off, in the words of whoever did it */
21829
+ disabled_reason?: string | null;
21830
+ /** @description Who turned it off; null when the breaker did */
21831
+ disabled_by?: string | null;
21832
+ /** @description Holds Axivoy placed on the agent */
21833
+ platform_holds: {
21834
+ /** @description pause_tenant, pause_definition or pin_version */
21835
+ kind: string;
21836
+ /** @description The pinned version, for pin_version */
21837
+ version?: number | null;
21838
+ /**
21839
+ * Format: date-time
21840
+ * @description When Axivoy placed it
21841
+ */
21842
+ since?: string | null;
21843
+ }[];
21844
+ /** @description max_runs_per_day or monthly_credit_budget when one is used up */
21845
+ limit_reached?: string | null;
21846
+ /** @description The live version */
21847
+ active_version?: number | null;
21848
+ /** @description Runs per UTC day; null when unlimited */
21849
+ max_runs_per_day?: number | null;
21850
+ /** @description Tool calls per run; null when unlimited */
21851
+ max_tool_calls_per_run?: number | null;
21852
+ /** @description AI credits per UTC month; null when unlimited */
21853
+ monthly_credit_budget?: number | null;
21854
+ /** @description Runs started this UTC day */
21855
+ runs_today: number;
21856
+ /** @description AI credits used this UTC month */
21857
+ credits_used_this_month: number;
21858
+ /** @description AI credits used in the last hour */
21859
+ credits_last_hour: number;
21860
+ /** @description Tool calls that failed or were refused in the last hour */
21861
+ refusals_last_hour: number;
21862
+ /** @description Runs not finished yet */
21863
+ open_runs: number;
21864
+ /** @description Rehearsals not finished yet */
21865
+ rehearsals_running: number;
21677
21866
  /**
21678
21867
  * Format: date-time
21679
- * @description When it was cancelled
21868
+ * @description When the latest run started
21680
21869
  */
21681
- cancelled_at?: string | null;
21870
+ last_run_at?: string | null;
21871
+ /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
21872
+ deleted?: boolean | null;
21873
+ }[];
21874
+ /** @description Pass as cursor for the next page; null on the last page. */
21875
+ next_cursor?: string | null;
21876
+ };
21877
+ };
21878
+ };
21879
+ };
21880
+ 202: components["responses"]["Proposal"];
21881
+ /** @description Refused: credits_exhausted. */
21882
+ 402: {
21883
+ headers: {
21884
+ [name: string]: unknown;
21885
+ };
21886
+ content: {
21887
+ "application/json": components["schemas"]["OperationError"];
21888
+ };
21889
+ };
21890
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
21891
+ 403: {
21892
+ headers: {
21893
+ [name: string]: unknown;
21894
+ };
21895
+ content: {
21896
+ "application/json": components["schemas"]["OperationError"];
21897
+ };
21898
+ };
21899
+ /** @description Refused: not_found. */
21900
+ 404: {
21901
+ headers: {
21902
+ [name: string]: unknown;
21903
+ };
21904
+ content: {
21905
+ "application/json": components["schemas"]["OperationError"];
21906
+ };
21907
+ };
21908
+ /** @description Refused: idempotency_conflict, stale_state. */
21909
+ 409: {
21910
+ headers: {
21911
+ [name: string]: unknown;
21912
+ };
21913
+ content: {
21914
+ "application/json": components["schemas"]["OperationError"];
21915
+ };
21916
+ };
21917
+ /** @description Refused: operation_retired. */
21918
+ 410: {
21919
+ headers: {
21920
+ [name: string]: unknown;
21921
+ };
21922
+ content: {
21923
+ "application/json": components["schemas"]["OperationError"];
21924
+ };
21925
+ };
21926
+ /** @description Refused: invalid_input, domain_rule. */
21927
+ 422: {
21928
+ headers: {
21929
+ [name: string]: unknown;
21930
+ };
21931
+ content: {
21932
+ "application/json": components["schemas"]["OperationError"];
21933
+ };
21934
+ };
21935
+ /** @description Refused: rate_limited. */
21936
+ 429: {
21937
+ headers: {
21938
+ [name: string]: unknown;
21939
+ };
21940
+ content: {
21941
+ "application/json": components["schemas"]["OperationError"];
21942
+ };
21943
+ };
21944
+ };
21945
+ };
21946
+ "ops.agents.rehearse": {
21947
+ parameters: {
21948
+ query?: never;
21949
+ header?: {
21950
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
21951
+ "Idempotency-Key"?: string;
21952
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
21953
+ "Axivoy-Dry-Run"?: "true" | "false";
21954
+ };
21955
+ path?: never;
21956
+ cookie?: never;
21957
+ };
21958
+ requestBody?: {
21959
+ content: {
21960
+ /**
21961
+ * @example {
21962
+ * "agent_key": "fake_desk",
21963
+ * "mode": "dry_run",
21964
+ * "subject": {
21965
+ * "id": 1
21966
+ * }
21967
+ * }
21968
+ */
21969
+ "application/json": {
21970
+ /** @description The agent's key, for example recruiting_desk. */
21971
+ agent_key: string;
21972
+ /** @description The version to try; the live version when left out. */
21973
+ version?: number;
21974
+ /**
21975
+ * @description dry_run: real records, nothing changed or sent. sandbox: practice data in the workspace's sandbox.
21976
+ * @enum {string}
21977
+ */
21978
+ mode: "dry_run" | "sandbox";
21979
+ /** @description The record to try it on. Dry run: the record of the agent's latest run when left out. Sandbox: the newest practice record. */
21980
+ subject?: {
21981
+ /** @description The record type the agent works on; checked against the agent. */
21982
+ type?: string;
21983
+ /** @description The record id. */
21984
+ id: number;
21985
+ };
21986
+ /** @description Dry run only: a recorded event (its id from events.list) to replay as the trigger; its record becomes the subject. */
21987
+ event_id?: string;
21988
+ /** @description Sandbox only: one of the agent's scenario keys. Seeds that scenario's practice record and wakes the agent with its event, so the same situation can be tried on any version. */
21989
+ scenario?: string;
21990
+ /**
21991
+ * @description live (default): the agent calls its model. scripted: with a scenario that has scripted model turns, those play instead of the model, so two runs of one version give the same steps.
21992
+ * @enum {string}
21993
+ */
21994
+ model?: "live" | "scripted";
21995
+ };
21996
+ };
21997
+ };
21998
+ responses: {
21999
+ /** @description The operation ran. */
22000
+ 200: {
22001
+ headers: {
22002
+ [name: string]: unknown;
22003
+ };
22004
+ content: {
22005
+ /**
22006
+ * @example {
22007
+ * "result": {
22008
+ * "message": "Trying it without changing anything. The result shows here when it stops.",
22009
+ * "task_id": "a171294f-f44f-49d9-a87b-6912387bf1e0",
22010
+ * "run_id": 1,
22011
+ * "status": "running"
22012
+ * }
22013
+ * }
22014
+ */
22015
+ "application/json": {
22016
+ result: {
22017
+ /** @description What happened, in the operator's words */
22018
+ message: string;
22019
+ /** @description Poll tasks.get; operation.task.completed fires when the rehearsal stops */
22020
+ task_id: string;
22021
+ /** @description The rehearsal run; its timeline shows what the agent would have done */
22022
+ run_id: number;
22023
+ /** @description running */
22024
+ status: string;
22025
+ };
22026
+ };
22027
+ };
22028
+ };
22029
+ 202: components["responses"]["Proposal"];
22030
+ /** @description Refused: credits_exhausted. */
22031
+ 402: {
22032
+ headers: {
22033
+ [name: string]: unknown;
22034
+ };
22035
+ content: {
22036
+ "application/json": components["schemas"]["OperationError"];
22037
+ };
22038
+ };
22039
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
22040
+ 403: {
22041
+ headers: {
22042
+ [name: string]: unknown;
22043
+ };
22044
+ content: {
22045
+ "application/json": components["schemas"]["OperationError"];
22046
+ };
22047
+ };
22048
+ /** @description Refused: not_found. */
22049
+ 404: {
22050
+ headers: {
22051
+ [name: string]: unknown;
22052
+ };
22053
+ content: {
22054
+ "application/json": components["schemas"]["OperationError"];
22055
+ };
22056
+ };
22057
+ /** @description Refused: idempotency_conflict, stale_state. */
22058
+ 409: {
22059
+ headers: {
22060
+ [name: string]: unknown;
22061
+ };
22062
+ content: {
22063
+ "application/json": components["schemas"]["OperationError"];
22064
+ };
22065
+ };
22066
+ /** @description Refused: operation_retired. */
22067
+ 410: {
22068
+ headers: {
22069
+ [name: string]: unknown;
22070
+ };
22071
+ content: {
22072
+ "application/json": components["schemas"]["OperationError"];
22073
+ };
22074
+ };
22075
+ /** @description Refused: invalid_input, domain_rule. */
22076
+ 422: {
22077
+ headers: {
22078
+ [name: string]: unknown;
22079
+ };
22080
+ content: {
22081
+ "application/json": components["schemas"]["OperationError"];
22082
+ };
22083
+ };
22084
+ /** @description Refused: rate_limited. */
22085
+ 429: {
22086
+ headers: {
22087
+ [name: string]: unknown;
22088
+ };
22089
+ content: {
22090
+ "application/json": components["schemas"]["OperationError"];
22091
+ };
22092
+ };
22093
+ };
22094
+ };
22095
+ "ops.agents.runs.cancel": {
22096
+ parameters: {
22097
+ query?: never;
22098
+ header?: {
22099
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
22100
+ "Idempotency-Key"?: string;
22101
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
22102
+ "Axivoy-Dry-Run"?: "true" | "false";
22103
+ };
22104
+ path?: never;
22105
+ cookie?: never;
22106
+ };
22107
+ requestBody?: {
22108
+ content: {
22109
+ /**
22110
+ * @example {
22111
+ * "run_id": 1,
22112
+ * "reason": "Wrong file"
22113
+ * }
22114
+ */
22115
+ "application/json": {
22116
+ /** @description The run to cancel (from agents.runs.list). */
22117
+ run_id: number;
22118
+ /** @description Why, for the run timeline and the audit log. */
22119
+ reason?: string | null;
22120
+ };
22121
+ };
22122
+ };
22123
+ responses: {
22124
+ /** @description The operation ran. */
22125
+ 200: {
22126
+ headers: {
22127
+ [name: string]: unknown;
22128
+ };
22129
+ content: {
22130
+ /**
22131
+ * @example {
22132
+ * "result": {
22133
+ * "message": "Run cancelled.",
22134
+ * "status": "completed",
22135
+ * "cancelled": true,
22136
+ * "withdrawn_approvals_count": 0
22137
+ * }
22138
+ * }
22139
+ */
22140
+ "application/json": {
22141
+ result: {
22142
+ /** @description What happened, in the operator's words */
22143
+ message: string;
22144
+ /** @description The run status after the call */
22145
+ status: string;
22146
+ /** @description False when the run had already ended */
22147
+ cancelled: boolean;
22148
+ /** @description Approvals the run was waiting on that were withdrawn */
22149
+ withdrawn_approvals_count: number;
22150
+ };
22151
+ };
22152
+ };
22153
+ };
22154
+ 202: components["responses"]["Proposal"];
22155
+ /** @description Refused: credits_exhausted. */
22156
+ 402: {
22157
+ headers: {
22158
+ [name: string]: unknown;
22159
+ };
22160
+ content: {
22161
+ "application/json": components["schemas"]["OperationError"];
22162
+ };
22163
+ };
22164
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
22165
+ 403: {
22166
+ headers: {
22167
+ [name: string]: unknown;
22168
+ };
22169
+ content: {
22170
+ "application/json": components["schemas"]["OperationError"];
22171
+ };
22172
+ };
22173
+ /** @description Refused: not_found. */
22174
+ 404: {
22175
+ headers: {
22176
+ [name: string]: unknown;
22177
+ };
22178
+ content: {
22179
+ "application/json": components["schemas"]["OperationError"];
22180
+ };
22181
+ };
22182
+ /** @description Refused: idempotency_conflict, stale_state. */
22183
+ 409: {
22184
+ headers: {
22185
+ [name: string]: unknown;
22186
+ };
22187
+ content: {
22188
+ "application/json": components["schemas"]["OperationError"];
22189
+ };
22190
+ };
22191
+ /** @description Refused: operation_retired. */
22192
+ 410: {
22193
+ headers: {
22194
+ [name: string]: unknown;
22195
+ };
22196
+ content: {
22197
+ "application/json": components["schemas"]["OperationError"];
22198
+ };
22199
+ };
22200
+ /** @description Refused: invalid_input, domain_rule. */
22201
+ 422: {
22202
+ headers: {
22203
+ [name: string]: unknown;
22204
+ };
22205
+ content: {
22206
+ "application/json": components["schemas"]["OperationError"];
22207
+ };
22208
+ };
22209
+ /** @description Refused: rate_limited. */
22210
+ 429: {
22211
+ headers: {
22212
+ [name: string]: unknown;
22213
+ };
22214
+ content: {
22215
+ "application/json": components["schemas"]["OperationError"];
22216
+ };
22217
+ };
22218
+ };
22219
+ };
22220
+ "ops.agents.runs.list": {
22221
+ parameters: {
22222
+ query?: never;
22223
+ header?: {
22224
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
22225
+ "Idempotency-Key"?: string;
22226
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
22227
+ "Axivoy-Dry-Run"?: "true" | "false";
22228
+ };
22229
+ path?: never;
22230
+ cookie?: never;
22231
+ };
22232
+ requestBody?: {
22233
+ content: {
22234
+ /**
22235
+ * @example {
22236
+ * "agent_key": "fixture_desk"
22237
+ * }
22238
+ */
22239
+ "application/json": {
22240
+ /** @description The agent's key, for example recruiting_desk. */
22241
+ agent_key: string;
22242
+ /**
22243
+ * @description running, parked (waiting for a person), finished, or cancelled; all when left out.
22244
+ * @enum {string|null}
22245
+ */
22246
+ status?: "running" | "parked" | "finished" | "cancelled" | null;
22247
+ /** @description Cursor from the previous page's next_cursor. */
22248
+ cursor?: string | null;
22249
+ /** @description Rows per page (default 25). */
22250
+ limit?: number | null;
22251
+ /**
22252
+ * Format: date-time
22253
+ * @description Only rows changed at or after this instant, oldest change first, with deleted rows as tombstones.
22254
+ */
22255
+ updated_since?: string | null;
22256
+ };
22257
+ };
22258
+ };
22259
+ responses: {
22260
+ /** @description The operation ran. */
22261
+ 200: {
22262
+ headers: {
22263
+ [name: string]: unknown;
22264
+ };
22265
+ content: {
22266
+ /**
22267
+ * @example {
22268
+ * "result": {
22269
+ * "items": [
22270
+ * {
22271
+ * "id": 2,
22272
+ * "subject": "user:2",
22273
+ * "status": "cancelled",
22274
+ * "run_status": "completed",
22275
+ * "reason": "run_cancelled",
22276
+ * "steps": 0,
22277
+ * "credits_used": 0,
22278
+ * "last_operation_key": null,
22279
+ * "started_at": null,
22280
+ * "completed_at": null,
22281
+ * "delegate": "ai_agent_run:2",
22282
+ * "deleted": null
22283
+ * },
22284
+ * {
22285
+ * "id": 1,
22286
+ * "subject": "user:1",
22287
+ * "status": "running",
22288
+ * "run_status": "waiting",
22289
+ * "reason": null,
22290
+ * "steps": 0,
22291
+ * "credits_used": 0,
22292
+ * "last_operation_key": null,
22293
+ * "started_at": "2026-10-20T19:10:09Z",
22294
+ * "completed_at": null,
22295
+ * "delegate": "ai_agent_run:1",
22296
+ * "deleted": null
22297
+ * }
22298
+ * ],
22299
+ * "next_cursor": null
22300
+ * }
22301
+ * }
22302
+ */
22303
+ "application/json": {
22304
+ result: {
22305
+ /** @description One page of rows. */
22306
+ items: {
22307
+ /** @description The row's id. */
22308
+ id: number;
22309
+ /** @description What the run is about, as type:id */
22310
+ subject?: string | null;
22311
+ /** @description running, parked, finished or cancelled */
22312
+ status: string;
22313
+ /** @description The run's own status: pending, active, waiting, paused, completed or failed */
22314
+ run_status: string;
22315
+ /** @description Why a parked run waits or how a finished run ended */
22316
+ reason?: string | null;
22317
+ /** @description Steps recorded so far */
22318
+ steps: number;
22319
+ /** @description AI credits the run used so far */
22320
+ credits_used: number;
22321
+ /** @description The operation or tool the run called last */
22322
+ last_operation_key?: string | null;
22323
+ /**
22324
+ * Format: date-time
22325
+ * @description When the run first thought
22326
+ */
22327
+ started_at?: string | null;
22328
+ /**
22329
+ * Format: date-time
22330
+ * @description When the run ended
22331
+ */
22332
+ completed_at?: string | null;
22333
+ /** @description What audit entries for this run record as the delegate */
22334
+ delegate: string;
22335
+ /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
22336
+ deleted?: boolean | null;
22337
+ }[];
22338
+ /** @description Pass as cursor for the next page; null on the last page. */
22339
+ next_cursor?: string | null;
22340
+ };
22341
+ };
22342
+ };
22343
+ };
22344
+ 202: components["responses"]["Proposal"];
22345
+ /** @description Refused: credits_exhausted. */
22346
+ 402: {
22347
+ headers: {
22348
+ [name: string]: unknown;
22349
+ };
22350
+ content: {
22351
+ "application/json": components["schemas"]["OperationError"];
22352
+ };
22353
+ };
22354
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
22355
+ 403: {
22356
+ headers: {
22357
+ [name: string]: unknown;
22358
+ };
22359
+ content: {
22360
+ "application/json": components["schemas"]["OperationError"];
22361
+ };
22362
+ };
22363
+ /** @description Refused: not_found. */
22364
+ 404: {
22365
+ headers: {
22366
+ [name: string]: unknown;
22367
+ };
22368
+ content: {
22369
+ "application/json": components["schemas"]["OperationError"];
22370
+ };
22371
+ };
22372
+ /** @description Refused: idempotency_conflict, stale_state. */
22373
+ 409: {
22374
+ headers: {
22375
+ [name: string]: unknown;
22376
+ };
22377
+ content: {
22378
+ "application/json": components["schemas"]["OperationError"];
22379
+ };
22380
+ };
22381
+ /** @description Refused: operation_retired. */
22382
+ 410: {
22383
+ headers: {
22384
+ [name: string]: unknown;
22385
+ };
22386
+ content: {
22387
+ "application/json": components["schemas"]["OperationError"];
22388
+ };
22389
+ };
22390
+ /** @description Refused: invalid_input, domain_rule. */
22391
+ 422: {
22392
+ headers: {
22393
+ [name: string]: unknown;
22394
+ };
22395
+ content: {
22396
+ "application/json": components["schemas"]["OperationError"];
22397
+ };
22398
+ };
22399
+ /** @description Refused: rate_limited. */
22400
+ 429: {
22401
+ headers: {
22402
+ [name: string]: unknown;
22403
+ };
22404
+ content: {
22405
+ "application/json": components["schemas"]["OperationError"];
22406
+ };
22407
+ };
22408
+ };
22409
+ };
22410
+ "ops.ai.jobs.list": {
22411
+ parameters: {
22412
+ query?: never;
22413
+ header?: {
22414
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
22415
+ "Idempotency-Key"?: string;
22416
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
22417
+ "Axivoy-Dry-Run"?: "true" | "false";
22418
+ };
22419
+ path?: never;
22420
+ cookie?: never;
22421
+ };
22422
+ requestBody?: {
22423
+ content: {
22424
+ /** @example {} */
22425
+ "application/json": {
22426
+ /**
22427
+ * @description Only jobs in this status
22428
+ * @enum {string|null}
22429
+ */
22430
+ status?: "pending" | "queued" | "running" | "succeeded" | "failed" | "cancelled" | null;
22431
+ /** @description Only jobs of this type, for example rate_confirmation_extraction */
22432
+ job_type?: string | null;
22433
+ /** @description Cursor from the previous page's next_cursor. */
22434
+ cursor?: string | null;
22435
+ /** @description Rows per page (default 25). */
22436
+ limit?: number | null;
22437
+ /**
22438
+ * Format: date-time
22439
+ * @description Only rows changed at or after this instant, oldest change first, with deleted rows as tombstones.
22440
+ */
22441
+ updated_since?: string | null;
22442
+ };
22443
+ };
22444
+ };
22445
+ responses: {
22446
+ /** @description The operation ran. */
22447
+ 200: {
22448
+ headers: {
22449
+ [name: string]: unknown;
22450
+ };
22451
+ content: {
22452
+ /**
22453
+ * @example {
22454
+ * "result": {
22455
+ * "items": [
22456
+ * {
22457
+ * "id": 1,
22458
+ * "job_type": "stub",
22459
+ * "status": "queued",
22460
+ * "cancellable": true,
22461
+ * "requested_by_user_id": 2,
22462
+ * "requested_by_name": "Melisa Will",
22463
+ * "attempt_count": 0,
22464
+ * "max_attempts": 3,
22465
+ * "correlation_id": "3275b72a-1934-4869-af78-d05aeabf6855",
22466
+ * "created_at": "2026-10-20T08:18:19Z",
22467
+ * "cancelled_at": null,
22468
+ * "deleted": null
22469
+ * }
22470
+ * ],
22471
+ * "next_cursor": null
22472
+ * }
22473
+ * }
22474
+ */
22475
+ "application/json": {
22476
+ result: {
22477
+ /** @description One page of rows. */
22478
+ items: {
22479
+ /** @description The row's id. */
22480
+ id: number;
22481
+ /** @description What the job does */
22482
+ job_type: string;
22483
+ /** @description Lifecycle status */
22484
+ status: string;
22485
+ /** @description True while ai.jobs.cancel can still stop it */
22486
+ cancellable: boolean;
22487
+ /** @description Who asked for it; null for a system job */
22488
+ requested_by_user_id?: number | null;
22489
+ /** @description Their name */
22490
+ requested_by_name?: string | null;
22491
+ /** @description Attempts so far */
22492
+ attempt_count: number;
22493
+ /** @description Attempts allowed */
22494
+ max_attempts: number;
22495
+ /** @description Correlation id shared with the audit log */
22496
+ correlation_id?: string | null;
22497
+ /**
22498
+ * Format: date-time
22499
+ * @description When it was queued
22500
+ */
22501
+ created_at: string;
22502
+ /**
22503
+ * Format: date-time
22504
+ * @description When it was cancelled
22505
+ */
22506
+ cancelled_at?: string | null;
21682
22507
  /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
21683
22508
  deleted?: boolean | null;
21684
22509
  }[];
@@ -144654,6 +145479,532 @@ export interface operations {
144654
145479
  };
144655
145480
  };
144656
145481
  };
145482
+ "events.agent.improvement.accepted": {
145483
+ parameters: {
145484
+ query?: never;
145485
+ header: {
145486
+ /** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
145487
+ "Axivoy-Signature": string;
145488
+ /** @description Delivery id, the same on every retry of this delivery. */
145489
+ "Axivoy-Webhook-Id": string;
145490
+ /** @description The event `id`; dedupe on it. */
145491
+ "Axivoy-Event-Id": string;
145492
+ /** @description The event key, for example `load.created`. */
145493
+ "Axivoy-Event-Type": string;
145494
+ /** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
145495
+ "Axivoy-Test"?: string;
145496
+ };
145497
+ path?: never;
145498
+ cookie?: never;
145499
+ };
145500
+ requestBody: {
145501
+ content: {
145502
+ /**
145503
+ * @example {
145504
+ * "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
145505
+ * "type": "agent.improvement.accepted",
145506
+ * "version": 1,
145507
+ * "occurred_at": "2026-10-01T15:04:05Z",
145508
+ * "effective_at": "2026-10-01T15:04:05Z",
145509
+ * "tenant": 1,
145510
+ * "subject": {
145511
+ * "type": "agent_improvement",
145512
+ * "id": 1
145513
+ * },
145514
+ * "sequence": 2,
145515
+ * "facts": {
145516
+ * "agent_key": "yard_helper",
145517
+ * "trial_share": 20,
145518
+ * "accepted_by_user_id": 1
145519
+ * },
145520
+ * "causation": {
145521
+ * "invocation_id": null,
145522
+ * "event_id": null,
145523
+ * "subscription_id": null
145524
+ * },
145525
+ * "chain_depth": 0,
145526
+ * "fetch": {
145527
+ * "operation": "agents.improvements.get",
145528
+ * "input": {
145529
+ * "improvement_id": 1
145530
+ * }
145531
+ * }
145532
+ * }
145533
+ */
145534
+ "application/json": {
145535
+ /** @description Event id; the same on every delivery of this event. */
145536
+ id: string;
145537
+ /** @constant */
145538
+ type: "agent.improvement.accepted";
145539
+ /** @constant */
145540
+ version: 1;
145541
+ /** Format: date-time */
145542
+ occurred_at: string;
145543
+ /**
145544
+ * Format: date-time
145545
+ * @description When it counts operationally; differs from `occurred_at` for back-dated facts.
145546
+ */
145547
+ effective_at: string;
145548
+ /** @description Workspace id. */
145549
+ tenant: number;
145550
+ subject: {
145551
+ type: string;
145552
+ id: number | string;
145553
+ };
145554
+ /** @description Increases per subject; apply events for one subject in this order. */
145555
+ sequence: number;
145556
+ facts: {
145557
+ agent_key: string;
145558
+ trial_share: number;
145559
+ accepted_by_user_id: number;
145560
+ };
145561
+ causation: {
145562
+ invocation_id?: string | null;
145563
+ event_id?: string | null;
145564
+ subscription_id?: number | null;
145565
+ };
145566
+ chain_depth: number;
145567
+ fetch: {
145568
+ operation?: string;
145569
+ input?: Record<string, never>;
145570
+ } | null;
145571
+ /** @description Present and `true` only on test sends. */
145572
+ test?: boolean;
145573
+ };
145574
+ };
145575
+ };
145576
+ responses: {
145577
+ /** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
145578
+ "2XX": {
145579
+ headers: {
145580
+ [name: string]: unknown;
145581
+ };
145582
+ content?: never;
145583
+ };
145584
+ };
145585
+ };
145586
+ "events.agent.improvement.rejected": {
145587
+ parameters: {
145588
+ query?: never;
145589
+ header: {
145590
+ /** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
145591
+ "Axivoy-Signature": string;
145592
+ /** @description Delivery id, the same on every retry of this delivery. */
145593
+ "Axivoy-Webhook-Id": string;
145594
+ /** @description The event `id`; dedupe on it. */
145595
+ "Axivoy-Event-Id": string;
145596
+ /** @description The event key, for example `load.created`. */
145597
+ "Axivoy-Event-Type": string;
145598
+ /** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
145599
+ "Axivoy-Test"?: string;
145600
+ };
145601
+ path?: never;
145602
+ cookie?: never;
145603
+ };
145604
+ requestBody: {
145605
+ content: {
145606
+ /**
145607
+ * @example {
145608
+ * "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
145609
+ * "type": "agent.improvement.rejected",
145610
+ * "version": 1,
145611
+ * "occurred_at": "2026-10-01T15:04:05Z",
145612
+ * "effective_at": "2026-10-01T15:04:05Z",
145613
+ * "tenant": 1,
145614
+ * "subject": {
145615
+ * "type": "agent_improvement",
145616
+ * "id": 3
145617
+ * },
145618
+ * "sequence": 2,
145619
+ * "facts": {
145620
+ * "agent_key": "yard_helper",
145621
+ * "rejected_by_user_id": 1
145622
+ * },
145623
+ * "causation": {
145624
+ * "invocation_id": null,
145625
+ * "event_id": null,
145626
+ * "subscription_id": null
145627
+ * },
145628
+ * "chain_depth": 0,
145629
+ * "fetch": {
145630
+ * "operation": "agents.improvements.get",
145631
+ * "input": {
145632
+ * "improvement_id": 3
145633
+ * }
145634
+ * }
145635
+ * }
145636
+ */
145637
+ "application/json": {
145638
+ /** @description Event id; the same on every delivery of this event. */
145639
+ id: string;
145640
+ /** @constant */
145641
+ type: "agent.improvement.rejected";
145642
+ /** @constant */
145643
+ version: 1;
145644
+ /** Format: date-time */
145645
+ occurred_at: string;
145646
+ /**
145647
+ * Format: date-time
145648
+ * @description When it counts operationally; differs from `occurred_at` for back-dated facts.
145649
+ */
145650
+ effective_at: string;
145651
+ /** @description Workspace id. */
145652
+ tenant: number;
145653
+ subject: {
145654
+ type: string;
145655
+ id: number | string;
145656
+ };
145657
+ /** @description Increases per subject; apply events for one subject in this order. */
145658
+ sequence: number;
145659
+ facts: {
145660
+ agent_key: string;
145661
+ rejected_by_user_id: number;
145662
+ };
145663
+ causation: {
145664
+ invocation_id?: string | null;
145665
+ event_id?: string | null;
145666
+ subscription_id?: number | null;
145667
+ };
145668
+ chain_depth: number;
145669
+ fetch: {
145670
+ operation?: string;
145671
+ input?: Record<string, never>;
145672
+ } | null;
145673
+ /** @description Present and `true` only on test sends. */
145674
+ test?: boolean;
145675
+ };
145676
+ };
145677
+ };
145678
+ responses: {
145679
+ /** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
145680
+ "2XX": {
145681
+ headers: {
145682
+ [name: string]: unknown;
145683
+ };
145684
+ content?: never;
145685
+ };
145686
+ };
145687
+ };
145688
+ "events.agent.improvement.suggested": {
145689
+ parameters: {
145690
+ query?: never;
145691
+ header: {
145692
+ /** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
145693
+ "Axivoy-Signature": string;
145694
+ /** @description Delivery id, the same on every retry of this delivery. */
145695
+ "Axivoy-Webhook-Id": string;
145696
+ /** @description The event `id`; dedupe on it. */
145697
+ "Axivoy-Event-Id": string;
145698
+ /** @description The event key, for example `load.created`. */
145699
+ "Axivoy-Event-Type": string;
145700
+ /** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
145701
+ "Axivoy-Test"?: string;
145702
+ };
145703
+ path?: never;
145704
+ cookie?: never;
145705
+ };
145706
+ requestBody: {
145707
+ content: {
145708
+ /**
145709
+ * @example {
145710
+ * "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
145711
+ * "type": "agent.improvement.suggested",
145712
+ * "version": 1,
145713
+ * "occurred_at": "2026-10-01T15:04:05Z",
145714
+ * "effective_at": "2026-10-01T15:04:05Z",
145715
+ * "tenant": 1,
145716
+ * "subject": {
145717
+ * "type": "agent_improvement",
145718
+ * "id": 1
145719
+ * },
145720
+ * "sequence": 1,
145721
+ * "facts": {
145722
+ * "agent_key": "yard_helper",
145723
+ * "base_version": 1,
145724
+ * "replay_score_active": 0.7,
145725
+ * "replay_score_suggested": 0.8,
145726
+ * "credits_used": 0
145727
+ * },
145728
+ * "causation": {
145729
+ * "invocation_id": null,
145730
+ * "event_id": null,
145731
+ * "subscription_id": null
145732
+ * },
145733
+ * "chain_depth": 0,
145734
+ * "fetch": {
145735
+ * "operation": "agents.improvements.get",
145736
+ * "input": {
145737
+ * "improvement_id": 1
145738
+ * }
145739
+ * }
145740
+ * }
145741
+ */
145742
+ "application/json": {
145743
+ /** @description Event id; the same on every delivery of this event. */
145744
+ id: string;
145745
+ /** @constant */
145746
+ type: "agent.improvement.suggested";
145747
+ /** @constant */
145748
+ version: 1;
145749
+ /** Format: date-time */
145750
+ occurred_at: string;
145751
+ /**
145752
+ * Format: date-time
145753
+ * @description When it counts operationally; differs from `occurred_at` for back-dated facts.
145754
+ */
145755
+ effective_at: string;
145756
+ /** @description Workspace id. */
145757
+ tenant: number;
145758
+ subject: {
145759
+ type: string;
145760
+ id: number | string;
145761
+ };
145762
+ /** @description Increases per subject; apply events for one subject in this order. */
145763
+ sequence: number;
145764
+ facts: {
145765
+ agent_key: string;
145766
+ base_version?: number | null;
145767
+ replay_score_active?: number | null;
145768
+ replay_score_suggested?: number | null;
145769
+ credits_used: number;
145770
+ };
145771
+ causation: {
145772
+ invocation_id?: string | null;
145773
+ event_id?: string | null;
145774
+ subscription_id?: number | null;
145775
+ };
145776
+ chain_depth: number;
145777
+ fetch: {
145778
+ operation?: string;
145779
+ input?: Record<string, never>;
145780
+ } | null;
145781
+ /** @description Present and `true` only on test sends. */
145782
+ test?: boolean;
145783
+ };
145784
+ };
145785
+ };
145786
+ responses: {
145787
+ /** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
145788
+ "2XX": {
145789
+ headers: {
145790
+ [name: string]: unknown;
145791
+ };
145792
+ content?: never;
145793
+ };
145794
+ };
145795
+ };
145796
+ "events.agent.version_trial.promoted": {
145797
+ parameters: {
145798
+ query?: never;
145799
+ header: {
145800
+ /** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
145801
+ "Axivoy-Signature": string;
145802
+ /** @description Delivery id, the same on every retry of this delivery. */
145803
+ "Axivoy-Webhook-Id": string;
145804
+ /** @description The event `id`; dedupe on it. */
145805
+ "Axivoy-Event-Id": string;
145806
+ /** @description The event key, for example `load.created`. */
145807
+ "Axivoy-Event-Type": string;
145808
+ /** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
145809
+ "Axivoy-Test"?: string;
145810
+ };
145811
+ path?: never;
145812
+ cookie?: never;
145813
+ };
145814
+ requestBody: {
145815
+ content: {
145816
+ /**
145817
+ * @example {
145818
+ * "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
145819
+ * "type": "agent.version_trial.promoted",
145820
+ * "version": 1,
145821
+ * "occurred_at": "2026-10-01T15:04:05Z",
145822
+ * "effective_at": "2026-10-01T15:04:05Z",
145823
+ * "tenant": 1,
145824
+ * "subject": {
145825
+ * "type": "agent_version_trial",
145826
+ * "id": 1
145827
+ * },
145828
+ * "sequence": 1,
145829
+ * "facts": {
145830
+ * "agent_key": "yard_helper",
145831
+ * "trial_runs": 2,
145832
+ * "active_runs": 0,
145833
+ * "reason": "No signal worse than the active version over 2 runs."
145834
+ * },
145835
+ * "causation": {
145836
+ * "invocation_id": null,
145837
+ * "event_id": null,
145838
+ * "subscription_id": null
145839
+ * },
145840
+ * "chain_depth": 0,
145841
+ * "fetch": {
145842
+ * "operation": "agents.improvements.get",
145843
+ * "input": {
145844
+ * "improvement_id": 1
145845
+ * }
145846
+ * }
145847
+ * }
145848
+ */
145849
+ "application/json": {
145850
+ /** @description Event id; the same on every delivery of this event. */
145851
+ id: string;
145852
+ /** @constant */
145853
+ type: "agent.version_trial.promoted";
145854
+ /** @constant */
145855
+ version: 1;
145856
+ /** Format: date-time */
145857
+ occurred_at: string;
145858
+ /**
145859
+ * Format: date-time
145860
+ * @description When it counts operationally; differs from `occurred_at` for back-dated facts.
145861
+ */
145862
+ effective_at: string;
145863
+ /** @description Workspace id. */
145864
+ tenant: number;
145865
+ subject: {
145866
+ type: string;
145867
+ id: number | string;
145868
+ };
145869
+ /** @description Increases per subject; apply events for one subject in this order. */
145870
+ sequence: number;
145871
+ facts: {
145872
+ agent_key: string;
145873
+ trial_runs: number;
145874
+ active_runs: number;
145875
+ reason: string;
145876
+ };
145877
+ causation: {
145878
+ invocation_id?: string | null;
145879
+ event_id?: string | null;
145880
+ subscription_id?: number | null;
145881
+ };
145882
+ chain_depth: number;
145883
+ fetch: {
145884
+ operation?: string;
145885
+ input?: Record<string, never>;
145886
+ } | null;
145887
+ /** @description Present and `true` only on test sends. */
145888
+ test?: boolean;
145889
+ };
145890
+ };
145891
+ };
145892
+ responses: {
145893
+ /** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
145894
+ "2XX": {
145895
+ headers: {
145896
+ [name: string]: unknown;
145897
+ };
145898
+ content?: never;
145899
+ };
145900
+ };
145901
+ };
145902
+ "events.agent.version_trial.rolled_back": {
145903
+ parameters: {
145904
+ query?: never;
145905
+ header: {
145906
+ /** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
145907
+ "Axivoy-Signature": string;
145908
+ /** @description Delivery id, the same on every retry of this delivery. */
145909
+ "Axivoy-Webhook-Id": string;
145910
+ /** @description The event `id`; dedupe on it. */
145911
+ "Axivoy-Event-Id": string;
145912
+ /** @description The event key, for example `load.created`. */
145913
+ "Axivoy-Event-Type": string;
145914
+ /** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
145915
+ "Axivoy-Test"?: string;
145916
+ };
145917
+ path?: never;
145918
+ cookie?: never;
145919
+ };
145920
+ requestBody: {
145921
+ content: {
145922
+ /**
145923
+ * @example {
145924
+ * "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
145925
+ * "type": "agent.version_trial.rolled_back",
145926
+ * "version": 1,
145927
+ * "occurred_at": "2026-10-01T15:04:05Z",
145928
+ * "effective_at": "2026-10-01T15:04:05Z",
145929
+ * "tenant": 1,
145930
+ * "subject": {
145931
+ * "type": "agent_version_trial",
145932
+ * "id": 2
145933
+ * },
145934
+ * "sequence": 1,
145935
+ * "facts": {
145936
+ * "agent_key": "yard_helper",
145937
+ * "trial_runs": 2,
145938
+ * "active_runs": 2,
145939
+ * "reason": "Worse than the active version: refused 100.0% vs 0.0%."
145940
+ * },
145941
+ * "causation": {
145942
+ * "invocation_id": null,
145943
+ * "event_id": null,
145944
+ * "subscription_id": null
145945
+ * },
145946
+ * "chain_depth": 0,
145947
+ * "fetch": {
145948
+ * "operation": "agents.improvements.get",
145949
+ * "input": {
145950
+ * "improvement_id": 2
145951
+ * }
145952
+ * }
145953
+ * }
145954
+ */
145955
+ "application/json": {
145956
+ /** @description Event id; the same on every delivery of this event. */
145957
+ id: string;
145958
+ /** @constant */
145959
+ type: "agent.version_trial.rolled_back";
145960
+ /** @constant */
145961
+ version: 1;
145962
+ /** Format: date-time */
145963
+ occurred_at: string;
145964
+ /**
145965
+ * Format: date-time
145966
+ * @description When it counts operationally; differs from `occurred_at` for back-dated facts.
145967
+ */
145968
+ effective_at: string;
145969
+ /** @description Workspace id. */
145970
+ tenant: number;
145971
+ subject: {
145972
+ type: string;
145973
+ id: number | string;
145974
+ };
145975
+ /** @description Increases per subject; apply events for one subject in this order. */
145976
+ sequence: number;
145977
+ facts: {
145978
+ agent_key: string;
145979
+ trial_runs: number;
145980
+ active_runs: number;
145981
+ reason: string;
145982
+ };
145983
+ causation: {
145984
+ invocation_id?: string | null;
145985
+ event_id?: string | null;
145986
+ subscription_id?: number | null;
145987
+ };
145988
+ chain_depth: number;
145989
+ fetch: {
145990
+ operation?: string;
145991
+ input?: Record<string, never>;
145992
+ } | null;
145993
+ /** @description Present and `true` only on test sends. */
145994
+ test?: boolean;
145995
+ };
145996
+ };
145997
+ };
145998
+ responses: {
145999
+ /** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
146000
+ "2XX": {
146001
+ headers: {
146002
+ [name: string]: unknown;
146003
+ };
146004
+ content?: never;
146005
+ };
146006
+ };
146007
+ };
144657
146008
  "events.bank_connection.link_requested": {
144658
146009
  parameters: {
144659
146010
  query?: never;