@audienti/cli 0.1.117 → 0.1.128
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 +66 -0
- package/README.md +4 -0
- package/package.json +1 -1
- package/skills/audienti/SKILL.md +3 -0
- package/src/api-client.js +43 -5
- package/src/cli.js +166 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,72 @@ All notable changes to the Audienti CLI are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.128] - 2026-10-21
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `browser-repair computer <observe|navigate|click|scroll|type|responses>` commands for task-bound live browser sessions in the bounded repair loop (#2147).
|
|
12
|
+
|
|
13
|
+
## [0.1.127] - 2026-10-21
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Browser repair patch, hosted-test and no-change commands for the bounded repair loop (#2147).
|
|
18
|
+
|
|
19
|
+
## [0.1.126] - 2026-10-20
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- `audienti social-tools list` and `audienti social-tools show <name>` show the social tool catalog (name, kind, description and inputs) from the read-only catalog API (#2147).
|
|
24
|
+
|
|
25
|
+
## [0.1.125] - 2026-10-20
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- `audienti motions update` now says when a newly attached backing list does not add the people already on it, and how many of them are not in the experiment yet. The API returns the same notice as `list_attachment` (#2945).
|
|
30
|
+
|
|
31
|
+
## [0.1.124] - 2026-10-20
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Motion status and discovery history no longer count completed visibility records as in-progress people. Status omits expired eligibility dates and reports discovery-history reconciliation holds instead of stale success or retry timers (#2944).
|
|
36
|
+
|
|
37
|
+
## [0.1.123] - 2026-10-20
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- `audienti prospects replan <prsp> --apply` now admits a prospect that was never admitted to the Planner. When it cannot, it reports `not admitted` with the reason instead of `legacy`. Members of an active transition motion are no longer blocked from admission (#2945).
|
|
42
|
+
|
|
43
|
+
## [0.1.122] - 2026-10-19
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- Create child accounts with `audienti accounts create --name <name> --parent <name-or-id> [--json]` and the shared API. Parent admins receive access; ambiguous parent names and duplicate child names fail clearly (#2943).
|
|
48
|
+
|
|
49
|
+
## [0.1.121] - 2026-10-19
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- Add `motions runs` to read account-scoped, paginated discovery history with run purposes, current saved-person outcomes, and blocked-search reasons.
|
|
54
|
+
|
|
55
|
+
## [0.1.120] - 2026-10-19
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- Extend the existing `social-cookies activity` command with `--repair-task-id` and `--repair-id` for exact read-only browser repair details from the account-scoped activity API.
|
|
60
|
+
|
|
61
|
+
## [0.1.119] - 2026-10-18
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- Extend the operator conversation-reader request and status API contract with bounded retries that retain failure evidence. This release adds no new CLI command.
|
|
66
|
+
|
|
67
|
+
## [0.1.118] - 2026-10-16
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- Update the operator conversation-reader request and task-status API contract. This release adds no new CLI command.
|
|
72
|
+
|
|
7
73
|
## [0.1.117] - 2026-10-12
|
|
8
74
|
|
|
9
75
|
### Changed
|
package/README.md
CHANGED
|
@@ -78,6 +78,7 @@ Authenticate through the browser, then configure the default account context:
|
|
|
78
78
|
```bash
|
|
79
79
|
audienti auth login
|
|
80
80
|
audienti accounts list --json
|
|
81
|
+
audienti accounts create --name Doppel --parent OMALab --json
|
|
81
82
|
audienti accounts select <acct_id>
|
|
82
83
|
audienti users list
|
|
83
84
|
audienti users select <account_user_id|email|name|me>
|
|
@@ -232,6 +233,7 @@ audienti analytics motions --json
|
|
|
232
233
|
audienti analytics icps --json
|
|
233
234
|
audienti motions analytics <motn_id>
|
|
234
235
|
audienti motions run-discovery <motn_id>
|
|
236
|
+
audienti motions runs <motn_id> [--cursor <id>] [--limit <1-10>] [--json]
|
|
235
237
|
audienti motions quick-start --url https://example.com --wait --confirm
|
|
236
238
|
audienti motions abm-companies <motn_id> add --file abm-domains.txt
|
|
237
239
|
audienti motions abm-companies <motn_id> list
|
|
@@ -878,3 +880,5 @@ Copyright (c) 2026 OMALab, Inc. All rights reserved. See [LICENSE](LICENSE).
|
|
|
878
880
|
|
|
879
881
|
Batch import accepts up to 50 rows per API request. Split larger files before importing. Row destination IDs or new names override batch defaults; failed rows stay visible in the response.
|
|
880
882
|
Bulk destinations: `audienti prospects set-destination <prsp_id> --type list --destination <list_id>` adds by default. Use `--name "New list"` to create a list, `--type experiment --name "Existing relationships"` to create a transition without setup, or `--mode move` for explicit reassignment. Add preserves existing memberships; experiment Add skips people assigned elsewhere.
|
|
883
|
+
|
|
884
|
+
Create a child workspace with `audienti accounts create --name <name> --parent <name-or-id> [--json]`. The parent can be a visible name, unique name fragment, numeric ID, or prefixed ID. You must administer a root team account. All parent admins receive access to the child; ordinary members do not. Ambiguous names show matching IDs and stop. A duplicate child name under the same parent fails clearly. The response includes the new account ID. Creation keeps your selected account unchanged: use `audienti accounts select <new_acct_id>` or `--account <new_acct_id>` before creating a motion there.
|
package/package.json
CHANGED
package/skills/audienti/SKILL.md
CHANGED
|
@@ -111,6 +111,7 @@ context:
|
|
|
111
111
|
```bash
|
|
112
112
|
audienti auth login
|
|
113
113
|
audienti accounts list --json
|
|
114
|
+
audienti accounts create --name Doppel --parent OMALab --json
|
|
114
115
|
audienti accounts select <acct_id>
|
|
115
116
|
audienti users select me
|
|
116
117
|
```
|
|
@@ -332,3 +333,5 @@ completed report later.
|
|
|
332
333
|
- `tools email-find`, `linkedin-enrich`, `signals-find` and `write` return a run id immediately. Pass `--wait --json` to get results in one call, or poll `tools runs show <trun_id>` and read `tools runs results <trun_id>`. Nothing is sent and no prospects or experiments are created.
|
|
333
334
|
- Pass `--request-key <key>` when retrying a submission; the same key and input return the same run.
|
|
334
335
|
- `audienti network list|export` reads only the requester's own connected account's saved network. A 404 means the requester is not that account's owner. Coverage `unsupported_capture` or `not_yet_observed` is not zero.
|
|
336
|
+
|
|
337
|
+
Create a child workspace with `audienti accounts create --name <name> --parent <name-or-id> [--json]`. The parent can be a visible name, unique name fragment, numeric ID, or prefixed ID. You must administer a root team account. All parent admins receive access to the child; ordinary members do not. Ambiguous names show matching IDs and stop. A duplicate child name under the same parent fails clearly. The response includes the new account ID. Creation keeps your selected account unchanged: use `audienti accounts select <new_acct_id>` or `--account <new_acct_id>` before creating a motion there.
|
package/src/api-client.js
CHANGED
|
@@ -40,6 +40,18 @@ export class AudientiClient {
|
|
|
40
40
|
return this.requestJson("/api/v1/accounts.json");
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
socialTools() {
|
|
44
|
+
return this.requestJson("/api/v1/social_tools.json");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
socialTool(name) {
|
|
48
|
+
return this.requestJson(`/api/v1/social_tools/${encodeURIComponent(name)}.json`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
createAccount(body) {
|
|
52
|
+
return this.requestJson("/api/v1/accounts.json", { method: "POST", body });
|
|
53
|
+
}
|
|
54
|
+
|
|
43
55
|
account(accountId) {
|
|
44
56
|
return this.requestJson(accountPath(accountId, []));
|
|
45
57
|
}
|
|
@@ -55,6 +67,28 @@ export class AudientiClient {
|
|
|
55
67
|
});
|
|
56
68
|
}
|
|
57
69
|
|
|
70
|
+
browserRepairPatch(attemptId, { path, content }, token) {
|
|
71
|
+
return this.requestJson(`/api/v1/browser_repair_attempts/${encodeURIComponent(attemptId)}/patch.json`, {
|
|
72
|
+
method: "POST", body: { path, content }, token
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
browserRepairHostedTest(attemptId, token) {
|
|
77
|
+
return this.requestJson(`/api/v1/browser_repair_attempts/${encodeURIComponent(attemptId)}/hosted_test.json`, {method: "POST", body: {}, token});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
browserRepairNoChange(attemptId, reason, token) {
|
|
81
|
+
return this.requestJson(`/api/v1/browser_repair_attempts/${encodeURIComponent(attemptId)}/no_change.json`, {
|
|
82
|
+
method: "POST", body: {reason}, token
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
browserRepairComputer(attemptId, tool, body = {}, token) {
|
|
87
|
+
return this.requestJson(apiPath(["browser_repair_attempts", attemptId, "computer", tool]), {
|
|
88
|
+
method: "POST", body, token
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
58
92
|
users(accountId) {
|
|
59
93
|
return this.requestJson(accountPath(accountId, ["users"]));
|
|
60
94
|
}
|
|
@@ -813,6 +847,10 @@ export class AudientiClient {
|
|
|
813
847
|
});
|
|
814
848
|
}
|
|
815
849
|
|
|
850
|
+
motionRuns(accountId, motionId, params = {}) {
|
|
851
|
+
return this.requestJson(accountPath(accountId, ["motions", motionId, "runs"], params));
|
|
852
|
+
}
|
|
853
|
+
|
|
816
854
|
motionStatus(accountId, motionId) {
|
|
817
855
|
return this.requestJson(accountPath(accountId, ["motions", motionId, "status"]));
|
|
818
856
|
}
|
|
@@ -1418,14 +1456,14 @@ export class AudientiClient {
|
|
|
1418
1456
|
});
|
|
1419
1457
|
}
|
|
1420
1458
|
|
|
1421
|
-
async requestJson(path, { method = "GET", body } = {}) {
|
|
1459
|
+
async requestJson(path, { method = "GET", body, token } = {}) {
|
|
1422
1460
|
const url = new URL(path, `${this.host}/`);
|
|
1423
1461
|
let response;
|
|
1424
1462
|
|
|
1425
1463
|
try {
|
|
1426
1464
|
response = await this.fetchImpl(url, {
|
|
1427
1465
|
method,
|
|
1428
|
-
headers: this.headers(body),
|
|
1466
|
+
headers: this.headers(body, token === undefined ? this.token : token),
|
|
1429
1467
|
body: body === undefined ? undefined : JSON.stringify(body)
|
|
1430
1468
|
});
|
|
1431
1469
|
} catch (error) {
|
|
@@ -1444,14 +1482,14 @@ export class AudientiClient {
|
|
|
1444
1482
|
return responseBody;
|
|
1445
1483
|
}
|
|
1446
1484
|
|
|
1447
|
-
headers(body) {
|
|
1485
|
+
headers(body, token = this.token) {
|
|
1448
1486
|
const headers = {
|
|
1449
1487
|
Accept: "application/json",
|
|
1450
1488
|
"X-Audienti-Client": "cli"
|
|
1451
1489
|
};
|
|
1452
1490
|
|
|
1453
|
-
if (
|
|
1454
|
-
headers.Authorization = `Bearer ${
|
|
1491
|
+
if (token) {
|
|
1492
|
+
headers.Authorization = `Bearer ${token}`;
|
|
1455
1493
|
}
|
|
1456
1494
|
|
|
1457
1495
|
if (body !== undefined) {
|
package/src/cli.js
CHANGED
|
@@ -149,6 +149,7 @@ const PAYMENT_SHOW_USAGE = "Usage: audienti payment show [--json] [--account <ac
|
|
|
149
149
|
const PAYMENT_CODE_USAGE = "Usage: audienti payment code <signup_code> [--json] [--account <acct_id>]";
|
|
150
150
|
const BRAND_PROFILE_SHOW_USAGE = "Usage: audienti brand-profile show [--json] [--account <acct_id>]";
|
|
151
151
|
const BRAND_PROFILE_UPDATE_USAGE = "Usage: audienti brand-profile update [--voice <text>] [--style <text>] [--do-not-use <text>] [--json] [--account <acct_id>]";
|
|
152
|
+
const ACCOUNTS_CREATE_USAGE = "Usage: audienti accounts create --name <text> --parent <name-or-id> [--json]";
|
|
152
153
|
const ACCOUNTS_SHOW_USAGE = "Usage: audienti accounts show [<acct_id>] [--json] [--account <acct_id>]";
|
|
153
154
|
const LINKEDIN_LOOKUPS_USAGE = "Usage: audienti linkedin-lookups <company-sizes|company-types|functions|industries|job-titles|locations|seniorities> [--query <text>] [--icp <icp_id>] [--json] [--account <acct_id>]";
|
|
154
155
|
const LINKEDIN_LOOKUP_KINDS = new Map([
|
|
@@ -368,8 +369,12 @@ async function dispatch(argv, context) {
|
|
|
368
369
|
if (normalizedResource === "config" && action === "list") return configList(rest, context);
|
|
369
370
|
if (normalizedResource === "update" && action === "check") return updateCheck(rest, context);
|
|
370
371
|
if (normalizedResource === "accounts" && action === "list") return accountsList(rest, context, { accountOverride });
|
|
372
|
+
if (normalizedResource === "accounts" && action === "create") return accountsCreate(rest, context);
|
|
371
373
|
if (normalizedResource === "accounts" && action === "select") return accountsSelect(rest, context);
|
|
372
374
|
if (normalizedResource === "accounts" && action === "show") return accountsShow(rest, context, { accountOverride });
|
|
375
|
+
if (normalizedResource === "social-tools" && action === "list") return socialToolsList(rest, context);
|
|
376
|
+
if (normalizedResource === "social-tools" && action === "show") return socialToolsShow(rest, context);
|
|
377
|
+
if (normalizedResource === "browser-repair") return browserRepair(action, rest, context);
|
|
373
378
|
if (normalizedResource === "linkedin-lookups") return linkedinLookups(action, rest, context, { accountOverride });
|
|
374
379
|
if (normalizedResource === "users" && action === "list") return usersList(rest, context, { accountOverride });
|
|
375
380
|
if (normalizedResource === "users" && action === "select") return usersSelect(rest, context, { accountOverride });
|
|
@@ -450,6 +455,7 @@ async function dispatch(argv, context) {
|
|
|
450
455
|
if (normalizedResource === "motions" && action === "list") return motionsList(rest, context, { accountOverride });
|
|
451
456
|
if (normalizedResource === "motions" && action === "show") return motionsShow(rest, context, { accountOverride });
|
|
452
457
|
if (normalizedResource === "motions" && action === "signals") return motionsSignals(rest, context, { accountOverride });
|
|
458
|
+
if (normalizedResource === "motions" && action === "runs") return motionsRuns(rest, context, { accountOverride });
|
|
453
459
|
if (normalizedResource === "motions" && action === "status") return motionsStatus(rest, context, { accountOverride });
|
|
454
460
|
if (normalizedResource === "motions" && ["abm-companies", "company-filters"].includes(action)) return motionsAbmCompanies(rest, context, { accountOverride });
|
|
455
461
|
if (normalizedResource === "motions" && action === "profile-signals") return motionsProfileSignals(rest, context, { accountOverride });
|
|
@@ -1733,6 +1739,105 @@ async function accountsList(args, context, { accountOverride } = {}) {
|
|
|
1733
1739
|
}
|
|
1734
1740
|
}
|
|
1735
1741
|
|
|
1742
|
+
async function accountsCreate(args, context) {
|
|
1743
|
+
const { values, positionals } = parseCommandArgs(args, {
|
|
1744
|
+
...jsonOptions(),
|
|
1745
|
+
name: { type: "string" },
|
|
1746
|
+
parent: { type: "string" }
|
|
1747
|
+
});
|
|
1748
|
+
if (positionals.length || !values.name?.trim() || !values.parent?.trim()) {
|
|
1749
|
+
throw new CommandError(ACCOUNTS_CREATE_USAGE);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
const config = await requireAuthenticatedConfig(context);
|
|
1753
|
+
const client = clientFromConfig(config, context);
|
|
1754
|
+
const parent = resolveAccountSelection(await client.accounts(), values.parent);
|
|
1755
|
+
if (!parent) throw new CommandError(`Parent account "${values.parent}" does not exist or is not accessible.`);
|
|
1756
|
+
if (!parent.prefix_id) throw new CommandError("Account payload is missing prefix_id.");
|
|
1757
|
+
|
|
1758
|
+
const account = await client.createAccount({ account: { name: values.name, parent_account_id: parent.prefix_id } });
|
|
1759
|
+
if (values.json) return writeJson(context.stdout, account);
|
|
1760
|
+
writeLine(context.stdout, `Created account: ${account.name} (${account.prefix_id})`);
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
async function socialToolsList(args, context) {
|
|
1764
|
+
const {values, positionals} = parseCommandArgs(args, {json: {type: "boolean"}});
|
|
1765
|
+
if (positionals.length > 0) throw new CommandError("Usage: audienti social-tools list [--json]");
|
|
1766
|
+
|
|
1767
|
+
const config = await requireAuthenticatedConfig(context);
|
|
1768
|
+
const tools = await clientFromConfig(config, context).socialTools();
|
|
1769
|
+
if (values.json) {
|
|
1770
|
+
writeLine(context.stdout, JSON.stringify(tools, null, 2));
|
|
1771
|
+
return;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
writeLine(context.stdout, " NAME\tKIND\tWRITER\tEFFECT");
|
|
1775
|
+
for (const tool of tools) writeLine(context.stdout, ` ${tool.name}\t${tool.kind}\t${tool.writer}\t${tool.effect}`);
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
async function socialToolsShow(args, context) {
|
|
1779
|
+
const {values, positionals} = parseCommandArgs(args, {json: {type: "boolean"}});
|
|
1780
|
+
if (positionals.length !== 1) throw new CommandError("Usage: audienti social-tools show <name> [--json]");
|
|
1781
|
+
|
|
1782
|
+
const config = await requireAuthenticatedConfig(context);
|
|
1783
|
+
const tool = await clientFromConfig(config, context).socialTool(positionals[0]);
|
|
1784
|
+
writeLine(context.stdout, JSON.stringify(tool, null, 2));
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
async function browserRepair(action, args, context) {
|
|
1788
|
+
if (action === "computer") return browserRepairComputer(args, context);
|
|
1789
|
+
const config = await requireAuthenticatedConfig(context);
|
|
1790
|
+
const client = clientFromConfig(config, context);
|
|
1791
|
+
const {values, positionals} = parseCommandArgs(args, {
|
|
1792
|
+
attempt: {type: "string"}, path: {type: "string"}, "content-file": {type: "string"},
|
|
1793
|
+
reason: {type: "string"}, token: {type: "string"}, json: {type: "boolean"}
|
|
1794
|
+
});
|
|
1795
|
+
if (positionals.length || !values.attempt || !values.token) {
|
|
1796
|
+
throw new CommandError("Usage: audienti browser-repair <patch|hosted-test|no-change> --attempt <id> --token <token> ...");
|
|
1797
|
+
}
|
|
1798
|
+
let result;
|
|
1799
|
+
if (action === "patch") {
|
|
1800
|
+
if (!values.path || !values["content-file"]) throw new CommandError("Usage: audienti browser-repair patch --attempt <id> --path <p> --content-file <file>");
|
|
1801
|
+
result = await client.browserRepairPatch(values.attempt, {path: values.path, content: await readFile(values["content-file"], "utf8")}, values.token);
|
|
1802
|
+
} else if (action === "hosted-test") {
|
|
1803
|
+
result = await client.browserRepairHostedTest(values.attempt, values.token);
|
|
1804
|
+
} else if (action === "no-change") {
|
|
1805
|
+
if (!values.reason) throw new CommandError("Usage: audienti browser-repair no-change --attempt <id> --reason <text>");
|
|
1806
|
+
result = await client.browserRepairNoChange(values.attempt, values.reason, values.token);
|
|
1807
|
+
} else {
|
|
1808
|
+
throw new CommandError("Usage: audienti browser-repair <patch|hosted-test|no-change>");
|
|
1809
|
+
}
|
|
1810
|
+
if (values.json) writeJson(context.stdout, result);
|
|
1811
|
+
else writeLine(context.stdout, JSON.stringify(result));
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
async function browserRepairComputer(args, context) {
|
|
1815
|
+
const config = await requireAuthenticatedConfig(context);
|
|
1816
|
+
const client = clientFromConfig(config, context);
|
|
1817
|
+
const {values, positionals} = parseCommandArgs(args, {
|
|
1818
|
+
attempt: {type: "string"}, token: {type: "string"}, selector: {type: "string"}, url: {type: "string"},
|
|
1819
|
+
ref: {type: "string"}, text: {type: "string"}, "expected-target": {type: "string"}, target: {type: "string"},
|
|
1820
|
+
offset: {type: "string"}, x: {type: "string"}, y: {type: "string"}, "delta-x": {type: "string"},
|
|
1821
|
+
"delta-y": {type: "string"}, mutating: {type: "boolean"}, submit: {type: "boolean"}, json: {type: "boolean"}
|
|
1822
|
+
});
|
|
1823
|
+
const tool = positionals.shift();
|
|
1824
|
+
if (!tool || positionals.length || !values.attempt || !values.token || !["observe", "navigate", "click", "scroll", "type", "responses"].includes(tool)) {
|
|
1825
|
+
throw new CommandError("Usage: audienti browser-repair computer <observe|navigate|click|scroll|type|responses> --attempt <id> --token <token>");
|
|
1826
|
+
}
|
|
1827
|
+
const body = {};
|
|
1828
|
+
for (const [key, value] of Object.entries({selector: values.selector, url: values.url, ref: values.ref, text: values.text,
|
|
1829
|
+
offset: values.offset === undefined ? undefined : Number(values.offset), x: values.x === undefined ? undefined : Number(values.x),
|
|
1830
|
+
y: values.y === undefined ? undefined : Number(values.y), delta_x: values["delta-x"] === undefined ? undefined : Number(values["delta-x"]),
|
|
1831
|
+
delta_y: values["delta-y"] === undefined ? undefined : Number(values["delta-y"]), mutating: values.mutating, submit: values.submit})) {
|
|
1832
|
+
if (value !== undefined) body[key] = value;
|
|
1833
|
+
}
|
|
1834
|
+
if (values["expected-target"] !== undefined) body.expected_target = parseJsonObjectOption(values["expected-target"], "--expected-target");
|
|
1835
|
+
if (values.target !== undefined) body.target = parseJsonObjectOption(values.target, "--target");
|
|
1836
|
+
const result = await client.browserRepairComputer(values.attempt, tool, body, values.token);
|
|
1837
|
+
if (values.json) return writeJson(context.stdout, result);
|
|
1838
|
+
writeLine(context.stdout, JSON.stringify(result));
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1736
1841
|
async function accountsShow(args, context, { accountOverride } = {}) {
|
|
1737
1842
|
const { values, positionals } = parseCommandArgs(args, jsonOptions());
|
|
1738
1843
|
if (positionals.length > 1) throw new CommandError(ACCOUNTS_SHOW_USAGE);
|
|
@@ -1822,12 +1927,14 @@ function resolveAccountSelection(accounts, term) {
|
|
|
1822
1927
|
|
|
1823
1928
|
const exactPrefix = accounts.find((candidate) => candidate.prefix_id === requested);
|
|
1824
1929
|
if (exactPrefix) return exactPrefix;
|
|
1930
|
+
const exactId = accounts.find((candidate) => String(candidate.id) === requested);
|
|
1931
|
+
if (exactId) return exactId;
|
|
1825
1932
|
|
|
1826
1933
|
const normalizedRequested = requested.toLowerCase();
|
|
1827
|
-
const
|
|
1828
|
-
if (
|
|
1934
|
+
const exactNames = accounts.filter((candidate) => String(candidate.name || "").toLowerCase() === normalizedRequested);
|
|
1935
|
+
if (exactNames.length === 1) return exactNames[0];
|
|
1829
1936
|
|
|
1830
|
-
const matches = accounts.filter((candidate) => {
|
|
1937
|
+
const matches = exactNames.length > 1 ? exactNames : accounts.filter((candidate) => {
|
|
1831
1938
|
const prefixId = String(candidate.prefix_id || "").toLowerCase();
|
|
1832
1939
|
const name = String(candidate.name || "").toLowerCase();
|
|
1833
1940
|
return prefixId.includes(normalizedRequested) || name.includes(normalizedRequested);
|
|
@@ -3602,6 +3709,25 @@ async function motionsSignals(args, context, { accountOverride } = {}) {
|
|
|
3602
3709
|
renderMotionDiscoverySignals(payload, context);
|
|
3603
3710
|
}
|
|
3604
3711
|
|
|
3712
|
+
async function motionsRuns(args, context, { accountOverride } = {}) {
|
|
3713
|
+
const { values, positionals } = parseCommandArgs(args, {
|
|
3714
|
+
...jsonOptions(), cursor: { type: "string" }, limit: { type: "string" }
|
|
3715
|
+
});
|
|
3716
|
+
if (positionals.length !== 1) throw new CommandError("Usage: audienti motions runs <motn_id> [--cursor <id>] [--limit <1-10>] [--json] [--account <acct_id>]");
|
|
3717
|
+
const { client, accountId } = await requireAccountContext(context, { accountOverride });
|
|
3718
|
+
const payload = await client.motionRuns(accountId, positionals[0], compactObject({
|
|
3719
|
+
cursor: normalizeOptionalPositiveInteger(values.cursor, "--cursor"),
|
|
3720
|
+
limit: normalizeOptionalPositiveInteger(values.limit, "--limit")
|
|
3721
|
+
}));
|
|
3722
|
+
if (values.json) return writeJson(context.stdout, payload);
|
|
3723
|
+
for (const row of payload.runs || []) {
|
|
3724
|
+
context.stdout.write(`#${row.id} ${row.purpose}: ${row.status} · ${row.outcome || "outcome unknown"} · seen ${row.seen_count} · submitted ${row.submitted_count} · saved ${row.promoted_count}\n`);
|
|
3725
|
+
if (row.error_message) context.stdout.write(` ${row.error_message}\n`);
|
|
3726
|
+
}
|
|
3727
|
+
if (!payload.runs?.length) context.stdout.write("No discovery runs on this page.\n");
|
|
3728
|
+
if (payload.has_more) context.stdout.write(`More runs: --cursor ${payload.next_cursor}\n`);
|
|
3729
|
+
}
|
|
3730
|
+
|
|
3605
3731
|
async function motionsStatus(args, context, { accountOverride } = {}) {
|
|
3606
3732
|
const { values, positionals } = parseCommandArgs(args, jsonOptions());
|
|
3607
3733
|
if (positionals.length !== 1) throw new CommandError("Usage: audienti motions status <motn_id> [--json] [--account <acct_id>]");
|
|
@@ -4016,6 +4142,7 @@ async function motionsUpdate(args, context, { accountOverride } = {}) {
|
|
|
4016
4142
|
|
|
4017
4143
|
writeLine(context.stdout, `Updated motion ${display(motion?.name)} (${display(motion?.prefix_id)}).`);
|
|
4018
4144
|
renderMotion(motion, context);
|
|
4145
|
+
if (motion?.list_attachment?.message) writeLine(context.stdout, `List: ${motion.list_attachment.message}`);
|
|
4019
4146
|
if (!statusBlocked) return undefined;
|
|
4020
4147
|
|
|
4021
4148
|
writeLine(
|
|
@@ -8349,6 +8476,8 @@ function renderProspectReplan(payload, context) {
|
|
|
8349
8476
|
writeLine(context.stdout, "The request was recorded, but the Planner could not apply it. Review the reason before retrying.");
|
|
8350
8477
|
} else if (payload?.status === "evaluation_error") {
|
|
8351
8478
|
writeLine(context.stdout, "Planner evaluation failed. Fix the evaluation error and rerun with --apply.");
|
|
8479
|
+
} else if (payload?.status === "not_admitted") {
|
|
8480
|
+
writeLine(context.stdout, "This prospect is not admitted to the Planner, so nothing was planned. Fix the reason above and rerun with --apply.");
|
|
8352
8481
|
} else if (payload?.status === "not_applied") {
|
|
8353
8482
|
writeLine(context.stdout, "The plan was not persisted. Review the reason before retrying.");
|
|
8354
8483
|
}
|
|
@@ -8413,6 +8542,7 @@ const REPLAN_STATUS_LABELS = Object.freeze({
|
|
|
8413
8542
|
dry_run: "dry run",
|
|
8414
8543
|
coach_error: "coach error",
|
|
8415
8544
|
not_applied: "not applied",
|
|
8545
|
+
not_admitted: "not admitted",
|
|
8416
8546
|
pending: "pending",
|
|
8417
8547
|
busy: "busy",
|
|
8418
8548
|
failed: "failed",
|
|
@@ -10621,6 +10751,7 @@ const HELP_TOPICS = new Map([
|
|
|
10621
10751
|
["skills list", "Usage:\n audienti skills list [--json]\n\nList bundled skills and marketplace discovery metadata without network or login."],
|
|
10622
10752
|
["skills show", "Usage:\n audienti skills show <name> [--json]\n\nPrint bundled skill instructions, or upstream source links and host-specific install commands. Read each upstream README for its dependencies. Installation is a separate action."],
|
|
10623
10753
|
["tools gift-research", "Usage:\n audienti tools gift-research --url <website> [--json]\n\nGive the agent the website-gift-research skill and the supplied HTTP(S) URL. The agent browses using its own tools. The CLI does not fetch the website, call Audienti, require login, create gifts or return research results.\n\nRead the skill without a website:\n audienti skills show audienti-gift-research"],
|
|
10754
|
+
["motions runs", "Usage:\n audienti motions runs <motn_id> [--cursor <id>] [--limit <1-10>] [--json] [--account <acct_id>]\n\nList account-scoped discovery runs with read-only pagination."],
|
|
10624
10755
|
["", [
|
|
10625
10756
|
"Usage:",
|
|
10626
10757
|
" audienti <command> [options]",
|
|
@@ -10657,6 +10788,7 @@ const HELP_TOPICS = new Map([
|
|
|
10657
10788
|
" audienti motions list",
|
|
10658
10789
|
" audienti motions show <motn_id>",
|
|
10659
10790
|
" audienti motions analytics <motn_id>",
|
|
10791
|
+
" audienti motions runs <motn_id> [--cursor <id>] [--limit <1-10>] [--json]",
|
|
10660
10792
|
" audienti motions run-discovery <motn_id>",
|
|
10661
10793
|
" audienti motions quick-start --url <company_url> --confirm --wait",
|
|
10662
10794
|
" audienti motions prospects <motn_id>",
|
|
@@ -10982,6 +11114,7 @@ const HELP_TOPICS = new Map([
|
|
|
10982
11114
|
["accounts", [
|
|
10983
11115
|
"Usage:",
|
|
10984
11116
|
" audienti accounts list [--json]",
|
|
11117
|
+
` ${ACCOUNTS_CREATE_USAGE.slice("Usage: ".length)}`,
|
|
10985
11118
|
" audienti accounts show [<acct_id>] [--json]",
|
|
10986
11119
|
" audienti accounts select <acct_id>",
|
|
10987
11120
|
"",
|
|
@@ -10991,6 +11124,17 @@ const HELP_TOPICS = new Map([
|
|
|
10991
11124
|
" acct_id: string Account prefix id, for example acct_abc123"
|
|
10992
11125
|
].join("\n")],
|
|
10993
11126
|
|
|
11127
|
+
["social-tools", [
|
|
11128
|
+
"Usage:",
|
|
11129
|
+
" audienti social-tools list [--json]",
|
|
11130
|
+
" audienti social-tools show <name> [--json]",
|
|
11131
|
+
"",
|
|
11132
|
+
"Status: implemented",
|
|
11133
|
+
"",
|
|
11134
|
+
"Purpose:",
|
|
11135
|
+
" List the server's social tool catalog or inspect one tool's public metadata."
|
|
11136
|
+
].join("\n")],
|
|
11137
|
+
|
|
10994
11138
|
["social-cookies", [
|
|
10995
11139
|
"Usage:",
|
|
10996
11140
|
" audienti social-cookies sync-messages <scok_id> [--folder <folder>] [--retry] [--json] [--account <acct_id>]",
|
|
@@ -11026,6 +11170,21 @@ const HELP_TOPICS = new Map([
|
|
|
11026
11170
|
" The CLI only requests work; provider traversal remains owned by the server worker."
|
|
11027
11171
|
].join("\n")],
|
|
11028
11172
|
|
|
11173
|
+
["accounts create", [
|
|
11174
|
+
"Usage:",
|
|
11175
|
+
` ${ACCOUNTS_CREATE_USAGE.slice("Usage: ".length)}`,
|
|
11176
|
+
"",
|
|
11177
|
+
"Creates a child under a root team account you administer and copies its admins.",
|
|
11178
|
+
"--parent accepts an accessible account name, unique fragment, numeric ID or prefixed ID.",
|
|
11179
|
+
"Ambiguous names list matching IDs; use an ID to choose. Duplicate child names fail clearly.",
|
|
11180
|
+
"Returns the new account ID. Your selected account does not change.",
|
|
11181
|
+
"Use audienti accounts select <new_acct_id> or --account <new_acct_id> for subsequent commands.",
|
|
11182
|
+
"",
|
|
11183
|
+
"API: POST /api/v1/accounts.json",
|
|
11184
|
+
"",
|
|
11185
|
+
"Example:",
|
|
11186
|
+
" audienti accounts create --name Doppel --parent OMALab --json"
|
|
11187
|
+
].join("\n")],
|
|
11029
11188
|
["accounts list", [
|
|
11030
11189
|
"Usage:",
|
|
11031
11190
|
" audienti accounts list [--json] [--account <acct_id>]",
|
|
@@ -13019,6 +13178,7 @@ const HELP_TOPICS = new Map([
|
|
|
13019
13178
|
" audienti motions show <motn_id> [--json]",
|
|
13020
13179
|
" audienti motions signals <motn_id> [--json]",
|
|
13021
13180
|
" audienti motions status <motn_id> [--json]",
|
|
13181
|
+
" audienti motions runs <motn_id> [--cursor <id>] [--limit <1-10>] [--json]",
|
|
13022
13182
|
" audienti motions run-discovery <motn_id> [--target-count <n>] [--json]",
|
|
13023
13183
|
" audienti motions quick-start --url <company_url> [--confirm] [--wait] [--json]",
|
|
13024
13184
|
" audienti motions setup-state [--json]",
|
|
@@ -15936,20 +16096,21 @@ const PARITY_ACTION_COMMANDS = new Map([
|
|
|
15936
16096
|
done: (_positionals, payload) => describeSocialCookie(payload?.social_cookie)
|
|
15937
16097
|
}],
|
|
15938
16098
|
["social-cookies activity", {
|
|
15939
|
-
usage: "audienti social-cookies activity <scok_id> [--section <actions|status|sync|browser>] [--window <1h|24h|7d|30d>] [--task-type <type>] [--page <n>]",
|
|
16099
|
+
usage: "audienti social-cookies activity <scok_id> [--section <actions|status|sync|browser>] [--window <1h|24h|7d|30d>] [--task-type <type>] [--task-id <id>] [--repair-id <id>] [--page <n>]",
|
|
15940
16100
|
purpose: "Read a social account's action, sync, and browser activity without changing work.",
|
|
15941
16101
|
api: "GET /api/v1/accounts/:account_id/social_cookies/:id/activity.json",
|
|
15942
16102
|
json: true,
|
|
15943
16103
|
options: {
|
|
15944
16104
|
section: { type: "string" }, window: { type: "string" }, "task-type": { type: "string" },
|
|
15945
16105
|
page: { type: "string" }, "per-page": { type: "string" }, "event-id": { type: "string" },
|
|
15946
|
-
"task-id": { type: "string" }, "session-id": { type: "string" }, status: { type: "string" },
|
|
16106
|
+
"task-id": { type: "string" }, "repair-task-id": { type: "string" }, "repair-id": { type: "string" }, "session-id": { type: "string" }, status: { type: "string" },
|
|
15947
16107
|
"action-type": { type: "string" }, "automation-filter": { type: "string" }, query: { type: "string" },
|
|
15948
16108
|
"created-from": { type: "string" }, "created-to": { type: "string" }
|
|
15949
16109
|
},
|
|
15950
16110
|
run: (client, accountId, [id], values) => client.socialCookieActivity(accountId, id, compactObject({
|
|
15951
16111
|
section: values.section, window: values.window, task_type: values["task-type"], page: values.page,
|
|
15952
16112
|
per_page: values["per-page"], event_id: values["event-id"], task_id: values["task-id"],
|
|
16113
|
+
repair_task_id: values["repair-task-id"], repair_id: values["repair-id"],
|
|
15953
16114
|
session_id: values["session-id"], status: values.status, action_type: values["action-type"],
|
|
15954
16115
|
automation_filter: values["automation-filter"], query: values.query,
|
|
15955
16116
|
created_from: values["created-from"], created_to: values["created-to"]
|