@signaliz/cli 1.0.88 → 1.0.90
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 +23 -7
- package/dist/bin.js +174 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -201,14 +201,28 @@ 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 materialize-cache-audience --client-id <uuid> \
|
|
220
|
+
--audience-id <uuid> --target-count 500 \
|
|
221
|
+
--idempotency-key launch-cache-materialization-v1 --json
|
|
222
|
+
signaliz campaign-os audience-preview --client-id <uuid> \
|
|
223
|
+
--audience-id <uuid> --idempotency-key launch-preview-v1 --json
|
|
224
|
+
signaliz campaign-os compile --client-id <uuid> --campaign-id <uuid> \
|
|
225
|
+
--providers all --json
|
|
212
226
|
signaliz campaign-os request --client-id <uuid> --campaign-id <uuid> \
|
|
213
227
|
--agent devin --action provider_activation --instructions "Prepare for review" --json
|
|
214
228
|
signaliz campaign-os receipts --client-id <uuid> --json
|
|
@@ -216,7 +230,9 @@ signaliz campaign-os receipts --client-id <uuid> --json
|
|
|
216
230
|
|
|
217
231
|
`provider-runtime` explains the safe Clay or Instantly route, adapter source,
|
|
218
232
|
approval boundaries, and receipt semantics without returning credentials or
|
|
219
|
-
calling the provider. `draft`
|
|
220
|
-
`
|
|
221
|
-
|
|
222
|
-
|
|
233
|
+
calling the provider. `build`, `audience-draft`, `materialize-cache-audience`,
|
|
234
|
+
`audience-preview`, and `compile` do not need CMM-admin approval and keep
|
|
235
|
+
providers locked. Cache materialization is capped at 500 members and returns
|
|
236
|
+
exact zero-provider/Clay usage plus a terminal reconciliation receipt. `request`
|
|
237
|
+
creates only an auditable review request for paid sourcing, provider load,
|
|
238
|
+
activation, real-time arming, queueing, or sending; it does not execute them.
|
package/dist/bin.js
CHANGED
|
@@ -59,9 +59,15 @@ Product commands:
|
|
|
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
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
|
|
63
|
-
signaliz campaign-os
|
|
64
|
-
signaliz campaign-os
|
|
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 materialize-cache-audience --client-id <uuid> --audience-id <uuid> --target-count <1-500> --idempotency-key <key>
|
|
68
|
+
signaliz campaign-os audience-preview --client-id <uuid> --audience-id <uuid> --idempotency-key <key>
|
|
69
|
+
signaliz campaign-os compile --client-id <uuid> --campaign-id <uuid> [--providers all]
|
|
70
|
+
signaliz campaign-os request --client-id <uuid> [--campaign-id <uuid>] --agent codex --action provider_load --instructions "..." [--idempotency-key <key>]
|
|
65
71
|
signaliz campaign-os receipts [--client-id <uuid>] [--campaign-id <uuid>] [--limit 50]
|
|
66
72
|
|
|
67
73
|
Access and connection:
|
|
@@ -2083,22 +2089,21 @@ var CAMPAIGN_OS_AGENTS = /* @__PURE__ */ new Set([
|
|
|
2083
2089
|
"cursor",
|
|
2084
2090
|
"devin",
|
|
2085
2091
|
"grok",
|
|
2092
|
+
"signaliz_agent",
|
|
2086
2093
|
"other"
|
|
2087
2094
|
]);
|
|
2088
2095
|
var CAMPAIGN_OS_ACTIONS = /* @__PURE__ */ new Set([
|
|
2089
|
-
"
|
|
2090
|
-
"refresh_brain",
|
|
2091
|
-
"sync_audience",
|
|
2092
|
-
"prepare_realtime_policy",
|
|
2096
|
+
"fresh_paid_sourcing",
|
|
2093
2097
|
"provider_load",
|
|
2094
2098
|
"provider_activation",
|
|
2095
|
-
"provider_send"
|
|
2099
|
+
"provider_send",
|
|
2100
|
+
"realtime_arm"
|
|
2096
2101
|
]);
|
|
2097
2102
|
function campaignOsAgentFlag() {
|
|
2098
2103
|
const value = flag("agent")?.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
2099
2104
|
if (!value) return void 0;
|
|
2100
2105
|
if (!CAMPAIGN_OS_AGENTS.has(value)) {
|
|
2101
|
-
throw new CliInputError("--agent must be codex, claude_code, cursor, devin, grok, or other");
|
|
2106
|
+
throw new CliInputError("--agent must be codex, claude_code, cursor, devin, grok, signaliz_agent, or other");
|
|
2102
2107
|
}
|
|
2103
2108
|
return value;
|
|
2104
2109
|
}
|
|
@@ -2180,19 +2185,67 @@ async function campaignOs(args) {
|
|
|
2180
2185
|
const clientId = flag("client-id");
|
|
2181
2186
|
const provider = flag("provider");
|
|
2182
2187
|
if (!clientId || !provider) {
|
|
2183
|
-
throw new CliInputError("signaliz campaign-os provider-runtime requires --client-id <uuid> --provider clay|instantly");
|
|
2188
|
+
throw new CliInputError("signaliz campaign-os provider-runtime requires --client-id <uuid> --provider clay|instantly|smartlead|bison");
|
|
2184
2189
|
}
|
|
2185
|
-
if (!["clay", "instantly"].includes(provider)) {
|
|
2186
|
-
throw new CliInputError("--provider must be clay or
|
|
2190
|
+
if (!["clay", "instantly", "smartlead", "bison"].includes(provider)) {
|
|
2191
|
+
throw new CliInputError("--provider must be clay, instantly, smartlead, or bison");
|
|
2187
2192
|
}
|
|
2188
2193
|
const result = await client.getCampaignOsProviderRuntime(clientId, provider);
|
|
2189
2194
|
output(result, () => {
|
|
2190
|
-
|
|
2195
|
+
const providerName = { clay: "Clay", instantly: "Instantly", smartlead: "Smartlead", bison: "Bison" }[provider];
|
|
2196
|
+
process.stdout.write(`${providerName} runtime for ${result.client.name}: ${result.connected ? "connected" : "not connected"}
|
|
2191
2197
|
`);
|
|
2192
2198
|
process.stdout.write("Provider secrets were not returned and no provider call, spend, or mutation started.\n");
|
|
2193
2199
|
});
|
|
2194
2200
|
return;
|
|
2195
2201
|
}
|
|
2202
|
+
if (action === "build") {
|
|
2203
|
+
const clientId = flag("client-id");
|
|
2204
|
+
const name = flag("name");
|
|
2205
|
+
const objective = flag("objective");
|
|
2206
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2207
|
+
if (!clientId || !name || !objective || !idempotencyKey) {
|
|
2208
|
+
throw new CliInputError('signaliz campaign-os build requires --client-id <uuid> --name "Campaign" --objective "Goal" --idempotency-key <key>');
|
|
2209
|
+
}
|
|
2210
|
+
const lane = flag("lane") || "one_time";
|
|
2211
|
+
if (!["one_time", "always_on", "realtime"].includes(lane)) {
|
|
2212
|
+
throw new CliInputError("--lane must be one_time, always_on, or realtime");
|
|
2213
|
+
}
|
|
2214
|
+
const targetCount = numberFlag("target-count") ?? 0;
|
|
2215
|
+
requireIntegerInRange(targetCount, "--target-count", 0, 1e7);
|
|
2216
|
+
const result = await client.startCampaignOsBuild({
|
|
2217
|
+
clientId,
|
|
2218
|
+
name,
|
|
2219
|
+
objective,
|
|
2220
|
+
lane,
|
|
2221
|
+
targetCount,
|
|
2222
|
+
audienceDefinitionId: flag("audience-definition-id"),
|
|
2223
|
+
agentVendor: campaignOsAgentFlag(),
|
|
2224
|
+
idempotencyKey
|
|
2225
|
+
});
|
|
2226
|
+
output(result, () => {
|
|
2227
|
+
const build = record(result.build);
|
|
2228
|
+
process.stdout.write(`Campaign Brain build started: ${String(build.id || "")} \xB7 ${String(build.status || "queued")}
|
|
2229
|
+
`);
|
|
2230
|
+
process.stdout.write("No admin approval was required. Provider load, activation, realtime arming, and send remain locked.\n");
|
|
2231
|
+
});
|
|
2232
|
+
return;
|
|
2233
|
+
}
|
|
2234
|
+
if (action === "build-status") {
|
|
2235
|
+
const buildRunId = flag("build-run-id");
|
|
2236
|
+
if (!buildRunId) throw new CliInputError("signaliz campaign-os build-status requires --build-run-id <uuid>");
|
|
2237
|
+
const result = await client.getCampaignOsBuild(buildRunId);
|
|
2238
|
+
output(result, () => {
|
|
2239
|
+
const build = record(result.build);
|
|
2240
|
+
const campaign = record(result.campaign);
|
|
2241
|
+
process.stdout.write(`Campaign Brain build: ${String(build.status || "unknown")}
|
|
2242
|
+
`);
|
|
2243
|
+
if (campaign.id) process.stdout.write(`Provider-locked campaign: ${String(campaign.name || "")} (${String(campaign.id)})
|
|
2244
|
+
`);
|
|
2245
|
+
process.stdout.write("Provider execution remains locked.\n");
|
|
2246
|
+
});
|
|
2247
|
+
return;
|
|
2248
|
+
}
|
|
2196
2249
|
if (action === "draft") {
|
|
2197
2250
|
const clientId = flag("client-id");
|
|
2198
2251
|
const name = flag("name");
|
|
@@ -2203,6 +2256,21 @@ async function campaignOs(args) {
|
|
|
2203
2256
|
}
|
|
2204
2257
|
const targetCount = numberFlag("target-count");
|
|
2205
2258
|
requireIntegerInRange(targetCount, "--target-count", 0, 1e7);
|
|
2259
|
+
const campaignSpecFile = flag("campaign-spec-file");
|
|
2260
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2261
|
+
if (!campaignSpecFile || !idempotencyKey) {
|
|
2262
|
+
throw new CliInputError("signaliz campaign-os draft requires --campaign-spec-file <json> and --idempotency-key <key>");
|
|
2263
|
+
}
|
|
2264
|
+
let campaignSpec;
|
|
2265
|
+
try {
|
|
2266
|
+
const parsed = JSON.parse((0, import_node_fs.readFileSync)(campaignSpecFile, "utf8"));
|
|
2267
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
2268
|
+
throw new Error("file must contain one JSON object");
|
|
2269
|
+
}
|
|
2270
|
+
campaignSpec = parsed;
|
|
2271
|
+
} catch (error) {
|
|
2272
|
+
throw new CliInputError(`Unable to read --campaign-spec-file: ${error instanceof Error ? error.message : String(error)}`);
|
|
2273
|
+
}
|
|
2206
2274
|
const result = await client.createCampaignOsDraft({
|
|
2207
2275
|
clientId,
|
|
2208
2276
|
name,
|
|
@@ -2210,16 +2278,105 @@ async function campaignOs(args) {
|
|
|
2210
2278
|
lane,
|
|
2211
2279
|
targetCount,
|
|
2212
2280
|
audienceBindingId: flag("audience-binding-id"),
|
|
2281
|
+
audienceDefinitionId: flag("audience-definition-id"),
|
|
2282
|
+
campaignSpec,
|
|
2213
2283
|
agentVendor: campaignOsAgentFlag(),
|
|
2214
|
-
idempotencyKey
|
|
2284
|
+
idempotencyKey
|
|
2215
2285
|
});
|
|
2216
2286
|
output(result, () => {
|
|
2217
2287
|
const campaign = record(result.campaign);
|
|
2218
|
-
process.stdout.write(`
|
|
2288
|
+
process.stdout.write(`Provider-locked draft created without admin approval: ${String(campaign.name || name)} (${String(campaign.id || "")})
|
|
2219
2289
|
`);
|
|
2220
2290
|
process.stdout.write("Provider load: locked \xB7 activation: locked \xB7 send: locked\n");
|
|
2221
|
-
process.stdout.write("No Clay or
|
|
2291
|
+
process.stdout.write("No Clay, Instantly, Smartlead, or Bison mutation was performed.\n");
|
|
2292
|
+
});
|
|
2293
|
+
return;
|
|
2294
|
+
}
|
|
2295
|
+
if (action === "audience-draft") {
|
|
2296
|
+
const clientId = flag("client-id");
|
|
2297
|
+
const name = flag("name");
|
|
2298
|
+
const definitionFile = flag("definition-file");
|
|
2299
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2300
|
+
const entityType = flag("entity-type");
|
|
2301
|
+
const audienceRole = flag("audience-role");
|
|
2302
|
+
const sourceMode = flag("source-mode");
|
|
2303
|
+
if (!clientId || !name || !definitionFile || !idempotencyKey || !entityType || !audienceRole || !sourceMode) {
|
|
2304
|
+
throw new CliInputError("signaliz campaign-os audience-draft requires --client-id, --name, --definition-file, --entity-type, --audience-role, --source-mode, and --idempotency-key");
|
|
2305
|
+
}
|
|
2306
|
+
let definition;
|
|
2307
|
+
try {
|
|
2308
|
+
const parsed = JSON.parse((0, import_node_fs.readFileSync)(definitionFile, "utf8"));
|
|
2309
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("file must contain one JSON object");
|
|
2310
|
+
definition = parsed;
|
|
2311
|
+
} catch (error) {
|
|
2312
|
+
throw new CliInputError(`Unable to read --definition-file: ${error instanceof Error ? error.message : String(error)}`);
|
|
2313
|
+
}
|
|
2314
|
+
const result = await client.createCampaignOsAudienceDraft({
|
|
2315
|
+
clientId,
|
|
2316
|
+
audienceId: flag("audience-id"),
|
|
2317
|
+
name,
|
|
2318
|
+
description: flag("description"),
|
|
2319
|
+
entityType,
|
|
2320
|
+
audienceRole,
|
|
2321
|
+
sourceMode,
|
|
2322
|
+
definition,
|
|
2323
|
+
idempotencyKey
|
|
2222
2324
|
});
|
|
2325
|
+
output(result, () => {
|
|
2326
|
+
const audience = record(result.audience);
|
|
2327
|
+
process.stdout.write(`Audience draft saved: ${String(audience.name || name)} (${String(audience.id || "")})
|
|
2328
|
+
`);
|
|
2329
|
+
process.stdout.write("Clay calls: 0 \xB7 provider mutation: false\n");
|
|
2330
|
+
});
|
|
2331
|
+
return;
|
|
2332
|
+
}
|
|
2333
|
+
if (action === "audience-preview") {
|
|
2334
|
+
const clientId = flag("client-id");
|
|
2335
|
+
const audienceId = flag("audience-id");
|
|
2336
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2337
|
+
if (!clientId || !audienceId || !idempotencyKey) {
|
|
2338
|
+
throw new CliInputError("signaliz campaign-os audience-preview requires --client-id, --audience-id, and --idempotency-key");
|
|
2339
|
+
}
|
|
2340
|
+
const result = await client.previewCampaignOsAudience(clientId, audienceId, idempotencyKey);
|
|
2341
|
+
output(result, () => process.stdout.write("No-spend Audience preview recorded \xB7 provider calls 0 \xB7 Clay usage 0\n"));
|
|
2342
|
+
return;
|
|
2343
|
+
}
|
|
2344
|
+
if (action === "materialize-cache-audience") {
|
|
2345
|
+
const clientId = flag("client-id");
|
|
2346
|
+
const audienceId = flag("audience-id");
|
|
2347
|
+
const targetCount = numberFlag("target-count");
|
|
2348
|
+
const idempotencyKey = flag("idempotency-key");
|
|
2349
|
+
if (!clientId || !audienceId || targetCount === void 0 || !idempotencyKey) {
|
|
2350
|
+
throw new CliInputError("signaliz campaign-os materialize-cache-audience requires --client-id, --audience-id, --target-count <1-500>, and --idempotency-key");
|
|
2351
|
+
}
|
|
2352
|
+
requireIntegerInRange(targetCount, "--target-count", 1, 500);
|
|
2353
|
+
const result = await client.materializeCampaignOsCacheAudience({
|
|
2354
|
+
clientId,
|
|
2355
|
+
audienceId,
|
|
2356
|
+
targetCount,
|
|
2357
|
+
idempotencyKey
|
|
2358
|
+
});
|
|
2359
|
+
output(result, () => {
|
|
2360
|
+
const usage = record(result.usage_receipt);
|
|
2361
|
+
const reconciliation = record(result.terminal_reconciliation_receipt);
|
|
2362
|
+
process.stdout.write(`Cache Audience materialized: target ${targetCount}
|
|
2363
|
+
`);
|
|
2364
|
+
process.stdout.write(`Provider calls: ${String(usage.provider_calls)} \xB7 Clay Search allowance: ${String(usage.clay_search_allowance_used)} \xB7 Clay Actions: ${String(usage.clay_actions_used)} \xB7 Clay Data Credits: ${String(usage.clay_data_credits_used)}
|
|
2365
|
+
`);
|
|
2366
|
+
process.stdout.write(`Terminal reconciliation receipt: ${JSON.stringify(reconciliation)}
|
|
2367
|
+
`);
|
|
2368
|
+
process.stdout.write("No provider approval was requested.\n");
|
|
2369
|
+
});
|
|
2370
|
+
return;
|
|
2371
|
+
}
|
|
2372
|
+
if (action === "compile") {
|
|
2373
|
+
const clientId = flag("client-id");
|
|
2374
|
+
const campaignId = flag("campaign-id");
|
|
2375
|
+
const providers = flag("providers") || "all";
|
|
2376
|
+
if (!clientId || !campaignId) throw new CliInputError("signaliz campaign-os compile requires --client-id and --campaign-id");
|
|
2377
|
+
if (!["all", "instantly", "smartlead", "bison"].includes(providers)) throw new CliInputError("--providers must be all, instantly, smartlead, or bison");
|
|
2378
|
+
const result = await client.compileCampaignOsPreview(clientId, campaignId, providers);
|
|
2379
|
+
output(result, () => process.stdout.write("Compile preview recorded \xB7 provider calls 0 \xB7 no campaign created or sent\n"));
|
|
2223
2380
|
return;
|
|
2224
2381
|
}
|
|
2225
2382
|
if (action === "request") {
|
|
@@ -2265,7 +2422,7 @@ async function campaignOs(args) {
|
|
|
2265
2422
|
});
|
|
2266
2423
|
return;
|
|
2267
2424
|
}
|
|
2268
|
-
throw new CliInputError("Usage: signaliz campaign-os clients|context|knowledge|provider-runtime|draft|request|receipts");
|
|
2425
|
+
throw new CliInputError("Usage: signaliz campaign-os clients|context|knowledge|provider-runtime|build|build-status|draft|audience-draft|materialize-cache-audience|audience-preview|compile|request|receipts");
|
|
2269
2426
|
}
|
|
2270
2427
|
async function main() {
|
|
2271
2428
|
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.90",
|
|
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.94"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.0.0",
|