@audienti/cli 0.2.0-exora.13 → 0.2.0-exora.15
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/cli/audienti.mjs +12 -2
- package/cli/playbook-help.mjs +0 -12
- package/cli/playbook-operations.mjs +0 -3
- package/cli/progress.mjs +2 -2
- package/package.json +1 -1
- package/skills/playbook-design/SKILL.md +4 -5
- package/source-manifest.json +7 -7
package/cli/audienti.mjs
CHANGED
|
@@ -90,7 +90,7 @@ Find prospects: campaign find CAMPAIGN_ID --count N --max-credits C (searches w
|
|
|
90
90
|
campaign check CAMPAIGN_ID --url LINKEDIN_URL [--request-id UUID] (checks one person the same way; reuse the request ID after an interruption)
|
|
91
91
|
Target companies: campaign targets CAMPAIGN_ID [--limit N --after CURSOR] (reads the companies people must work at to join)
|
|
92
92
|
campaign targets CAMPAIGN_ID --add acme.com,linkedin.com/company/globex [--remove old.com] | --set FILE|- (one company per line; saves a new revision)
|
|
93
|
-
Playbooks: playbook list [--archived] [--limit N --cursor ID]|actions|show ID [--revision N]|save --file REQUEST.json|archive ID|restore ID|delete ID|progress PARTICIPATION_ID|record --file REQUEST.json
|
|
93
|
+
Playbooks: playbook list [--archived] [--limit N --cursor ID]|actions|show ID [--revision N]|save --file REQUEST.json|archive ID|restore ID|delete ID|progress PARTICIPATION_ID|record --file REQUEST.json (audienti playbook SUBCOMMAND --help for the request shape)
|
|
94
94
|
Analytics: analytics show --from ISO --to ISO [--campaign ID] [--playbook-version ID] [--format json|csv]
|
|
95
95
|
analytics outbound [--workspace ID] [--days N | --from ISO --to ISO] [--by sender|action|day] [--format json|csv]
|
|
96
96
|
analytics activity [--workspace ID] [--days N | --from ISO --to ISO] [--format json|csv]
|
|
@@ -136,6 +136,15 @@ function commandHelp() {
|
|
|
136
136
|
if (example) console.log(`\nExample --file INPUT.json for ${example[0]}:\n${JSON.stringify(example[1], null, 1)}\n${example[0].startsWith('intent') ? 'Rules: the "Label a message with its words" section of the getting-started replies reference.' : 'Steps and rules: the "Save prospects and contacts" section of llms.txt.'}`);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/** Says what is wrong with a command no handler took, instead of one message for every case. */
|
|
140
|
+
function unknownCommandMessage(words) {
|
|
141
|
+
const first = words[0];
|
|
142
|
+
if (first === undefined) return 'Give a command. Use audienti --help.';
|
|
143
|
+
if (first.startsWith('-')) return `Put the command first, then its options: audienti COMMAND [--workspace ID] [--profile PATH]. "${first}" is an option, not a command. Use audienti --help.`;
|
|
144
|
+
if (first === 'mcp') return 'mcp starts the local MCP server and takes no options. Run: audienti mcp';
|
|
145
|
+
return `"${first}" is not an audienti command. Use audienti --help for the commands. Most commands also take --workspace ID, and --profile PATH when the profile is not set in AUDIENTI_PROFILE.`;
|
|
146
|
+
}
|
|
147
|
+
|
|
139
148
|
async function main() {
|
|
140
149
|
if (args[0] === 'playbook' && args.slice(1).some(value => value === '--help' || value === '-h')) { console.log(playbookHelp(args[1]?.startsWith('-') ? undefined : args[1])); return; }
|
|
141
150
|
if (args.length > 1 && args.slice(1).some(value => value === '--help' || value === '-h') && !['tools', 'call', 'skills'].includes(args[0])) { commandHelp(); return; }
|
|
@@ -193,7 +202,8 @@ async function main() {
|
|
|
193
202
|
profileConfig = configuration(undefined, 'account:read');
|
|
194
203
|
if (!profileConfig.token) throw new Error('whoami needs a human account token, and AUDIENTI_PROFILE holds none. Agents confirm their connection with: audienti workspace list');
|
|
195
204
|
}
|
|
196
|
-
if (args[0] !== 'whoami'
|
|
205
|
+
if (args[0] !== 'whoami') throw new Error(unknownCommandMessage(args));
|
|
206
|
+
if (args.length > 2 || (args[1] && args[1] !== '--json')) throw new Error('whoami takes only --json and --profile PATH. Use audienti --help.');
|
|
197
207
|
const rawUrl = profileConfig ? profileConfig.url : process.env.AUDIENTI_API_URL;
|
|
198
208
|
const token = profileConfig ? profileConfig.token : process.env.AUDIENTI_API_TOKEN;
|
|
199
209
|
if (!rawUrl || !token) throw new Error('Set AUDIENTI_API_URL and AUDIENTI_API_TOKEN, or pass --profile PATH (or set AUDIENTI_PROFILE) to a profile with an account:read token. Create a token from your Account page.');
|
package/cli/playbook-help.mjs
CHANGED
|
@@ -51,18 +51,6 @@ export const playbookCommands = {
|
|
|
51
51
|
record: {
|
|
52
52
|
usage: 'playbook record --file REQUEST.json [--workspace ID] [--profile PATH]',
|
|
53
53
|
about: 'Report that a person moved to a stage or off-ramp, or finished the current stage play. The file has participationId, expectedVersion (the version from playbook progress), requestId (a fresh UUID), exactly one of stageKey, offRampKey or finishStage true, reason, and evidence (a list of {kind: observation|conversation, id}).'
|
|
54
|
-
},
|
|
55
|
-
suggest: {
|
|
56
|
-
usage: 'playbook suggest --file REQUEST.json [--workspace ID] [--profile PATH]',
|
|
57
|
-
about: 'The same request as record, but it asks a person to approve the move in Operator. Nothing changes until they approve.'
|
|
58
|
-
},
|
|
59
|
-
suggestions: {
|
|
60
|
-
usage: 'playbook suggestions [--limit 1..100] [--cursor ID] [--workspace ID] [--profile PATH]',
|
|
61
|
-
about: 'Pending suggestions that wait for a person to approve or dismiss them.'
|
|
62
|
-
},
|
|
63
|
-
decide: {
|
|
64
|
-
usage: 'playbook decide --file REQUEST.json [--workspace ID] [--profile PATH]',
|
|
65
|
-
about: 'Approve or dismiss one pending suggestion: {"id": SUGGESTION_ID, "requestId": UUID, "decision": "approve" or "dismiss"}. People only; an agent cannot approve.'
|
|
66
54
|
}
|
|
67
55
|
};
|
|
68
56
|
const lines = Object.values(playbookCommands).map(command => command.usage);
|
|
@@ -30,8 +30,5 @@ export const playbookOperations={
|
|
|
30
30
|
workspace_pipeline_get:{schema:z.object({...scope,campaignId:uuid.optional(),pinId:uuid.optional()}).strict(),method:'GET',path:a=>`${base(a)}/pipeline?${query(a)}`,scoped:true,description:'Read the pipeline board: stages of one playbook version, the people currently in each stage, and counts of people closed out through each off-ramp. Free CRM read.'},
|
|
31
31
|
playbook_progress_get:{schema:z.object({...scope,participationId:uuid.describe('A participation ID (one person in one campaign, from the pipeline), not a playbook ID.')}).strict(),method:'GET',path:a=>`${base(a)}/participations/${a.participationId}/progress`,scoped:true,description:'Read the participation’s admitted playbook pin and recorded stage/outcome history. Takes a participation ID (a person in a campaign; each person in the pipeline has one), not a playbook ID.'},
|
|
32
32
|
playbook_progress_record:{schema:z.object({...scope,participationId:uuid,expectedVersion:z.number().int().nonnegative(),requestId:uuid,stageKey:uuid.optional(),offRampKey:uuid.optional(),finishStage:z.literal(true).optional(),reason:z.string().trim().min(1).max(2000),evidence:z.array(z.object({kind:z.enum(['observation','conversation']),id:uuid}).strict()).max(20)}).strict(),method:'POST',path:a=>`${base(a)}/participations/${a.participationId}/progress`,body:({workspaceId,participationId,...a})=>a,scoped:true,description:'Report a stage, off-ramp, or finishStage:true after externally completing the current play and waits. Finish resolves next/stay/off-ramp from the admitted version. Stored evidence required for agents; human-review and backward-move rules apply. Assigned owner/Admin only. Goal ends prospecting; post-goal forward reporting never reactivates. No send or provider call.'},
|
|
33
|
-
playbook_progress_suggest:{schema:z.object({...scope,participationId:uuid,expectedVersion:z.number().int().nonnegative(),requestId:uuid,stageKey:uuid.optional(),offRampKey:uuid.optional(),finishStage:z.literal(true).optional(),reason:z.string().trim().min(1).max(2000),evidence:z.array(z.object({kind:z.enum(['observation','conversation']),id:uuid}).strict()).max(20)}).strict(),method:'POST',path:a=>`${base(a)}/participations/${a.participationId}/suggestions`,body:({workspaceId,participationId,...a})=>a,scoped:true,description:'Suggest a pinned stage move, off-ramp or play completion for human review in Operator. Stored evidence required. Does not change progress or send anything. Assigned owner/Admin; current human approval revalidates progress.'},
|
|
34
|
-
playbook_suggestion_decide:{schema:z.object({...scope,id:uuid,requestId:uuid,decision:z.enum(['approve','dismiss'])}).strict(),method:'POST',path:a=>`${base(a)}/playbook-suggestions/${a.id}/decision`,body:({workspaceId,id,...a})=>a,scoped:true,description:'Approve or dismiss a pending stage suggestion. People only: the current owner or an Admin. Approving moves the participation to the suggested stage.'},
|
|
35
|
-
playbook_suggestions_list:{schema:z.object({...scope,cursor:uuid.optional(),limit:z.number().int().min(1).max(100).optional()}).strict(),method:'GET',path:a=>`${base(a)}/playbook-suggestions?${query(a)}`,scoped:true,description:'List pending stage suggestions visible to the current owner or Admin. Humans approve or dismiss in Operator; agents cannot approve.'},
|
|
36
33
|
workspace_analytics_get:{schema:z.object({...scope,campaignId:uuid.optional(),ownerUserId:uuid.optional(),offerId:uuid.optional(),audienceId:uuid.optional(),tag:z.string().min(1).max(64).optional(),pinId:uuid.optional(),from:z.string().datetime(),to:z.string().datetime()}).strict(),method:'GET',path:a=>`${base(a)}/analytics?${query(a)}`,scoped:true,description:'Read UTC-period distinct outcomes and explicit stage events. Missing activity or cost attribution is not tracked, never fabricated zero. Optional filters: campaignId, ownerUserId (campaign owner), offerId, audienceId, tag (campaign tag); list the values with workspace_analytics_filters. Maximum 366 days; narrow large scopes.'}
|
|
37
34
|
};
|
package/cli/progress.mjs
CHANGED
|
@@ -3,10 +3,10 @@ import {readJsonFile} from './json-file.mjs';
|
|
|
3
3
|
import {playbookUsageError,playbookCommands} from './playbook-help.mjs';
|
|
4
4
|
export async function progressCli(args){
|
|
5
5
|
const positions=[],flags={};for(let i=0;i<args.length;i++){const arg=args[i];if(!arg.startsWith('--')){positions.push(arg);continue;}const key=arg.slice(2);if(!['profile','workspace','file','cursor','limit','revision','from','to','campaign','playbook-version','kind','user','format','owner','offer','audience','tag','archived'].includes(key)||(key!=='archived'&&(!args[i+1]||args[i+1].startsWith('--')))||Object.hasOwn(flags,key))throw new Error(`Unknown or incomplete option --${key}.${args[0]==='playbook'?' Run audienti playbook SUBCOMMAND --help.':''}`);flags[key]=key==='archived'&&(!args[i+1]||args[i+1].startsWith('--'))?'true':args[++i];}
|
|
6
|
-
const names={playbook:{list:'playbook_list',actions:'playbook_actions_list',show:'playbook_get',save:'playbook_save',archive:'playbook_archive',restore:'playbook_restore',delete:'playbook_delete',progress:'playbook_progress_get',record:'playbook_progress_record'
|
|
6
|
+
const names={playbook:{list:'playbook_list',actions:'playbook_actions_list',show:'playbook_get',save:'playbook_save',archive:'playbook_archive',restore:'playbook_restore',delete:'playbook_delete',progress:'playbook_progress_get',record:'playbook_progress_record'},analytics:{show:'workspace_analytics_get'},pipeline:{show:'workspace_pipeline_get'},connections:{list:'workspace_connections_list',register:'workspace_connection_register',report:'workspace_connection_report',disconnect:'workspace_connection_disconnect'}};
|
|
7
7
|
const name=names[positions[0]]?.[positions[1]];if(!name)throw new Error(positions[0]==='playbook'?playbookUsageError:'Use analytics show --from ISO --to ISO; pipeline show; connections list|register --file PATH|report --file PATH|disconnect --file PATH.');
|
|
8
8
|
if(flags.format&&(name!=='workspace_analytics_get'||!['json','csv'].includes(flags.format)))throw new Error('--format json|csv is only accepted for analytics show.');
|
|
9
|
-
const fileNames=['playbook_save','playbook_progress_record','
|
|
9
|
+
const fileNames=['playbook_save','playbook_progress_record','workspace_connection_register','workspace_connection_report','workspace_connection_disconnect'];const withId=['playbook_get','playbook_progress_get','playbook_archive','playbook_restore','playbook_delete'].includes(name);if(positions.length!==(withId?3:2))throw new Error(positions[0]==='playbook'?`Unexpected arguments. Usage: audienti ${playbookCommands[positions[1]].usage}`:'Unexpected arguments.');
|
|
10
10
|
if(fileNames.includes(name)&&!flags.file)throw new Error('Supply a JSON request with --file PATH.');if(!fileNames.includes(name)&&flags.file)throw new Error('--file is only accepted for mutations.');
|
|
11
11
|
const input=fileNames.includes(name)?readJsonFile(flags.file,65536,'Request file'):{};if(!input||typeof input!=='object'||Array.isArray(input))throw new Error('Request must be an object.');if(flags.workspace)input.workspaceId=flags.workspace;if(withId)input[name==='playbook_progress_get'?'participationId':'id']=positions[2];
|
|
12
12
|
if(flags.archived!==undefined&&(name!=='playbook_list'||!['true','false'].includes(flags.archived)))throw new Error(name==='playbook_list'?'--archived takes true or false, or no value.':'--archived is only accepted for playbook list.');
|
package/package.json
CHANGED
|
@@ -113,7 +113,7 @@ When you or the user have a new idea for how to reach people:
|
|
|
113
113
|
the old and new campaigns can be compared. Name what changed in the campaign notes.
|
|
114
114
|
5. Ask the user before the successor starts.
|
|
115
115
|
|
|
116
|
-
## Record progress and ask
|
|
116
|
+
## Record progress and ask when the rules cannot decide
|
|
117
117
|
|
|
118
118
|
Read the playbook before doing work for a campaign pinned to it: `audienti playbook
|
|
119
119
|
show PLAYBOOK_ID`. Stage plays are instructions for you, the external agent; they are
|
|
@@ -123,10 +123,9 @@ not a hosted sequence that runs by itself.
|
|
|
123
123
|
`offRampKey` or `finishStage: true`, the participation's pinned playbook version and
|
|
124
124
|
its current expected progress version, and stored evidence. Do not invent outcomes.
|
|
125
125
|
`audienti playbook` prints the command usage; the API schema has the required fields.
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
`audienti playbook suggestions` lists the suggestions you can see.
|
|
126
|
+
- When you see something that moves a person (a reply, an accept, a booked meeting), record
|
|
127
|
+
that event; the playbook's rules decide the move. If the rules cannot decide, ask the
|
|
128
|
+
user with `audienti ask "QUESTION"`. The question appears in Operator.
|
|
130
129
|
- None of these commands sends a message to a provider.
|
|
131
130
|
|
|
132
131
|
## Done
|
package/source-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "https://github.com/omalab/exora",
|
|
3
|
-
"sourceCommit": "
|
|
3
|
+
"sourceCommit": "abb0afcaf30cbc60c862e53e5b52e26da909f3b0",
|
|
4
4
|
"files": {
|
|
5
5
|
"LICENSE": "220f297cfcd5c38eb64e6b4b4a77cab4ebc7f4686d4d99c6260a475d02ca11e5",
|
|
6
6
|
"README.md": "7ff32cc8ac89dd54b64d7b39c0b41b1f37e154b7ea10ad5a7bceefc3df77d87f",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"cli/attachments.mjs": "2fee6b4abbf82da9847d4a927a3d4d3ca947a198a903a78927596a2ea858cbf4",
|
|
17
17
|
"cli/audience-operations.mjs": "133b72dc6b9e3a6b4f173ce28f1524163f9c7b049505b885115f83b9e4af7170",
|
|
18
18
|
"cli/audiences.mjs": "3c377346efc1a8bdde432a16c2d19a3f51f34f3333d344d3a2bfa94c188a017d",
|
|
19
|
-
"cli/audienti.mjs": "
|
|
19
|
+
"cli/audienti.mjs": "6cf78f0359a450bfc456599aa047efcf93f0f9353e810449957f932ea0ce1a43",
|
|
20
20
|
"cli/audit-operations.mjs": "afaf87d592a1e5f6bff2a8649a6a64a8f471950b7d99e98995d9205aa5910398",
|
|
21
21
|
"cli/audit.mjs": "a7becaed67c58b063e668b5e66844b6dc15c11a63b428faa171b542ad922c001",
|
|
22
22
|
"cli/budget-operations.mjs": "d74916551ef393e29734c6e13cf9021251e0ed126eeaa529e18cf2332146e1e0",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"cli/outcome-operations.mjs": "cf133097799f240a006264a38a4c6bd4094078d6dec78a71679700ac3bdeacd5",
|
|
51
51
|
"cli/outcomes.mjs": "765ccb112a90fc4d228b2a41e5e19c5e1f3e2fe14bc1d8128b0090fc95cdbf3f",
|
|
52
52
|
"cli/owner-account-client.mjs": "e7912f7c67571676cb94bcc9424b7d4a3bf9ef1461c9a5d6c31a2651e546a9ea",
|
|
53
|
-
"cli/playbook-help.mjs": "
|
|
54
|
-
"cli/playbook-operations.mjs": "
|
|
53
|
+
"cli/playbook-help.mjs": "541bba97695e9761cf73d182f62900e8117bddb23a39c77f1d18258cd7e6f5a5",
|
|
54
|
+
"cli/playbook-operations.mjs": "3994739d63dbd6658d5e14eea889c56ce1dc19a9c639f178335a56387793717a",
|
|
55
55
|
"cli/profiles.mjs": "45929b224ffc916b6dbd7a94e06ac09a1ff7feec430633b10d160c1608fc2d32",
|
|
56
|
-
"cli/progress.mjs": "
|
|
56
|
+
"cli/progress.mjs": "c394eae609596accba0d170d376fe35b58cddff2cf7b106f670da7eaed76dd5f",
|
|
57
57
|
"cli/prospecting-settings-operations.mjs": "37b881a867c19d9e5f2d02316038284ea0cf09de4f37b6dee2370a1faedf245e",
|
|
58
58
|
"cli/prospecting-settings.mjs": "b09f47c84416d9892d7d5b17dcf684cbb560e1cacb25513826ff04ef9307626e",
|
|
59
59
|
"cli/question-operations.mjs": "c7070dd1b5ec9c5b0df93012ef08d0d6b4d6e5c8da267a37beb1acc5c3cf4ea1",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"cli/work-operations.mjs": "8b3a84ca15e8e4ad79ef92ced4c5adaffd5129f630e3bfc2c74a844a90867600",
|
|
85
85
|
"cli/work.mjs": "751107ecc3de5a6be9db4a068cddc41f3ad8e77c87e59686eaf522862caf9e9f",
|
|
86
86
|
"cli/workspaces.mjs": "5694825a763008bf0dcfa4e17bfe79a1d593207099f500bfa21184f899e83971",
|
|
87
|
-
"package.json": "
|
|
87
|
+
"package.json": "7aabd2b008aa0b7645e3e5ba52088b1ac90e312c183a7bfa7f7563510cb461bb",
|
|
88
88
|
"skills/agent-rooms/SKILL.md": "08f917ff85fee1d23499a4499056ce845b39ce6727029b104819dad41ee87cc2",
|
|
89
89
|
"skills/agent-rooms/references/commands.md": "ef5afa5543ca9da967a147f638774647998ea1c1a2a821959f3bf87d54c292bd",
|
|
90
90
|
"skills/audienti/SKILL.md": "8f2124065bfc3a005b44e194e7dcce9bbf14062ab332e7db66d441eeccb518ed",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"skills/getting-started/references/outcome-checks.md": "094d09d231b38d4935aa9eb8ac089e46ba8e698489852fa97040e6b5eac77a9b",
|
|
103
103
|
"skills/getting-started/references/replies.md": "d085b7353f13d70a1b0333d851fe573fd2c99e6bb57923cf8717982d77a0504b",
|
|
104
104
|
"skills/getting-started/references/reply-checks.md": "85fe692ad6b7bc73e204de313b27d225be3da1a0af71e8e7bb9945ae511a0dc3",
|
|
105
|
-
"skills/playbook-design/SKILL.md": "
|
|
105
|
+
"skills/playbook-design/SKILL.md": "eec38bb7cd1586e11c6c27cccf328c1731d404f0767bd1df0c3ac8273495cb50",
|
|
106
106
|
"skills/playbook-design/references/fields.md": "7d4a22451c3b77bb21a76d211d25a44b84a1bc46cc6524472ed121e77d2866aa"
|
|
107
107
|
}
|
|
108
108
|
}
|