@superblocksteam/cli 2.0.0-next.109 → 2.0.0-next.110
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 +1 -1
- package/dist/index.js +107 -146
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
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.
|
|
17
|
+
@superblocksteam/cli/2.0.0-next.110 linux-x64 node-v20.19.0
|
|
18
18
|
$ superblocks --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ superblocks COMMAND
|
package/dist/index.js
CHANGED
|
@@ -293660,12 +293660,6 @@ var doAgentPlanning = (clark, params) => {
|
|
|
293660
293660
|
});
|
|
293661
293661
|
return;
|
|
293662
293662
|
}
|
|
293663
|
-
sendUserMessage({
|
|
293664
|
-
type: "control",
|
|
293665
|
-
group: "debugging",
|
|
293666
|
-
status: "pending",
|
|
293667
|
-
text: debugCount === 1 ? "I found some problems in the app. Let me address them." : `Still trying to fix the errors\u2026 (attempt ${debugCount} of ${MAX_DEBUG_ATTEMPTS})`
|
|
293668
|
-
});
|
|
293669
293663
|
const diff2 = await params.draftInterface.getDraftDiff(filePaths);
|
|
293670
293664
|
const debuggingPrompt = `${debuggingPromptIntro}
|
|
293671
293665
|
|
|
@@ -293909,8 +293903,9 @@ ${artifactContext.content}
|
|
|
293909
293903
|
var sendVerboseControlMessages = (sendUserMessage) => {
|
|
293910
293904
|
const messages2 = [
|
|
293911
293905
|
[0, "Referencing your design system"],
|
|
293912
|
-
[500, "Identifying
|
|
293913
|
-
[1300, "Referencing users and groups"]
|
|
293906
|
+
[500, "Identifying available enterprise integrations"],
|
|
293907
|
+
[1300, "Referencing users and groups"],
|
|
293908
|
+
[1800, "Reviewing approved packages"]
|
|
293914
293909
|
];
|
|
293915
293910
|
for (const [delay4, text2] of messages2) {
|
|
293916
293911
|
void sendUserMessage({
|
|
@@ -293948,6 +293943,18 @@ var doAwaitingUser = (clark, { signals }) => {
|
|
|
293948
293943
|
case RUNTIME_REVIEW_FINISHED: {
|
|
293949
293944
|
const { hasSuggestions = false, summaryMessages = [] } = clark.context;
|
|
293950
293945
|
signals.emit("generationCompleted", hasSuggestions);
|
|
293946
|
+
if (summaryMessages.length > 0) {
|
|
293947
|
+
void sendUserMessage({
|
|
293948
|
+
type: "text",
|
|
293949
|
+
group: "clark",
|
|
293950
|
+
text: "\n---\n"
|
|
293951
|
+
});
|
|
293952
|
+
void sendUserMessage({
|
|
293953
|
+
type: "text",
|
|
293954
|
+
group: "clark",
|
|
293955
|
+
text: "**Summary**"
|
|
293956
|
+
});
|
|
293957
|
+
}
|
|
293951
293958
|
for (const message of summaryMessages) {
|
|
293952
293959
|
void sendUserMessage({
|
|
293953
293960
|
text: message
|
|
@@ -300275,6 +300282,18 @@ var doLLMGenerating = (clark, { anthropicProvider, artifactProcessor, templateRe
|
|
|
300275
300282
|
onTypeChange: async (type2) => {
|
|
300276
300283
|
switch (type2) {
|
|
300277
300284
|
case BoltResultType.Artifact:
|
|
300285
|
+
if (!pendingArtifacts && !debugging) {
|
|
300286
|
+
void sendUserMessage({
|
|
300287
|
+
type: "text",
|
|
300288
|
+
group: "clark",
|
|
300289
|
+
text: "Passing it over to the Engineer Agent to start building!"
|
|
300290
|
+
});
|
|
300291
|
+
void sendUserMessage({
|
|
300292
|
+
type: "text",
|
|
300293
|
+
group: "agent-engineer",
|
|
300294
|
+
text: "Great, thanks Clark - let's get to work! You can track my progress below."
|
|
300295
|
+
}, 750);
|
|
300296
|
+
}
|
|
300278
300297
|
pendingArtifacts = true;
|
|
300279
300298
|
break;
|
|
300280
300299
|
case BoltResultType.Text:
|
|
@@ -300402,12 +300421,8 @@ var doLLMGenerating = (clark, { anthropicProvider, artifactProcessor, templateRe
|
|
|
300402
300421
|
});
|
|
300403
300422
|
} else {
|
|
300404
300423
|
const generated2 = artifactProcessor.extractFileArtifacts(artifactChunk);
|
|
300405
|
-
|
|
300406
|
-
|
|
300407
|
-
for (const message of summaryMessages) {
|
|
300408
|
-
void sendUserMessage({ text: message });
|
|
300409
|
-
}
|
|
300410
|
-
} else {
|
|
300424
|
+
if (!debugging) {
|
|
300425
|
+
const summaryMessages = flushedAfterArtifacts.filter(([type2]) => type2 === BoltResultType.Text).map(([_, text2]) => text2);
|
|
300411
300426
|
clark.updateContext({
|
|
300412
300427
|
summaryMessages
|
|
300413
300428
|
});
|
|
@@ -300462,58 +300477,8 @@ var doPostProcessing = (clark, { draftInterface, appShell }) => {
|
|
|
300462
300477
|
}
|
|
300463
300478
|
return Promise.all(files.map((file) => draftInterface.createDraftFile(file.filePath, file.content)));
|
|
300464
300479
|
};
|
|
300465
|
-
const handleDependencies = async (
|
|
300466
|
-
void sendUserMessage({
|
|
300467
|
-
type: "control",
|
|
300468
|
-
group: "dependency-resolve",
|
|
300469
|
-
status: "pending",
|
|
300470
|
-
text: "Resolving dependencies\u2026"
|
|
300471
|
-
});
|
|
300472
|
-
const packageChanges = await parsePackageJsonChanges(draftInterface, packageJson.content);
|
|
300473
|
-
for (const change of packageChanges) {
|
|
300474
|
-
void sendChangeInfo({
|
|
300475
|
-
type: "pending",
|
|
300476
|
-
filePath: renderPath(DependencyInfoPath, {
|
|
300477
|
-
packageName: change.package
|
|
300478
|
-
}),
|
|
300479
|
-
action: change.type
|
|
300480
|
-
});
|
|
300481
|
-
}
|
|
300482
|
-
void sendUserMessage({
|
|
300483
|
-
type: "control",
|
|
300484
|
-
group: "dependency-resolve",
|
|
300485
|
-
status: "validated",
|
|
300486
|
-
text: "Resolved dependencies"
|
|
300487
|
-
});
|
|
300488
|
-
const previousReadyChanges = Object.values(clark.context.generatedChangeInfo ?? {}).filter((change) => change.status === "ready" && change.action !== "delete" && change.filePath.startsWith(DependencyInfoPath));
|
|
300489
|
-
for (const change of previousReadyChanges) {
|
|
300490
|
-
sendChangeInfo({
|
|
300491
|
-
type: "ready",
|
|
300492
|
-
filePath: change.filePath,
|
|
300493
|
-
action: "delete"
|
|
300494
|
-
});
|
|
300495
|
-
}
|
|
300496
|
-
void sendUserMessage({
|
|
300497
|
-
type: "control",
|
|
300498
|
-
group: "dependency-validate",
|
|
300499
|
-
status: "pending",
|
|
300500
|
-
text: "Verifying dependencies\u2026"
|
|
300501
|
-
});
|
|
300480
|
+
const handleDependencies = async (_packageJson) => {
|
|
300502
300481
|
await appShell.runNpmInstall(clark.context.abortController?.signal);
|
|
300503
|
-
for (const change of packageChanges) {
|
|
300504
|
-
sendChangeInfo({
|
|
300505
|
-
type: "validated",
|
|
300506
|
-
filePath: renderPath(DependencyInfoPath, {
|
|
300507
|
-
packageName: change.package
|
|
300508
|
-
})
|
|
300509
|
-
});
|
|
300510
|
-
}
|
|
300511
|
-
void sendUserMessage({
|
|
300512
|
-
type: "control",
|
|
300513
|
-
group: "dependency-validate",
|
|
300514
|
-
status: "validated",
|
|
300515
|
-
text: "Dependencies verified"
|
|
300516
|
-
});
|
|
300517
300482
|
};
|
|
300518
300483
|
return async ({ event }) => {
|
|
300519
300484
|
switch (event.type) {
|
|
@@ -300541,12 +300506,50 @@ var doPostProcessing = (clark, { draftInterface, appShell }) => {
|
|
|
300541
300506
|
scopes: [],
|
|
300542
300507
|
notApiArtifacts: []
|
|
300543
300508
|
});
|
|
300509
|
+
if (!clark.context.usedDebugging) {
|
|
300510
|
+
void sendUserMessage({
|
|
300511
|
+
type: "text",
|
|
300512
|
+
group: "agent-engineer",
|
|
300513
|
+
text: "Okay, my first pass at this app is complete. Let me pass off to the Security Agent to review."
|
|
300514
|
+
});
|
|
300515
|
+
void sendUserMessage({
|
|
300516
|
+
type: "control",
|
|
300517
|
+
group: "agent-security/libraries",
|
|
300518
|
+
status: "pending",
|
|
300519
|
+
text: "Checking external libraries"
|
|
300520
|
+
}, 500);
|
|
300521
|
+
void sendUserMessage({
|
|
300522
|
+
type: "control",
|
|
300523
|
+
group: "agent-security/libraries",
|
|
300524
|
+
status: "validated",
|
|
300525
|
+
text: "Checking external libraries"
|
|
300526
|
+
}, 1e3);
|
|
300527
|
+
}
|
|
300544
300528
|
if (packageJson) {
|
|
300545
300529
|
await createDraftFiles([packageJson]);
|
|
300546
300530
|
await handleDependencies(packageJson);
|
|
300547
300531
|
}
|
|
300548
300532
|
await createDraftFiles(scopes);
|
|
300549
300533
|
await createDraftFiles(notApiArtifacts);
|
|
300534
|
+
if (!clark.context.usedDebugging) {
|
|
300535
|
+
void sendUserMessage({
|
|
300536
|
+
type: "control",
|
|
300537
|
+
group: "agent-security/authz",
|
|
300538
|
+
status: "pending",
|
|
300539
|
+
text: "Reviewing authorization logic"
|
|
300540
|
+
});
|
|
300541
|
+
void sendUserMessage({
|
|
300542
|
+
type: "control",
|
|
300543
|
+
group: "agent-security/authz",
|
|
300544
|
+
status: "validated",
|
|
300545
|
+
text: "Reviewing authorization logic"
|
|
300546
|
+
}, 1e3);
|
|
300547
|
+
void sendUserMessage({
|
|
300548
|
+
type: "text",
|
|
300549
|
+
group: "agent-security",
|
|
300550
|
+
text: "Looks good to me! Handing off to the QA agent to review the functionality."
|
|
300551
|
+
});
|
|
300552
|
+
}
|
|
300550
300553
|
transitionTo({
|
|
300551
300554
|
type: POST_PROCESSING_FINISHED,
|
|
300552
300555
|
files
|
|
@@ -300565,78 +300568,6 @@ var doPostProcessing = (clark, { draftInterface, appShell }) => {
|
|
|
300565
300568
|
}
|
|
300566
300569
|
};
|
|
300567
300570
|
};
|
|
300568
|
-
var parsePackageJsonChanges = async (draftInterface, updatedPackageJsonContent) => {
|
|
300569
|
-
const diff2 = await draftInterface.getDraftDiff([Paths.PackageJson]);
|
|
300570
|
-
if (!diff2) {
|
|
300571
|
-
return [];
|
|
300572
|
-
}
|
|
300573
|
-
let updatedPackageJson;
|
|
300574
|
-
try {
|
|
300575
|
-
updatedPackageJson = JSON.parse(updatedPackageJsonContent);
|
|
300576
|
-
} catch {
|
|
300577
|
-
return [];
|
|
300578
|
-
}
|
|
300579
|
-
const allCurrentPackages = /* @__PURE__ */ new Set([
|
|
300580
|
-
// we only surface packages in the dependencies object
|
|
300581
|
-
...Object.keys(updatedPackageJson.dependencies || {})
|
|
300582
|
-
]);
|
|
300583
|
-
const changes = [];
|
|
300584
|
-
const lines = diff2.split("\n");
|
|
300585
|
-
const addedPackages = /* @__PURE__ */ new Set();
|
|
300586
|
-
const removedPackages = /* @__PURE__ */ new Set();
|
|
300587
|
-
const packageRegex = /^\s*"([^"]+)":\s*"[^"]*",?$/;
|
|
300588
|
-
for (const line3 of lines) {
|
|
300589
|
-
if (!line3.startsWith("+") && !line3.startsWith("-")) {
|
|
300590
|
-
continue;
|
|
300591
|
-
}
|
|
300592
|
-
if (line3.startsWith("+++") || line3.startsWith("---")) {
|
|
300593
|
-
continue;
|
|
300594
|
-
}
|
|
300595
|
-
const lineContent = line3.slice(1);
|
|
300596
|
-
const match3 = lineContent.match(packageRegex);
|
|
300597
|
-
if (match3) {
|
|
300598
|
-
const packageName = match3[1];
|
|
300599
|
-
if (!packageName) {
|
|
300600
|
-
continue;
|
|
300601
|
-
}
|
|
300602
|
-
if (line3.startsWith("+")) {
|
|
300603
|
-
if (allCurrentPackages.has(packageName)) {
|
|
300604
|
-
addedPackages.add(packageName);
|
|
300605
|
-
}
|
|
300606
|
-
} else if (line3.startsWith("-")) {
|
|
300607
|
-
if (!commonTopLevelPackageJsonFields.has(packageName)) {
|
|
300608
|
-
removedPackages.add(packageName);
|
|
300609
|
-
}
|
|
300610
|
-
}
|
|
300611
|
-
}
|
|
300612
|
-
}
|
|
300613
|
-
for (const packageName of addedPackages) {
|
|
300614
|
-
if (removedPackages.has(packageName)) {
|
|
300615
|
-
changes.push({ type: "edit", package: packageName });
|
|
300616
|
-
} else {
|
|
300617
|
-
changes.push({ type: "create", package: packageName });
|
|
300618
|
-
}
|
|
300619
|
-
}
|
|
300620
|
-
for (const packageName of removedPackages) {
|
|
300621
|
-
if (!addedPackages.has(packageName)) {
|
|
300622
|
-
changes.push({ type: "delete", package: packageName });
|
|
300623
|
-
}
|
|
300624
|
-
}
|
|
300625
|
-
return changes;
|
|
300626
|
-
};
|
|
300627
|
-
var commonTopLevelPackageJsonFields = /* @__PURE__ */ new Set([
|
|
300628
|
-
"name",
|
|
300629
|
-
"version",
|
|
300630
|
-
"description",
|
|
300631
|
-
"main",
|
|
300632
|
-
"scripts",
|
|
300633
|
-
"keywords",
|
|
300634
|
-
"author",
|
|
300635
|
-
"license",
|
|
300636
|
-
"repository",
|
|
300637
|
-
"homepage",
|
|
300638
|
-
"bugs"
|
|
300639
|
-
]);
|
|
300640
300571
|
|
|
300641
300572
|
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/runtime-reviewing.js
|
|
300642
300573
|
init_cjs_shims();
|
|
@@ -300658,6 +300589,23 @@ var doRuntimeReviewing = (clark, params) => {
|
|
|
300658
300589
|
...context2,
|
|
300659
300590
|
hasSuggestions: context2.hasSuggestions || files.length > 0
|
|
300660
300591
|
}));
|
|
300592
|
+
void sendUserMessage({
|
|
300593
|
+
type: "text",
|
|
300594
|
+
group: "agent-qa",
|
|
300595
|
+
text: "Great, I'll confirm this app works as expected."
|
|
300596
|
+
});
|
|
300597
|
+
void sendUserMessage({
|
|
300598
|
+
type: "control",
|
|
300599
|
+
group: "agent-qa/user-flows",
|
|
300600
|
+
status: "pending",
|
|
300601
|
+
text: "Validating user flows"
|
|
300602
|
+
});
|
|
300603
|
+
void sendUserMessage({
|
|
300604
|
+
type: "control",
|
|
300605
|
+
group: "agent-qa/api",
|
|
300606
|
+
status: "pending",
|
|
300607
|
+
text: "Testing API execution"
|
|
300608
|
+
});
|
|
300661
300609
|
const tsErrorsByPath = await params.appShell.runTypecheck(clark.context.abortController?.signal);
|
|
300662
300610
|
if (tsErrorsByPath) {
|
|
300663
300611
|
transitionTo({
|
|
@@ -300671,14 +300619,27 @@ var doRuntimeReviewing = (clark, params) => {
|
|
|
300671
300619
|
filePath
|
|
300672
300620
|
});
|
|
300673
300621
|
}
|
|
300622
|
+
let delay4 = 500;
|
|
300674
300623
|
if (clark.context.usedDebugging) {
|
|
300675
300624
|
void sendUserMessage({
|
|
300676
|
-
type: "
|
|
300677
|
-
group: "
|
|
300678
|
-
|
|
300679
|
-
text: "QA checks passed"
|
|
300625
|
+
type: "text",
|
|
300626
|
+
group: "agent-qa",
|
|
300627
|
+
text: "Looks like the Engineer Agent has fixed the bugs I've reported. We're good to go!"
|
|
300680
300628
|
});
|
|
300681
|
-
|
|
300629
|
+
delay4 = 0;
|
|
300630
|
+
}
|
|
300631
|
+
void sendUserMessage({
|
|
300632
|
+
type: "control",
|
|
300633
|
+
group: "agent-qa/user-flows",
|
|
300634
|
+
status: "validated",
|
|
300635
|
+
text: "Validating user flows"
|
|
300636
|
+
}, delay4);
|
|
300637
|
+
void sendUserMessage({
|
|
300638
|
+
type: "control",
|
|
300639
|
+
group: "agent-qa/api",
|
|
300640
|
+
status: "validated",
|
|
300641
|
+
text: "Testing API execution"
|
|
300642
|
+
}, delay4 + 500);
|
|
300682
300643
|
transitionTo({
|
|
300683
300644
|
type: RUNTIME_REVIEW_FINISHED
|
|
300684
300645
|
});
|
|
@@ -318365,7 +318326,7 @@ var import_util29 = __toESM(require_dist3(), 1);
|
|
|
318365
318326
|
// ../sdk/package.json
|
|
318366
318327
|
var package_default = {
|
|
318367
318328
|
name: "@superblocksteam/sdk",
|
|
318368
|
-
version: "2.0.0-next.
|
|
318329
|
+
version: "2.0.0-next.110",
|
|
318369
318330
|
type: "module",
|
|
318370
318331
|
description: "Superblocks JS SDK",
|
|
318371
318332
|
homepage: "https://www.superblocks.com",
|
|
@@ -318407,8 +318368,8 @@ var package_default = {
|
|
|
318407
318368
|
"@rollup/wasm-node": "^4.35.0",
|
|
318408
318369
|
"@superblocksteam/bucketeer-sdk": "0.5.0",
|
|
318409
318370
|
"@superblocksteam/shared": "0.9149.0",
|
|
318410
|
-
"@superblocksteam/util": "2.0.0-next.
|
|
318411
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.
|
|
318371
|
+
"@superblocksteam/util": "2.0.0-next.110",
|
|
318372
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.110",
|
|
318412
318373
|
"@vitejs/plugin-react": "^4.3.4",
|
|
318413
318374
|
axios: "^1.4.0",
|
|
318414
318375
|
chokidar: "^4.0.3",
|
|
@@ -325357,7 +325318,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
|
|
|
325357
325318
|
};
|
|
325358
325319
|
const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
|
|
325359
325320
|
const customFolder = path34.join(root2, "custom");
|
|
325360
|
-
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.
|
|
325321
|
+
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.110";
|
|
325361
325322
|
const env3 = loadEnv(mode, root2, "");
|
|
325362
325323
|
const hmrPort = await getFreePort();
|
|
325363
325324
|
const hmrOptions = {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/cli",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.110",
|
|
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.
|
|
45
|
+
"@superblocksteam/sdk": "2.0.0-next.110",
|
|
46
46
|
"@superblocksteam/shared": "0.9149.0",
|
|
47
|
-
"@superblocksteam/util": "2.0.0-next.
|
|
47
|
+
"@superblocksteam/util": "2.0.0-next.110",
|
|
48
48
|
"@types/babel__core": "^7.20.0",
|
|
49
49
|
"@types/chai": "^4",
|
|
50
50
|
"@types/fs-extra": "^11.0.1",
|