@growthub/cli 0.9.8 → 0.9.10
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 +23 -5
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/SKILL.md +8 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/.env.example +8 -8
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/README.md +9 -7
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/settings/integrations/route.js +2 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/route.js +4 -4
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/globals.css +1264 -19
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/settings/integrations/page.jsx +111 -77
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-builder.jsx +1691 -138
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/growthub.config.json +8 -3
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/adapters/env.js +9 -7
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/adapters/integrations/index.js +10 -10
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/domain/integrations.js +2 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-config.js +62 -7
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-schema.js +220 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/package-lock.json +10 -64
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/package.json +1 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/kit.json +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,20 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
`@growthub/cli` is the CLI control plane for Growthub Local.
|
|
4
4
|
|
|
5
|
-
It
|
|
5
|
+
It creates governed **Workspaces** from any source — repo, skill, kit, template, or greenfield. The Workspace is the top-level product object; this CLI is the local executor that creates, customizes, and inspects them.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Start here: create a governed Workspace
|
|
8
|
+
|
|
9
|
+
Power-user one-liner that exports the official starter directly:
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
|
|
12
|
+
npx -p @growthub/cli@latest growthub kit download growthub-custom-workspace-starter-v1 --out ./my-workspace
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or the guided installer:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm create @growthub/growthub-local@latest
|
|
11
19
|
```
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
After export, open the no-code Workspace Builder:
|
|
14
22
|
|
|
15
23
|
```bash
|
|
16
|
-
|
|
24
|
+
cd my-workspace/apps/workspace
|
|
25
|
+
npm install
|
|
26
|
+
npm run dev
|
|
17
27
|
```
|
|
18
28
|
|
|
29
|
+
## Install (CLI only)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @growthub/cli
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Reference contracts: [Workspace Config Contract V1](../docs/WORKSPACE_CONFIG_CONTRACT_V1.md) · [Governed Workspace Topology V1](../docs/GOVERNED_WORKSPACE_TOPOLOGY_V1.md) · [Workspace Builder Runtime V1](../docs/WORKSPACE_BUILDER_RUNTIME_V1.md)
|
|
36
|
+
|
|
19
37
|
## Profile-first setup (recommended)
|
|
20
38
|
|
|
21
39
|
The guided flow is profile-first before deeper harness/workflow choices:
|
|
@@ -33,9 +33,11 @@ subSkills: []
|
|
|
33
33
|
mcpTools: []
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
# Custom Workspace Starter — Baseline Primitive
|
|
36
|
+
# Custom Workspace Starter — Baseline Primitive for the Governed Workspace product object
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
The **Workspace** is the top-level Growthub Local product object. This kit is the official starter that bootstraps every governed Workspace; everything else (worker kits, templates, workflows, hosted agents, source imports) is an input to a Workspace.
|
|
39
|
+
|
|
40
|
+
Every Growthub governed Workspace is materialised from this kit. The kit ships the `.growthub-fork/` contract (identity, policy, trace, optional authority), the `apps/workspace` no-code Workspace Builder, the validated `growthub.config.json` V1 contract, plus the six primitive layers Claude/Cursor/Codex agents operate against:
|
|
39
41
|
|
|
40
42
|
1. **`SKILL.md`** — this file. Discovery entry + routing menu. Always loaded first; the full operator runbook (`skills.md`) is disclosed progressively when work begins.
|
|
41
43
|
2. **`skills.md`** — the deep operator runbook. Everything the operator agent needs to actually customise the workspace. Unchanged from v1.
|
|
@@ -154,3 +156,7 @@ If a concrete MCP server is available for this fork, list its tool IDs in `mcpTo
|
|
|
154
156
|
- `helpers/README.md` — helpers convention
|
|
155
157
|
- `skills/README.md` — sub-skills convention
|
|
156
158
|
- `workers/custom-workspace-operator/CLAUDE.md` — agent contract
|
|
159
|
+
- `apps/workspace/` — the no-code Workspace Builder Next.js app (V1 runtime)
|
|
160
|
+
- `apps/workspace/lib/workspace-schema.js` — Workspace Config Contract V1 (validator + grid invariants)
|
|
161
|
+
- `apps/workspace/lib/workspace-config.js` — persistence adapter (filesystem / read-only / future database)
|
|
162
|
+
- `growthub.config.json` — persisted Workspace Config (V1 reference instance)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Core adapter selectors
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
GROWTHUB_WORKSPACE_DEPLOY_TARGET=vercel
|
|
3
|
+
GROWTHUB_WORKSPACE_DATA_ADAPTER=provider-managed
|
|
4
|
+
GROWTHUB_WORKSPACE_AUTH_ADAPTER=provider-managed
|
|
5
|
+
GROWTHUB_WORKSPACE_PAYMENT_ADAPTER=none
|
|
6
6
|
|
|
7
7
|
# Integration mode
|
|
8
8
|
# - growthub-bridge: hosted Growthub account authority
|
|
9
9
|
# - byo-api-key: workspace-owned connection metadata
|
|
10
10
|
# - static: local starter catalog only
|
|
11
|
-
|
|
11
|
+
GROWTHUB_WORKSPACE_INTEGRATION_ADAPTER=growthub-bridge
|
|
12
12
|
|
|
13
13
|
# Hosted bridge authority
|
|
14
14
|
GROWTHUB_BRIDGE_BASE_URL=https://www.growthub.ai
|
|
@@ -19,11 +19,11 @@ GROWTHUB_BRIDGE_USER_ID=
|
|
|
19
19
|
# Optional Windsor reporting lane.
|
|
20
20
|
# Hybrid first boot: keep growthub-bridge authority and set WINDSOR_API_KEY
|
|
21
21
|
# to mark Windsor AI + Google Sheets blended data connected locally.
|
|
22
|
-
|
|
22
|
+
GROWTHUB_WORKSPACE_REPORTING_ADAPTER=windsor
|
|
23
23
|
WINDSOR_API_KEY=
|
|
24
24
|
|
|
25
25
|
# Optional BYO connection metadata
|
|
26
|
-
|
|
26
|
+
GROWTHUB_WORKSPACE_BYO_CONNECTIONS_JSON=
|
|
27
27
|
|
|
28
28
|
# Optional payment/auth/database env selected by adapter values above
|
|
29
29
|
DATABASE_URL=
|
|
@@ -38,4 +38,4 @@ PAYMENT_WEBHOOK_SECRET=
|
|
|
38
38
|
|
|
39
39
|
# Optional app settings
|
|
40
40
|
CRON_SECRET=
|
|
41
|
-
|
|
41
|
+
GROWTHUB_WORKSPACE_USER_ID=
|
|
@@ -4,15 +4,15 @@ This app is the Vercel/serverless runtime payload for `growthub-workspace-starte
|
|
|
4
4
|
|
|
5
5
|
It intentionally depends on adapter contracts:
|
|
6
6
|
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
7
|
+
- `GROWTHUB_WORKSPACE_DATA_ADAPTER`
|
|
8
|
+
- `GROWTHUB_WORKSPACE_AUTH_ADAPTER`
|
|
9
|
+
- `GROWTHUB_WORKSPACE_PAYMENT_ADAPTER`
|
|
10
|
+
- `GROWTHUB_WORKSPACE_INTEGRATION_ADAPTER`
|
|
11
11
|
- `GROWTHUB_BRIDGE_BASE_URL`
|
|
12
12
|
- `GROWTHUB_BRIDGE_INTEGRATIONS_PATH`
|
|
13
13
|
- `GROWTHUB_BRIDGE_ACCESS_TOKEN`
|
|
14
14
|
- `GROWTHUB_BRIDGE_USER_ID`
|
|
15
|
-
- `
|
|
15
|
+
- `GROWTHUB_WORKSPACE_BYO_CONNECTIONS_JSON`
|
|
16
16
|
|
|
17
17
|
The Growthub local-first operator shell remains at `../../studio`.
|
|
18
18
|
|
|
@@ -21,9 +21,11 @@ Settings exposes two integration lanes:
|
|
|
21
21
|
- Data sources: Windsor AI, Google Sheets blended data, Google Analytics, Shopify, Meta Facebook/Instagram.
|
|
22
22
|
- Workspace integrations: Asana, Slack, GoHighLevel, Google Drive, Notion.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
The `/settings/integrations` page is part of the official governed workspace app shell. It uses the same light workspace rail, toolbar, and product object model as the dashboard workspace, and it renders Growthub bridge account state without redirecting to or borrowing the agency portal kit.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Use `GROWTHUB_WORKSPACE_INTEGRATION_ADAPTER=growthub-bridge` when the deployed app should read connection state from the Growthub GH app MCP bridge. The reusable primitive is `lib/adapters/integrations/growthub-connection-normalizer.js`; it accepts SDK/profile-style `integrations[]` payloads and GH app MCP `accounts[]` payloads, then emits the same normalized object shape used by `byo-api-key`. Keep provider tokens in the hosted authority layer or named env vars; this app consumes normalized connection metadata only.
|
|
27
|
+
|
|
28
|
+
For first boot, the bundled app also supports a hybrid path: keep `GROWTHUB_WORKSPACE_INTEGRATION_ADAPTER=growthub-bridge` and set `WINDSOR_API_KEY` locally. That overlays connected state for Windsor AI and Google Sheets blended data without moving the rest of the workspace off the hosted bridge authority path.
|
|
27
29
|
|
|
28
30
|
## Run
|
|
29
31
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NextResponse } from "next/server";
|
|
2
|
-
import { describeIntegrationAdapter,
|
|
2
|
+
import { describeIntegrationAdapter, listGovernedWorkspaceIntegrations } from "@/lib/adapters/integrations";
|
|
3
3
|
import { groupIntegrationsByLane } from "@/lib/domain/integrations";
|
|
4
4
|
async function GET() {
|
|
5
|
-
const integrations = await
|
|
5
|
+
const integrations = await listGovernedWorkspaceIntegrations();
|
|
6
6
|
return NextResponse.json({
|
|
7
7
|
adapter: describeIntegrationAdapter(),
|
|
8
8
|
...groupIntegrationsByLane(integrations)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NextResponse } from "next/server";
|
|
2
2
|
import { describeAuthAdapter } from "@/lib/adapters/auth";
|
|
3
3
|
import { readAdapterConfig } from "@/lib/adapters/env";
|
|
4
|
-
import { describeIntegrationAdapter,
|
|
4
|
+
import { describeIntegrationAdapter, listGovernedWorkspaceIntegrations } from "@/lib/adapters/integrations";
|
|
5
5
|
import { describePaymentAdapter } from "@/lib/adapters/payments";
|
|
6
6
|
import { describePersistenceAdapter } from "@/lib/adapters/persistence";
|
|
7
7
|
import { groupIntegrationsByLane } from "@/lib/domain/integrations";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
const ALLOWED_PATCH_FIELDS = new Set(["dashboards", "widgetTypes", "canvas"]);
|
|
16
16
|
|
|
17
17
|
async function GET() {
|
|
18
|
-
const integrations = await
|
|
18
|
+
const integrations = await listGovernedWorkspaceIntegrations();
|
|
19
19
|
const config = readAdapterConfig();
|
|
20
20
|
const adapters = {
|
|
21
21
|
persistence: describePersistenceAdapter(),
|
|
@@ -72,8 +72,8 @@ async function PATCH(request) {
|
|
|
72
72
|
error: "workspace config is read-only in this runtime",
|
|
73
73
|
reason: error.message,
|
|
74
74
|
adapter: error.adapter,
|
|
75
|
-
guidance:
|
|
76
|
-
"Edit growthub.config.json locally, or set WORKSPACE_CONFIG_ALLOW_FS_WRITE=true on a writable runtime."
|
|
75
|
+
guidance: error.guidance
|
|
76
|
+
|| "Edit growthub.config.json locally, or set WORKSPACE_CONFIG_ALLOW_FS_WRITE=true on a writable runtime."
|
|
77
77
|
},
|
|
78
78
|
{ status: 409 }
|
|
79
79
|
);
|