@signaliz/cli 1.0.14 → 1.0.16

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 +9 -0
  2. package/dist/bin.js +184 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -65,6 +65,8 @@ 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
69
+ signaliz campaign-agent memory-kit --strategy-template non-medical-home-care --target-count 250 --use-local-leads --source agency --json
68
70
  signaliz campaign build --prompt "VP Sales at B2B SaaS, 50-500 employees" --target-count 100 --dry-run
69
71
  signaliz gtm plan "VP Sales at B2B SaaS, 50-500 employees" --target-count 100 --json > plan.json
70
72
  signaliz ops plan "Build 100 verified VP Sales leads at B2B SaaS companies"
@@ -316,6 +318,13 @@ signaliz campaign-agent init \
316
318
  --with-byo-placeholder \
317
319
  --output-file campaign-request.json
318
320
 
321
+ signaliz campaign-agent memory-kit \
322
+ --strategy-template non-medical-home-care \
323
+ --target-count 250 \
324
+ --use-local-leads \
325
+ --source agency \
326
+ --json
327
+
319
328
  signaliz campaign-agent plan \
320
329
  --goal "Build a strategy-template campaign for mature local operators" \
321
330
  --strategy-template non-medical-home-care \
package/dist/bin.js CHANGED
@@ -838,6 +838,50 @@ 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
+ }
863
+ function getCampaignBuilderMemoryKitFactory() {
864
+ let primaryError;
865
+ try {
866
+ const sdk = require("@signaliz/sdk");
867
+ if (typeof sdk.createCampaignBuilderMemoryKit === "function") {
868
+ return sdk.createCampaignBuilderMemoryKit;
869
+ }
870
+ primaryError = new Error("SDK missing createCampaignBuilderMemoryKit");
871
+ } catch (err) {
872
+ primaryError = err;
873
+ }
874
+ try {
875
+ const sdk = require((0, import_node_path.join)(__dirname, "..", "..", "sdk", "dist", "index.js"));
876
+ if (typeof sdk.createCampaignBuilderMemoryKit === "function") {
877
+ return sdk.createCampaignBuilderMemoryKit;
878
+ }
879
+ throw new Error("local SDK missing createCampaignBuilderMemoryKit");
880
+ } catch (fallbackError) {
881
+ const primaryMessage = primaryError instanceof Error ? primaryError.message : String(primaryError || "SDK missing campaign memory kit helper");
882
+ throw new Error(`Unable to load campaign memory kit helper: ${primaryMessage}; fallback failed: ${fallbackError.message}`);
883
+ }
884
+ }
841
885
  function prompt(question) {
842
886
  const rl = (0, import_node_readline.createInterface)({ input: process.stdin, output: process.stderr });
843
887
  return new Promise((resolve) => {
@@ -1064,6 +1108,10 @@ Email:
1064
1108
  Campaign Builder:
1065
1109
  campaign-agent init Emit reusable CampaignBuilderAgentRequest JSON
1066
1110
  --output-file FILE Optional request file to write
1111
+ campaign-agent kit Emit request JSON, CLI commands, MCP calls, SDK example, and BYO pattern
1112
+ --kit-file FILE Optional kit JSON file to write
1113
+ campaign-agent memory-kit
1114
+ Emit memory readiness, seed runner, MCP calls, and proof commands
1067
1115
  campaign-agent plan Compose an approval-gated strategy-template MCP flow
1068
1116
  --goal "..." Campaign goal or brief
1069
1117
  --request-file FILE Reusable JSON CampaignBuilderAgentRequest
@@ -2791,6 +2839,8 @@ var CAMPAIGN_AGENT_HELP = `signaliz campaign-agent <command> [options]
2791
2839
 
2792
2840
  Strategy-template campaign builder:
2793
2841
  init Emit reusable CampaignBuilderAgentRequest JSON
2842
+ kit Emit request JSON, CLI commands, MCP calls, SDK example, and BYO pattern
2843
+ memory-kit Emit memory readiness, seed runner, MCP calls, and proof commands
2794
2844
  plan Compose an approval-gated strategy-template MCP flow
2795
2845
  doctor Inspect built-in lanes, BYO routes, Memory, Brain, and approvals
2796
2846
  proof Prove memory, plan, approvals, and build dry-run without spend
@@ -2805,6 +2855,8 @@ Strategy-template campaign builder:
2805
2855
 
2806
2856
  Examples:
2807
2857
  signaliz campaign-agent init --strategy-template non-medical-home-care --target-count 250 --use-local-leads --json > campaign-request.json
2858
+ signaliz campaign-agent kit --strategy-template non-medical-home-care --target-count 250 --use-local-leads --json
2859
+ signaliz campaign-agent memory-kit --strategy-template non-medical-home-care --target-count 250 --use-local-leads --json
2808
2860
  signaliz campaign-agent doctor --request-file campaign-request.json --json
2809
2861
  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
2862
  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 +2871,12 @@ Examples:
2819
2871
  Plan options:
2820
2872
  --goal TEXT Campaign goal or brief
2821
2873
  --output-file FILE Write init output to a reusable request JSON file
2874
+ --kit-file FILE Write campaign-agent kit output to a JSON file
2875
+ --seed-manifest-file FILE
2876
+ Manifest path for memory-kit seed dry-runs
2877
+ --source NAME memory-kit seed source: agency, workflow-patterns, instantly-feedback, or all
2878
+ --request-output-file FILE
2879
+ Request filename to reference inside kit commands
2822
2880
  --request-file FILE Reusable JSON CampaignBuilderAgentRequest; flags override file fields
2823
2881
  --campaign-name NAME Optional campaign label
2824
2882
  --workspace-label NAME Optional workspace/account label
@@ -2871,7 +2929,7 @@ async function campaignAgent(sub, rest) {
2871
2929
  await campaignAgentReview(sub, rest);
2872
2930
  return;
2873
2931
  }
2874
- if (!["init", "template", "request-template", "new", "plan", "doctor", "readiness", "preflight", "proof", "smoke", "commit-plan", "dry-run", "build-approved", "launch-approved"].includes(sub)) {
2932
+ if (!["init", "template", "request-template", "new", "kit", "build-kit", "blueprint", "memory-kit", "seed-kit", "memory", "plan", "doctor", "readiness", "preflight", "proof", "smoke", "commit-plan", "dry-run", "build-approved", "launch-approved"].includes(sub)) {
2875
2933
  process.stdout.write(CAMPAIGN_AGENT_HELP);
2876
2934
  return;
2877
2935
  }
@@ -2888,6 +2946,67 @@ async function campaignAgent(sub, rest) {
2888
2946
  console.log(`Next: signaliz campaign-agent plan --request-file ${outputFile} --json`);
2889
2947
  return;
2890
2948
  }
2949
+ if (["kit", "build-kit", "blueprint"].includes(sub)) {
2950
+ const requestFromFile2 = campaignAgentRequestFileFromFlags(flags);
2951
+ const goal2 = commandStringFlag(flags, "goal", "brief") || promptArg(rest) || campaignAgentStringValue(requestFromFile2?.goal) || "Build a strategy-template campaign for mature operators in the target ICP.";
2952
+ const request2 = requestFromFile2 ? mergeCampaignAgentRequests(
2953
+ requestFromFile2,
2954
+ campaignAgentRequestFromFlags(goal2, flags, { includeDefaults: false })
2955
+ ) : campaignAgentRequestTemplateFromFlags(flags, rest);
2956
+ const createBuildKit = getCampaignBuilderBuildKitFactory();
2957
+ const kit = createBuildKit({
2958
+ ...request2,
2959
+ includeLocalLeads: commandBooleanFlag(flags, "use-local-leads"),
2960
+ includeCustomToolPlaceholder: commandBooleanFlag(flags, "with-byo-placeholder") || commandBooleanFlag(flags, "include-custom-tool-placeholder") || commandBooleanFlag(flags, "include-byo-placeholder"),
2961
+ includeNango: !commandBooleanFlag(flags, "no-nango-catalog"),
2962
+ requestFile: commandStringFlag(flags, "request-output-file", "request-file-name") || commandStringFlag(flags, "request-file") || "campaign-request.json",
2963
+ cliPackage: commandStringFlag(flags, "cli-package"),
2964
+ sdkPackage: commandStringFlag(flags, "sdk-package")
2965
+ });
2966
+ const outputFile = commandStringFlag(flags, "kit-file", "output-file", "out");
2967
+ if (outputFile) {
2968
+ (0, import_node_fs.writeFileSync)(outputFile, `${JSON.stringify(kit, null, 2)}
2969
+ `, "utf8");
2970
+ }
2971
+ if (!outputFile || jsonMode()) return output(kit, () => printCampaignAgentBuildKit(kit));
2972
+ console.log(`Campaign build kit written: ${outputFile}`);
2973
+ const commands = firstArray(kit.cli_commands);
2974
+ const proof = commands.find((command) => command.id === "proof_shortcut");
2975
+ if (proof?.command) console.log(`Next: ${proof.command}`);
2976
+ return;
2977
+ }
2978
+ if (["memory-kit", "seed-kit", "memory"].includes(sub)) {
2979
+ const requestFromFile2 = campaignAgentRequestFileFromFlags(flags);
2980
+ const goal2 = commandStringFlag(flags, "goal", "brief") || promptArg(rest) || campaignAgentStringValue(requestFromFile2?.goal) || "Build a strategy-template campaign for mature operators in the target ICP.";
2981
+ const request2 = requestFromFile2 ? mergeCampaignAgentRequests(
2982
+ requestFromFile2,
2983
+ campaignAgentRequestFromFlags(goal2, flags, { includeDefaults: false })
2984
+ ) : campaignAgentRequestTemplateFromFlags(flags, rest);
2985
+ const createMemoryKit = getCampaignBuilderMemoryKitFactory();
2986
+ const kit = createMemoryKit({
2987
+ ...request2,
2988
+ includeLocalLeads: commandBooleanFlag(flags, "use-local-leads"),
2989
+ includeCustomToolPlaceholder: commandBooleanFlag(flags, "with-byo-placeholder") || commandBooleanFlag(flags, "include-custom-tool-placeholder") || commandBooleanFlag(flags, "include-byo-placeholder"),
2990
+ includeNango: !commandBooleanFlag(flags, "no-nango-catalog"),
2991
+ requestFile: commandStringFlag(flags, "request-output-file", "request-file-name") || commandStringFlag(flags, "request-file") || "campaign-request.json",
2992
+ seedManifestFile: commandStringFlag(flags, "seed-manifest-file", "manifest") || ".gtm-kernel-import-state/campaign-memory-dry-run.json",
2993
+ source: commandStringFlag(flags, "source", "memory-source", "seed-source"),
2994
+ workspaceId: commandStringFlag(flags, "workspace-id"),
2995
+ cliPackage: commandStringFlag(flags, "cli-package"),
2996
+ sdkPackage: commandStringFlag(flags, "sdk-package")
2997
+ });
2998
+ const outputFile = commandStringFlag(flags, "kit-file", "output-file", "out");
2999
+ if (outputFile) {
3000
+ (0, import_node_fs.writeFileSync)(outputFile, `${JSON.stringify(kit, null, 2)}
3001
+ `, "utf8");
3002
+ }
3003
+ if (!outputFile || jsonMode()) return output(kit, () => printCampaignAgentMemoryKit(kit));
3004
+ console.log(`Campaign memory kit written: ${outputFile}`);
3005
+ const commands = firstArray(kit.cli_commands);
3006
+ const status = commands.find((command) => command.id === "memory_status");
3007
+ if (status?.command) console.log(`Next: ${status.command}`);
3008
+ return;
3009
+ }
2891
3010
  const requestFromFile = campaignAgentRequestFileFromFlags(flags);
2892
3011
  const isDoctor = sub === "doctor" || sub === "readiness" || sub === "preflight";
2893
3012
  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 +3634,70 @@ function printCampaignAgentReadiness(readiness) {
3515
3634
  for (const action of nextActions) console.log(`- ${action}`);
3516
3635
  }
3517
3636
  }
3637
+ function printCampaignAgentBuildKit(kit) {
3638
+ console.log(`Campaign build kit: ${kit.strategy_template || "custom strategy"}`);
3639
+ if (kit.request_file) console.log(`Request file: ${kit.request_file}`);
3640
+ console.log(`Built-ins: ${firstArray(kit.built_in_lanes).join(", ") || "none"}`);
3641
+ console.log(`Playbooks: ${firstArray(kit.operating_playbooks).join(", ") || "none"}`);
3642
+ console.log(`BYO routes: ${firstArray(kit.custom_routes).length}`);
3643
+ const commands = firstArray(kit.cli_commands);
3644
+ if (commands.length) {
3645
+ console.log("\nCLI:");
3646
+ for (const command of commands.slice(0, 4)) {
3647
+ console.log(`- ${command.label || command.id}: ${command.command}`);
3648
+ }
3649
+ }
3650
+ const calls = firstArray(kit.mcp_calls);
3651
+ if (calls.length) {
3652
+ console.log("\nMCP:");
3653
+ for (const call of calls.slice(0, 3)) {
3654
+ console.log(`- ${call.tool}: ${call.safety}`);
3655
+ }
3656
+ }
3657
+ const byo = record(kit.byo_tool_pattern);
3658
+ if (byo.cli_flag) {
3659
+ console.log("\nBYO tool pattern:");
3660
+ console.log(`- ${byo.cli_flag}`);
3661
+ }
3662
+ const nextActions = firstArray(kit.next_actions);
3663
+ if (nextActions.length) {
3664
+ console.log("\nNext:");
3665
+ for (const action of nextActions.slice(0, 4)) console.log(`- ${action}`);
3666
+ }
3667
+ }
3668
+ function printCampaignAgentMemoryKit(kit) {
3669
+ console.log(`Campaign memory kit: ${kit.strategy_template || "custom strategy"}`);
3670
+ if (kit.request_file) console.log(`Request file: ${kit.request_file}`);
3671
+ if (kit.seed_manifest_file) console.log(`Seed manifest: ${kit.seed_manifest_file}`);
3672
+ const sources = firstArray(kit.memory_sources);
3673
+ console.log(`Sources: ${sources.map((source) => source.id || source.seed_source).filter(Boolean).join(", ") || "none"}`);
3674
+ console.log(`Playbooks: ${firstArray(kit.operating_playbooks).join(", ") || "none"}`);
3675
+ const commands = firstArray(kit.cli_commands);
3676
+ if (commands.length) {
3677
+ console.log("\nCLI:");
3678
+ for (const command of commands.slice(0, 4)) {
3679
+ console.log(`- ${command.label || command.id}: ${command.command}`);
3680
+ }
3681
+ }
3682
+ const calls = firstArray(kit.mcp_calls);
3683
+ if (calls.length) {
3684
+ console.log("\nMCP:");
3685
+ for (const call of calls.slice(0, 3)) {
3686
+ console.log(`- ${call.tool}: ${call.safety}`);
3687
+ }
3688
+ }
3689
+ const seedRunner = record(kit.seed_runner);
3690
+ if (seedRunner.dry_run_command) {
3691
+ console.log("\nSeed runner:");
3692
+ console.log(`- Dry run: ${seedRunner.dry_run_command}`);
3693
+ if (seedRunner.verify_manifest_command) console.log(`- Verify: ${seedRunner.verify_manifest_command}`);
3694
+ }
3695
+ const nextActions = firstArray(kit.next_actions);
3696
+ if (nextActions.length) {
3697
+ console.log("\nNext:");
3698
+ for (const action of nextActions.slice(0, 4)) console.log(`- ${action}`);
3699
+ }
3700
+ }
3518
3701
  function printCampaignAgentPlan(plan) {
3519
3702
  console.log(`Plan: ${plan.campaignName || plan.goal || plan.planId}`);
3520
3703
  if (plan.planId) console.log(`Plan ID: ${plan.planId}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaliz/cli",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Signaliz CLI — GTM Kernel, Nango routes, MCP, and enrichment operations.",
5
5
  "bin": {
6
6
  "signaliz": "dist/bin.js"