@audienti/cli 0.2.0-exora.1 → 0.2.0-exora.10
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/README.md +30 -6
- package/cli/account-reply-operations.mjs +26 -1
- package/cli/agents.mjs +67 -14
- package/cli/assignment-operations.mjs +12 -12
- package/cli/assignment.mjs +6 -6
- package/cli/attachment-operations.mjs +9 -0
- package/cli/attachments.mjs +28 -0
- package/cli/audience-operations.mjs +5 -0
- package/cli/audiences.mjs +7 -4
- package/cli/audienti.mjs +114 -21
- package/cli/audit-operations.mjs +17 -0
- package/cli/audit.mjs +39 -0
- package/cli/budget-operations.mjs +8 -0
- package/cli/budgets.mjs +34 -0
- package/cli/campaign-find.mjs +155 -0
- package/cli/campaign-operations.mjs +30 -0
- package/cli/campaigns.mjs +61 -0
- package/cli/cohort-operations.mjs +22 -0
- package/cli/cohorts.mjs +45 -0
- package/cli/connection-registry-operations.mjs +2 -1
- package/cli/discovery-operations.mjs +4 -3
- package/cli/discovery.mjs +3 -2
- package/cli/file-operations.mjs +29 -0
- package/cli/files.mjs +14 -0
- package/cli/guardrails-operations.mjs +12 -0
- package/cli/guardrails.mjs +37 -0
- package/cli/json-file.mjs +1 -1
- package/cli/kv-operations.mjs +17 -0
- package/cli/kv.mjs +58 -0
- package/cli/mcp.mjs +3 -3
- package/cli/notification-operations.mjs +8 -0
- package/cli/offer-operations.mjs +1 -1
- package/cli/outbound-operations.mjs +16 -0
- package/cli/outbound.mjs +54 -0
- package/cli/outcome-operations.mjs +26 -0
- package/cli/outcomes.mjs +16 -0
- package/cli/owner-account-client.mjs +3 -3
- package/cli/playbook-help.mjs +79 -0
- package/cli/playbook-operations.mjs +36 -0
- package/cli/progress.mjs +21 -7
- package/cli/question-operations.mjs +12 -0
- package/cli/questions.mjs +32 -0
- package/cli/queue-operations.mjs +12 -0
- package/cli/queue.mjs +25 -0
- package/cli/recipient-operations.mjs +1 -1
- package/cli/recipients.mjs +6 -2
- package/cli/rooms-operations.mjs +48 -0
- package/cli/rooms.mjs +160 -0
- package/cli/search-operations.mjs +9 -0
- package/cli/secret-operations.mjs +7 -0
- package/cli/secrets.mjs +30 -0
- package/cli/sender-account-operations.mjs +6 -2
- package/cli/sender-accounts.mjs +18 -8
- package/cli/skills-mcp.mjs +13 -6
- package/cli/skills.mjs +73 -16
- package/cli/tools-operations.mjs +18 -10
- package/cli/tools.mjs +48 -20
- package/cli/usage-operations.mjs +8 -0
- package/cli/usage.mjs +41 -0
- package/cli/work-execution-operations.mjs +7 -0
- package/cli/work-execution.mjs +3 -3
- package/cli/work-operations.mjs +7 -5
- package/cli/work.mjs +11 -6
- package/cli/workspaces.mjs +121 -24
- package/package.json +2 -2
- package/skills/agent-rooms/SKILL.md +140 -0
- package/skills/agent-rooms/references/commands.md +78 -0
- package/skills/audienti/SKILL.md +112 -6
- package/skills/audienti/references/helpers.md +15 -2
- package/skills/audienti/references/profile-workflows.md +6 -4
- package/skills/audienti/scripts/contracts.mjs +1 -1
- package/skills/getting-started/SKILL.md +227 -0
- package/skills/getting-started/references/audience.md +143 -0
- package/skills/getting-started/references/campaign-draft.md +80 -0
- package/skills/getting-started/references/capabilities.md +237 -0
- package/skills/getting-started/references/mailbox-check.md +64 -0
- package/skills/getting-started/references/outcome-checks.md +114 -0
- package/skills/getting-started/references/replies.md +186 -0
- package/skills/getting-started/references/reply-checks.md +54 -0
- package/skills/playbook-design/SKILL.md +136 -0
- package/skills/playbook-design/references/fields.md +130 -0
- package/source-manifest.json +83 -38
- package/cli/approach-operations.mjs +0 -12
- package/cli/experiment-operations.mjs +0 -25
- package/cli/experiments.mjs +0 -26
package/source-manifest.json
CHANGED
|
@@ -1,59 +1,104 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "https://github.com/omalab/exora",
|
|
3
|
-
"sourceCommit": "
|
|
3
|
+
"sourceCommit": "ba5f0ec81a55fdc5b04a77d29d2585187a364e1b",
|
|
4
4
|
"files": {
|
|
5
5
|
"LICENSE": "220f297cfcd5c38eb64e6b4b4a77cab4ebc7f4686d4d99c6260a475d02ca11e5",
|
|
6
|
+
"README.md": "7ff32cc8ac89dd54b64d7b39c0b41b1f37e154b7ea10ad5a7bceefc3df77d87f",
|
|
6
7
|
"bin/audienti-mcp.mjs": "6df1d6eb3a5bc65e7592e5b8f73cd4c98c159f2583723d042338633b356301df",
|
|
7
8
|
"cli/account-intake-operations.mjs": "b43d764c628beabafad753d711ddb2af2c64276e4a6506ed0b854839091ea5db",
|
|
8
9
|
"cli/account-intake.mjs": "aa77f2f96fd030f8830d6de278932186aea7c82cfda086a5a6cf569202feebc8",
|
|
9
10
|
"cli/account-replies.mjs": "699e34e5c736ba316df8f164b4c50f82a7e4e2d5e51303e6b13944c3f2c854ab",
|
|
10
|
-
"cli/account-reply-operations.mjs": "
|
|
11
|
-
"cli/agents.mjs": "
|
|
12
|
-
"cli/
|
|
13
|
-
"cli/assignment
|
|
14
|
-
"cli/
|
|
15
|
-
"cli/
|
|
16
|
-
"cli/
|
|
17
|
-
"cli/
|
|
18
|
-
"cli/
|
|
11
|
+
"cli/account-reply-operations.mjs": "4359096dbf75d8c3602266588d2aea2b6cdecd903e2a094dbf25d26e2fab22b2",
|
|
12
|
+
"cli/agents.mjs": "e06a6097d9436c812a0623fe564b701c86defd599d7b78de3e8be783357c39bb",
|
|
13
|
+
"cli/assignment-operations.mjs": "fc74e3fd79975cfcbac14891d5dec5f25e662777050fc46a8ad3aae5cf361c59",
|
|
14
|
+
"cli/assignment.mjs": "90cb85e0df8aadca2ff8391c99e778b41261183b5f38e8c6c32afee2f98f871a",
|
|
15
|
+
"cli/attachment-operations.mjs": "dd29a50d073ded71ebd606fb3a9181bebcf2a1390f75f99cdcb61d84261d102a",
|
|
16
|
+
"cli/attachments.mjs": "2fee6b4abbf82da9847d4a927a3d4d3ca947a198a903a78927596a2ea858cbf4",
|
|
17
|
+
"cli/audience-operations.mjs": "133b72dc6b9e3a6b4f173ce28f1524163f9c7b049505b885115f83b9e4af7170",
|
|
18
|
+
"cli/audiences.mjs": "3c377346efc1a8bdde432a16c2d19a3f51f34f3333d344d3a2bfa94c188a017d",
|
|
19
|
+
"cli/audienti.mjs": "ade777be479e371633891508d74e4cd487a1b94df8c7effcc1ee25839b310b8e",
|
|
20
|
+
"cli/audit-operations.mjs": "184eb58bc479225314b77d6019a185670cd843895a10d9bf58a28de7f1355d91",
|
|
21
|
+
"cli/audit.mjs": "a7becaed67c58b063e668b5e66844b6dc15c11a63b428faa171b542ad922c001",
|
|
22
|
+
"cli/budget-operations.mjs": "d74916551ef393e29734c6e13cf9021251e0ed126eeaa529e18cf2332146e1e0",
|
|
23
|
+
"cli/budgets.mjs": "683e06cb4d410c851286fbd1cdd4fb9f1902726c60fd4fcddb2c13d164786525",
|
|
24
|
+
"cli/campaign-find.mjs": "9c0a44c69ab7ad3e24a0a2edc97b8f3a14f602e3b6caf7e1943b8e1b93609c4a",
|
|
25
|
+
"cli/campaign-operations.mjs": "c1ac42f53f8bf19957fac41cc2a80ab4e26a743a7c1cc0b42c8c0e85fcf6e61b",
|
|
26
|
+
"cli/campaigns.mjs": "a4c1e824b729cdaf1838db68785e62c55d4ba7d57c59d3f71666d2197be2fdf8",
|
|
27
|
+
"cli/cohort-operations.mjs": "91b1d1fc48e75581bb315f42d735ef94e21687dc216f352337d8a5d180bb691e",
|
|
28
|
+
"cli/cohorts.mjs": "c71940903430f3e6834608f113534910b75a98b3e410a5942f04051607488485",
|
|
29
|
+
"cli/connection-registry-operations.mjs": "888ea440d00ffc9ed68d4cc084ff73a5a00d0e60bd6293baba8bb4539a25ae62",
|
|
19
30
|
"cli/content.mjs": "db3fcbf7f96c314227a8172a442b70b46405126e0d61f8358cee1bfe6c627ebd",
|
|
20
|
-
"cli/discovery-operations.mjs": "
|
|
21
|
-
"cli/discovery.mjs": "
|
|
22
|
-
"cli/
|
|
23
|
-
"cli/
|
|
24
|
-
"cli/
|
|
25
|
-
"cli/
|
|
26
|
-
"cli/
|
|
31
|
+
"cli/discovery-operations.mjs": "cc132abae230cc84439bcd24da813e2798ee1eb83a06a7d1141202ab9c68215a",
|
|
32
|
+
"cli/discovery.mjs": "34b3794ee6ca539dbbccef77ec2085fd5411023046bdfb9b83e2537414542a41",
|
|
33
|
+
"cli/file-operations.mjs": "564f334dd9d52e9c56f44d58b5c3b0bda59ff72f54126b755bc472144069349e",
|
|
34
|
+
"cli/files.mjs": "2221b067d6ade7ef5cc8965929aea2eb485781953d3f2b50600995b65fbdedae",
|
|
35
|
+
"cli/guardrails-operations.mjs": "aa5a911663133b3287bea805df9e2a5d8b5bbc4a3df972c52f91fee315954ded",
|
|
36
|
+
"cli/guardrails.mjs": "e8b9c0a19956a9eab84475d3c56a4b6c77baf7ed9a55e8686d660ef1ad562aa8",
|
|
37
|
+
"cli/json-file.mjs": "96431b18215834c2531f5901e2526875c634dd2e85a9465fcffc937fbec52150",
|
|
38
|
+
"cli/kv-operations.mjs": "505d79d0d535d3441883f8a37817c30c73367216a35dddb07181f0f0e799df79",
|
|
39
|
+
"cli/kv.mjs": "05783610001dd002af07a4bb8f26e64d74aa4981bbe38a2100552b810cb3bc72",
|
|
40
|
+
"cli/mcp.mjs": "289f6a68554e54fe0dbad290bf710ff7fad1c598421a83d3fb9b96979dac1eaa",
|
|
41
|
+
"cli/notification-operations.mjs": "7225dbcfd87d29921e72ee247f61aaee323a4a2e5a48a9ba9c945b02f66e4978",
|
|
42
|
+
"cli/offer-operations.mjs": "a03d467622be38bbf52bbfbbd54e6969bdd55af15a627f54356bb03eb1b4f508",
|
|
27
43
|
"cli/offers.mjs": "4a97007e1e25352707bbecda0b2519affcd0024e52ae8d9446d76d459460feca",
|
|
28
|
-
"cli/
|
|
44
|
+
"cli/outbound-operations.mjs": "52992bea63195efa8150c6ca2ff0b37ee6010f03fa366055c70c755ee0eb028e",
|
|
45
|
+
"cli/outbound.mjs": "23903eb0fec4d7af3aa0031d63488ed9a8697e07ccf1314d194b48e109d15f82",
|
|
46
|
+
"cli/outcome-operations.mjs": "25380db262c316ea1b34a5ae95abd01f2c8e92b7c877ebe3f0b18ccd5032a7fa",
|
|
47
|
+
"cli/outcomes.mjs": "e547aa889c3d356c66d122d8fe4fd8f4ff46b18531c1318ca6f238af102cdde9",
|
|
48
|
+
"cli/owner-account-client.mjs": "e7912f7c67571676cb94bcc9424b7d4a3bf9ef1461c9a5d6c31a2651e546a9ea",
|
|
49
|
+
"cli/playbook-help.mjs": "56a5b6ba4c94022931f9c751c954133239404048aba99d1ff28cd290eac22f41",
|
|
50
|
+
"cli/playbook-operations.mjs": "157d5c0ce1b2dda740a787c9834ca08511f8678d14e4cc1b8e54c9d0d2d62681",
|
|
29
51
|
"cli/profiles.mjs": "45929b224ffc916b6dbd7a94e06ac09a1ff7feec430633b10d160c1608fc2d32",
|
|
30
|
-
"cli/progress.mjs": "
|
|
52
|
+
"cli/progress.mjs": "aeca47f4e59be306dac4592cf2e4209a30e322fc13e4e103e64e09faa370f5a8",
|
|
31
53
|
"cli/prospecting-settings-operations.mjs": "37b881a867c19d9e5f2d02316038284ea0cf09de4f37b6dee2370a1faedf245e",
|
|
32
54
|
"cli/prospecting-settings.mjs": "b09f47c84416d9892d7d5b17dcf684cbb560e1cacb25513826ff04ef9307626e",
|
|
33
|
-
"cli/
|
|
34
|
-
"cli/
|
|
35
|
-
"cli/
|
|
36
|
-
"cli/
|
|
37
|
-
"cli/
|
|
38
|
-
"cli/
|
|
55
|
+
"cli/question-operations.mjs": "c7070dd1b5ec9c5b0df93012ef08d0d6b4d6e5c8da267a37beb1acc5c3cf4ea1",
|
|
56
|
+
"cli/questions.mjs": "32bbe0b785b1e6438435faf4697332ea2da3133d4c896720d39377c35e9b2127",
|
|
57
|
+
"cli/queue-operations.mjs": "bc5f5b8f79f056f579c2d3965d143b45ded4665629e2c4d427adfbaf7e9687fb",
|
|
58
|
+
"cli/queue.mjs": "046f4dba92ac9eacbb1f12215ab2b49623bae597342da6b415f7afb3c3a1344e",
|
|
59
|
+
"cli/recipient-operations.mjs": "7d41c17ef2d59dbed982893e0989c9c076317b91adcd3d752cbe1d2e0b8c41b2",
|
|
60
|
+
"cli/recipients.mjs": "dc93d4a23ca1df9c84a0c9734d09491af179644eed48d856d1f1a24d42276ea8",
|
|
61
|
+
"cli/rooms-operations.mjs": "27e4c1c0dac7cf1256468bac5806fb2a3959d07d3cac3af8d785a50772148fd1",
|
|
62
|
+
"cli/rooms.mjs": "bc42cc3f040b23bd832c725cb0e2faf66fe6327cbc64571550586ce97ba40415",
|
|
63
|
+
"cli/search-operations.mjs": "903f12fffb6824872160c4136925ab5638142bb4e39236b37f927cd2c6a43776",
|
|
64
|
+
"cli/secret-operations.mjs": "faefe9c9ece81087dc7aab32e88f331ed942d0757ce5a978b5f0722d514f377f",
|
|
65
|
+
"cli/secrets.mjs": "cab4ea932e724ce3c807c7825869810b44fb8d75cdacec32f8101353f0e7c5f5",
|
|
66
|
+
"cli/sender-account-operations.mjs": "97d7a9236c2b72e9863d3d75ab93671348ff97a07d627a3e72350a17623b4d4d",
|
|
67
|
+
"cli/sender-accounts.mjs": "406abd62a489894bec2cb3c9ebcc1b19572ab8f2d0fab4854deb78ea7dd89d0a",
|
|
68
|
+
"cli/skills-mcp.mjs": "6a91b16a789f50035ae0fe33f8ae2758bb9829949db7efb05c6d65dde335a9e0",
|
|
69
|
+
"cli/skills.mjs": "ea8dfef32664714f9c63251d9a6bbdb44d77d41e272df46bb102ebfcd8df8b66",
|
|
39
70
|
"cli/suppression-operations.mjs": "d1f827a785670fc6e44d87b18e4cfb6596b09e5be7c4f84c4b9a75ed13a962c6",
|
|
40
71
|
"cli/suppression.mjs": "2b10be67e290deec9ed915139c3d98d45d7d10fd41abb67b5a35a630d636a4ed",
|
|
41
|
-
"cli/tools-operations.mjs": "
|
|
42
|
-
"cli/tools.mjs": "
|
|
43
|
-
"cli/
|
|
44
|
-
"cli/
|
|
72
|
+
"cli/tools-operations.mjs": "aafa52336c0bda8b05d4a091548c18d8634608d282d433aee45a744044b68770",
|
|
73
|
+
"cli/tools.mjs": "6d9c7f27cc50e5e2fc0859c9c2d62bc3e77b5a46d0e2aeaa6cf31e2867138758",
|
|
74
|
+
"cli/usage-operations.mjs": "64dd1ae850f52bb72c7648be78a8ab2dfab986afba2d2d2cd08034c4f7b3ace6",
|
|
75
|
+
"cli/usage.mjs": "cd582c061f83ca4f220ddd3cd2a174a1a3a3c0ee308b3d5a5f47752a501e322e",
|
|
76
|
+
"cli/work-execution-operations.mjs": "842d706b36bb035aa54e1dee8bf950f0619c495bcae84faa1926fbb05f6842bc",
|
|
77
|
+
"cli/work-execution.mjs": "4b74923417eaa70dee0ba8806b64d0acf7c884fb77b76d5e86d567cf92e51b01",
|
|
45
78
|
"cli/work-feedback-operations.mjs": "a998f2b2dbe38ceb2bad74f7fa61c31f87f842755449248b7eb0c04185c0ee3d",
|
|
46
79
|
"cli/work-feedback.mjs": "f3b77ecfd7ea1aba9c9f03c9d894137547e9c5575d9daa359ed94505ad025852",
|
|
47
|
-
"cli/work-operations.mjs": "
|
|
48
|
-
"cli/work.mjs": "
|
|
49
|
-
"cli/workspaces.mjs": "
|
|
50
|
-
"package.json": "
|
|
51
|
-
"skills/
|
|
52
|
-
"skills/
|
|
53
|
-
"skills/audienti/
|
|
80
|
+
"cli/work-operations.mjs": "8b3a84ca15e8e4ad79ef92ced4c5adaffd5129f630e3bfc2c74a844a90867600",
|
|
81
|
+
"cli/work.mjs": "751107ecc3de5a6be9db4a068cddc41f3ad8e77c87e59686eaf522862caf9e9f",
|
|
82
|
+
"cli/workspaces.mjs": "3c27db13d805ac220608cb5374f52955d92054f333136468237079e13547fa1e",
|
|
83
|
+
"package.json": "f31e4da2874888ec971ee52236c37619184d84b3232105e756f2d542f9a052b2",
|
|
84
|
+
"skills/agent-rooms/SKILL.md": "08f917ff85fee1d23499a4499056ce845b39ce6727029b104819dad41ee87cc2",
|
|
85
|
+
"skills/agent-rooms/references/commands.md": "ef5afa5543ca9da967a147f638774647998ea1c1a2a821959f3bf87d54c292bd",
|
|
86
|
+
"skills/audienti/SKILL.md": "8f2124065bfc3a005b44e194e7dcce9bbf14062ab332e7db66d441eeccb518ed",
|
|
87
|
+
"skills/audienti/references/helpers.md": "e27aff0aa07b92f575d617612ed3def824765bac6ce1304cf227a4aca223369a",
|
|
88
|
+
"skills/audienti/references/profile-workflows.md": "80669b75eb5e8aeb614ce55ac046236d671af0de3ddd238853324579d5a3b251",
|
|
54
89
|
"skills/audienti/references/workflow-receipt.md": "349f9a85472832b8bdc6a5d16c5b10b8e32d48d3e81523ad8d42f9a03b3655ff",
|
|
55
|
-
"skills/audienti/scripts/contracts.mjs": "
|
|
90
|
+
"skills/audienti/scripts/contracts.mjs": "900428e067b7f8dae544012387bc3752f7b0d27777a80cd16ec0985848983f70",
|
|
56
91
|
"skills/audienti/scripts/profile-helpers.mjs": "7f62afdefd8e1b1bfec95f1ca6f48cfc4e204d1bff35f805261c45c6d5fcb46a",
|
|
57
|
-
"skills/audienti/scripts/run.mjs": "652094ff8b642d13f5e0bb30756bb49464c051511c37f202249fde917b319208"
|
|
92
|
+
"skills/audienti/scripts/run.mjs": "652094ff8b642d13f5e0bb30756bb49464c051511c37f202249fde917b319208",
|
|
93
|
+
"skills/getting-started/SKILL.md": "902fffe321a91acd2dc3583a372801df6952c7e974179198ce688b62ca8b8f21",
|
|
94
|
+
"skills/getting-started/references/audience.md": "6a2c061be5e299b3cbbd236578693ae5084d216425c500d3639a4d1fcb86ccb7",
|
|
95
|
+
"skills/getting-started/references/campaign-draft.md": "c2cbeb7de95734889698a5cd852268b9bed69e56f661153bb7ada237241a1a6b",
|
|
96
|
+
"skills/getting-started/references/capabilities.md": "b41ab2ec511db127c8e43c80c71aa4fd516ca816af393f5a1c7b3456e355af96",
|
|
97
|
+
"skills/getting-started/references/mailbox-check.md": "113574bb5a573125620dcde4e65ebf44164f7b0727cc936fb41234f5d57bba73",
|
|
98
|
+
"skills/getting-started/references/outcome-checks.md": "53919f2c2adf2bd24e602f4c2a21fbd47c807b115b2a1f9bb7893ebf48dc715a",
|
|
99
|
+
"skills/getting-started/references/replies.md": "865c97bea9c4bbecc2aba15be933356d11c37f3239be2cd436442230b5e0501e",
|
|
100
|
+
"skills/getting-started/references/reply-checks.md": "85fe692ad6b7bc73e204de313b27d225be3da1a0af71e8e7bb9945ae511a0dc3",
|
|
101
|
+
"skills/playbook-design/SKILL.md": "95c8c9d9cf0dd4d69b9634f9b1f4fb04628b1b9d4dd22d928ea135ce3b5a98da",
|
|
102
|
+
"skills/playbook-design/references/fields.md": "96a97654508cc8340df485e00d823c30d1e07e9f10e3ed94b231d375783de894"
|
|
58
103
|
}
|
|
59
104
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {z} from 'zod';
|
|
2
|
-
const uuid=z.string().uuid(),scope={workspaceId:uuid.optional()},stage=z.object({key:uuid,name:z.string().trim().min(1).max(120)}).strict();
|
|
3
|
-
const fields=z.object({name:z.string().trim().min(1).max(120),stages:z.array(stage).min(2).max(30),goalKey:uuid,offRamps:z.array(stage.extend({reason:z.enum(['rejected','not_fit','nurture','unresponsive','other'])})).max(30)}).strict();
|
|
4
|
-
const base=a=>`/workspaces/${a.workspaceId}`,query=(a,skip=[])=>new URLSearchParams(Object.entries(a).filter(([k,v])=>k!=='workspaceId'&&!skip.includes(k)&&v!==undefined).map(([k,v])=>[k,String(v)]));
|
|
5
|
-
export const approachOperations={
|
|
6
|
-
approach_list:{schema:z.object({...scope,cursor:uuid.optional(),limit:z.number().int().min(1).max(100).optional()}).strict(),method:'GET',path:a=>`${base(a)}/approaches?${query(a)}`,scoped:true,description:'List immutable versioned approaches in the current workspace. Free CRM read.'},
|
|
7
|
-
approach_get:{schema:z.object({...scope,id:uuid,revision:z.number().int().positive().optional()}).strict(),method:'GET',path:a=>`${base(a)}/approaches/${a.id}?${query(a,['id'])}`,scoped:true,description:'Read an approach version: stable stage keys, goal and terminal off-ramps.'},
|
|
8
|
-
approach_save:{schema:z.object({...scope,id:uuid.optional(),requestId:uuid,expectedRevision:z.number().int().nonnegative(),fields}).strict(),method:'POST',path:a=>`${base(a)}/approaches`,body:({workspaceId,...a})=>a,scoped:true,description:'Create or revise an approach with optimistic version and idempotent request. Does not change existing experiment or participation pins.'},
|
|
9
|
-
approach_progress_get:{schema:z.object({...scope,participationId:uuid}).strict(),method:'GET',path:a=>`${base(a)}/participations/${a.participationId}/progress`,scoped:true,description:'Read the participation’s admitted approach pin and recorded stage/outcome history.'},
|
|
10
|
-
approach_progress_record:{schema:z.object({...scope,participationId:uuid,expectedVersion:z.number().int().nonnegative(),requestId:uuid,stageKey:uuid.optional(),offRampKey:uuid.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:'Record one forward stage or terminal off-ramp using stored evidence for this person. Assigned owner/Admin only. Goal ends prospecting; post-goal forward reporting never reactivates. No send or provider call.'},
|
|
11
|
-
workspace_analytics_get:{schema:z.object({...scope,experimentId:uuid.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. Maximum 366 days; narrow large scopes.'}
|
|
12
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {z} from 'zod';
|
|
2
|
-
const uuid=z.string().uuid(),workspace={workspaceId:uuid.optional()},locator={...workspace,experimentId:uuid};
|
|
3
|
-
const state=z.enum(['Preparing','Active','Paused','Closing','Archived']);
|
|
4
|
-
const signalBase={id:uuid,scope:z.enum(['company','person']),details:z.string().optional()};
|
|
5
|
-
const signal=z.discriminatedUnion('kind',[
|
|
6
|
-
z.object({...signalBase,kind:z.literal('research'),question:z.string(),expected:z.boolean().optional()}).strict(),
|
|
7
|
-
z.object({...signalBase,kind:z.literal('topic'),topic:z.string()}).strict(),
|
|
8
|
-
z.object({...signalBase,kind:z.literal('profile'),url:z.string(),track:z.enum(['audience','activity']).optional(),interactions:z.array(z.enum(['comments','reactions'])).optional()}).strict(),
|
|
9
|
-
]);
|
|
10
|
-
const fields=z.object({name:z.string(),audienceId:uuid,audienceRevision:z.number().int(),offerId:uuid,offerRevision:z.number().int(),premise:z.string(),approach:z.string().optional(),approachPin:z.object({id:uuid,revision:z.number().int().positive()}).strict().optional(),notes:z.string().optional(),ownerUserId:uuid.nullable().optional(),tags:z.array(z.string()).optional(),signalMatch:z.enum(['any','all']).optional(),signals:z.array(signal).optional(),targets:z.discriminatedUnion('kind',[
|
|
11
|
-
z.object({kind:z.literal('none'),values:z.array(z.never())}).strict(),
|
|
12
|
-
z.object({kind:z.literal('companies'),values:z.array(z.object({type:z.enum(['domain','linkedin-company']),value:z.string()}).strict())}).strict(),
|
|
13
|
-
z.object({kind:z.literal('people'),values:z.array(z.object({type:z.literal('linkedin-person'),value:z.string()}).strict())}).strict(),
|
|
14
|
-
]).optional(),channels:z.array(z.enum(['email','linkedin'])).optional(),approvalMode:z.literal('manual').optional(),contentOpsEnabled:z.boolean().optional(),schedule:z.object({startAt:z.string().nullable().optional(),endAt:z.string().nullable().optional(),maxCompanies:z.number().int().nullable().optional()}).strict().optional()}).strict();
|
|
15
|
-
const path=a=>`/workspaces/${a.workspaceId}/experiments`,detail=a=>path(a)+`/${a.experimentId}`;
|
|
16
|
-
const qs=a=>new URLSearchParams(Object.fromEntries(Object.entries(a).filter(([k,v])=>!['workspaceId','experimentId'].includes(k)&&v!==undefined).map(([k,v])=>[k,String(v)])));
|
|
17
|
-
export const experimentOperations={
|
|
18
|
-
experiment_list:{schema:z.object({...workspace,state:state.optional(),archived:z.boolean().optional(),q:z.string().optional(),limit:z.number().int().optional(),after:uuid.optional()}).strict(),method:'GET',path:a=>path(a)+'?'+qs(a),scoped:true},
|
|
19
|
-
experiment_get:{schema:z.object({...locator,revision:z.number().int().optional()}).strict(),method:'GET',path:a=>detail(a)+'?'+qs(a),scoped:true},
|
|
20
|
-
experiment_events:{schema:z.object({...locator,limit:z.number().int().optional(),after:uuid.optional()}).strict(),method:'GET',path:a=>detail(a)+'/events?'+qs(a),scoped:true},
|
|
21
|
-
experiment_create:{schema:z.object({...workspace,requestId:uuid,fields}).strict(),method:'POST',path,body:a=>({requestId:a.requestId,fields:a.fields}),scoped:true},
|
|
22
|
-
experiment_update:{schema:z.object({...locator,expectedRevision:z.number().int(),fields}).strict(),method:'POST',path:a=>detail(a)+'/revisions',body:a=>({expectedRevision:a.expectedRevision,fields:a.fields}),scoped:true},
|
|
23
|
-
experiment_transition:{schema:z.object({...locator,expectedState:state,operation:z.enum(['activate','pause','resume','close','archive','restore']),reason:z.string().optional()}).strict(),method:'POST',path:a=>detail(a)+'/transitions',body:a=>({expectedState:a.expectedState,operation:a.operation,...(a.reason===undefined?{}:{reason:a.reason})}),scoped:true},
|
|
24
|
-
experiment_successor:{schema:z.object({...locator,requestId:uuid,expectedRevision:z.number().int(),fields}).strict(),method:'POST',path:a=>detail(a)+'/successors',body:a=>({requestId:a.requestId,expectedRevision:a.expectedRevision,fields:a.fields}),scoped:true},
|
|
25
|
-
};
|
package/cli/experiments.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {callWorkspace,configuration} from './workspaces.mjs';
|
|
2
|
-
import {readJsonFile} from './json-file.mjs';
|
|
3
|
-
export async function experimentCli(args){
|
|
4
|
-
const position=[],flags={};for(let i=0;i<args.length;i++){
|
|
5
|
-
if(!args[i].startsWith('--')){position.push(args[i]);continue}
|
|
6
|
-
const key=args[i].slice(2);if(!['profile','workspace','file','request-id','expected-revision','revision','archived','limit','after','q','state','operation','expected-state','reason'].includes(key)||!args[i+1]||args[i+1].startsWith('--')||Object.hasOwn(flags,key))throw new Error('Unknown or incomplete experiment option.');
|
|
7
|
-
flags[key]=args[++i];
|
|
8
|
-
}
|
|
9
|
-
const command=position[1],name={list:'experiment_list',show:'experiment_get',create:'experiment_create',update:'experiment_update',transition:'experiment_transition',successor:'experiment_successor',events:'experiment_events'}[command];
|
|
10
|
-
if(!name||position.length!==(['list','create'].includes(command)?2:3))throw new Error('Use experiment list|show ID|create|update ID|transition ID|successor ID|events ID.');
|
|
11
|
-
const input={workspaceId:flags.workspace};
|
|
12
|
-
if(position[2])input.experimentId=position[2];
|
|
13
|
-
if(['list','events'].includes(command)){
|
|
14
|
-
if(flags.archived!==undefined&&!['true','false'].includes(flags.archived))throw new Error('Archived must be true or false.');
|
|
15
|
-
if(flags.archived!==undefined)input.archived=flags.archived==='true';
|
|
16
|
-
if(flags.limit!==undefined)input.limit=Number(flags.limit);
|
|
17
|
-
if(flags.after)input.after=flags.after;
|
|
18
|
-
if(flags.q!==undefined)input.q=flags.q;if(flags.state!==undefined)input.state=flags.state;
|
|
19
|
-
}
|
|
20
|
-
if(command==='show'&&flags.revision!==undefined)input.revision=Number(flags.revision);
|
|
21
|
-
if(['create','update','successor'].includes(command)){if(!flags.file)throw new Error('Supply --file PATH containing Experiment fields.');input.fields=readJsonFile(flags.file,65536,'Experiment file');}
|
|
22
|
-
if(['create','successor'].includes(command))input.requestId=flags['request-id'];
|
|
23
|
-
if(['update','successor'].includes(command))input.expectedRevision=Number(flags['expected-revision']);
|
|
24
|
-
if(command==='transition'){input.operation=flags.operation;input.expectedState=flags['expected-state'];if(flags.reason!==undefined)input.reason=flags.reason;}
|
|
25
|
-
console.log(JSON.stringify(await callWorkspace(name,input,configuration(flags.profile))));
|
|
26
|
-
}
|