@cf-vibesdk/sdk 0.0.9 → 0.1.1

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.ts CHANGED
@@ -271,6 +271,16 @@ declare const AgenticBlueprintSchema: z.ZodObject<{
271
271
  frameworks: z.ZodArray<z.ZodString, "many">;
272
272
  } & {
273
273
  plan: z.ZodArray<z.ZodString, "many">;
274
+ preflightAnswers: z.ZodOptional<z.ZodArray<z.ZodObject<{
275
+ question: z.ZodString;
276
+ answer: z.ZodString;
277
+ }, "strip", z.ZodTypeAny, {
278
+ question: string;
279
+ answer: string;
280
+ }, {
281
+ question: string;
282
+ answer: string;
283
+ }>, "many">>;
274
284
  }, "strip", z.ZodTypeAny, {
275
285
  description: string;
276
286
  title: string;
@@ -278,6 +288,10 @@ declare const AgenticBlueprintSchema: z.ZodObject<{
278
288
  colorPalette: string[];
279
289
  frameworks: string[];
280
290
  plan: string[];
291
+ preflightAnswers?: {
292
+ question: string;
293
+ answer: string;
294
+ }[] | undefined;
281
295
  }, {
282
296
  description: string;
283
297
  title: string;
@@ -285,6 +299,10 @@ declare const AgenticBlueprintSchema: z.ZodObject<{
285
299
  colorPalette: string[];
286
300
  frameworks: string[];
287
301
  plan: string[];
302
+ preflightAnswers?: {
303
+ question: string;
304
+ answer: string;
305
+ }[] | undefined;
288
306
  }>;
289
307
  type PhasicBlueprint = z.infer<typeof PhasicBlueprintSchema>;
290
308
  type AgenticBlueprint = z.infer<typeof AgenticBlueprintSchema>;
@@ -783,6 +801,8 @@ interface BaseProjectState {
783
801
  pendingUserInputs: string[];
784
802
  projectUpdatesAccumulator: string[];
785
803
  lastDeepDebugTranscript: string | null;
804
+ preflightQuestions?: string;
805
+ preflightCompleted?: boolean;
786
806
  mvpGenerated: boolean;
787
807
  reviewingInitiated: boolean;
788
808
  }
@@ -1145,6 +1165,7 @@ type ScreenshotCaptureSuccessMessage = {
1145
1165
  };
1146
1166
  screenshotSize: number;
1147
1167
  timestamp: string;
1168
+ screenshotUrl?: string;
1148
1169
  };
1149
1170
  type ScreenshotCaptureErrorMessage = {
1150
1171
  type: "screenshot_capture_error";
@@ -1322,6 +1343,8 @@ interface CodeGenArgs {
1322
1343
  images?: ImageAttachment[];
1323
1344
  /** Optional ephemeral credentials (BYOK / gateway override) for sdk */
1324
1345
  credentials?: CredentialsPayload;
1346
+ /** Optional preflight questions prompt. When provided, the agent asks these questions one-by-one before building and stores answers in the blueprint. */
1347
+ preflightQuestions?: string;
1325
1348
  }
1326
1349
  /**
1327
1350
  * Data structure for connectToExistingAgent response
@@ -2484,7 +2507,7 @@ declare const apps: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2484
2507
  tableName: "apps";
2485
2508
  dataType: "string";
2486
2509
  columnType: "SQLiteText";
2487
- data: "private" | "public";
2510
+ data: "public" | "private";
2488
2511
  driverParam: string;
2489
2512
  notNull: true;
2490
2513
  hasDefault: true;
@@ -2572,7 +2595,7 @@ declare const apps: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2572
2595
  tableName: "apps";
2573
2596
  dataType: "string";
2574
2597
  columnType: "SQLiteText";
2575
- data: "private" | "public";
2598
+ data: "public" | "private";
2576
2599
  driverParam: string;
2577
2600
  notNull: false;
2578
2601
  hasDefault: false;
@@ -5173,11 +5196,11 @@ type App = {
5173
5196
  framework: string | null;
5174
5197
  userId: string | null;
5175
5198
  sessionToken: string | null;
5176
- visibility: "private" | "public";
5199
+ visibility: "public" | "private";
5177
5200
  status: "completed" | "generating";
5178
5201
  deploymentId: string | null;
5179
5202
  githubRepositoryUrl: string | null;
5180
- githubRepositoryVisibility: "private" | "public" | null;
5203
+ githubRepositoryVisibility: "public" | "private" | null;
5181
5204
  isArchived: boolean | null;
5182
5205
  isFeatured: boolean | null;
5183
5206
  version: number | null;
@@ -5480,11 +5503,11 @@ type App$1 = {
5480
5503
  framework: string | null;
5481
5504
  userId: string | null;
5482
5505
  sessionToken: string | null;
5483
- visibility: "private" | "public";
5506
+ visibility: "public" | "private";
5484
5507
  status: "completed" | "generating";
5485
5508
  deploymentId: string | null;
5486
5509
  githubRepositoryUrl: string | null;
5487
- githubRepositoryVisibility: "private" | "public" | null;
5510
+ githubRepositoryVisibility: "public" | "private" | null;
5488
5511
  isArchived: boolean | null;
5489
5512
  isFeatured: boolean | null;
5490
5513
  version: number | null;
@@ -6034,7 +6057,7 @@ export declare class VibeClient {
6034
6057
  finalPrompt: string | null;
6035
6058
  framework: string | null;
6036
6059
  sessionToken: string | null;
6037
- visibility: "private" | "public";
6060
+ visibility: "public" | "private";
6038
6061
  githubRepositoryUrl: string | null;
6039
6062
  githubRepositoryVisibility: string | null;
6040
6063
  isArchived: string | boolean | null;
@@ -6096,6 +6119,10 @@ type Blueprint$1 = {
6096
6119
  phase: string;
6097
6120
  description: string;
6098
6121
  }>;
6122
+ preflightAnswers?: Array<{
6123
+ question: string;
6124
+ answer: string;
6125
+ }>;
6099
6126
  };
6100
6127
  /**
6101
6128
  * Converts a Blueprint object to readable Markdown.
package/dist/index.js CHANGED
@@ -1188,7 +1188,8 @@ class VibeClient {
1188
1188
  behaviorType: options.behaviorType,
1189
1189
  projectType: options.projectType,
1190
1190
  images: options.images,
1191
- credentials: options.credentials
1191
+ credentials: options.credentials,
1192
+ preflightQuestions: options.preflightQuestions
1192
1193
  };
1193
1194
  const resp = await this.http.fetchRaw("/api/agent", {
1194
1195
  method: "POST",
@@ -1363,6 +1364,12 @@ function blueprintToMarkdown(bp) {
1363
1364
  for (const p of bp.implementationRoadmap)
1364
1365
  lines.push(`- **${p.phase}**: ${p.description}`);
1365
1366
  }
1367
+ if (bp.preflightAnswers?.length) {
1368
+ lines.push("");
1369
+ lines.push("## Preflight Answers");
1370
+ for (const a of bp.preflightAnswers)
1371
+ lines.push(`- **${a.question}**: ${a.answer}`);
1372
+ }
1366
1373
  return lines.join(`
1367
1374
  `);
1368
1375
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cf-vibesdk/sdk",
3
- "version": "0.0.9",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {