@ctxprotocol/sdk 0.13.0 → 0.14.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.
@@ -227,6 +227,15 @@ interface McpToolRateLimitHints {
227
227
  type DiscoveryMode = "query" | "execute";
228
228
  type McpToolSurface = "answer" | "execute" | "both";
229
229
  type McpToolLatencyClass = "instant" | "fast" | "slow" | "streaming";
230
+ type SuggestedPromptSource = "contributor" | "platform" | "sdk";
231
+ interface SuggestedPrompt {
232
+ /** Prompt text shown as a clickable example in the Context app */
233
+ text: string;
234
+ /** Where this prompt came from */
235
+ source: SuggestedPromptSource;
236
+ /** Optional display hint for the listing price */
237
+ priceHint?: string;
238
+ }
230
239
  interface McpToolPricingMeta {
231
240
  executeUsd?: string;
232
241
  queryUsd?: string;
@@ -237,7 +246,7 @@ interface McpToolMeta {
237
246
  surface?: McpToolSurface;
238
247
  /** Whether this method can be selected in query mode */
239
248
  queryEligible?: boolean;
240
- /** Declared latency class for metadata-scout/runtime gating */
249
+ /** Declared latency class for runtime gating */
241
250
  latencyClass?: McpToolLatencyClass;
242
251
  /** Method-level pricing metadata */
243
252
  pricing?: McpToolPricingMeta;
@@ -248,7 +257,7 @@ interface McpToolMeta {
248
257
  /** Context injection requirements handled by the Context runtime */
249
258
  contextRequirements?: string[];
250
259
  /**
251
- * Optional metadata-scout/runtime pacing hints.
260
+ * Optional runtime pacing hints.
252
261
  * Tool contributors can publish these to reduce rate-limit failures.
253
262
  */
254
263
  rateLimit?: McpToolRateLimitHints;
@@ -306,6 +315,8 @@ interface Tool {
306
315
  name: string;
307
316
  /** Description of what the tool does */
308
317
  description: string;
318
+ /** Clickable example questions shown in the Context app */
319
+ suggestedPrompts?: SuggestedPrompt[];
309
320
  /** Price per execution in USDC */
310
321
  price: string;
311
322
  /** Tool category (e.g., "defi", "nft") */
@@ -382,6 +393,8 @@ interface UpdateToolOptions {
382
393
  name?: string;
383
394
  /** New marketplace description */
384
395
  description?: string;
396
+ /** Validated example questions shown as clickable prompts in the Context app */
397
+ suggestedPrompts?: SuggestedPrompt[];
385
398
  /** New category -- must be one of the predefined marketplace categories */
386
399
  category?: ToolCategory | null;
387
400
  }
@@ -392,6 +405,7 @@ interface UpdateToolResult {
392
405
  id: string;
393
406
  name: string;
394
407
  description: string;
408
+ suggestedPrompts: SuggestedPrompt[];
395
409
  category: string | null;
396
410
  updatedAt: string;
397
411
  }
@@ -512,27 +526,117 @@ interface ExecutionResult<T = unknown> {
512
526
  /** Execution duration in milliseconds */
513
527
  durationMs: number;
514
528
  }
515
- type QueryDeepMode = "deep" | "deep-light" | "deep-heavy";
516
- type QueryClarificationPolicy = "return" | "auto" | "error";
517
- type QueryOutcomeType = "answer" | "clarification_required" | "capability_miss";
529
+ type QueryOutcomeType = "answer" | "capability_miss";
518
530
  type QueryResponseShape = "answer" | "answer_with_evidence" | "evidence_only";
519
531
  type QueryResponseEnvelopeViewType = "table" | "leaderboard" | "heatmap" | "timeseries";
520
- interface QueryClarificationOption {
521
- id: string;
522
- toolId: string;
532
+ /**
533
+ * Supported high-level chart kinds produced by the librarian's
534
+ * code interpreter. Each chart artifact is a structured spec + data pair
535
+ * the SDK consumer can render with their preferred chart library
536
+ * (the first-party UI uses Recharts via shadcn/ui).
537
+ */
538
+ type QueryChartType = "line" | "bar" | "area" | "scatter" | "composed" | "histogram" | "heatmap" | "candlestick";
539
+ /** Per-series rendering hint for a structured chart artifact. */
540
+ type QueryChartSeriesType = "line" | "bar" | "area" | "scatter";
541
+ /** Axis kind hint used by structured chart artifacts. */
542
+ type QueryChartAxisType = "time" | "category" | "number";
543
+ /** Axis value formatter hint used by structured chart artifacts. */
544
+ type QueryChartValueFormat = "number" | "percent" | "currency" | "compact";
545
+ /** Allowed primitive cell value inside a chart data row. */
546
+ type QueryChartDataValue = string | number | null;
547
+ /** A single data row keyed by `xKey` plus each series key. */
548
+ type QueryChartDataRow = Record<string, QueryChartDataValue>;
549
+ /** Single series entry inside a structured chart spec. */
550
+ interface QueryChartSeries {
551
+ key: string;
552
+ label?: string;
553
+ type?: QueryChartSeriesType;
554
+ errorKey?: string;
555
+ yAxis?: "left" | "right";
556
+ satisfies?: string;
557
+ }
558
+ /** Optional axis configuration for a structured chart spec. */
559
+ interface QueryChartAxis {
560
+ type?: QueryChartAxisType;
561
+ label?: string;
562
+ format?: QueryChartValueFormat;
563
+ valueScale?: "fraction" | "percent_points";
564
+ }
565
+ /** Structured chart spec describing layout for a chart artifact. */
566
+ interface QueryChartSpec {
567
+ type: QueryChartType;
568
+ xKey: string;
569
+ series: QueryChartSeries[];
570
+ expectedMeasures?: string[];
571
+ xAxis?: QueryChartAxis;
572
+ yAxis?: QueryChartAxis;
573
+ yAxisRight?: QueryChartAxis;
574
+ legend?: boolean;
575
+ stacked?: boolean;
576
+ brush?: boolean;
577
+ referenceLines?: Array<{
578
+ axis: "x" | "y";
579
+ value: string | number;
580
+ label?: string;
581
+ }>;
582
+ referenceAreas?: Array<{
583
+ x1?: string | number;
584
+ x2?: string | number;
585
+ y1?: number;
586
+ y2?: number;
587
+ label?: string;
588
+ }>;
589
+ yKey?: string;
590
+ valueKey?: string;
591
+ ohlc?: {
592
+ openKey: string;
593
+ highKey: string;
594
+ lowKey: string;
595
+ closeKey: string;
596
+ };
597
+ }
598
+ /**
599
+ * Computed artifact emitted by the librarian's code interpreter.
600
+ *
601
+ * Charts are returned as a structured `{ spec, data }` pair so SDK consumers
602
+ * can render them with any compatible charting library. The first-party web UI
603
+ * renders these specs with Recharts.
604
+ */
605
+ type QueryComputedArtifact = {
606
+ kind: "chart";
607
+ spec: QueryChartSpec;
608
+ data: QueryChartDataRow[];
609
+ title?: string;
610
+ };
611
+ interface QueryToolCallFailureSample {
612
+ /** Display name of the contributor tool whose call failed. */
523
613
  toolName: string;
614
+ /** MCP method name that was invoked when the failure occurred. */
524
615
  methodName: string;
525
- label: string;
526
- description: string;
527
- fitScore: number;
528
- recommended: boolean;
529
- }
530
- interface QueryClarificationPayload {
531
- question: string;
532
- options: QueryClarificationOption[];
533
- allowFreeform: boolean;
534
- recommendedOptionId: string;
535
- originalQuery: string;
616
+ /** Truncated failure reason captured from the runtime error. */
617
+ reason: string;
618
+ }
619
+ interface QueryGroundingSummary {
620
+ /** Marketplace methods registered in the iterative runtime, excluding control tools. */
621
+ availableToolCount: number;
622
+ /** Capped sample of method names available to the model. */
623
+ availableMethodNamesSample: string[];
624
+ /** Methods selected by retrieval/tool selection before runtime filtering. */
625
+ selectedMethodCount: number;
626
+ /** Capped list of selected methods that did not survive runtime filtering. */
627
+ selectedButFilteredOut: string[];
628
+ /** Grounded marketplace tool calls actually executed (successes only). */
629
+ toolCallCount: number;
630
+ /** Total marketplace method invocations attempted by the model (success + failure). */
631
+ toolCallAttemptCount: number;
632
+ /** Marketplace method invocations that completed without throwing. */
633
+ toolCallSuccessCount: number;
634
+ /** Marketplace method invocations that threw an error before returning data. */
635
+ toolCallFailureCount: number;
636
+ /** Capped sample of recent failed marketplace method invocations with reasons. */
637
+ toolCallFailureSamples: QueryToolCallFailureSample[];
638
+ /** True when the answer was grounded in at least one marketplace tool call. */
639
+ grounded: boolean;
536
640
  }
537
641
  interface QueryCapabilityMissPayload {
538
642
  message: string;
@@ -546,85 +650,19 @@ interface QueryAssumptionMetadata {
546
650
  label: string;
547
651
  reason: string;
548
652
  }
549
- type QueryClarificationDecisionReasonCode = "rollout_disabled" | "no_grounded_candidates" | "single_grounded_interpretation" | "required_discriminator_ambiguity" | "contract_scope_ambiguity" | "cost_or_latency_ambiguity" | "semantic_scope_ambiguity" | "capability_miss";
550
- type QueryAttemptForkReason = "manual_fork" | "clarification_branch" | "bounded_rediscovery" | "resume_replay" | "patch_retry" | "unknown";
551
- interface QueryClarificationEvidenceSources {
552
- usesMethodSchemas: boolean;
553
- usesProbeArgs: boolean;
554
- usesMethodMetadata: boolean;
555
- usesToolSelectionContext: boolean;
556
- usesLlmSelection: boolean;
557
- }
558
- interface QueryClarificationCandidateSummary {
559
- optionId: string;
560
- fitScore: number;
561
- llmRelevanceScore: number | null;
562
- requiredParams: string[];
563
- unresolvedRequiredParams: string[];
564
- probeArgKeys: string[];
565
- inputFieldNames: string[];
566
- outputKeys: string[];
567
- latencyClass: string;
568
- executePriceUsd: string | null;
569
- queryEligible: boolean;
570
- }
571
- interface QueryClarificationDiagnostics {
572
- orchestrationMode: string;
573
- rolloutStage: string;
574
- shadowMode: boolean;
575
- policy: QueryClarificationPolicy;
576
- outcomeType: QueryOutcomeType;
577
- triggered: boolean;
578
- optionCount: number;
579
- candidateCount: number;
580
- viableCandidateCount: number;
581
- recommendedOptionId: string | null;
582
- recommendedOptionReason: string | null;
583
- autoResolved: boolean;
584
- autoSelectEnabled: boolean;
585
- assumptionMade: QueryAssumptionMetadata | null;
586
- missingCapability: string | null;
587
- decisionReasonCode: QueryClarificationDecisionReasonCode;
588
- decisionSignals: string[];
589
- evidenceSources: QueryClarificationEvidenceSources;
590
- comparedOptionIds: string[];
591
- decisionStrategy: "deterministic" | "llm_primary";
592
- judgeAttempted: boolean;
593
- judgeApplied: boolean;
594
- judgeOutcomeType: QueryOutcomeType | null;
595
- judgeConfidence: number | null;
596
- judgeReason: string | null;
597
- judgeError: string | null;
598
- validatorReason: string | null;
599
- fallbackReason: string | null;
600
- copyStrategy: "deterministic" | "llm_rewritten";
601
- rewriteAttempted: boolean;
602
- rewriteApplied: boolean;
603
- rewriteError: string | null;
604
- candidateSummaries: QueryClarificationCandidateSummary[];
605
- }
653
+ type QueryAttemptForkReason = "manual_fork" | "bounded_rediscovery" | "resume_replay" | "patch_retry" | "unknown";
606
654
  /**
607
655
  * Options for the agentic query endpoint (pay-per-response).
608
656
  *
609
657
  * Unlike `execute()` which calls a single tool once, `query()` sends a
610
658
  * natural-language question and lets the server handle the live librarian
611
- * pipeline (`discover -> select -> metadata scout -> clarify if needed ->
612
- * iterative execute -> synthesize -> settle`).
659
+ * pipeline (`discover -> select -> iterative execute -> synthesize ->
660
+ * settle`).
613
661
  * One flat fee covers up to 100 MCP skill calls per tool.
614
662
  */
615
663
  interface QueryOptions {
616
664
  /** The natural-language question to answer */
617
665
  query: string;
618
- /**
619
- * How the SDK should handle clarification-required situations:
620
- * - `return`: surface a structured clarification result to the caller
621
- * - `auto`: enable clarification auto-select and continue with the server's deterministic recommended option
622
- * - `error`: turn structured clarification/capability outcomes into terminal errors
623
- *
624
- * Default behavior is surface-dependent: headless SDK and MCP callers default
625
- * to `auto`, while first-party chat defaults to `return`.
626
- */
627
- clarificationPolicy?: QueryClarificationPolicy;
628
666
  /**
629
667
  * Optional tool IDs to use. When omitted the server discovers tools
630
668
  * automatically (Auto Mode). When provided, only these tools are used
@@ -657,17 +695,21 @@ interface QueryOptions {
657
695
  */
658
696
  answerModelId?: string;
659
697
  /**
660
- * Structured response mode for query answers.
661
- * - `answer`: backward-compatible natural-language answer
662
- * - `answer_with_evidence`: prose answer plus a structured evidence package
663
- * - `evidence_only`: structured evidence package with a machine-friendly summary
698
+ * Structured response mode for query answers. The runtime always produces a
699
+ * grounded result (raw data + computed artifacts + provenance); responseShape
700
+ * controls whether a prose synthesis layer is added on top.
701
+ * - `answer_with_evidence`: prose answer plus the structured grounding (chat parity)
702
+ * - `evidence_only`: structured grounding only, no prose — the agent-harness
703
+ * shape. Returns raw `data` + `computedArtifacts` + `grounding`/`evidence`
704
+ * by default so your own agent can reason over the result.
705
+ * - `answer`: legacy prose-only shape, kept for backward compatibility.
664
706
  */
665
707
  responseShape?: QueryResponseShape;
666
708
  /**
667
- * Include execution data inline in the query response.
668
- * Useful for headless agents that need raw structured outputs.
669
- * Handshake completion remains a chat-only flow today; raw execution data
670
- * is not a typed resume/callback contract for approvals.
709
+ * Include raw execution data inline in the query response.
710
+ * Defaults to true for responseShape `evidence_only` (its primary payload is
711
+ * the raw fetched data); false otherwise. Set explicitly to override — e.g.
712
+ * `false` on evidence_only to rely on `dataUrl`/`canonicalDataRef` instead.
671
713
  */
672
714
  includeData?: boolean;
673
715
  /**
@@ -678,8 +720,7 @@ interface QueryOptions {
678
720
  /**
679
721
  * Include machine-readable developer trace output for this query response.
680
722
  * When enabled, the server may return summary counters plus diagnostics
681
- * for lane selection, metadata scout adequacy, clarification, and iterative
682
- * execution behavior.
723
+ * for tool selection and iterative execution behavior.
683
724
  */
684
725
  includeDeveloperTrace?: boolean;
685
726
  /**
@@ -707,7 +748,7 @@ interface QueryDeveloperTraceLoopInfo {
707
748
  [key: string]: unknown;
708
749
  }
709
750
  /**
710
- * Tool selection metadata attached to discovery and metadata-scout diagnostics.
751
+ * Tool selection metadata attached to discovery diagnostics.
711
752
  */
712
753
  interface QueryDeveloperTraceToolSelection {
713
754
  toolId: string;
@@ -802,8 +843,9 @@ interface QueryDeveloperTraceDiagnostics {
802
843
  scoutEvidenceInjected: boolean;
803
844
  stepBudget: number;
804
845
  completedStepCount: number;
846
+ toolCallCount?: number;
847
+ toolRegistry?: Omit<QueryGroundingSummary, "toolCallCount" | "grounded">;
805
848
  };
806
- clarification?: QueryClarificationDiagnostics;
807
849
  contributorSearches?: ContributorSearchTraceRecord[];
808
850
  [key: string]: unknown;
809
851
  }
@@ -922,8 +964,8 @@ interface QueryForkReference extends QueryAttemptReference {
922
964
  }
923
965
  /**
924
966
  * Public continuation state returned by headless Query responses.
925
- * Internal selected-tool lineage, Scout reuse, and clarification snapshots
926
- * remain durable server state but are not exposed as chat-style payloads.
967
+ * Internal selected-tool lineage remains durable server state but is not
968
+ * exposed as chat-style payloads.
927
969
  */
928
970
  interface QuerySessionState {
929
971
  sessionId: string;
@@ -958,9 +1000,9 @@ interface QueryResponseEnvelopeSourceRef {
958
1000
  note: string | null;
959
1001
  }
960
1002
  type QueryResponseEnvelopeTone = "positive" | "negative" | "neutral" | "caution";
961
- type QueryControllerStopReason = "complete_answer" | "bounded_runtime_budget" | "bounded_same_endpoint_guardrail" | "bounded_upstream_abort_guardrail" | "clarification_required" | "capability_miss";
962
- type QueryControllerIssueClass = "scope_ambiguity" | "missing_evidence" | "missing_capability" | "stale_data" | "wrong_tool_path";
963
- type QueryControllerAction = "inspect_current_grounding" | "patch_current_program" | "bounded_rediscovery" | "clarify_scope" | "return_capability_miss" | "return_bounded_answer" | "return_complete_answer";
1003
+ type QueryControllerStopReason = "complete_answer" | "bounded_runtime_budget" | "bounded_same_endpoint_guardrail" | "bounded_upstream_abort_guardrail" | "capability_miss";
1004
+ type QueryControllerIssueClass = "missing_evidence" | "missing_capability" | "stale_data" | "wrong_tool_path";
1005
+ type QueryControllerAction = "inspect_current_grounding" | "patch_current_program" | "bounded_rediscovery" | "return_capability_miss" | "return_bounded_answer" | "return_complete_answer";
964
1006
  interface QueryResponseEnvelopeMarketAggregateFlow {
965
1007
  netFlowUsd: number | null;
966
1008
  grossInflowUsd: number | null;
@@ -1093,10 +1135,19 @@ interface QueryBaseResult {
1093
1135
  cost: QueryCost;
1094
1136
  /** Total duration in milliseconds */
1095
1137
  durationMs: number;
1096
- /** Optional execution data from tools (when includeData=true) */
1138
+ /**
1139
+ * Raw execution data from tools — the actual MCP/tool outputs.
1140
+ * Returned by default for responseShape `evidence_only` (the agent-harness
1141
+ * shape, whose primary payload is the raw data). For other shapes it is
1142
+ * returned only when `includeData` is true.
1143
+ */
1097
1144
  data?: unknown;
1098
1145
  /** Optional blob URL for persisted execution data (when includeDataUrl=true) */
1099
1146
  dataUrl?: string;
1147
+ /** Optional derived artifacts emitted by code_interpreter in answer mode. */
1148
+ computedArtifacts?: QueryComputedArtifact[];
1149
+ /** Public grounding summary for marketplace tool execution. */
1150
+ grounding?: QueryGroundingSummary;
1100
1151
  /** Optional machine-readable Developer Mode trace payload */
1101
1152
  developerTrace?: QueryDeveloperTrace;
1102
1153
  /** Optional orchestration outcome metrics for benchmarking and rollout analysis */
@@ -1121,9 +1172,6 @@ interface QueryBaseResult {
1121
1172
  type QueryResult = (QueryBaseResult & Partial<QueryResponseEnvelope> & {
1122
1173
  outcomeType: "answer";
1123
1174
  assumptionMade?: QueryAssumptionMetadata;
1124
- }) | (QueryBaseResult & {
1125
- outcomeType: "clarification_required";
1126
- clarification: QueryClarificationPayload;
1127
1175
  }) | (QueryBaseResult & {
1128
1176
  outcomeType: "capability_miss";
1129
1177
  capabilityMiss: QueryCapabilityMissPayload;
@@ -1170,7 +1218,6 @@ interface QueryStreamErrorEvent {
1170
1218
  scope?: string;
1171
1219
  reasonCode?: string;
1172
1220
  outcomeType?: Exclude<QueryOutcomeType, "answer">;
1173
- clarification?: QueryClarificationPayload;
1174
1221
  capabilityMiss?: QueryCapabilityMissPayload;
1175
1222
  querySession?: QuerySessionState;
1176
1223
  }
@@ -1192,4 +1239,4 @@ declare class ContextError extends Error {
1192
1239
  constructor(message: string, code?: (ContextErrorCode | string) | undefined, statusCode?: number | undefined, helpUrl?: string | undefined);
1193
1240
  }
1194
1241
 
1195
- export { type QueryForkReference as $, type SearchCandidateProvenance as A, ContextError as B, type ContributorSearchResolution as C, type ContextClientOptions as D, type McpToolMeta as E, type McpToolRateLimitHints as F, type SearchResponse as G, type SearchOptions as H, type ExecuteOptions as I, type ExecuteSessionStartOptions as J, type ExecuteSessionStatus as K, type ExecuteSessionSpend as L, type McpTool as M, type ExecuteSessionResult as N, type ExecutionResult as O, type ExecuteApiSuccessResponse as P, type QueryDeveloperTrace as Q, type ResolveContributorSearchParams as R, type SearchCandidate as S, type Tool as T, type ExecuteApiErrorResponse as U, type ExecuteApiResponse as V, type ExecuteSessionApiSuccessResponse as W, type ExecuteSessionApiResponse as X, type QueryDeepMode as Y, type QueryAttemptForkReason as Z, type QueryAttemptReference as _, type ContributorSearchMetadata as a, type QueryOptions as a0, type QueryResult as a1, type QuerySessionState as a2, type QueryToolUsage as a3, type QueryCost as a4, type QueryCompletenessRepairEvent as a5, type QueryDeveloperTraceDiagnostics as a6, type QueryDeveloperTraceSummary as a7, type QueryDeveloperTraceStep as a8, type QueryDeveloperTraceToolRef as a9, type QueryDeveloperTraceLoopInfo as aa, type QueryApiSuccessResponse as ab, type QueryApiResponse as ac, type QueryStreamEvent as ad, type QueryStreamToolStatusEvent as ae, type QueryStreamTextDeltaEvent as af, type QueryStreamDeveloperTraceEvent as ag, type QueryStreamDoneEvent as ah, type QueryStreamErrorEvent as ai, type UpdateToolOptions as aj, type UpdateToolResult as ak, type ContextErrorCode as al, type QueryClarificationPayload as am, type QueryClarificationOption as an, type QueryClarificationPolicy as ao, type QueryCapabilityMissPayload as ap, type QueryAssumptionMetadata as aq, type QueryOutcomeType as ar, type ToolCategory as as, ALLOWED_TOOL_CATEGORIES as at, type SearchShortlist as b, type SearchIntent as c, type ContributorSearchConfig as d, type ContributorSearchResolvedConfig as e, type ContributorSearchTraceRecord as f, type ContributorSearchValidationCaseKind as g, type ContributorSearchValidationExpectation as h, type ContributorSearchValidationArtifact as i, ContributorSearchBudgetExceededError as j, CONTRIBUTOR_SEARCH_METADATA_VERSION as k, CONTRIBUTOR_SEARCH_VALIDATION_VERSION as l, type ContributorSearchConfidence as m, type ContributorSearchDegradedOutcome as n, type ContributorSearchDegradedOutcomePolicy as o, type ContributorSearchDegradedReasonCode as p, type ContributorSearchJudge as q, type ContributorSearchJudgeContext as r, type ContributorSearchJudgeInput as s, type ContributorSearchJudgeResult as t, type ContributorSearchJudgeSnapshot as u, type ContributorSearchJudgeUsage as v, type ContributorSearchMetadataSource as w, type ContributorSearchOutcome as x, type ContributorSearchTraceSummary as y, type ContributorSearchValidatorStatus as z };
1242
+ export { type QueryAttemptReference as $, type SearchCandidateProvenance as A, ContextError as B, type ContributorSearchResolution as C, type ContextClientOptions as D, type SuggestedPrompt as E, type SuggestedPromptSource as F, type McpToolMeta as G, type McpToolRateLimitHints as H, type SearchResponse as I, type SearchOptions as J, type ExecuteOptions as K, type ExecuteSessionStartOptions as L, type McpTool as M, type ExecuteSessionStatus as N, type ExecuteSessionSpend as O, type ExecuteSessionResult as P, type QueryDeveloperTrace as Q, type ResolveContributorSearchParams as R, type SearchCandidate as S, type Tool as T, type ExecutionResult as U, type ExecuteApiSuccessResponse as V, type ExecuteApiErrorResponse as W, type ExecuteApiResponse as X, type ExecuteSessionApiSuccessResponse as Y, type ExecuteSessionApiResponse as Z, type QueryAttemptForkReason as _, type ContributorSearchMetadata as a, type QueryForkReference as a0, type QueryOptions as a1, type QueryResult as a2, type QuerySessionState as a3, type QueryToolUsage as a4, type QueryCost as a5, type QueryCompletenessRepairEvent as a6, type QueryDeveloperTraceDiagnostics as a7, type QueryDeveloperTraceSummary as a8, type QueryDeveloperTraceStep as a9, type ToolCategory as aA, ALLOWED_TOOL_CATEGORIES as aB, type QueryDeveloperTraceToolRef as aa, type QueryDeveloperTraceLoopInfo as ab, type QueryApiSuccessResponse as ac, type QueryApiResponse as ad, type QueryStreamEvent as ae, type QueryStreamToolStatusEvent as af, type QueryStreamTextDeltaEvent as ag, type QueryStreamDeveloperTraceEvent as ah, type QueryStreamDoneEvent as ai, type QueryStreamErrorEvent as aj, type UpdateToolOptions as ak, type UpdateToolResult as al, type ContextErrorCode as am, type QueryCapabilityMissPayload as an, type QueryAssumptionMetadata as ao, type QueryOutcomeType as ap, type QueryComputedArtifact as aq, type QueryChartType as ar, type QueryChartSeriesType as as, type QueryChartAxisType as at, type QueryChartValueFormat as au, type QueryChartDataValue as av, type QueryChartDataRow as aw, type QueryChartSeries as ax, type QueryChartAxis as ay, type QueryChartSpec as az, type SearchShortlist as b, type SearchIntent as c, type ContributorSearchConfig as d, type ContributorSearchResolvedConfig as e, type ContributorSearchTraceRecord as f, type ContributorSearchValidationCaseKind as g, type ContributorSearchValidationExpectation as h, type ContributorSearchValidationArtifact as i, ContributorSearchBudgetExceededError as j, CONTRIBUTOR_SEARCH_METADATA_VERSION as k, CONTRIBUTOR_SEARCH_VALIDATION_VERSION as l, type ContributorSearchConfidence as m, type ContributorSearchDegradedOutcome as n, type ContributorSearchDegradedOutcomePolicy as o, type ContributorSearchDegradedReasonCode as p, type ContributorSearchJudge as q, type ContributorSearchJudgeContext as r, type ContributorSearchJudgeInput as s, type ContributorSearchJudgeResult as t, type ContributorSearchJudgeSnapshot as u, type ContributorSearchJudgeUsage as v, type ContributorSearchMetadataSource as w, type ContributorSearchOutcome as x, type ContributorSearchTraceSummary as y, type ContributorSearchValidatorStatus as z };