ethos-cli 0.7.2 → 0.7.3
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/dist/bin/ethos.js +2 -0
- package/dist/bin/ethos.js.map +1 -1
- package/dist/commands/agents.js +1 -0
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/flows.js +6 -6
- package/dist/commands/flows.js.map +1 -1
- package/dist/commands/gifting.d.ts +2 -0
- package/dist/commands/gifting.js +136 -0
- package/dist/commands/gifting.js.map +1 -0
- package/dist/commands/hooks.d.ts +2 -2
- package/dist/commands/hooks.js +41 -21
- package/dist/commands/hooks.js.map +1 -1
- package/dist/commands/lists.js +31 -406
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/tables.d.ts +3 -0
- package/dist/commands/tables.js +43 -13
- package/dist/commands/tables.js.map +1 -1
- package/dist/lib/agent-clients.d.ts +15 -3
- package/dist/lib/agent-clients.js +29 -5
- package/dist/lib/agent-clients.js.map +1 -1
- package/dist/lib/command-helpers.d.ts +1 -0
- package/dist/lib/command-helpers.js +7 -0
- package/dist/lib/command-helpers.js.map +1 -1
- package/dist/lib/find-people-flow.d.ts +5 -2
- package/dist/lib/find-people-flow.js +11 -4
- package/dist/lib/find-people-flow.js.map +1 -1
- package/dist/lib/table-types.d.ts +4 -2
- package/package.json +1 -1
- package/skills/launch-gifting-campaign.md +310 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: launch-gifting-campaign
|
|
3
|
+
description: Open Ethos in a browser for recipient CSV upload, collect gift preference, search stored gift catalog options, create a structured gifting agent column, and guide creation of a gifting campaign.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# launch-gifting-campaign
|
|
7
|
+
|
|
8
|
+
Use this when the user wants to launch a gifting campaign from a CSV of target
|
|
9
|
+
recipients or accounts. Keep CSV upload in the browser-based Ethos product
|
|
10
|
+
flow; do not replace it with `ethos tables import-csv` unless the user
|
|
11
|
+
explicitly asks for a CLI-only fallback.
|
|
12
|
+
|
|
13
|
+
Never name the external catalog/source used for gift options. Say "gift
|
|
14
|
+
catalog", "gift options", or "catalog item".
|
|
15
|
+
|
|
16
|
+
Do not refresh or reload the table page after creating columns, running
|
|
17
|
+
columns, or writing cells. The table updates live; refreshing creates
|
|
18
|
+
unnecessary UX friction. Only reload if the user explicitly asks.
|
|
19
|
+
|
|
20
|
+
Keep user-facing updates concise and status-oriented. Do not expose internal
|
|
21
|
+
skill wording, step numbers, variable names, command names, config JSON, run
|
|
22
|
+
ids, or column ids unless the user explicitly asks for debugging detail.
|
|
23
|
+
|
|
24
|
+
## Required CLI
|
|
25
|
+
|
|
26
|
+
The Ethos CLI (`ethos`) is required. If `ethos` is not installed or not on
|
|
27
|
+
`PATH`, install the latest CLI and retry:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm install -g ethos-cli@latest --prefer-online
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If a command fails because the CLI is not authenticated, run:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
ethos auth login --agent-client auto
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
then retry the failed command.
|
|
40
|
+
|
|
41
|
+
## Core Architecture
|
|
42
|
+
|
|
43
|
+
Create one structured agent column as the source of truth for gifting setup.
|
|
44
|
+
Do not create separate imported columns for Gift, Price, Shipping Time,
|
|
45
|
+
Reasoning, Shipping Address, or Personalized Note. Those values live as JSON
|
|
46
|
+
fields in the agent column and can be expanded in the UI when the user wants to
|
|
47
|
+
inspect them.
|
|
48
|
+
|
|
49
|
+
The gifting agent column must have `config.kind = "gifting_campaign"` and
|
|
50
|
+
these output fields:
|
|
51
|
+
|
|
52
|
+
- `gift_catalog_item_id`
|
|
53
|
+
- `gift_name`
|
|
54
|
+
- `gift_price`
|
|
55
|
+
- `gift_shipping_time`
|
|
56
|
+
- `gift_reasoning`
|
|
57
|
+
- `shipping_address`
|
|
58
|
+
- `address_status`
|
|
59
|
+
- `personalized_note`
|
|
60
|
+
- `research_summary`
|
|
61
|
+
- `gift_signal`
|
|
62
|
+
- `fallback_search_query`
|
|
63
|
+
- `evidence_url`
|
|
64
|
+
- `confidence:integer`
|
|
65
|
+
|
|
66
|
+
The campaign builder imports virtual variables from this structured column:
|
|
67
|
+
`gift_catalog_item_id`, `gift_name`, `gift_price`, `gift_shipping_time`,
|
|
68
|
+
`gift_reasoning`, `shipping_address`, and `personalized_note`. Expansion is
|
|
69
|
+
optional and should not become the source of truth.
|
|
70
|
+
|
|
71
|
+
## Flow
|
|
72
|
+
|
|
73
|
+
1. Use the hook-created upload handoff first. If context contains an injected
|
|
74
|
+
handoff for this flow, reuse its `handoff_token` and `upload_url`; do not
|
|
75
|
+
run `ethos flows start` again. On Codex, open `upload_url` in the in-app
|
|
76
|
+
Browser. On shell clients, the hook or `--open` may already open the OS
|
|
77
|
+
browser.
|
|
78
|
+
|
|
79
|
+
2. Only when no hook handoff was injected, run:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
ethos flows start launch-gifting-campaign --agent-client auto --json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Add `--open` only on shell clients. On Codex, do not pass `--open`; open
|
|
86
|
+
`response.upload_url` in the in-app Browser. Save `response.agent_client`
|
|
87
|
+
as `AGENT_CLIENT`; if it is unavailable, use `codex` on Codex and
|
|
88
|
+
`claude-desktop` on Claude.
|
|
89
|
+
|
|
90
|
+
3. Immediately ask the requirement question while the CSV uploads. If
|
|
91
|
+
`response.next_prompt` is available, ask that exact prompt. Otherwise ask:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
Please answer these while the CSV uploads:
|
|
95
|
+
- What type of gift should I send?
|
|
96
|
+
- Should I pick the same gift for everyone, or should I research each recipient and pick individually?
|
|
97
|
+
- Do you want personalized notes included?
|
|
98
|
+
|
|
99
|
+
For example: "dessert, research each person, include notes" or "cupcakes, one gift for everyone, no notes."
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Save the gift category as `GIFT_BRIEF`, the selection mode as
|
|
103
|
+
`GIFTING_MODE` (`same_gift`, `personalized_research`, or a deterministic
|
|
104
|
+
user-specified split), and the note preference as `INCLUDE_NOTES`. If the
|
|
105
|
+
user only gives a gift category, ask the missing mode and note questions
|
|
106
|
+
before creating any agent column.
|
|
107
|
+
|
|
108
|
+
4. Capture the uploaded table:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
ethos flows wait "$HANDOFF_TOKEN" --json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Save `response.table_id` and `response.org_id`.
|
|
115
|
+
|
|
116
|
+
5. Inspect the uploaded table:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
ethos --org-id "$TABLE_ORG_ID" tables get "$TABLE_ID" --json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Identify a small, stable set of recipient inputs: full name, LinkedIn URL,
|
|
123
|
+
company name, job title, company domain/website, person location, and the
|
|
124
|
+
best available business/work address column. Prefer business/work address
|
|
125
|
+
columns when both work and home address columns exist. Avoid optional
|
|
126
|
+
descriptive fields like company keywords, long descriptions, social URLs, or
|
|
127
|
+
previous enrichment evidence unless the user specifically asks to use them.
|
|
128
|
+
If no address column exists, ask whether to leave addresses missing for now
|
|
129
|
+
or use any raw address field the user identifies. Do not create a separate
|
|
130
|
+
address column.
|
|
131
|
+
|
|
132
|
+
6. Search the stored gift catalog. Use a small set for same-gift campaigns and
|
|
133
|
+
a broader set for personalized research:
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
ethos --org-id "$TABLE_ORG_ID" gifting catalog search "$GIFT_BRIEF" --limit 5 --json
|
|
137
|
+
ethos --org-id "$TABLE_ORG_ID" gifting catalog search "$GIFT_BRIEF" --limit 25 --json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Show concise options with name, price, and shipping time when available. Do
|
|
141
|
+
not mention the external supplier. For same-gift mode, ask the user to
|
|
142
|
+
confirm the selected gift. For personalized research mode, use the broader
|
|
143
|
+
candidate set in the agent instructions. If the user asks for a
|
|
144
|
+
deterministic split, encode the split rule and selected catalog candidates
|
|
145
|
+
in the agent instructions.
|
|
146
|
+
|
|
147
|
+
7. Create the gifting setup agent.
|
|
148
|
+
|
|
149
|
+
For same-gift or deterministic split campaigns, create a `person_enrichment`
|
|
150
|
+
agent that uses row data and the confirmed catalog candidates to produce the
|
|
151
|
+
structured gifting output. It does not need web abilities unless the user
|
|
152
|
+
asked for research.
|
|
153
|
+
|
|
154
|
+
For same-gift or deterministic split campaigns:
|
|
155
|
+
|
|
156
|
+
```sh
|
|
157
|
+
ethos --org-id "$TABLE_ORG_ID" agents create \
|
|
158
|
+
--name "Gifting setup - <brief name>" \
|
|
159
|
+
--workflow-type person_enrichment \
|
|
160
|
+
--instructions "$AGENT_INSTRUCTIONS" \
|
|
161
|
+
--json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
For personalized research campaigns, add `web-search`, `web-fetch`, and
|
|
165
|
+
`linkedin-profile-lookup`. Only add `browser-use` and `--tool-preset
|
|
166
|
+
browser` when the research genuinely needs interactive or gated browsing.
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
ethos --org-id "$TABLE_ORG_ID" agents create \
|
|
170
|
+
--name "Gifting setup - <brief name>" \
|
|
171
|
+
--workflow-type person_enrichment \
|
|
172
|
+
--ability web-search \
|
|
173
|
+
--ability web-fetch \
|
|
174
|
+
--ability linkedin-profile-lookup \
|
|
175
|
+
--instructions "$AGENT_INSTRUCTIONS" \
|
|
176
|
+
--json
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The instructions must tell the agent to return strict JSON with the output
|
|
180
|
+
fields above. `gift_price` must be the formatted price per gift including
|
|
181
|
+
currency when available, and `gift_shipping_time` must be the shortest
|
|
182
|
+
accurate shipping or delivery estimate available for the selected gift. Use
|
|
183
|
+
an empty string when either value is not available; do not guess. For
|
|
184
|
+
personalized research, tell it to research public LinkedIn and web
|
|
185
|
+
information, identify a gift signal, choose the best matching catalog
|
|
186
|
+
candidate, and include concise reasoning with a public link when useful. If
|
|
187
|
+
there is no strong public signal, use the best general campaign gift and
|
|
188
|
+
explain that no specific public preference was found. Never mention the
|
|
189
|
+
external catalog/source in instructions, output, notes, or chat.
|
|
190
|
+
|
|
191
|
+
8. Create the structured gifting agent column:
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
ethos --org-id "$TABLE_ORG_ID" tables columns create-agent "$TABLE_ID" \
|
|
195
|
+
--name "Gifting Campaign" \
|
|
196
|
+
--agent-id "$GIFTING_AGENT_ID" \
|
|
197
|
+
--prompt "$GIFTING_COLUMN_PROMPT" \
|
|
198
|
+
--output-field "gift_catalog_item_id" \
|
|
199
|
+
--output-field "gift_name" \
|
|
200
|
+
--output-field "gift_price" \
|
|
201
|
+
--output-field "gift_shipping_time" \
|
|
202
|
+
--output-field "gift_reasoning" \
|
|
203
|
+
--output-field "shipping_address" \
|
|
204
|
+
--output-field "address_status" \
|
|
205
|
+
--output-field "personalized_note" \
|
|
206
|
+
--output-field "research_summary" \
|
|
207
|
+
--output-field "gift_signal" \
|
|
208
|
+
--output-field "fallback_search_query" \
|
|
209
|
+
--output-field "evidence_url" \
|
|
210
|
+
--output-field "confidence:integer" \
|
|
211
|
+
--input-column "$RECIPIENT_NAME_COLUMN_ID" \
|
|
212
|
+
--input-column "$RECIPIENT_COMPANY_COLUMN_ID" \
|
|
213
|
+
--agent-client "$AGENT_CLIENT" \
|
|
214
|
+
--config-json '{"kind":"gifting_campaign"}' \
|
|
215
|
+
--json
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Pass only the stable recipient inputs identified above with repeated
|
|
219
|
+
`--input-column`; omit any placeholder input ids that do not exist. If the
|
|
220
|
+
command rejects an input column, re-read the table metadata, remove the
|
|
221
|
+
invalid id, and retry with the minimal stable set rather than broadening the
|
|
222
|
+
selected inputs.
|
|
223
|
+
|
|
224
|
+
9. Run the first 3 rows only:
|
|
225
|
+
|
|
226
|
+
```sh
|
|
227
|
+
ethos --org-id "$TABLE_ORG_ID" tables runs start "$TABLE_ID" "$GIFTING_COLUMN_ID" \
|
|
228
|
+
--scope count \
|
|
229
|
+
--row-count 3 \
|
|
230
|
+
--json
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Tell the user: "The gifting setup is running on the first 3 rows. Review
|
|
234
|
+
those results; if they look right, say go and I’ll run the rest." This is
|
|
235
|
+
the clear next step after the first run finishes.
|
|
236
|
+
|
|
237
|
+
10. If the user approves, run the same column for empty rows. Do not create a
|
|
238
|
+
new column:
|
|
239
|
+
|
|
240
|
+
```sh
|
|
241
|
+
ethos --org-id "$TABLE_ORG_ID" tables runs start "$TABLE_ID" "$GIFTING_COLUMN_ID" \
|
|
242
|
+
--scope empty \
|
|
243
|
+
--json
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Tell the user the remaining rows are running and that the next step is
|
|
247
|
+
creating the campaign from the table. Do not refresh the browser.
|
|
248
|
+
|
|
249
|
+
11. If the user asks to change a specific generated field, update the JSON
|
|
250
|
+
field in the source agent cell. Do not edit an expanded projection as the
|
|
251
|
+
source of truth. Examples:
|
|
252
|
+
|
|
253
|
+
```sh
|
|
254
|
+
ethos --org-id "$TABLE_ORG_ID" tables cells set "$TABLE_ID" "$ROW_ID" "$GIFTING_COLUMN_ID" \
|
|
255
|
+
--field personalized_note \
|
|
256
|
+
--value "$UPDATED_NOTE" \
|
|
257
|
+
--json
|
|
258
|
+
|
|
259
|
+
ethos --org-id "$TABLE_ORG_ID" tables cells set "$TABLE_ID" "$ROW_ID" "$GIFTING_COLUMN_ID" \
|
|
260
|
+
--field gift_catalog_item_id \
|
|
261
|
+
--value "$UPDATED_GIFT_CATALOG_ITEM_ID" \
|
|
262
|
+
--json
|
|
263
|
+
|
|
264
|
+
ethos --org-id "$TABLE_ORG_ID" tables cells set "$TABLE_ID" "$ROW_ID" "$GIFTING_COLUMN_ID" \
|
|
265
|
+
--field gift_name \
|
|
266
|
+
--value "$UPDATED_GIFT_NAME" \
|
|
267
|
+
--json
|
|
268
|
+
|
|
269
|
+
ethos --org-id "$TABLE_ORG_ID" tables cells set "$TABLE_ID" "$ROW_ID" "$GIFTING_COLUMN_ID" \
|
|
270
|
+
--field gift_price \
|
|
271
|
+
--value "$UPDATED_GIFT_PRICE" \
|
|
272
|
+
--json
|
|
273
|
+
|
|
274
|
+
ethos --org-id "$TABLE_ORG_ID" tables cells set "$TABLE_ID" "$ROW_ID" "$GIFTING_COLUMN_ID" \
|
|
275
|
+
--field gift_shipping_time \
|
|
276
|
+
--value "$UPDATED_GIFT_SHIPPING_TIME" \
|
|
277
|
+
--json
|
|
278
|
+
|
|
279
|
+
ethos --org-id "$TABLE_ORG_ID" tables cells set "$TABLE_ID" "$ROW_ID" "$GIFTING_COLUMN_ID" \
|
|
280
|
+
--field gift_reasoning \
|
|
281
|
+
--value "$UPDATED_REASONING" \
|
|
282
|
+
--json
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
12. Tell the user to use the table page's `Create campaign` button. Ethos will
|
|
286
|
+
route gifting-ready tables to the gifting campaign builder. The builder
|
|
287
|
+
should use:
|
|
288
|
+
|
|
289
|
+
- `gift_catalog_item_id` as the per-recipient gift id variable when present.
|
|
290
|
+
- `gift_name` as the gift name variable.
|
|
291
|
+
- `gift_price` / `price_per_gift` as the per-recipient price display variable.
|
|
292
|
+
- `gift_shipping_time` / `shipping_time` as the per-recipient shipping-time variable.
|
|
293
|
+
- `shipping_address` as the address variable.
|
|
294
|
+
- `personalized_note` as the note variable only when notes were requested.
|
|
295
|
+
|
|
296
|
+
13. The campaign detail page's launch action creates internal gifting orders
|
|
297
|
+
and sends one compact campaign-level ops notification with the campaign
|
|
298
|
+
link, source table link, and ready/missing-address counts.
|
|
299
|
+
|
|
300
|
+
## Notes
|
|
301
|
+
|
|
302
|
+
- If catalog search returns no options, ask the user for a broader gift type
|
|
303
|
+
and search again.
|
|
304
|
+
- Do not launch the campaign if the address output is missing for most rows
|
|
305
|
+
unless the user explicitly wants to create the campaign with missing-address
|
|
306
|
+
orders.
|
|
307
|
+
- Expanded columns are for inspection convenience. When Codex updates a gift,
|
|
308
|
+
reasoning, address, or note, patch the structured agent cell field.
|
|
309
|
+
- Do not say the gift catalog source name in chat, notes, column prompts, or
|
|
310
|
+
user-facing instructions.
|