@frankieai/core 0.1.0 → 0.1.2

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
@@ -45,8 +45,42 @@ declare const modelConfigSchema: z.ZodObject<{
45
45
  }>>;
46
46
  streamReasoning: z.ZodDefault<z.ZodBoolean>;
47
47
  }, z.core.$strip>;
48
+ /** One selectable model in the (optional) end-user model picker. */
49
+ declare const modelChoiceSchema: z.ZodObject<{
50
+ id: z.ZodString;
51
+ label: z.ZodString;
52
+ provider: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ /**
55
+ * Optional, opt-in chat capabilities the SDK consumer turns on per workspace.
56
+ * Everything here is OFF by default: an embedded agent only gets a wider surface
57
+ * when the customer deliberately enables it.
58
+ */
59
+ declare const featuresConfigSchema: z.ZodPrefault<z.ZodObject<{
60
+ attachments: z.ZodPrefault<z.ZodObject<{
61
+ enabled: z.ZodDefault<z.ZodBoolean>;
62
+ accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
63
+ maxMb: z.ZodDefault<z.ZodNumber>;
64
+ maxCount: z.ZodDefault<z.ZodNumber>;
65
+ }, z.core.$strip>>;
66
+ modelPicker: z.ZodPrefault<z.ZodObject<{
67
+ enabled: z.ZodDefault<z.ZodBoolean>;
68
+ models: z.ZodDefault<z.ZodArray<z.ZodObject<{
69
+ id: z.ZodString;
70
+ label: z.ZodString;
71
+ provider: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strip>>>;
73
+ }, z.core.$strip>>;
74
+ workspaceAdmin: z.ZodDefault<z.ZodBoolean>;
75
+ }, z.core.$strip>>;
48
76
  declare const mcpServerSchema: z.ZodObject<{
49
77
  name: z.ZodString;
78
+ enabled: z.ZodDefault<z.ZodBoolean>;
79
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
80
+ discoveredTools: z.ZodDefault<z.ZodArray<z.ZodObject<{
81
+ name: z.ZodString;
82
+ description: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>>>;
50
84
  transport: z.ZodDefault<z.ZodEnum<{
51
85
  http: "http";
52
86
  sse: "sse";
@@ -62,6 +96,18 @@ declare const mcpServerSchema: z.ZodObject<{
62
96
  * This is the "no MCP server to write" path: point Frankie at a spec, name the
63
97
  * operations the agent may use, and it builds the tools at startup.
64
98
  */
99
+ declare const apiCapabilitySchema: z.ZodObject<{
100
+ operationId: z.ZodString;
101
+ method: z.ZodEnum<{
102
+ GET: "GET";
103
+ POST: "POST";
104
+ PUT: "PUT";
105
+ PATCH: "PATCH";
106
+ DELETE: "DELETE";
107
+ }>;
108
+ path: z.ZodString;
109
+ summary: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strip>;
65
111
  declare const apiSourceSchema: z.ZodObject<{
66
112
  name: z.ZodString;
67
113
  spec: z.ZodString;
@@ -75,6 +121,21 @@ declare const apiSourceSchema: z.ZodObject<{
75
121
  PATCH: "PATCH";
76
122
  DELETE: "DELETE";
77
123
  }>>>;
124
+ enabled: z.ZodDefault<z.ZodBoolean>;
125
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
126
+ exposeAsMcp: z.ZodDefault<z.ZodBoolean>;
127
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
128
+ operationId: z.ZodString;
129
+ method: z.ZodEnum<{
130
+ GET: "GET";
131
+ POST: "POST";
132
+ PUT: "PUT";
133
+ PATCH: "PATCH";
134
+ DELETE: "DELETE";
135
+ }>;
136
+ path: z.ZodString;
137
+ summary: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>>>;
78
139
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
79
140
  forwardUserTokenAs: z.ZodOptional<z.ZodString>;
80
141
  forwardUserClaims: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -188,6 +249,12 @@ declare const frankieConfigSchema: z.ZodObject<{
188
249
  }, z.core.$strip>;
189
250
  mcpServers: z.ZodDefault<z.ZodArray<z.ZodObject<{
190
251
  name: z.ZodString;
252
+ enabled: z.ZodDefault<z.ZodBoolean>;
253
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ discoveredTools: z.ZodDefault<z.ZodArray<z.ZodObject<{
255
+ name: z.ZodString;
256
+ description: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>>>;
191
258
  transport: z.ZodDefault<z.ZodEnum<{
192
259
  http: "http";
193
260
  sse: "sse";
@@ -210,6 +277,21 @@ declare const frankieConfigSchema: z.ZodObject<{
210
277
  PATCH: "PATCH";
211
278
  DELETE: "DELETE";
212
279
  }>>>;
280
+ enabled: z.ZodDefault<z.ZodBoolean>;
281
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
282
+ exposeAsMcp: z.ZodDefault<z.ZodBoolean>;
283
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
284
+ operationId: z.ZodString;
285
+ method: z.ZodEnum<{
286
+ GET: "GET";
287
+ POST: "POST";
288
+ PUT: "PUT";
289
+ PATCH: "PATCH";
290
+ DELETE: "DELETE";
291
+ }>;
292
+ path: z.ZodString;
293
+ summary: z.ZodOptional<z.ZodString>;
294
+ }, z.core.$strip>>>;
213
295
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
214
296
  forwardUserTokenAs: z.ZodOptional<z.ZodString>;
215
297
  forwardUserClaims: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -222,11 +304,31 @@ declare const frankieConfigSchema: z.ZodObject<{
222
304
  sessionsPerIpPerWindow: z.ZodDefault<z.ZodNumber>;
223
305
  turnTimeoutMs: z.ZodDefault<z.ZodNumber>;
224
306
  }, z.core.$strip>>;
307
+ features: z.ZodPrefault<z.ZodObject<{
308
+ attachments: z.ZodPrefault<z.ZodObject<{
309
+ enabled: z.ZodDefault<z.ZodBoolean>;
310
+ accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
311
+ maxMb: z.ZodDefault<z.ZodNumber>;
312
+ maxCount: z.ZodDefault<z.ZodNumber>;
313
+ }, z.core.$strip>>;
314
+ modelPicker: z.ZodPrefault<z.ZodObject<{
315
+ enabled: z.ZodDefault<z.ZodBoolean>;
316
+ models: z.ZodDefault<z.ZodArray<z.ZodObject<{
317
+ id: z.ZodString;
318
+ label: z.ZodString;
319
+ provider: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strip>>>;
321
+ }, z.core.$strip>>;
322
+ workspaceAdmin: z.ZodDefault<z.ZodBoolean>;
323
+ }, z.core.$strip>>;
225
324
  }, z.core.$strip>;
226
325
  type ThinkingLevel = z.infer<typeof thinkingLevelSchema>;
227
326
  type WidgetThemeConfig = z.infer<typeof widgetThemeSchema>;
327
+ type ModelChoice = z.infer<typeof modelChoiceSchema>;
328
+ type FeaturesConfig = z.infer<typeof featuresConfigSchema>;
228
329
  type ModelConfig = z.infer<typeof modelConfigSchema>;
229
330
  type McpServerConfig = z.infer<typeof mcpServerSchema>;
331
+ type ApiCapability = z.infer<typeof apiCapabilitySchema>;
230
332
  type ApiSourceConfig = z.infer<typeof apiSourceSchema>;
231
333
  type ToolPolicy = z.infer<typeof toolPolicySchema>;
232
334
  type AgentConfig = z.infer<typeof agentConfigSchema>;
@@ -296,6 +398,14 @@ type FrankieServerEvent = {
296
398
  type: "ping";
297
399
  };
298
400
  type FrankieErrorCode = "unauthorized" | "forbidden_origin" | "rate_limited" | "session_not_found" | "upstream_error" | "budget_exceeded" | "internal";
401
+ /** A file the end user attached to a turn. `data` is base64 (no data-URL prefix). */
402
+ interface ChatAttachment {
403
+ name: string;
404
+ /** MIME type, e.g. "image/png", "application/pdf", "text/csv". */
405
+ mimeType: string;
406
+ /** Base64-encoded file bytes. */
407
+ data: string;
408
+ }
299
409
  /** Client -> server body for `POST /v1/chat`. */
300
410
  interface ChatRequestBody {
301
411
  /** Omit to start a new conversation; the server replies with a `session` event. */
@@ -307,6 +417,13 @@ interface ChatRequestBody {
307
417
  * as an instruction.
308
418
  */
309
419
  context?: Record<string, string | number | boolean | null>;
420
+ /**
421
+ * Model id to run this turn with. Honoured only when the workspace enables the
422
+ * model picker and the id is in its curated list; otherwise the default is used.
423
+ */
424
+ model?: string;
425
+ /** Files attached to this turn. Honoured only when attachments are enabled. */
426
+ attachments?: ChatAttachment[];
310
427
  }
311
428
  /** Client -> server body for `POST /v1/session`. */
312
429
  interface CreateSessionBody {
@@ -316,6 +433,8 @@ interface CreateSessionBody {
316
433
  */
317
434
  userToken?: string;
318
435
  context?: Record<string, string | number | boolean | null>;
436
+ /** Stable browser-generated id for a conversation that can resume on another device. */
437
+ conversationId?: string;
319
438
  }
320
439
  interface CreateSessionResponse {
321
440
  /** Short-lived bearer token scoped to this one chat session. */
@@ -344,6 +463,26 @@ interface PublicWidgetConfig {
344
463
  allowAnonymous: boolean;
345
464
  /** Show tool calls inline as they run. */
346
465
  showToolActivity: boolean;
466
+ /** Opt-in capabilities the widget should render (attachments, model picker). */
467
+ features: PublicFeatures;
468
+ }
469
+ /** The subset of `features` config the widget needs to render its controls. */
470
+ interface PublicFeatures {
471
+ attachments: {
472
+ enabled: boolean;
473
+ /** Accepted MIME patterns for the file input, e.g. "image/*". */
474
+ accept: string[];
475
+ maxMb: number;
476
+ maxCount: number;
477
+ };
478
+ modelPicker: {
479
+ enabled: boolean;
480
+ /** Curated models the end user may choose from. */
481
+ models: {
482
+ id: string;
483
+ label: string;
484
+ }[];
485
+ };
347
486
  }
348
487
  interface WidgetTheme {
349
488
  /** CSS color for primary actions. Any valid CSS color string. */
@@ -374,4 +513,29 @@ declare function evaluateToolPolicy(toolName: string, policy: ToolPolicy): ToolD
374
513
  /** A short human label for a tool call, for the "Frankie is …" line in the UI. */
375
514
  declare function describeTool(toolName: string, input: unknown): string;
376
515
 
377
- export { type AgentConfig, type ApiSourceConfig, type AuthConfig, type BrandingConfig, type ChatRequestBody, type CreateSessionBody, type CreateSessionResponse, type FrankieConfig, type FrankieConfigInput, type FrankieErrorCode, type FrankieServerEvent, type LimitsConfig, type McpServerConfig, type ModelConfig, type PublicWidgetConfig, type StopReason, type ThinkingLevel, type ToolDecision, type ToolPolicy, type UsageSummary, type WidgetTheme, type WidgetThemeConfig, agentConfigSchema, apiSourceSchema, authConfigSchema, brandingConfigSchema, defineFrankieConfig, describeTool, evaluateToolPolicy, frankieConfigSchema, limitsConfigSchema, mcpServerSchema, modelConfigSchema, parseFrankieConfig, thinkingLevelSchema, toolPolicySchema, widgetThemeSchema };
516
+ /** One installation plan for GitHub and the local CLI. Never includes credentials. */
517
+ interface InstallProject {
518
+ files: Record<string, string>;
519
+ workspace: {
520
+ id: string;
521
+ name: string;
522
+ publishableKey: string;
523
+ allowAnonymous: boolean;
524
+ };
525
+ apiBaseUrl?: string;
526
+ }
527
+ interface InstallPlan {
528
+ files: Array<{
529
+ path: string;
530
+ content: string;
531
+ }>;
532
+ root: string;
533
+ chatPath: string;
534
+ specPath: string;
535
+ operationCount: number;
536
+ needsAuthSetup: boolean;
537
+ notes: string[];
538
+ }
539
+ declare function planHostedInstall(input: InstallProject): InstallPlan;
540
+
541
+ export { type AgentConfig, type ApiCapability, type ApiSourceConfig, type AuthConfig, type BrandingConfig, type ChatAttachment, type ChatRequestBody, type CreateSessionBody, type CreateSessionResponse, type FeaturesConfig, type FrankieConfig, type FrankieConfigInput, type FrankieErrorCode, type FrankieServerEvent, type InstallPlan, type InstallProject, type LimitsConfig, type McpServerConfig, type ModelChoice, type ModelConfig, type PublicFeatures, type PublicWidgetConfig, type StopReason, type ThinkingLevel, type ToolDecision, type ToolPolicy, type UsageSummary, type WidgetTheme, type WidgetThemeConfig, agentConfigSchema, apiCapabilitySchema, apiSourceSchema, authConfigSchema, brandingConfigSchema, defineFrankieConfig, describeTool, evaluateToolPolicy, featuresConfigSchema, frankieConfigSchema, limitsConfigSchema, mcpServerSchema, modelChoiceSchema, modelConfigSchema, parseFrankieConfig, planHostedInstall, thinkingLevelSchema, toolPolicySchema, widgetThemeSchema };
package/dist/index.d.ts CHANGED
@@ -45,8 +45,42 @@ declare const modelConfigSchema: z.ZodObject<{
45
45
  }>>;
46
46
  streamReasoning: z.ZodDefault<z.ZodBoolean>;
47
47
  }, z.core.$strip>;
48
+ /** One selectable model in the (optional) end-user model picker. */
49
+ declare const modelChoiceSchema: z.ZodObject<{
50
+ id: z.ZodString;
51
+ label: z.ZodString;
52
+ provider: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ /**
55
+ * Optional, opt-in chat capabilities the SDK consumer turns on per workspace.
56
+ * Everything here is OFF by default: an embedded agent only gets a wider surface
57
+ * when the customer deliberately enables it.
58
+ */
59
+ declare const featuresConfigSchema: z.ZodPrefault<z.ZodObject<{
60
+ attachments: z.ZodPrefault<z.ZodObject<{
61
+ enabled: z.ZodDefault<z.ZodBoolean>;
62
+ accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
63
+ maxMb: z.ZodDefault<z.ZodNumber>;
64
+ maxCount: z.ZodDefault<z.ZodNumber>;
65
+ }, z.core.$strip>>;
66
+ modelPicker: z.ZodPrefault<z.ZodObject<{
67
+ enabled: z.ZodDefault<z.ZodBoolean>;
68
+ models: z.ZodDefault<z.ZodArray<z.ZodObject<{
69
+ id: z.ZodString;
70
+ label: z.ZodString;
71
+ provider: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strip>>>;
73
+ }, z.core.$strip>>;
74
+ workspaceAdmin: z.ZodDefault<z.ZodBoolean>;
75
+ }, z.core.$strip>>;
48
76
  declare const mcpServerSchema: z.ZodObject<{
49
77
  name: z.ZodString;
78
+ enabled: z.ZodDefault<z.ZodBoolean>;
79
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
80
+ discoveredTools: z.ZodDefault<z.ZodArray<z.ZodObject<{
81
+ name: z.ZodString;
82
+ description: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>>>;
50
84
  transport: z.ZodDefault<z.ZodEnum<{
51
85
  http: "http";
52
86
  sse: "sse";
@@ -62,6 +96,18 @@ declare const mcpServerSchema: z.ZodObject<{
62
96
  * This is the "no MCP server to write" path: point Frankie at a spec, name the
63
97
  * operations the agent may use, and it builds the tools at startup.
64
98
  */
99
+ declare const apiCapabilitySchema: z.ZodObject<{
100
+ operationId: z.ZodString;
101
+ method: z.ZodEnum<{
102
+ GET: "GET";
103
+ POST: "POST";
104
+ PUT: "PUT";
105
+ PATCH: "PATCH";
106
+ DELETE: "DELETE";
107
+ }>;
108
+ path: z.ZodString;
109
+ summary: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strip>;
65
111
  declare const apiSourceSchema: z.ZodObject<{
66
112
  name: z.ZodString;
67
113
  spec: z.ZodString;
@@ -75,6 +121,21 @@ declare const apiSourceSchema: z.ZodObject<{
75
121
  PATCH: "PATCH";
76
122
  DELETE: "DELETE";
77
123
  }>>>;
124
+ enabled: z.ZodDefault<z.ZodBoolean>;
125
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
126
+ exposeAsMcp: z.ZodDefault<z.ZodBoolean>;
127
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
128
+ operationId: z.ZodString;
129
+ method: z.ZodEnum<{
130
+ GET: "GET";
131
+ POST: "POST";
132
+ PUT: "PUT";
133
+ PATCH: "PATCH";
134
+ DELETE: "DELETE";
135
+ }>;
136
+ path: z.ZodString;
137
+ summary: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>>>;
78
139
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
79
140
  forwardUserTokenAs: z.ZodOptional<z.ZodString>;
80
141
  forwardUserClaims: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -188,6 +249,12 @@ declare const frankieConfigSchema: z.ZodObject<{
188
249
  }, z.core.$strip>;
189
250
  mcpServers: z.ZodDefault<z.ZodArray<z.ZodObject<{
190
251
  name: z.ZodString;
252
+ enabled: z.ZodDefault<z.ZodBoolean>;
253
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ discoveredTools: z.ZodDefault<z.ZodArray<z.ZodObject<{
255
+ name: z.ZodString;
256
+ description: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>>>;
191
258
  transport: z.ZodDefault<z.ZodEnum<{
192
259
  http: "http";
193
260
  sse: "sse";
@@ -210,6 +277,21 @@ declare const frankieConfigSchema: z.ZodObject<{
210
277
  PATCH: "PATCH";
211
278
  DELETE: "DELETE";
212
279
  }>>>;
280
+ enabled: z.ZodDefault<z.ZodBoolean>;
281
+ selectedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
282
+ exposeAsMcp: z.ZodDefault<z.ZodBoolean>;
283
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
284
+ operationId: z.ZodString;
285
+ method: z.ZodEnum<{
286
+ GET: "GET";
287
+ POST: "POST";
288
+ PUT: "PUT";
289
+ PATCH: "PATCH";
290
+ DELETE: "DELETE";
291
+ }>;
292
+ path: z.ZodString;
293
+ summary: z.ZodOptional<z.ZodString>;
294
+ }, z.core.$strip>>>;
213
295
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
214
296
  forwardUserTokenAs: z.ZodOptional<z.ZodString>;
215
297
  forwardUserClaims: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -222,11 +304,31 @@ declare const frankieConfigSchema: z.ZodObject<{
222
304
  sessionsPerIpPerWindow: z.ZodDefault<z.ZodNumber>;
223
305
  turnTimeoutMs: z.ZodDefault<z.ZodNumber>;
224
306
  }, z.core.$strip>>;
307
+ features: z.ZodPrefault<z.ZodObject<{
308
+ attachments: z.ZodPrefault<z.ZodObject<{
309
+ enabled: z.ZodDefault<z.ZodBoolean>;
310
+ accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
311
+ maxMb: z.ZodDefault<z.ZodNumber>;
312
+ maxCount: z.ZodDefault<z.ZodNumber>;
313
+ }, z.core.$strip>>;
314
+ modelPicker: z.ZodPrefault<z.ZodObject<{
315
+ enabled: z.ZodDefault<z.ZodBoolean>;
316
+ models: z.ZodDefault<z.ZodArray<z.ZodObject<{
317
+ id: z.ZodString;
318
+ label: z.ZodString;
319
+ provider: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strip>>>;
321
+ }, z.core.$strip>>;
322
+ workspaceAdmin: z.ZodDefault<z.ZodBoolean>;
323
+ }, z.core.$strip>>;
225
324
  }, z.core.$strip>;
226
325
  type ThinkingLevel = z.infer<typeof thinkingLevelSchema>;
227
326
  type WidgetThemeConfig = z.infer<typeof widgetThemeSchema>;
327
+ type ModelChoice = z.infer<typeof modelChoiceSchema>;
328
+ type FeaturesConfig = z.infer<typeof featuresConfigSchema>;
228
329
  type ModelConfig = z.infer<typeof modelConfigSchema>;
229
330
  type McpServerConfig = z.infer<typeof mcpServerSchema>;
331
+ type ApiCapability = z.infer<typeof apiCapabilitySchema>;
230
332
  type ApiSourceConfig = z.infer<typeof apiSourceSchema>;
231
333
  type ToolPolicy = z.infer<typeof toolPolicySchema>;
232
334
  type AgentConfig = z.infer<typeof agentConfigSchema>;
@@ -296,6 +398,14 @@ type FrankieServerEvent = {
296
398
  type: "ping";
297
399
  };
298
400
  type FrankieErrorCode = "unauthorized" | "forbidden_origin" | "rate_limited" | "session_not_found" | "upstream_error" | "budget_exceeded" | "internal";
401
+ /** A file the end user attached to a turn. `data` is base64 (no data-URL prefix). */
402
+ interface ChatAttachment {
403
+ name: string;
404
+ /** MIME type, e.g. "image/png", "application/pdf", "text/csv". */
405
+ mimeType: string;
406
+ /** Base64-encoded file bytes. */
407
+ data: string;
408
+ }
299
409
  /** Client -> server body for `POST /v1/chat`. */
300
410
  interface ChatRequestBody {
301
411
  /** Omit to start a new conversation; the server replies with a `session` event. */
@@ -307,6 +417,13 @@ interface ChatRequestBody {
307
417
  * as an instruction.
308
418
  */
309
419
  context?: Record<string, string | number | boolean | null>;
420
+ /**
421
+ * Model id to run this turn with. Honoured only when the workspace enables the
422
+ * model picker and the id is in its curated list; otherwise the default is used.
423
+ */
424
+ model?: string;
425
+ /** Files attached to this turn. Honoured only when attachments are enabled. */
426
+ attachments?: ChatAttachment[];
310
427
  }
311
428
  /** Client -> server body for `POST /v1/session`. */
312
429
  interface CreateSessionBody {
@@ -316,6 +433,8 @@ interface CreateSessionBody {
316
433
  */
317
434
  userToken?: string;
318
435
  context?: Record<string, string | number | boolean | null>;
436
+ /** Stable browser-generated id for a conversation that can resume on another device. */
437
+ conversationId?: string;
319
438
  }
320
439
  interface CreateSessionResponse {
321
440
  /** Short-lived bearer token scoped to this one chat session. */
@@ -344,6 +463,26 @@ interface PublicWidgetConfig {
344
463
  allowAnonymous: boolean;
345
464
  /** Show tool calls inline as they run. */
346
465
  showToolActivity: boolean;
466
+ /** Opt-in capabilities the widget should render (attachments, model picker). */
467
+ features: PublicFeatures;
468
+ }
469
+ /** The subset of `features` config the widget needs to render its controls. */
470
+ interface PublicFeatures {
471
+ attachments: {
472
+ enabled: boolean;
473
+ /** Accepted MIME patterns for the file input, e.g. "image/*". */
474
+ accept: string[];
475
+ maxMb: number;
476
+ maxCount: number;
477
+ };
478
+ modelPicker: {
479
+ enabled: boolean;
480
+ /** Curated models the end user may choose from. */
481
+ models: {
482
+ id: string;
483
+ label: string;
484
+ }[];
485
+ };
347
486
  }
348
487
  interface WidgetTheme {
349
488
  /** CSS color for primary actions. Any valid CSS color string. */
@@ -374,4 +513,29 @@ declare function evaluateToolPolicy(toolName: string, policy: ToolPolicy): ToolD
374
513
  /** A short human label for a tool call, for the "Frankie is …" line in the UI. */
375
514
  declare function describeTool(toolName: string, input: unknown): string;
376
515
 
377
- export { type AgentConfig, type ApiSourceConfig, type AuthConfig, type BrandingConfig, type ChatRequestBody, type CreateSessionBody, type CreateSessionResponse, type FrankieConfig, type FrankieConfigInput, type FrankieErrorCode, type FrankieServerEvent, type LimitsConfig, type McpServerConfig, type ModelConfig, type PublicWidgetConfig, type StopReason, type ThinkingLevel, type ToolDecision, type ToolPolicy, type UsageSummary, type WidgetTheme, type WidgetThemeConfig, agentConfigSchema, apiSourceSchema, authConfigSchema, brandingConfigSchema, defineFrankieConfig, describeTool, evaluateToolPolicy, frankieConfigSchema, limitsConfigSchema, mcpServerSchema, modelConfigSchema, parseFrankieConfig, thinkingLevelSchema, toolPolicySchema, widgetThemeSchema };
516
+ /** One installation plan for GitHub and the local CLI. Never includes credentials. */
517
+ interface InstallProject {
518
+ files: Record<string, string>;
519
+ workspace: {
520
+ id: string;
521
+ name: string;
522
+ publishableKey: string;
523
+ allowAnonymous: boolean;
524
+ };
525
+ apiBaseUrl?: string;
526
+ }
527
+ interface InstallPlan {
528
+ files: Array<{
529
+ path: string;
530
+ content: string;
531
+ }>;
532
+ root: string;
533
+ chatPath: string;
534
+ specPath: string;
535
+ operationCount: number;
536
+ needsAuthSetup: boolean;
537
+ notes: string[];
538
+ }
539
+ declare function planHostedInstall(input: InstallProject): InstallPlan;
540
+
541
+ export { type AgentConfig, type ApiCapability, type ApiSourceConfig, type AuthConfig, type BrandingConfig, type ChatAttachment, type ChatRequestBody, type CreateSessionBody, type CreateSessionResponse, type FeaturesConfig, type FrankieConfig, type FrankieConfigInput, type FrankieErrorCode, type FrankieServerEvent, type InstallPlan, type InstallProject, type LimitsConfig, type McpServerConfig, type ModelChoice, type ModelConfig, type PublicFeatures, type PublicWidgetConfig, type StopReason, type ThinkingLevel, type ToolDecision, type ToolPolicy, type UsageSummary, type WidgetTheme, type WidgetThemeConfig, agentConfigSchema, apiCapabilitySchema, apiSourceSchema, authConfigSchema, brandingConfigSchema, defineFrankieConfig, describeTool, evaluateToolPolicy, featuresConfigSchema, frankieConfigSchema, limitsConfigSchema, mcpServerSchema, modelChoiceSchema, modelConfigSchema, parseFrankieConfig, planHostedInstall, thinkingLevelSchema, toolPolicySchema, widgetThemeSchema };