@growthub/create-growthub-local 0.5.2 → 0.5.4
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.
|
@@ -9,20 +9,19 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
11
|
|
|
12
|
-
const VALID_PROFILES = new Set(["dx", "gtm", "workspace"]);
|
|
12
|
+
const VALID_PROFILES = new Set(["dx", "gtm", "workspace", "self-improving"]);
|
|
13
13
|
const VALID_REMOTE_SYNC_MODES = new Set(["off", "branch", "pr"]);
|
|
14
14
|
|
|
15
15
|
function printUsage() {
|
|
16
16
|
console.log(
|
|
17
17
|
[
|
|
18
18
|
"Usage:",
|
|
19
|
-
" create-growthub-local [--profile <dx|gtm|workspace>] [--out <path>]",
|
|
19
|
+
" create-growthub-local [--profile <dx|gtm|workspace|self-improving>] [--out <path>]",
|
|
20
20
|
" [--data-dir <path>] [--config <path>]",
|
|
21
21
|
" [--run]",
|
|
22
22
|
"",
|
|
23
|
-
"
|
|
24
|
-
" create-growthub-local --profile
|
|
25
|
-
" create-growthub-local --profile dx --data-dir ./my-growthub",
|
|
23
|
+
"Fastest path — Self-Improving Governed Workspace:",
|
|
24
|
+
" create-growthub-local --profile self-improving --out ./my-workspace",
|
|
26
25
|
"",
|
|
27
26
|
"Custom Workspace Starter profile (workspace):",
|
|
28
27
|
" create-growthub-local --profile workspace --out ./my-workspace",
|
|
@@ -30,6 +29,10 @@ function printUsage() {
|
|
|
30
29
|
" create-growthub-local --profile workspace --out ./my-workspace \\",
|
|
31
30
|
" --upstream Growthub-ai/growthub-custom-workspace-starter-v1 --remote-sync-mode off",
|
|
32
31
|
"",
|
|
32
|
+
"Paperclip Local App profiles (dx | gtm):",
|
|
33
|
+
" create-growthub-local --profile gtm",
|
|
34
|
+
" create-growthub-local --profile dx --data-dir ./my-growthub",
|
|
35
|
+
"",
|
|
33
36
|
"Discovery mode (no profile):",
|
|
34
37
|
" create-growthub-local # opens `growthub discover` picker",
|
|
35
38
|
].join("\n"),
|
|
@@ -147,12 +150,12 @@ function parseArgs(argv) {
|
|
|
147
150
|
["--fork-name", opts.forkName],
|
|
148
151
|
["--remote-sync-mode", opts.remoteSyncMode],
|
|
149
152
|
];
|
|
150
|
-
if (opts.profile !== "workspace") {
|
|
153
|
+
if (opts.profile !== "workspace" && opts.profile !== "self-improving") {
|
|
151
154
|
for (const [flag, value] of workspaceOnlyFlags) {
|
|
152
155
|
if (value !== null) {
|
|
153
156
|
printUsage();
|
|
154
157
|
console.error(
|
|
155
|
-
`${flag} is only valid with --profile workspace
|
|
158
|
+
`${flag} is only valid with --profile workspace or --profile self-improving.`,
|
|
156
159
|
);
|
|
157
160
|
process.exit(1);
|
|
158
161
|
}
|
|
@@ -186,6 +189,20 @@ function resolveGrowthubCliEntrypoint() {
|
|
|
186
189
|
}
|
|
187
190
|
|
|
188
191
|
function buildCliArgs(opts, effectiveDataDir, growthubCli) {
|
|
192
|
+
// --profile self-improving → same as workspace (custom-workspace-starter kit)
|
|
193
|
+
// The self-improving feature is an optional extension on any governed workspace,
|
|
194
|
+
// not a separate kit. We scaffold the standard kit and print guidance.
|
|
195
|
+
if (opts.profile === "self-improving") {
|
|
196
|
+
const outArg = opts.out ?? "./my-workspace";
|
|
197
|
+
const absOut = path.resolve(process.cwd(), outArg);
|
|
198
|
+
const args = [growthubCli, "starter", "init",
|
|
199
|
+
"--kit", "growthub-custom-workspace-starter-v1",
|
|
200
|
+
"--out", absOut,
|
|
201
|
+
];
|
|
202
|
+
if (opts.json) args.push("--json");
|
|
203
|
+
return args;
|
|
204
|
+
}
|
|
205
|
+
|
|
189
206
|
// --profile workspace → forward into `growthub starter init`
|
|
190
207
|
// (the Custom Workspace Starter surface, which composes
|
|
191
208
|
// copyBundledKitSource + registerKitFork + writeKitForkPolicy
|
|
@@ -242,6 +259,9 @@ function buildCliEnv(opts) {
|
|
|
242
259
|
if (opts.profile === "dx" || opts.profile === "gtm") {
|
|
243
260
|
env.PAPERCLIP_SURFACE_PROFILE = opts.profile;
|
|
244
261
|
}
|
|
262
|
+
if (opts.profile === "self-improving") {
|
|
263
|
+
env.GROWTHUB_WORKSPACE_PROFILE = "self-improving";
|
|
264
|
+
}
|
|
245
265
|
return env;
|
|
246
266
|
}
|
|
247
267
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@growthub/create-growthub-local",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Growthub Local is a control plane for forked worker kits. The CLI is the executor, the hosted app is the identity authority, the worker kit is the unit of portable agent infrastructure, and the fork is the operator's personal branch of that infrastructure — policy-governed, trace-backed, and self-healing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@growthub/cli": "0.9.
|
|
26
|
+
"@growthub/cli": "0.9.4"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"growthub",
|