@signaliz/cli 1.0.88 → 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 +144 -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
|
@@ -59,9 +59,14 @@ 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 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>]
|
|
65
70
|
signaliz campaign-os receipts [--client-id <uuid>] [--campaign-id <uuid>] [--limit 50]
|
|
66
71
|
|
|
67
72
|
Access and connection:
|
|
@@ -2083,22 +2088,21 @@ var CAMPAIGN_OS_AGENTS = /* @__PURE__ */ new Set([
|
|
|
2083
2088
|
"cursor",
|
|
2084
2089
|
"devin",
|
|
2085
2090
|
"grok",
|
|
2091
|
+
"signaliz_agent",
|
|
2086
2092
|
"other"
|
|
2087
2093
|
]);
|
|
2088
2094
|
var CAMPAIGN_OS_ACTIONS = /* @__PURE__ */ new Set([
|
|
2089
|
-
"
|
|
2090
|
-
"refresh_brain",
|
|
2091
|
-
"sync_audience",
|
|
2092
|
-
"prepare_realtime_policy",
|
|
2095
|
+
"fresh_paid_sourcing",
|
|
2093
2096
|
"provider_load",
|
|
2094
2097
|
"provider_activation",
|
|
2095
|
-
"provider_send"
|
|
2098
|
+
"provider_send",
|
|
2099
|
+
"realtime_arm"
|
|
2096
2100
|
]);
|
|
2097
2101
|
function campaignOsAgentFlag() {
|
|
2098
2102
|
const value = flag("agent")?.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
2099
2103
|
if (!value) return void 0;
|
|
2100
2104
|
if (!CAMPAIGN_OS_AGENTS.has(value)) {
|
|
2101
|
-
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");
|
|
2102
2106
|
}
|
|
2103
2107
|
return value;
|
|
2104
2108
|
}
|
|
@@ -2180,19 +2184,67 @@ async function campaignOs(args) {
|
|
|
2180
2184
|
const clientId = flag("client-id");
|
|
2181
2185
|
const provider = flag("provider");
|
|
2182
2186
|
if (!clientId || !provider) {
|
|
2183
|
-
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");
|
|
2184
2188
|
}
|
|
2185
|
-
if (!["clay", "instantly"].includes(provider)) {
|
|
2186
|
-
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");
|
|
2187
2191
|
}
|
|
2188
2192
|
const result = await client.getCampaignOsProviderRuntime(clientId, provider);
|
|
2189
2193
|
output(result, () => {
|
|
2190
|
-
|
|
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"}
|
|
2191
2196
|
`);
|
|
2192
2197
|
process.stdout.write("Provider secrets were not returned and no provider call, spend, or mutation started.\n");
|
|
2193
2198
|
});
|
|
2194
2199
|
return;
|
|
2195
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
|
+
}
|
|
2196
2248
|
if (action === "draft") {
|
|
2197
2249
|
const clientId = flag("client-id");
|
|
2198
2250
|
const name = flag("name");
|
|
@@ -2203,6 +2255,21 @@ async function campaignOs(args) {
|
|
|
2203
2255
|
}
|
|
2204
2256
|
const targetCount = numberFlag("target-count");
|
|
2205
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
|
+
}
|
|
2206
2273
|
const result = await client.createCampaignOsDraft({
|
|
2207
2274
|
clientId,
|
|
2208
2275
|
name,
|
|
@@ -2210,18 +2277,79 @@ async function campaignOs(args) {
|
|
|
2210
2277
|
lane,
|
|
2211
2278
|
targetCount,
|
|
2212
2279
|
audienceBindingId: flag("audience-binding-id"),
|
|
2280
|
+
audienceDefinitionId: flag("audience-definition-id"),
|
|
2281
|
+
campaignSpec,
|
|
2213
2282
|
agentVendor: campaignOsAgentFlag(),
|
|
2214
|
-
idempotencyKey
|
|
2283
|
+
idempotencyKey
|
|
2215
2284
|
});
|
|
2216
2285
|
output(result, () => {
|
|
2217
2286
|
const campaign = record(result.campaign);
|
|
2218
2287
|
process.stdout.write(`Review-held draft created: ${String(campaign.name || name)} (${String(campaign.id || "")})
|
|
2219
2288
|
`);
|
|
2220
2289
|
process.stdout.write("Provider load: locked \xB7 activation: locked \xB7 send: locked\n");
|
|
2221
|
-
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");
|
|
2222
2329
|
});
|
|
2223
2330
|
return;
|
|
2224
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
|
+
}
|
|
2225
2353
|
if (action === "request") {
|
|
2226
2354
|
const clientId = flag("client-id");
|
|
2227
2355
|
const actionType = flag("action");
|
|
@@ -2265,7 +2393,7 @@ async function campaignOs(args) {
|
|
|
2265
2393
|
});
|
|
2266
2394
|
return;
|
|
2267
2395
|
}
|
|
2268
|
-
throw new CliInputError("Usage: signaliz campaign-os clients|context|knowledge|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");
|
|
2269
2397
|
}
|
|
2270
2398
|
async function main() {
|
|
2271
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",
|