@signaliz/sdk 1.0.3 → 1.0.5

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 CHANGED
@@ -7,6 +7,20 @@ Nango-managed customer API connections, MCP/Ops control-plane methods, and
7
7
  enrichment primitives. Available data is returned before fresh enrichment;
8
8
  live email verification is 0.02 fresh enrichment credits when a new verification is needed.
9
9
 
10
+ ## Which Surface Should I Use?
11
+
12
+ Signaliz is the GTM brain over any stack. The SDK is for application code,
13
+ scripts, and agent runtimes that need typed access to the same GTM Kernel, Ops,
14
+ integration, and approval primitives exposed through MCP and CLI.
15
+
16
+ - Use MCP or Codex when an agent should reason, choose tools, and build or audit
17
+ a campaign from a plain-English goal.
18
+ - Use the CLI when a human operator or local agent needs a repeatable command,
19
+ JSON receipt, readiness check, or debug trail. Start with `signaliz start`.
20
+ - Use the SDK when product code or automation needs typed methods.
21
+ - Use the UI as the human cockpit to inspect state, connect tools, approve gated
22
+ actions, and monitor results.
23
+
10
24
  ## Installation
11
25
 
12
26
  ```bash
@@ -74,6 +88,12 @@ const seed = await signaliz.gtm.seedBrainDefaults({
74
88
  layers: ['icp', 'lead_generation', 'copy_enrichment'],
75
89
  includeGlobal: true,
76
90
  });
91
+ console.log({
92
+ workspacePatterns: seed.seed?.evidence?.workspace_pattern_count,
93
+ networkPatterns: seed.seed?.evidence?.global_pattern_count,
94
+ activeRoutes: seed.seed?.recommended_defaults?.provider_strategy?.active_layer_routes?.length ?? 0,
95
+ privacyPolicy: seed.privacy_policy,
96
+ });
77
97
 
78
98
  const failures = await signaliz.gtm.failurePatterns({
79
99
  campaignId: campaign.campaign?.id,
@@ -111,6 +131,21 @@ const campaignLearning = await signaliz.gtm.campaignLearningStatus({
111
131
  const readyLanes = campaignLearning.learning_lanes?.filter((lane) => lane.state === 'ready') ?? [];
112
132
  const networkLane = campaignLearning.learning_lanes?.find((lane) => lane.id === 'network_patterns');
113
133
 
134
+ const memory = await signaliz.gtm.searchMemory({
135
+ query: 'subject lines that worked for SaaS engineering leaders',
136
+ outcomeType: 'meeting_booked',
137
+ targetIcp: { persona: 'Head of Engineering', segment: 'Series B SaaS' },
138
+ layers: ['copy_enrichment', 'sender'],
139
+ limit: 5,
140
+ });
141
+ const topMemory = memory.memories?.[0];
142
+ console.log({
143
+ title: topMemory?.title,
144
+ outcomeClass: Array.isArray(topMemory?.match_reasons) ? undefined : topMemory?.match_reasons?.outcome_class,
145
+ requestedOutcomeMatch: Array.isArray(topMemory?.match_reasons) ? false : topMemory?.match_reasons?.requested_outcome_match,
146
+ outcomeScore: Array.isArray(topMemory?.match_reasons) ? undefined : topMemory?.match_reasons?.outcome_score,
147
+ });
148
+
114
149
  await signaliz.gtm.createIntegrationRecipe({
115
150
  providerId: 'clay_webhook',
116
151
  providerName: 'Clay Webhook',
@@ -139,6 +174,47 @@ Smartlead, custom APIs, custom MCP servers, or manual review gates. Nango routes
139
174
  keep customer credentials in Nango while Signaliz stores only the workspace
140
175
  connection reference and approval/audit context.
141
176
 
177
+ ### Nango-Managed API Tools
178
+
179
+ Use Nango when a workspace brings its own provider account and the action should
180
+ run through Nango-managed auth. Start by listing available tools for the saved
181
+ workspace connection, dry-run the action, then confirm the write only after the
182
+ preview is approved.
183
+
184
+ ```typescript
185
+ const tools = await signaliz.gtm.listNangoTools({
186
+ workspaceConnectionId: 'workspace_conn_nango_hubspot',
187
+ providerConfigKey: 'hubspot',
188
+ includeRaw: false,
189
+ });
190
+
191
+ const preview = await signaliz.gtm.callNangoTool({
192
+ workspaceConnectionId: 'workspace_conn_nango_hubspot',
193
+ actionName: 'upsert-contact',
194
+ input: { email: 'buyer@example.com', company: 'Acme' },
195
+ dryRun: true,
196
+ confirm: false,
197
+ });
198
+
199
+ if (preview.ready_for_confirmation) {
200
+ const confirmed = await signaliz.gtm.callNangoTool({
201
+ workspaceConnectionId: 'workspace_conn_nango_hubspot',
202
+ actionName: 'upsert-contact',
203
+ input: { email: 'buyer@example.com', company: 'Acme' },
204
+ dryRun: false,
205
+ confirm: true,
206
+ async: true,
207
+ });
208
+
209
+ if (confirmed.action_id || confirmed.status_url) {
210
+ await signaliz.gtm.getNangoActionResult({
211
+ actionId: confirmed.action_id,
212
+ statusUrl: confirmed.status_url,
213
+ });
214
+ }
215
+ }
216
+ ```
217
+
142
218
  ### GTM Kernel Smoke Test
143
219
 
144
220
  After CMM imports or Campaign Builder backfills, run the read-only/dry-run
@@ -150,8 +226,9 @@ SIGNALIZ_API_KEY=sk_... node scripts/cmm-kernel-smoke.mjs \
150
226
  ```
151
227
 
152
228
  The receipt includes campaign/build/workspace IDs, execution stage, feedback and
153
- memory counts, Brain phase readiness, blockers/warnings, the next safe MCP
154
- action, and explicit no-spend/no-write/no-sender/no-delivery confirmation.
229
+ memory counts, workspace bootstrap gate readiness, Brain phase readiness,
230
+ blockers/warnings, the next safe MCP action, and explicit
231
+ no-spend/no-write/no-sender/no-delivery confirmation.
155
232
 
156
233
  ## MCP/Ops Control Plane
157
234