@audienti/cli 0.1.32 → 0.1.33
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/CHANGELOG.md +6 -0
- package/README.md +7 -0
- package/package.json +1 -1
- package/skills/audienti/SKILL.md +1 -0
- package/src/api-client.js +18 -0
- package/src/cli.js +123 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to the Audienti CLI are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.33] - 2026-08-13
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Add `audienti motions quick-start --url <company_url>` for URL-generated quick-start drafts, with optional `--wait --confirm` motion setup and discovery launch.
|
|
12
|
+
|
|
7
13
|
## [0.1.32] - 2026-08-11
|
|
8
14
|
|
|
9
15
|
### Added
|
package/README.md
CHANGED
|
@@ -139,6 +139,7 @@ audienti operator next --plan
|
|
|
139
139
|
audienti writer test-run <prsp_id>
|
|
140
140
|
audienti motions analytics <motn_id>
|
|
141
141
|
audienti motions run-discovery <motn_id>
|
|
142
|
+
audienti motions quick-start --url https://example.com --wait --confirm
|
|
142
143
|
audienti motions update <motn_id> --status paused
|
|
143
144
|
audienti motions update <motn_id> --own-post-engagement true
|
|
144
145
|
audienti motions activate <motn_id>
|
|
@@ -248,6 +249,12 @@ used by the operator surface:
|
|
|
248
249
|
audienti motions run-discovery <motn_id>
|
|
249
250
|
```
|
|
250
251
|
|
|
252
|
+
To create and launch a quick-start motion from a company URL:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
audienti motions quick-start --url https://example.com --wait --confirm
|
|
256
|
+
```
|
|
257
|
+
|
|
251
258
|
To audit one account user's outbound actions, optionally narrowed to one motion
|
|
252
259
|
and one AccountProspect.created_at cohort:
|
|
253
260
|
|
package/package.json
CHANGED
package/skills/audienti/SKILL.md
CHANGED
|
@@ -100,6 +100,7 @@ audienti prospects unlock <prsp_id> --json
|
|
|
100
100
|
audienti users activity me --window 7d --json
|
|
101
101
|
audienti prospects import-batch --file prospects.csv --motion <motn_id> --assigned-user me --json
|
|
102
102
|
audienti lists create --name "Target list" --json
|
|
103
|
+
audienti motions quick-start --url https://example.com --wait --confirm --json
|
|
103
104
|
audienti motions update <motn_id> --status paused --json
|
|
104
105
|
audienti motions activate <motn_id> --json
|
|
105
106
|
audienti motions delete <motn_id> --confirm yes --json
|
package/src/api-client.js
CHANGED
|
@@ -375,6 +375,24 @@ export class AudientiClient {
|
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
createQuickStart(accountId, body) {
|
|
379
|
+
return this.requestJson(accountPath(accountId, ["quick_start"]), {
|
|
380
|
+
method: "POST",
|
|
381
|
+
body
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
quickStart(accountId, draftId) {
|
|
386
|
+
return this.requestJson(accountPath(accountId, ["quick_start", draftId]));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
confirmQuickStart(accountId, draftId, body = {}) {
|
|
390
|
+
return this.requestJson(accountPath(accountId, ["quick_start", draftId, "confirm"]), {
|
|
391
|
+
method: "POST",
|
|
392
|
+
body
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
378
396
|
motionProspects(accountId, motionId, query = {}) {
|
|
379
397
|
return this.requestJson(accountPath(accountId, ["motions", motionId, "prospects"], query));
|
|
380
398
|
}
|
package/src/cli.js
CHANGED
|
@@ -89,6 +89,7 @@ const MOTIONS_DELETE_USAGE = "Usage: audienti motions delete <motn_id> --confirm
|
|
|
89
89
|
const MOTIONS_CLONE_USAGE = "Usage: audienti motions clone <motn_id> --name <text> [--json] [--account <acct_id>]";
|
|
90
90
|
const MOTIONS_MOVE_PROSPECTS_USAGE = "Usage: audienti motions move-prospects <source_motn_id> --target <target_motn_id> <prsp_id> [prsp_id...] [--json] [--account <acct_id>]";
|
|
91
91
|
const MOTIONS_RUN_DISCOVERY_USAGE = "Usage: audienti motions run-discovery <motn_id> [--target-count <n>] [--json] [--account <acct_id>]";
|
|
92
|
+
const MOTIONS_QUICK_START_USAGE = "Usage: audienti motions quick-start --url <company_url> [--principal <account_user_id|me>] [--feedback <text>] [--offer-type <type>] [--force] [--confirm] [--wait] [--timeout-seconds <n>] [--poll-interval-seconds <n>] [--json] [--account <acct_id>]";
|
|
92
93
|
const ICPS_SHOW_USAGE = "Usage: audienti icps show <icp_id> [--json] [--account <acct_id>]";
|
|
93
94
|
const ICPS_UPDATE_USAGE = "Usage: audienti icps update <icp_id> [--name <text>] [--notes <text>] [--discovery-keyword <text>] [--tags <tag[,tag...]>] [--json] [--account <acct_id>]";
|
|
94
95
|
const ICPS_ADD_TAG_USAGE = "Usage: audienti icps add-tag <icp_id> <tag> [--json] [--account <acct_id>]";
|
|
@@ -248,6 +249,7 @@ async function dispatch(argv, context) {
|
|
|
248
249
|
if (normalizedResource === "motions" && action === "clone") return motionsClone(rest, context, { accountOverride });
|
|
249
250
|
if (normalizedResource === "motions" && action === "move-prospects") return motionsMoveProspects(rest, context, { accountOverride });
|
|
250
251
|
if (normalizedResource === "motions" && action === "run-discovery") return motionsRunDiscovery(rest, context, { accountOverride });
|
|
252
|
+
if (normalizedResource === "motions" && action === "quick-start") return motionsQuickStart(rest, context, { accountOverride });
|
|
251
253
|
if (normalizedResource === "content" && action === "programs") return contentPrograms(rest, context, { accountOverride });
|
|
252
254
|
if (normalizedResource === "content" && action === "plan") return contentPlan(rest, context, { accountOverride });
|
|
253
255
|
if (normalizedResource === "content" && action === "show") return contentShow(rest, context, { accountOverride });
|
|
@@ -1543,6 +1545,55 @@ async function motionsRunDiscovery(args, context, { accountOverride } = {}) {
|
|
|
1543
1545
|
renderMotionDiscoveryRun(payload, context);
|
|
1544
1546
|
}
|
|
1545
1547
|
|
|
1548
|
+
async function motionsQuickStart(args, context, { accountOverride } = {}) {
|
|
1549
|
+
const { values, positionals } = parseCommandArgs(args, {
|
|
1550
|
+
...jsonOptions(),
|
|
1551
|
+
url: { type: "string" },
|
|
1552
|
+
principal: { type: "string" },
|
|
1553
|
+
feedback: { type: "string" },
|
|
1554
|
+
"offer-type": { type: "string" },
|
|
1555
|
+
force: { type: "boolean" },
|
|
1556
|
+
confirm: { type: "boolean" },
|
|
1557
|
+
wait: { type: "boolean" },
|
|
1558
|
+
"timeout-seconds": { type: "string" },
|
|
1559
|
+
"poll-interval-seconds": { type: "string" }
|
|
1560
|
+
});
|
|
1561
|
+
if (positionals.length > 0 || !values.url) throw new CommandError(MOTIONS_QUICK_START_USAGE);
|
|
1562
|
+
|
|
1563
|
+
const timeoutSeconds = normalizeOptionalPositiveInteger(values["timeout-seconds"], "--timeout-seconds") || DEFAULT_LOOKUP_TIMEOUT_SECONDS;
|
|
1564
|
+
const pollIntervalSeconds = normalizeOptionalPositiveInteger(values["poll-interval-seconds"], "--poll-interval-seconds") || DEFAULT_LOOKUP_POLL_INTERVAL_SECONDS;
|
|
1565
|
+
const { client, accountId } = await requireAccountContext(context, { accountOverride });
|
|
1566
|
+
const requestBody = {
|
|
1567
|
+
quick_start: compactObject({
|
|
1568
|
+
company_url: values.url,
|
|
1569
|
+
principal_account_user_id: values.principal,
|
|
1570
|
+
feedback: values.feedback,
|
|
1571
|
+
offer_type: values["offer-type"],
|
|
1572
|
+
force: values.force || undefined
|
|
1573
|
+
})
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
let draft = await client.createQuickStart(accountId, requestBody);
|
|
1577
|
+
if (values.wait && !quickStartReady(draft)) {
|
|
1578
|
+
draft = await waitForQuickStartDraft(client, accountId, draft, context, { timeoutSeconds, pollIntervalSeconds });
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
if (values.confirm) {
|
|
1582
|
+
if (!quickStartReady(draft)) {
|
|
1583
|
+
throw new CommandError(`Quick-start draft ${display(draft?.id)} is ${display(draft?.status)}. Re-run with --wait or confirm after it is ready.`);
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
const payload = await client.confirmQuickStart(accountId, draft.id, {});
|
|
1587
|
+
if (values.json) return writeJson(context.stdout, payload);
|
|
1588
|
+
|
|
1589
|
+
renderQuickStartConfirmation(payload, context);
|
|
1590
|
+
return;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
if (values.json) return writeJson(context.stdout, draft);
|
|
1594
|
+
renderQuickStartDraft(draft, context);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1546
1597
|
async function motionsAnalytics(args, context, { accountOverride } = {}) {
|
|
1547
1598
|
const { values, positionals } = parseCommandArgs(args, {
|
|
1548
1599
|
...jsonOptions(),
|
|
@@ -5324,6 +5375,45 @@ function renderMotionDiscoveryRun(payload, context) {
|
|
|
5324
5375
|
writeLine(context.stdout, `Target count: ${display(payload?.target_count)}`);
|
|
5325
5376
|
}
|
|
5326
5377
|
|
|
5378
|
+
function renderQuickStartDraft(draft, context) {
|
|
5379
|
+
writeLine(context.stdout, `Quick-start draft ${display(draft?.id)} is ${display(draft?.status)}.`);
|
|
5380
|
+
writeLine(context.stdout, `URL: ${display(draft?.normalized_url)}`);
|
|
5381
|
+
if (draft?.principal_account_user) writeLine(context.stdout, `Principal: ${accountUserLabel(draft.principal_account_user)}`);
|
|
5382
|
+
if (draft?.expires_at) writeLine(context.stdout, `Expires: ${draft.expires_at}`);
|
|
5383
|
+
if (draft?.error) writeLine(context.stdout, `Error: ${draft.error}`);
|
|
5384
|
+
if (quickStartReady(draft)) writeLine(context.stdout, `Confirm: audienti motions quick-start --url ${draft.normalized_url} --confirm`);
|
|
5385
|
+
}
|
|
5386
|
+
|
|
5387
|
+
function renderQuickStartConfirmation(payload, context) {
|
|
5388
|
+
const motion = payload?.motion || {};
|
|
5389
|
+
writeLine(context.stdout, `Quick-start motion ${display(entityLabel(motion) || motion.prefix_id)} ${payload?.reused ? "reused" : "created"}.`);
|
|
5390
|
+
writeLine(context.stdout, `Motion status: ${display(motion.status)}`);
|
|
5391
|
+
writeLine(context.stdout, `Reservation: ${display(payload?.reservation?.status)} / ${display(payload?.reservation?.launch_status)}`);
|
|
5392
|
+
if (payload?.reservation?.launch_reason) writeLine(context.stdout, `Launch reason: ${payload.reservation.launch_reason}`);
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
function quickStartReady(draft) {
|
|
5396
|
+
return draft?.ready === true || draft?.status === "ready";
|
|
5397
|
+
}
|
|
5398
|
+
|
|
5399
|
+
function quickStartTerminal(draft) {
|
|
5400
|
+
return quickStartReady(draft) || draft?.status === "failed";
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
async function waitForQuickStartDraft(client, accountId, initialDraft, context, { timeoutSeconds, pollIntervalSeconds }) {
|
|
5404
|
+
let draft = initialDraft;
|
|
5405
|
+
const deadline = context.now().getTime() + timeoutSeconds * 1000;
|
|
5406
|
+
|
|
5407
|
+
while (!quickStartTerminal(draft)) {
|
|
5408
|
+
if (context.now().getTime() >= deadline) return draft;
|
|
5409
|
+
|
|
5410
|
+
await context.sleep(pollIntervalSeconds * 1000);
|
|
5411
|
+
draft = await client.quickStart(accountId, draft.id);
|
|
5412
|
+
}
|
|
5413
|
+
|
|
5414
|
+
return draft;
|
|
5415
|
+
}
|
|
5416
|
+
|
|
5327
5417
|
function renderAnalyticsDashboard(payload, context) {
|
|
5328
5418
|
writeLine(context.stdout, `Dashboard analytics (${display(payload?.cohort?.label, "selected cohort")})`);
|
|
5329
5419
|
if (payload?.cohort) {
|
|
@@ -6145,6 +6235,7 @@ const HELP_TOPICS = new Map([
|
|
|
6145
6235
|
" audienti motions show <motn_id>",
|
|
6146
6236
|
" audienti motions analytics <motn_id>",
|
|
6147
6237
|
" audienti motions run-discovery <motn_id>",
|
|
6238
|
+
" audienti motions quick-start --url <company_url> --confirm --wait",
|
|
6148
6239
|
" audienti motions prospects <motn_id>",
|
|
6149
6240
|
" audienti motions create --payload <file.json>",
|
|
6150
6241
|
" audienti motions update <motn_id> [--status <state>] [--tags <tag[,tag...]>] [--own-post-engagement <true|false>]",
|
|
@@ -7393,6 +7484,7 @@ const HELP_TOPICS = new Map([
|
|
|
7393
7484
|
" audienti motions show <motn_id> [--json]",
|
|
7394
7485
|
" audienti motions status <motn_id> [--json]",
|
|
7395
7486
|
" audienti motions run-discovery <motn_id> [--target-count <n>] [--json]",
|
|
7487
|
+
" audienti motions quick-start --url <company_url> [--confirm] [--wait] [--json]",
|
|
7396
7488
|
" audienti motions analytics <motn_id> [--window 30d] [--json]",
|
|
7397
7489
|
" audienti motions prospects <motn_id> [--json]",
|
|
7398
7490
|
" audienti motions add-prospects <motn_id> <prsp_id> [prsp_id...] [--json]",
|
|
@@ -7407,7 +7499,7 @@ const HELP_TOPICS = new Map([
|
|
|
7407
7499
|
" audienti motions clone <motn_id> --name <text> [--json]",
|
|
7408
7500
|
" audienti motions move-prospects <source_motn_id> --target <target_motn_id> <prsp_id> [prsp_id...] [--json]",
|
|
7409
7501
|
"",
|
|
7410
|
-
"Status: read, create, status update, delete, clone, status, discovery launch, and prospect attachment commands implemented",
|
|
7502
|
+
"Status: read, create, quick-start, status update, delete, clone, status, discovery launch, and prospect attachment commands implemented",
|
|
7411
7503
|
"",
|
|
7412
7504
|
"CLI synonym:",
|
|
7413
7505
|
" `plays` is accepted anywhere `motions` is accepted",
|
|
@@ -7545,6 +7637,36 @@ const HELP_TOPICS = new Map([
|
|
|
7545
7637
|
" POST /api/v1/accounts/:account_id/motions/:id/run_discovery.json"
|
|
7546
7638
|
].join("\n")],
|
|
7547
7639
|
|
|
7640
|
+
["motions quick-start", [
|
|
7641
|
+
"Usage:",
|
|
7642
|
+
` ${MOTIONS_QUICK_START_USAGE.slice("Usage: ".length)}`,
|
|
7643
|
+
"",
|
|
7644
|
+
"Status: implemented",
|
|
7645
|
+
"",
|
|
7646
|
+
"Purpose:",
|
|
7647
|
+
" Draft a quick-start motion from a company URL, then optionally confirm it into a launched quick-start motion.",
|
|
7648
|
+
"",
|
|
7649
|
+
"Options:",
|
|
7650
|
+
" --url <company_url> Public HTTP(S) URL used by the quick-start drafter.",
|
|
7651
|
+
" --principal <user> Account user id or me. Defaults to the authenticated token user.",
|
|
7652
|
+
" --feedback <text> Optional operator guidance for the draft.",
|
|
7653
|
+
" --offer-type <type> Optional supported offer type hint.",
|
|
7654
|
+
" --force Request a fresh draft when inputs should replace an existing ready draft.",
|
|
7655
|
+
" --confirm Confirm the ready draft into motion setup and discovery launch.",
|
|
7656
|
+
" --wait Poll until the generated draft is ready before returning or confirming.",
|
|
7657
|
+
" --timeout-seconds <n> Maximum wait time. Defaults to 60.",
|
|
7658
|
+
" --poll-interval-seconds <n> Poll cadence. Defaults to 2.",
|
|
7659
|
+
"",
|
|
7660
|
+
"Pipeline:",
|
|
7661
|
+
" POST creates or reuses a QuickStartDraft and enqueues GenerateQuickStartDraftJob when needed.",
|
|
7662
|
+
" POST confirm calls QuickStartOrchestrator, creating ICP, offer, signals, motion, reservation, and discovery launch.",
|
|
7663
|
+
"",
|
|
7664
|
+
"API:",
|
|
7665
|
+
" POST /api/v1/accounts/:account_id/quick_start.json",
|
|
7666
|
+
" GET /api/v1/accounts/:account_id/quick_start/:draft_id.json",
|
|
7667
|
+
" POST /api/v1/accounts/:account_id/quick_start/:draft_id/confirm.json"
|
|
7668
|
+
].join("\n")],
|
|
7669
|
+
|
|
7548
7670
|
["motions prospects", [
|
|
7549
7671
|
"Usage:",
|
|
7550
7672
|
" audienti motions prospects <motn_id> [--json] [--account <acct_id>]",
|