@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.
Files changed (19) hide show
  1. package/README.md +23 -5
  2. package/assets/worker-kits/growthub-custom-workspace-starter-v1/SKILL.md +8 -2
  3. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/.env.example +8 -8
  4. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/README.md +9 -7
  5. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/settings/integrations/route.js +2 -2
  6. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/route.js +4 -4
  7. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/globals.css +1264 -19
  8. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/settings/integrations/page.jsx +111 -77
  9. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-builder.jsx +1691 -138
  10. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/growthub.config.json +8 -3
  11. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/adapters/env.js +9 -7
  12. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/adapters/integrations/index.js +10 -10
  13. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/domain/integrations.js +2 -2
  14. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-config.js +62 -7
  15. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-schema.js +220 -2
  16. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/package-lock.json +10 -64
  17. package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/package.json +1 -0
  18. package/assets/worker-kits/growthub-custom-workspace-starter-v1/kit.json +3 -0
  19. 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 helps you turn a repo, skill, starter, or kit into a governed local agent environment you can customize, keep current, and optionally activate with hosted authority.
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
- ## Install
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
- npm install -g @growthub/cli
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
- Or start with the guided installer:
21
+ After export, open the no-code Workspace Builder:
14
22
 
15
23
  ```bash
16
- npm create growthub-local@latest
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
- Every Growthub governed workspace is materialised from this kit. The kit ships the `.growthub-fork/` contract (identity, policy, trace, optional authority) plus the six primitive layers Claude/Cursor/Codex agents operate against:
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
- AGENCY_PORTAL_DEPLOY_TARGET=vercel
3
- AGENCY_PORTAL_DATA_ADAPTER=provider-managed
4
- AGENCY_PORTAL_AUTH_ADAPTER=provider-managed
5
- AGENCY_PORTAL_PAYMENT_ADAPTER=none
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
- AGENCY_PORTAL_INTEGRATION_ADAPTER=growthub-bridge
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
- AGENCY_PORTAL_REPORTING_ADAPTER=windsor
22
+ GROWTHUB_WORKSPACE_REPORTING_ADAPTER=windsor
23
23
  WINDSOR_API_KEY=
24
24
 
25
25
  # Optional BYO connection metadata
26
- AGENCY_PORTAL_BYO_CONNECTIONS_JSON=
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
- PORTAL_USER_ID=
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
- - `AGENCY_PORTAL_DATA_ADAPTER`
8
- - `AGENCY_PORTAL_AUTH_ADAPTER`
9
- - `AGENCY_PORTAL_PAYMENT_ADAPTER`
10
- - `AGENCY_PORTAL_INTEGRATION_ADAPTER`
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
- - `AGENCY_PORTAL_BYO_CONNECTIONS_JSON`
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
- Use `AGENCY_PORTAL_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.
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
- For first boot, the bundled app also supports a hybrid path: keep `AGENCY_PORTAL_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 portal off the hosted bridge authority path.
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, listAgencyPortalIntegrations } from "@/lib/adapters/integrations";
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 listAgencyPortalIntegrations();
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, listAgencyPortalIntegrations } from "@/lib/adapters/integrations";
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 listAgencyPortalIntegrations();
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
  );