@growthub/cli 0.3.45 → 0.3.46
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 +36 -49
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ For the agent-facing extension workflow, see [docs/CLI_TEMPLATE_CONTRIBUTION_EXT
|
|
|
146
146
|
|
|
147
147
|
## Development Notes
|
|
148
148
|
|
|
149
|
-
- `@growthub/cli` version: `0.3.
|
|
149
|
+
- `@growthub/cli` version: `0.3.46`
|
|
150
150
|
- Node.js: `>=20`
|
|
151
151
|
- Source of truth repo: [Growthub Local](https://github.com/Growthub-ai/growthub-local)
|
|
152
152
|
|
package/dist/index.js
CHANGED
|
@@ -8321,7 +8321,7 @@ var SECTION_LABELS = {
|
|
|
8321
8321
|
};
|
|
8322
8322
|
function defaultConfig() {
|
|
8323
8323
|
const instanceId = resolvePaperclipInstanceId();
|
|
8324
|
-
|
|
8324
|
+
const config = {
|
|
8325
8325
|
$meta: {
|
|
8326
8326
|
version: 1,
|
|
8327
8327
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -8360,6 +8360,7 @@ function defaultConfig() {
|
|
|
8360
8360
|
storage: defaultStorageConfig(),
|
|
8361
8361
|
secrets: defaultSecretsConfig()
|
|
8362
8362
|
};
|
|
8363
|
+
return config;
|
|
8363
8364
|
}
|
|
8364
8365
|
async function configure(opts) {
|
|
8365
8366
|
printPaperclipCliBanner();
|
|
@@ -13338,6 +13339,7 @@ function downloadBundledKit(kitId, outDir, options = {}) {
|
|
|
13338
13339
|
}
|
|
13339
13340
|
|
|
13340
13341
|
// src/commands/kit.ts
|
|
13342
|
+
init_banner();
|
|
13341
13343
|
var TYPE_CONFIG = {
|
|
13342
13344
|
studio: { color: pc23.cyan, emoji: "\u{1F6E0}\uFE0F", label: "Custom Workspaces" },
|
|
13343
13345
|
specialized_agents: { color: pc23.magenta, emoji: "\u{1F9E0}", label: "Specialized Agents" },
|
|
@@ -13414,12 +13416,15 @@ function printKitCard(item) {
|
|
|
13414
13416
|
`${pc23.dim("Brief:")} ${pc23.dim(item.briefType)} ${pc23.dim("Mode:")} ${pc23.dim(item.executionMode)}`
|
|
13415
13417
|
]));
|
|
13416
13418
|
}
|
|
13419
|
+
function getActionLabel(action) {
|
|
13420
|
+
if (action === "download") return "download";
|
|
13421
|
+
if (action === "inspect") return "inspect";
|
|
13422
|
+
if (action === "copy-id") return "print id";
|
|
13423
|
+
return action;
|
|
13424
|
+
}
|
|
13417
13425
|
async function confirmKitActions(input) {
|
|
13418
13426
|
const actionLabels = input.actions.map((action) => {
|
|
13419
|
-
|
|
13420
|
-
if (action === "inspect") return "inspect";
|
|
13421
|
-
if (action === "copy-id") return "print id";
|
|
13422
|
-
return action;
|
|
13427
|
+
return getActionLabel(action);
|
|
13423
13428
|
});
|
|
13424
13429
|
const summaryLines = [
|
|
13425
13430
|
pc23.bold("Selected kits"),
|
|
@@ -13470,6 +13475,7 @@ ${header} ${pc23.dim("(" + groupKits.length + ")")}`);
|
|
|
13470
13475
|
console.log("");
|
|
13471
13476
|
}
|
|
13472
13477
|
async function runInteractivePicker(opts) {
|
|
13478
|
+
printPaperclipCliBanner();
|
|
13473
13479
|
p16.intro(pc23.bold("Growthub Agent Worker Kits"));
|
|
13474
13480
|
let kits;
|
|
13475
13481
|
try {
|
|
@@ -13542,45 +13548,29 @@ async function runInteractivePicker(opts) {
|
|
|
13542
13548
|
}
|
|
13543
13549
|
if (nextStep === "back_to_kits") continue;
|
|
13544
13550
|
while (true) {
|
|
13545
|
-
const
|
|
13546
|
-
{ value: "download", label: "\u2B07\uFE0F Download kit", hint: "growthub kit download <id>" },
|
|
13547
|
-
{ value: "inspect", label: "\u{1F50D} Inspect manifest", hint: "growthub kit inspect <id>" },
|
|
13548
|
-
{ value: "copy-id", label: "\u{1F4CB} Print ID to stdout", hint: "echo <kit-id>" }
|
|
13549
|
-
];
|
|
13550
|
-
const actions = await p16.multiselect({
|
|
13551
|
+
const action = await p16.select({
|
|
13551
13552
|
message: "What would you like to do?",
|
|
13552
|
-
options:
|
|
13553
|
-
|
|
13553
|
+
options: [
|
|
13554
|
+
{ value: "download", label: "\u2B07\uFE0F Download kit", hint: "growthub kit download <id>" },
|
|
13555
|
+
{ value: "inspect", label: "\u{1F50D} Inspect manifest", hint: "growthub kit inspect <id>" },
|
|
13556
|
+
{ value: "copy-id", label: "\u{1F4CB} Print ID to stdout", hint: "echo <kit-id>" },
|
|
13557
|
+
{ value: "back_to_kits", label: "\u2190 Back to kit list" }
|
|
13558
|
+
]
|
|
13554
13559
|
});
|
|
13555
|
-
if (p16.isCancel(
|
|
13560
|
+
if (p16.isCancel(action)) {
|
|
13556
13561
|
p16.cancel("Cancelled.");
|
|
13557
13562
|
process.exit(0);
|
|
13558
13563
|
}
|
|
13559
|
-
|
|
13560
|
-
if (selectedActions.length === 0) {
|
|
13561
|
-
const emptyActionChoice = await p16.select({
|
|
13562
|
-
message: "No actions selected",
|
|
13563
|
-
options: [
|
|
13564
|
-
{ value: "retry", label: "Choose action(s)" },
|
|
13565
|
-
{ value: "back_to_kits", label: "\u2190 Back to kit list" }
|
|
13566
|
-
]
|
|
13567
|
-
});
|
|
13568
|
-
if (p16.isCancel(emptyActionChoice)) {
|
|
13569
|
-
p16.cancel("Cancelled.");
|
|
13570
|
-
process.exit(0);
|
|
13571
|
-
}
|
|
13572
|
-
if (emptyActionChoice === "back_to_kits") break;
|
|
13573
|
-
continue;
|
|
13574
|
-
}
|
|
13564
|
+
if (action === "back_to_kits") break;
|
|
13575
13565
|
const confirmed = await confirmKitActions({
|
|
13576
13566
|
kits: [selected],
|
|
13577
|
-
actions:
|
|
13567
|
+
actions: [action]
|
|
13578
13568
|
});
|
|
13579
13569
|
if (!confirmed) {
|
|
13580
13570
|
const reviewChoice = await p16.select({
|
|
13581
13571
|
message: "Review selection",
|
|
13582
13572
|
options: [
|
|
13583
|
-
{ value: "actions", label:
|
|
13573
|
+
{ value: "actions", label: `Choose ${getActionLabel(action)} again` },
|
|
13584
13574
|
{ value: "back_to_kits", label: "\u2190 Back to kit list" }
|
|
13585
13575
|
]
|
|
13586
13576
|
});
|
|
@@ -13591,24 +13581,18 @@ async function runInteractivePicker(opts) {
|
|
|
13591
13581
|
if (reviewChoice === "back_to_kits") break;
|
|
13592
13582
|
continue;
|
|
13593
13583
|
}
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
console.log(selected.id);
|
|
13597
|
-
continue;
|
|
13598
|
-
}
|
|
13599
|
-
if (action === "inspect") {
|
|
13600
|
-
runInspect(selected.id, opts.out);
|
|
13601
|
-
continue;
|
|
13602
|
-
}
|
|
13603
|
-
if (action === "download") {
|
|
13604
|
-
await runDownload(selected.id, opts);
|
|
13605
|
-
}
|
|
13606
|
-
}
|
|
13607
|
-
if (selectedActions.includes("copy-id")) {
|
|
13584
|
+
if (action === "copy-id") {
|
|
13585
|
+
console.log(selected.id);
|
|
13608
13586
|
p16.outro(pc23.dim("Kit ID printed above."));
|
|
13609
13587
|
return "done";
|
|
13610
13588
|
}
|
|
13611
|
-
|
|
13589
|
+
if (action === "inspect") {
|
|
13590
|
+
runInspect(selected.id, opts.out);
|
|
13591
|
+
p16.outro(pc23.dim("Done."));
|
|
13592
|
+
return "done";
|
|
13593
|
+
}
|
|
13594
|
+
await runDownload(selected.id, opts);
|
|
13595
|
+
p16.outro(pc23.green("Kit exported successfully."));
|
|
13612
13596
|
return "done";
|
|
13613
13597
|
}
|
|
13614
13598
|
}
|
|
@@ -13636,6 +13620,9 @@ async function runDownload(kitId, opts) {
|
|
|
13636
13620
|
const result = downloadBundledKit(resolvedId, opts.out, {
|
|
13637
13621
|
onProgress: renderProgressBar
|
|
13638
13622
|
});
|
|
13623
|
+
console.log("");
|
|
13624
|
+
console.log(pc23.green(pc23.bold("Kit exported successfully.")));
|
|
13625
|
+
console.log("");
|
|
13639
13626
|
const nextSteps = [
|
|
13640
13627
|
pc23.bold("Next steps"),
|
|
13641
13628
|
"",
|
|
@@ -13820,7 +13807,7 @@ Examples:
|
|
|
13820
13807
|
console.log(pc23.bold("Kit Family Taxonomy"));
|
|
13821
13808
|
console.log(hr());
|
|
13822
13809
|
for (const def of defs) {
|
|
13823
|
-
console.log("\n " +
|
|
13810
|
+
console.log("\n " + typeBadge(def.family));
|
|
13824
13811
|
console.log(" " + pc23.dim(def.tagline));
|
|
13825
13812
|
console.log(" " + pc23.dim("Surfaces: ") + pc23.dim(def.surfaces));
|
|
13826
13813
|
console.log(" " + pc23.dim("Example: ") + pc23.cyan(def.example));
|
|
@@ -14727,7 +14714,7 @@ applyDataDirOverride(bootstrapOptions, {
|
|
|
14727
14714
|
loadPaperclipEnvFile(bootstrapOptions.config);
|
|
14728
14715
|
var bootstrapConfig = readConfig(resolveConfigPath(bootstrapOptions.config));
|
|
14729
14716
|
var surfaceRuntime = initializeSurfaceRuntimeContract(resolveSurfaceProfile(bootstrapConfig) ?? void 0);
|
|
14730
|
-
program.name("growthub").description("Growthub CLI \u2014 setup, configure, and run your local Growthub instance").version("0.3.
|
|
14717
|
+
program.name("growthub").description("Growthub CLI \u2014 setup, configure, and run your local Growthub instance").version("0.3.46").addHelpText("after", `
|
|
14731
14718
|
Worker Kits (agent execution environments):
|
|
14732
14719
|
|
|
14733
14720
|
Discovery:
|