@signaliz/cli 1.0.87 → 1.0.89
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 +18 -7
- package/dist/bin.js +182 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -201,14 +201,25 @@ saved configuration.
|
|
|
201
201
|
## Campaign OS agent harness
|
|
202
202
|
|
|
203
203
|
Use the same commands from Codex, Claude Code, Cursor, Devin, Grok, or a shell
|
|
204
|
-
automation. All context is bounded
|
|
204
|
+
automation. All context is bounded. Safe Campaign OS work runs autonomously;
|
|
205
|
+
consequential provider actions remain gated:
|
|
205
206
|
|
|
206
207
|
```bash
|
|
207
208
|
signaliz campaign-os clients --status active --json
|
|
208
209
|
signaliz campaign-os context --client-id <uuid> --json
|
|
209
210
|
signaliz campaign-os provider-runtime --client-id <uuid> --provider clay --json
|
|
210
|
-
signaliz campaign-os
|
|
211
|
-
--
|
|
211
|
+
signaliz campaign-os build --client-id <uuid> --name "Launch intent" \
|
|
212
|
+
--objective "Build an evidence-grounded 500-person campaign" \
|
|
213
|
+
--target-count 500 --agent codex --idempotency-key launch-build-v1 --json
|
|
214
|
+
signaliz campaign-os build-status --build-run-id <uuid> --json
|
|
215
|
+
signaliz campaign-os audience-draft --client-id <uuid> --name "Launch ICP" \
|
|
216
|
+
--definition-file audience.json --entity-type people \
|
|
217
|
+
--audience-role campaign_segment --source-mode signaliz_owned \
|
|
218
|
+
--idempotency-key launch-audience-v1 --json
|
|
219
|
+
signaliz campaign-os audience-preview --client-id <uuid> \
|
|
220
|
+
--audience-id <uuid> --idempotency-key launch-preview-v1 --json
|
|
221
|
+
signaliz campaign-os compile --client-id <uuid> --campaign-id <uuid> \
|
|
222
|
+
--providers all --json
|
|
212
223
|
signaliz campaign-os request --client-id <uuid> --campaign-id <uuid> \
|
|
213
224
|
--agent devin --action provider_activation --instructions "Prepare for review" --json
|
|
214
225
|
signaliz campaign-os receipts --client-id <uuid> --json
|
|
@@ -216,7 +227,7 @@ signaliz campaign-os receipts --client-id <uuid> --json
|
|
|
216
227
|
|
|
217
228
|
`provider-runtime` explains the safe Clay or Instantly route, adapter source,
|
|
218
229
|
approval boundaries, and receipt semantics without returning credentials or
|
|
219
|
-
calling the provider. `draft`
|
|
220
|
-
`
|
|
221
|
-
|
|
222
|
-
|
|
230
|
+
calling the provider. `build`, `audience-draft`, `audience-preview`, and
|
|
231
|
+
`compile` do not need CMM-admin approval and keep providers locked. `request`
|
|
232
|
+
creates only an auditable review request for paid sourcing, provider load,
|
|
233
|
+
activation, real-time arming, queueing, or sending; it does not execute them.
|
package/dist/bin.js
CHANGED
|
@@ -58,9 +58,15 @@ Product commands:
|
|
|
58
58
|
signaliz builds download --run-id <uuid> --out results.csv
|
|
59
59
|
signaliz campaign-os clients [--status active] [--query signaliz] [--limit 100]
|
|
60
60
|
signaliz campaign-os context --client-id <uuid> [--source-limit 50]
|
|
61
|
-
signaliz campaign-os
|
|
62
|
-
signaliz campaign-os
|
|
63
|
-
signaliz campaign-os
|
|
61
|
+
signaliz campaign-os knowledge --query "cache first" [--client-id <uuid>] [--record-kind campaign_playbook] [--limit 15]
|
|
62
|
+
signaliz campaign-os provider-runtime --client-id <uuid> --provider clay|instantly|smartlead|bison
|
|
63
|
+
signaliz campaign-os build --client-id <uuid> --name "Campaign" --objective "Goal" --target-count 500 --idempotency-key <key>
|
|
64
|
+
signaliz campaign-os build-status --build-run-id <uuid>
|
|
65
|
+
signaliz campaign-os draft --client-id <uuid> --name "Campaign" --campaign-spec-file campaign-spec.json --idempotency-key <key> [--agent codex]
|
|
66
|
+
signaliz campaign-os audience-draft --client-id <uuid> --name "Audience" --definition-file audience.json --entity-type people --audience-role campaign_segment --source-mode signaliz_owned --idempotency-key <key>
|
|
67
|
+
signaliz campaign-os audience-preview --client-id <uuid> --audience-id <uuid> --idempotency-key <key>
|
|
68
|
+
signaliz campaign-os compile --client-id <uuid> --campaign-id <uuid> [--providers all]
|
|
69
|
+
signaliz campaign-os request --client-id <uuid> [--campaign-id <uuid>] --agent codex --action provider_load --instructions "..." [--idempotency-key <key>]
|
|
64
70
|
signaliz campaign-os receipts [--client-id <uuid>] [--campaign-id <uuid>] [--limit 50]
|
|
65
71
|
|
|
66
72
|
Access and connection:
|
|
@@ -2082,22 +2088,21 @@ var CAMPAIGN_OS_AGENTS = /* @__PURE__ */ new Set([
|
|
|
2082
2088
|
"cursor",
|
|
2083
2089
|
"devin",
|
|
2084
2090
|
"grok",
|
|
2091
|
+
"signaliz_agent",
|
|
2085
2092
|
"other"
|
|
2086
2093
|
]);
|
|
2087
2094
|
var CAMPAIGN_OS_ACTIONS = /* @__PURE__ */ new Set([
|
|
2088
|
-
"
|
|
2089
|
-
"refresh_brain",
|
|
2090
|
-
"sync_audience",
|
|
2091
|
-
"prepare_realtime_policy",
|
|
2095
|
+
"fresh_paid_sourcing",
|
|
2092
2096
|
"provider_load",
|
|
2093
2097
|
"provider_activation",
|
|
2094
|
-
"provider_send"
|
|
2098
|
+
"provider_send",
|
|
2099
|
+
"realtime_arm"
|
|
2095
2100
|
]);
|
|
2096
2101
|
function campaignOsAgentFlag() {
|
|
2097
2102
|
const value = flag("agent")?.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
2098
2103
|
if (!value) return void 0;
|
|
2099
2104
|
if (!CAMPAIGN_OS_AGENTS.has(value)) {
|
|
2100
|
-
throw new CliInputError("--agent must be codex, claude_code, cursor, devin, grok, or other");
|
|
2105
|
+
throw new CliInputError("--agent must be codex, claude_code, cursor, devin, grok, signaliz_agent, or other");
|
|
2101
2106
|
}
|
|
2102
2107
|
return value;
|
|
2103
2108
|
}
|
|
@@ -2138,23 +2143,108 @@ async function campaignOs(args) {
|
|
|
2138
2143
|
});
|
|
2139
2144
|
return;
|
|
2140
2145
|
}
|
|
2146
|
+
if (action === "knowledge") {
|
|
2147
|
+
const query = flag("query");
|
|
2148
|
+
if (!query || query.length < 2) {
|
|
2149
|
+
throw new CliInputError('signaliz campaign-os knowledge requires --query "campaign method"');
|
|
2150
|
+
}
|
|
2151
|
+
const limit = numberFlag("limit") ?? 15;
|
|
2152
|
+
requireIntegerInRange(limit, "--limit", 1, 50);
|
|
2153
|
+
const allowedKinds = [
|
|
2154
|
+
"client_brain",
|
|
2155
|
+
"campaign_register",
|
|
2156
|
+
"campaign_learning",
|
|
2157
|
+
"campaign_methodology",
|
|
2158
|
+
"campaign_genome",
|
|
2159
|
+
"campaign_playbook",
|
|
2160
|
+
"knowledge_inventory"
|
|
2161
|
+
];
|
|
2162
|
+
const recordKind = flag("record-kind");
|
|
2163
|
+
if (recordKind && !allowedKinds.includes(recordKind)) {
|
|
2164
|
+
throw new CliInputError(`--record-kind must be one of: ${allowedKinds.join(", ")}`);
|
|
2165
|
+
}
|
|
2166
|
+
const result = await client.searchCampaignOsKnowledge({
|
|
2167
|
+
query,
|
|
2168
|
+
clientId: flag("client-id"),
|
|
2169
|
+
recordKind,
|
|
2170
|
+
limit
|
|
2171
|
+
});
|
|
2172
|
+
output(result, () => {
|
|
2173
|
+
process.stdout.write(`Campaign memory results: ${result.total_returned}
|
|
2174
|
+
`);
|
|
2175
|
+
for (const item of result.results) {
|
|
2176
|
+
process.stdout.write(`- ${String(item.title || "Untitled")} \xB7 ${String(item.client_slug || "unknown")} \xB7 ${String(item.record_kind || "knowledge")}
|
|
2177
|
+
`);
|
|
2178
|
+
}
|
|
2179
|
+
process.stdout.write("Results are bounded excerpts from the immutable current CMM snapshot.\n");
|
|
2180
|
+
});
|
|
2181
|
+
return;
|
|
2182
|
+
}
|
|
2141
2183
|
if (action === "provider-runtime") {
|
|
2142
2184
|
const clientId = flag("client-id");
|
|
2143
2185
|
const provider = flag("provider");
|
|
2144
2186
|
if (!clientId || !provider) {
|
|
2145
|
-
throw new CliInputError("signaliz campaign-os provider-runtime requires --client-id <uuid> --provider clay|instantly");
|
|
2187
|
+
throw new CliInputError("signaliz campaign-os provider-runtime requires --client-id <uuid> --provider clay|instantly|smartlead|bison");
|
|
2146
2188
|
}
|
|
2147
|
-
if (!["clay", "instantly"].includes(provider)) {
|
|
2148
|
-
throw new CliInputError("--provider must be clay or
|
|
2189
|
+
if (!["clay", "instantly", "smartlead", "bison"].includes(provider)) {
|
|
2190
|
+
throw new CliInputError("--provider must be clay, instantly, smartlead, or bison");
|
|
2149
2191
|
}
|
|
2150
2192
|
const result = await client.getCampaignOsProviderRuntime(clientId, provider);
|
|
2151
2193
|
output(result, () => {
|
|
2152
|
-
|
|
2194
|
+
const providerName = { clay: "Clay", instantly: "Instantly", smartlead: "Smartlead", bison: "Bison" }[provider];
|
|
2195
|
+
process.stdout.write(`${providerName} runtime for ${result.client.name}: ${result.connected ? "connected" : "not connected"}
|
|
2153
2196
|
`);
|
|
2154
2197
|
process.stdout.write("Provider secrets were not returned and no provider call, spend, or mutation started.\n");
|
|
2155
2198
|
});
|
|
2156
2199
|
return;
|
|
2157
2200
|
}
|
|
2201
|
+
if (action === "build") {
|
|
2202
|
+
const clientId = flag("client-id");
|
|
2203
|
+
const name = flag("name");
|
|
2204
|
+
const objective = flag("objective");
|
|
2205
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2206
|
+
if (!clientId || !name || !objective || !idempotencyKey) {
|
|
2207
|
+
throw new CliInputError('signaliz campaign-os build requires --client-id <uuid> --name "Campaign" --objective "Goal" --idempotency-key <key>');
|
|
2208
|
+
}
|
|
2209
|
+
const lane = flag("lane") || "one_time";
|
|
2210
|
+
if (!["one_time", "always_on", "realtime"].includes(lane)) {
|
|
2211
|
+
throw new CliInputError("--lane must be one_time, always_on, or realtime");
|
|
2212
|
+
}
|
|
2213
|
+
const targetCount = numberFlag("target-count") ?? 0;
|
|
2214
|
+
requireIntegerInRange(targetCount, "--target-count", 0, 1e7);
|
|
2215
|
+
const result = await client.startCampaignOsBuild({
|
|
2216
|
+
clientId,
|
|
2217
|
+
name,
|
|
2218
|
+
objective,
|
|
2219
|
+
lane,
|
|
2220
|
+
targetCount,
|
|
2221
|
+
audienceDefinitionId: flag("audience-definition-id"),
|
|
2222
|
+
agentVendor: campaignOsAgentFlag(),
|
|
2223
|
+
idempotencyKey
|
|
2224
|
+
});
|
|
2225
|
+
output(result, () => {
|
|
2226
|
+
const build = record(result.build);
|
|
2227
|
+
process.stdout.write(`Campaign Brain build started: ${String(build.id || "")} \xB7 ${String(build.status || "queued")}
|
|
2228
|
+
`);
|
|
2229
|
+
process.stdout.write("No admin approval was required. Provider load, activation, realtime arming, and send remain locked.\n");
|
|
2230
|
+
});
|
|
2231
|
+
return;
|
|
2232
|
+
}
|
|
2233
|
+
if (action === "build-status") {
|
|
2234
|
+
const buildRunId = flag("build-run-id");
|
|
2235
|
+
if (!buildRunId) throw new CliInputError("signaliz campaign-os build-status requires --build-run-id <uuid>");
|
|
2236
|
+
const result = await client.getCampaignOsBuild(buildRunId);
|
|
2237
|
+
output(result, () => {
|
|
2238
|
+
const build = record(result.build);
|
|
2239
|
+
const campaign = record(result.campaign);
|
|
2240
|
+
process.stdout.write(`Campaign Brain build: ${String(build.status || "unknown")}
|
|
2241
|
+
`);
|
|
2242
|
+
if (campaign.id) process.stdout.write(`Review-held campaign: ${String(campaign.name || "")} (${String(campaign.id)})
|
|
2243
|
+
`);
|
|
2244
|
+
process.stdout.write("Provider execution remains locked.\n");
|
|
2245
|
+
});
|
|
2246
|
+
return;
|
|
2247
|
+
}
|
|
2158
2248
|
if (action === "draft") {
|
|
2159
2249
|
const clientId = flag("client-id");
|
|
2160
2250
|
const name = flag("name");
|
|
@@ -2165,6 +2255,21 @@ async function campaignOs(args) {
|
|
|
2165
2255
|
}
|
|
2166
2256
|
const targetCount = numberFlag("target-count");
|
|
2167
2257
|
requireIntegerInRange(targetCount, "--target-count", 0, 1e7);
|
|
2258
|
+
const campaignSpecFile = flag("campaign-spec-file");
|
|
2259
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2260
|
+
if (!campaignSpecFile || !idempotencyKey) {
|
|
2261
|
+
throw new CliInputError("signaliz campaign-os draft requires --campaign-spec-file <json> and --idempotency-key <key>");
|
|
2262
|
+
}
|
|
2263
|
+
let campaignSpec;
|
|
2264
|
+
try {
|
|
2265
|
+
const parsed = JSON.parse((0, import_node_fs.readFileSync)(campaignSpecFile, "utf8"));
|
|
2266
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
2267
|
+
throw new Error("file must contain one JSON object");
|
|
2268
|
+
}
|
|
2269
|
+
campaignSpec = parsed;
|
|
2270
|
+
} catch (error) {
|
|
2271
|
+
throw new CliInputError(`Unable to read --campaign-spec-file: ${error instanceof Error ? error.message : String(error)}`);
|
|
2272
|
+
}
|
|
2168
2273
|
const result = await client.createCampaignOsDraft({
|
|
2169
2274
|
clientId,
|
|
2170
2275
|
name,
|
|
@@ -2172,18 +2277,79 @@ async function campaignOs(args) {
|
|
|
2172
2277
|
lane,
|
|
2173
2278
|
targetCount,
|
|
2174
2279
|
audienceBindingId: flag("audience-binding-id"),
|
|
2280
|
+
audienceDefinitionId: flag("audience-definition-id"),
|
|
2281
|
+
campaignSpec,
|
|
2175
2282
|
agentVendor: campaignOsAgentFlag(),
|
|
2176
|
-
idempotencyKey
|
|
2283
|
+
idempotencyKey
|
|
2177
2284
|
});
|
|
2178
2285
|
output(result, () => {
|
|
2179
2286
|
const campaign = record(result.campaign);
|
|
2180
2287
|
process.stdout.write(`Review-held draft created: ${String(campaign.name || name)} (${String(campaign.id || "")})
|
|
2181
2288
|
`);
|
|
2182
2289
|
process.stdout.write("Provider load: locked \xB7 activation: locked \xB7 send: locked\n");
|
|
2183
|
-
process.stdout.write("No Clay or
|
|
2290
|
+
process.stdout.write("No Clay, Instantly, Smartlead, or Bison mutation was performed.\n");
|
|
2291
|
+
});
|
|
2292
|
+
return;
|
|
2293
|
+
}
|
|
2294
|
+
if (action === "audience-draft") {
|
|
2295
|
+
const clientId = flag("client-id");
|
|
2296
|
+
const name = flag("name");
|
|
2297
|
+
const definitionFile = flag("definition-file");
|
|
2298
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2299
|
+
const entityType = flag("entity-type");
|
|
2300
|
+
const audienceRole = flag("audience-role");
|
|
2301
|
+
const sourceMode = flag("source-mode");
|
|
2302
|
+
if (!clientId || !name || !definitionFile || !idempotencyKey || !entityType || !audienceRole || !sourceMode) {
|
|
2303
|
+
throw new CliInputError("signaliz campaign-os audience-draft requires --client-id, --name, --definition-file, --entity-type, --audience-role, --source-mode, and --idempotency-key");
|
|
2304
|
+
}
|
|
2305
|
+
let definition;
|
|
2306
|
+
try {
|
|
2307
|
+
const parsed = JSON.parse((0, import_node_fs.readFileSync)(definitionFile, "utf8"));
|
|
2308
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("file must contain one JSON object");
|
|
2309
|
+
definition = parsed;
|
|
2310
|
+
} catch (error) {
|
|
2311
|
+
throw new CliInputError(`Unable to read --definition-file: ${error instanceof Error ? error.message : String(error)}`);
|
|
2312
|
+
}
|
|
2313
|
+
const result = await client.createCampaignOsAudienceDraft({
|
|
2314
|
+
clientId,
|
|
2315
|
+
audienceId: flag("audience-id"),
|
|
2316
|
+
name,
|
|
2317
|
+
description: flag("description"),
|
|
2318
|
+
entityType,
|
|
2319
|
+
audienceRole,
|
|
2320
|
+
sourceMode,
|
|
2321
|
+
definition,
|
|
2322
|
+
idempotencyKey
|
|
2323
|
+
});
|
|
2324
|
+
output(result, () => {
|
|
2325
|
+
const audience = record(result.audience);
|
|
2326
|
+
process.stdout.write(`Audience draft saved: ${String(audience.name || name)} (${String(audience.id || "")})
|
|
2327
|
+
`);
|
|
2328
|
+
process.stdout.write("Clay calls: 0 \xB7 provider mutation: false\n");
|
|
2184
2329
|
});
|
|
2185
2330
|
return;
|
|
2186
2331
|
}
|
|
2332
|
+
if (action === "audience-preview") {
|
|
2333
|
+
const clientId = flag("client-id");
|
|
2334
|
+
const audienceId = flag("audience-id");
|
|
2335
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2336
|
+
if (!clientId || !audienceId || !idempotencyKey) {
|
|
2337
|
+
throw new CliInputError("signaliz campaign-os audience-preview requires --client-id, --audience-id, and --idempotency-key");
|
|
2338
|
+
}
|
|
2339
|
+
const result = await client.previewCampaignOsAudience(clientId, audienceId, idempotencyKey);
|
|
2340
|
+
output(result, () => process.stdout.write("No-spend Audience preview recorded \xB7 provider calls 0 \xB7 Clay usage 0\n"));
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
if (action === "compile") {
|
|
2344
|
+
const clientId = flag("client-id");
|
|
2345
|
+
const campaignId = flag("campaign-id");
|
|
2346
|
+
const providers = flag("providers") || "all";
|
|
2347
|
+
if (!clientId || !campaignId) throw new CliInputError("signaliz campaign-os compile requires --client-id and --campaign-id");
|
|
2348
|
+
if (!["all", "instantly", "smartlead", "bison"].includes(providers)) throw new CliInputError("--providers must be all, instantly, smartlead, or bison");
|
|
2349
|
+
const result = await client.compileCampaignOsPreview(clientId, campaignId, providers);
|
|
2350
|
+
output(result, () => process.stdout.write("Compile preview recorded \xB7 provider calls 0 \xB7 no campaign created or sent\n"));
|
|
2351
|
+
return;
|
|
2352
|
+
}
|
|
2187
2353
|
if (action === "request") {
|
|
2188
2354
|
const clientId = flag("client-id");
|
|
2189
2355
|
const actionType = flag("action");
|
|
@@ -2227,7 +2393,7 @@ async function campaignOs(args) {
|
|
|
2227
2393
|
});
|
|
2228
2394
|
return;
|
|
2229
2395
|
}
|
|
2230
|
-
throw new CliInputError("Usage: signaliz campaign-os clients|context|provider-runtime|draft|request|receipts");
|
|
2396
|
+
throw new CliInputError("Usage: signaliz campaign-os clients|context|knowledge|provider-runtime|build|build-status|draft|audience-draft|audience-preview|compile|request|receipts");
|
|
2231
2397
|
}
|
|
2232
2398
|
async function main() {
|
|
2233
2399
|
const [, , command, ...args] = process.argv;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signaliz/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.89",
|
|
4
4
|
"description": "Signaliz CLI for Campaign OS, core products, Signal Awareness, Signaliz Flow, and reusable managed builds.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"signaliz": "dist/bin.js"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"node": ">=18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@signaliz/sdk": "^1.0.
|
|
33
|
+
"@signaliz/sdk": "^1.0.93"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.0.0",
|