@signaliz/cli 1.0.13 → 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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/dist/bin.js +104 -9
  3. 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);
@@ -2921,15 +2979,20 @@ async function campaignAgent(sub, rest) {
2921
2979
  if (!readiness.summary?.ready) process.exitCode = 1;
2922
2980
  return output(readiness, () => printCampaignAgentReadiness(readiness));
2923
2981
  }
2924
- const plan = await agent.createPlan(request, planOptions);
2925
2982
  if (sub === "proof" || sub === "smoke") {
2926
- const result = await agent.dryRunPlan(plan, {
2983
+ const proof = typeof agent.proof === "function" ? await agent.proof(request, {
2984
+ ...planOptions,
2927
2985
  idempotencyKey: commandStringFlag(flags, "idempotency-key")
2928
- });
2929
- const proof = createCampaignAgentProofReceipt(plan, result);
2986
+ }) : await (async () => {
2987
+ const plan2 = await agent.createPlan(request, planOptions);
2988
+ return createCampaignAgentProofReceipt(plan2, await agent.dryRunPlan(plan2, {
2989
+ idempotencyKey: commandStringFlag(flags, "idempotency-key")
2990
+ }));
2991
+ })();
2930
2992
  if (!proof.success) process.exitCode = 1;
2931
2993
  return output(proof, () => printCampaignAgentProof(proof));
2932
2994
  }
2995
+ const plan = await agent.createPlan(request, planOptions);
2933
2996
  if (isCommitPlan) {
2934
2997
  const result = await agent.commitPlan(plan, {
2935
2998
  confirm: isConfirmedCommit,
@@ -3510,6 +3573,37 @@ function printCampaignAgentReadiness(readiness) {
3510
3573
  for (const action of nextActions) console.log(`- ${action}`);
3511
3574
  }
3512
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
+ }
3513
3607
  function printCampaignAgentPlan(plan) {
3514
3608
  console.log(`Plan: ${plan.campaignName || plan.goal || plan.planId}`);
3515
3609
  if (plan.planId) console.log(`Plan ID: ${plan.planId}`);
@@ -5746,18 +5840,19 @@ async function simpleJob(cmd, rest) {
5746
5840
  if (isHelpRequest(rest) || !promptArg(rest) && !flagArg("prompt") && !flagArg("brief") && !flagArg("campaign-brief")) {
5747
5841
  process.stdout.write(`signaliz build "campaign brief" [options]
5748
5842
 
5749
- Plan a campaign without spending credits or writing to providers.
5843
+ Run the campaign-agent proof path: strategy memory, Kernel plan, approvals, and
5844
+ a forced build_campaign dry-run without spend or provider writes.
5750
5845
 
5751
5846
  Examples:
5752
5847
  signaliz build "Build a campaign for industrial maintenance buyers" --target-count 50
5753
- signaliz build "Audit prior Instantly performance and build the next campaign" --preferred-providers instantly
5848
+ signaliz build "Build a strategy-template campaign for local operators" --strategy-template non-medical-home-care --use-local-leads --json
5754
5849
 
5755
5850
  Equivalent:
5756
- signaliz gtm plan "campaign brief"
5851
+ signaliz campaign-agent proof "campaign brief"
5757
5852
  `);
5758
5853
  return;
5759
5854
  }
5760
- return gtm("plan", rest);
5855
+ return campaignAgent("proof", rest);
5761
5856
  }
5762
5857
  if (cmd === "connect") {
5763
5858
  if (isHelpRequest(rest)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaliz/cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Signaliz CLI — GTM Kernel, Nango routes, MCP, and enrichment operations.",
5
5
  "bin": {
6
6
  "signaliz": "dist/bin.js"