@signaliz/cli 1.0.14 → 1.0.15
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 +1 -0
- package/dist/bin.js +90 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ signaliz auth login
|
|
|
65
65
|
signaliz start
|
|
66
66
|
|
|
67
67
|
# 3. Plan something. Pick the surface that matches the job.
|
|
68
|
+
signaliz campaign-agent kit --strategy-template non-medical-home-care --target-count 250 --use-local-leads --json
|
|
68
69
|
signaliz campaign build --prompt "VP Sales at B2B SaaS, 50-500 employees" --target-count 100 --dry-run
|
|
69
70
|
signaliz gtm plan "VP Sales at B2B SaaS, 50-500 employees" --target-count 100 --json > plan.json
|
|
70
71
|
signaliz ops plan "Build 100 verified VP Sales leads at B2B SaaS companies"
|
package/dist/bin.js
CHANGED
|
@@ -838,6 +838,28 @@ function getSdk() {
|
|
|
838
838
|
throw new Error(`Unable to load a compatible @signaliz/sdk: ${primaryMessage}; fallback failed: ${fallbackError.message}`);
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
+
function getCampaignBuilderBuildKitFactory() {
|
|
842
|
+
let primaryError;
|
|
843
|
+
try {
|
|
844
|
+
const sdk = require("@signaliz/sdk");
|
|
845
|
+
if (typeof sdk.createCampaignBuilderBuildKit === "function") {
|
|
846
|
+
return sdk.createCampaignBuilderBuildKit;
|
|
847
|
+
}
|
|
848
|
+
primaryError = new Error("SDK missing createCampaignBuilderBuildKit");
|
|
849
|
+
} catch (err) {
|
|
850
|
+
primaryError = err;
|
|
851
|
+
}
|
|
852
|
+
try {
|
|
853
|
+
const sdk = require((0, import_node_path.join)(__dirname, "..", "..", "sdk", "dist", "index.js"));
|
|
854
|
+
if (typeof sdk.createCampaignBuilderBuildKit === "function") {
|
|
855
|
+
return sdk.createCampaignBuilderBuildKit;
|
|
856
|
+
}
|
|
857
|
+
throw new Error("local SDK missing createCampaignBuilderBuildKit");
|
|
858
|
+
} catch (fallbackError) {
|
|
859
|
+
const primaryMessage = primaryError instanceof Error ? primaryError.message : String(primaryError || "SDK missing campaign build kit helper");
|
|
860
|
+
throw new Error(`Unable to load campaign build kit helper: ${primaryMessage}; fallback failed: ${fallbackError.message}`);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
841
863
|
function prompt(question) {
|
|
842
864
|
const rl = (0, import_node_readline.createInterface)({ input: process.stdin, output: process.stderr });
|
|
843
865
|
return new Promise((resolve) => {
|
|
@@ -1064,6 +1086,8 @@ Email:
|
|
|
1064
1086
|
Campaign Builder:
|
|
1065
1087
|
campaign-agent init Emit reusable CampaignBuilderAgentRequest JSON
|
|
1066
1088
|
--output-file FILE Optional request file to write
|
|
1089
|
+
campaign-agent kit Emit request JSON, CLI commands, MCP calls, SDK example, and BYO pattern
|
|
1090
|
+
--kit-file FILE Optional kit JSON file to write
|
|
1067
1091
|
campaign-agent plan Compose an approval-gated strategy-template MCP flow
|
|
1068
1092
|
--goal "..." Campaign goal or brief
|
|
1069
1093
|
--request-file FILE Reusable JSON CampaignBuilderAgentRequest
|
|
@@ -2791,6 +2815,7 @@ var CAMPAIGN_AGENT_HELP = `signaliz campaign-agent <command> [options]
|
|
|
2791
2815
|
|
|
2792
2816
|
Strategy-template campaign builder:
|
|
2793
2817
|
init Emit reusable CampaignBuilderAgentRequest JSON
|
|
2818
|
+
kit Emit request JSON, CLI commands, MCP calls, SDK example, and BYO pattern
|
|
2794
2819
|
plan Compose an approval-gated strategy-template MCP flow
|
|
2795
2820
|
doctor Inspect built-in lanes, BYO routes, Memory, Brain, and approvals
|
|
2796
2821
|
proof Prove memory, plan, approvals, and build dry-run without spend
|
|
@@ -2805,6 +2830,7 @@ Strategy-template campaign builder:
|
|
|
2805
2830
|
|
|
2806
2831
|
Examples:
|
|
2807
2832
|
signaliz campaign-agent init --strategy-template non-medical-home-care --target-count 250 --use-local-leads --json > campaign-request.json
|
|
2833
|
+
signaliz campaign-agent kit --strategy-template non-medical-home-care --target-count 250 --use-local-leads --json
|
|
2808
2834
|
signaliz campaign-agent doctor --request-file campaign-request.json --json
|
|
2809
2835
|
signaliz campaign-agent plan --goal "Build a strategy-template campaign for my ICP" --strategy-template non-medical-home-care --target-count 500 --builtins lead_generation,email_finding,email_verification,signals
|
|
2810
2836
|
signaliz campaign-agent proof --goal "Build a strategy-template campaign for my ICP" --strategy-template non-medical-home-care --target-count 100 --json
|
|
@@ -2819,6 +2845,9 @@ Examples:
|
|
|
2819
2845
|
Plan options:
|
|
2820
2846
|
--goal TEXT Campaign goal or brief
|
|
2821
2847
|
--output-file FILE Write init output to a reusable request JSON file
|
|
2848
|
+
--kit-file FILE Write campaign-agent kit output to a JSON file
|
|
2849
|
+
--request-output-file FILE
|
|
2850
|
+
Request filename to reference inside kit commands
|
|
2822
2851
|
--request-file FILE Reusable JSON CampaignBuilderAgentRequest; flags override file fields
|
|
2823
2852
|
--campaign-name NAME Optional campaign label
|
|
2824
2853
|
--workspace-label NAME Optional workspace/account label
|
|
@@ -2871,7 +2900,7 @@ async function campaignAgent(sub, rest) {
|
|
|
2871
2900
|
await campaignAgentReview(sub, rest);
|
|
2872
2901
|
return;
|
|
2873
2902
|
}
|
|
2874
|
-
if (!["init", "template", "request-template", "new", "plan", "doctor", "readiness", "preflight", "proof", "smoke", "commit-plan", "dry-run", "build-approved", "launch-approved"].includes(sub)) {
|
|
2903
|
+
if (!["init", "template", "request-template", "new", "kit", "build-kit", "blueprint", "plan", "doctor", "readiness", "preflight", "proof", "smoke", "commit-plan", "dry-run", "build-approved", "launch-approved"].includes(sub)) {
|
|
2875
2904
|
process.stdout.write(CAMPAIGN_AGENT_HELP);
|
|
2876
2905
|
return;
|
|
2877
2906
|
}
|
|
@@ -2888,6 +2917,35 @@ async function campaignAgent(sub, rest) {
|
|
|
2888
2917
|
console.log(`Next: signaliz campaign-agent plan --request-file ${outputFile} --json`);
|
|
2889
2918
|
return;
|
|
2890
2919
|
}
|
|
2920
|
+
if (["kit", "build-kit", "blueprint"].includes(sub)) {
|
|
2921
|
+
const requestFromFile2 = campaignAgentRequestFileFromFlags(flags);
|
|
2922
|
+
const goal2 = commandStringFlag(flags, "goal", "brief") || promptArg(rest) || campaignAgentStringValue(requestFromFile2?.goal) || "Build a strategy-template campaign for mature operators in the target ICP.";
|
|
2923
|
+
const request2 = requestFromFile2 ? mergeCampaignAgentRequests(
|
|
2924
|
+
requestFromFile2,
|
|
2925
|
+
campaignAgentRequestFromFlags(goal2, flags, { includeDefaults: false })
|
|
2926
|
+
) : campaignAgentRequestTemplateFromFlags(flags, rest);
|
|
2927
|
+
const createBuildKit = getCampaignBuilderBuildKitFactory();
|
|
2928
|
+
const kit = createBuildKit({
|
|
2929
|
+
...request2,
|
|
2930
|
+
includeLocalLeads: commandBooleanFlag(flags, "use-local-leads"),
|
|
2931
|
+
includeCustomToolPlaceholder: commandBooleanFlag(flags, "with-byo-placeholder") || commandBooleanFlag(flags, "include-custom-tool-placeholder") || commandBooleanFlag(flags, "include-byo-placeholder"),
|
|
2932
|
+
includeNango: !commandBooleanFlag(flags, "no-nango-catalog"),
|
|
2933
|
+
requestFile: commandStringFlag(flags, "request-output-file", "request-file-name") || commandStringFlag(flags, "request-file") || "campaign-request.json",
|
|
2934
|
+
cliPackage: commandStringFlag(flags, "cli-package"),
|
|
2935
|
+
sdkPackage: commandStringFlag(flags, "sdk-package")
|
|
2936
|
+
});
|
|
2937
|
+
const outputFile = commandStringFlag(flags, "kit-file", "output-file", "out");
|
|
2938
|
+
if (outputFile) {
|
|
2939
|
+
(0, import_node_fs.writeFileSync)(outputFile, `${JSON.stringify(kit, null, 2)}
|
|
2940
|
+
`, "utf8");
|
|
2941
|
+
}
|
|
2942
|
+
if (!outputFile || jsonMode()) return output(kit, () => printCampaignAgentBuildKit(kit));
|
|
2943
|
+
console.log(`Campaign build kit written: ${outputFile}`);
|
|
2944
|
+
const commands = firstArray(kit.cli_commands);
|
|
2945
|
+
const proof = commands.find((command) => command.id === "proof_shortcut");
|
|
2946
|
+
if (proof?.command) console.log(`Next: ${proof.command}`);
|
|
2947
|
+
return;
|
|
2948
|
+
}
|
|
2891
2949
|
const requestFromFile = campaignAgentRequestFileFromFlags(flags);
|
|
2892
2950
|
const isDoctor = sub === "doctor" || sub === "readiness" || sub === "preflight";
|
|
2893
2951
|
const goal = commandStringFlag(flags, "goal", "brief") || promptArg(rest) || campaignAgentStringValue(requestFromFile?.goal) || (isDoctor ? "Build a strategy-template campaign for the target ICP." : void 0);
|
|
@@ -3515,6 +3573,37 @@ function printCampaignAgentReadiness(readiness) {
|
|
|
3515
3573
|
for (const action of nextActions) console.log(`- ${action}`);
|
|
3516
3574
|
}
|
|
3517
3575
|
}
|
|
3576
|
+
function printCampaignAgentBuildKit(kit) {
|
|
3577
|
+
console.log(`Campaign build kit: ${kit.strategy_template || "custom strategy"}`);
|
|
3578
|
+
if (kit.request_file) console.log(`Request file: ${kit.request_file}`);
|
|
3579
|
+
console.log(`Built-ins: ${firstArray(kit.built_in_lanes).join(", ") || "none"}`);
|
|
3580
|
+
console.log(`Playbooks: ${firstArray(kit.operating_playbooks).join(", ") || "none"}`);
|
|
3581
|
+
console.log(`BYO routes: ${firstArray(kit.custom_routes).length}`);
|
|
3582
|
+
const commands = firstArray(kit.cli_commands);
|
|
3583
|
+
if (commands.length) {
|
|
3584
|
+
console.log("\nCLI:");
|
|
3585
|
+
for (const command of commands.slice(0, 4)) {
|
|
3586
|
+
console.log(`- ${command.label || command.id}: ${command.command}`);
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
const calls = firstArray(kit.mcp_calls);
|
|
3590
|
+
if (calls.length) {
|
|
3591
|
+
console.log("\nMCP:");
|
|
3592
|
+
for (const call of calls.slice(0, 3)) {
|
|
3593
|
+
console.log(`- ${call.tool}: ${call.safety}`);
|
|
3594
|
+
}
|
|
3595
|
+
}
|
|
3596
|
+
const byo = record(kit.byo_tool_pattern);
|
|
3597
|
+
if (byo.cli_flag) {
|
|
3598
|
+
console.log("\nBYO tool pattern:");
|
|
3599
|
+
console.log(`- ${byo.cli_flag}`);
|
|
3600
|
+
}
|
|
3601
|
+
const nextActions = firstArray(kit.next_actions);
|
|
3602
|
+
if (nextActions.length) {
|
|
3603
|
+
console.log("\nNext:");
|
|
3604
|
+
for (const action of nextActions.slice(0, 4)) console.log(`- ${action}`);
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3518
3607
|
function printCampaignAgentPlan(plan) {
|
|
3519
3608
|
console.log(`Plan: ${plan.campaignName || plan.goal || plan.planId}`);
|
|
3520
3609
|
if (plan.planId) console.log(`Plan ID: ${plan.planId}`);
|