@runtypelabs/sdk 5.5.0 → 5.6.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
@@ -9727,6 +9727,8 @@ interface paths {
9727
9727
  };
9728
9728
  virtual?: boolean;
9729
9729
  };
9730
+ /** @description Strict mode (the `runtype eval --strict` gate): a soft grader miss fails its case like a gate miss. Default false — soft misses are reported per-outcome but do not fail the suite. */
9731
+ strict?: boolean;
9730
9732
  suiteId?: string;
9731
9733
  };
9732
9734
  };
@@ -37329,6 +37331,11 @@ interface components {
37329
37331
  passed: boolean;
37330
37332
  reasoning?: string;
37331
37333
  score?: number;
37334
+ /**
37335
+ * @description Grader severity. A soft miss is reported but only fails the suite under strict mode. Absent ⇒ gate.
37336
+ * @enum {string}
37337
+ */
37338
+ severity?: "gate" | "soft";
37332
37339
  }[];
37333
37340
  outputExcerpt: string;
37334
37341
  passed: boolean;
@@ -39925,6 +39932,414 @@ interface BillingSpendAnalyticsParams {
39925
39932
  days?: number;
39926
39933
  }
39927
39934
 
39935
+ /**
39936
+ * Eval config-as-code: `defineEval` + the grader builders.
39937
+ *
39938
+ * The authoring layer for code-colocated evals — define the evals for a flow or
39939
+ * agent right next to its `defineFlow` / `flows.ensure` definition. This module
39940
+ * is PURE and local (no I/O), the exact analog of `defineFlow` in
39941
+ * `flows-ensure.ts`: it validates and normalizes a loose `DefineEvalInput` into
39942
+ * a canonical `EvalDefinition` (target + cases + per-case graders) and computes
39943
+ * a content hash for hash-first convergence. The converge motion
39944
+ * (`client.evals.ensure` → `POST /eval/ensure`) and the `runtype eval` CLI build
39945
+ * on this contract in later increments.
39946
+ *
39947
+ * Grader types are MIRRORED INLINE from `@runtypelabs/shared`'s
39948
+ * `grader-types.ts` (the SDK is dependency-free by convention — see the same
39949
+ * pattern in `flows-ensure.ts`). The wire shapes must stay byte-identical to the
39950
+ * shared discriminated union so an eval authored here scores through the existing
39951
+ * `EvalScoringService` unchanged.
39952
+ *
39953
+ * Scope: the output + AI-judge union plus the trace graders (`called_tool` /
39954
+ * `tool_order` / `ran_step` / `completed` / `cost` / …), each scored server-side
39955
+ * by the same pure `runCheck` engine over the run's captured execution trace.
39956
+ * Severity (`.gate()` / `.soft()`) is deliberately NOT emitted here — it lands
39957
+ * with its own grader-engine extension. See
39958
+ * `docs/features/planning/2026-06-24-code-colocated-evals.md`.
39959
+ */
39960
+
39961
+ /**
39962
+ * Per-grader severity (mirror of `@runtypelabs/shared`'s `GraderSeverity`). A
39963
+ * `gate` miss always fails the case; a `soft` miss is tracked-but-not-failing
39964
+ * unless the run is `--strict`. Absent ⇒ `gate`. Set it with the chainable
39965
+ * `.gate()` / `.soft()` handles on any grader builder.
39966
+ */
39967
+ type GraderSeverity = 'gate' | 'soft';
39968
+ /** The deterministic check kinds (before severity is mixed in). */
39969
+ type CheckGraderShape = {
39970
+ kind: 'contains';
39971
+ value: string;
39972
+ caseSensitive?: boolean;
39973
+ } | {
39974
+ kind: 'not_contains';
39975
+ value: string;
39976
+ caseSensitive?: boolean;
39977
+ } | {
39978
+ kind: 'matches_expected';
39979
+ } | {
39980
+ kind: 'regex';
39981
+ pattern: string;
39982
+ flags?: string;
39983
+ } | {
39984
+ kind: 'valid_json';
39985
+ } | {
39986
+ kind: 'json_field';
39987
+ path: string;
39988
+ equals?: unknown;
39989
+ exists?: boolean;
39990
+ } | {
39991
+ kind: 'length';
39992
+ minChars?: number;
39993
+ maxChars?: number;
39994
+ } | {
39995
+ kind: 'latency';
39996
+ maxMs: number;
39997
+ } | {
39998
+ kind: 'no_error';
39999
+ } | {
40000
+ kind: 'called_tool';
40001
+ name: string;
40002
+ input?: unknown;
40003
+ output?: unknown;
40004
+ isError?: boolean;
40005
+ times?: number;
40006
+ } | {
40007
+ kind: 'not_called_tool';
40008
+ name: string;
40009
+ } | {
40010
+ kind: 'used_no_tools';
40011
+ } | {
40012
+ kind: 'max_tool_calls';
40013
+ max: number;
40014
+ } | {
40015
+ kind: 'tool_order';
40016
+ tools: string[];
40017
+ } | {
40018
+ kind: 'ran_step';
40019
+ name: string;
40020
+ } | {
40021
+ kind: 'step_order';
40022
+ steps: string[];
40023
+ } | {
40024
+ kind: 'completed';
40025
+ } | {
40026
+ kind: 'cost';
40027
+ maxUsd: number;
40028
+ };
40029
+ /** Deterministic, free, instant checks. Scored by the pure `runCheck` engine. */
40030
+ type CheckGrader = CheckGraderShape & {
40031
+ severity?: GraderSeverity;
40032
+ };
40033
+ /** Built-in AI-grader preset ids (mirror of `BUILT_IN_GRADER_IDS`). */
40034
+ type BuiltInGraderId = 'answersQuestion' | 'matchesExpected' | 'followsInstructions' | 'grounded' | 'rightTone' | 'safeToSend';
40035
+ /** LLM-as-judge over plain-language criteria. Scored by the api grader executor. */
40036
+ interface AIGrader {
40037
+ kind: 'ai';
40038
+ preset?: BuiltInGraderId;
40039
+ /** Plain language: "what does a good answer look like?" */
40040
+ criteria: string;
40041
+ /** Reference-guided when the case has `expected`. */
40042
+ useExpected?: boolean;
40043
+ /** Defaults to a cheap routed model at execution time. */
40044
+ model?: string;
40045
+ /** Pass cutoff on the 1-5 judge scale (default 4 server-side). Set via `.atLeast(n)`. */
40046
+ threshold?: number;
40047
+ /** Hard gate (default) vs soft. Set via `.gate()` / `.soft()`. */
40048
+ severity?: GraderSeverity;
40049
+ }
40050
+ type GraderConfig = CheckGrader | AIGrader;
40051
+ /** What a good answer looks like for a case (mirror of `CaseExpected`). */
40052
+ interface CaseExpected {
40053
+ text?: string;
40054
+ json?: unknown;
40055
+ facts?: string[];
40056
+ }
40057
+ /**
40058
+ * A grader plus chainable severity handles. The handles are defined
40059
+ * NON-ENUMERABLY, so `JSON.stringify`, `Object.keys`, and `computeEvalContentHash`
40060
+ * see only the data fields — a `Gradeable` serializes byte-identically to the
40061
+ * plain `GraderConfig` it wraps. `.atLeast(n)` is present only on AI graders.
40062
+ */
40063
+ type Gradeable<T extends GraderConfig = GraderConfig> = T & {
40064
+ /** Mark as a hard gate (the default): a miss fails the case. */
40065
+ gate(): Gradeable<T>;
40066
+ /** Mark as soft: a miss is tracked but only fails the case under `--strict`. */
40067
+ soft(): Gradeable<T>;
40068
+ } & (T extends AIGrader ? {
40069
+ /** AI graders only: set the 1-5 judge pass cutoff (e.g. `judge(...).atLeast(3)`). */
40070
+ atLeast(threshold: number): Gradeable<T>;
40071
+ } : Record<never, never>);
40072
+ /** Output contains `value` (case-insensitive unless `caseSensitive`). */
40073
+ declare function contains(value: string, opts?: {
40074
+ caseSensitive?: boolean;
40075
+ }): Gradeable<CheckGrader>;
40076
+ /** Output does NOT contain `value`. */
40077
+ declare function notContains(value: string, opts?: {
40078
+ caseSensitive?: boolean;
40079
+ }): Gradeable<CheckGrader>;
40080
+ /** Output equals the case's `expected.text` (trim/lowercase/collapse-whitespace normalized). */
40081
+ declare function matchesExpected(): Gradeable<CheckGrader>;
40082
+ /** Output matches a regular expression. */
40083
+ declare function regex(pattern: string, flags?: string): Gradeable<CheckGrader>;
40084
+ /** Output parses as JSON. */
40085
+ declare function validJson(): Gradeable<CheckGrader>;
40086
+ /**
40087
+ * A dot-path field in the output's parsed JSON. With `equals`, asserts value
40088
+ * equality; otherwise asserts presence (`exists: false` asserts absence).
40089
+ */
40090
+ declare function jsonField(path: string, opts?: {
40091
+ equals?: unknown;
40092
+ exists?: boolean;
40093
+ }): Gradeable<CheckGrader>;
40094
+ /** Output character length is within `[minChars, maxChars]`. */
40095
+ declare function length(opts: {
40096
+ minChars?: number;
40097
+ maxChars?: number;
40098
+ }): Gradeable<CheckGrader>;
40099
+ /** End-to-end latency is within `maxMs`. */
40100
+ declare function latency(maxMs: number): Gradeable<CheckGrader>;
40101
+ /** The case produced output without erroring. */
40102
+ declare function noError(): Gradeable<CheckGrader>;
40103
+ /**
40104
+ * A tool named `name` was called. Optional filters narrow the match: `input` /
40105
+ * `output` deep-equal a call's resolved input / result, `isError` matches a
40106
+ * call's error flag, and `times` asserts the matching count EXACTLY (omit for
40107
+ * "at least once").
40108
+ */
40109
+ declare function calledTool(name: string, opts?: {
40110
+ input?: unknown;
40111
+ output?: unknown;
40112
+ isError?: boolean;
40113
+ times?: number;
40114
+ }): Gradeable<CheckGrader>;
40115
+ /** No tool named `name` was called. */
40116
+ declare function notCalledTool(name: string): Gradeable<CheckGrader>;
40117
+ /** The run made no tool calls at all. */
40118
+ declare function usedNoTools(): Gradeable<CheckGrader>;
40119
+ /** The run made at most `max` tool calls. */
40120
+ declare function maxToolCalls(max: number): Gradeable<CheckGrader>;
40121
+ /** `tools` appears as an ordered subsequence of the tool-call names. */
40122
+ declare function toolOrder(tools: string[]): Gradeable<CheckGrader>;
40123
+ /** A step named (or typed) `name` ran. */
40124
+ declare function ranStep(name: string): Gradeable<CheckGrader>;
40125
+ /** `steps` appears as an ordered subsequence of the steps that ran. */
40126
+ declare function stepOrder(steps: string[]): Gradeable<CheckGrader>;
40127
+ /** The run completed (finished without erroring and was not left paused). */
40128
+ declare function completed(): Gradeable<CheckGrader>;
40129
+ /** Total run cost was within `maxUsd` (US dollars). */
40130
+ declare function cost(maxUsd: number): Gradeable<CheckGrader>;
40131
+ /**
40132
+ * LLM-as-judge over free-form criteria. Soft, model-graded — reach for it only
40133
+ * when no deterministic check captures what "good" means. Chain `.atLeast(n)`
40134
+ * to set the 1-5 pass cutoff and `.soft()` to make a miss non-blocking.
40135
+ */
40136
+ declare function judge(criteria: string, opts?: {
40137
+ useExpected?: boolean;
40138
+ model?: string;
40139
+ threshold?: number;
40140
+ preset?: BuiltInGraderId;
40141
+ }): Gradeable<AIGrader>;
40142
+ /**
40143
+ * The built-in AI-grader presets (criteria mirrored from `BUILT_IN_GRADERS`).
40144
+ * Each returns a ready `AIGrader`; pass an override string to `rightTone`.
40145
+ */
40146
+ declare const judges: {
40147
+ readonly answersQuestion: () => Gradeable<AIGrader>;
40148
+ readonly matchesExpected: () => Gradeable<AIGrader>;
40149
+ readonly followsInstructions: () => Gradeable<AIGrader>;
40150
+ readonly grounded: () => Gradeable<AIGrader>;
40151
+ readonly rightTone: (voice?: string) => Gradeable<AIGrader>;
40152
+ readonly safeToSend: () => Gradeable<AIGrader>;
40153
+ };
40154
+ interface EvalMessage {
40155
+ role: 'user' | 'assistant' | 'system';
40156
+ content: string;
40157
+ }
40158
+ /** A case's input: flow variables and/or a scripted conversation to replay. */
40159
+ interface EvalCaseInput {
40160
+ variables?: Record<string, unknown>;
40161
+ messages?: EvalMessage[];
40162
+ }
40163
+ /** The target a suite evaluates — a saved flow or agent, by portable name. */
40164
+ type EvalTarget = {
40165
+ flow: string;
40166
+ } | {
40167
+ agent: string;
40168
+ };
40169
+ /** Loose per-case input to `defineEval`. */
40170
+ interface DefineEvalCaseInput {
40171
+ name: string;
40172
+ input?: EvalCaseInput;
40173
+ expected?: CaseExpected;
40174
+ /** Case-level graders, appended after any suite-level `graders`. */
40175
+ expect?: GraderConfig[];
40176
+ }
40177
+ /** Loose input to `defineEval` (validated + normalized into `EvalDefinition`). */
40178
+ interface DefineEvalInput {
40179
+ /**
40180
+ * Suite name — the converge identity (name + account scope), exactly like a
40181
+ * flow's name. Optional: defaults to a stable name derived from the target
40182
+ * (`flow:<name>` / `agent:<name>`). Give two suites for the same target
40183
+ * distinct names (e.g. 'smoke', 'regression') to keep them separate.
40184
+ */
40185
+ name?: string;
40186
+ target: EvalTarget;
40187
+ /** Graders applied to EVERY case (suite-level). Run before each case's `expect`. */
40188
+ graders?: GraderConfig[];
40189
+ cases: DefineEvalCaseInput[];
40190
+ /**
40191
+ * Run without persisting a durable suite/batch to the dashboard (the 'virtual'
40192
+ * opt-out, mirroring `useVirtualFlow` / `storeResults:false`). Default false:
40193
+ * evals run via this surface are dashboard-visible by default.
40194
+ */
40195
+ virtual?: boolean;
40196
+ }
40197
+ /** A normalized case: graders merged (suite-level then case-level) into `expect`. */
40198
+ interface EvalCaseDefinition {
40199
+ name: string;
40200
+ input: EvalCaseInput;
40201
+ expected?: CaseExpected;
40202
+ expect: GraderConfig[];
40203
+ }
40204
+ /** The canonical (wire) eval definition produced by `defineEval`. */
40205
+ interface EvalDefinition {
40206
+ /** Suite name — the converge identity. Derived from the target when omitted. */
40207
+ name: string;
40208
+ target: EvalTarget;
40209
+ cases: EvalCaseDefinition[];
40210
+ virtual: boolean;
40211
+ }
40212
+ /**
40213
+ * Pure-local declarative constructor for an eval definition. No I/O. Validates
40214
+ * structure, rejects unknown fields, merges suite-level `graders` into each
40215
+ * case's `expect`, and produces a canonical, environment-portable
40216
+ * `EvalDefinition`. The target names a saved flow/agent by name (portable across
40217
+ * environments, like `defineFlow`'s `flow:<name>` references).
40218
+ *
40219
+ * @example
40220
+ * ```typescript
40221
+ * import { defineEval, contains, judges } from '@runtypelabs/sdk'
40222
+ *
40223
+ * export default defineEval({
40224
+ * target: { flow: 'support-triage' },
40225
+ * graders: [contains('ticket')],
40226
+ * cases: [
40227
+ * {
40228
+ * name: 'billing routes to finance',
40229
+ * input: { variables: { message: 'I was double charged' } },
40230
+ * expect: [contains('finance'), judges.answersQuestion()],
40231
+ * },
40232
+ * ],
40233
+ * })
40234
+ * ```
40235
+ */
40236
+ declare function defineEval(input: DefineEvalInput): EvalDefinition;
40237
+ /**
40238
+ * SHA-256 (hex) over the canonical normalized definition. Cases are sorted by
40239
+ * name (name is the case identity); grader order WITHIN a case is preserved
40240
+ * (reordering graders changes their result index, so it is a meaningful edit).
40241
+ * The hash is the basis for hash-first convergence in `client.evals.ensure`.
40242
+ */
40243
+ declare function computeEvalContentHash(definition: EvalDefinition): Promise<string>;
40244
+ /** The converge outcome of `client.evals.ensure(definition)`. */
40245
+ interface EnsureEvalResult {
40246
+ result: 'unchanged' | 'created' | 'updated';
40247
+ /** The persisted eval suite id. */
40248
+ suiteId: string;
40249
+ /** The server-computed canonical hash (echo this — never your own). */
40250
+ contentHash: string;
40251
+ }
40252
+ /** The canonical definition + provenance returned by `client.evals.pull(name)`. */
40253
+ interface EvalPullResult {
40254
+ suiteId: string;
40255
+ definition: EvalDefinition;
40256
+ contentHash: string;
40257
+ lastModifiedSource: string | null;
40258
+ updatedAt: string | null;
40259
+ }
40260
+ /**
40261
+ * One grader's verdict for one case (mirror of `@runtypelabs/shared`'s
40262
+ * `GraderOutcome`). `graderIndex` is the position in the suite's grader list.
40263
+ */
40264
+ interface GraderOutcome {
40265
+ graderIndex: number;
40266
+ kind: string;
40267
+ passed: boolean;
40268
+ /** The grader's severity (absent ⇒ gate). A soft miss only fails under `--strict`. */
40269
+ severity?: GraderSeverity;
40270
+ /** 0..1 for scaled graders (AI graders normalize their 1-5 to 0..1). */
40271
+ score?: number;
40272
+ /** AI-grader verdict, or a check's human-readable reason. */
40273
+ reasoning?: string;
40274
+ }
40275
+ /** One case's run result: pass/fail plus each grader's outcome. */
40276
+ interface RunEvalCaseResult {
40277
+ name: string;
40278
+ passed: boolean;
40279
+ outcomes: GraderOutcome[];
40280
+ /** Truncated final-output snapshot (for surfacing a failing case in CI logs). */
40281
+ outputExcerpt: string;
40282
+ /** Whether producing the output threw. */
40283
+ errored: boolean;
40284
+ }
40285
+ /** The synchronous run + score result returned by `client.evals.runSuite(...)`. */
40286
+ interface RunEvalResult {
40287
+ /** The saved suite id, or `null` for an inline (virtual) run. */
40288
+ suiteId: string | null;
40289
+ name: string;
40290
+ targetType: 'flow' | 'agent';
40291
+ /** Suite score, 0..1 (passed cases / total cases). */
40292
+ score: number;
40293
+ /** True when every case passed every grader. */
40294
+ passed: boolean;
40295
+ totalCases: number;
40296
+ passedCases: number;
40297
+ cases: RunEvalCaseResult[];
40298
+ }
40299
+ /**
40300
+ * Run a saved suite by id (the post-`ensure` path) XOR an inline definition (the
40301
+ * `virtual` path — nothing is persisted). Exactly one must be provided.
40302
+ *
40303
+ * `strict` (default false) is the `runtype eval --strict` gate: a `soft` grader
40304
+ * miss fails its case like a `gate` miss. Without it, soft misses are reported
40305
+ * per-outcome but do not fail the suite.
40306
+ */
40307
+ type RunEvalInput = {
40308
+ suiteId: string;
40309
+ strict?: boolean;
40310
+ } | {
40311
+ definition: EvalDefinition;
40312
+ strict?: boolean;
40313
+ };
40314
+ /**
40315
+ * Idempotently converge an eval suite definition onto the platform. Hash-first:
40316
+ * probes with a content hash, and only ships the full definition when the
40317
+ * server reports a miss (`definitionRequired`). Upserts the suite + replaces
40318
+ * its cases; never executes the eval (use the `runtype eval` CLI / `/eval`
40319
+ * submit surface to run it).
40320
+ *
40321
+ * `virtual: true` definitions are ephemeral and have nothing durable to
40322
+ * converge — ensure rejects them. Run a virtual eval directly instead.
40323
+ */
40324
+ declare function ensureEval(client: RuntypeClient$1, definition: EvalDefinition): Promise<EnsureEvalResult>;
40325
+ /**
40326
+ * Pull the canonical definition + provenance for an eval suite by name — the
40327
+ * absorb-drift direction of the ensure protocol. The contentHash reflects the
40328
+ * live suite state.
40329
+ */
40330
+ declare function pullEval(client: RuntypeClient$1, name: string): Promise<EvalPullResult>;
40331
+ /**
40332
+ * Run an eval suite synchronously and return the suite score + per-case grader
40333
+ * outcomes. Powers the `runtype eval` CI gate: a saved suite is run by id (after
40334
+ * `ensure`); a `virtual` definition is run inline without persisting anything.
40335
+ *
40336
+ * Synchronous and ephemeral — no batch is created and no scores are saved (use
40337
+ * the dashboard / `/eval/submit` for a durable, dashboard-visible run). Bounded:
40338
+ * suites over the server's per-run case limit must use the batch path. Not
40339
+ * supported here: `claude_managed` agents and inline/virtual agent targets.
40340
+ */
40341
+ declare function runEvalSuite(client: RuntypeClient$1, input: RunEvalInput): Promise<RunEvalResult>;
40342
+
39928
40343
  /**
39929
40344
  * Flow config-as-code: `defineFlow`, `flows.ensure`, `flows.pull`.
39930
40345
  *
@@ -39953,6 +40368,13 @@ interface BillingSpendAnalyticsParams {
39953
40368
  * same flow. The flow definition surface is `{ name, steps }` — description
39954
40369
  * is not part of the v1 ensure surface (the shared hash covers steps only).
39955
40370
  *
40371
+ * A `defineFlow` may also carry inline `evals` — eval suites to converge
40372
+ * alongside the flow. These are SDK-orchestrated: they are NOT part of the
40373
+ * flow content hash and NEVER ride the `/flows/ensure` wire (its server schema
40374
+ * is `.strict()` `{ name, steps }`). After the flow converges, `ensureFlow`
40375
+ * converges each inline suite through the existing `/eval/ensure` endpoint
40376
+ * (`ensureEval`), so eval semantics stay confined to the eval endpoints.
40377
+ *
39956
40378
  * See docs/adr/0003-agent-config-as-code-ensure.md for the design rationale.
39957
40379
  */
39958
40380
 
@@ -39972,10 +40394,26 @@ interface FlowDefinitionStep {
39972
40394
  when?: string;
39973
40395
  config?: Record<string, unknown>;
39974
40396
  }
39975
- /** `defineFlow` input: identity + the ordered step list. */
40397
+ /**
40398
+ * An inline eval suite attached to a `defineFlow`. It is a `DefineEvalInput`
40399
+ * whose `target` is optional: when omitted it defaults to `{ flow: <this
40400
+ * flow's name> }` (the enclosing flow), so the common "evals for THIS flow"
40401
+ * case needs no target. Each is normalized by the canonical `defineEval`.
40402
+ */
40403
+ type FlowInlineEvalInput = Omit<DefineEvalInput, 'target'> & {
40404
+ target?: DefineEvalInput['target'];
40405
+ };
40406
+ /** `defineFlow` input: identity + the ordered step list (+ optional inline evals). */
39976
40407
  interface DefineFlowInput {
39977
40408
  name: string;
39978
40409
  steps: FlowDefinitionStep[];
40410
+ /**
40411
+ * Eval suites to converge alongside this flow. Each is normalized through
40412
+ * the canonical `defineEval`; a suite with no `target` defaults to this flow.
40413
+ * NOT part of the flow content hash and NOT sent on the `/flows/ensure` wire
40414
+ * — `flows.ensure` converges these separately via `/eval/ensure`.
40415
+ */
40416
+ evals?: FlowInlineEvalInput[];
39979
40417
  }
39980
40418
  /** The canonical (wire) definition produced by `defineFlow`. */
39981
40419
  interface FlowDefinition {
@@ -39983,6 +40421,12 @@ interface FlowDefinition {
39983
40421
  steps: Array<FlowDefinitionStep & {
39984
40422
  order: number;
39985
40423
  }>;
40424
+ /**
40425
+ * Normalized inline eval suites (a NON-wire field). Present only when the
40426
+ * definition declared at least one. `ensureFlow` strips this before sending
40427
+ * `{ name, steps }` to `/flows/ensure`, then converges each via `/eval/ensure`.
40428
+ */
40429
+ evals?: EvalDefinition[];
39986
40430
  }
39987
40431
  /**
39988
40432
  * Pure-local declarative constructor for a flow definition. No I/O.
@@ -40032,6 +40476,14 @@ interface EnsureFlowConverged {
40032
40476
  versionId: string | null;
40033
40477
  /** The server-computed canonical hash (echo this — never your own). */
40034
40478
  contentHash: string;
40479
+ /**
40480
+ * Per-suite converge outcomes for the definition's inline `evals`, in
40481
+ * declaration order. Present only when the definition declared inline evals
40482
+ * AND the flow converged on the real (non-plan) path — each suite converges
40483
+ * via `/eval/ensure` after the flow itself. Absent when there are no inline
40484
+ * evals (and never populated on the dryRun/plan path).
40485
+ */
40486
+ evals?: EnsureEvalResult[];
40035
40487
  }
40036
40488
  interface EnsureFlowPlan {
40037
40489
  result: 'plan';
@@ -40161,11 +40613,19 @@ declare class FlowsNamespace {
40161
40613
  * the steady state is one tiny probe request. Creates an immutable version
40162
40614
  * snapshot on every change; never deletes; never executes the flow.
40163
40615
  *
40616
+ * When the definition carries inline `evals`, each suite is converged via
40617
+ * `/eval/ensure` after the flow itself (real converge path only — not on
40618
+ * dryRun/`expectNoChanges`), and the outcomes are returned as `result.evals`.
40619
+ *
40164
40620
  * @example
40165
40621
  * ```typescript
40166
- * const def = defineFlow({ name: 'Onboarding Digest', steps: [...] })
40622
+ * const def = defineFlow({
40623
+ * name: 'Onboarding Digest',
40624
+ * steps: [...],
40625
+ * evals: [{ cases: [{ name: 'smoke', input: {...}, expect: [contains('ok')] }] }],
40626
+ * })
40167
40627
  *
40168
- * // Converge (CI/deploy).
40628
+ * // Converge the flow AND its inline eval suites (CI/deploy).
40169
40629
  * const result = await Runtype.flows.ensure(def)
40170
40630
  *
40171
40631
  * // PR drift gate.
@@ -40574,377 +41034,6 @@ declare class BatchesNamespace {
40574
41034
  }>;
40575
41035
  }
40576
41036
 
40577
- /**
40578
- * Eval config-as-code: `defineEval` + the grader builders.
40579
- *
40580
- * The authoring layer for code-colocated evals — define the evals for a flow or
40581
- * agent right next to its `defineFlow` / `flows.ensure` definition. This module
40582
- * is PURE and local (no I/O), the exact analog of `defineFlow` in
40583
- * `flows-ensure.ts`: it validates and normalizes a loose `DefineEvalInput` into
40584
- * a canonical `EvalDefinition` (target + cases + per-case graders) and computes
40585
- * a content hash for hash-first convergence. The converge motion
40586
- * (`client.evals.ensure` → `POST /eval/ensure`) and the `runtype eval` CLI build
40587
- * on this contract in later increments.
40588
- *
40589
- * Grader types are MIRRORED INLINE from `@runtypelabs/shared`'s
40590
- * `grader-types.ts` (the SDK is dependency-free by convention — see the same
40591
- * pattern in `flows-ensure.ts`). The wire shapes must stay byte-identical to the
40592
- * shared discriminated union so an eval authored here scores through the existing
40593
- * `EvalScoringService` unchanged.
40594
- *
40595
- * Scope: the output + AI-judge union plus the trace graders (`called_tool` /
40596
- * `tool_order` / `ran_step` / `completed` / `cost` / …), each scored server-side
40597
- * by the same pure `runCheck` engine over the run's captured execution trace.
40598
- * Severity (`.gate()` / `.soft()`) is deliberately NOT emitted here — it lands
40599
- * with its own grader-engine extension. See
40600
- * `docs/features/planning/2026-06-24-code-colocated-evals.md`.
40601
- */
40602
-
40603
- /** Deterministic, free, instant checks. Scored by the pure `runCheck` engine. */
40604
- type CheckGrader = {
40605
- kind: 'contains';
40606
- value: string;
40607
- caseSensitive?: boolean;
40608
- } | {
40609
- kind: 'not_contains';
40610
- value: string;
40611
- caseSensitive?: boolean;
40612
- } | {
40613
- kind: 'matches_expected';
40614
- } | {
40615
- kind: 'regex';
40616
- pattern: string;
40617
- flags?: string;
40618
- } | {
40619
- kind: 'valid_json';
40620
- } | {
40621
- kind: 'json_field';
40622
- path: string;
40623
- equals?: unknown;
40624
- exists?: boolean;
40625
- } | {
40626
- kind: 'length';
40627
- minChars?: number;
40628
- maxChars?: number;
40629
- } | {
40630
- kind: 'latency';
40631
- maxMs: number;
40632
- } | {
40633
- kind: 'no_error';
40634
- } | {
40635
- kind: 'called_tool';
40636
- name: string;
40637
- input?: unknown;
40638
- output?: unknown;
40639
- isError?: boolean;
40640
- times?: number;
40641
- } | {
40642
- kind: 'not_called_tool';
40643
- name: string;
40644
- } | {
40645
- kind: 'used_no_tools';
40646
- } | {
40647
- kind: 'max_tool_calls';
40648
- max: number;
40649
- } | {
40650
- kind: 'tool_order';
40651
- tools: string[];
40652
- } | {
40653
- kind: 'ran_step';
40654
- name: string;
40655
- } | {
40656
- kind: 'step_order';
40657
- steps: string[];
40658
- } | {
40659
- kind: 'completed';
40660
- } | {
40661
- kind: 'cost';
40662
- maxUsd: number;
40663
- };
40664
- /** Built-in AI-grader preset ids (mirror of `BUILT_IN_GRADER_IDS`). */
40665
- type BuiltInGraderId = 'answersQuestion' | 'matchesExpected' | 'followsInstructions' | 'grounded' | 'rightTone' | 'safeToSend';
40666
- /** LLM-as-judge over plain-language criteria. Scored by the api grader executor. */
40667
- interface AIGrader {
40668
- kind: 'ai';
40669
- preset?: BuiltInGraderId;
40670
- /** Plain language: "what does a good answer look like?" */
40671
- criteria: string;
40672
- /** Reference-guided when the case has `expected`. */
40673
- useExpected?: boolean;
40674
- /** Defaults to a cheap routed model at execution time. */
40675
- model?: string;
40676
- /** Pass cutoff on the 1-5 judge scale (default 4 server-side). */
40677
- threshold?: number;
40678
- }
40679
- type GraderConfig = CheckGrader | AIGrader;
40680
- /** What a good answer looks like for a case (mirror of `CaseExpected`). */
40681
- interface CaseExpected {
40682
- text?: string;
40683
- json?: unknown;
40684
- facts?: string[];
40685
- }
40686
- /** Output contains `value` (case-insensitive unless `caseSensitive`). */
40687
- declare function contains(value: string, opts?: {
40688
- caseSensitive?: boolean;
40689
- }): CheckGrader;
40690
- /** Output does NOT contain `value`. */
40691
- declare function notContains(value: string, opts?: {
40692
- caseSensitive?: boolean;
40693
- }): CheckGrader;
40694
- /** Output equals the case's `expected.text` (trim/lowercase/collapse-whitespace normalized). */
40695
- declare function matchesExpected(): CheckGrader;
40696
- /** Output matches a regular expression. */
40697
- declare function regex(pattern: string, flags?: string): CheckGrader;
40698
- /** Output parses as JSON. */
40699
- declare function validJson(): CheckGrader;
40700
- /**
40701
- * A dot-path field in the output's parsed JSON. With `equals`, asserts value
40702
- * equality; otherwise asserts presence (`exists: false` asserts absence).
40703
- */
40704
- declare function jsonField(path: string, opts?: {
40705
- equals?: unknown;
40706
- exists?: boolean;
40707
- }): CheckGrader;
40708
- /** Output character length is within `[minChars, maxChars]`. */
40709
- declare function length(opts: {
40710
- minChars?: number;
40711
- maxChars?: number;
40712
- }): CheckGrader;
40713
- /** End-to-end latency is within `maxMs`. */
40714
- declare function latency(maxMs: number): CheckGrader;
40715
- /** The case produced output without erroring. */
40716
- declare function noError(): CheckGrader;
40717
- /**
40718
- * A tool named `name` was called. Optional filters narrow the match: `input` /
40719
- * `output` deep-equal a call's resolved input / result, `isError` matches a
40720
- * call's error flag, and `times` asserts the matching count EXACTLY (omit for
40721
- * "at least once").
40722
- */
40723
- declare function calledTool(name: string, opts?: {
40724
- input?: unknown;
40725
- output?: unknown;
40726
- isError?: boolean;
40727
- times?: number;
40728
- }): CheckGrader;
40729
- /** No tool named `name` was called. */
40730
- declare function notCalledTool(name: string): CheckGrader;
40731
- /** The run made no tool calls at all. */
40732
- declare function usedNoTools(): CheckGrader;
40733
- /** The run made at most `max` tool calls. */
40734
- declare function maxToolCalls(max: number): CheckGrader;
40735
- /** `tools` appears as an ordered subsequence of the tool-call names. */
40736
- declare function toolOrder(tools: string[]): CheckGrader;
40737
- /** A step named (or typed) `name` ran. */
40738
- declare function ranStep(name: string): CheckGrader;
40739
- /** `steps` appears as an ordered subsequence of the steps that ran. */
40740
- declare function stepOrder(steps: string[]): CheckGrader;
40741
- /** The run completed (finished without erroring and was not left paused). */
40742
- declare function completed(): CheckGrader;
40743
- /** Total run cost was within `maxUsd` (US dollars). */
40744
- declare function cost(maxUsd: number): CheckGrader;
40745
- /**
40746
- * LLM-as-judge over free-form criteria. Soft, model-graded — reach for it only
40747
- * when no deterministic check captures what "good" means.
40748
- */
40749
- declare function judge(criteria: string, opts?: {
40750
- useExpected?: boolean;
40751
- model?: string;
40752
- threshold?: number;
40753
- preset?: BuiltInGraderId;
40754
- }): AIGrader;
40755
- /**
40756
- * The built-in AI-grader presets (criteria mirrored from `BUILT_IN_GRADERS`).
40757
- * Each returns a ready `AIGrader`; pass an override string to `rightTone`.
40758
- */
40759
- declare const judges: {
40760
- readonly answersQuestion: () => AIGrader;
40761
- readonly matchesExpected: () => AIGrader;
40762
- readonly followsInstructions: () => AIGrader;
40763
- readonly grounded: () => AIGrader;
40764
- readonly rightTone: (voice?: string) => AIGrader;
40765
- readonly safeToSend: () => AIGrader;
40766
- };
40767
- interface EvalMessage {
40768
- role: 'user' | 'assistant' | 'system';
40769
- content: string;
40770
- }
40771
- /** A case's input: flow variables and/or a scripted conversation to replay. */
40772
- interface EvalCaseInput {
40773
- variables?: Record<string, unknown>;
40774
- messages?: EvalMessage[];
40775
- }
40776
- /** The target a suite evaluates — a saved flow or agent, by portable name. */
40777
- type EvalTarget = {
40778
- flow: string;
40779
- } | {
40780
- agent: string;
40781
- };
40782
- /** Loose per-case input to `defineEval`. */
40783
- interface DefineEvalCaseInput {
40784
- name: string;
40785
- input?: EvalCaseInput;
40786
- expected?: CaseExpected;
40787
- /** Case-level graders, appended after any suite-level `graders`. */
40788
- expect?: GraderConfig[];
40789
- }
40790
- /** Loose input to `defineEval` (validated + normalized into `EvalDefinition`). */
40791
- interface DefineEvalInput {
40792
- /**
40793
- * Suite name — the converge identity (name + account scope), exactly like a
40794
- * flow's name. Optional: defaults to a stable name derived from the target
40795
- * (`flow:<name>` / `agent:<name>`). Give two suites for the same target
40796
- * distinct names (e.g. 'smoke', 'regression') to keep them separate.
40797
- */
40798
- name?: string;
40799
- target: EvalTarget;
40800
- /** Graders applied to EVERY case (suite-level). Run before each case's `expect`. */
40801
- graders?: GraderConfig[];
40802
- cases: DefineEvalCaseInput[];
40803
- /**
40804
- * Run without persisting a durable suite/batch to the dashboard (the 'virtual'
40805
- * opt-out, mirroring `useVirtualFlow` / `storeResults:false`). Default false:
40806
- * evals run via this surface are dashboard-visible by default.
40807
- */
40808
- virtual?: boolean;
40809
- }
40810
- /** A normalized case: graders merged (suite-level then case-level) into `expect`. */
40811
- interface EvalCaseDefinition {
40812
- name: string;
40813
- input: EvalCaseInput;
40814
- expected?: CaseExpected;
40815
- expect: GraderConfig[];
40816
- }
40817
- /** The canonical (wire) eval definition produced by `defineEval`. */
40818
- interface EvalDefinition {
40819
- /** Suite name — the converge identity. Derived from the target when omitted. */
40820
- name: string;
40821
- target: EvalTarget;
40822
- cases: EvalCaseDefinition[];
40823
- virtual: boolean;
40824
- }
40825
- /**
40826
- * Pure-local declarative constructor for an eval definition. No I/O. Validates
40827
- * structure, rejects unknown fields, merges suite-level `graders` into each
40828
- * case's `expect`, and produces a canonical, environment-portable
40829
- * `EvalDefinition`. The target names a saved flow/agent by name (portable across
40830
- * environments, like `defineFlow`'s `flow:<name>` references).
40831
- *
40832
- * @example
40833
- * ```typescript
40834
- * import { defineEval, contains, judges } from '@runtypelabs/sdk'
40835
- *
40836
- * export default defineEval({
40837
- * target: { flow: 'support-triage' },
40838
- * graders: [contains('ticket')],
40839
- * cases: [
40840
- * {
40841
- * name: 'billing routes to finance',
40842
- * input: { variables: { message: 'I was double charged' } },
40843
- * expect: [contains('finance'), judges.answersQuestion()],
40844
- * },
40845
- * ],
40846
- * })
40847
- * ```
40848
- */
40849
- declare function defineEval(input: DefineEvalInput): EvalDefinition;
40850
- /**
40851
- * SHA-256 (hex) over the canonical normalized definition. Cases are sorted by
40852
- * name (name is the case identity); grader order WITHIN a case is preserved
40853
- * (reordering graders changes their result index, so it is a meaningful edit).
40854
- * The hash is the basis for hash-first convergence in `client.evals.ensure`.
40855
- */
40856
- declare function computeEvalContentHash(definition: EvalDefinition): Promise<string>;
40857
- /** The converge outcome of `client.evals.ensure(definition)`. */
40858
- interface EnsureEvalResult {
40859
- result: 'unchanged' | 'created' | 'updated';
40860
- /** The persisted eval suite id. */
40861
- suiteId: string;
40862
- /** The server-computed canonical hash (echo this — never your own). */
40863
- contentHash: string;
40864
- }
40865
- /** The canonical definition + provenance returned by `client.evals.pull(name)`. */
40866
- interface EvalPullResult {
40867
- suiteId: string;
40868
- definition: EvalDefinition;
40869
- contentHash: string;
40870
- lastModifiedSource: string | null;
40871
- updatedAt: string | null;
40872
- }
40873
- /**
40874
- * One grader's verdict for one case (mirror of `@runtypelabs/shared`'s
40875
- * `GraderOutcome`). `graderIndex` is the position in the suite's grader list.
40876
- */
40877
- interface GraderOutcome {
40878
- graderIndex: number;
40879
- kind: string;
40880
- passed: boolean;
40881
- /** 0..1 for scaled graders (AI graders normalize their 1-5 to 0..1). */
40882
- score?: number;
40883
- /** AI-grader verdict, or a check's human-readable reason. */
40884
- reasoning?: string;
40885
- }
40886
- /** One case's run result: pass/fail plus each grader's outcome. */
40887
- interface RunEvalCaseResult {
40888
- name: string;
40889
- passed: boolean;
40890
- outcomes: GraderOutcome[];
40891
- /** Truncated final-output snapshot (for surfacing a failing case in CI logs). */
40892
- outputExcerpt: string;
40893
- /** Whether producing the output threw. */
40894
- errored: boolean;
40895
- }
40896
- /** The synchronous run + score result returned by `client.evals.runSuite(...)`. */
40897
- interface RunEvalResult {
40898
- /** The saved suite id, or `null` for an inline (virtual) run. */
40899
- suiteId: string | null;
40900
- name: string;
40901
- targetType: 'flow' | 'agent';
40902
- /** Suite score, 0..1 (passed cases / total cases). */
40903
- score: number;
40904
- /** True when every case passed every grader. */
40905
- passed: boolean;
40906
- totalCases: number;
40907
- passedCases: number;
40908
- cases: RunEvalCaseResult[];
40909
- }
40910
- /**
40911
- * Run a saved suite by id (the post-`ensure` path) XOR an inline definition (the
40912
- * `virtual` path — nothing is persisted). Exactly one must be provided.
40913
- */
40914
- type RunEvalInput = {
40915
- suiteId: string;
40916
- } | {
40917
- definition: EvalDefinition;
40918
- };
40919
- /**
40920
- * Idempotently converge an eval suite definition onto the platform. Hash-first:
40921
- * probes with a content hash, and only ships the full definition when the
40922
- * server reports a miss (`definitionRequired`). Upserts the suite + replaces
40923
- * its cases; never executes the eval (use the `runtype eval` CLI / `/eval`
40924
- * submit surface to run it).
40925
- *
40926
- * `virtual: true` definitions are ephemeral and have nothing durable to
40927
- * converge — ensure rejects them. Run a virtual eval directly instead.
40928
- */
40929
- declare function ensureEval(client: RuntypeClient$1, definition: EvalDefinition): Promise<EnsureEvalResult>;
40930
- /**
40931
- * Pull the canonical definition + provenance for an eval suite by name — the
40932
- * absorb-drift direction of the ensure protocol. The contentHash reflects the
40933
- * live suite state.
40934
- */
40935
- declare function pullEval(client: RuntypeClient$1, name: string): Promise<EvalPullResult>;
40936
- /**
40937
- * Run an eval suite synchronously and return the suite score + per-case grader
40938
- * outcomes. Powers the `runtype eval` CI gate: a saved suite is run by id (after
40939
- * `ensure`); a `virtual` definition is run inline without persisting anything.
40940
- *
40941
- * Synchronous and ephemeral — no batch is created and no scores are saved (use
40942
- * the dashboard / `/eval/submit` for a durable, dashboard-visible run). Bounded:
40943
- * suites over the server's per-run case limit must use the batch path. Not
40944
- * supported here: `claude_managed` agents and inline/virtual agent targets.
40945
- */
40946
- declare function runEvalSuite(client: RuntypeClient$1, input: RunEvalInput): Promise<RunEvalResult>;
40947
-
40948
41037
  /**
40949
41038
  * EvalsNamespace - Static namespace for evaluation operations
40950
41039
  *
@@ -47802,4 +47891,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
47802
47891
  declare function getDefaultPlanPath(taskName: string): string;
47803
47892
  declare function sanitizeTaskSlug(taskName: string): string;
47804
47893
 
47805
- export { type AIGrader, type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type App, type AppManifest, type AppVersion, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, AppsEndpoint, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, type BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CaseExpected, ChatEndpoint, type CheckGrader, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientWidgetTheme, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateConversationRequest, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, type ErrorHandlingMode, EvalBuilder, type EvalCaseDefinition, type EvalCaseInput, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GraderConfig, type GraderOutcome, type ImageContentPart, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunEvalCaseResult, type RunEvalInput, type RunEvalResult, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, type AgentSkillBinding as RuntypeAgentSkillBinding, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UpdateAppRequest, type UpdateClientTokenRequest, type UpdateConversationRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withUnifiedEvents };
47894
+ export { type AIGrader, type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type App, type AppManifest, type AppVersion, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, AppsEndpoint, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, type BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CaseExpected, ChatEndpoint, type CheckGrader, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientWidgetTheme, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateConversationRequest, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, type ErrorHandlingMode, EvalBuilder, type EvalCaseDefinition, type EvalCaseInput, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowInlineEvalInput, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type ImageContentPart, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunEvalCaseResult, type RunEvalInput, type RunEvalResult, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, type AgentSkillBinding as RuntypeAgentSkillBinding, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UpdateAppRequest, type UpdateClientTokenRequest, type UpdateConversationRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withUnifiedEvents };