@superblocksteam/cli 2.0.0-next.84 → 2.0.0-next.85

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/README.md CHANGED
@@ -14,7 +14,7 @@ $ npm install -g @superblocksteam/cli
14
14
  $ superblocks COMMAND
15
15
  running command...
16
16
  $ superblocks (--version)
17
- @superblocksteam/cli/2.0.0-next.84 linux-x64 node-v20.19.0
17
+ @superblocksteam/cli/2.0.0-next.85 linux-x64 node-v20.19.0
18
18
  $ superblocks --help [COMMAND]
19
19
  USAGE
20
20
  $ superblocks COMMAND
package/dist/index.js CHANGED
@@ -294326,10 +294326,10 @@ ${diff2}
294326
294326
  ---
294327
294327
 
294328
294328
  Address the errors and return the fixed code.`;
294329
- const { systemPrompt } = await createSystemPrompt(getMeta()?.request, params, filePaths);
294329
+ const { systemMessages } = await createSystemPrompt(getMeta()?.request, params, filePaths);
294330
294330
  transitionTo({
294331
294331
  type: AGENT_PLANNED,
294332
- systemPrompt,
294332
+ systemMessages,
294333
294333
  userPrompt: debuggingPrompt,
294334
294334
  debugging: true
294335
294335
  });
@@ -294375,7 +294375,7 @@ ${newPrompt}`;
294375
294375
  sendVerboseControlMessages(sendUserMessage);
294376
294376
  }
294377
294377
  }
294378
- const { systemPrompt, filePaths } = await createSystemPrompt(request, params);
294378
+ const { systemMessages, filePaths } = await createSystemPrompt(request, params);
294379
294379
  if (!clark.context.initialFilePaths) {
294380
294380
  const apiPathMatcher = matchPath(Paths.ApiYamls);
294381
294381
  const componentPathMatcher = matchPath(Paths.Components);
@@ -294390,13 +294390,13 @@ ${newPrompt}`;
294390
294390
  }
294391
294391
  updateMeta({
294392
294392
  request,
294393
- systemPrompt,
294393
+ systemMessages,
294394
294394
  retryCount: 0
294395
294395
  });
294396
294396
  void params.appShell.runTypecheck();
294397
294397
  transitionTo({
294398
294398
  type: AGENT_PLANNED,
294399
- systemPrompt,
294399
+ systemMessages,
294400
294400
  userPrompt: request.prompt
294401
294401
  });
294402
294402
  break;
@@ -294406,12 +294406,12 @@ ${newPrompt}`;
294406
294406
  switch (error.type) {
294407
294407
  case "overloaded_error":
294408
294408
  {
294409
- const { retryCount = 0, systemPrompt, request } = getMeta() ?? {};
294409
+ const { retryCount = 0, systemMessages, request } = getMeta() ?? {};
294410
294410
  const backoff = Math.min(retryCount * 1e3, 1e4);
294411
294411
  setTimeout(() => {
294412
294412
  transitionTo({
294413
294413
  type: AGENT_PLANNED,
294414
- systemPrompt,
294414
+ systemMessages,
294415
294415
  userPrompt: request.prompt
294416
294416
  });
294417
294417
  }, backoff);
@@ -294498,6 +294498,7 @@ ${error.stack ?? error.message}
294498
294498
  };
294499
294499
  };
294500
294500
  var createSystemPrompt = async (request, params, appFilePatterns = ["**/*.{ts,tsx,yaml}", "package.json"]) => {
294501
+ const systemMessages = [];
294501
294502
  const { appShell, templateRenderer, artifactProcessor } = params;
294502
294503
  const appFiles = await params.appShell.readFiles(appFilePatterns);
294503
294504
  const transformedForPrompt = await applyFileTransformations(appFiles, [
@@ -294509,26 +294510,30 @@ var createSystemPrompt = async (request, params, appFilePatterns = ["**/*.{ts,ts
294509
294510
  })
294510
294511
  ]);
294511
294512
  const artifactContext = artifactProcessor.createArtifactContext(transformedForPrompt);
294512
- let systemPrompt = getStaticPrompt();
294513
- systemPrompt = `${systemPrompt}
294514
-
294515
- The current working directory is \`${appShell.appRootDirPath}\`.
294516
- `;
294513
+ systemMessages.push({
294514
+ role: "system",
294515
+ content: getStaticPrompt(),
294516
+ providerOptions: { anthropic: { cacheControl: { type: "ephemeral" } } }
294517
+ });
294518
+ systemMessages.push({
294519
+ role: "system",
294520
+ content: `The current working directory is \`${appShell.appRootDirPath}\`.`
294521
+ });
294517
294522
  const taggedIntegrations = request?.promptContext?.integrations?.map((integration) => sdkIntegrationFromPromptContext(integration));
294518
294523
  const sdkIntegrationsPromptContent = integrationsToSdkPromptContent(taggedIntegrations ?? []);
294519
294524
  if (sdkIntegrationsPromptContent.length > 0) {
294520
- systemPrompt = `${systemPrompt}
294521
-
294522
- Below are the API configurations specific to the request:
294525
+ systemMessages.push({
294526
+ role: "system",
294527
+ content: `Below are the API configurations specific to the request:
294523
294528
  ---
294524
294529
  ${sdkIntegrationsPromptContent.join("\n\n")}
294525
- ---
294526
- `;
294530
+ ---`
294531
+ });
294527
294532
  }
294528
294533
  if (artifactContext) {
294529
- systemPrompt = `${systemPrompt}
294530
-
294531
- Below are the relevant files present in the project:
294534
+ systemMessages.push({
294535
+ role: "system",
294536
+ content: `Below are the relevant files present in the project:
294532
294537
  ---
294533
294538
  ${artifactContext.paths.join("\n")}
294534
294539
  ---
@@ -294537,17 +294542,20 @@ Below is the context buffer containing relevant files and code that you should r
294537
294542
  CONTEXT BUFFER:
294538
294543
  ---
294539
294544
  ${artifactContext.content}
294540
- ---
294541
- `;
294545
+ ---`
294546
+ });
294542
294547
  }
294543
294548
  if (LOG_SYSTEM_PROMPT) {
294544
294549
  const logger3 = getLogger();
294545
294550
  logger3.info("[ai-service] " + "=".repeat(80));
294546
294551
  logger3.info("SYSTEM PROMPT:");
294547
- logger3.info(systemPrompt);
294552
+ logger3.info(systemMessages.map((m) => m.content).join("\n"));
294548
294553
  logger3.info("[ai-service] " + "=".repeat(80));
294549
294554
  }
294550
- return { systemPrompt, filePaths: appFiles.map((file) => file.filePath) };
294555
+ return {
294556
+ systemMessages,
294557
+ filePaths: appFiles.map((file) => file.filePath)
294558
+ };
294551
294559
  };
294552
294560
  var sendVerboseControlMessages = (sendUserMessage) => {
294553
294561
  const messages2 = [
@@ -300896,12 +300904,17 @@ var doLLMGenerating = (clark, { anthropicProvider, artifactProcessor, templateRe
300896
300904
  return async ({ event }) => {
300897
300905
  switch (event.type) {
300898
300906
  case AGENT_PLANNED: {
300899
- const { systemPrompt, userPrompt, debugging } = event;
300907
+ const { systemMessages, userPrompt, debugging } = event;
300900
300908
  const { abortController } = clark.context;
300901
300909
  const { fullStream } = streamText({
300902
300910
  model: anthropicProvider("claude-4-sonnet-20250514"),
300903
- system: systemPrompt,
300904
- prompt: userPrompt,
300911
+ messages: [
300912
+ ...systemMessages,
300913
+ {
300914
+ role: "user",
300915
+ content: userPrompt
300916
+ }
300917
+ ],
300905
300918
  experimental_transform: smoothStream(),
300906
300919
  maxTokens: 32e3,
300907
300920
  abortSignal: abortController?.signal
@@ -318996,7 +319009,7 @@ var import_util29 = __toESM(require_dist3(), 1);
318996
319009
  // ../sdk/package.json
318997
319010
  var package_default = {
318998
319011
  name: "@superblocksteam/sdk",
318999
- version: "2.0.0-next.84",
319012
+ version: "2.0.0-next.85",
319000
319013
  type: "module",
319001
319014
  description: "Superblocks JS SDK",
319002
319015
  homepage: "https://www.superblocks.com",
@@ -319038,8 +319051,8 @@ var package_default = {
319038
319051
  "@rollup/wasm-node": "^4.35.0",
319039
319052
  "@superblocksteam/bucketeer-sdk": "0.5.0",
319040
319053
  "@superblocksteam/shared": "0.9149.0",
319041
- "@superblocksteam/util": "2.0.0-next.84",
319042
- "@superblocksteam/vite-plugin-file-sync": "2.0.0-next.84",
319054
+ "@superblocksteam/util": "2.0.0-next.85",
319055
+ "@superblocksteam/vite-plugin-file-sync": "2.0.0-next.85",
319043
319056
  "@vitejs/plugin-react": "^4.3.4",
319044
319057
  axios: "^1.4.0",
319045
319058
  chokidar: "^4.0.3",
@@ -325988,7 +326001,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
325988
326001
  };
325989
326002
  const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
325990
326003
  const customFolder = path34.join(root2, "custom");
325991
- const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.84";
326004
+ const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.85";
325992
326005
  const env3 = loadEnv(mode, root2, "");
325993
326006
  const hmrPort = await getFreePort();
325994
326007
  const hmrOptions = {
@@ -571,5 +571,5 @@
571
571
  "strict": true
572
572
  }
573
573
  },
574
- "version": "2.0.0-next.84"
574
+ "version": "2.0.0-next.85"
575
575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superblocksteam/cli",
3
- "version": "2.0.0-next.84",
3
+ "version": "2.0.0-next.85",
4
4
  "type": "module",
5
5
  "description": "Official Superblocks CLI",
6
6
  "homepage": "https://www.superblocks.com",
@@ -42,9 +42,9 @@
42
42
  "devDependencies": {
43
43
  "@eslint/js": "^9.16.0",
44
44
  "@oclif/test": "^4.1.11",
45
- "@superblocksteam/sdk": "2.0.0-next.84",
45
+ "@superblocksteam/sdk": "2.0.0-next.85",
46
46
  "@superblocksteam/shared": "0.9149.0",
47
- "@superblocksteam/util": "2.0.0-next.84",
47
+ "@superblocksteam/util": "2.0.0-next.85",
48
48
  "@types/babel__core": "^7.20.0",
49
49
  "@types/chai": "^4",
50
50
  "@types/fs-extra": "^11.0.1",