@signaliz/cli 1.0.91 → 1.0.93
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/dist/bin.js +202 -14
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -57,18 +57,27 @@ Product commands:
|
|
|
57
57
|
signaliz builds status --run-id <uuid> [--limit 100]
|
|
58
58
|
signaliz builds download --run-id <uuid> --out results.csv
|
|
59
59
|
signaliz campaign-os clients [--status active] [--query signaliz] [--limit 100]
|
|
60
|
-
signaliz campaign-os context --client-id <uuid> [--source-limit 50]
|
|
61
|
-
signaliz campaign-os knowledge --query "cache first" [--client-id <uuid>] [--record-kind campaign_playbook] [--limit 15]
|
|
60
|
+
signaliz campaign-os context --client-id <uuid> [--knowledge-snapshot-id <uuid>] [--source-limit 50]
|
|
61
|
+
signaliz campaign-os knowledge --query "cache first" [--client-id <uuid>] [--knowledge-snapshot-id <uuid>] [--record-kind campaign_playbook] [--limit 15]
|
|
62
62
|
signaliz campaign-os provider-runtime --client-id <uuid> --provider clay|instantly|smartlead|bison
|
|
63
63
|
signaliz campaign-os build --client-id <uuid> --name "Campaign" --objective "Goal" --target-count 500 --idempotency-key <key>
|
|
64
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]
|
|
65
|
+
signaliz campaign-os draft --client-id <uuid> --name "Campaign" --campaign-spec-file campaign-spec.json --idempotency-key <key> [--knowledge-snapshot-id <uuid>] [--agent codex]
|
|
66
66
|
signaliz campaign-os refine --client-id <uuid> --campaign-id <uuid> --expected-spec-version-id <uuid> --campaign-spec-file campaign-spec.json --change-reason "What changed" --idempotency-key <key> [--agent codex]
|
|
67
67
|
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>
|
|
68
68
|
signaliz campaign-os materialize-cache-audience --client-id <uuid> --audience-id <uuid> [--campaign-id <uuid>] --target-count <1-500> --idempotency-key <key>
|
|
69
69
|
signaliz campaign-os audience-schedule --client-id <uuid> --audience-id <uuid> [--campaign-id <uuid>] [--cadence-minutes 1440] [--per-run-cap 100] [--source-policy cache_only|cache_then_review] [--enabled yes|no] [--run-now]
|
|
70
70
|
signaliz campaign-os audience-preview --client-id <uuid> --audience-id <uuid> --idempotency-key <key>
|
|
71
71
|
signaliz campaign-os compile --client-id <uuid> --campaign-id <uuid> [--providers all]
|
|
72
|
+
signaliz campaign-os alpha-plan --client-id <uuid> --client-name "Velox" --offer-summary "..." --icp-summary "..." --idempotency-key <key>
|
|
73
|
+
signaliz campaign-os alpha-discover --client-id <uuid> --client-name "Velox" --offer-summary "..." --icp-summary "..." --idempotency-key <key> --confirm-spend
|
|
74
|
+
signaliz campaign-os alpha-status --alpha-run-id <uuid>
|
|
75
|
+
signaliz campaign-os alpha-validate --client-id <uuid> --campaign-id <uuid> --alpha-run-id <uuid> --candidate-index 0 --sample-file sample.json --idempotency-key <key> --confirm-spend
|
|
76
|
+
signaliz campaign-os alpha-validation-status --validation-run-id <uuid>
|
|
77
|
+
signaliz campaign-os alpha-apply --validation-run-id <uuid>
|
|
78
|
+
signaliz campaign-os connections --client-id <uuid>
|
|
79
|
+
signaliz campaign-os source-binding --client-id <uuid> --binding-id <uuid> --name "CRM list" --source-kind audience --selector-file selector.json --idempotency-key <key>
|
|
80
|
+
signaliz campaign-os source-preflight --client-id <uuid> --source-binding-id <uuid> --idempotency-key <key> [--max-records 25]
|
|
72
81
|
signaliz campaign-os request --client-id <uuid> [--campaign-id <uuid>] --agent codex --action provider_load --instructions "..." [--preflight-inputs-file inputs.json] --idempotency-key <key>
|
|
73
82
|
signaliz campaign-os prepare-preflight --client-id <uuid> --request-id <uuid>
|
|
74
83
|
signaliz campaign-os receipts [--client-id <uuid>] [--campaign-id <uuid>] [--limit 50]
|
|
@@ -2136,7 +2145,11 @@ async function campaignOs(args) {
|
|
|
2136
2145
|
if (!clientId) throw new CliInputError("signaliz campaign-os context requires --client-id <uuid>");
|
|
2137
2146
|
const sourceLimit = numberFlag("source-limit") ?? 50;
|
|
2138
2147
|
requireIntegerInRange(sourceLimit, "--source-limit", 1, 100);
|
|
2139
|
-
const result = await client.getCampaignOsClientContext(
|
|
2148
|
+
const result = await client.getCampaignOsClientContext(
|
|
2149
|
+
clientId,
|
|
2150
|
+
sourceLimit,
|
|
2151
|
+
flag("knowledge-snapshot-id")
|
|
2152
|
+
);
|
|
2140
2153
|
output(result, () => {
|
|
2141
2154
|
const selected = result.client;
|
|
2142
2155
|
process.stdout.write(`${String(selected.name || clientId)} \xB7 Brain v${String(selected.brain_version || "?")}
|
|
@@ -2154,15 +2167,7 @@ async function campaignOs(args) {
|
|
|
2154
2167
|
}
|
|
2155
2168
|
const limit = numberFlag("limit") ?? 15;
|
|
2156
2169
|
requireIntegerInRange(limit, "--limit", 1, 50);
|
|
2157
|
-
const allowedKinds =
|
|
2158
|
-
"client_brain",
|
|
2159
|
-
"campaign_register",
|
|
2160
|
-
"campaign_learning",
|
|
2161
|
-
"campaign_methodology",
|
|
2162
|
-
"campaign_genome",
|
|
2163
|
-
"campaign_playbook",
|
|
2164
|
-
"knowledge_inventory"
|
|
2165
|
-
];
|
|
2170
|
+
const allowedKinds = import_sdk.CAMPAIGN_OS_KNOWLEDGE_RECORD_KINDS;
|
|
2166
2171
|
const recordKind = flag("record-kind");
|
|
2167
2172
|
if (recordKind && !allowedKinds.includes(recordKind)) {
|
|
2168
2173
|
throw new CliInputError(`--record-kind must be one of: ${allowedKinds.join(", ")}`);
|
|
@@ -2170,6 +2175,7 @@ async function campaignOs(args) {
|
|
|
2170
2175
|
const result = await client.searchCampaignOsKnowledge({
|
|
2171
2176
|
query,
|
|
2172
2177
|
clientId: flag("client-id"),
|
|
2178
|
+
knowledgeSnapshotId: flag("knowledge-snapshot-id"),
|
|
2173
2179
|
recordKind,
|
|
2174
2180
|
limit
|
|
2175
2181
|
});
|
|
@@ -2282,6 +2288,7 @@ async function campaignOs(args) {
|
|
|
2282
2288
|
targetCount,
|
|
2283
2289
|
audienceBindingId: flag("audience-binding-id"),
|
|
2284
2290
|
audienceDefinitionId: flag("audience-definition-id"),
|
|
2291
|
+
knowledgeSnapshotId: flag("knowledge-snapshot-id"),
|
|
2285
2292
|
campaignSpec,
|
|
2286
2293
|
agentVendor: campaignOsAgentFlag(),
|
|
2287
2294
|
idempotencyKey
|
|
@@ -2456,6 +2463,187 @@ async function campaignOs(args) {
|
|
|
2456
2463
|
output(result, () => process.stdout.write("Compile preview recorded \xB7 provider calls 0 \xB7 no campaign created or sent\n"));
|
|
2457
2464
|
return;
|
|
2458
2465
|
}
|
|
2466
|
+
if (action === "alpha-plan" || action === "alpha-discover") {
|
|
2467
|
+
const clientId = flag("client-id");
|
|
2468
|
+
const clientName = flag("client-name");
|
|
2469
|
+
const offerSummary = flag("offer-summary");
|
|
2470
|
+
const icpSummary = flag("icp-summary");
|
|
2471
|
+
const idempotencyKey = flag("idempotency-key")?.trim();
|
|
2472
|
+
if (!clientId || !clientName || !offerSummary || !icpSummary || !idempotencyKey) {
|
|
2473
|
+
throw new CliInputError(`signaliz campaign-os ${action} requires --client-id, --client-name, --offer-summary, --icp-summary, and --idempotency-key`);
|
|
2474
|
+
}
|
|
2475
|
+
const params = {
|
|
2476
|
+
clientId,
|
|
2477
|
+
campaignId: flag("campaign-id"),
|
|
2478
|
+
clientName,
|
|
2479
|
+
offerSummary,
|
|
2480
|
+
icpSummary,
|
|
2481
|
+
buyerPersonas: csvFlag("buyer-personas"),
|
|
2482
|
+
knownEvidence: csvFlag("known-evidence"),
|
|
2483
|
+
preferredSources: csvFlag("preferred-sources"),
|
|
2484
|
+
idempotencyKey
|
|
2485
|
+
};
|
|
2486
|
+
if (action === "alpha-plan") {
|
|
2487
|
+
const result2 = await client.planCampaignOsAlpha(params);
|
|
2488
|
+
output(result2, () => {
|
|
2489
|
+
process.stdout.write("Signaliz Alpha plan ready \xB7 model calls 0 \xB7 web searches 0 \xB7 spend $0.00\n");
|
|
2490
|
+
process.stdout.write("Candidates will remain unvalidated until a measured sample proves them.\n");
|
|
2491
|
+
});
|
|
2492
|
+
return;
|
|
2493
|
+
}
|
|
2494
|
+
if (!hasFlag("confirm-spend")) {
|
|
2495
|
+
throw new CliInputError("signaliz campaign-os alpha-discover requires --confirm-spend for the $0.10 authorization ceiling");
|
|
2496
|
+
}
|
|
2497
|
+
const result = await client.startCampaignOsAlphaDiscovery(params);
|
|
2498
|
+
output(result, () => {
|
|
2499
|
+
const run = record(result.run);
|
|
2500
|
+
process.stdout.write(`Signaliz Alpha discovery started: ${String(run.id || "")} \xB7 ${String(run.status || "queued")} \xB7 authorized ceiling $0.10
|
|
2501
|
+
`);
|
|
2502
|
+
process.stdout.write("Output is candidate-only. Clay, audience creation, provider load, activation, queue, and send remain locked.\n");
|
|
2503
|
+
});
|
|
2504
|
+
return;
|
|
2505
|
+
}
|
|
2506
|
+
if (action === "alpha-status") {
|
|
2507
|
+
const alphaRunId = flag("alpha-run-id");
|
|
2508
|
+
if (!alphaRunId) {
|
|
2509
|
+
throw new CliInputError("signaliz campaign-os alpha-status requires --alpha-run-id <uuid>");
|
|
2510
|
+
}
|
|
2511
|
+
const result = await client.getCampaignOsAlphaRun(alphaRunId);
|
|
2512
|
+
output(result, () => {
|
|
2513
|
+
const run = record(result.run);
|
|
2514
|
+
process.stdout.write(`Signaliz Alpha run: ${String(run.status || "unknown")} \xB7 ${String(run.id || alphaRunId)}
|
|
2515
|
+
`);
|
|
2516
|
+
process.stdout.write("Completed output remains a source-cited candidate until a measured validation receipt exists.\n");
|
|
2517
|
+
});
|
|
2518
|
+
return;
|
|
2519
|
+
}
|
|
2520
|
+
if (action === "alpha-validate") {
|
|
2521
|
+
const clientId = flag("client-id");
|
|
2522
|
+
const campaignId = flag("campaign-id");
|
|
2523
|
+
const alphaRunId = flag("alpha-run-id");
|
|
2524
|
+
const candidateIndex = numberFlag("candidate-index");
|
|
2525
|
+
const sampleFile = flag("sample-file");
|
|
2526
|
+
const idempotencyKey = flag("idempotency-key")?.trim();
|
|
2527
|
+
if (!clientId || !campaignId || !alphaRunId || candidateIndex === void 0 || !sampleFile || !idempotencyKey) {
|
|
2528
|
+
throw new CliInputError("signaliz campaign-os alpha-validate requires --client-id, --campaign-id, --alpha-run-id, --candidate-index, --sample-file, and --idempotency-key");
|
|
2529
|
+
}
|
|
2530
|
+
requireIntegerInRange(candidateIndex, "--candidate-index", 0, 4);
|
|
2531
|
+
if (!hasFlag("confirm-spend")) {
|
|
2532
|
+
throw new CliInputError("signaliz campaign-os alpha-validate requires --confirm-spend for the fixed $0.25 maximum");
|
|
2533
|
+
}
|
|
2534
|
+
let sampleEntities;
|
|
2535
|
+
try {
|
|
2536
|
+
const parsed = JSON.parse((0, import_node_fs.readFileSync)(sampleFile, "utf8"));
|
|
2537
|
+
if (!Array.isArray(parsed) || parsed.length < 3 || parsed.length > 20) {
|
|
2538
|
+
throw new Error("file must contain a JSON array of 3-20 sample entities");
|
|
2539
|
+
}
|
|
2540
|
+
sampleEntities = parsed;
|
|
2541
|
+
} catch (error) {
|
|
2542
|
+
throw new CliInputError(`Unable to read --sample-file: ${error instanceof Error ? error.message : String(error)}`);
|
|
2543
|
+
}
|
|
2544
|
+
const result = await client.startCampaignOsAlphaValidation({
|
|
2545
|
+
clientId,
|
|
2546
|
+
campaignId,
|
|
2547
|
+
alphaRunId,
|
|
2548
|
+
candidateIndex,
|
|
2549
|
+
sampleEntities,
|
|
2550
|
+
idempotencyKey
|
|
2551
|
+
});
|
|
2552
|
+
output(result, () => {
|
|
2553
|
+
const run = record(result.run);
|
|
2554
|
+
process.stdout.write(`Signaliz Alpha validation started: ${String(run.id || "")} \xB7 ${String(run.status || "queued")} \xB7 maximum $0.25
|
|
2555
|
+
`);
|
|
2556
|
+
process.stdout.write("Passing status is receipt-derived. Clay and delivery providers remain locked.\n");
|
|
2557
|
+
});
|
|
2558
|
+
return;
|
|
2559
|
+
}
|
|
2560
|
+
if (action === "alpha-validation-status" || action === "alpha-apply") {
|
|
2561
|
+
const validationRunId = flag("validation-run-id");
|
|
2562
|
+
if (!validationRunId) {
|
|
2563
|
+
throw new CliInputError(`signaliz campaign-os ${action} requires --validation-run-id <uuid>`);
|
|
2564
|
+
}
|
|
2565
|
+
const result = action === "alpha-apply" ? await client.applyCampaignOsValidatedAlpha(validationRunId) : await client.getCampaignOsAlphaValidationRun(validationRunId);
|
|
2566
|
+
output(result, () => {
|
|
2567
|
+
const run = record(result.run);
|
|
2568
|
+
if (action === "alpha-apply") {
|
|
2569
|
+
process.stdout.write(`Validated Alpha applied to immutable CampaignSpec: ${String(run.applied_spec_version_id || "complete")}
|
|
2570
|
+
`);
|
|
2571
|
+
process.stdout.write("Provider load, activation, queue, and send remain locked.\n");
|
|
2572
|
+
} else {
|
|
2573
|
+
process.stdout.write(`Signaliz Alpha validation: ${String(run.status || "unknown")} \xB7 ${String(run.matched_count || 0)}/${String(run.sample_size || 0)} matched
|
|
2574
|
+
`);
|
|
2575
|
+
process.stdout.write(`Validation passed: ${run.validation_passed === true ? "yes" : "no"}
|
|
2576
|
+
`);
|
|
2577
|
+
}
|
|
2578
|
+
});
|
|
2579
|
+
return;
|
|
2580
|
+
}
|
|
2581
|
+
if (action === "connections") {
|
|
2582
|
+
const clientId = flag("client-id");
|
|
2583
|
+
if (!clientId) throw new CliInputError("signaliz campaign-os connections requires --client-id <uuid>");
|
|
2584
|
+
const result = await client.listCampaignOsConnections(clientId);
|
|
2585
|
+
output(result, () => {
|
|
2586
|
+
process.stdout.write(`${result.bindings.length} client binding(s) \xB7 ${result.source_bindings.length} exact source binding(s)
|
|
2587
|
+
`);
|
|
2588
|
+
process.stdout.write("OAuth tokens and raw provider values were not returned; no provider call occurred.\n");
|
|
2589
|
+
});
|
|
2590
|
+
return;
|
|
2591
|
+
}
|
|
2592
|
+
if (action === "source-binding" || action === "source-policy") {
|
|
2593
|
+
const clientId = flag("client-id");
|
|
2594
|
+
const bindingId = flag("binding-id");
|
|
2595
|
+
const name = flag("name");
|
|
2596
|
+
const sourceKind = flag("source-kind");
|
|
2597
|
+
const selectorFile = flag("selector-file");
|
|
2598
|
+
const idempotencyKey = flag("idempotency-key")?.trim();
|
|
2599
|
+
if (!clientId || !bindingId || !name || !sourceKind || !selectorFile || !idempotencyKey) {
|
|
2600
|
+
throw new CliInputError("signaliz campaign-os source-binding requires --client-id, --binding-id, --name, --source-kind, --selector-file, and --idempotency-key");
|
|
2601
|
+
}
|
|
2602
|
+
if (!["memory", "data", "audience", "trigger"].includes(sourceKind)) {
|
|
2603
|
+
throw new CliInputError("--source-kind must be memory, data, audience, or trigger");
|
|
2604
|
+
}
|
|
2605
|
+
let selector;
|
|
2606
|
+
try {
|
|
2607
|
+
const parsed = JSON.parse((0, import_node_fs.readFileSync)(selectorFile, "utf8"));
|
|
2608
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("file must contain one JSON object");
|
|
2609
|
+
selector = parsed;
|
|
2610
|
+
} catch (error) {
|
|
2611
|
+
throw new CliInputError(`Unable to read --selector-file: ${error instanceof Error ? error.message : String(error)}`);
|
|
2612
|
+
}
|
|
2613
|
+
const result = await client.createCampaignOsSourceBinding({
|
|
2614
|
+
clientId,
|
|
2615
|
+
bindingId,
|
|
2616
|
+
name,
|
|
2617
|
+
sourceKind,
|
|
2618
|
+
remoteObjectType: flag("remote-object-type"),
|
|
2619
|
+
remoteRef: flag("remote-ref"),
|
|
2620
|
+
selector,
|
|
2621
|
+
audienceId: flag("audience-id"),
|
|
2622
|
+
idempotencyKey
|
|
2623
|
+
});
|
|
2624
|
+
output(result, () => {
|
|
2625
|
+
const sourceBinding = record(result.source_binding);
|
|
2626
|
+
process.stdout.write(`Draft source binding: ${String(sourceBinding.name || name)} (${String(sourceBinding.id || "")})
|
|
2627
|
+
`);
|
|
2628
|
+
process.stdout.write("Provider calls: 0 \xB7 hydration: locked \xB7 realtime armed: false \xB7 send authorized: false\n");
|
|
2629
|
+
});
|
|
2630
|
+
return;
|
|
2631
|
+
}
|
|
2632
|
+
if (action === "source-preflight") {
|
|
2633
|
+
const clientId = flag("client-id");
|
|
2634
|
+
const sourceBindingId = flag("source-binding-id") || flag("source-policy-id");
|
|
2635
|
+
const idempotencyKey = flag("idempotency-key")?.trim();
|
|
2636
|
+
const maxRecords = numberFlag("max-records") ?? 25;
|
|
2637
|
+
if (!clientId || !sourceBindingId || !idempotencyKey) {
|
|
2638
|
+
throw new CliInputError("signaliz campaign-os source-preflight requires --client-id, --source-binding-id, and --idempotency-key");
|
|
2639
|
+
}
|
|
2640
|
+
requireIntegerInRange(maxRecords, "--max-records", 1, 25);
|
|
2641
|
+
const result = await client.preflightCampaignOsSourceBinding(clientId, sourceBindingId, idempotencyKey, maxRecords);
|
|
2642
|
+
output(result, () => {
|
|
2643
|
+
process.stdout.write("Source binding preflight recorded \xB7 provider calls 0 \xB7 source approval unchanged\n");
|
|
2644
|
+
});
|
|
2645
|
+
return;
|
|
2646
|
+
}
|
|
2459
2647
|
if (action === "request") {
|
|
2460
2648
|
const clientId = flag("client-id");
|
|
2461
2649
|
const actionType = flag("action");
|
|
@@ -2560,7 +2748,7 @@ async function campaignOs(args) {
|
|
|
2560
2748
|
});
|
|
2561
2749
|
return;
|
|
2562
2750
|
}
|
|
2563
|
-
throw new CliInputError("Usage: signaliz campaign-os clients|context|knowledge|provider-runtime|build|build-status|draft|refine|audience-draft|materialize-cache-audience|audience-schedule|audience-preview|compile|request|prepare-preflight|receipts");
|
|
2751
|
+
throw new CliInputError("Usage: signaliz campaign-os clients|context|knowledge|provider-runtime|build|build-status|draft|refine|audience-draft|materialize-cache-audience|audience-schedule|audience-preview|compile|alpha-plan|alpha-discover|alpha-status|alpha-validate|alpha-validation-status|alpha-apply|connections|source-binding|source-preflight|request|prepare-preflight|receipts");
|
|
2564
2752
|
}
|
|
2565
2753
|
async function main() {
|
|
2566
2754
|
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.93",
|
|
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.97"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.0.0",
|