@firststep-studio/sdk 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -669,6 +669,36 @@ interface PlatformChatbot {
669
669
  /** Handler type */
670
670
  handlerType?: 'builtin' | 'external';
671
671
  }
672
+ interface PlatformKnowledgeSummary {
673
+ /** Studio knowledge MongoDB ID */
674
+ id: string;
675
+ /** Knowledge name */
676
+ name: string;
677
+ /** Optional description */
678
+ description?: string;
679
+ /** Knowledge type (e.g. 'text', 'database') */
680
+ type?: string;
681
+ /** Owning organization ID */
682
+ organizationId: string;
683
+ /** Timestamps */
684
+ createdAt?: number | string;
685
+ updatedAt?: number | string;
686
+ }
687
+ /**
688
+ * Full knowledge document (shape mirrors the underlying mongoose doc).
689
+ * Kept loose because the schema is large and varies by knowledge `type`;
690
+ * narrow types can be added incrementally as callers need them.
691
+ */
692
+ type PlatformKnowledge = PlatformKnowledgeSummary & Record<string, unknown>;
693
+ interface ListKnowledgeOptions {
694
+ /**
695
+ * Target organization to list knowledge from. If omitted, defaults to
696
+ * the org associated with the SDK token. Use this to read from a
697
+ * different org (e.g. a platform-operated shared library marked
698
+ * `publicReadable` in Studio).
699
+ */
700
+ orgId?: string;
701
+ }
672
702
  declare class PlatformError extends Error {
673
703
  status: number;
674
704
  constructor(message: string, status: number);
@@ -703,6 +733,27 @@ declare class PlatformClient {
703
733
  ok: boolean;
704
734
  modified: number;
705
735
  }>;
736
+ /**
737
+ * Knowledge / resource surface.
738
+ *
739
+ * Reads are allowed when the SDK token's org matches the target org,
740
+ * OR when the target org has `publicReadable: true` on the Studio side.
741
+ * Writes are not yet exposed here — those still go through the user-
742
+ * authenticated /api/knowledge routes from the Studio UI.
743
+ */
744
+ knowledge: {
745
+ /**
746
+ * List knowledge items for an organization.
747
+ * Defaults to the SDK token's own org if `orgId` is omitted.
748
+ */
749
+ list: (options?: ListKnowledgeOptions) => Promise<PlatformKnowledgeSummary[]>;
750
+ /**
751
+ * Fetch a single knowledge item by its Studio ID. The caller must
752
+ * have read access to the knowledge's owning org (same-org or
753
+ * publicReadable).
754
+ */
755
+ get: (id: string) => Promise<PlatformKnowledge>;
756
+ };
706
757
  }
707
758
  /**
708
759
  * Create a PlatformClient for calling back to FirstStep Studio.
@@ -773,4 +824,207 @@ declare function createAuthHeader(token: string): string;
773
824
  */
774
825
  declare function isValidToken(token: string): boolean;
775
826
 
776
- export { AgentTransitionPayload, ChatMessage, type ClassificationResult, type EmergencyPayload, HandoffOfferPayload, HandoffRequestPayload, HandoffReturnPayload, type HelplineCardItem, type HelplineCardPayload, MARKER_TYPES, type MarkerType, type PlatformChatbot, PlatformClient, type PlatformClientConfig, PlatformError, ProtocolStreamChunk, type ProviderCardItem, type ProviderCardPayload, type ReportCardPayload, type ResourceCardItem, type ResourceCardPayload, RoutingClassificationPayload, type SafetyPlanPayload, type SafetyPlanSection, SchemaDeclarationPayload, type UCPClassifyRequest, type UCPClassifyResponse, UCPClient, type UCPClientConfig, type UCPEndpointConfig, UCPError, type UCPErrorResponse, type UCPInfoResponse, type UCPMessage, classifyWithUCP, createAuthHeader, createPlatformClient, createRequestSignature, createUCPClient, isValidToken, renderMarkers, streamMetadata, verifyRequestSignature };
827
+ /**
828
+ * LLM Client
829
+ *
830
+ * SDK client for calling Studio's `/api/llm/*` proxy routes. Studio forwards
831
+ * the request body 1:1 to Google's Generative Language REST API, so the
832
+ * shapes here mirror Google's REST shape (NOT the @google/genai SDK shape).
833
+ *
834
+ * Reference: https://ai.google.dev/api/generate-content
835
+ *
836
+ * @example
837
+ * ```typescript
838
+ * import { createLLMClient } from '@firststep-studio/sdk';
839
+ *
840
+ * const llm = createLLMClient({
841
+ * studioUrl: 'https://studio-api.example.com',
842
+ * token: process.env.FIRSTSTEP_TOKEN!,
843
+ * });
844
+ *
845
+ * // Single-shot
846
+ * const res = await llm.generate({
847
+ * model: 'gemini-3-flash-preview',
848
+ * contents: [{ role: 'user', parts: [{ text: 'Hello' }] }],
849
+ * generationConfig: { temperature: 0.7, maxOutputTokens: 500 },
850
+ * });
851
+ * console.log(res.candidates[0].content.parts[0].text);
852
+ *
853
+ * // Streaming
854
+ * for await (const chunk of llm.generateStream({
855
+ * model: 'gemini-3-flash-preview',
856
+ * contents: [{ role: 'user', parts: [{ text: 'Count to 5' }] }],
857
+ * })) {
858
+ * process.stdout.write(chunk.candidates?.[0]?.content?.parts?.[0]?.text ?? '');
859
+ * }
860
+ *
861
+ * // Cache
862
+ * const cache = await llm.cache.create({
863
+ * model: 'models/gemini-2.5-flash',
864
+ * systemInstruction: { parts: [{ text: 'long system prompt...' }] },
865
+ * ttl: '3600s',
866
+ * });
867
+ * await llm.cache.get(cache.name);
868
+ * await llm.cache.delete(cache.name);
869
+ * ```
870
+ */
871
+ interface LLMClientConfig {
872
+ /** Studio backend API URL (e.g. https://studio-api.example.com) */
873
+ studioUrl: string;
874
+ /** API token (Bearer fst_<...>) */
875
+ token: string;
876
+ /** Request timeout in ms for non-streaming calls (default: 60000) */
877
+ timeout?: number;
878
+ }
879
+ interface LLMPart {
880
+ text?: string;
881
+ inlineData?: {
882
+ mimeType: string;
883
+ data: string;
884
+ };
885
+ [k: string]: unknown;
886
+ }
887
+ interface LLMContent {
888
+ role?: 'user' | 'model';
889
+ parts: LLMPart[];
890
+ }
891
+ interface LLMGenerationConfig {
892
+ temperature?: number;
893
+ maxOutputTokens?: number;
894
+ topP?: number;
895
+ topK?: number;
896
+ responseMimeType?: string;
897
+ responseSchema?: Record<string, unknown>;
898
+ thinkingConfig?: {
899
+ thinkingBudget?: number;
900
+ thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high';
901
+ includeThoughts?: boolean;
902
+ };
903
+ stopSequences?: string[];
904
+ [k: string]: unknown;
905
+ }
906
+ interface LLMSafetySetting {
907
+ category: string;
908
+ threshold: string;
909
+ }
910
+ /**
911
+ * Request body for /api/llm/generate and /api/llm/generate/stream.
912
+ * Mirrors Google's `:generateContent` REST request, plus `model` at the top level
913
+ * so Studio can build the URL path.
914
+ */
915
+ interface LLMGenerateRequest {
916
+ model: string;
917
+ contents: LLMContent[];
918
+ systemInstruction?: {
919
+ parts: LLMPart[];
920
+ };
921
+ generationConfig?: LLMGenerationConfig;
922
+ safetySettings?: LLMSafetySetting[];
923
+ /** Resource name of an explicit cache, e.g. "cachedContents/abc123" */
924
+ cachedContent?: string;
925
+ /** Function-calling tools (forwarded as-is) */
926
+ tools?: unknown[];
927
+ [k: string]: unknown;
928
+ }
929
+ interface LLMUsageMetadata {
930
+ promptTokenCount?: number;
931
+ candidatesTokenCount?: number;
932
+ cachedContentTokenCount?: number;
933
+ thoughtsTokenCount?: number;
934
+ totalTokenCount?: number;
935
+ [k: string]: unknown;
936
+ }
937
+ interface LLMCandidate {
938
+ content?: LLMContent;
939
+ finishReason?: string;
940
+ index?: number;
941
+ safetyRatings?: unknown[];
942
+ [k: string]: unknown;
943
+ }
944
+ interface LLMGenerateResponse {
945
+ candidates?: LLMCandidate[];
946
+ usageMetadata?: LLMUsageMetadata;
947
+ promptFeedback?: {
948
+ blockReason?: string;
949
+ [k: string]: unknown;
950
+ };
951
+ modelVersion?: string;
952
+ responseId?: string;
953
+ [k: string]: unknown;
954
+ }
955
+ interface LLMCacheCreateRequest {
956
+ model: string;
957
+ displayName?: string;
958
+ systemInstruction?: {
959
+ parts: LLMPart[];
960
+ };
961
+ contents?: LLMContent[];
962
+ /** Time-to-live, e.g. "3600s" */
963
+ ttl?: string;
964
+ [k: string]: unknown;
965
+ }
966
+ interface LLMCachedContent {
967
+ name: string;
968
+ model: string;
969
+ createTime?: string;
970
+ updateTime?: string;
971
+ expireTime?: string;
972
+ displayName?: string;
973
+ usageMetadata?: {
974
+ totalTokenCount?: number;
975
+ };
976
+ [k: string]: unknown;
977
+ }
978
+ declare class LLMError extends Error {
979
+ status: number;
980
+ body: unknown;
981
+ constructor(message: string, status: number, body: unknown);
982
+ }
983
+ declare class LLMClient {
984
+ private studioUrl;
985
+ private token;
986
+ private timeout;
987
+ constructor(config: LLMClientConfig);
988
+ private headers;
989
+ /**
990
+ * Single-shot generation. Body is forwarded to Google's :generateContent
991
+ * unchanged. Response is Google's response shape unchanged.
992
+ */
993
+ generate(req: LLMGenerateRequest): Promise<LLMGenerateResponse>;
994
+ /**
995
+ * Streaming generation as an AsyncGenerator of partial responses.
996
+ * Each yielded chunk has the same shape as a non-streaming response (a
997
+ * `candidates[]` slice with the next text fragment, plus usageMetadata
998
+ * on the final chunk).
999
+ *
1000
+ * Note: timeout option is not enforced for streams; consumer should
1001
+ * abort externally if needed.
1002
+ */
1003
+ generateStream(req: LLMGenerateRequest): AsyncGenerator<LLMGenerateResponse>;
1004
+ /**
1005
+ * Explicit prompt cache surface. Maps to Google's `/cachedContents` REST API.
1006
+ */
1007
+ cache: {
1008
+ /**
1009
+ * Create an explicit cache. Returns the resource (use `cache.name` as the
1010
+ * `cachedContent` field on a future generate() request).
1011
+ */
1012
+ create: (req: LLMCacheCreateRequest) => Promise<LLMCachedContent>;
1013
+ /**
1014
+ * Fetch a cache by resource name (e.g. "cachedContents/abc123").
1015
+ * Returns null when the cache is not found (404), which is the common
1016
+ * "expired" signal — callers can simply recreate.
1017
+ */
1018
+ get: (name: string) => Promise<LLMCachedContent | null>;
1019
+ /**
1020
+ * Delete a cache by resource name. Idempotent: 404 is treated as success.
1021
+ */
1022
+ delete: (name: string) => Promise<void>;
1023
+ };
1024
+ }
1025
+ /**
1026
+ * Create an LLMClient that talks to Studio's /api/llm/* proxy routes.
1027
+ */
1028
+ declare function createLLMClient(config: LLMClientConfig): LLMClient;
1029
+
1030
+ export { AgentTransitionPayload, ChatMessage, type ClassificationResult, type EmergencyPayload, HandoffOfferPayload, HandoffRequestPayload, HandoffReturnPayload, type HelplineCardItem, type HelplineCardPayload, type LLMCacheCreateRequest, type LLMCachedContent, type LLMCandidate, LLMClient, type LLMClientConfig, type LLMContent, LLMError, type LLMGenerateRequest, type LLMGenerateResponse, type LLMGenerationConfig, type LLMPart, type LLMSafetySetting, type LLMUsageMetadata, type ListKnowledgeOptions, MARKER_TYPES, type MarkerType, type PlatformChatbot, PlatformClient, type PlatformClientConfig, PlatformError, type PlatformKnowledge, type PlatformKnowledgeSummary, ProtocolStreamChunk, type ProviderCardItem, type ProviderCardPayload, type ReportCardPayload, type ResourceCardItem, type ResourceCardPayload, RoutingClassificationPayload, type SafetyPlanPayload, type SafetyPlanSection, SchemaDeclarationPayload, type UCPClassifyRequest, type UCPClassifyResponse, UCPClient, type UCPClientConfig, type UCPEndpointConfig, UCPError, type UCPErrorResponse, type UCPInfoResponse, type UCPMessage, classifyWithUCP, createAuthHeader, createLLMClient, createPlatformClient, createRequestSignature, createUCPClient, isValidToken, renderMarkers, streamMetadata, verifyRequestSignature };
package/dist/index.d.ts CHANGED
@@ -669,6 +669,36 @@ interface PlatformChatbot {
669
669
  /** Handler type */
670
670
  handlerType?: 'builtin' | 'external';
671
671
  }
672
+ interface PlatformKnowledgeSummary {
673
+ /** Studio knowledge MongoDB ID */
674
+ id: string;
675
+ /** Knowledge name */
676
+ name: string;
677
+ /** Optional description */
678
+ description?: string;
679
+ /** Knowledge type (e.g. 'text', 'database') */
680
+ type?: string;
681
+ /** Owning organization ID */
682
+ organizationId: string;
683
+ /** Timestamps */
684
+ createdAt?: number | string;
685
+ updatedAt?: number | string;
686
+ }
687
+ /**
688
+ * Full knowledge document (shape mirrors the underlying mongoose doc).
689
+ * Kept loose because the schema is large and varies by knowledge `type`;
690
+ * narrow types can be added incrementally as callers need them.
691
+ */
692
+ type PlatformKnowledge = PlatformKnowledgeSummary & Record<string, unknown>;
693
+ interface ListKnowledgeOptions {
694
+ /**
695
+ * Target organization to list knowledge from. If omitted, defaults to
696
+ * the org associated with the SDK token. Use this to read from a
697
+ * different org (e.g. a platform-operated shared library marked
698
+ * `publicReadable` in Studio).
699
+ */
700
+ orgId?: string;
701
+ }
672
702
  declare class PlatformError extends Error {
673
703
  status: number;
674
704
  constructor(message: string, status: number);
@@ -703,6 +733,27 @@ declare class PlatformClient {
703
733
  ok: boolean;
704
734
  modified: number;
705
735
  }>;
736
+ /**
737
+ * Knowledge / resource surface.
738
+ *
739
+ * Reads are allowed when the SDK token's org matches the target org,
740
+ * OR when the target org has `publicReadable: true` on the Studio side.
741
+ * Writes are not yet exposed here — those still go through the user-
742
+ * authenticated /api/knowledge routes from the Studio UI.
743
+ */
744
+ knowledge: {
745
+ /**
746
+ * List knowledge items for an organization.
747
+ * Defaults to the SDK token's own org if `orgId` is omitted.
748
+ */
749
+ list: (options?: ListKnowledgeOptions) => Promise<PlatformKnowledgeSummary[]>;
750
+ /**
751
+ * Fetch a single knowledge item by its Studio ID. The caller must
752
+ * have read access to the knowledge's owning org (same-org or
753
+ * publicReadable).
754
+ */
755
+ get: (id: string) => Promise<PlatformKnowledge>;
756
+ };
706
757
  }
707
758
  /**
708
759
  * Create a PlatformClient for calling back to FirstStep Studio.
@@ -773,4 +824,207 @@ declare function createAuthHeader(token: string): string;
773
824
  */
774
825
  declare function isValidToken(token: string): boolean;
775
826
 
776
- export { AgentTransitionPayload, ChatMessage, type ClassificationResult, type EmergencyPayload, HandoffOfferPayload, HandoffRequestPayload, HandoffReturnPayload, type HelplineCardItem, type HelplineCardPayload, MARKER_TYPES, type MarkerType, type PlatformChatbot, PlatformClient, type PlatformClientConfig, PlatformError, ProtocolStreamChunk, type ProviderCardItem, type ProviderCardPayload, type ReportCardPayload, type ResourceCardItem, type ResourceCardPayload, RoutingClassificationPayload, type SafetyPlanPayload, type SafetyPlanSection, SchemaDeclarationPayload, type UCPClassifyRequest, type UCPClassifyResponse, UCPClient, type UCPClientConfig, type UCPEndpointConfig, UCPError, type UCPErrorResponse, type UCPInfoResponse, type UCPMessage, classifyWithUCP, createAuthHeader, createPlatformClient, createRequestSignature, createUCPClient, isValidToken, renderMarkers, streamMetadata, verifyRequestSignature };
827
+ /**
828
+ * LLM Client
829
+ *
830
+ * SDK client for calling Studio's `/api/llm/*` proxy routes. Studio forwards
831
+ * the request body 1:1 to Google's Generative Language REST API, so the
832
+ * shapes here mirror Google's REST shape (NOT the @google/genai SDK shape).
833
+ *
834
+ * Reference: https://ai.google.dev/api/generate-content
835
+ *
836
+ * @example
837
+ * ```typescript
838
+ * import { createLLMClient } from '@firststep-studio/sdk';
839
+ *
840
+ * const llm = createLLMClient({
841
+ * studioUrl: 'https://studio-api.example.com',
842
+ * token: process.env.FIRSTSTEP_TOKEN!,
843
+ * });
844
+ *
845
+ * // Single-shot
846
+ * const res = await llm.generate({
847
+ * model: 'gemini-3-flash-preview',
848
+ * contents: [{ role: 'user', parts: [{ text: 'Hello' }] }],
849
+ * generationConfig: { temperature: 0.7, maxOutputTokens: 500 },
850
+ * });
851
+ * console.log(res.candidates[0].content.parts[0].text);
852
+ *
853
+ * // Streaming
854
+ * for await (const chunk of llm.generateStream({
855
+ * model: 'gemini-3-flash-preview',
856
+ * contents: [{ role: 'user', parts: [{ text: 'Count to 5' }] }],
857
+ * })) {
858
+ * process.stdout.write(chunk.candidates?.[0]?.content?.parts?.[0]?.text ?? '');
859
+ * }
860
+ *
861
+ * // Cache
862
+ * const cache = await llm.cache.create({
863
+ * model: 'models/gemini-2.5-flash',
864
+ * systemInstruction: { parts: [{ text: 'long system prompt...' }] },
865
+ * ttl: '3600s',
866
+ * });
867
+ * await llm.cache.get(cache.name);
868
+ * await llm.cache.delete(cache.name);
869
+ * ```
870
+ */
871
+ interface LLMClientConfig {
872
+ /** Studio backend API URL (e.g. https://studio-api.example.com) */
873
+ studioUrl: string;
874
+ /** API token (Bearer fst_<...>) */
875
+ token: string;
876
+ /** Request timeout in ms for non-streaming calls (default: 60000) */
877
+ timeout?: number;
878
+ }
879
+ interface LLMPart {
880
+ text?: string;
881
+ inlineData?: {
882
+ mimeType: string;
883
+ data: string;
884
+ };
885
+ [k: string]: unknown;
886
+ }
887
+ interface LLMContent {
888
+ role?: 'user' | 'model';
889
+ parts: LLMPart[];
890
+ }
891
+ interface LLMGenerationConfig {
892
+ temperature?: number;
893
+ maxOutputTokens?: number;
894
+ topP?: number;
895
+ topK?: number;
896
+ responseMimeType?: string;
897
+ responseSchema?: Record<string, unknown>;
898
+ thinkingConfig?: {
899
+ thinkingBudget?: number;
900
+ thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high';
901
+ includeThoughts?: boolean;
902
+ };
903
+ stopSequences?: string[];
904
+ [k: string]: unknown;
905
+ }
906
+ interface LLMSafetySetting {
907
+ category: string;
908
+ threshold: string;
909
+ }
910
+ /**
911
+ * Request body for /api/llm/generate and /api/llm/generate/stream.
912
+ * Mirrors Google's `:generateContent` REST request, plus `model` at the top level
913
+ * so Studio can build the URL path.
914
+ */
915
+ interface LLMGenerateRequest {
916
+ model: string;
917
+ contents: LLMContent[];
918
+ systemInstruction?: {
919
+ parts: LLMPart[];
920
+ };
921
+ generationConfig?: LLMGenerationConfig;
922
+ safetySettings?: LLMSafetySetting[];
923
+ /** Resource name of an explicit cache, e.g. "cachedContents/abc123" */
924
+ cachedContent?: string;
925
+ /** Function-calling tools (forwarded as-is) */
926
+ tools?: unknown[];
927
+ [k: string]: unknown;
928
+ }
929
+ interface LLMUsageMetadata {
930
+ promptTokenCount?: number;
931
+ candidatesTokenCount?: number;
932
+ cachedContentTokenCount?: number;
933
+ thoughtsTokenCount?: number;
934
+ totalTokenCount?: number;
935
+ [k: string]: unknown;
936
+ }
937
+ interface LLMCandidate {
938
+ content?: LLMContent;
939
+ finishReason?: string;
940
+ index?: number;
941
+ safetyRatings?: unknown[];
942
+ [k: string]: unknown;
943
+ }
944
+ interface LLMGenerateResponse {
945
+ candidates?: LLMCandidate[];
946
+ usageMetadata?: LLMUsageMetadata;
947
+ promptFeedback?: {
948
+ blockReason?: string;
949
+ [k: string]: unknown;
950
+ };
951
+ modelVersion?: string;
952
+ responseId?: string;
953
+ [k: string]: unknown;
954
+ }
955
+ interface LLMCacheCreateRequest {
956
+ model: string;
957
+ displayName?: string;
958
+ systemInstruction?: {
959
+ parts: LLMPart[];
960
+ };
961
+ contents?: LLMContent[];
962
+ /** Time-to-live, e.g. "3600s" */
963
+ ttl?: string;
964
+ [k: string]: unknown;
965
+ }
966
+ interface LLMCachedContent {
967
+ name: string;
968
+ model: string;
969
+ createTime?: string;
970
+ updateTime?: string;
971
+ expireTime?: string;
972
+ displayName?: string;
973
+ usageMetadata?: {
974
+ totalTokenCount?: number;
975
+ };
976
+ [k: string]: unknown;
977
+ }
978
+ declare class LLMError extends Error {
979
+ status: number;
980
+ body: unknown;
981
+ constructor(message: string, status: number, body: unknown);
982
+ }
983
+ declare class LLMClient {
984
+ private studioUrl;
985
+ private token;
986
+ private timeout;
987
+ constructor(config: LLMClientConfig);
988
+ private headers;
989
+ /**
990
+ * Single-shot generation. Body is forwarded to Google's :generateContent
991
+ * unchanged. Response is Google's response shape unchanged.
992
+ */
993
+ generate(req: LLMGenerateRequest): Promise<LLMGenerateResponse>;
994
+ /**
995
+ * Streaming generation as an AsyncGenerator of partial responses.
996
+ * Each yielded chunk has the same shape as a non-streaming response (a
997
+ * `candidates[]` slice with the next text fragment, plus usageMetadata
998
+ * on the final chunk).
999
+ *
1000
+ * Note: timeout option is not enforced for streams; consumer should
1001
+ * abort externally if needed.
1002
+ */
1003
+ generateStream(req: LLMGenerateRequest): AsyncGenerator<LLMGenerateResponse>;
1004
+ /**
1005
+ * Explicit prompt cache surface. Maps to Google's `/cachedContents` REST API.
1006
+ */
1007
+ cache: {
1008
+ /**
1009
+ * Create an explicit cache. Returns the resource (use `cache.name` as the
1010
+ * `cachedContent` field on a future generate() request).
1011
+ */
1012
+ create: (req: LLMCacheCreateRequest) => Promise<LLMCachedContent>;
1013
+ /**
1014
+ * Fetch a cache by resource name (e.g. "cachedContents/abc123").
1015
+ * Returns null when the cache is not found (404), which is the common
1016
+ * "expired" signal — callers can simply recreate.
1017
+ */
1018
+ get: (name: string) => Promise<LLMCachedContent | null>;
1019
+ /**
1020
+ * Delete a cache by resource name. Idempotent: 404 is treated as success.
1021
+ */
1022
+ delete: (name: string) => Promise<void>;
1023
+ };
1024
+ }
1025
+ /**
1026
+ * Create an LLMClient that talks to Studio's /api/llm/* proxy routes.
1027
+ */
1028
+ declare function createLLMClient(config: LLMClientConfig): LLMClient;
1029
+
1030
+ export { AgentTransitionPayload, ChatMessage, type ClassificationResult, type EmergencyPayload, HandoffOfferPayload, HandoffRequestPayload, HandoffReturnPayload, type HelplineCardItem, type HelplineCardPayload, type LLMCacheCreateRequest, type LLMCachedContent, type LLMCandidate, LLMClient, type LLMClientConfig, type LLMContent, LLMError, type LLMGenerateRequest, type LLMGenerateResponse, type LLMGenerationConfig, type LLMPart, type LLMSafetySetting, type LLMUsageMetadata, type ListKnowledgeOptions, MARKER_TYPES, type MarkerType, type PlatformChatbot, PlatformClient, type PlatformClientConfig, PlatformError, type PlatformKnowledge, type PlatformKnowledgeSummary, ProtocolStreamChunk, type ProviderCardItem, type ProviderCardPayload, type ReportCardPayload, type ResourceCardItem, type ResourceCardPayload, RoutingClassificationPayload, type SafetyPlanPayload, type SafetyPlanSection, SchemaDeclarationPayload, type UCPClassifyRequest, type UCPClassifyResponse, UCPClient, type UCPClientConfig, type UCPEndpointConfig, UCPError, type UCPErrorResponse, type UCPInfoResponse, type UCPMessage, classifyWithUCP, createAuthHeader, createLLMClient, createPlatformClient, createRequestSignature, createUCPClient, isValidToken, renderMarkers, streamMetadata, verifyRequestSignature };