@aicopycoders/exodus 2026.7.200-beta.3 → 2026.7.200-beta.5
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/skills/exodus/SKILL.md +1 -0
- package/assets/skills/exodus-workflow/SKILL.md +173 -0
- package/dist/bin/exodus.js +3 -1
- package/dist/commands/brand.js +159 -0
- package/dist/commands/genesis.js +1 -1
- package/dist/commands/primer.js +4 -2
- package/dist/commands/segment.d.ts +57 -0
- package/dist/commands/segment.js +274 -0
- package/dist/commands/workflow.d.ts +271 -0
- package/dist/commands/workflow.js +744 -0
- package/dist/lib/image-sniff.d.ts +6 -0
- package/dist/lib/image-sniff.js +18 -0
- package/dist/lib/template-constants.d.ts +1 -1
- package/dist/lib/template-constants.js +102 -0
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ This skill ROUTES. Read what the user wants, name the destination skill, and han
|
|
|
18
18
|
| Static image ads ("make images", "statics", "render this ad") | `exodus-image` (the image front door — it menus engines and confirms before firing) |
|
|
19
19
|
| A specific image engine they already chose | `exodus-creative` (native / copy-derived / ref-match) or `exodus-template` (33 ad-type formats) |
|
|
20
20
|
| Meme ads ("exodus, meme this offer", "make me meme ads") | `exodus-meme` |
|
|
21
|
+
| Run / chain / build / edit a saved workflow ("run my workflow", "what does this workflow need", "build a workflow that…", "list my workflows") | `exodus-workflow` |
|
|
21
22
|
| Onboard a new brand / build the primer | `exodus-primer` (with winning ads) or `exodus-foundation` (no ads yet) |
|
|
22
23
|
| List/switch/troubleshoot brands | `exodus-brand` |
|
|
23
24
|
| See past runs / find an output | `exodus-browse` |
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: exodus-workflow
|
|
3
|
+
description: Run, chain, build, and edit saved Exodus Workflows — the multi-node automations that wire Genesis bots, primers, briefs, and image nodes together on the dashboard canvas — from the CLI. Use it to list a brand's workflows, describe what a workflow needs before running it (inputs, per-workspace primer prerequisites, outputs), run one and collect its outputs, chain one workflow's output into another's input, browse the bot catalog, and author or update a workflow contract via export → edit → import. Only invoke when the user has explicitly invoked Exodus: they said "exodus" in the request ("exodus, run my launch workflow", "exodus, what does this workflow need", "exodus, build a workflow that turns a swipe into hooks then ads", "list my exodus workflows", "exodus, edit that workflow"), named this skill or /exodus-workflow, ran an `npx @aicopycoders/exodus workflow` command, or the `exodus` hub skill routed here. Never claim generic "workflow"/"automation" requests ("automate this", "build me a workflow") without Exodus context — in shared folders those may belong to the user's other tools; if the user did not say exodus, this skill is not for them. The bare word "Genesis" without "exodus" refers to the member's own Genesis API key and personal bot recipes, NOT to Exodus.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```operator-guide
|
|
7
|
+
Subcommands:
|
|
8
|
+
exodus workflow list [--json] List the brand's saved workflows
|
|
9
|
+
exodus workflow describe <workflowId|name> [--json] Inputs, prerequisites, outputs
|
|
10
|
+
exodus workflow bots [--category <cat>] [--slug <slug>] [--json] Bot catalog / one bot's spec
|
|
11
|
+
exodus workflow run <workflowId|name> [--input key=value ...] [--wait] [--json] Run it
|
|
12
|
+
exodus workflow status [--id <runId>] [--json] Poll a run / read its outputs
|
|
13
|
+
exodus workflow export <workflowId|name> [--out <file>] Dump the contract JSON
|
|
14
|
+
exodus workflow import <file> [--update <workflowId>] [--dry-run] [--json] Author/edit
|
|
15
|
+
|
|
16
|
+
Key flags:
|
|
17
|
+
--input key=value Repeatable run input; the value may contain "="
|
|
18
|
+
--input key=@path Load the value from a file (path resolved from the cwd);
|
|
19
|
+
use key=@@text to keep a leading "@" as a literal character
|
|
20
|
+
--wait Poll until the run reaches a terminal status, then print outputs
|
|
21
|
+
--id <runId> Run id for `status` detail
|
|
22
|
+
--category <cat> (bots) Filter the catalog to one category id
|
|
23
|
+
--slug <slug> (bots) Show a single bot's full port + param spec
|
|
24
|
+
--out <file> (export) Write JSON to a file instead of stdout
|
|
25
|
+
--update <workflowId> (import) Update this workflow in place (optimistic-concurrency
|
|
26
|
+
guarded by the export's updatedAt — a 409 means re-export first)
|
|
27
|
+
--dry-run (import) Validate + resolve refs without writing; returns issues
|
|
28
|
+
|
|
29
|
+
Auth: Bearer (EXODUS_API_KEY). The canvas lives on the dashboard at /workflows.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
# Workflow — Run, Chain, and Build Saved Automations
|
|
33
|
+
|
|
34
|
+
An Exodus **Workflow** is a saved graph the member builds on the dashboard canvas (`/workflows`): brief and primer sources feed Genesis bots, bots feed other bots or an image node, and an Output node collects the deliverables. This skill is the CLI operator for those graphs — discover and run them, chain one into the next, and author or edit the contract without opening a browser.
|
|
35
|
+
|
|
36
|
+
Three jobs, three sections below. Read the request and jump to the one that fits; don't walk all three when the user just wants a run.
|
|
37
|
+
|
|
38
|
+
## 1. Discover & run
|
|
39
|
+
|
|
40
|
+
The mistake to avoid is firing a run blind and wasting it on a missing input or an unmet prerequisite. Always **`describe` before `run`**.
|
|
41
|
+
|
|
42
|
+
### Step 1 — List
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx @aicopycoders/exodus workflow list
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Prints the brand's saved workflows (name, id, node/edge counts, timestamps). If the user named the workflow already, skip straight to `describe`.
|
|
49
|
+
|
|
50
|
+
### Step 2 — Describe (read inputs, prereqs, outputs)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx @aicopycoders/exodus workflow describe "Launch Flow"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Accepts a workflow id **or** a name. It reports three things:
|
|
57
|
+
|
|
58
|
+
- **Inputs** — each free input the run needs: field name, source (`text`, `swipe-ad`, `swipe-bundle`, `organic-url`, `ad-url`), whether it's required, and a description. These are the `--input key=value` pairs you'll pass.
|
|
59
|
+
- **Prerequisites** — the per-workspace primer markers the graph's primer nodes depend on, each shown **✓ stored** or **✗ missing** for *this brand*. **If any prerequisite is ✗, warn the user before running** — the run will not produce good output (or will fail) without it. Route them to the `exodus-primer` / `exodus-foundation` skill to fill the gap first, rather than burning a run.
|
|
60
|
+
- **Outputs** — the deliverables the Output node collects (text or image, with labels), so you know what to expect back.
|
|
61
|
+
|
|
62
|
+
### Step 3 — Gather inputs
|
|
63
|
+
|
|
64
|
+
Fill every required input. For a free-text brief you can compose a **bespoke brief from in-session research** — the winning angle you just worked out, the swipe you analyzed — and pass it inline (`--input brief="..."`) or, if it's long, write it to a project file and pass it with `@file` (see Chain, below). For URL/swipe sources, pass the value the source expects.
|
|
65
|
+
|
|
66
|
+
### Step 4 — Run and collect
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx @aicopycoders/exodus workflow run "Launch Flow" --input brief="new cortisol offer, problem-aware" --wait
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`--wait` polls to a terminal status and prints the run's collected outputs — text inline, image URLs. Without `--wait` the command returns the `runId` and you poll it yourself:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npx @aicopycoders/exodus workflow status --id <runId>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Report the outputs plus a short take. Don't call a run "done" off the kickoff line alone — a run reaches `completed`, `partial`, or `failed`; a `partial` means some nodes were skipped or failed, so read the status before declaring victory.
|
|
79
|
+
|
|
80
|
+
## 2. Chain — feed one workflow's output into the next
|
|
81
|
+
|
|
82
|
+
The chaining surface is the run's flattened outputs. After a `--wait` run (or once `status` shows terminal), pull the machine-readable outputs:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npx @aicopycoders/exodus workflow status --id <runId> --json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The response carries a top-level `outputs` array — each entry is `{ nodeId, botSlug?, type, label, text?, imageUrl?, imageId? }`. Extract the text you want (e.g. `.outputs[].text`) and pass it into the next workflow's input:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Inline, for short outputs
|
|
92
|
+
npx @aicopycoders/exodus workflow run "Ad Writer" --input hooks="<text from run A>" --wait
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**The file-as-persistence convention.** For anything reusable or long — a brief, a sales letter, a hook pool — write the text to a **markdown file in the project** and pass it with `@file`. This is the deliberate v1 alternative to a server-side store: the file *is* the persistence layer, versioned in the project alongside the brand's other artifacts.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Save run A's text output to a project file, then feed it to workflow B
|
|
99
|
+
npx @aicopycoders/exodus workflow status --id <runId> --json # copy .outputs[].text into state/hooks.md
|
|
100
|
+
npx @aicopycoders/exodus workflow run "Ad Writer" --input hooks=@state/hooks.md --wait
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`@path` is resolved from the current directory. If the literal value you need actually starts with `@`, escape it as `@@` (e.g. `--input handle=@@brand` passes the string `@brand`).
|
|
104
|
+
|
|
105
|
+
Use this pattern to compose pipelines the canvas doesn't wire directly: run the research/hook workflow, persist its best output as a file, then run the writing workflow off that file — reproducibly, because the file stays.
|
|
106
|
+
|
|
107
|
+
## 3. Build & edit — author a workflow contract
|
|
108
|
+
|
|
109
|
+
The documented way to learn the contract format is to **export an existing workflow and study it** — there is no separate schema doc. The loop is: learn the bots → learn the format → compose → dry-run until clean → import → review on the canvas.
|
|
110
|
+
|
|
111
|
+
### Step 1 — Learn the bot catalog
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx @aicopycoders/exodus workflow bots # full catalog, grouped by category
|
|
115
|
+
npx @aicopycoders/exodus workflow bots --category writing # one category
|
|
116
|
+
npx @aicopycoders/exodus workflow bots --slug new-hook-bot # one bot's full port + param spec
|
|
117
|
+
npx @aicopycoders/exodus workflow bots --json # raw catalog for machine use
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Per bot you get its **input ports** (id, what it accepts — `text` / `primer` / `image`, whether it's required, and for primer ports which `primerKinds` gate it — `body` / `hook` / `headline` / `summary`), its **params** (select/text/toggle/number/multiselect, with options and defaults), and its output type. This is what tells you which node can wire into which — a port only accepts an edge whose source produces a type it lists in `accepts`.
|
|
121
|
+
|
|
122
|
+
### Step 2 — Learn the format by exporting
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npx @aicopycoders/exodus workflow export "Launch Flow" --out launch.json
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Study `launch.json`: it's the `exodus-workflow` contract — `nodes` (each with `id`, `kind` = `brief`/`bot`/`primer`/`image`/`output`, a `config`, and an optional `position`) and `edges` (`source`/`sourceHandle` → `target`/`targetHandle`, the handles being port ids). An export also carries `workflowId` + `updatedAt` at the top — those are update anchors, not part of the graph.
|
|
129
|
+
|
|
130
|
+
### Step 3 — Compose the contract
|
|
131
|
+
|
|
132
|
+
Author the JSON by hand or by adapting an export. **Node positions are optional** — leave them out and the server auto-layouts the graph on import; you don't need to compute coordinates.
|
|
133
|
+
|
|
134
|
+
### Step 4 — Dry-run like a compiler loop
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npx @aicopycoders/exodus workflow import launch.json --dry-run
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`--dry-run` validates and resolves refs without writing. It returns compiler-style issues — each names the **node id**, the **port id** where relevant, and a concrete **remedy** (the exact edit that fixes it). Codes you'll see include `dangling-edge`, `unknown-port`, `type-mismatch`, `missing-required-input`, `duplicate-input`, `cycle`, `unknown-kind`, and `bad-config`. Fix, re-run `--dry-run`, repeat until it's clean — same loop as fixing type errors.
|
|
141
|
+
|
|
142
|
+
### Step 5 — Import (create or update)
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Create a new workflow
|
|
146
|
+
npx @aicopycoders/exodus workflow import launch.json
|
|
147
|
+
|
|
148
|
+
# Update an existing workflow in place
|
|
149
|
+
npx @aicopycoders/exodus workflow import launch.json --update wf_123
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Then **tell the user to review it on the canvas at `/workflows`** — the CLI writes the graph; the human eye confirms it reads right.
|
|
153
|
+
|
|
154
|
+
**Two rules for edits (`--update`):**
|
|
155
|
+
|
|
156
|
+
- **Always export a backup first.** v1 has no version history — a destructive `--update` overwrites the live workflow with no undo. `export --out backup.json` before you import over it.
|
|
157
|
+
- **A 409 means the canvas moved.** `--update` sends the export's `updatedAt` as an optimistic-concurrency guard. If someone edited the workflow on the dashboard since your export, the import 409s. Re-export the current workflow, reapply your edits onto the fresh contract, and import again — never force past a 409, or you'll clobber their change.
|
|
158
|
+
|
|
159
|
+
## Failure handling
|
|
160
|
+
|
|
161
|
+
- **`describe` shows a ✗ prerequisite** — don't run yet. Fill the primer via `exodus-primer` / `exodus-foundation`, then re-check `describe`.
|
|
162
|
+
- **Run comes back `partial` or `failed`** — read `status --id <runId>` (drop `--json` for a readable view) to see which node failed and why before re-running.
|
|
163
|
+
- **`import --dry-run` issues** — fix the exact node/port each issue names using its remedy; don't guess.
|
|
164
|
+
- **`import --update` 409** — re-export, reapply, re-import (see Step 5). This is a conflict, not a bug.
|
|
165
|
+
- **Auth / whoami failure** — run `npx @aicopycoders/exodus doctor` and confirm `EXODUS_API_KEY`.
|
|
166
|
+
- **Wrong brand** — workflows are per-brand. `npx @aicopycoders/exodus brand current` to confirm you're on the brand you think you are; switch with the `exodus-brand` skill.
|
|
167
|
+
|
|
168
|
+
## Not the right skill for
|
|
169
|
+
|
|
170
|
+
- **Running a single Genesis writing pass** (brief → copy in two voices) — that's `exodus-genesis`. Reach here when the member has a *saved multi-node workflow* to run or build.
|
|
171
|
+
- **One-off image renders** — `exodus-image` / `exodus-creative` / `exodus-template`.
|
|
172
|
+
- **Building the primer a workflow depends on** — `exodus-primer` (winning ads) or `exodus-foundation` (no ads).
|
|
173
|
+
- **Finding a past run's output doc** — `exodus-browse`.
|
package/dist/bin/exodus.js
CHANGED
|
@@ -17,6 +17,8 @@ const OTHER_COMMANDS = new Set([
|
|
|
17
17
|
"doctor",
|
|
18
18
|
"init",
|
|
19
19
|
"migrate",
|
|
20
|
+
"segment",
|
|
21
|
+
"workflow",
|
|
20
22
|
]);
|
|
21
23
|
const HIDDEN_COMMANDS = new Set([
|
|
22
24
|
"creative",
|
|
@@ -76,7 +78,7 @@ async function buildHelp() {
|
|
|
76
78
|
const fmt = (rows) => rows.map(([n, s]) => ` ${n.padEnd(18)} ${s}`.trimEnd()).join("\n");
|
|
77
79
|
const commonOptions = [
|
|
78
80
|
"Common Options:",
|
|
79
|
-
" --awareness <level> Awareness level: unaware, problem-aware, solution-aware, product-aware",
|
|
81
|
+
" --awareness <level> Awareness level: unaware, problem-aware, solution-aware, product-aware, most-aware",
|
|
80
82
|
" --wait Wait for completion (default)",
|
|
81
83
|
" --no-wait Return immediately after starting",
|
|
82
84
|
" --help, -h Show help (top-level or per-subcommand)",
|
package/dist/commands/brand.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { apiGetDashboard, apiPostDashboard } from "../lib/client.js";
|
|
4
|
+
import { sniffImageType, BRAND_IMAGE_MAX_BYTES } from "../lib/image-sniff.js";
|
|
4
5
|
import { getActiveBrand, setActiveBrand, clearActiveBrand, findWorkspaceRoot, } from "../lib/state.js";
|
|
5
6
|
import { detectLayout, ensureBrandDir, resolveActiveBrand, brandStateDir, brandDirFor, } from "../lib/layout.js";
|
|
6
7
|
import { promptYesNo } from "../lib/prompts.js";
|
|
@@ -15,6 +16,9 @@ Subcommands:
|
|
|
15
16
|
exodus brand current Print the active brand
|
|
16
17
|
exodus brand clear Stop overriding the brand (use the key's default)
|
|
17
18
|
exodus brand delete <slug> Delete a brand you own (asks before removing the local folder)
|
|
19
|
+
exodus brand images add <files...> --kind founder|product|reference
|
|
20
|
+
Upload brand-identity images (png/jpg/webp, max 15MB each)
|
|
21
|
+
exodus brand images list Show the active brand's uploaded identity images
|
|
18
22
|
|
|
19
23
|
Any user can create and own unlimited brands (\`brand create\`) — you do NOT
|
|
20
24
|
need to be an admin, and brands are scoped to you (two users can have the
|
|
@@ -260,11 +264,166 @@ function runClear() {
|
|
|
260
264
|
console.log("from here still target it (the folder wins over the pointer).");
|
|
261
265
|
}
|
|
262
266
|
}
|
|
267
|
+
const BRAND_IMAGE_KINDS = ["founder", "product", "reference"];
|
|
268
|
+
async function runImagesAdd(files, flags) {
|
|
269
|
+
const kind = typeof flags["kind"] === "string" ? flags["kind"] : "";
|
|
270
|
+
if (!BRAND_IMAGE_KINDS.includes(kind)) {
|
|
271
|
+
console.error(`Error: brand images add requires --kind ${BRAND_IMAGE_KINDS.join("|")}. ` +
|
|
272
|
+
`(Logo stays a dashboard upload — it replaces rather than appends.)`);
|
|
273
|
+
process.exit(1);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (files.length === 0) {
|
|
277
|
+
console.error("Error: brand images add requires at least one file.");
|
|
278
|
+
process.exit(1);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const valid = [];
|
|
282
|
+
const skipped = [];
|
|
283
|
+
for (const file of files) {
|
|
284
|
+
let buf;
|
|
285
|
+
try {
|
|
286
|
+
buf = fs.readFileSync(file);
|
|
287
|
+
}
|
|
288
|
+
catch {
|
|
289
|
+
skipped.push({ file, reason: "unreadable (does the path exist?)" });
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
if (buf.length > BRAND_IMAGE_MAX_BYTES) {
|
|
293
|
+
skipped.push({
|
|
294
|
+
file,
|
|
295
|
+
reason: `too large (${(buf.length / 1024 / 1024).toFixed(1)}MB > 15MB)`,
|
|
296
|
+
});
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
const sniffed = sniffImageType(buf);
|
|
300
|
+
if (!sniffed) {
|
|
301
|
+
skipped.push({ file, reason: "not a png/jpg/webp (content check failed)" });
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
valid.push({ file, buf, mime: sniffed.mime });
|
|
305
|
+
}
|
|
306
|
+
for (const s of skipped) {
|
|
307
|
+
console.error(` skipped ${path.basename(s.file)}: ${s.reason}`);
|
|
308
|
+
}
|
|
309
|
+
if (valid.length === 0) {
|
|
310
|
+
console.error("Error: no valid image files to upload.");
|
|
311
|
+
process.exit(1);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const mint = await apiPostDashboard("/api/brands/images/upload-url", { count: valid.length });
|
|
315
|
+
if (!mint.ok || !Array.isArray(mint.data.urls)) {
|
|
316
|
+
console.error(`Error: ${mint.data.error ?? `HTTP ${mint.status} minting upload URLs`}`);
|
|
317
|
+
process.exit(1);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
const storageIds = [];
|
|
321
|
+
const uploadedFiles = [];
|
|
322
|
+
for (let i = 0; i < valid.length; i++) {
|
|
323
|
+
const { file, buf, mime } = valid[i];
|
|
324
|
+
try {
|
|
325
|
+
const res = await fetch(mint.data.urls[i], {
|
|
326
|
+
method: "POST",
|
|
327
|
+
headers: { "Content-Type": mime },
|
|
328
|
+
body: new Uint8Array(buf),
|
|
329
|
+
});
|
|
330
|
+
const body = JSON.parse(await res.text());
|
|
331
|
+
if (!res.ok || !body.storageId)
|
|
332
|
+
throw new Error(`HTTP ${res.status}`);
|
|
333
|
+
storageIds.push(body.storageId);
|
|
334
|
+
uploadedFiles.push(file);
|
|
335
|
+
}
|
|
336
|
+
catch (err) {
|
|
337
|
+
console.error(` skipped ${path.basename(file)}: storage upload failed (${err instanceof Error ? err.message : String(err)})`);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if (storageIds.length === 0) {
|
|
341
|
+
console.error("Error: every storage upload failed.");
|
|
342
|
+
process.exit(1);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const attach = await apiPostDashboard("/api/brands/images", {
|
|
346
|
+
kind,
|
|
347
|
+
storageIds,
|
|
348
|
+
});
|
|
349
|
+
if (!attach.ok) {
|
|
350
|
+
console.error(`Error: ${attach.data.error ?? `HTTP ${attach.status} attaching images`}`);
|
|
351
|
+
process.exit(1);
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
for (const s of attach.data.skipped ?? []) {
|
|
355
|
+
console.error(` server skipped ${s.storageId}: ${s.reason}`);
|
|
356
|
+
}
|
|
357
|
+
for (const f of uploadedFiles)
|
|
358
|
+
console.log(` uploaded ${path.basename(f)}`);
|
|
359
|
+
console.log(`✓ ${kind}: ${attach.data.added} added (brand now has ${attach.data.total} ${kind} image${attach.data.total === 1 ? "" : "s"})`);
|
|
360
|
+
}
|
|
361
|
+
async function runImagesList() {
|
|
362
|
+
const res = await apiGetDashboard("/api/brands/images");
|
|
363
|
+
if (!res.ok) {
|
|
364
|
+
console.error(`Error: ${res.data.error ?? `HTTP ${res.status}`}`);
|
|
365
|
+
process.exit(1);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
console.log(`brand: ${res.data.brand}`);
|
|
369
|
+
for (const kind of BRAND_IMAGE_KINDS) {
|
|
370
|
+
const entries = res.data[kind] ?? [];
|
|
371
|
+
console.log(`${kind}: ${entries.length}`);
|
|
372
|
+
for (const e of entries) {
|
|
373
|
+
console.log(` ${e.url ?? e.storageId}`);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function imagesPositionals() {
|
|
378
|
+
const rest = process.argv.slice(3);
|
|
379
|
+
const out = [];
|
|
380
|
+
let i = 0;
|
|
381
|
+
while (i < rest.length) {
|
|
382
|
+
const arg = rest[i];
|
|
383
|
+
if (arg === "--help" || arg === "-h") {
|
|
384
|
+
i++;
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
if (arg.startsWith("--")) {
|
|
388
|
+
const key = arg.slice(2);
|
|
389
|
+
const next = rest[i + 1];
|
|
390
|
+
if (key.startsWith("no-")) {
|
|
391
|
+
i++;
|
|
392
|
+
}
|
|
393
|
+
else if (next !== undefined && !next.startsWith("--")) {
|
|
394
|
+
i += 2;
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
i++;
|
|
398
|
+
}
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
out.push(arg);
|
|
402
|
+
i++;
|
|
403
|
+
}
|
|
404
|
+
return out;
|
|
405
|
+
}
|
|
406
|
+
async function runImages(args, flags) {
|
|
407
|
+
const sub = args[0];
|
|
408
|
+
if (sub === "add") {
|
|
409
|
+
await runImagesAdd(args.slice(1), flags);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
if (sub === "list" || sub === undefined) {
|
|
413
|
+
await runImagesList();
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
console.error(`exodus brand images: unknown subcommand "${sub}" (use add | list)`);
|
|
417
|
+
process.exit(1);
|
|
418
|
+
}
|
|
263
419
|
export async function run(flags) {
|
|
264
420
|
const positionals = process.argv.slice(3).filter((a) => !a.startsWith("--"));
|
|
265
421
|
const sub = positionals[0];
|
|
266
422
|
const arg = positionals[1];
|
|
267
423
|
switch (sub) {
|
|
424
|
+
case "images":
|
|
425
|
+
await runImages(imagesPositionals().slice(1), flags);
|
|
426
|
+
return;
|
|
268
427
|
case "list":
|
|
269
428
|
case undefined:
|
|
270
429
|
await runList();
|
package/dist/commands/genesis.js
CHANGED
|
@@ -22,7 +22,7 @@ Options:
|
|
|
22
22
|
--seeds <file|"text"> Per-run creative seeds. File: one per line OR a
|
|
23
23
|
JSON array. Inline: a single seed.
|
|
24
24
|
--steering "<text>" With regenerate: re-roll guidance for the hook pool.
|
|
25
|
-
--awareness <level> unaware | problem-aware (default) | solution-aware | product-aware
|
|
25
|
+
--awareness <level> unaware | problem-aware (default) | solution-aware | product-aware | most-aware
|
|
26
26
|
--passes <n> Writing passes per bot — Mario + Infeed (1-5, default 1 = 2 variants)
|
|
27
27
|
--variants <n> Advanced: raw total variant count (1-10); overrides --passes
|
|
28
28
|
--ad-account <id> Meta ad account ID for the top-ads-biased track
|
package/dist/commands/primer.js
CHANGED
|
@@ -36,8 +36,8 @@ Genesis writer for that primer honors it on every run.
|
|
|
36
36
|
|
|
37
37
|
<lane> is one of: bodyUnaware | bodyAware | hooks | headlines
|
|
38
38
|
(aliases: body-unaware/unaware/problem-aware, body-aware/solution-aware/
|
|
39
|
-
product-aware, hook, headline). Setting just one of --always /
|
|
40
|
-
leaves the other field as-is.
|
|
39
|
+
product-aware/most-aware, hook, headline). Setting just one of --always /
|
|
40
|
+
--never leaves the other field as-is.
|
|
41
41
|
|
|
42
42
|
Interactive build flags:
|
|
43
43
|
--file <path> Read the submission (winning ads + product info) from a file
|
|
@@ -397,6 +397,8 @@ const LANE_ALIASES = {
|
|
|
397
397
|
solutionaware: "bodyAware",
|
|
398
398
|
"product-aware": "bodyAware",
|
|
399
399
|
productaware: "bodyAware",
|
|
400
|
+
"most-aware": "bodyAware",
|
|
401
|
+
mostaware: "bodyAware",
|
|
400
402
|
hooks: "hooks",
|
|
401
403
|
hook: "hooks",
|
|
402
404
|
headlines: "headlines",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const helpText: string;
|
|
2
|
+
interface NValue {
|
|
3
|
+
slug: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
interface MapOutcome {
|
|
7
|
+
slug: string;
|
|
8
|
+
name: string;
|
|
9
|
+
lens?: "Type" | "Location" | "Function" | "Moment" | "Severity";
|
|
10
|
+
subs: NValue[];
|
|
11
|
+
}
|
|
12
|
+
interface MapGroup {
|
|
13
|
+
name: string;
|
|
14
|
+
values: NValue[];
|
|
15
|
+
}
|
|
16
|
+
export interface SegmentMap {
|
|
17
|
+
productWord: string;
|
|
18
|
+
brandLabel: string;
|
|
19
|
+
outcomes: MapOutcome[];
|
|
20
|
+
demoGroups: MapGroup[];
|
|
21
|
+
facetFamilies: MapGroup[];
|
|
22
|
+
}
|
|
23
|
+
export interface ImportSummary {
|
|
24
|
+
added: string[];
|
|
25
|
+
keptRenamed: string[];
|
|
26
|
+
deleted: string[];
|
|
27
|
+
subsDeleted: string[];
|
|
28
|
+
demoValuesDeleted: string[];
|
|
29
|
+
facetValuesDeleted: string[];
|
|
30
|
+
personasArchived: string[];
|
|
31
|
+
personasDeleted: string[];
|
|
32
|
+
}
|
|
33
|
+
export declare function asSummary(data: unknown): ImportSummary;
|
|
34
|
+
export declare function isDestructive(summary: ImportSummary): boolean;
|
|
35
|
+
export declare function formatImportSummary(summary: ImportSummary): string;
|
|
36
|
+
export declare function formatMapSummary(map: SegmentMap): string;
|
|
37
|
+
export interface ImportDeps {
|
|
38
|
+
post: (path: string, body: unknown) => Promise<{
|
|
39
|
+
ok: boolean;
|
|
40
|
+
status: number;
|
|
41
|
+
data: unknown;
|
|
42
|
+
}>;
|
|
43
|
+
readFile: (path: string) => string;
|
|
44
|
+
}
|
|
45
|
+
export interface ImportFlowResult {
|
|
46
|
+
code: number;
|
|
47
|
+
lines: string[];
|
|
48
|
+
calls: Array<{
|
|
49
|
+
dryRun: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
52
|
+
export declare function importFlow(file: string, opts: {
|
|
53
|
+
yes: boolean;
|
|
54
|
+
json: boolean;
|
|
55
|
+
}, deps: ImportDeps): Promise<ImportFlowResult>;
|
|
56
|
+
export declare function run(flags: Record<string, string | boolean>): Promise<void>;
|
|
57
|
+
export {};
|