@growthub/cli 0.3.59 → 0.3.60
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/assets/worker-kits/growthub-zernio-social-v1/.env.example +5 -0
- package/assets/worker-kits/growthub-zernio-social-v1/QUICKSTART.md +36 -4
- package/assets/worker-kits/growthub-zernio-social-v1/bundles/growthub-zernio-social-v1.json +30 -1
- package/assets/worker-kits/growthub-zernio-social-v1/docs/growthub-agentic-social-platform-ui-shell.md +134 -0
- package/assets/worker-kits/growthub-zernio-social-v1/docs/local-adapters.md +2 -2
- package/assets/worker-kits/growthub-zernio-social-v1/growthub-meta/README.md +5 -8
- package/assets/worker-kits/growthub-zernio-social-v1/growthub-meta/kit-standard.md +1 -1
- package/assets/worker-kits/growthub-zernio-social-v1/kit.json +33 -1
- package/assets/worker-kits/growthub-zernio-social-v1/skills.md +1 -1
- package/assets/worker-kits/growthub-zernio-social-v1/studio/.env.example +3 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/dist/assets/index-DTmBMuXr.js +78 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/dist/assets/index-gHr-nTMF.css +1 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/dist/index.html +14 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/index.html +13 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/package-lock.json +1677 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/package.json +20 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/serve.mjs +60 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/App.jsx +130 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/api.js +146 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/app.css +558 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/lib/rules.js +64 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/lib/templates.js +207 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/main.jsx +10 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Accounts.jsx +57 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Agent.jsx +167 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Analytics.jsx +164 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/ApiKeys.jsx +143 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Automations.jsx +122 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/CommentRules.jsx +592 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Compose.jsx +185 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Dashboard.jsx +87 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Inbox.jsx +144 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Queues.jsx +167 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Scheduled.jsx +85 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Sequences.jsx +160 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Templates.jsx +275 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/vite.config.js +7 -0
- package/assets/worker-kits/growthub-zernio-social-v1/workers/zernio-social-operator/CLAUDE.md +3 -3
- package/dist/index.js +1183 -592
- package/package.json +1 -1
- package/assets/worker-kits/growthub-zernio-social-v1/docs/postiz-ui-shell-integration.md +0 -166
package/package.json
CHANGED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Postiz UI Shell + Zernio Engine — Integration Recipe
|
|
2
|
-
|
|
3
|
-
This document is the canonical recipe for running `growthub-zernio-social-v1` as the engine layer underneath the stable `growthub-postiz-social-v1` kit's UI shell.
|
|
4
|
-
|
|
5
|
-
**Read order:** `../runtime-assumptions.md` → `./zernio-api-integration.md` → this file.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Architectural split
|
|
10
|
-
|
|
11
|
-
| Layer | Owned by | What it does |
|
|
12
|
-
|---|---|---|
|
|
13
|
-
| Presentation | `growthub-postiz-social-v1` (Postiz UI) | Calendar, compose, analytics shell, team workspace |
|
|
14
|
-
| Engine | `growthub-zernio-social-v1` (this kit) | Posts, queues, media, inbox, analytics transport against Zernio REST API |
|
|
15
|
-
|
|
16
|
-
**Core principle:** Postiz stays the UI. Zernio replaces Postiz's native provider/posting engine. Nothing in Postiz's own database schema, Redis queue runner, React app, or auth/team/workspace system changes. The diff surface is the provider + publish-bridge layers only.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## The 7 Module Integration Map
|
|
21
|
-
|
|
22
|
-
### Module 1 — Provider Override (Zernio as the transport)
|
|
23
|
-
|
|
24
|
-
Postiz's provider system is where per-platform OAuth and posting normally live. Replace it with a single `ZernioProvider`:
|
|
25
|
-
|
|
26
|
-
- `baseUrl` → `https://zernio.com/api/v1`
|
|
27
|
-
- `authHeader` → `Authorization: Bearer ${ZERNIO_API_KEY}`
|
|
28
|
-
- All 14 platforms route through this one provider — no per-platform OAuth apps on the Postiz side
|
|
29
|
-
- Postiz's "Connect Account" UI validates `ZERNIO_API_KEY` instead of OAuth dancing — Zernio handles all OAuth upstream
|
|
30
|
-
|
|
31
|
-
The config for this provider mirrors exactly `buildZernioSocialConfig()` in `cli/src/kits/core/index.ts`:
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
{
|
|
35
|
-
providerId: "zernio",
|
|
36
|
-
providerName: "Zernio (hosted)",
|
|
37
|
-
providerBaseUrl: "https://zernio.com/api/v1",
|
|
38
|
-
providerAuthField: "Authorization",
|
|
39
|
-
apiKeyEnvVar: "ZERNIO_API_KEY",
|
|
40
|
-
additionalRequiredEnvVars: ["ZERNIO_API_URL"],
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Module 2 — Post Submission Bridge
|
|
45
|
-
|
|
46
|
-
The Zernio operator already produces manifests shaped as valid `POST /api/v1/posts` bodies. The bridge:
|
|
47
|
-
|
|
48
|
-
1. Intercepts Postiz's internal `publishPost()` call
|
|
49
|
-
2. Transforms the Postiz post into a Zernio manifest entry (see `./posts-and-queues-layer.md`)
|
|
50
|
-
3. Fires `POST ${ZERNIO_API_URL}/posts` with `Authorization: Bearer ${ZERNIO_API_KEY}` and `Idempotency-Key: <clientPostId>`
|
|
51
|
-
4. Feeds Zernio's response back into Postiz's job tracker
|
|
52
|
-
|
|
53
|
-
`clientPostId` format stays `<client-slug>-<YYYYMMDD>-<sequence>`. Re-submitting the same manifest under the same key is safe.
|
|
54
|
-
|
|
55
|
-
### Module 3 — Queue Sync Layer
|
|
56
|
-
|
|
57
|
-
Postiz's queue concept maps 1:1 onto Zernio queues (`POST /api/v1/queues`):
|
|
58
|
-
|
|
59
|
-
- Postiz queue scheduler → Zernio `queues` endpoint (create) / `queues/<queueId>` (update)
|
|
60
|
-
- `Idempotency-Key: queue-<name>` prevents double-fire on retry
|
|
61
|
-
- Posts attached to a queue omit `scheduledFor` and include `queueId`
|
|
62
|
-
- The 10-step `zernio-social-operator` workflow becomes the execution contract for each queue job
|
|
63
|
-
|
|
64
|
-
### Module 4 — AI Caption Layer Surface
|
|
65
|
-
|
|
66
|
-
The agent-side `/zernio` command surface replaces Postiz's native AI composer:
|
|
67
|
-
|
|
68
|
-
- Postiz compose textarea → `/zernio captions` (or `/zernio campaign` for full scope)
|
|
69
|
-
- Caption drafts come from the A/B/C variant rules in `./ai-caption-layer.md`
|
|
70
|
-
- Claude Code runs as a background operator session; Postiz compose UI is the front-end trigger
|
|
71
|
-
- The 10 `/zernio` subcommands wire into Postiz's compose surface as slash-quick-actions
|
|
72
|
-
|
|
73
|
-
### Module 5 — Platform Coverage Config
|
|
74
|
-
|
|
75
|
-
`./platform-coverage.md` is the source of truth for Postiz channel configuration:
|
|
76
|
-
|
|
77
|
-
- Disable native Postiz channel handlers
|
|
78
|
-
- Register 14 channels pointing to the Zernio transport from Module 1
|
|
79
|
-
- The per-platform format spec (char limits, aspect ratios, post types, carousel eligibility, thread support, cadence) drives Postiz's per-channel validation + preview rendering
|
|
80
|
-
- `skills.md` per-platform tone rules feed the compose UI's voice hints
|
|
81
|
-
|
|
82
|
-
### Module 6 — ENV + Secret Surface
|
|
83
|
-
|
|
84
|
-
Direct alignment — the cleanest module:
|
|
85
|
-
|
|
86
|
-
| Kit env var | Postiz field |
|
|
87
|
-
|---|---|
|
|
88
|
-
| `ZERNIO_API_KEY` | provider credentials field (replaces all per-platform OAuth tokens) |
|
|
89
|
-
| `ZERNIO_API_URL` | provider baseUrl override (regional/proxy deployments only) |
|
|
90
|
-
| `ZERNIO_PROFILE_ID` | default profile scope for all write requests |
|
|
91
|
-
| `ZERNIO_TIMEZONE` | default posting timezone when the profile's timezone isn't used |
|
|
92
|
-
|
|
93
|
-
`setup/verify-env.mjs` and `setup/check-deps.sh` run as Postiz's pre-start health checks. The secret-hygiene scan (`sk_` + 64-hex leak detection from the kit test suite) is the canonical gate on any output or log line.
|
|
94
|
-
|
|
95
|
-
### Module 7 — Workspace CLI Entry Point
|
|
96
|
-
|
|
97
|
-
`@growthub/cli >= 0.3.57` is the operator terminal that sits beside Postiz:
|
|
98
|
-
|
|
99
|
-
- `growthub kit download growthub-zernio-social-v1` — materialize the kit
|
|
100
|
-
- `growthub kit path growthub-zernio-social-v1` — print the working-directory path
|
|
101
|
-
- Point a Claude Code session at that folder; the operator handles the full 10-step workflow
|
|
102
|
-
- Postiz UI reflects the output — scheduled posts, queue runs, generated captions, analytics
|
|
103
|
-
- The 7 artifacts declared by `buildZernioSocialConfig()` (brief, calendar, publishing plan, caption deck, scheduling manifest, analytics brief, client proposal) are the canonical source of truth for what the UI shows
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Integration Sequence (request path)
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
Postiz UI (compose / schedule)
|
|
111
|
-
↓
|
|
112
|
-
Module 2 — Post Submission Bridge
|
|
113
|
-
↓
|
|
114
|
-
Module 1 — ZernioProvider (Authorization: Bearer ZERNIO_API_KEY)
|
|
115
|
-
↓
|
|
116
|
-
Zernio API → POST /api/v1/posts
|
|
117
|
-
+ POST /api/v1/queues
|
|
118
|
-
+ POST /api/v1/media
|
|
119
|
-
+ GET /api/v1/inbox
|
|
120
|
-
+ GET /api/v1/analytics/*
|
|
121
|
-
↑
|
|
122
|
-
Module 3 — Queue Sync reads back status
|
|
123
|
-
↑
|
|
124
|
-
Postiz Calendar / Analytics shell renders state
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Claude Code + the `/zernio` surface sits **laterally** — it feeds the compose box in Postiz before submission, not inside the request path. This keeps the agent lane non-blocking for end-user UI latency.
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## What Stays Untouched in Postiz
|
|
132
|
-
|
|
133
|
-
| Layer | Status |
|
|
134
|
-
|---|---|
|
|
135
|
-
| Postgres schema | Unchanged |
|
|
136
|
-
| Redis queue runner | Unchanged (different job payloads, same runner) |
|
|
137
|
-
| React frontend | Unchanged (except the compose AI hook in Module 4) |
|
|
138
|
-
| Auth / team / workspace | Unchanged |
|
|
139
|
-
| Existing Postiz kit payload (`growthub-postiz-social-v1`) | Unchanged — it remains valid for self-hosted-only operators |
|
|
140
|
-
|
|
141
|
-
This keeps the diff surface minimal and keeps `growthub-zernio-social-v1` fully isolated as the engine layer.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Operator Setup Order (when paired with Postiz UI shell)
|
|
146
|
-
|
|
147
|
-
1. Stand up Postiz via its own kit (`growthub kit download growthub-postiz-social-v1`) — optional if only the UI layer is desired
|
|
148
|
-
2. Download this kit: `growthub kit download growthub-zernio-social-v1`
|
|
149
|
-
3. Fill `.env` — `ZERNIO_API_KEY`, `ZERNIO_API_URL`, `ZERNIO_PROFILE_ID`
|
|
150
|
-
4. Run `node setup/verify-env.mjs` (kit-level) and the Postiz pre-start checks
|
|
151
|
-
5. Apply Modules 1–3 inside the Postiz fork (provider override, publish bridge, queue sync). Everything else stays default.
|
|
152
|
-
6. Open Claude Code at the Zernio kit's exported folder for the `/zernio` surface
|
|
153
|
-
|
|
154
|
-
Standalone (without Postiz UI): everything still works — the kit is self-contained, and Modules 1–3 are optional.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Validation Before Go-Live
|
|
159
|
-
|
|
160
|
-
- [ ] Zernio API key scope is `read-write`
|
|
161
|
-
- [ ] `GET /api/v1/accounts?profileId=...` returns at least one connected platform
|
|
162
|
-
- [ ] A dry-run manifest round-trips through Module 2 with a successful 2xx from `POST /api/v1/posts`
|
|
163
|
-
- [ ] A queue definition round-trips through Module 3 with a returned `queueId`
|
|
164
|
-
- [ ] Postiz channel list surfaces all 14 Zernio platform slugs from `./platform-coverage.md`
|
|
165
|
-
- [ ] Compose surface calls into `/zernio captions` and renders A/B/C variants
|
|
166
|
-
- [ ] Kit secret-hygiene scan on the Postiz fork's logs is clean
|