@runtypelabs/sdk 10.8.1 → 10.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1480,6 +1480,8 @@ interface paths {
1480
1480
  requestBody?: {
1481
1481
  content: {
1482
1482
  "application/json": {
1483
+ /** @description The complete set of capabilities (flow, sub-agent and saved-tool attachments) on this agent, in display order. Each entry names its source by name, so the declaration is portable across accounts. Capabilities on the agent but absent here are removed; omit the field to leave them untouched. When present, the capabilities are part of the content hash and of the version this converge snapshots. They are written to the agent itself, so they cannot accompany a non-live deploy. */
1484
+ capabilities?: components["schemas"]["AgentEnsureCapability"][];
1483
1485
  contentHash?: string;
1484
1486
  definition?: {
1485
1487
  config?: {
@@ -1790,6 +1792,8 @@ interface paths {
1790
1792
  * @enum {string}
1791
1793
  */
1792
1794
  release?: "none" | "publish";
1795
+ /** @description The complete set of skills bound to this agent, in load order. Each entry names a skill by slug; `version` pins that skill versionNumber, and omitting it follows the skill's published version. Skills bound to the agent but absent here are unbound; omit the field to leave bindings untouched. Bindings are agent state, not alias state, so they take effect immediately and cannot accompany a non-live deploy. */
1796
+ skills?: components["schemas"]["AgentEnsureSkillBinding"][];
1793
1797
  version?: components["schemas"]["EnsureVersionMetadata"];
1794
1798
  };
1795
1799
  };
@@ -10544,6 +10548,8 @@ interface paths {
10544
10548
  icon: string | null;
10545
10549
  id: string;
10546
10550
  indexedFields: string[];
10551
+ /** @description Who last wrote the definition (e.g. dashboard, api, sdk); sdk/terraform mean managed in code. */
10552
+ lastModifiedSource: string | null;
10547
10553
  recordCount?: number;
10548
10554
  /** @description Constrained JSON Schema dialect: root object with string/number/boolean/array/object properties, one nesting level, no $ref/oneOf/pattern */
10549
10555
  schema: {
@@ -10642,6 +10648,8 @@ interface paths {
10642
10648
  icon: string | null;
10643
10649
  id: string;
10644
10650
  indexedFields: string[];
10651
+ /** @description Who last wrote the definition (e.g. dashboard, api, sdk); sdk/terraform mean managed in code. */
10652
+ lastModifiedSource: string | null;
10645
10653
  recordCount?: number;
10646
10654
  /** @description Constrained JSON Schema dialect: root object with string/number/boolean/array/object properties, one nesting level, no $ref/oneOf/pattern */
10647
10655
  schema: {
@@ -10712,6 +10720,125 @@ interface paths {
10712
10720
  patch?: never;
10713
10721
  trace?: never;
10714
10722
  };
10723
+ "/v1/collections/ensure": {
10724
+ parameters: {
10725
+ query?: never;
10726
+ header?: never;
10727
+ path?: never;
10728
+ cookie?: never;
10729
+ };
10730
+ get?: never;
10731
+ put?: never;
10732
+ /**
10733
+ * Ensure collection (config-as-code converge)
10734
+ * @description Idempotently converge a repo-defined record collection (display fields, schema and validationMode) onto the platform. Identity is slug + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response); full requests create the collection or update it when the canonical content hash differs. Schema changes follow the same rules as PATCH: they bump schemaVersion and append history, and a breaking change is rejected while the resulting mode is `enforce`. Set dryRun to plan without writing (CI drift gate), and onConflict: "overwrite" to converge over dashboard/API edits. Ensure never deletes a collection and never touches records.
10735
+ */
10736
+ post: {
10737
+ parameters: {
10738
+ query?: never;
10739
+ header?: never;
10740
+ path?: never;
10741
+ cookie?: never;
10742
+ };
10743
+ requestBody?: {
10744
+ content: {
10745
+ "application/json": {
10746
+ contentHash?: string;
10747
+ definition?: {
10748
+ description?: string | null;
10749
+ displayName: string;
10750
+ icon?: string | null;
10751
+ /** @description Constrained JSON Schema dialect: root object with string/number/boolean/array/object properties, one nesting level, no $ref/oneOf/pattern */
10752
+ schema?: {
10753
+ [key: string]: unknown;
10754
+ } | null;
10755
+ slug: string;
10756
+ /** @enum {string} */
10757
+ validationMode?: "off" | "warn" | "enforce";
10758
+ };
10759
+ dryRun?: boolean;
10760
+ expectedRemoteHash?: string;
10761
+ /** @enum {string} */
10762
+ onConflict?: "error" | "overwrite";
10763
+ slug: string;
10764
+ };
10765
+ };
10766
+ };
10767
+ responses: {
10768
+ /** @description Converge result: unchanged | created | updated | definitionRequired (hash miss — retry with the full definition) | plan (dryRun) */
10769
+ 200: {
10770
+ headers: {
10771
+ [name: string]: unknown;
10772
+ };
10773
+ content: {
10774
+ "application/json": components["schemas"]["CollectionEnsureResponse"];
10775
+ };
10776
+ };
10777
+ /** @description Invalid slug or schema, or a breaking schema change while enforcing (BREAKING_SCHEMA_CHANGE_REQUIRES_WARN_MODE) */
10778
+ 400: {
10779
+ headers: {
10780
+ [name: string]: unknown;
10781
+ };
10782
+ content: {
10783
+ "application/json": components["schemas"]["Error"] & {
10784
+ code?: string;
10785
+ details?: unknown;
10786
+ };
10787
+ };
10788
+ };
10789
+ /** @description Unauthorized */
10790
+ 401: {
10791
+ headers: {
10792
+ [name: string]: unknown;
10793
+ };
10794
+ content: {
10795
+ "application/json": components["schemas"]["Error"];
10796
+ };
10797
+ };
10798
+ /** @description Insufficient permissions */
10799
+ 403: {
10800
+ headers: {
10801
+ [name: string]: unknown;
10802
+ };
10803
+ content: {
10804
+ "application/json": components["schemas"]["Error"];
10805
+ };
10806
+ };
10807
+ /** @description Conflict: external_modification (last write was not ensure; pass onConflict: "overwrite") or remote_changed (expectedRemoteHash guard) */
10808
+ 409: {
10809
+ headers: {
10810
+ [name: string]: unknown;
10811
+ };
10812
+ content: {
10813
+ "application/json": components["schemas"]["CollectionEnsureConflict"];
10814
+ };
10815
+ };
10816
+ /** @description Submitted contentHash does not match the server-recomputed canonical hash */
10817
+ 422: {
10818
+ headers: {
10819
+ [name: string]: unknown;
10820
+ };
10821
+ content: {
10822
+ "application/json": components["schemas"]["CollectionEnsureHashMismatch"];
10823
+ };
10824
+ };
10825
+ /** @description Internal server error */
10826
+ 500: {
10827
+ headers: {
10828
+ [name: string]: unknown;
10829
+ };
10830
+ content: {
10831
+ "application/json": components["schemas"]["Error"];
10832
+ };
10833
+ };
10834
+ };
10835
+ };
10836
+ delete?: never;
10837
+ options?: never;
10838
+ head?: never;
10839
+ patch?: never;
10840
+ trace?: never;
10841
+ };
10715
10842
  "/v1/collections/types.d.ts": {
10716
10843
  parameters: {
10717
10844
  query?: never;
@@ -10826,6 +10953,8 @@ interface paths {
10826
10953
  icon: string | null;
10827
10954
  id: string;
10828
10955
  indexedFields: string[];
10956
+ /** @description Who last wrote the definition (e.g. dashboard, api, sdk); sdk/terraform mean managed in code. */
10957
+ lastModifiedSource: string | null;
10829
10958
  recordCount?: number;
10830
10959
  /** @description Constrained JSON Schema dialect: root object with string/number/boolean/array/object properties, one nesting level, no $ref/oneOf/pattern */
10831
10960
  schema: {
@@ -10989,6 +11118,8 @@ interface paths {
10989
11118
  icon: string | null;
10990
11119
  id: string;
10991
11120
  indexedFields: string[];
11121
+ /** @description Who last wrote the definition (e.g. dashboard, api, sdk); sdk/terraform mean managed in code. */
11122
+ lastModifiedSource: string | null;
10992
11123
  recordCount?: number;
10993
11124
  /** @description Constrained JSON Schema dialect: root object with string/number/boolean/array/object properties, one nesting level, no $ref/oneOf/pattern */
10994
11125
  schema: {
@@ -11158,6 +11289,83 @@ interface paths {
11158
11289
  patch?: never;
11159
11290
  trace?: never;
11160
11291
  };
11292
+ "/v1/collections/{slug}/pull": {
11293
+ parameters: {
11294
+ query?: never;
11295
+ header?: never;
11296
+ path?: never;
11297
+ cookie?: never;
11298
+ };
11299
+ /**
11300
+ * Pull collection definition (config-as-code)
11301
+ * @description Return the canonical config-as-code definition and provenance for a collection — the absorb-drift direction of the ensure protocol. The contentHash is recomputed from the live collection, so it is accurate even immediately after a dashboard edit.
11302
+ */
11303
+ get: {
11304
+ parameters: {
11305
+ query?: never;
11306
+ header?: never;
11307
+ path: {
11308
+ slug: string;
11309
+ };
11310
+ cookie?: never;
11311
+ };
11312
+ requestBody?: never;
11313
+ responses: {
11314
+ /** @description Canonical definition + provenance */
11315
+ 200: {
11316
+ headers: {
11317
+ [name: string]: unknown;
11318
+ };
11319
+ content: {
11320
+ "application/json": components["schemas"]["CollectionPullResponse"];
11321
+ };
11322
+ };
11323
+ /** @description Unauthorized */
11324
+ 401: {
11325
+ headers: {
11326
+ [name: string]: unknown;
11327
+ };
11328
+ content: {
11329
+ "application/json": components["schemas"]["Error"];
11330
+ };
11331
+ };
11332
+ /** @description Insufficient permissions */
11333
+ 403: {
11334
+ headers: {
11335
+ [name: string]: unknown;
11336
+ };
11337
+ content: {
11338
+ "application/json": components["schemas"]["Error"];
11339
+ };
11340
+ };
11341
+ /** @description No collection with that slug in the account scope */
11342
+ 404: {
11343
+ headers: {
11344
+ [name: string]: unknown;
11345
+ };
11346
+ content: {
11347
+ "application/json": components["schemas"]["Error"];
11348
+ };
11349
+ };
11350
+ /** @description Internal server error */
11351
+ 500: {
11352
+ headers: {
11353
+ [name: string]: unknown;
11354
+ };
11355
+ content: {
11356
+ "application/json": components["schemas"]["Error"];
11357
+ };
11358
+ };
11359
+ };
11360
+ };
11361
+ put?: never;
11362
+ post?: never;
11363
+ delete?: never;
11364
+ options?: never;
11365
+ head?: never;
11366
+ patch?: never;
11367
+ trace?: never;
11368
+ };
11161
11369
  "/v1/collections/{slug}/validate-existing": {
11162
11370
  parameters: {
11163
11371
  query?: never;
@@ -15806,7 +16014,7 @@ interface paths {
15806
16014
  put?: never;
15807
16015
  /**
15808
16016
  * Ensure eval suite (config-as-code converge)
15809
- * @description Idempotently converge a repo-defined eval suite (target + cases + graders) onto the platform. Identity is the suite name + account scope; the target flow/agent is resolved by name. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the suite or replace its cases when the canonical content hash differs. Non-executing: never runs the eval. The response always carries the server-computed canonical hash.
16017
+ * @description Idempotently converge a repo-defined eval suite (target + cases + graders) onto the platform. Identity is the suite name + account scope; the target flow/agent is resolved by name. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the suite or replace the cases ensure owns when the canonical content hash differs. Cases saved from runs, added in the dashboard, or owned by a product are never replaced. Set dryRun to plan without writing (CI drift gate), and onConflict: "overwrite" to converge over dashboard/API edits. Non-executing: never runs the eval. The response always carries the server-computed canonical hash.
15810
16018
  */
15811
16019
  post: {
15812
16020
  parameters: {
@@ -15870,12 +16078,16 @@ interface paths {
15870
16078
  };
15871
16079
  virtual?: boolean;
15872
16080
  };
16081
+ dryRun?: boolean;
16082
+ expectedRemoteHash?: string;
15873
16083
  name: string;
16084
+ /** @enum {string} */
16085
+ onConflict?: "error" | "overwrite";
15874
16086
  };
15875
16087
  };
15876
16088
  };
15877
16089
  responses: {
15878
- /** @description Converge result: unchanged | created | updated | definitionRequired (hash miss — retry with the full definition) */
16090
+ /** @description Converge result: unchanged | created | updated | definitionRequired (hash miss — retry with the full definition) | plan (dryRun) */
15879
16091
  200: {
15880
16092
  headers: {
15881
16093
  [name: string]: unknown;
@@ -15911,6 +16123,15 @@ interface paths {
15911
16123
  "application/json": components["schemas"]["Error"];
15912
16124
  };
15913
16125
  };
16126
+ /** @description Conflict: external_modification (last write was not ensure; pass onConflict: "overwrite") or remote_changed (expectedRemoteHash guard) */
16127
+ 409: {
16128
+ headers: {
16129
+ [name: string]: unknown;
16130
+ };
16131
+ content: {
16132
+ "application/json": components["schemas"]["EvalEnsureConflict"];
16133
+ };
16134
+ };
15914
16135
  /** @description Submitted contentHash does not match the server-recomputed canonical hash */
15915
16136
  422: {
15916
16137
  headers: {
@@ -16195,7 +16416,7 @@ interface paths {
16195
16416
  };
16196
16417
  /**
16197
16418
  * Pull eval suite definition (config-as-code)
16198
- * @description Return the canonical config-as-code definition and provenance for an eval suite by name — the absorb-drift direction of the ensure protocol. The contentHash is recomputed from the live suite state.
16419
+ * @description Return the canonical config-as-code definition and provenance for an eval suite by name — the absorb-drift direction of the ensure protocol. The definition carries the cases ensure owns (or, for a suite ensure never wrote, its unowned cases), and the contentHash is recomputed from that live state.
16199
16420
  */
16200
16421
  get: {
16201
16422
  parameters: {
@@ -16935,7 +17156,7 @@ interface paths {
16935
17156
  name: string;
16936
17157
  notes?: string;
16937
17158
  /**
16938
- * @description Case provenance. Defaults to "manual" when omitted.
17159
+ * @description Case provenance. Defaults to "manual" when omitted. "ensure" is reserved for config-as-code converges.
16939
17160
  * @enum {string}
16940
17161
  */
16941
17162
  origin?: "manual" | "saved_from_run" | "generated" | "imported" | "fpo";
@@ -17341,7 +17562,7 @@ interface paths {
17341
17562
  name: string;
17342
17563
  notes?: string;
17343
17564
  /**
17344
- * @description Case provenance. Defaults to "manual" when omitted.
17565
+ * @description Case provenance. Defaults to "manual" when omitted. "ensure" is reserved for config-as-code converges.
17345
17566
  * @enum {string}
17346
17567
  */
17347
17568
  origin?: "manual" | "saved_from_run" | "generated" | "imported" | "fpo";
@@ -18848,6 +19069,10 @@ interface paths {
18848
19069
  executionLane?: "durable" | "in_process";
18849
19070
  httpStatus?: number;
18850
19071
  result?: unknown;
19072
+ /** @description Present and `true` when the execution settled but its result was too large to store or could not be retrieved; `result` then holds only a summary and `resultUnavailableReason` explains why. `error` keeps describing an execution failure; on an otherwise completed execution it repeats the reason. */
19073
+ resultUnavailable?: boolean;
19074
+ /** @description Why the result is unavailable. Present exactly when `resultUnavailable` is `true`. */
19075
+ resultUnavailableReason?: string;
18851
19076
  /** @enum {string} */
18852
19077
  status: "queued" | "running" | "paused" | "completed" | "failed" | "cancelled";
18853
19078
  targetId?: string;
@@ -30707,6 +30932,7 @@ interface paths {
30707
30932
  productGoal?: string;
30708
30933
  /** @enum {string} */
30709
30934
  productStage?: "idea" | "prototype" | "beta" | "production" | "scaling";
30935
+ stack?: components["schemas"]["ProductStack"];
30710
30936
  targetAudience?: string;
30711
30937
  techStack?: {
30712
30938
  backend?: string[];
@@ -30808,7 +31034,7 @@ interface paths {
30808
31034
  put?: never;
30809
31035
  /**
30810
31036
  * Ensure full product (config-as-code converge of the whole FPO)
30811
- * @description Idempotently converge an entire Full Product Object (the nested product graph) in one shot. Fans out to the per-entity ensure services in dependency order (product → capability backing flows/agents → capability-as-tool composition → capability links → surfaces + surface items → records → schedules → secret bindings), returning a per-entity report. Identity is the product name + account scope. NON-atomic by design: a per-entity failure is reported in `entities[].result = "failed"` (and `hasFailures`) and a re-run self-heals; only a top-level product reject aborts. Set dryRun to plan without writing. Set prune to remove product-scoped capabilities/surfaces (and their items) absent from the FPO (account-scoped flows/agents/tools/records are never removed). Whole-FPO fast-probe is not yet supported (PR3). API keys converge each nested flow, agent, schedule, record, eval suite and skill only with that entity kind's own write scope (FLOWS:WRITE, AGENTS:WRITE or AGENTS:CREATE/UPDATE, SCHEDULES:WRITE, RECORDS:WRITE, EVALS:WRITE, SKILLS:WRITE) on top of the product scope; otherwise that entity reports `failed`. Binding a skill to an agent also needs agent update scope. Schedules also honor the plan's active-schedule limit and minimum frequency.
31037
+ * @description Idempotently converge an entire Full Product Object (the nested product graph) in one shot. Fans out to the per-entity ensure services in dependency order (product → capability backing flows/agents → capability-as-tool composition → capability links → surfaces + surface items → records → schedules → secret bindings), returning a per-entity report. Identity is the product name + account scope. NON-atomic by design: a per-entity failure is reported in `entities[].result = "failed"` (and `hasFailures`) and a re-run self-heals; only a top-level product reject aborts. Converged capability agents and flows are published to `live` by default; set release to "none" to save changes as drafts. Set dryRun to plan without writing. Set prune to remove product-scoped capabilities/surfaces (and their items) absent from the FPO (account-scoped flows/agents/tools/records are never removed). A hash-only probe (`name` + `contentHash`, no fpo) with release "none" answers `unchanged` when the live graph reconstructs (as GET /products/pull-fpo does) to that hash, else `definitionRequired` (retry with the full fpo); a probe that publishes (the default release) always answers `definitionRequired`, because only a full converge can publish drafts that are not yet live. The probe, the dryRun `remoteHash` and expectedRemoteHash read the live graph, so API keys need PRODUCTS:READ for them. A dryRun reports the live graph's `remoteHash`; pass it as expectedRemoteHash on the apply to refuse the write (409 remote_changed) if the product changed in between. The guard compares what GET /products/pull-fpo reconstructs, so edits to seed records, schedules or secrets (which pull-fpo omits) do not trip it. When pull-fpo has to omit part of the product (a capability, surface, schedule, eval suite or skill it cannot represent), a probe answers `definitionRequired`, a dryRun reports no `remoteHash`, and expectedRemoteHash is refused with 409. The guard is re-checked immediately before the first write but does not lock the graph, so an edit that lands while the apply is running can still be overwritten. API keys need PRODUCTS:CREATE to create the product and PRODUCTS:UPDATE to change an existing one (PRODUCTS:WRITE covers both). API keys converge each nested flow, agent, tool, surface, schedule, record, eval suite and skill only with that entity kind's own write scope (FLOWS:WRITE, AGENTS:WRITE or AGENTS:CREATE/UPDATE, TOOLS:WRITE, PRODUCTS:SURFACES:WRITE, SCHEDULES:WRITE, RECORDS:WRITE, EVALS:WRITE, SKILLS:WRITE) on top of the product scope; otherwise that entity reports `failed`. Adding or changing a capability on an existing product needs PRODUCTS:CAPABILITIES:WRITE, and adding a route to an existing surface needs PRODUCTS:SURFACES:WRITE. Prune needs PRODUCTS:CAPABILITIES:WRITE to remove capabilities and PRODUCTS:SURFACES:WRITE to remove surfaces or their items, and a pruned surface's client tokens are revoked. Binding a skill to an agent also needs agent update scope. Schedules also honor the plan's active-schedule limit and minimum frequency.
30812
31038
  */
30813
31039
  post: {
30814
31040
  parameters: {
@@ -30820,12 +31046,18 @@ interface paths {
30820
31046
  requestBody?: {
30821
31047
  content: {
30822
31048
  "application/json": {
31049
+ /** @description Hash-only probe: the canonical FPO hash the caller holds. Answers `unchanged` when the live graph reconstructs (as pull-fpo does) to this hash, else `definitionRequired`. Only valid without `fpo`. */
31050
+ contentHash?: string;
30823
31051
  /** @description Plan without writing — returns a per-entity plan (CI drift gate). */
30824
31052
  dryRun?: boolean;
30825
- /** @description A complete Full Product Object (FPO): the nested product graph (product, capabilities, tools, surfaces, ...). Validated server-side via the shared FPO validator. */
30826
- fpo: {
31053
+ /** @description TOCTOU guard binding a dry run to its apply: the write proceeds only while the live graph still hashes to this value (the dry run's `remoteHash`); otherwise 409 remote_changed. */
31054
+ expectedRemoteHash?: string;
31055
+ /** @description A complete Full Product Object (FPO): the nested product graph (product, capabilities, tools, surfaces, ...). Validated server-side via the shared FPO validator. Omit it only for a hash-only probe (`name` + `contentHash`). */
31056
+ fpo?: {
30827
31057
  [key: string]: unknown;
30828
31058
  };
31059
+ /** @description The product name a hash-only probe resolves. Only valid without `fpo`. */
31060
+ name?: string;
30829
31061
  /**
30830
31062
  * @description Per nested entity: "overwrite" converges over dashboard/API edits.
30831
31063
  * @enum {string}
@@ -30833,11 +31065,16 @@ interface paths {
30833
31065
  onConflict?: "error" | "overwrite";
30834
31066
  /** @description Opt-in removal of product-scoped capabilities/surfaces (and their items) absent from the FPO, after the converge passes. NEVER touches account-scoped flows/agents/tools/records. Honors createPolicy:"skip". With dryRun, reports would-be removals as `pruned` plan rows. */
30835
31067
  prune?: boolean;
31068
+ /**
31069
+ * @description Whether converged capability agents and flows go live. Defaults to "publish": an agent or flow whose converged content is not yet live is versioned and published (the agent's `live` alias moves to that version), matching product creation. "none" saves changes as drafts and leaves `live` where it was. Publishing needs update authority over that entity kind, and for an agent the live deploy scope (AGENTS:DEPLOY:LIVE; AGENTS:WRITE or AGENTS:UPDATE also accepted); an API key without it converges that kind as "none".
31070
+ * @enum {string}
31071
+ */
31072
+ release?: "none" | "publish";
30836
31073
  };
30837
31074
  };
30838
31075
  };
30839
31076
  responses: {
30840
- /** @description Converge result: unchanged | converged | plan (dryRun), with a per-entity report. */
31077
+ /** @description Converge result: unchanged | converged | plan (dryRun), with a per-entity report; or definitionRequired (hash-only probe miss — retry with the full fpo). */
30841
31078
  200: {
30842
31079
  headers: {
30843
31080
  [name: string]: unknown;
@@ -30873,7 +31110,7 @@ interface paths {
30873
31110
  "application/json": components["schemas"]["Error"];
30874
31111
  };
30875
31112
  };
30876
- /** @description Conflict converging the top-level product: external_modification or remote_changed. */
31113
+ /** @description Conflict: external_modification converging the top-level product, or remote_changed (expectedRemoteHash guard). */
30877
31114
  409: {
30878
31115
  headers: {
30879
31116
  [name: string]: unknown;
@@ -33125,7 +33362,7 @@ interface paths {
33125
33362
  put?: never;
33126
33363
  /**
33127
33364
  * Ensure surface (config-as-code converge)
33128
- * @description Idempotently converge a repo-defined surface definition onto a product. Identity is name + product. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the surface or update it when the canonical content hash differs. The response always carries the server-computed canonical hash. Set dryRun to plan without writing (CI drift gate), and onConflict: "overwrite" to converge over dashboard/API edits. Surfaces have no version snapshots, so there is no publish option.
33365
+ * @description Idempotently converge a repo-defined surface definition onto a product. Identity is name + product. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the surface or update it when the canonical content hash differs. The response always carries the server-computed canonical hash. Set dryRun to plan without writing (CI drift gate), and onConflict: "overwrite" to converge over dashboard/API edits. Surfaces have no version snapshots, so there is no publish option. inbound/outbound are excluded from the content hash, so a request carrying them must send the full definition; changes to them are reported in changedKeys (as inbound.<key> / outbound.<key>) and converge as "updated".
33129
33366
  */
33130
33367
  post: {
33131
33368
  parameters: {
@@ -33146,13 +33383,15 @@ interface paths {
33146
33383
  };
33147
33384
  /** @enum {string} */
33148
33385
  environment?: "production" | "development";
33386
+ /** @description Inbound channel config. Omit to keep the stored value; null clears it. A credential value of "<redacted>" (as returned by pull) keeps the stored credential. */
33149
33387
  inbound?: {
33150
33388
  [key: string]: unknown;
33151
- };
33389
+ } | null;
33152
33390
  name: string;
33391
+ /** @description Outbound channel config. Omit to keep the stored value; null clears it. A credential value of "<redacted>" (as returned by pull) keeps the stored credential. */
33153
33392
  outbound?: {
33154
33393
  [key: string]: unknown;
33155
- };
33394
+ } | null;
33156
33395
  /** @enum {string} */
33157
33396
  status?: "draft" | "active" | "paused";
33158
33397
  /** @enum {string} */
@@ -33256,7 +33495,7 @@ interface paths {
33256
33495
  };
33257
33496
  /**
33258
33497
  * Pull surface definition (config-as-code)
33259
- * @description Return the canonical config-as-code definition and provenance for a surface by name within a product — the absorb-drift direction of the ensure protocol. The contentHash is recomputed from the live surface state, so it is accurate even immediately after a dashboard edit.
33498
+ * @description Return the canonical config-as-code definition and provenance for a surface by name within a product — the absorb-drift direction of the ensure protocol. The contentHash is recomputed from the live surface state, so it is accurate even immediately after a dashboard edit. Configured inbound/outbound credentials are returned as the "<redacted>" placeholder, which ensure accepts to keep the stored value; inbound/outbound are null when the surface has none.
33260
33499
  */
33261
33500
  get: {
33262
33501
  parameters: {
@@ -39609,6 +39848,216 @@ interface paths {
39609
39848
  patch?: never;
39610
39849
  trace?: never;
39611
39850
  };
39851
+ "/v1/question-sets/ensure": {
39852
+ parameters: {
39853
+ query?: never;
39854
+ header?: never;
39855
+ path?: never;
39856
+ cookie?: never;
39857
+ };
39858
+ get?: never;
39859
+ put?: never;
39860
+ /**
39861
+ * Ensure question set (config-as-code converge)
39862
+ * @description Idempotently converge a repo-defined question set. Identity is the slug within the organization. A hash-only probe skips the payload in the steady state (a miss is a normal 200 `definitionRequired`, not an error); a full request creates the set, or appends a draft version when the questions, input mapping or model differ. Set dryRun to plan without writing, onConflict: "overwrite" to converge over dashboard or API edits, expectedRemoteHash to bind an apply to its dry run, and release: "publish" to publish the latest version. Ensure never deletes a set or a version.
39863
+ */
39864
+ post: {
39865
+ parameters: {
39866
+ query?: never;
39867
+ header?: never;
39868
+ path?: never;
39869
+ cookie?: never;
39870
+ };
39871
+ requestBody?: {
39872
+ content: {
39873
+ "application/json": {
39874
+ contentHash?: string;
39875
+ definition?: {
39876
+ description?: string | null;
39877
+ inputMapping?: {
39878
+ [key: string]: string;
39879
+ } | null;
39880
+ model?: string | null;
39881
+ name: string;
39882
+ /** @description Judgment questions keyed by question id, validated like `POST /v1/question-sets`. */
39883
+ questions: {
39884
+ [key: string]: unknown;
39885
+ };
39886
+ };
39887
+ dryRun?: boolean;
39888
+ expectedRemoteHash?: string;
39889
+ /** @enum {string} */
39890
+ onConflict?: "error" | "overwrite";
39891
+ /** @enum {string} */
39892
+ release?: "none" | "publish";
39893
+ /** @description Identity, unique in the organization: lowercase letters, digits, `-` and `_`, up to 64. */
39894
+ slug: string;
39895
+ };
39896
+ };
39897
+ };
39898
+ responses: {
39899
+ /** @description Converge result: unchanged | created | updated | definitionRequired (hash miss; retry with the full definition) | plan (dryRun) */
39900
+ 200: {
39901
+ headers: {
39902
+ [name: string]: unknown;
39903
+ };
39904
+ content: {
39905
+ "application/json": components["schemas"]["QuestionSetEnsureResponse"];
39906
+ };
39907
+ };
39908
+ /** @description Invalid request or invalid questions */
39909
+ 400: {
39910
+ headers: {
39911
+ [name: string]: unknown;
39912
+ };
39913
+ content: {
39914
+ "application/json": components["schemas"]["Error"] & {
39915
+ code?: string;
39916
+ };
39917
+ };
39918
+ };
39919
+ /** @description Unauthorized */
39920
+ 401: {
39921
+ headers: {
39922
+ [name: string]: unknown;
39923
+ };
39924
+ content: {
39925
+ "application/json": components["schemas"]["Error"];
39926
+ };
39927
+ };
39928
+ /** @description Insufficient permissions, or no organization context */
39929
+ 403: {
39930
+ headers: {
39931
+ [name: string]: unknown;
39932
+ };
39933
+ content: {
39934
+ "application/json": components["schemas"]["Error"];
39935
+ };
39936
+ };
39937
+ /** @description The question set was removed while the converge ran */
39938
+ 404: {
39939
+ headers: {
39940
+ [name: string]: unknown;
39941
+ };
39942
+ content: {
39943
+ "application/json": components["schemas"]["Error"] & {
39944
+ code?: string;
39945
+ };
39946
+ };
39947
+ };
39948
+ /** @description Conflict: external_modification (the last write was not ensure; pass onConflict: "overwrite"), remote_changed (expectedRemoteHash guard), or a concurrent write */
39949
+ 409: {
39950
+ headers: {
39951
+ [name: string]: unknown;
39952
+ };
39953
+ content: {
39954
+ "application/json": components["schemas"]["QuestionSetEnsureConflict"];
39955
+ };
39956
+ };
39957
+ /** @description The submitted contentHash does not match the server-recomputed canonical hash */
39958
+ 422: {
39959
+ headers: {
39960
+ [name: string]: unknown;
39961
+ };
39962
+ content: {
39963
+ "application/json": components["schemas"]["QuestionSetEnsureHashMismatch"];
39964
+ };
39965
+ };
39966
+ /** @description Internal server error */
39967
+ 500: {
39968
+ headers: {
39969
+ [name: string]: unknown;
39970
+ };
39971
+ content: {
39972
+ "application/json": components["schemas"]["Error"];
39973
+ };
39974
+ };
39975
+ };
39976
+ };
39977
+ delete?: never;
39978
+ options?: never;
39979
+ head?: never;
39980
+ patch?: never;
39981
+ trace?: never;
39982
+ };
39983
+ "/v1/question-sets/pull": {
39984
+ parameters: {
39985
+ query?: never;
39986
+ header?: never;
39987
+ path?: never;
39988
+ cookie?: never;
39989
+ };
39990
+ /**
39991
+ * Pull question set definition (config-as-code)
39992
+ * @description Return the canonical config-as-code definition and provenance for a question set by slug. The definition is the latest version, and the contentHash is recomputed from the live row, so it is accurate right after a dashboard edit.
39993
+ */
39994
+ get: {
39995
+ parameters: {
39996
+ query: {
39997
+ /** @description Identity, unique in the organization: lowercase letters, digits, `-` and `_`, up to 64. */
39998
+ slug: string;
39999
+ };
40000
+ header?: never;
40001
+ path?: never;
40002
+ cookie?: never;
40003
+ };
40004
+ requestBody?: never;
40005
+ responses: {
40006
+ /** @description Canonical definition and provenance */
40007
+ 200: {
40008
+ headers: {
40009
+ [name: string]: unknown;
40010
+ };
40011
+ content: {
40012
+ "application/json": components["schemas"]["QuestionSetPullResponse"];
40013
+ };
40014
+ };
40015
+ /** @description Unauthorized */
40016
+ 401: {
40017
+ headers: {
40018
+ [name: string]: unknown;
40019
+ };
40020
+ content: {
40021
+ "application/json": components["schemas"]["Error"];
40022
+ };
40023
+ };
40024
+ /** @description Insufficient permissions, or no organization context */
40025
+ 403: {
40026
+ headers: {
40027
+ [name: string]: unknown;
40028
+ };
40029
+ content: {
40030
+ "application/json": components["schemas"]["Error"];
40031
+ };
40032
+ };
40033
+ /** @description No question set with that slug in the organization */
40034
+ 404: {
40035
+ headers: {
40036
+ [name: string]: unknown;
40037
+ };
40038
+ content: {
40039
+ "application/json": components["schemas"]["Error"];
40040
+ };
40041
+ };
40042
+ /** @description Internal server error */
40043
+ 500: {
40044
+ headers: {
40045
+ [name: string]: unknown;
40046
+ };
40047
+ content: {
40048
+ "application/json": components["schemas"]["Error"];
40049
+ };
40050
+ };
40051
+ };
40052
+ };
40053
+ put?: never;
40054
+ post?: never;
40055
+ delete?: never;
40056
+ options?: never;
40057
+ head?: never;
40058
+ patch?: never;
40059
+ trace?: never;
40060
+ };
39612
40061
  "/v1/question-sets/{id}": {
39613
40062
  parameters: {
39614
40063
  query?: never;
@@ -40115,87 +40564,99 @@ interface paths {
40115
40564
  patch?: never;
40116
40565
  trace?: never;
40117
40566
  };
40118
- "/v1/question-sets/{id}/versions/{versionNumber}/publish": {
40119
- parameters: {
40120
- query?: never;
40121
- header?: never;
40122
- path?: never;
40123
- cookie?: never;
40124
- };
40125
- get?: never;
40126
- put?: never;
40127
- /**
40128
- * Publish a question set version
40129
- * @description Freeze the version and make it the one executions resolve when they name no version. Publishing an already-published version moves the current pointer back to it.
40130
- */
40131
- post: {
40132
- parameters: {
40133
- query?: never;
40134
- header?: never;
40135
- path: {
40136
- id: string;
40137
- versionNumber: number;
40138
- };
40139
- cookie?: never;
40140
- };
40141
- requestBody?: never;
40142
- responses: {
40143
- /** @description Published */
40144
- 200: {
40145
- headers: {
40146
- [name: string]: unknown;
40147
- };
40148
- content: {
40149
- "application/json": {
40150
- questionSet: components["schemas"]["QuestionSet"];
40151
- version: components["schemas"]["QuestionSetVersion"];
40152
- };
40153
- };
40154
- };
40155
- /** @description Invalid request */
40156
- 400: {
40157
- headers: {
40158
- [name: string]: unknown;
40159
- };
40160
- content: {
40161
- "application/json": components["schemas"]["QuestionSetError"];
40162
- };
40163
- };
40164
- /** @description Unauthorized */
40165
- 401: {
40166
- headers: {
40167
- [name: string]: unknown;
40168
- };
40169
- content: {
40170
- "application/json": components["schemas"]["Error"];
40171
- };
40172
- };
40173
- /** @description Insufficient permissions, or no organization context */
40174
- 403: {
40175
- headers: {
40176
- [name: string]: unknown;
40177
- };
40178
- content: {
40179
- "application/json": components["schemas"]["Error"];
40180
- };
40181
- };
40182
- /** @description Not found */
40183
- 404: {
40184
- headers: {
40185
- [name: string]: unknown;
40186
- };
40187
- content: {
40188
- "application/json": components["schemas"]["QuestionSetError"];
40189
- };
40190
- };
40191
- };
40192
- };
40193
- delete?: never;
40194
- options?: never;
40195
- head?: never;
40196
- patch?: never;
40197
- trace?: never;
40198
- };
40567
+ "/v1/question-sets/{id}/versions/{versionNumber}/publish": {
40568
+ parameters: {
40569
+ query?: never;
40570
+ header?: never;
40571
+ path?: never;
40572
+ cookie?: never;
40573
+ };
40574
+ get?: never;
40575
+ put?: never;
40576
+ /**
40577
+ * Publish a question set version
40578
+ * @description Freeze the version and make it the one executions resolve when they name no version. Publishing an already-published version moves the current pointer back to it.
40579
+ */
40580
+ post: {
40581
+ parameters: {
40582
+ query?: {
40583
+ /** @description A set managed by code (`lastModifiedSource` is `sdk` or `terraform`) answers 409 `managed_by_code_conflict` unless this is `overwrite`. */
40584
+ onConflict?: "error" | "overwrite";
40585
+ };
40586
+ header?: never;
40587
+ path: {
40588
+ id: string;
40589
+ versionNumber: number;
40590
+ };
40591
+ cookie?: never;
40592
+ };
40593
+ requestBody?: never;
40594
+ responses: {
40595
+ /** @description Published */
40596
+ 200: {
40597
+ headers: {
40598
+ [name: string]: unknown;
40599
+ };
40600
+ content: {
40601
+ "application/json": {
40602
+ questionSet: components["schemas"]["QuestionSet"];
40603
+ version: components["schemas"]["QuestionSetVersion"];
40604
+ };
40605
+ };
40606
+ };
40607
+ /** @description Invalid request */
40608
+ 400: {
40609
+ headers: {
40610
+ [name: string]: unknown;
40611
+ };
40612
+ content: {
40613
+ "application/json": components["schemas"]["QuestionSetError"];
40614
+ };
40615
+ };
40616
+ /** @description Unauthorized */
40617
+ 401: {
40618
+ headers: {
40619
+ [name: string]: unknown;
40620
+ };
40621
+ content: {
40622
+ "application/json": components["schemas"]["Error"];
40623
+ };
40624
+ };
40625
+ /** @description Insufficient permissions, or no organization context */
40626
+ 403: {
40627
+ headers: {
40628
+ [name: string]: unknown;
40629
+ };
40630
+ content: {
40631
+ "application/json": components["schemas"]["Error"];
40632
+ };
40633
+ };
40634
+ /** @description Not found */
40635
+ 404: {
40636
+ headers: {
40637
+ [name: string]: unknown;
40638
+ };
40639
+ content: {
40640
+ "application/json": components["schemas"]["QuestionSetError"];
40641
+ };
40642
+ };
40643
+ /** @description Conflict */
40644
+ 409: {
40645
+ headers: {
40646
+ [name: string]: unknown;
40647
+ };
40648
+ content: {
40649
+ "application/json": components["schemas"]["QuestionSetError"];
40650
+ };
40651
+ };
40652
+ };
40653
+ };
40654
+ delete?: never;
40655
+ options?: never;
40656
+ head?: never;
40657
+ patch?: never;
40658
+ trace?: never;
40659
+ };
40199
40660
  "/v1/records": {
40200
40661
  parameters: {
40201
40662
  query?: never;
@@ -44027,7 +44488,239 @@ interface paths {
44027
44488
  patch?: never;
44028
44489
  trace?: never;
44029
44490
  };
44030
- "/v1/schedules/batch/{batchId}/results": {
44491
+ "/v1/schedules/batch/{batchId}/results": {
44492
+ parameters: {
44493
+ query?: never;
44494
+ header?: never;
44495
+ path?: never;
44496
+ cookie?: never;
44497
+ };
44498
+ /**
44499
+ * Get results for a batch execution
44500
+ * @description Returns the per-record results for a batch execution.
44501
+ */
44502
+ get: {
44503
+ parameters: {
44504
+ query?: {
44505
+ limit?: string;
44506
+ offset?: string;
44507
+ status?: string;
44508
+ };
44509
+ header?: never;
44510
+ path: {
44511
+ batchId: string;
44512
+ };
44513
+ cookie?: never;
44514
+ };
44515
+ requestBody?: never;
44516
+ responses: {
44517
+ /** @description Batch results */
44518
+ 200: {
44519
+ headers: {
44520
+ [name: string]: unknown;
44521
+ };
44522
+ content: {
44523
+ "application/json": {
44524
+ data: {
44525
+ agentExecutionId: string | null;
44526
+ createdAt: string;
44527
+ durationMs: number | null;
44528
+ error: string | null;
44529
+ executedAt: string | null;
44530
+ /**
44531
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy' | 'external'). Recorded at write time from the committed lane decision; never inferred later. 'external' marks a run a customer executed outside Runtype and reported through ingest. Null for rows written before attribution shipped and for units that never started executing.
44532
+ * @enum {string|null}
44533
+ */
44534
+ executionEngine?: "runtime" | "legacy" | "external" | null;
44535
+ failedAt: string | null;
44536
+ failedStepCount: number | null;
44537
+ flowId: string | null;
44538
+ flowName: string | null;
44539
+ record: {
44540
+ id: string;
44541
+ name: string;
44542
+ type: string;
44543
+ } | null;
44544
+ recordId: string;
44545
+ recordResultId: string | null;
44546
+ result?: unknown;
44547
+ status: string;
44548
+ stepCount: number | null;
44549
+ }[];
44550
+ pagination: {
44551
+ hasMore: boolean;
44552
+ limit: number;
44553
+ offset: number;
44554
+ total: number;
44555
+ };
44556
+ summary?: {
44557
+ recordsWithFailedSteps: number;
44558
+ };
44559
+ };
44560
+ };
44561
+ };
44562
+ /** @description Unauthorized */
44563
+ 401: {
44564
+ headers: {
44565
+ [name: string]: unknown;
44566
+ };
44567
+ content: {
44568
+ "application/json": components["schemas"]["Error"];
44569
+ };
44570
+ };
44571
+ /** @description Insufficient permissions */
44572
+ 403: {
44573
+ headers: {
44574
+ [name: string]: unknown;
44575
+ };
44576
+ content: {
44577
+ "application/json": components["schemas"]["Error"];
44578
+ };
44579
+ };
44580
+ /** @description Batch not found */
44581
+ 404: {
44582
+ headers: {
44583
+ [name: string]: unknown;
44584
+ };
44585
+ content: {
44586
+ "application/json": components["schemas"]["Error"];
44587
+ };
44588
+ };
44589
+ };
44590
+ };
44591
+ put?: never;
44592
+ post?: never;
44593
+ delete?: never;
44594
+ options?: never;
44595
+ head?: never;
44596
+ patch?: never;
44597
+ trace?: never;
44598
+ };
44599
+ "/v1/schedules/ensure": {
44600
+ parameters: {
44601
+ query?: never;
44602
+ header?: never;
44603
+ path?: never;
44604
+ cookie?: never;
44605
+ };
44606
+ get?: never;
44607
+ put?: never;
44608
+ /**
44609
+ * Ensure schedule (config-as-code converge)
44610
+ * @description Idempotently converge a repo-defined schedule on a standalone flow or agent. Identity is name + target + account scope; the target may name the flow or agent instead of carrying its id, so one definition works in every environment. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response); full requests create the schedule or update it when the canonical content hash differs. Set dryRun to plan without writing (CI drift gate) and onConflict: "overwrite" to converge over dashboard/API edits. Omit `enabled` to leave a paused schedule paused. Ensure never deletes; schedules owned by a product surface are never matched.
44611
+ */
44612
+ post: {
44613
+ parameters: {
44614
+ query?: never;
44615
+ header?: never;
44616
+ path?: never;
44617
+ cookie?: never;
44618
+ };
44619
+ requestBody?: {
44620
+ content: {
44621
+ "application/json": {
44622
+ contentHash?: string;
44623
+ definition?: components["schemas"]["ScheduleEnsureDefinition"];
44624
+ dryRun?: boolean;
44625
+ expectedRemoteHash?: string;
44626
+ name: string;
44627
+ /** @enum {string} */
44628
+ onConflict?: "error" | "overwrite";
44629
+ target: components["schemas"]["ScheduleEnsureTarget"];
44630
+ };
44631
+ };
44632
+ };
44633
+ responses: {
44634
+ /** @description Converge result: unchanged | created | updated | definitionRequired (hash miss — retry with the full definition) | plan (dryRun) */
44635
+ 200: {
44636
+ headers: {
44637
+ [name: string]: unknown;
44638
+ };
44639
+ content: {
44640
+ "application/json": components["schemas"]["ScheduleEnsureResponse"];
44641
+ };
44642
+ };
44643
+ /** @description Validation error */
44644
+ 400: {
44645
+ headers: {
44646
+ [name: string]: unknown;
44647
+ };
44648
+ content: {
44649
+ "application/json": components["schemas"]["Error"];
44650
+ };
44651
+ };
44652
+ /** @description Unauthorized */
44653
+ 401: {
44654
+ headers: {
44655
+ [name: string]: unknown;
44656
+ };
44657
+ content: {
44658
+ "application/json": components["schemas"]["Error"];
44659
+ };
44660
+ };
44661
+ /** @description Plan limit exceeded (cron frequency or active schedule count) */
44662
+ 402: {
44663
+ headers: {
44664
+ [name: string]: unknown;
44665
+ };
44666
+ content: {
44667
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
44668
+ };
44669
+ };
44670
+ /** @description Insufficient permissions */
44671
+ 403: {
44672
+ headers: {
44673
+ [name: string]: unknown;
44674
+ };
44675
+ content: {
44676
+ "application/json": components["schemas"]["Error"];
44677
+ };
44678
+ };
44679
+ /** @description Target not found */
44680
+ 404: {
44681
+ headers: {
44682
+ [name: string]: unknown;
44683
+ };
44684
+ content: {
44685
+ "application/json": components["schemas"]["Error"];
44686
+ };
44687
+ };
44688
+ /** @description Conflict: external_modification (last write was not ensure; pass onConflict: "overwrite") or remote_changed (expectedRemoteHash guard) */
44689
+ 409: {
44690
+ headers: {
44691
+ [name: string]: unknown;
44692
+ };
44693
+ content: {
44694
+ "application/json": components["schemas"]["ScheduleEnsureConflict"];
44695
+ };
44696
+ };
44697
+ /** @description Submitted contentHash does not match the server-recomputed canonical hash */
44698
+ 422: {
44699
+ headers: {
44700
+ [name: string]: unknown;
44701
+ };
44702
+ content: {
44703
+ "application/json": components["schemas"]["ScheduleEnsureHashMismatch"];
44704
+ };
44705
+ };
44706
+ /** @description Internal server error */
44707
+ 500: {
44708
+ headers: {
44709
+ [name: string]: unknown;
44710
+ };
44711
+ content: {
44712
+ "application/json": components["schemas"]["Error"];
44713
+ };
44714
+ };
44715
+ };
44716
+ };
44717
+ delete?: never;
44718
+ options?: never;
44719
+ head?: never;
44720
+ patch?: never;
44721
+ trace?: never;
44722
+ };
44723
+ "/v1/schedules/pull": {
44031
44724
  parameters: {
44032
44725
  query?: never;
44033
44726
  header?: never;
@@ -44035,67 +44728,40 @@ interface paths {
44035
44728
  cookie?: never;
44036
44729
  };
44037
44730
  /**
44038
- * Get results for a batch execution
44039
- * @description Returns the per-record results for a batch execution.
44731
+ * Pull schedule definition (config-as-code)
44732
+ * @description Return the canonical config-as-code definition and provenance for a standalone schedule by name and target — the absorb-drift direction of the ensure protocol. The target is echoed in the form the query used, and the definition always declares `enabled`.
44040
44733
  */
44041
44734
  get: {
44042
44735
  parameters: {
44043
- query?: {
44044
- limit?: string;
44045
- offset?: string;
44046
- status?: string;
44736
+ query: {
44737
+ name: string;
44738
+ flowId?: string;
44739
+ agentId?: string;
44740
+ flowName?: string;
44741
+ agentName?: string;
44047
44742
  };
44048
44743
  header?: never;
44049
- path: {
44050
- batchId: string;
44051
- };
44744
+ path?: never;
44052
44745
  cookie?: never;
44053
44746
  };
44054
44747
  requestBody?: never;
44055
44748
  responses: {
44056
- /** @description Batch results */
44749
+ /** @description Canonical definition + provenance */
44057
44750
  200: {
44058
44751
  headers: {
44059
44752
  [name: string]: unknown;
44060
44753
  };
44061
44754
  content: {
44062
- "application/json": {
44063
- data: {
44064
- agentExecutionId: string | null;
44065
- createdAt: string;
44066
- durationMs: number | null;
44067
- error: string | null;
44068
- executedAt: string | null;
44069
- /**
44070
- * @description Engine that actually executed this record execution ('runtime' | 'legacy' | 'external'). Recorded at write time from the committed lane decision; never inferred later. 'external' marks a run a customer executed outside Runtype and reported through ingest. Null for rows written before attribution shipped and for units that never started executing.
44071
- * @enum {string|null}
44072
- */
44073
- executionEngine?: "runtime" | "legacy" | "external" | null;
44074
- failedAt: string | null;
44075
- failedStepCount: number | null;
44076
- flowId: string | null;
44077
- flowName: string | null;
44078
- record: {
44079
- id: string;
44080
- name: string;
44081
- type: string;
44082
- } | null;
44083
- recordId: string;
44084
- recordResultId: string | null;
44085
- result?: unknown;
44086
- status: string;
44087
- stepCount: number | null;
44088
- }[];
44089
- pagination: {
44090
- hasMore: boolean;
44091
- limit: number;
44092
- offset: number;
44093
- total: number;
44094
- };
44095
- summary?: {
44096
- recordsWithFailedSteps: number;
44097
- };
44098
- };
44755
+ "application/json": components["schemas"]["SchedulePullResponse"];
44756
+ };
44757
+ };
44758
+ /** @description Validation error */
44759
+ 400: {
44760
+ headers: {
44761
+ [name: string]: unknown;
44762
+ };
44763
+ content: {
44764
+ "application/json": components["schemas"]["Error"];
44099
44765
  };
44100
44766
  };
44101
44767
  /** @description Unauthorized */
@@ -44116,7 +44782,7 @@ interface paths {
44116
44782
  "application/json": components["schemas"]["Error"];
44117
44783
  };
44118
44784
  };
44119
- /** @description Batch not found */
44785
+ /** @description No schedule with that name on that target in the account scope */
44120
44786
  404: {
44121
44787
  headers: {
44122
44788
  [name: string]: unknown;
@@ -44125,6 +44791,15 @@ interface paths {
44125
44791
  "application/json": components["schemas"]["Error"];
44126
44792
  };
44127
44793
  };
44794
+ /** @description Internal server error */
44795
+ 500: {
44796
+ headers: {
44797
+ [name: string]: unknown;
44798
+ };
44799
+ content: {
44800
+ "application/json": components["schemas"]["Error"];
44801
+ };
44802
+ };
44128
44803
  };
44129
44804
  };
44130
44805
  put?: never;
@@ -46523,7 +47198,7 @@ interface paths {
46523
47198
  put?: never;
46524
47199
  /**
46525
47200
  * Ensure skill (config-as-code converge)
46526
- * @description Idempotently converge a repo-defined skill (SKILL.md manifest) onto the platform. Identity is name + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the skill or append a new version when the canonical content hash differs. The response always carries the server-computed canonical hash + the version id. Set dryRun to plan without writing (CI drift gate), onConflict: "overwrite" to converge over dashboard/API edits, and release: "publish" to publish the converged version. Admin/control plane only — no review queue.
47201
+ * @description Idempotently converge a repo-defined skill (SKILL.md manifest) onto the platform. Identity is name + account scope. Hash-only probes skip the payload in the steady state (a miss is a normal 200 `definitionRequired` response, not an error); full requests create the skill or append a new version when the canonical content hash differs. The response always carries the server-computed canonical hash + the version id. Set dryRun to plan without writing (CI drift gate), onConflict: "overwrite" to converge over dashboard/API edits, and release: "publish" to publish the converged version. Optional version.label / version.notes stamp provenance (a git SHA, a release tag) on the appended version row. Admin/control plane only — no review queue.
46527
47202
  */
46528
47203
  post: {
46529
47204
  parameters: {
@@ -46550,6 +47225,7 @@ interface paths {
46550
47225
  onConflict?: "error" | "overwrite";
46551
47226
  /** @enum {string} */
46552
47227
  release?: "none" | "publish";
47228
+ version?: components["schemas"]["EnsureVersionMetadata"];
46553
47229
  };
46554
47230
  };
46555
47231
  };
@@ -50684,6 +51360,36 @@ interface components {
50684
51360
  code?: "alias_requires_organization";
50685
51361
  error: string;
50686
51362
  };
51363
+ AgentEnsureCapability: {
51364
+ /** @description The name of another agent in this account scope, called as a sub-agent. */
51365
+ agent?: string;
51366
+ description?: string;
51367
+ /** @description Defaults to true. */
51368
+ enabled?: boolean;
51369
+ /** @description The name of a flow in this account scope. */
51370
+ flow?: string;
51371
+ /** @description JSON Schema for the capability's input. Omit to derive it from the flow's inputs or the tool's own schema. */
51372
+ parametersSchema?: {
51373
+ [key: string]: unknown;
51374
+ };
51375
+ /** @description The name of a saved tool in this account scope. */
51376
+ tool?: string;
51377
+ /** @description The name the agent calls this capability by. */
51378
+ toolName: string;
51379
+ };
51380
+ AgentEnsureCapabilityChange: {
51381
+ /**
51382
+ * @description What this converge did (on a dry run, would do) to the capability.
51383
+ * @enum {string}
51384
+ */
51385
+ action: "add" | "update" | "remove" | "unchanged";
51386
+ enabled: boolean;
51387
+ /** @enum {string|null} */
51388
+ kind: "flow" | "agent" | "tool" | null;
51389
+ /** @description The flow, agent or tool name the capability calls. */
51390
+ source: string | null;
51391
+ toolName: string;
51392
+ };
50687
51393
  AgentEnsureConflict: {
50688
51394
  /** @enum {string} */
50689
51395
  code: "external_modification" | "remote_changed";
@@ -50704,6 +51410,10 @@ interface components {
50704
51410
  AgentEnsureDeployment: {
50705
51411
  /** @description The release alias this converge aimed. */
50706
51412
  alias: string;
51413
+ /** @description Per-alias secret binding names in force after this converge (on a dry run carrying deploy.bindings, the names it would leave in force). Never values. */
51414
+ bindingNames?: string[];
51415
+ /** @description Present on a dry run carrying deploy.bindings: whether the binding names differ from the ones the alias carries now. */
51416
+ bindingsChanged?: boolean;
50707
51417
  /** @description Whether this converge moved the pointer (on a dry run, whether it would move it). */
50708
51418
  changed: boolean;
50709
51419
  /** @description The deployment receipt this converge appended. Absent when the pointer did not move. */
@@ -50738,6 +51448,8 @@ interface components {
50738
51448
  };
50739
51449
  AgentEnsureResponse: {
50740
51450
  agentId: string;
51451
+ /** @description Present when the request carried capabilities: one row per declared capability, then removals. */
51452
+ capabilityChanges?: components["schemas"]["AgentEnsureCapabilityChange"][];
50741
51453
  /** @description Server-computed canonical content hash. Clients should echo this hash in probes. */
50742
51454
  contentHash: string;
50743
51455
  deployment?: components["schemas"]["AgentEnsureDeployment"];
@@ -50745,6 +51457,8 @@ interface components {
50745
51457
  remoteHash?: string;
50746
51458
  /** @enum {string} */
50747
51459
  result: "unchanged" | "created" | "updated";
51460
+ /** @description Present when the request carried skills: one row per declared binding, then unbinds. */
51461
+ skillBindings?: components["schemas"]["AgentEnsureSkillBindingChange"][];
50748
51462
  /** @description The version snapshot backing this state (null if snapshotting failed). */
50749
51463
  versionId: string | null;
50750
51464
  } | {
@@ -50752,6 +51466,8 @@ interface components {
50752
51466
  result: "definitionRequired";
50753
51467
  } | {
50754
51468
  agentId?: string;
51469
+ /** @description Present when the request carried capabilities: one row per declared capability, then removals. */
51470
+ capabilityChanges?: components["schemas"]["AgentEnsureCapabilityChange"][];
50755
51471
  changedKeys: string[];
50756
51472
  /** @enum {string} */
50757
51473
  changes: "none" | "create" | "update";
@@ -50760,6 +51476,8 @@ interface components {
50760
51476
  remoteHash?: string;
50761
51477
  /** @enum {string} */
50762
51478
  result: "plan";
51479
+ /** @description Present when the request carried skills: one row per declared binding, then unbinds. */
51480
+ skillBindings?: components["schemas"]["AgentEnsureSkillBindingChange"][];
50763
51481
  };
50764
51482
  AgentEnsureServerError: {
50765
51483
  /** @description The release alias whose activation failed. No pointer was moved. */
@@ -50768,8 +51486,31 @@ interface components {
50768
51486
  code?: "alias_activation_failed";
50769
51487
  error: string;
50770
51488
  };
51489
+ AgentEnsureSkillBinding: {
51490
+ /** @description Defaults to true. */
51491
+ enabled?: boolean;
51492
+ /** @description The skill slug. */
51493
+ name: string;
51494
+ /** @description Pin this skill versionNumber. Omit to follow the skill's published version. */
51495
+ version?: number;
51496
+ };
51497
+ AgentEnsureSkillBindingChange: {
51498
+ /**
51499
+ * @description What this converge did (on a dry run, would do) to the binding.
51500
+ * @enum {string}
51501
+ */
51502
+ action: "bind" | "update" | "unbind" | "unchanged";
51503
+ enabled: boolean;
51504
+ /** @description The skill slug. */
51505
+ name: string;
51506
+ skillId: string;
51507
+ /** @description The pinned versionNumber; null follows the published version. */
51508
+ version: number | null;
51509
+ };
50771
51510
  AgentPullResponse: {
50772
51511
  agentId: string;
51512
+ /** @description The agent's capabilities in display order, in the shape ensure's capabilities accepts. parametersSchema appears only when it differs from the one ensure would derive. */
51513
+ capabilities: components["schemas"]["AgentEnsureCapability"][];
50773
51514
  contentHash: string;
50774
51515
  definition: {
50775
51516
  config?: {
@@ -51070,6 +51811,8 @@ interface components {
51070
51811
  name: string;
51071
51812
  };
51072
51813
  lastModifiedSource: string | null;
51814
+ /** @description The agent's skill bindings in load order, in the shape ensure's skills accepts. */
51815
+ skills: components["schemas"]["AgentEnsureSkillBinding"][];
51073
51816
  updatedAt: string | null;
51074
51817
  versionId: string | null;
51075
51818
  /** @description Present only when a raw tool_… reference could not be emitted as a portable tool:<name> (the tool was deleted, or its name is shadowed by an older same-named tool). Those references are left as raw ids, which the ensure surface rejects; each warning explains how to fix it. */
@@ -51256,6 +51999,57 @@ interface components {
51256
51999
  /** @enum {string} */
51257
52000
  status: "pending" | "applied" | "settled" | "not_applied";
51258
52001
  };
52002
+ CollectionEnsureConflict: {
52003
+ /** @enum {string} */
52004
+ code: "external_modification" | "remote_changed";
52005
+ currentHash?: string | null;
52006
+ error: string;
52007
+ lastModifiedSource?: string;
52008
+ modifiedAt?: string | null;
52009
+ };
52010
+ CollectionEnsureHashMismatch: {
52011
+ /** @enum {string} */
52012
+ code: "content_hash_mismatch";
52013
+ /** @description The server-computed canonical hash of the submitted definition. */
52014
+ contentHash: string;
52015
+ error: string;
52016
+ };
52017
+ CollectionEnsureResponse: {
52018
+ collectionId: string;
52019
+ /** @description Server-computed canonical content hash. Clients should echo this hash in probes. */
52020
+ contentHash: string;
52021
+ /** @description Present when this ensure moved validationMode to enforce: a bounded dry-run of existing records against the schema, as PATCH reports. */
52022
+ enforceCheck?: {
52023
+ checked: number;
52024
+ failed: number;
52025
+ truncated: boolean;
52026
+ };
52027
+ /** @enum {string} */
52028
+ result: "unchanged" | "created" | "updated";
52029
+ schemaChange?: {
52030
+ breakingChanges: string[];
52031
+ /** @enum {string} */
52032
+ kind: "additive" | "breaking";
52033
+ };
52034
+ } | {
52035
+ /** @enum {string} */
52036
+ result: "definitionRequired";
52037
+ } | {
52038
+ changedKeys: string[];
52039
+ /** @enum {string} */
52040
+ changes: "none" | "create" | "update";
52041
+ collectionId?: string;
52042
+ contentHash: string;
52043
+ remoteHash?: string;
52044
+ /** @enum {string} */
52045
+ result: "plan";
52046
+ /** @description How the schema would change. A breaking change is rejected when the resulting validationMode is enforce. */
52047
+ schemaChange?: {
52048
+ breakingChanges: string[];
52049
+ /** @enum {string} */
52050
+ kind: "additive" | "breaking";
52051
+ };
52052
+ };
51259
52053
  CollectionLookupFailedError: {
51260
52054
  /** @enum {string} */
51261
52055
  code: "COLLECTION_LOOKUP_FAILED";
@@ -51266,6 +52060,24 @@ interface components {
51266
52060
  recordId?: string;
51267
52061
  recordName?: string;
51268
52062
  };
52063
+ CollectionPullResponse: {
52064
+ collectionId: string;
52065
+ contentHash: string;
52066
+ definition: {
52067
+ description: string | null;
52068
+ displayName: string;
52069
+ icon: string | null;
52070
+ /** @description Constrained JSON Schema dialect: root object with string/number/boolean/array/object properties, one nesting level, no $ref/oneOf/pattern */
52071
+ schema: {
52072
+ [key: string]: unknown;
52073
+ } | null;
52074
+ slug: string;
52075
+ /** @enum {string} */
52076
+ validationMode: "off" | "warn" | "enforce";
52077
+ };
52078
+ lastModifiedSource: string | null;
52079
+ updatedAt: string | null;
52080
+ };
51269
52081
  ContextBlocks: {
51270
52082
  blocks: {
51271
52083
  /** @description The block text, scrubbed of secrets. */
@@ -52196,6 +53008,14 @@ interface components {
52196
53008
  name: string;
52197
53009
  }[];
52198
53010
  };
53011
+ EvalEnsureConflict: {
53012
+ /** @enum {string} */
53013
+ code: "external_modification" | "remote_changed";
53014
+ currentHash?: string | null;
53015
+ error: string;
53016
+ lastModifiedSource?: string;
53017
+ modifiedAt?: string | null;
53018
+ };
52199
53019
  EvalEnsureResponse: {
52200
53020
  /** @description Server-computed canonical content hash. Clients should echo this hash in probes. */
52201
53021
  contentHash: string;
@@ -52205,6 +53025,15 @@ interface components {
52205
53025
  } | {
52206
53026
  /** @enum {string} */
52207
53027
  result: "definitionRequired";
53028
+ } | {
53029
+ changedKeys: string[];
53030
+ /** @enum {string} */
53031
+ changes: "none" | "create" | "update";
53032
+ contentHash: string;
53033
+ remoteHash?: string;
53034
+ /** @enum {string} */
53035
+ result: "plan";
53036
+ suiteId?: string;
52208
53037
  };
52209
53038
  /** @description Canonical eval override field. Replaces `stepOverrides` (and its `"*"` key), `claudeManagedOverride` and `advisorOverride`; setting both spellings of one channel is a 400. */
52210
53039
  EvalOverrides: {
@@ -53230,6 +54059,8 @@ interface components {
53230
54059
  changes: "none" | "create" | "update";
53231
54060
  contentHash: string;
53232
54061
  flowId?: string;
54062
+ /** @description Present when the dry run carried release: "publish": whether the converge would re-aim the published version. */
54063
+ publishPending?: boolean;
53233
54064
  remoteHash?: string;
53234
54065
  /** @enum {string} */
53235
54066
  result: "plan";
@@ -53505,11 +54336,16 @@ interface components {
53505
54336
  /** @description True when one or more entities failed to converge (re-run to self-heal). */
53506
54337
  hasFailures: boolean;
53507
54338
  productId?: string;
54339
+ /** @description dryRun only: the live graph's pull-fpo hash, absent when the product does not exist or the caller cannot read every section. Pass it back as expectedRemoteHash to guard the apply. */
54340
+ remoteHash?: string;
53508
54341
  /**
53509
- * @description `unchanged` when every entity was unchanged, `converged` when at least one was created/updated, `plan` for dryRun.
54342
+ * @description `unchanged` when every entity was unchanged (a matching hash-only probe reports no entities), `converged` when at least one was created/updated, `plan` for dryRun.
53510
54343
  * @enum {string}
53511
54344
  */
53512
54345
  result: "unchanged" | "converged" | "plan";
54346
+ } | {
54347
+ /** @enum {string} */
54348
+ result: "definitionRequired";
53513
54349
  };
53514
54350
  ProductFpoPullResponse: {
53515
54351
  /** @description Server-computed canonical whole-FPO content hash. */
@@ -53560,6 +54396,7 @@ interface components {
53560
54396
  productGoal?: string;
53561
54397
  /** @enum {string} */
53562
54398
  productStage?: "idea" | "prototype" | "beta" | "production" | "scaling";
54399
+ stack?: components["schemas"]["ProductStack"];
53563
54400
  targetAudience?: string;
53564
54401
  techStack?: {
53565
54402
  backend?: string[];
@@ -53615,11 +54452,52 @@ interface components {
53615
54452
  currentVersionId: string | null;
53616
54453
  description: string | null;
53617
54454
  id: string;
54455
+ /** @description The surface that last wrote the set; `sdk` or `terraform` means it is managed by code through ensure. */
54456
+ lastModifiedSource?: string | null;
53618
54457
  name: string;
53619
54458
  organizationId: string;
53620
54459
  slug: string;
53621
54460
  updatedAt: string;
53622
54461
  };
54462
+ QuestionSetEnsureConflict: {
54463
+ /** @description external_modification, remote_changed, or a question set code such as QUESTION_SET_SLUG_TAKEN. */
54464
+ code: string;
54465
+ currentHash?: string | null;
54466
+ error: string;
54467
+ lastModifiedSource?: string;
54468
+ modifiedAt?: string | null;
54469
+ };
54470
+ QuestionSetEnsureHashMismatch: {
54471
+ /** @enum {string} */
54472
+ code: "content_hash_mismatch";
54473
+ /** @description The server-computed canonical hash of the submitted definition. */
54474
+ contentHash: string;
54475
+ error: string;
54476
+ };
54477
+ QuestionSetEnsureResponse: {
54478
+ /** @description Server-computed canonical content hash. Clients should echo this hash in probes. */
54479
+ contentHash: string;
54480
+ /** @description The version executions resolve when they name none; null until a publish. */
54481
+ publishedVersionNumber: number | null;
54482
+ questionSetId: string;
54483
+ /** @enum {string} */
54484
+ result: "unchanged" | "created" | "updated";
54485
+ /** @description The latest version, which the converged definition matches. */
54486
+ versionId: string | null;
54487
+ versionNumber: number | null;
54488
+ } | {
54489
+ /** @enum {string} */
54490
+ result: "definitionRequired";
54491
+ } | {
54492
+ changedKeys: string[];
54493
+ /** @enum {string} */
54494
+ changes: "none" | "create" | "update";
54495
+ contentHash: string;
54496
+ questionSetId?: string;
54497
+ remoteHash?: string;
54498
+ /** @enum {string} */
54499
+ result: "plan";
54500
+ };
53623
54501
  QuestionSetError: components["schemas"]["Error"] & {
53624
54502
  /** @description Stable code, e.g. QUESTION_SET_INVALID or QUESTION_SET_UNRESOLVED. */
53625
54503
  code?: string;
@@ -53628,6 +54506,26 @@ interface components {
53628
54506
  currentVersionNumber: number | null;
53629
54507
  latestVersionNumber: number;
53630
54508
  };
54509
+ QuestionSetPullResponse: {
54510
+ contentHash: string;
54511
+ definition: {
54512
+ description?: string | null;
54513
+ inputMapping?: {
54514
+ [key: string]: string;
54515
+ } | null;
54516
+ model?: string | null;
54517
+ name: string;
54518
+ questions: {
54519
+ [key: string]: unknown;
54520
+ };
54521
+ slug: string;
54522
+ };
54523
+ lastModifiedSource: string | null;
54524
+ publishedVersionNumber: number | null;
54525
+ questionSetId: string;
54526
+ updatedAt: string | null;
54527
+ versionNumber: number | null;
54528
+ };
53631
54529
  QuestionSetVersion: {
53632
54530
  createdAt: string;
53633
54531
  createdByUserId: string | null;
@@ -53929,6 +54827,84 @@ interface components {
53929
54827
  kind: string;
53930
54828
  reason: string;
53931
54829
  };
54830
+ ScheduleEnsureConflict: {
54831
+ /** @enum {string} */
54832
+ code: "external_modification" | "remote_changed";
54833
+ currentHash?: string | null;
54834
+ error: string;
54835
+ lastModifiedSource?: string;
54836
+ modifiedAt?: string | null;
54837
+ };
54838
+ ScheduleEnsureDefinition: {
54839
+ /** @description Omit to leave the current paused/active state untouched; new schedules start enabled. */
54840
+ enabled?: boolean;
54841
+ executionOptions?: {
54842
+ chunkSize?: number;
54843
+ flowTimeoutMs?: number;
54844
+ /** @enum {string} */
54845
+ loggingPolicy?: "default" | "on" | "off";
54846
+ maxRetries?: number;
54847
+ modelOverride?: string;
54848
+ progressFlushSize?: number;
54849
+ recordConcurrency?: number;
54850
+ skipCacheWarm?: boolean;
54851
+ stepTimeoutMs?: number;
54852
+ timeoutMs?: number;
54853
+ };
54854
+ inputs?: {
54855
+ [key: string]: unknown;
54856
+ };
54857
+ messages?: {
54858
+ [key: string]: unknown;
54859
+ }[];
54860
+ name: string;
54861
+ recordFilter?: {
54862
+ [key: string]: unknown;
54863
+ };
54864
+ recordIds?: string[];
54865
+ recordType?: string;
54866
+ target: components["schemas"]["ScheduleEnsureTarget"];
54867
+ trigger: {
54868
+ cron?: string;
54869
+ /** Format: date-time */
54870
+ runAt?: string;
54871
+ timezone?: string;
54872
+ /** @enum {string} */
54873
+ type: "recurring" | "one_time";
54874
+ };
54875
+ };
54876
+ ScheduleEnsureHashMismatch: {
54877
+ /** @enum {string} */
54878
+ code: "content_hash_mismatch";
54879
+ /** @description The server-computed canonical hash of the submitted definition. */
54880
+ contentHash: string;
54881
+ error: string;
54882
+ };
54883
+ ScheduleEnsureResponse: {
54884
+ /** @description Server-computed canonical content hash. Clients should echo this hash in probes. */
54885
+ contentHash: string;
54886
+ /** @enum {string} */
54887
+ result: "unchanged" | "created" | "updated";
54888
+ scheduleId: string;
54889
+ } | {
54890
+ /** @enum {string} */
54891
+ result: "definitionRequired";
54892
+ } | {
54893
+ changedKeys: string[];
54894
+ /** @enum {string} */
54895
+ changes: "none" | "create" | "update";
54896
+ contentHash: string;
54897
+ remoteHash?: string;
54898
+ /** @enum {string} */
54899
+ result: "plan";
54900
+ scheduleId?: string;
54901
+ };
54902
+ ScheduleEnsureTarget: {
54903
+ agentId?: string;
54904
+ agentName?: string;
54905
+ flowId?: string;
54906
+ flowName?: string;
54907
+ };
53932
54908
  ScheduleEntitlementError: components["schemas"]["Error"] & {
53933
54909
  /** @description Stable error code (e.g. ACTIVE_SCHEDULE_LIMIT, SCHEDULE_FREQUENCY_LIMIT). */
53934
54910
  code?: string;
@@ -53937,6 +54913,13 @@ interface components {
53937
54913
  /** @description Dashboard-relative URL to the billing/upgrade page. */
53938
54914
  upgradeUrl?: string;
53939
54915
  };
54916
+ SchedulePullResponse: {
54917
+ contentHash: string;
54918
+ definition: components["schemas"]["ScheduleEnsureDefinition"];
54919
+ lastModifiedSource: string | null;
54920
+ scheduleId: string;
54921
+ updatedAt: string | null;
54922
+ };
53940
54923
  ScheduleRunLink: {
53941
54924
  /** @description The agent_executions ROW id the scheduled run stored. Provenance only: a different id space from executionId, and never a /v1/runs key. */
53942
54925
  agentExecutionRowId: string | null;
@@ -54058,13 +55041,15 @@ interface components {
54058
55041
  };
54059
55042
  /** @enum {string} */
54060
55043
  environment?: "production" | "development";
55044
+ /** @description Inbound channel config. Omit to keep the stored value; null clears it. A credential value of "<redacted>" (as returned by pull) keeps the stored credential. */
54061
55045
  inbound?: {
54062
55046
  [key: string]: unknown;
54063
- };
55047
+ } | null;
54064
55048
  name: string;
55049
+ /** @description Outbound channel config. Omit to keep the stored value; null clears it. A credential value of "<redacted>" (as returned by pull) keeps the stored credential. */
54065
55050
  outbound?: {
54066
55051
  [key: string]: unknown;
54067
- };
55052
+ } | null;
54068
55053
  /** @enum {string} */
54069
55054
  status?: "draft" | "active" | "paused";
54070
55055
  /** @enum {string} */
@@ -57003,14 +57988,14 @@ export interface ScheduleMessageSet {
57003
57988
  messages: ScheduleMessage[];
57004
57989
  }
57005
57990
  export type ScheduleMessages = ScheduleMessage[] | ScheduleMessageSet[];
57006
- export interface ScheduleTarget {
57991
+ interface ScheduleTarget$1 {
57007
57992
  flowId?: string;
57008
57993
  agentId?: string;
57009
57994
  recordIds?: string[];
57010
57995
  recordType?: string;
57011
57996
  recordFilter?: JsonValue | null;
57012
57997
  }
57013
- export interface ScheduleTrigger {
57998
+ interface ScheduleTrigger$1 {
57014
57999
  type: 'one_time' | 'recurring';
57015
58000
  /** ISO 8601 datetime — required for `one_time` triggers. */
57016
58001
  runAt?: string;
@@ -57026,8 +58011,8 @@ export interface ScheduleTrigger {
57026
58011
  */
57027
58012
  export type Schedule = paths['/v1/schedules/{id}']['get']['responses'][200]['content']['application/json'];
57028
58013
  export interface CreateScheduleRequest {
57029
- target: ScheduleTarget;
57030
- trigger: ScheduleTrigger;
58014
+ target: ScheduleTarget$1;
58015
+ trigger: ScheduleTrigger$1;
57031
58016
  messages?: ScheduleMessages | null;
57032
58017
  executionOptions?: ScheduleExecutionOptions;
57033
58018
  /** Top-level input variables; keys must not start with `_`. */
@@ -57968,6 +58953,54 @@ interface EnsureEvalResult {
57968
58953
  /** The server-computed canonical hash (echo this — never your own). */
57969
58954
  contentHash: string;
57970
58955
  }
58956
+ /** The dry-run outcome of `client.evals.ensure(definition, { dryRun: true })`. */
58957
+ interface EnsureEvalPlan {
58958
+ result: 'plan';
58959
+ changes: 'none' | 'create' | 'update';
58960
+ /** Coarse keys that differ: `target`, `cases`, `recordedToolMode`, `recordedToolUnmatchedPolicy`. */
58961
+ changedKeys: string[];
58962
+ contentHash: string;
58963
+ /** The live suite's hash, computed over the cases ensure owns; bind an apply to it with `expectedRemoteHash`. */
58964
+ remoteHash?: string;
58965
+ suiteId?: string;
58966
+ }
58967
+ interface EnsureEvalOptions {
58968
+ /** Plan without writing (the CI drift gate). Sends the full definition. */
58969
+ dryRun?: boolean;
58970
+ /**
58971
+ * What to do when the suite's last write came from the dashboard/API rather
58972
+ * than ensure. Default 'error' (HTTP 409 → EvalEnsureConflictError).
58973
+ */
58974
+ onConflict?: 'error' | 'overwrite';
58975
+ /** TOCTOU guard binding a dry run to its apply (409 remote_changed otherwise). */
58976
+ expectedRemoteHash?: string;
58977
+ /** Implies dryRun; throws EvalDriftError unless the plan is 'none'. */
58978
+ expectNoChanges?: boolean;
58979
+ }
58980
+ /** Options for a converging (non-plan) ensure. */
58981
+ type EnsureEvalApplyOptions = Omit<EnsureEvalOptions, 'dryRun' | 'expectNoChanges'> & {
58982
+ dryRun?: false;
58983
+ expectNoChanges?: false;
58984
+ };
58985
+ /** A 409 from the eval ensure protocol (external_modification or remote_changed). */
58986
+ export declare class EvalEnsureConflictError extends Error {
58987
+ readonly code: 'external_modification' | 'remote_changed';
58988
+ readonly lastModifiedSource?: string;
58989
+ readonly modifiedAt?: string | null;
58990
+ readonly currentHash?: string | null;
58991
+ constructor(body: {
58992
+ error?: string;
58993
+ code: 'external_modification' | 'remote_changed';
58994
+ lastModifiedSource?: string;
58995
+ modifiedAt?: string | null;
58996
+ currentHash?: string | null;
58997
+ });
58998
+ }
58999
+ /** Thrown by `ensure(def, { expectNoChanges: true })` when drift is detected. */
59000
+ export declare class EvalDriftError extends Error {
59001
+ readonly plan: EnsureEvalPlan;
59002
+ constructor(plan: EnsureEvalPlan);
59003
+ }
57971
59004
  /** The canonical definition + provenance returned by `client.evals.pull(name)`. */
57972
59005
  interface EvalPullResult {
57973
59006
  suiteId: string;
@@ -58172,15 +59205,17 @@ type RunEvalInput = {
58172
59205
  };
58173
59206
  /**
58174
59207
  * Idempotently converge an eval suite definition onto the platform. Hash-first:
58175
- * probes with a content hash, and only ships the full definition when the
58176
- * server reports a miss (`definitionRequired`). Upserts the suite + replaces
58177
- * its cases; never executes the eval (use the `runtype eval` CLI / `/eval`
58178
- * submit surface to run it).
58179
- *
58180
- * `virtual: true` definitions are ephemeral and have nothing durable to
58181
- * converge — ensure rejects them. Run a virtual eval directly instead.
59208
+ * probes with a content hash, and only ships the full definition on a miss.
59209
+ * Replaces only the cases ensure owns: cases saved from runs or added in the
59210
+ * dashboard survive. Never executes the eval. Virtual evals cannot be ensured.
58182
59211
  */
58183
- export declare function ensureEval(client: RuntypeClient$1, definition: EvalDefinition): Promise<EnsureEvalResult>;
59212
+ export declare function ensureEval(client: RuntypeClient$1, definition: EvalDefinition, options: EnsureEvalOptions & ({
59213
+ dryRun: true;
59214
+ } | {
59215
+ expectNoChanges: true;
59216
+ })): Promise<EnsureEvalPlan>;
59217
+ export declare function ensureEval(client: RuntypeClient$1, definition: EvalDefinition, options?: EnsureEvalApplyOptions): Promise<EnsureEvalResult>;
59218
+ export declare function ensureEval(client: RuntypeClient$1, definition: EvalDefinition, options?: EnsureEvalOptions): Promise<EnsureEvalResult | EnsureEvalPlan>;
58184
59219
  /**
58185
59220
  * Pull the canonical definition + provenance for an eval suite by name — the
58186
59221
  * absorb-drift direction of the ensure protocol. The contentHash reflects the
@@ -58280,6 +59315,7 @@ interface EnsureFlowOptions {
58280
59315
  /**
58281
59316
  * What to do when the flow's last write came from the dashboard/API
58282
59317
  * rather than ensure. Default 'error' (HTTP 409 → FlowEnsureConflictError).
59318
+ * Also applies to the flow's inline evals (409 → EvalEnsureConflictError).
58283
59319
  */
58284
59320
  onConflict?: 'error' | 'overwrite';
58285
59321
  /** 'publish' also re-aims the published-version pointer. Default 'none'. */
@@ -58295,7 +59331,10 @@ interface EnsureFlowOptions {
58295
59331
  * server-generated notes.
58296
59332
  */
58297
59333
  version?: components['schemas']['EnsureVersionMetadata'];
58298
- /** Implies dryRun; throws FlowDriftError unless the plan is 'none'. */
59334
+ /**
59335
+ * Implies dryRun; throws FlowDriftError unless the plan is 'none' and, with
59336
+ * `release: 'publish'`, no publish is pending.
59337
+ */
58299
59338
  expectNoChanges?: boolean;
58300
59339
  }
58301
59340
  interface EnsureFlowConverged {
@@ -58320,6 +59359,8 @@ interface EnsureFlowPlan {
58320
59359
  contentHash: string;
58321
59360
  remoteHash?: string;
58322
59361
  flowId?: string;
59362
+ /** Present when the dry run carried `release: 'publish'`: whether it would re-aim the published version. */
59363
+ publishPending?: boolean;
58323
59364
  }
58324
59365
  type EnsureFlowResult = EnsureFlowConverged | EnsureFlowPlan;
58325
59366
  interface FlowPullResult {
@@ -58944,7 +59985,7 @@ interface EvalSuiteDetail extends EvalSuiteSummary {
58944
59985
  } | null;
58945
59986
  }
58946
59987
  /** Case provenance (mirror of `EvalCaseOrigin` in `@runtypelabs/shared`). */
58947
- type EvalCaseOrigin = 'manual' | 'saved_from_run' | 'generated' | 'imported' | 'fpo';
59988
+ type EvalCaseOrigin = 'manual' | 'saved_from_run' | 'generated' | 'imported' | 'fpo' | 'ensure';
58948
59989
  /** One case to create. */
58949
59990
  interface EvalSuiteCaseInput {
58950
59991
  name: string;
@@ -59475,7 +60516,9 @@ export declare class EvalsNamespace {
59475
60516
  * Idempotently converge a `defineEval` suite definition onto the platform —
59476
60517
  * the deploy-time, non-executing converge for code-colocated evals. Hash-first:
59477
60518
  * the steady state is one tiny probe request. Upserts the eval suite + replaces
59478
- * its cases; never runs the eval.
60519
+ * the cases ensure owns (captured and dashboard cases survive); never runs the
60520
+ * eval. `dryRun` / `expectNoChanges` plan without writing; a dashboard edit
60521
+ * answers 409 unless `onConflict: 'overwrite'`.
59479
60522
  *
59480
60523
  * @example
59481
60524
  * ```typescript
@@ -59487,7 +60530,13 @@ export declare class EvalsNamespace {
59487
60530
  * const result = await Runtype.evals.ensure(suite)
59488
60531
  * ```
59489
60532
  */
59490
- ensure(definition: EvalDefinition): Promise<EnsureEvalResult>;
60533
+ ensure(definition: EvalDefinition, options: EnsureEvalOptions & ({
60534
+ dryRun: true;
60535
+ } | {
60536
+ expectNoChanges: true;
60537
+ })): Promise<EnsureEvalPlan>;
60538
+ ensure(definition: EvalDefinition, options?: EnsureEvalApplyOptions): Promise<EnsureEvalResult>;
60539
+ ensure(definition: EvalDefinition, options?: EnsureEvalOptions): Promise<EnsureEvalResult | EnsureEvalPlan>;
59491
60540
  /**
59492
60541
  * Pull the canonical definition + provenance for an eval suite by name — the
59493
60542
  * absorb-drift direction of the ensure protocol.
@@ -59810,6 +60859,12 @@ interface EnsureSkillOptions {
59810
60859
  * remote still hashes to this value (409 remote_changed otherwise).
59811
60860
  */
59812
60861
  expectedRemoteHash?: string;
60862
+ /**
60863
+ * Provenance stamped on the version row this converge appends (a git SHA, a
60864
+ * release tag). Omit to keep the default 'sdk-ensure' label and the
60865
+ * server-generated notes.
60866
+ */
60867
+ version?: components['schemas']['EnsureVersionMetadata'];
59813
60868
  /** Implies dryRun; throws SkillDriftError unless the plan is 'none'. */
59814
60869
  expectNoChanges?: boolean;
59815
60870
  }
@@ -59953,7 +61008,7 @@ interface SkillVersion {
59953
61008
  createdAt: string;
59954
61009
  }
59955
61010
  /** An agent ↔ skill binding row. */
59956
- interface AgentSkillBinding {
61011
+ interface AgentSkillBinding$1 {
59957
61012
  id: string;
59958
61013
  agentId: string;
59959
61014
  skillId: string;
@@ -59968,7 +61023,7 @@ interface AgentSkillBinding {
59968
61023
  * {@link SkillsNamespace.listBindingsForSkill}, the by-skill twin of
59969
61024
  * {@link SkillsNamespace.listBindings}.
59970
61025
  */
59971
- interface SkillBindingWithAgent extends AgentSkillBinding {
61026
+ interface SkillBindingWithAgent extends AgentSkillBinding$1 {
59972
61027
  agent: {
59973
61028
  id: string;
59974
61029
  name: string;
@@ -60236,7 +61291,7 @@ export declare class SkillsNamespace {
60236
61291
  * Bind a skill to an agent. Both the agent and the skill must be owned by the
60237
61292
  * caller.
60238
61293
  */
60239
- bind(input: BindSkillInput): Promise<AgentSkillBinding>;
61294
+ bind(input: BindSkillInput): Promise<AgentSkillBinding$1>;
60240
61295
  /**
60241
61296
  * Remove a skill binding by its binding id.
60242
61297
  */
@@ -60249,7 +61304,7 @@ export declare class SkillsNamespace {
60249
61304
  * const bindings = await Runtype.skills.listBindings('agent_123')
60250
61305
  * ```
60251
61306
  */
60252
- listBindings(agentId: string): Promise<AgentSkillBinding[]>;
61307
+ listBindings(agentId: string): Promise<AgentSkillBinding$1[]>;
60253
61308
  /**
60254
61309
  * List every agent a skill is bound to, each row joined with the agent's name
60255
61310
  * and type. The by-agent twin is {@link listBindings}.
@@ -60714,8 +61769,61 @@ interface EnsureAgentOptions {
60714
61769
  * server-generated notes.
60715
61770
  */
60716
61771
  version?: components['schemas']['EnsureVersionMetadata'];
60717
- /** Implies dryRun; throws AgentDriftError unless the plan is 'none'. */
61772
+ /**
61773
+ * Implies dryRun; throws AgentDriftError unless the plan is 'none', no skill
61774
+ * binding would change and, with `release` or `deploy`, the alias would not move.
61775
+ */
60718
61776
  expectNoChanges?: boolean;
61777
+ /**
61778
+ * The complete set of skills bound to the agent, in load order. `version`
61779
+ * pins a skill versionNumber; omit it to follow the published version.
61780
+ * Bound skills absent here are unbound; omit the option to leave bindings alone.
61781
+ */
61782
+ skills?: AgentSkillBinding[];
61783
+ /**
61784
+ * The complete set of capabilities (flow, sub-agent and saved-tool
61785
+ * attachments) in display order. Capabilities absent here are removed; omit
61786
+ * the option to leave them alone. When present they are part of the content hash.
61787
+ */
61788
+ capabilities?: AgentCapabilityDeclaration[];
61789
+ }
61790
+ /** @example `{ toolName: 'lookup_order', flow: 'Order Lookup' }` attaches the flow named "Order Lookup". */
61791
+ interface AgentCapabilityDeclaration {
61792
+ /** The name the agent calls this capability by. */
61793
+ toolName: string;
61794
+ /** Exactly one of `flow`, `agent` or `tool`: the source's name in this account. */
61795
+ flow?: string;
61796
+ agent?: string;
61797
+ tool?: string;
61798
+ description?: string;
61799
+ /** Omit to derive it from the flow's inputs or the tool's own schema. */
61800
+ parametersSchema?: Record<string, unknown>;
61801
+ enabled?: boolean;
61802
+ }
61803
+ /** What one ensure did (or, on a dry run, would do) to a declared or removed capability. */
61804
+ interface AgentCapabilityChange {
61805
+ toolName: string;
61806
+ action: 'add' | 'update' | 'remove' | 'unchanged';
61807
+ kind: 'flow' | 'agent' | 'tool' | null;
61808
+ /** The flow, agent or tool name the capability calls. */
61809
+ source: string | null;
61810
+ enabled: boolean;
61811
+ }
61812
+ /** @example `{ name: 'refund-policy', version: 3 }` pins version 3; `{ name: 'tone-guide' }` follows published. */
61813
+ interface AgentSkillBinding {
61814
+ /** The skill slug. */
61815
+ name: string;
61816
+ version?: number;
61817
+ enabled?: boolean;
61818
+ }
61819
+ /** What one ensure did (or, on a dry run, would do) to a declared or removed binding. */
61820
+ interface AgentSkillBindingChange {
61821
+ name: string;
61822
+ skillId: string;
61823
+ action: 'bind' | 'update' | 'unbind' | 'unchanged';
61824
+ /** The pinned versionNumber; null follows the published version. */
61825
+ version: number | null;
61826
+ enabled: boolean;
60719
61827
  }
60720
61828
  interface EnsureAgentConverged {
60721
61829
  result: 'unchanged' | 'created' | 'updated';
@@ -60727,6 +61835,10 @@ interface EnsureAgentConverged {
60727
61835
  remoteHash?: string;
60728
61836
  /** The pointer this converge aimed, present only when it carried release or deploy. */
60729
61837
  deployment?: AgentEnsureDeployment;
61838
+ /** Present when the request carried `skills`. */
61839
+ skillBindings?: AgentSkillBindingChange[];
61840
+ /** Present when the request carried `capabilities`. */
61841
+ capabilityChanges?: AgentCapabilityChange[];
60730
61842
  }
60731
61843
  interface EnsureAgentPlan {
60732
61844
  result: 'plan';
@@ -60737,6 +61849,10 @@ interface EnsureAgentPlan {
60737
61849
  agentId?: string;
60738
61850
  /** The pointer this dry run would aim, and whether it would move. */
60739
61851
  deployment?: AgentEnsureDeployment;
61852
+ /** Present when the request carried `skills`. */
61853
+ skillBindings?: AgentSkillBindingChange[];
61854
+ /** Present when the request carried `capabilities`. */
61855
+ capabilityChanges?: AgentCapabilityChange[];
60740
61856
  }
60741
61857
  type EnsureAgentResult = EnsureAgentConverged | EnsureAgentPlan;
60742
61858
  interface AgentPullResult {
@@ -60753,6 +61869,10 @@ interface AgentPullResult {
60753
61869
  * `defineAgent`/`ensure` reject — so each warning explains how to fix it.
60754
61870
  */
60755
61871
  warnings?: string[];
61872
+ /** The agent's skill bindings, ready to pass back as the `skills` ensure option. */
61873
+ skills: AgentSkillBinding[];
61874
+ /** The agent's capabilities, ready to pass back as the `capabilities` ensure option. */
61875
+ capabilities: AgentCapabilityDeclaration[];
60756
61876
  }
60757
61877
  /** A 409 from the ensure protocol (external_modification or remote_changed). */
60758
61878
  export declare class AgentEnsureConflictError extends Error {
@@ -61135,6 +62255,115 @@ export declare class ToolsNamespace {
61135
62255
  pull(name: string): Promise<ToolPullResult>;
61136
62256
  }
61137
62257
  //#endregion
62258
+ //#region src/question-sets-ensure.d.ts
62259
+ /** A question set declared in code. `slug` is its identity within the organization. */
62260
+ interface QuestionSetDefinition {
62261
+ slug: string;
62262
+ name: string;
62263
+ description?: string | null;
62264
+ /** Judgment questions keyed by question id, e.g. `{ urgent: { type: 'boolean', instructions: '...' } }`. */
62265
+ questions: Record<string, unknown>;
62266
+ inputMapping?: Record<string, string> | null;
62267
+ model?: string | null;
62268
+ }
62269
+ /** Canonical form of a question set definition, without its slug. */
62270
+ export declare function normalizeQuestionSetDefinition(definition: QuestionSetDefinition): Record<string, unknown>;
62271
+ /** SHA-256 (hex) over the canonical question set definition. */
62272
+ export declare function computeQuestionSetContentHash(definition: QuestionSetDefinition): Promise<string>;
62273
+ /**
62274
+ * Pure local constructor for a question set definition. Checks the structure
62275
+ * and rejects unknown fields; the server validates the questions at ensure time.
62276
+ *
62277
+ * @example
62278
+ * ```typescript
62279
+ * const triage = defineQuestionSet({
62280
+ * slug: 'ticket-triage',
62281
+ * name: 'Ticket triage',
62282
+ * questions: { urgent: { type: 'boolean', instructions: 'Is the ticket urgent?' } },
62283
+ * })
62284
+ * ```
62285
+ */
62286
+ export declare function defineQuestionSet(input: QuestionSetDefinition): QuestionSetDefinition;
62287
+ interface EnsureQuestionSetOptions {
62288
+ /** Plan without writing (the CI drift gate). Sends the full definition. */
62289
+ dryRun?: boolean;
62290
+ /** What to do when the last write came from the dashboard or API. Default 'error' (409). */
62291
+ onConflict?: 'error' | 'overwrite';
62292
+ /** 'publish' makes the latest version the one executions resolve. Default 'none'. */
62293
+ release?: 'none' | 'publish';
62294
+ /** Apply only if the remote still hashes to this value (409 remote_changed otherwise). */
62295
+ expectedRemoteHash?: string;
62296
+ /** Implies dryRun; throws QuestionSetDriftError unless the plan is 'none'. */
62297
+ expectNoChanges?: boolean;
62298
+ }
62299
+ interface EnsureQuestionSetConverged {
62300
+ result: 'unchanged' | 'created' | 'updated';
62301
+ questionSetId: string;
62302
+ versionId: string | null;
62303
+ versionNumber: number | null;
62304
+ publishedVersionNumber: number | null;
62305
+ /** The server-computed canonical hash; echo this one, never your own. */
62306
+ contentHash: string;
62307
+ }
62308
+ interface EnsureQuestionSetPlan {
62309
+ result: 'plan';
62310
+ changes: 'none' | 'create' | 'update';
62311
+ changedKeys: string[];
62312
+ contentHash: string;
62313
+ remoteHash?: string;
62314
+ questionSetId?: string;
62315
+ }
62316
+ type EnsureQuestionSetResult = EnsureQuestionSetConverged | EnsureQuestionSetPlan;
62317
+ interface QuestionSetPullResult {
62318
+ questionSetId: string;
62319
+ definition: QuestionSetDefinition;
62320
+ contentHash: string;
62321
+ lastModifiedSource: string | null;
62322
+ updatedAt: string | null;
62323
+ versionNumber: number | null;
62324
+ publishedVersionNumber: number | null;
62325
+ }
62326
+ /** A 409 from the ensure protocol (external_modification or remote_changed). */
62327
+ export declare class QuestionSetEnsureConflictError extends Error {
62328
+ readonly code: 'external_modification' | 'remote_changed';
62329
+ readonly lastModifiedSource?: string;
62330
+ readonly modifiedAt?: string | null;
62331
+ readonly currentHash?: string | null;
62332
+ constructor(body: {
62333
+ error?: string;
62334
+ code: 'external_modification' | 'remote_changed';
62335
+ lastModifiedSource?: string;
62336
+ modifiedAt?: string | null;
62337
+ currentHash?: string | null;
62338
+ });
62339
+ }
62340
+ /** Thrown by `ensure(def, { expectNoChanges: true })` when the remote differs. */
62341
+ export declare class QuestionSetDriftError extends Error {
62342
+ readonly plan: EnsureQuestionSetPlan;
62343
+ constructor(slug: string, plan: EnsureQuestionSetPlan);
62344
+ }
62345
+ //#endregion
62346
+ //#region src/question-sets-namespace.d.ts
62347
+ /** Question set config-as-code: `ensure` and `pull`. */
62348
+ export declare class QuestionSetsNamespace {
62349
+ private getClient;
62350
+ constructor(getClient: () => RuntypeClient$1);
62351
+ /**
62352
+ * Converge a `defineQuestionSet` definition. The steady state is one hash
62353
+ * probe. Pass `release: 'publish'` so flows and agents can resolve the
62354
+ * latest version.
62355
+ *
62356
+ * @example
62357
+ * ```typescript
62358
+ * await Runtype.questionSets.ensure(triage, { release: 'publish' })
62359
+ * await Runtype.questionSets.ensure(triage, { expectNoChanges: true })
62360
+ * ```
62361
+ */
62362
+ ensure(definition: QuestionSetDefinition, options?: EnsureQuestionSetOptions): Promise<EnsureQuestionSetResult>;
62363
+ /** Pull the live definition and provenance for a slug, to absorb a dashboard edit. */
62364
+ pull(slug: string): Promise<QuestionSetPullResult>;
62365
+ }
62366
+ //#endregion
61138
62367
  //#region src/products-ensure.d.ts
61139
62368
  /** Canonical normalized form of a product definition (name + canvas excluded). */
61140
62369
  export declare function normalizeProductDefinition(definition: ProductContentInput): {
@@ -61267,6 +62496,28 @@ interface EnsureFpoOptions {
61267
62496
  * plan rows.
61268
62497
  */
61269
62498
  prune?: boolean;
62499
+ /** Implies dryRun; throws FpoDriftError when any entity would be created, updated, pruned or fails. */
62500
+ expectNoChanges?: boolean;
62501
+ /**
62502
+ * TOCTOU guard: pass the dry run's `remoteHash`; the write proceeds only while
62503
+ * the live graph still hashes to it (ProductEnsureConflictError `remote_changed`
62504
+ * otherwise). The hash covers what `pullFpo` reconstructs, so seed records,
62505
+ * schedules and secrets are outside it.
62506
+ */
62507
+ expectedRemoteHash?: string;
62508
+ /**
62509
+ * With `release: 'none'`, send a hash-only probe first and skip the full FPO
62510
+ * when the live graph reconstructs to the same hash. A publishing converge
62511
+ * (the default release) always ships the full FPO, since only it can publish
62512
+ * drafts that are not yet live.
62513
+ */
62514
+ hashProbe?: boolean;
62515
+ /**
62516
+ * Whether converged capability agents and flows go live. The server defaults
62517
+ * to `'publish'` (version, publish and move the agent's `live` alias, as
62518
+ * product creation does); `'none'` saves changes as drafts.
62519
+ */
62520
+ release?: 'none' | 'publish';
61270
62521
  }
61271
62522
  /** One nested entity's converge result. */
61272
62523
  interface FpoEntityOutcome {
@@ -61281,9 +62532,17 @@ interface EnsureFpoResult {
61281
62532
  result: 'unchanged' | 'converged' | 'plan';
61282
62533
  productId?: string;
61283
62534
  contentHash: string;
62535
+ /** dryRun only: the live graph's hash, to pass back as `expectedRemoteHash`. */
62536
+ remoteHash?: string;
61284
62537
  entities: FpoEntityOutcome[];
61285
62538
  hasFailures: boolean;
61286
62539
  }
62540
+ /** Thrown by `ensureFpo(fpo, { expectNoChanges: true })` when the plan is not clean. */
62541
+ export declare class FpoDriftError extends Error {
62542
+ readonly plan: EnsureFpoResult;
62543
+ constructor(plan: EnsureFpoResult);
62544
+ }
62545
+ export declare function fpoPlanHasDrift(plan: EnsureFpoResult): boolean;
61287
62546
  interface PullFpoResult {
61288
62547
  productId: string;
61289
62548
  /**
@@ -61297,10 +62556,10 @@ interface PullFpoResult {
61297
62556
  warnings?: string[];
61298
62557
  }
61299
62558
  /**
61300
- * Converge an entire FPO onto the platform. Ships the full FPO (no hash-only
61301
- * probe in this release); the server fans out to the per-entity ensure services
61302
- * and returns the whole-FPO hash + per-entity report. Non-atomic: inspect
61303
- * `result.hasFailures` / `entities[].result` and re-run to self-heal.
62559
+ * Converge an entire FPO onto the platform. Ships the full FPO unless a
62560
+ * drafts-only `hashProbe` finds the live graph already matches; the server fans out to the
62561
+ * per-entity ensure services and returns the whole-FPO hash + per-entity report.
62562
+ * Non-atomic: inspect `result.hasFailures` / `entities[].result` and re-run to self-heal.
61304
62563
  */
61305
62564
  export declare function ensureFpo(client: RuntypeClient$1, fpo: FpoInput, options?: EnsureFpoOptions): Promise<EnsureFpoResult>;
61306
62565
  /**
@@ -61429,8 +62688,10 @@ interface DefineSurfaceInput {
61429
62688
  name: string;
61430
62689
  type: SurfaceDefinitionType;
61431
62690
  behavior?: Record<string, unknown>;
61432
- inbound?: Record<string, unknown>;
61433
- outbound?: Record<string, unknown>;
62691
+ /** Omit to keep the stored value; null clears it; a `'<redacted>'` credential keeps the stored secret. */
62692
+ inbound?: Record<string, unknown> | null;
62693
+ /** Omit to keep the stored value; null clears it; a `'<redacted>'` credential keeps the stored secret. */
62694
+ outbound?: Record<string, unknown> | null;
61434
62695
  status?: SurfaceDefinitionStatus;
61435
62696
  }
61436
62697
  /** The canonical (wire) definition produced by `defineSurface`. */
@@ -61438,8 +62699,10 @@ interface SurfaceDefinition {
61438
62699
  name: string;
61439
62700
  type: SurfaceDefinitionType;
61440
62701
  behavior?: Record<string, unknown>;
61441
- inbound?: Record<string, unknown>;
61442
- outbound?: Record<string, unknown>;
62702
+ /** Omit to keep the stored value; null clears it; a `'<redacted>'` credential keeps the stored secret. */
62703
+ inbound?: Record<string, unknown> | null;
62704
+ /** Omit to keep the stored value; null clears it; a `'<redacted>'` credential keeps the stored secret. */
62705
+ outbound?: Record<string, unknown> | null;
61443
62706
  status?: SurfaceDefinitionStatus;
61444
62707
  }
61445
62708
  /**
@@ -62267,6 +63530,23 @@ export declare class Runtype {
62267
63530
  * ```
62268
63531
  */
62269
63532
  static get tools(): ToolsNamespace;
63533
+ /**
63534
+ * Question sets namespace - Question set config-as-code (define / ensure / pull)
63535
+ *
63536
+ * @example
63537
+ * ```typescript
63538
+ * import { defineQuestionSet, Runtype } from '@runtypelabs/sdk'
63539
+ *
63540
+ * const triage = defineQuestionSet({
63541
+ * slug: 'ticket-triage',
63542
+ * name: 'Ticket triage',
63543
+ * questions: { urgent: { type: 'boolean', instructions: 'Is the ticket urgent?' } },
63544
+ * })
63545
+ *
63546
+ * await Runtype.questionSets.ensure(triage, { release: 'publish' })
63547
+ * ```
63548
+ */
63549
+ static get questionSets(): QuestionSetsNamespace;
62270
63550
  /**
62271
63551
  * Products namespace - Product config-as-code (define / ensure / pull)
62272
63552
  *
@@ -62464,6 +63744,238 @@ interface PromoteAgentResult {
62464
63744
  */
62465
63745
  export declare function promoteAgent(input: PromoteAgentInput): Promise<PromoteAgentResult>;
62466
63746
  //#endregion
63747
+ //#region src/schedules-ensure.d.ts
63748
+ /** Exactly one key: a flow or agent by id, or by name (portable across environments). */
63749
+ export type ScheduleTarget = {
63750
+ flowId: string;
63751
+ } | {
63752
+ agentId: string;
63753
+ } | {
63754
+ flowName: string;
63755
+ } | {
63756
+ agentName: string;
63757
+ };
63758
+ export type ScheduleTrigger = {
63759
+ type: 'recurring';
63760
+ cron: string;
63761
+ timezone: string;
63762
+ runAt?: string;
63763
+ } | {
63764
+ type: 'one_time';
63765
+ runAt: string;
63766
+ cron?: string;
63767
+ timezone?: string;
63768
+ };
63769
+ type ScheduleDefinitionMessage = {
63770
+ role: 'system' | 'user' | 'assistant';
63771
+ content: unknown;
63772
+ } | {
63773
+ name?: string;
63774
+ messages: Array<{
63775
+ role: 'system' | 'user' | 'assistant';
63776
+ content: unknown;
63777
+ }>;
63778
+ };
63779
+ /** The canonical (wire) definition produced by `defineSchedule`. */
63780
+ interface ScheduleDefinition {
63781
+ name: string;
63782
+ target: ScheduleTarget;
63783
+ trigger: ScheduleTrigger;
63784
+ recordIds?: string[];
63785
+ recordType?: string;
63786
+ recordFilter?: Record<string, unknown>;
63787
+ messages?: ScheduleDefinitionMessage[];
63788
+ inputs?: Record<string, unknown>;
63789
+ executionOptions?: Record<string, unknown>;
63790
+ /** Omit to leave the schedule's paused/active state alone; new schedules start enabled. */
63791
+ enabled?: boolean;
63792
+ }
63793
+ type DefineScheduleInput = ScheduleDefinition;
63794
+ interface ScheduleContentInput {
63795
+ triggerType: string;
63796
+ cron?: string | null;
63797
+ timezone?: string | null;
63798
+ runAt?: string | Date | null;
63799
+ recordIds?: string[] | null;
63800
+ recordType?: string | null;
63801
+ recordFilter?: Record<string, unknown> | null;
63802
+ messages?: unknown[] | null;
63803
+ inputs?: Record<string, unknown> | null;
63804
+ executionOptions?: Record<string, unknown> | null;
63805
+ enabled?: boolean | null;
63806
+ }
63807
+ /** Canonical normalized schedule content (name and target excluded — identity). */
63808
+ export declare function normalizeScheduleContent(definition: ScheduleContentInput): Record<string, unknown>;
63809
+ /** SHA-256 (hex) over canonical schedule content, in the flat content shape. */
63810
+ export declare function computeScheduleContentHash(definition: ScheduleContentInput): Promise<string>;
63811
+ /** The content hash of a `defineSchedule` definition. */
63812
+ export declare function computeScheduleDefinitionHash(definition: ScheduleDefinition): Promise<string>;
63813
+ /**
63814
+ * Pure-local declarative constructor for a standalone schedule. No I/O.
63815
+ * Validates structure; cron, timezone, record filter and plan limits are
63816
+ * checked server-side at ensure time.
63817
+ *
63818
+ * @example
63819
+ * ```typescript
63820
+ * const nightly = defineSchedule({
63821
+ * name: 'Nightly digest',
63822
+ * target: { flowName: 'Digest' },
63823
+ * trigger: { type: 'recurring', cron: '0 2 * * *', timezone: 'UTC' },
63824
+ * })
63825
+ * ```
63826
+ */
63827
+ export declare function defineSchedule(input: DefineScheduleInput): ScheduleDefinition;
63828
+ interface EnsureScheduleOptions {
63829
+ /** Plan without writing (the CI drift gate). Sends the full definition. */
63830
+ dryRun?: boolean;
63831
+ /** What to do when the last write was not ensure. Default 'error' (409). */
63832
+ onConflict?: 'error' | 'overwrite';
63833
+ /** TOCTOU guard from a dry run; the full definition is always sent with it. */
63834
+ expectedRemoteHash?: string;
63835
+ /** Implies dryRun; throws ScheduleDriftError unless the plan is 'none'. */
63836
+ expectNoChanges?: boolean;
63837
+ }
63838
+ interface EnsureScheduleConverged {
63839
+ result: 'unchanged' | 'created' | 'updated';
63840
+ scheduleId: string;
63841
+ /** The server-computed canonical hash (echo this — never your own). */
63842
+ contentHash: string;
63843
+ }
63844
+ interface EnsureSchedulePlan {
63845
+ result: 'plan';
63846
+ changes: 'none' | 'create' | 'update';
63847
+ changedKeys: string[];
63848
+ contentHash: string;
63849
+ remoteHash?: string;
63850
+ scheduleId?: string;
63851
+ }
63852
+ type EnsureScheduleResult = EnsureScheduleConverged | EnsureSchedulePlan;
63853
+ interface SchedulePullResult {
63854
+ scheduleId: string;
63855
+ definition: ScheduleDefinition;
63856
+ contentHash: string;
63857
+ lastModifiedSource: string | null;
63858
+ updatedAt: string | null;
63859
+ }
63860
+ /** A 409 from the ensure protocol (external_modification or remote_changed). */
63861
+ export declare class ScheduleEnsureConflictError extends Error {
63862
+ readonly code: 'external_modification' | 'remote_changed';
63863
+ readonly lastModifiedSource?: string;
63864
+ readonly modifiedAt?: string | null;
63865
+ readonly currentHash?: string | null;
63866
+ constructor(body: {
63867
+ error?: string;
63868
+ code: 'external_modification' | 'remote_changed';
63869
+ lastModifiedSource?: string;
63870
+ modifiedAt?: string | null;
63871
+ currentHash?: string | null;
63872
+ });
63873
+ }
63874
+ /** Thrown by `ensure(def, { expectNoChanges: true })` when drift is detected. */
63875
+ export declare class ScheduleDriftError extends Error {
63876
+ readonly plan: EnsureSchedulePlan;
63877
+ constructor(plan: EnsureSchedulePlan);
63878
+ }
63879
+ /** The request surface ensure needs; both SDK clients satisfy it. */
63880
+ interface ScheduleEnsureTransport {
63881
+ get<T>(path: string, params?: Record<string, unknown>): Promise<T>;
63882
+ post<T>(path: string, data?: unknown): Promise<T>;
63883
+ }
63884
+ /**
63885
+ * Idempotently converge a standalone schedule. Hash-first: probes with a
63886
+ * content hash and ships the full definition only on a miss. Never deletes.
63887
+ */
63888
+ export declare function ensureSchedule(client: ScheduleEnsureTransport, definition: ScheduleDefinition, options?: EnsureScheduleOptions): Promise<EnsureScheduleResult>;
63889
+ /** Pull the canonical definition + provenance for a schedule by name and target. */
63890
+ export declare function pullSchedule(client: ScheduleEnsureTransport, name: string, target: ScheduleTarget): Promise<SchedulePullResult>;
63891
+ //#endregion
63892
+ //#region src/collections-ensure.d.ts
63893
+ type RecordCollectionValidationMode = 'off' | 'warn' | 'enforce';
63894
+ /** A repo-declared record collection. `slug` is identity; omitted fields converge to create defaults. */
63895
+ interface RecordCollectionDefinition {
63896
+ slug: string;
63897
+ displayName: string;
63898
+ description?: string | null;
63899
+ icon?: string | null;
63900
+ schema?: Record<string, unknown> | null;
63901
+ validationMode?: RecordCollectionValidationMode;
63902
+ }
63903
+ /** Canonical normalized form of a collection definition (slug excluded — identity). */
63904
+ export declare function normalizeRecordCollectionDefinition(definition: RecordCollectionDefinition): {
63905
+ displayName: string;
63906
+ description?: string;
63907
+ icon?: string;
63908
+ schema?: Record<string, unknown>;
63909
+ validationMode: string;
63910
+ };
63911
+ /** SHA-256 (hex) over the canonical normalized collection definition. */
63912
+ export declare function computeRecordCollectionContentHash(definition: RecordCollectionDefinition): Promise<string>;
63913
+ interface EnsureCollectionOptions {
63914
+ /** Plan without writing (the CI drift gate). Sends the full definition. */
63915
+ dryRun?: boolean;
63916
+ /** What to do when the last write came from the dashboard/API. Default 'error' (409). */
63917
+ onConflict?: 'error' | 'overwrite';
63918
+ /** TOCTOU guard binding a dry run to its apply (409 remote_changed otherwise). */
63919
+ expectedRemoteHash?: string;
63920
+ /** Implies dryRun; throws CollectionDriftError unless the plan is 'none'. */
63921
+ expectNoChanges?: boolean;
63922
+ }
63923
+ interface CollectionSchemaChange {
63924
+ kind: 'additive' | 'breaking';
63925
+ breakingChanges: string[];
63926
+ }
63927
+ interface EnsureCollectionConverged {
63928
+ result: 'unchanged' | 'created' | 'updated';
63929
+ collectionId: string;
63930
+ /** The server-computed canonical hash (echo this — never your own). */
63931
+ contentHash: string;
63932
+ schemaChange?: CollectionSchemaChange;
63933
+ /** Present when this ensure moved validationMode to `enforce`: existing records checked against the schema. */
63934
+ enforceCheck?: {
63935
+ checked: number;
63936
+ failed: number;
63937
+ truncated: boolean;
63938
+ };
63939
+ }
63940
+ interface EnsureCollectionPlan {
63941
+ result: 'plan';
63942
+ changes: 'none' | 'create' | 'update';
63943
+ changedKeys: string[];
63944
+ contentHash: string;
63945
+ remoteHash?: string;
63946
+ collectionId?: string;
63947
+ schemaChange?: CollectionSchemaChange;
63948
+ }
63949
+ type EnsureCollectionResult = EnsureCollectionConverged | EnsureCollectionPlan;
63950
+ interface CollectionPullResult {
63951
+ collectionId: string;
63952
+ definition: Required<Omit<RecordCollectionDefinition, 'validationMode'>> & {
63953
+ validationMode: RecordCollectionValidationMode;
63954
+ };
63955
+ contentHash: string;
63956
+ lastModifiedSource: string | null;
63957
+ updatedAt: string | null;
63958
+ }
63959
+ /** A 409 from the ensure protocol (external_modification or remote_changed). */
63960
+ export declare class CollectionEnsureConflictError extends Error {
63961
+ readonly code: 'external_modification' | 'remote_changed';
63962
+ readonly lastModifiedSource?: string;
63963
+ readonly modifiedAt?: string | null;
63964
+ readonly currentHash?: string | null;
63965
+ constructor(body: {
63966
+ error?: string;
63967
+ code: 'external_modification' | 'remote_changed';
63968
+ lastModifiedSource?: string;
63969
+ modifiedAt?: string | null;
63970
+ currentHash?: string | null;
63971
+ });
63972
+ }
63973
+ /** Thrown by `ensure(def, { expectNoChanges: true })` when drift is detected. */
63974
+ export declare class CollectionDriftError extends Error {
63975
+ readonly plan: EnsureCollectionPlan;
63976
+ constructor(slug: string, plan: EnsureCollectionPlan);
63977
+ }
63978
+ //#endregion
62467
63979
  //#region src/api-key-request-types.d.ts
62468
63980
  /**
62469
63981
  * Agent API key request types.
@@ -63201,6 +64713,24 @@ export declare class CollectionsEndpoint {
63201
64713
  * `RecordCollections` map so `client.records.from(slug)` types metadata.
63202
64714
  */
63203
64715
  typegen(): Promise<string>;
64716
+ /**
64717
+ * Idempotently converge a repo-declared collection (display fields, schema,
64718
+ * validationMode) by slug. Hash-first; `dryRun` / `expectNoChanges` plan
64719
+ * without writing. Never deletes a collection or touches records.
64720
+ *
64721
+ * @example
64722
+ * ```typescript
64723
+ * await client.collections.ensure({
64724
+ * slug: 'customers',
64725
+ * displayName: 'Customers',
64726
+ * schema: { type: 'object', properties: { status: { type: 'string' } } },
64727
+ * validationMode: 'warn',
64728
+ * })
64729
+ * ```
64730
+ */
64731
+ ensure(definition: RecordCollectionDefinition, options?: EnsureCollectionOptions): Promise<EnsureCollectionResult>;
64732
+ /** Pull the canonical definition and provenance for a collection — the absorb-drift direction. */
64733
+ pull(slug: string): Promise<CollectionPullResult>;
63204
64734
  }
63205
64735
  /**
63206
64736
  * Agent API key REQUESTS — a device-authorization-style grant.
@@ -65542,6 +67072,17 @@ export declare class SchedulesEndpoint {
65542
67072
  * Create a schedule. Provide exactly one of `target.flowId` or `target.agentId`.
65543
67073
  */
65544
67074
  create(data: CreateScheduleRequest): Promise<ScheduleMutationResponse>;
67075
+ /**
67076
+ * Idempotently converge a `defineSchedule` definition on a standalone flow or
67077
+ * agent. Identity is name + target; the steady state is one hash probe. Never
67078
+ * deletes, and an omitted `enabled` leaves a paused schedule paused.
67079
+ */
67080
+ ensure(definition: ScheduleDefinition, options?: EnsureScheduleOptions): Promise<EnsureScheduleResult>;
67081
+ /**
67082
+ * Pull the canonical definition + provenance for a schedule by name and
67083
+ * target — the absorb-drift direction of `ensure`.
67084
+ */
67085
+ pull(name: string, target: ScheduleTarget): Promise<SchedulePullResult>;
65545
67086
  /**
65546
67087
  * Update a schedule (partial update supported).
65547
67088
  */
@@ -67443,5 +68984,5 @@ export declare function getLikelySupportingCandidatePaths(bestCandidatePath: str
67443
68984
  export declare function getDefaultPlanPath(taskName: string): string;
67444
68985
  export declare function sanitizeTaskSlug(taskName: string): string;
67445
68986
  //#endregion
67446
- export type { AIGrader, ActivateAgentAliasInput, ActivateAgentPromotionInput, AgentAlias, AgentAliasActivation, AgentAliasArchiveFailure, AgentAliasArchived, AgentAliasList, AgentAliasTransport, AgentDefinition, AgentDefinitionConfig, AgentDeploymentList, AgentDeploymentPromotion, AgentDeploymentReceipt, AgentPromotionManifest, AgentPromotionTransport, AgentPromotionValidation, AgentPullResult, AgentStreamEvent, ApiKeyRequest, ApiKeyRequestDelivery, ApiKeyRequestEnvironment, ApiKeyRequestHandoff, ApiKeyRequestListParams, ApiKeyRequestRequester, ApiKeyRequestStatus, ApplyGeneratedProposalOptions, ApplyGeneratedProposalResult, ArchiveAgentAliasEverywhereResult, ArchiveAgentAliasInput, AttachRuntimeToolsOptions, BatchClient, BatchListParams, BatchOptions, BatchRequest, BatchResult, BatchScheduleConfig, BatchStatus, BindSkillInput, BuiltInGraderId, CaseExpected, CheckGrader, ClaimApiKeyRequestInput, ClaimApiKeyRequestResponse, ClientConversation, ClientToken, ClientTokenConfig, ClientTokenDefinition, ClientTokenEnvironment, ClientTokenVersionPin, ClientWidgetTheme, ConditionalGetResult, ConditionalStepConfig, ContextErrorHandling, ContextFallback, CreateApiKeyRequestInput, CreateApiKeyRequestResponse, CreateClientTokenRequest, CreateClientTokenResponse, CreateEvalSuiteInput, CreatePromptData, DecomposeCriteriaResult, DefineAgentInput, DefineEvalCaseInput, DefineEvalInput, DefineFlowInput, DefineProductInput, DefineSkillInput, DefineSurfaceInput, DefineToolInput, DetachedReattach, DetachedReconnectOptions, DispatchClient, DispatchEvent, DispatchOptions, EnsureAgentConverged, EnsureAgentOptions, EnsureAgentPlan, EnsureAgentResult, EnsureClientTokenConverged, EnsureClientTokenOptions, EnsureClientTokenPlan, EnsureClientTokenResult, EnsureEvalResult, EnsureFlowConverged, EnsureFlowOptions, EnsureFlowPlan, EnsureFlowResult, EnsureFpoOptions, EnsureFpoResult, EnsureProductConverged, EnsureProductOptions, EnsureProductPlan, EnsureProductResult, EnsureSkillConverged, EnsureSkillOptions, EnsureSkillPlan, EnsureSkillResult, EnsureSurfaceConverged, EnsureSurfaceOptions, EnsureSurfacePlan, EnsureSurfaceResult, EnsureToolConverged, EnsureToolOptions, EnsureToolPlan, EnsureToolResult, ErrorHandlingMode, EvalAgentSelector, EvalAgentTargetResolution, EvalCaseDefinition, EvalCaseInput, EvalCaseProposal, EvalCaseProposalAccepted, EvalCaseProposalListResult, EvalCasesGenerated, EvalClient, EvalDefinition, EvalListParams, EvalMessage, EvalOptions, EvalProposalSource, EvalProposalStatus, EvalProposedCase, EvalPullResult, EvalRecord, EvalRequest, EvalResult, EvalRunCaseScores, EvalRunConfig, EvalRunEvidence, EvalRunScores, EvalStatus, EvalSuiteCase, EvalSuiteCaseInput, EvalSuiteCoverage, EvalSuiteDetail, EvalSuiteLatestRun, EvalSuiteListResult, EvalSuiteRunQueued, EvalSuiteRunResult, EvalSuiteSummary, EvalTarget, ExecutionStreamEvent, FallbackFailEvent, FallbackStartEvent, FallbackSuccessEvent, FallbackTrigger, FallbackTriggerType, FallbacksExhaustedEvent, FallbacksInitiatedEvent, FetchUrlStepConfig, FieldFormat, FlowCompleteEvent, FlowConfig, FlowDefinition, FlowDefinitionStep, FlowErrorEvent, FlowFallback, FlowInlineEvalInput, FlowPausedEvent, FlowPullResult, FlowStartEvent, FlowStreamEvent, FlowSummary, FlowValidationClient, FlowValidationIssue, FlowValidationResult, FpoEntityOutcome, FpoInput, GenerateEmbeddingStepConfig, GenerateEvalCasesInput, GeneratedRuntimeToolGateDecision, GeneratedRuntimeToolGateOptions, GetApiKeyRequestResponse, GetRecordStepConfig, Gradeable, GraderConfig, GraderOutcome, GraderSeverity, HumanVerdict, ListAgentAliasesOptions, ListAgentDeploymentsOptions, ListConversationsResponse, ListRecordsStepConfig, LoopStepConfig, Message, MessageFallback, ModelFallback, ModelOverride, OrganizationAgentAlias, OrganizationAgentAliasList, PersistedGraderOutcome, PrepareAgentPromotionInput, ProductDefinition, ProductPullResult, PromoteAgentInput, PromoteAgentResult, PromptErrorHandling, PromptFallback, PromptListParams, PromptStepConfig, PullFpoResult, RecordConfig, RecordFilter, RecordFilterCondition, RecordFilterGroup, RecordFilterOperator, RetrieveRecordStepConfig, RetryFallback, RollbackAgentAliasInput, RunEvalCaseResult, RunEvalInput, RunEvalResult, RunListParams, RunListResponse, RunListRow, AgentSkillBinding as RuntypeAgentSkillBinding, ConditionalStepConfig$1 as RuntypeConditionalStepConfig, RuntypeConfig, FetchUrlStepConfig$1 as RuntypeFetchUrlStepConfig, FlowConfig$1 as RuntypeFlowConfig, GenerateEmbeddingStepConfig$1 as RuntypeGenerateEmbeddingStepConfig, GetRecordStepConfig$1 as RuntypeGetRecordStepConfig, ListRecordsStepConfig$1 as RuntypeListRecordsStepConfig, LoopStepConfig$1 as RuntypeLoopStepConfig, Message$1 as RuntypeMessage, ModelOverride$1 as RuntypeModelOverride, Prompt$1 as RuntypePrompt, PromptStepConfig$1 as RuntypePromptStepConfig, RecordConfig$1 as RuntypeRecordConfig, RetrieveRecordStepConfig$1 as RuntypeRetrieveRecordStepConfig, SearchStepConfig as RuntypeSearchStepConfig, SendEmailStepConfig as RuntypeSendEmailStepConfig, SendEventStepConfig as RuntypeSendEventStepConfig, SendStreamStepConfig as RuntypeSendStreamStepConfig, SetVariableStepConfig as RuntypeSetVariableStepConfig, Skill as RuntypeSkill, SkillBindingWithAgent as RuntypeSkillBindingWithAgent, SkillCapabilities as RuntypeSkillCapabilities, SkillFrontmatter as RuntypeSkillFrontmatter, SkillManifest as RuntypeSkillManifest, SkillProposal as RuntypeSkillProposal, SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, SkillVersion as RuntypeSkillVersion, TransformDataStepConfig as RuntypeTransformDataStepConfig, UpsertFlowConfig as RuntypeUpsertFlowConfig, UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, VectorSearchStepConfig as RuntypeVectorSearchStepConfig, WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SearchStepConfig$1 as SearchStepConfig, SendEmailStepConfig$1 as SendEmailStepConfig, SendEventStepConfig$1 as SendEventStepConfig, SendStreamStepConfig$1 as SendStreamStepConfig, SetVariableStepConfig$1 as SetVariableStepConfig, SkillDefinition, SkillListPage, SkillListPagination, SkillListParams, SkillManifestInput, SkillMarkdownInput, SkillOrigin, SkillProposalStatus, SkillPullResult, SkillStatus, SkillTrustLevel, SkillVersionStatus, SkillWithVersion, SkillWriteInput, StepCompleteEvent, StepDeltaEvent, StepFallback, StepFieldMeta, StepStartEvent, StepWaitingLocalEvent, StreamCallbacks, StreamConsumeOptions, StreamEvent, StreamEventOf, SurfaceDefinition, SurfaceDefinitionStatus, SurfaceDefinitionType, SurfacePullResult, ToolDefinition, ToolDefinitionType, ToolPullResult, TransformDataStepConfig$1 as TransformDataStepConfig, UpdateClientTokenRequest, UpdateEvalCaseInput, UpdateEvalSuiteInput, UpdatePromptData, UpsertFlowConfig$1 as UpsertFlowConfig, UpsertRecordStepConfig$1 as UpsertRecordStepConfig, ValidateAgentPromotionInput, VectorSearchStepConfig$1 as VectorSearchStepConfig, WaitUntilStepConfig$1 as WaitUntilStepConfig, WorkflowCompileDeps, WorkflowCompletionCriteriaConfig, WorkflowConfig, WorkflowConfigFactory, WorkflowHookEntry, WorkflowHookKind, WorkflowHookRef, WorkflowHookSignatures, WorkflowMilestoneConfig, WorkflowPolicyConfig, WorkflowRecoveryConfig, WorkflowSlot };
68987
+ export type { AIGrader, ActivateAgentAliasInput, ActivateAgentPromotionInput, AgentAlias, AgentAliasActivation, AgentAliasArchiveFailure, AgentAliasArchived, AgentAliasList, AgentAliasTransport, AgentCapabilityChange, AgentCapabilityDeclaration, AgentDefinition, AgentDefinitionConfig, AgentDeploymentList, AgentDeploymentPromotion, AgentDeploymentReceipt, AgentPromotionManifest, AgentPromotionTransport, AgentPromotionValidation, AgentPullResult, AgentSkillBinding, AgentSkillBindingChange, AgentStreamEvent, ApiKeyRequest, ApiKeyRequestDelivery, ApiKeyRequestEnvironment, ApiKeyRequestHandoff, ApiKeyRequestListParams, ApiKeyRequestRequester, ApiKeyRequestStatus, ApplyGeneratedProposalOptions, ApplyGeneratedProposalResult, ArchiveAgentAliasEverywhereResult, ArchiveAgentAliasInput, AttachRuntimeToolsOptions, BatchClient, BatchListParams, BatchOptions, BatchRequest, BatchResult, BatchScheduleConfig, BatchStatus, BindSkillInput, BuiltInGraderId, CaseExpected, CheckGrader, ClaimApiKeyRequestInput, ClaimApiKeyRequestResponse, ClientConversation, ClientToken, ClientTokenConfig, ClientTokenDefinition, ClientTokenEnvironment, ClientTokenVersionPin, ClientWidgetTheme, CollectionPullResult, CollectionSchemaChange, ConditionalGetResult, ConditionalStepConfig, ContextErrorHandling, ContextFallback, CreateApiKeyRequestInput, CreateApiKeyRequestResponse, CreateClientTokenRequest, CreateClientTokenResponse, CreateEvalSuiteInput, CreatePromptData, DecomposeCriteriaResult, DefineAgentInput, DefineEvalCaseInput, DefineEvalInput, DefineFlowInput, DefineProductInput, DefineScheduleInput, DefineSkillInput, DefineSurfaceInput, DefineToolInput, DetachedReattach, DetachedReconnectOptions, DispatchClient, DispatchEvent, DispatchOptions, EnsureAgentConverged, EnsureAgentOptions, EnsureAgentPlan, EnsureAgentResult, EnsureClientTokenConverged, EnsureClientTokenOptions, EnsureClientTokenPlan, EnsureClientTokenResult, EnsureCollectionConverged, EnsureCollectionOptions, EnsureCollectionPlan, EnsureCollectionResult, EnsureEvalApplyOptions, EnsureEvalOptions, EnsureEvalPlan, EnsureEvalResult, EnsureFlowConverged, EnsureFlowOptions, EnsureFlowPlan, EnsureFlowResult, EnsureFpoOptions, EnsureFpoResult, EnsureProductConverged, EnsureProductOptions, EnsureProductPlan, EnsureProductResult, EnsureQuestionSetConverged, EnsureQuestionSetOptions, EnsureQuestionSetPlan, EnsureQuestionSetResult, EnsureScheduleConverged, EnsureScheduleOptions, EnsureSchedulePlan, EnsureScheduleResult, EnsureSkillConverged, EnsureSkillOptions, EnsureSkillPlan, EnsureSkillResult, EnsureSurfaceConverged, EnsureSurfaceOptions, EnsureSurfacePlan, EnsureSurfaceResult, EnsureToolConverged, EnsureToolOptions, EnsureToolPlan, EnsureToolResult, ErrorHandlingMode, EvalAgentSelector, EvalAgentTargetResolution, EvalCaseDefinition, EvalCaseInput, EvalCaseProposal, EvalCaseProposalAccepted, EvalCaseProposalListResult, EvalCasesGenerated, EvalClient, EvalDefinition, EvalListParams, EvalMessage, EvalOptions, EvalProposalSource, EvalProposalStatus, EvalProposedCase, EvalPullResult, EvalRecord, EvalRequest, EvalResult, EvalRunCaseScores, EvalRunConfig, EvalRunEvidence, EvalRunScores, EvalStatus, EvalSuiteCase, EvalSuiteCaseInput, EvalSuiteCoverage, EvalSuiteDetail, EvalSuiteLatestRun, EvalSuiteListResult, EvalSuiteRunQueued, EvalSuiteRunResult, EvalSuiteSummary, EvalTarget, ExecutionStreamEvent, FallbackFailEvent, FallbackStartEvent, FallbackSuccessEvent, FallbackTrigger, FallbackTriggerType, FallbacksExhaustedEvent, FallbacksInitiatedEvent, FetchUrlStepConfig, FieldFormat, FlowCompleteEvent, FlowConfig, FlowDefinition, FlowDefinitionStep, FlowErrorEvent, FlowFallback, FlowInlineEvalInput, FlowPausedEvent, FlowPullResult, FlowStartEvent, FlowStreamEvent, FlowSummary, FlowValidationClient, FlowValidationIssue, FlowValidationResult, FpoEntityOutcome, FpoInput, GenerateEmbeddingStepConfig, GenerateEvalCasesInput, GeneratedRuntimeToolGateDecision, GeneratedRuntimeToolGateOptions, GetApiKeyRequestResponse, GetRecordStepConfig, Gradeable, GraderConfig, GraderOutcome, GraderSeverity, HumanVerdict, ListAgentAliasesOptions, ListAgentDeploymentsOptions, ListConversationsResponse, ListRecordsStepConfig, LoopStepConfig, Message, MessageFallback, ModelFallback, ModelOverride, OrganizationAgentAlias, OrganizationAgentAliasList, PersistedGraderOutcome, PrepareAgentPromotionInput, ProductDefinition, ProductPullResult, PromoteAgentInput, PromoteAgentResult, PromptErrorHandling, PromptFallback, PromptListParams, PromptStepConfig, PullFpoResult, QuestionSetDefinition, QuestionSetPullResult, RecordCollectionDefinition, RecordCollectionValidationMode, RecordConfig, RecordFilter, RecordFilterCondition, RecordFilterGroup, RecordFilterOperator, RetrieveRecordStepConfig, RetryFallback, RollbackAgentAliasInput, RunEvalCaseResult, RunEvalInput, RunEvalResult, RunListParams, RunListResponse, RunListRow, AgentSkillBinding$1 as RuntypeAgentSkillBinding, ConditionalStepConfig$1 as RuntypeConditionalStepConfig, RuntypeConfig, FetchUrlStepConfig$1 as RuntypeFetchUrlStepConfig, FlowConfig$1 as RuntypeFlowConfig, GenerateEmbeddingStepConfig$1 as RuntypeGenerateEmbeddingStepConfig, GetRecordStepConfig$1 as RuntypeGetRecordStepConfig, ListRecordsStepConfig$1 as RuntypeListRecordsStepConfig, LoopStepConfig$1 as RuntypeLoopStepConfig, Message$1 as RuntypeMessage, ModelOverride$1 as RuntypeModelOverride, Prompt$1 as RuntypePrompt, PromptStepConfig$1 as RuntypePromptStepConfig, RecordConfig$1 as RuntypeRecordConfig, RetrieveRecordStepConfig$1 as RuntypeRetrieveRecordStepConfig, SearchStepConfig as RuntypeSearchStepConfig, SendEmailStepConfig as RuntypeSendEmailStepConfig, SendEventStepConfig as RuntypeSendEventStepConfig, SendStreamStepConfig as RuntypeSendStreamStepConfig, SetVariableStepConfig as RuntypeSetVariableStepConfig, Skill as RuntypeSkill, SkillBindingWithAgent as RuntypeSkillBindingWithAgent, SkillCapabilities as RuntypeSkillCapabilities, SkillFrontmatter as RuntypeSkillFrontmatter, SkillManifest as RuntypeSkillManifest, SkillProposal as RuntypeSkillProposal, SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, SkillVersion as RuntypeSkillVersion, TransformDataStepConfig as RuntypeTransformDataStepConfig, UpsertFlowConfig as RuntypeUpsertFlowConfig, UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, VectorSearchStepConfig as RuntypeVectorSearchStepConfig, WaitUntilStepConfig as RuntypeWaitUntilStepConfig, ScheduleDefinition, ScheduleDefinitionMessage, ScheduleEnsureTransport, SchedulePullResult, SearchStepConfig$1 as SearchStepConfig, SendEmailStepConfig$1 as SendEmailStepConfig, SendEventStepConfig$1 as SendEventStepConfig, SendStreamStepConfig$1 as SendStreamStepConfig, SetVariableStepConfig$1 as SetVariableStepConfig, SkillDefinition, SkillListPage, SkillListPagination, SkillListParams, SkillManifestInput, SkillMarkdownInput, SkillOrigin, SkillProposalStatus, SkillPullResult, SkillStatus, SkillTrustLevel, SkillVersionStatus, SkillWithVersion, SkillWriteInput, StepCompleteEvent, StepDeltaEvent, StepFallback, StepFieldMeta, StepStartEvent, StepWaitingLocalEvent, StreamCallbacks, StreamConsumeOptions, StreamEvent, StreamEventOf, SurfaceDefinition, SurfaceDefinitionStatus, SurfaceDefinitionType, SurfacePullResult, ToolDefinition, ToolDefinitionType, ToolPullResult, TransformDataStepConfig$1 as TransformDataStepConfig, UpdateClientTokenRequest, UpdateEvalCaseInput, UpdateEvalSuiteInput, UpdatePromptData, UpsertFlowConfig$1 as UpsertFlowConfig, UpsertRecordStepConfig$1 as UpsertRecordStepConfig, ValidateAgentPromotionInput, VectorSearchStepConfig$1 as VectorSearchStepConfig, WaitUntilStepConfig$1 as WaitUntilStepConfig, WorkflowCompileDeps, WorkflowCompletionCriteriaConfig, WorkflowConfig, WorkflowConfigFactory, WorkflowHookEntry, WorkflowHookKind, WorkflowHookRef, WorkflowHookSignatures, WorkflowMilestoneConfig, WorkflowPolicyConfig, WorkflowRecoveryConfig, WorkflowSlot };
67447
68988
  export {}