@redplanethq/sdk 0.1.19 → 0.1.21

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
@@ -54,6 +54,68 @@ declare const LLMModelType: {
54
54
  };
55
55
  type LLMModelType = (typeof LLMModelType)[keyof typeof LLMModelType];
56
56
 
57
+ /**
58
+ * Unified LLM provider catalog. Single source of truth shared across:
59
+ * - Webapp env validator (apps/webapp/app/env.server.ts) → CHAT_PROVIDERS
60
+ * - Webapp BYOK service (services/byok.server.ts) → BYOK_PROVIDERS
61
+ * - Webapp BYOK API route (routes/api.v1.byok.tsx) → BYOK_PROVIDERS
62
+ * - Webapp BYOK UI (routes/settings.workspace.models.tsx) → BYOK_PROVIDER_SPECS
63
+ * - CLI self-host wizard (packages/cli/src/utils/setup/local.ts)
64
+ *
65
+ * Add a provider here, every surface picks it up.
66
+ */
67
+ interface ProviderBaseUrl {
68
+ /** Env var name (e.g. "OPENAI_BASE_URL"). */
69
+ var: string;
70
+ /** Whether the user MUST supply a value (true for azure/ollama, false for openai's optional proxy). */
71
+ required: boolean;
72
+ /** Placeholder shown in the wizard / settings form. */
73
+ placeholder: string;
74
+ /** Short hint shown alongside the input. */
75
+ hint?: string;
76
+ }
77
+ interface ProviderSpec {
78
+ /** Stable string id (matches CHAT_PROVIDER env value, BYOK provider type). */
79
+ id: string;
80
+ /** Human-readable label. */
81
+ label: string;
82
+ /** Eligible as a server-level CHAT_PROVIDER env value. */
83
+ serverDefault: boolean;
84
+ /** Eligible to be configured as a per-workspace BYOK key. */
85
+ byokSupported: boolean;
86
+ /** Env var holding the API key, or null when the provider doesn't use one (ollama). */
87
+ apiKeyVar: string | null;
88
+ /** Placeholder string for the API key field (e.g. "sk-...", "sk-ant-..."). */
89
+ apiKeyPlaceholder: string;
90
+ /** Optional/required base URL (openai proxy, azure endpoint, ollama URL). */
91
+ baseUrl?: ProviderBaseUrl;
92
+ /** Marks the provider as Azure-style (special UI handling for endpoint+key forms). */
93
+ isAzure?: boolean;
94
+ /** Default chat model the wizard suggests. */
95
+ defaultChatModel: string;
96
+ /** Optional hint displayed near the model input (e.g. routing prefix conventions). */
97
+ modelHint?: string;
98
+ }
99
+ declare const PROVIDER_SPECS: Record<string, ProviderSpec>;
100
+ declare const ALL_PROVIDERS: string[];
101
+ /** Providers eligible as a server-level CHAT_PROVIDER env value. */
102
+ declare const CHAT_PROVIDERS: readonly [string, ...string[]];
103
+ /** Providers eligible as a per-workspace BYOK key. */
104
+ declare const BYOK_PROVIDERS: readonly [string, ...string[]];
105
+ /** Providers that can also be used as embeddings backends. */
106
+ declare const EMBEDDING_PROVIDERS: readonly ["openai", "google", "ollama", "azure"];
107
+ type ChatProvider = (typeof CHAT_PROVIDERS)[number];
108
+ type BYOKProvider = (typeof BYOK_PROVIDERS)[number];
109
+ type EmbeddingProvider = (typeof EMBEDDING_PROVIDERS)[number];
110
+ declare function isSupportedProvider(id: string): boolean;
111
+ declare function isByokProvider(id: string): boolean;
112
+ declare function isChatProvider(id: string): boolean;
113
+ /**
114
+ * Convenience accessor: returns the spec for an id, throwing on unknowns.
115
+ * Use the boolean guards above for validation paths.
116
+ */
117
+ declare function getProviderSpec(id: string): ProviderSpec;
118
+
57
119
  /**
58
120
  * Interface for document node in the reified knowledge graph
59
121
  * Documents are parent containers for episodic chunks
@@ -385,6 +447,20 @@ declare class McpAuthParams {
385
447
  server_url: string;
386
448
  }
387
449
 
450
+ /** A single config field declared by a widget */
451
+ interface WidgetConfigField {
452
+ key: string;
453
+ label: string;
454
+ type: 'input' | 'select';
455
+ placeholder?: string;
456
+ required?: boolean;
457
+ /** Options for select fields only */
458
+ options?: Array<{
459
+ label: string;
460
+ value: string;
461
+ }>;
462
+ default?: string;
463
+ }
388
464
  interface WidgetRenderContext {
389
465
  placement: 'tui' | 'webapp';
390
466
  pat: string;
@@ -394,6 +470,8 @@ interface WidgetRenderContext {
394
470
  name?: string;
395
471
  }>;
396
472
  baseUrl: string;
473
+ /** Config values supplied by the agent or by the user via the config form */
474
+ config?: Record<string, string>;
397
475
  /** Call to trigger a TUI re-render after updating internal state (TUI only) */
398
476
  requestRender?: () => void;
399
477
  }
@@ -404,6 +482,8 @@ interface WidgetMeta {
404
482
  description: string;
405
483
  support: Array<'tui' | 'webapp'>;
406
484
  tuiPlacement?: 'overview' | 'below-input';
485
+ /** Declares config fields the widget accepts; drives the config form when agent omits them */
486
+ configSchema?: WidgetConfigField[];
407
487
  }
408
488
  /**
409
489
  * A zero-argument React function component (webapp placement).
@@ -1115,10 +1195,61 @@ declare const GetDocumentResponseSchema: z.ZodObject<{
1115
1195
  };
1116
1196
  }>;
1117
1197
  type GetDocumentResponse = z.infer<typeof GetDocumentResponseSchema>;
1198
+ declare const GetSkillInputSchema: z.ZodObject<{
1199
+ skillId: z.ZodString;
1200
+ }, "strip", z.ZodTypeAny, {
1201
+ skillId?: string;
1202
+ }, {
1203
+ skillId?: string;
1204
+ }>;
1205
+ type GetSkillInput = z.infer<typeof GetSkillInputSchema>;
1206
+ declare const GetSkillResponseSchema: z.ZodObject<{
1207
+ skill: z.ZodNullable<z.ZodObject<{
1208
+ id: z.ZodString;
1209
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1210
+ createdAt: z.ZodOptional<z.ZodString>;
1211
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1212
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1213
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1214
+ id: z.ZodString;
1215
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1216
+ createdAt: z.ZodOptional<z.ZodString>;
1217
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1218
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1219
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1220
+ id: z.ZodString;
1221
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1222
+ createdAt: z.ZodOptional<z.ZodString>;
1223
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1224
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1225
+ }, z.ZodTypeAny, "passthrough">>>;
1226
+ }, "strip", z.ZodTypeAny, {
1227
+ skill?: {
1228
+ source?: string;
1229
+ sessionId?: string;
1230
+ title?: string;
1231
+ id?: string;
1232
+ createdAt?: string;
1233
+ } & {
1234
+ [k: string]: unknown;
1235
+ };
1236
+ }, {
1237
+ skill?: {
1238
+ source?: string;
1239
+ sessionId?: string;
1240
+ title?: string;
1241
+ id?: string;
1242
+ createdAt?: string;
1243
+ } & {
1244
+ [k: string]: unknown;
1245
+ };
1246
+ }>;
1247
+ type GetSkillResponse = z.infer<typeof GetSkillResponseSchema>;
1118
1248
  declare const GatewayAgentInfoSchema: z.ZodObject<{
1119
1249
  id: z.ZodString;
1120
1250
  name: z.ZodString;
1121
1251
  description: z.ZodString;
1252
+ baseUrl: z.ZodString;
1122
1253
  tools: z.ZodArray<z.ZodString, "many">;
1123
1254
  platform: z.ZodNullable<z.ZodString>;
1124
1255
  hostname: z.ZodNullable<z.ZodString>;
@@ -1129,6 +1260,7 @@ declare const GatewayAgentInfoSchema: z.ZodObject<{
1129
1260
  id?: string;
1130
1261
  name?: string;
1131
1262
  description?: string;
1263
+ baseUrl?: string;
1132
1264
  platform?: string;
1133
1265
  hostname?: string;
1134
1266
  }, {
@@ -1137,15 +1269,45 @@ declare const GatewayAgentInfoSchema: z.ZodObject<{
1137
1269
  id?: string;
1138
1270
  name?: string;
1139
1271
  description?: string;
1272
+ baseUrl?: string;
1140
1273
  platform?: string;
1141
1274
  hostname?: string;
1142
1275
  }>;
1276
+ declare const RegisterGatewayRequestSchema: z.ZodObject<{
1277
+ intent: z.ZodLiteral<"register">;
1278
+ baseUrl: z.ZodString;
1279
+ securityKey: z.ZodString;
1280
+ name: z.ZodOptional<z.ZodString>;
1281
+ description: z.ZodOptional<z.ZodString>;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ name?: string;
1284
+ description?: string;
1285
+ baseUrl?: string;
1286
+ intent?: "register";
1287
+ securityKey?: string;
1288
+ }, {
1289
+ name?: string;
1290
+ description?: string;
1291
+ baseUrl?: string;
1292
+ intent?: "register";
1293
+ securityKey?: string;
1294
+ }>;
1295
+ type RegisterGatewayRequest = z.infer<typeof RegisterGatewayRequestSchema>;
1296
+ declare const RegisterGatewayResponseSchema: z.ZodObject<{
1297
+ gatewayId: z.ZodString;
1298
+ }, "strip", z.ZodTypeAny, {
1299
+ gatewayId?: string;
1300
+ }, {
1301
+ gatewayId?: string;
1302
+ }>;
1303
+ type RegisterGatewayResponse = z.infer<typeof RegisterGatewayResponseSchema>;
1143
1304
  type GatewayAgentInfo = z.infer<typeof GatewayAgentInfoSchema>;
1144
1305
  declare const GetGatewaysResponseSchema: z.ZodObject<{
1145
1306
  gateways: z.ZodArray<z.ZodObject<{
1146
1307
  id: z.ZodString;
1147
1308
  name: z.ZodString;
1148
1309
  description: z.ZodString;
1310
+ baseUrl: z.ZodString;
1149
1311
  tools: z.ZodArray<z.ZodString, "many">;
1150
1312
  platform: z.ZodNullable<z.ZodString>;
1151
1313
  hostname: z.ZodNullable<z.ZodString>;
@@ -1156,6 +1318,7 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1156
1318
  id?: string;
1157
1319
  name?: string;
1158
1320
  description?: string;
1321
+ baseUrl?: string;
1159
1322
  platform?: string;
1160
1323
  hostname?: string;
1161
1324
  }, {
@@ -1164,6 +1327,7 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1164
1327
  id?: string;
1165
1328
  name?: string;
1166
1329
  description?: string;
1330
+ baseUrl?: string;
1167
1331
  platform?: string;
1168
1332
  hostname?: string;
1169
1333
  }>, "many">;
@@ -1174,6 +1338,7 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1174
1338
  id?: string;
1175
1339
  name?: string;
1176
1340
  description?: string;
1341
+ baseUrl?: string;
1177
1342
  platform?: string;
1178
1343
  hostname?: string;
1179
1344
  }[];
@@ -1184,44 +1349,12 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1184
1349
  id?: string;
1185
1350
  name?: string;
1186
1351
  description?: string;
1352
+ baseUrl?: string;
1187
1353
  platform?: string;
1188
1354
  hostname?: string;
1189
1355
  }[];
1190
1356
  }>;
1191
1357
  type GetGatewaysResponse = z.infer<typeof GetGatewaysResponseSchema>;
1192
- declare const ExecuteGatewayInputSchema: z.ZodObject<{
1193
- gatewayId: z.ZodString;
1194
- intent: z.ZodString;
1195
- }, "strip", z.ZodTypeAny, {
1196
- gatewayId?: string;
1197
- intent?: string;
1198
- }, {
1199
- gatewayId?: string;
1200
- intent?: string;
1201
- }>;
1202
- type ExecuteGatewayInput = z.infer<typeof ExecuteGatewayInputSchema>;
1203
- declare const ExecuteGatewayToolInputSchema: z.ZodObject<{
1204
- gatewayId: z.ZodString;
1205
- toolName: z.ZodString;
1206
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1207
- }, "strip", z.ZodTypeAny, {
1208
- params?: Record<string, unknown>;
1209
- gatewayId?: string;
1210
- toolName?: string;
1211
- }, {
1212
- params?: Record<string, unknown>;
1213
- gatewayId?: string;
1214
- toolName?: string;
1215
- }>;
1216
- type ExecuteGatewayToolInput = z.infer<typeof ExecuteGatewayToolInputSchema>;
1217
- declare const ExecuteGatewayResponseSchema: z.ZodObject<{
1218
- result: z.ZodUnknown;
1219
- }, "strip", z.ZodTypeAny, {
1220
- result?: unknown;
1221
- }, {
1222
- result?: unknown;
1223
- }>;
1224
- type ExecuteGatewayResponse = z.infer<typeof ExecuteGatewayResponseSchema>;
1225
1358
  declare const AuthorizationCodeResponseSchema: z.ZodObject<{
1226
1359
  authorizationCode: z.ZodString;
1227
1360
  url: z.ZodString;
@@ -1288,12 +1421,12 @@ declare class CoreClient {
1288
1421
  getSessionId(): Promise<string>;
1289
1422
  getDocuments(params?: GetDocumentsInput): Promise<GetDocumentsResponse>;
1290
1423
  getDocument(params: GetDocumentInput): Promise<GetDocumentResponse>;
1424
+ getSkill(params: GetSkillInput): Promise<GetSkillResponse>;
1291
1425
  getGateways(): Promise<GetGatewaysResponse>;
1292
- executeGateway(params: ExecuteGatewayInput): Promise<ExecuteGatewayResponse>;
1293
- executeGatewayTool(params: ExecuteGatewayToolInput): Promise<ExecuteGatewayResponse>;
1426
+ registerGateway(input: Omit<RegisterGatewayRequest, "intent">): Promise<RegisterGatewayResponse>;
1294
1427
  getAuthorizationCode(): Promise<AuthorizationCodeResponse>;
1295
1428
  exchangeToken(params: TokenExchangeInput): Promise<TokenExchangeResponse>;
1296
1429
  checkAuth(): Promise<MeResponse>;
1297
1430
  }
1298
1431
 
1299
- export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
1432
+ export { ALL_PROVIDERS, APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, type BYOKProvider, BYOK_PROVIDERS, CHAT_PROVIDERS, COMPACTED_SESSION_NODE_PROPERTIES, type ChatProvider, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, EMBEDDING_PROVIDERS, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EmbeddingProvider, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GetSkillInput, GetSkillInputSchema, type GetSkillResponse, GetSkillResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, PROVIDER_SPECS, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, type ProviderBaseUrl, type ProviderSpec, QUALITY_THRESHOLDS, type QualityFilterResult, type RegisterGatewayRequest, RegisterGatewayRequestSchema, type RegisterGatewayResponse, RegisterGatewayResponseSchema, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetConfigField, type WidgetMeta, type WidgetRenderContext, type WidgetSpec, getProviderSpec, isByokProvider, isChatProvider, isSupportedProvider };
package/dist/index.d.ts CHANGED
@@ -54,6 +54,68 @@ declare const LLMModelType: {
54
54
  };
55
55
  type LLMModelType = (typeof LLMModelType)[keyof typeof LLMModelType];
56
56
 
57
+ /**
58
+ * Unified LLM provider catalog. Single source of truth shared across:
59
+ * - Webapp env validator (apps/webapp/app/env.server.ts) → CHAT_PROVIDERS
60
+ * - Webapp BYOK service (services/byok.server.ts) → BYOK_PROVIDERS
61
+ * - Webapp BYOK API route (routes/api.v1.byok.tsx) → BYOK_PROVIDERS
62
+ * - Webapp BYOK UI (routes/settings.workspace.models.tsx) → BYOK_PROVIDER_SPECS
63
+ * - CLI self-host wizard (packages/cli/src/utils/setup/local.ts)
64
+ *
65
+ * Add a provider here, every surface picks it up.
66
+ */
67
+ interface ProviderBaseUrl {
68
+ /** Env var name (e.g. "OPENAI_BASE_URL"). */
69
+ var: string;
70
+ /** Whether the user MUST supply a value (true for azure/ollama, false for openai's optional proxy). */
71
+ required: boolean;
72
+ /** Placeholder shown in the wizard / settings form. */
73
+ placeholder: string;
74
+ /** Short hint shown alongside the input. */
75
+ hint?: string;
76
+ }
77
+ interface ProviderSpec {
78
+ /** Stable string id (matches CHAT_PROVIDER env value, BYOK provider type). */
79
+ id: string;
80
+ /** Human-readable label. */
81
+ label: string;
82
+ /** Eligible as a server-level CHAT_PROVIDER env value. */
83
+ serverDefault: boolean;
84
+ /** Eligible to be configured as a per-workspace BYOK key. */
85
+ byokSupported: boolean;
86
+ /** Env var holding the API key, or null when the provider doesn't use one (ollama). */
87
+ apiKeyVar: string | null;
88
+ /** Placeholder string for the API key field (e.g. "sk-...", "sk-ant-..."). */
89
+ apiKeyPlaceholder: string;
90
+ /** Optional/required base URL (openai proxy, azure endpoint, ollama URL). */
91
+ baseUrl?: ProviderBaseUrl;
92
+ /** Marks the provider as Azure-style (special UI handling for endpoint+key forms). */
93
+ isAzure?: boolean;
94
+ /** Default chat model the wizard suggests. */
95
+ defaultChatModel: string;
96
+ /** Optional hint displayed near the model input (e.g. routing prefix conventions). */
97
+ modelHint?: string;
98
+ }
99
+ declare const PROVIDER_SPECS: Record<string, ProviderSpec>;
100
+ declare const ALL_PROVIDERS: string[];
101
+ /** Providers eligible as a server-level CHAT_PROVIDER env value. */
102
+ declare const CHAT_PROVIDERS: readonly [string, ...string[]];
103
+ /** Providers eligible as a per-workspace BYOK key. */
104
+ declare const BYOK_PROVIDERS: readonly [string, ...string[]];
105
+ /** Providers that can also be used as embeddings backends. */
106
+ declare const EMBEDDING_PROVIDERS: readonly ["openai", "google", "ollama", "azure"];
107
+ type ChatProvider = (typeof CHAT_PROVIDERS)[number];
108
+ type BYOKProvider = (typeof BYOK_PROVIDERS)[number];
109
+ type EmbeddingProvider = (typeof EMBEDDING_PROVIDERS)[number];
110
+ declare function isSupportedProvider(id: string): boolean;
111
+ declare function isByokProvider(id: string): boolean;
112
+ declare function isChatProvider(id: string): boolean;
113
+ /**
114
+ * Convenience accessor: returns the spec for an id, throwing on unknowns.
115
+ * Use the boolean guards above for validation paths.
116
+ */
117
+ declare function getProviderSpec(id: string): ProviderSpec;
118
+
57
119
  /**
58
120
  * Interface for document node in the reified knowledge graph
59
121
  * Documents are parent containers for episodic chunks
@@ -385,6 +447,20 @@ declare class McpAuthParams {
385
447
  server_url: string;
386
448
  }
387
449
 
450
+ /** A single config field declared by a widget */
451
+ interface WidgetConfigField {
452
+ key: string;
453
+ label: string;
454
+ type: 'input' | 'select';
455
+ placeholder?: string;
456
+ required?: boolean;
457
+ /** Options for select fields only */
458
+ options?: Array<{
459
+ label: string;
460
+ value: string;
461
+ }>;
462
+ default?: string;
463
+ }
388
464
  interface WidgetRenderContext {
389
465
  placement: 'tui' | 'webapp';
390
466
  pat: string;
@@ -394,6 +470,8 @@ interface WidgetRenderContext {
394
470
  name?: string;
395
471
  }>;
396
472
  baseUrl: string;
473
+ /** Config values supplied by the agent or by the user via the config form */
474
+ config?: Record<string, string>;
397
475
  /** Call to trigger a TUI re-render after updating internal state (TUI only) */
398
476
  requestRender?: () => void;
399
477
  }
@@ -404,6 +482,8 @@ interface WidgetMeta {
404
482
  description: string;
405
483
  support: Array<'tui' | 'webapp'>;
406
484
  tuiPlacement?: 'overview' | 'below-input';
485
+ /** Declares config fields the widget accepts; drives the config form when agent omits them */
486
+ configSchema?: WidgetConfigField[];
407
487
  }
408
488
  /**
409
489
  * A zero-argument React function component (webapp placement).
@@ -1115,10 +1195,61 @@ declare const GetDocumentResponseSchema: z.ZodObject<{
1115
1195
  };
1116
1196
  }>;
1117
1197
  type GetDocumentResponse = z.infer<typeof GetDocumentResponseSchema>;
1198
+ declare const GetSkillInputSchema: z.ZodObject<{
1199
+ skillId: z.ZodString;
1200
+ }, "strip", z.ZodTypeAny, {
1201
+ skillId?: string;
1202
+ }, {
1203
+ skillId?: string;
1204
+ }>;
1205
+ type GetSkillInput = z.infer<typeof GetSkillInputSchema>;
1206
+ declare const GetSkillResponseSchema: z.ZodObject<{
1207
+ skill: z.ZodNullable<z.ZodObject<{
1208
+ id: z.ZodString;
1209
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1210
+ createdAt: z.ZodOptional<z.ZodString>;
1211
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1212
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1213
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1214
+ id: z.ZodString;
1215
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1216
+ createdAt: z.ZodOptional<z.ZodString>;
1217
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1218
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1219
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1220
+ id: z.ZodString;
1221
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1222
+ createdAt: z.ZodOptional<z.ZodString>;
1223
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1224
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1225
+ }, z.ZodTypeAny, "passthrough">>>;
1226
+ }, "strip", z.ZodTypeAny, {
1227
+ skill?: {
1228
+ source?: string;
1229
+ sessionId?: string;
1230
+ title?: string;
1231
+ id?: string;
1232
+ createdAt?: string;
1233
+ } & {
1234
+ [k: string]: unknown;
1235
+ };
1236
+ }, {
1237
+ skill?: {
1238
+ source?: string;
1239
+ sessionId?: string;
1240
+ title?: string;
1241
+ id?: string;
1242
+ createdAt?: string;
1243
+ } & {
1244
+ [k: string]: unknown;
1245
+ };
1246
+ }>;
1247
+ type GetSkillResponse = z.infer<typeof GetSkillResponseSchema>;
1118
1248
  declare const GatewayAgentInfoSchema: z.ZodObject<{
1119
1249
  id: z.ZodString;
1120
1250
  name: z.ZodString;
1121
1251
  description: z.ZodString;
1252
+ baseUrl: z.ZodString;
1122
1253
  tools: z.ZodArray<z.ZodString, "many">;
1123
1254
  platform: z.ZodNullable<z.ZodString>;
1124
1255
  hostname: z.ZodNullable<z.ZodString>;
@@ -1129,6 +1260,7 @@ declare const GatewayAgentInfoSchema: z.ZodObject<{
1129
1260
  id?: string;
1130
1261
  name?: string;
1131
1262
  description?: string;
1263
+ baseUrl?: string;
1132
1264
  platform?: string;
1133
1265
  hostname?: string;
1134
1266
  }, {
@@ -1137,15 +1269,45 @@ declare const GatewayAgentInfoSchema: z.ZodObject<{
1137
1269
  id?: string;
1138
1270
  name?: string;
1139
1271
  description?: string;
1272
+ baseUrl?: string;
1140
1273
  platform?: string;
1141
1274
  hostname?: string;
1142
1275
  }>;
1276
+ declare const RegisterGatewayRequestSchema: z.ZodObject<{
1277
+ intent: z.ZodLiteral<"register">;
1278
+ baseUrl: z.ZodString;
1279
+ securityKey: z.ZodString;
1280
+ name: z.ZodOptional<z.ZodString>;
1281
+ description: z.ZodOptional<z.ZodString>;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ name?: string;
1284
+ description?: string;
1285
+ baseUrl?: string;
1286
+ intent?: "register";
1287
+ securityKey?: string;
1288
+ }, {
1289
+ name?: string;
1290
+ description?: string;
1291
+ baseUrl?: string;
1292
+ intent?: "register";
1293
+ securityKey?: string;
1294
+ }>;
1295
+ type RegisterGatewayRequest = z.infer<typeof RegisterGatewayRequestSchema>;
1296
+ declare const RegisterGatewayResponseSchema: z.ZodObject<{
1297
+ gatewayId: z.ZodString;
1298
+ }, "strip", z.ZodTypeAny, {
1299
+ gatewayId?: string;
1300
+ }, {
1301
+ gatewayId?: string;
1302
+ }>;
1303
+ type RegisterGatewayResponse = z.infer<typeof RegisterGatewayResponseSchema>;
1143
1304
  type GatewayAgentInfo = z.infer<typeof GatewayAgentInfoSchema>;
1144
1305
  declare const GetGatewaysResponseSchema: z.ZodObject<{
1145
1306
  gateways: z.ZodArray<z.ZodObject<{
1146
1307
  id: z.ZodString;
1147
1308
  name: z.ZodString;
1148
1309
  description: z.ZodString;
1310
+ baseUrl: z.ZodString;
1149
1311
  tools: z.ZodArray<z.ZodString, "many">;
1150
1312
  platform: z.ZodNullable<z.ZodString>;
1151
1313
  hostname: z.ZodNullable<z.ZodString>;
@@ -1156,6 +1318,7 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1156
1318
  id?: string;
1157
1319
  name?: string;
1158
1320
  description?: string;
1321
+ baseUrl?: string;
1159
1322
  platform?: string;
1160
1323
  hostname?: string;
1161
1324
  }, {
@@ -1164,6 +1327,7 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1164
1327
  id?: string;
1165
1328
  name?: string;
1166
1329
  description?: string;
1330
+ baseUrl?: string;
1167
1331
  platform?: string;
1168
1332
  hostname?: string;
1169
1333
  }>, "many">;
@@ -1174,6 +1338,7 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1174
1338
  id?: string;
1175
1339
  name?: string;
1176
1340
  description?: string;
1341
+ baseUrl?: string;
1177
1342
  platform?: string;
1178
1343
  hostname?: string;
1179
1344
  }[];
@@ -1184,44 +1349,12 @@ declare const GetGatewaysResponseSchema: z.ZodObject<{
1184
1349
  id?: string;
1185
1350
  name?: string;
1186
1351
  description?: string;
1352
+ baseUrl?: string;
1187
1353
  platform?: string;
1188
1354
  hostname?: string;
1189
1355
  }[];
1190
1356
  }>;
1191
1357
  type GetGatewaysResponse = z.infer<typeof GetGatewaysResponseSchema>;
1192
- declare const ExecuteGatewayInputSchema: z.ZodObject<{
1193
- gatewayId: z.ZodString;
1194
- intent: z.ZodString;
1195
- }, "strip", z.ZodTypeAny, {
1196
- gatewayId?: string;
1197
- intent?: string;
1198
- }, {
1199
- gatewayId?: string;
1200
- intent?: string;
1201
- }>;
1202
- type ExecuteGatewayInput = z.infer<typeof ExecuteGatewayInputSchema>;
1203
- declare const ExecuteGatewayToolInputSchema: z.ZodObject<{
1204
- gatewayId: z.ZodString;
1205
- toolName: z.ZodString;
1206
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1207
- }, "strip", z.ZodTypeAny, {
1208
- params?: Record<string, unknown>;
1209
- gatewayId?: string;
1210
- toolName?: string;
1211
- }, {
1212
- params?: Record<string, unknown>;
1213
- gatewayId?: string;
1214
- toolName?: string;
1215
- }>;
1216
- type ExecuteGatewayToolInput = z.infer<typeof ExecuteGatewayToolInputSchema>;
1217
- declare const ExecuteGatewayResponseSchema: z.ZodObject<{
1218
- result: z.ZodUnknown;
1219
- }, "strip", z.ZodTypeAny, {
1220
- result?: unknown;
1221
- }, {
1222
- result?: unknown;
1223
- }>;
1224
- type ExecuteGatewayResponse = z.infer<typeof ExecuteGatewayResponseSchema>;
1225
1358
  declare const AuthorizationCodeResponseSchema: z.ZodObject<{
1226
1359
  authorizationCode: z.ZodString;
1227
1360
  url: z.ZodString;
@@ -1288,12 +1421,12 @@ declare class CoreClient {
1288
1421
  getSessionId(): Promise<string>;
1289
1422
  getDocuments(params?: GetDocumentsInput): Promise<GetDocumentsResponse>;
1290
1423
  getDocument(params: GetDocumentInput): Promise<GetDocumentResponse>;
1424
+ getSkill(params: GetSkillInput): Promise<GetSkillResponse>;
1291
1425
  getGateways(): Promise<GetGatewaysResponse>;
1292
- executeGateway(params: ExecuteGatewayInput): Promise<ExecuteGatewayResponse>;
1293
- executeGatewayTool(params: ExecuteGatewayToolInput): Promise<ExecuteGatewayResponse>;
1426
+ registerGateway(input: Omit<RegisterGatewayRequest, "intent">): Promise<RegisterGatewayResponse>;
1294
1427
  getAuthorizationCode(): Promise<AuthorizationCodeResponse>;
1295
1428
  exchangeToken(params: TokenExchangeInput): Promise<TokenExchangeResponse>;
1296
1429
  checkAuth(): Promise<MeResponse>;
1297
1430
  }
1298
1431
 
1299
- export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
1432
+ export { ALL_PROVIDERS, APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, type BYOKProvider, BYOK_PROVIDERS, CHAT_PROVIDERS, COMPACTED_SESSION_NODE_PROPERTIES, type ChatProvider, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, EMBEDDING_PROVIDERS, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EmbeddingProvider, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type FrontendExport, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GetSkillInput, GetSkillInputSchema, type GetSkillResponse, GetSkillResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, PROVIDER_SPECS, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, type ProviderBaseUrl, type ProviderSpec, QUALITY_THRESHOLDS, type QualityFilterResult, type RegisterGatewayRequest, RegisterGatewayRequestSchema, type RegisterGatewayResponse, RegisterGatewayResponseSchema, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type ToolContent, type ToolInput, type ToolInputPrimitive, type ToolInputValue, type ToolResult, type ToolUI, type ToolUIComponent, type ToolUIRenderContext, type Triple, type TuiToolUIComponent, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebToolUIComponent, type WebWidgetComponent, type WidgetComponent, type WidgetConfigField, type WidgetMeta, type WidgetRenderContext, type WidgetSpec, getProviderSpec, isByokProvider, isChatProvider, isSupportedProvider };