@signaliz/cli 1.0.85 → 1.0.87
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 +23 -0
- package/dist/bin.js +161 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -197,3 +197,26 @@ signaliz mcp install
|
|
|
197
197
|
Configuration is stored in `~/.signaliz/config.json` with file mode `0600`.
|
|
198
198
|
`SIGNALIZ_API_KEY`, `SIGNALIZ_API_URL`, and `SIGNALIZ_BASE_URL` override the
|
|
199
199
|
saved configuration.
|
|
200
|
+
|
|
201
|
+
## Campaign OS agent harness
|
|
202
|
+
|
|
203
|
+
Use the same commands from Codex, Claude Code, Cursor, Devin, Grok, or a shell
|
|
204
|
+
automation. All context is bounded and all provider actions remain gated:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
signaliz campaign-os clients --status active --json
|
|
208
|
+
signaliz campaign-os context --client-id <uuid> --json
|
|
209
|
+
signaliz campaign-os provider-runtime --client-id <uuid> --provider clay --json
|
|
210
|
+
signaliz campaign-os draft --client-id <uuid> --name "Launch intent" \
|
|
211
|
+
--lane realtime --agent codex --idempotency-key launch-draft-v1 --json
|
|
212
|
+
signaliz campaign-os request --client-id <uuid> --campaign-id <uuid> \
|
|
213
|
+
--agent devin --action provider_activation --instructions "Prepare for review" --json
|
|
214
|
+
signaliz campaign-os receipts --client-id <uuid> --json
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`provider-runtime` explains the safe Clay or Instantly route, adapter source,
|
|
218
|
+
approval boundaries, and receipt semantics without returning credentials or
|
|
219
|
+
calling the provider. `draft` creates only a locked Signaliz campaign object.
|
|
220
|
+
`request` creates only an auditable review request. None of these commands
|
|
221
|
+
loads leads, activates a provider campaign, spends Clay allowance, or sends
|
|
222
|
+
email.
|
package/dist/bin.js
CHANGED
|
@@ -56,6 +56,12 @@ Product commands:
|
|
|
56
56
|
signaliz builds run --build-id BLD-... [--input request.json] --confirm-spend --max-credits <number> [--idempotency-key <key>]
|
|
57
57
|
signaliz builds status --run-id <uuid> [--limit 100]
|
|
58
58
|
signaliz builds download --run-id <uuid> --out results.csv
|
|
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 provider-runtime --client-id <uuid> --provider clay|instantly
|
|
62
|
+
signaliz campaign-os draft --client-id <uuid> --name "Campaign" [--objective "..."] [--lane one_time|always_on|realtime] [--audience-binding-id <uuid>] [--agent codex]
|
|
63
|
+
signaliz campaign-os request --client-id <uuid> [--campaign-id <uuid>] --agent codex --action build_campaign --instructions "..." [--idempotency-key <key>]
|
|
64
|
+
signaliz campaign-os receipts [--client-id <uuid>] [--campaign-id <uuid>] [--limit 50]
|
|
59
65
|
|
|
60
66
|
Access and connection:
|
|
61
67
|
signaliz auth login
|
|
@@ -2070,6 +2076,159 @@ async function managedBuilds(args) {
|
|
|
2070
2076
|
}
|
|
2071
2077
|
throw new CliInputError("Usage: signaliz builds list|get|quote|run|status|download");
|
|
2072
2078
|
}
|
|
2079
|
+
var CAMPAIGN_OS_AGENTS = /* @__PURE__ */ new Set([
|
|
2080
|
+
"codex",
|
|
2081
|
+
"claude_code",
|
|
2082
|
+
"cursor",
|
|
2083
|
+
"devin",
|
|
2084
|
+
"grok",
|
|
2085
|
+
"other"
|
|
2086
|
+
]);
|
|
2087
|
+
var CAMPAIGN_OS_ACTIONS = /* @__PURE__ */ new Set([
|
|
2088
|
+
"build_campaign",
|
|
2089
|
+
"refresh_brain",
|
|
2090
|
+
"sync_audience",
|
|
2091
|
+
"prepare_realtime_policy",
|
|
2092
|
+
"provider_load",
|
|
2093
|
+
"provider_activation",
|
|
2094
|
+
"provider_send"
|
|
2095
|
+
]);
|
|
2096
|
+
function campaignOsAgentFlag() {
|
|
2097
|
+
const value = flag("agent")?.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
2098
|
+
if (!value) return void 0;
|
|
2099
|
+
if (!CAMPAIGN_OS_AGENTS.has(value)) {
|
|
2100
|
+
throw new CliInputError("--agent must be codex, claude_code, cursor, devin, grok, or other");
|
|
2101
|
+
}
|
|
2102
|
+
return value;
|
|
2103
|
+
}
|
|
2104
|
+
async function campaignOs(args) {
|
|
2105
|
+
const action = args[0];
|
|
2106
|
+
const client = createClient();
|
|
2107
|
+
if (action === "clients") {
|
|
2108
|
+
const limit = numberFlag("limit") ?? 100;
|
|
2109
|
+
requireIntegerInRange(limit, "--limit", 1, 200);
|
|
2110
|
+
const status = flag("status");
|
|
2111
|
+
if (status && !["onboarding", "active", "paused", "archived"].includes(status)) {
|
|
2112
|
+
throw new CliInputError("--status must be onboarding, active, paused, or archived");
|
|
2113
|
+
}
|
|
2114
|
+
const result = await client.listCampaignOsClients({ query: flag("query"), status, limit });
|
|
2115
|
+
output(result, () => {
|
|
2116
|
+
process.stdout.write(`Campaign OS clients: ${result.total_returned}
|
|
2117
|
+
`);
|
|
2118
|
+
for (const item of result.clients) {
|
|
2119
|
+
process.stdout.write(`- ${item.name} (${item.status}) \xB7 Brain v${item.brain_version} \xB7 ${item.counts.sources} sources \xB7 ${item.counts.audiences} audiences \xB7 ${item.counts.campaigns} campaigns
|
|
2120
|
+
`);
|
|
2121
|
+
}
|
|
2122
|
+
});
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
if (action === "context") {
|
|
2126
|
+
const clientId = flag("client-id");
|
|
2127
|
+
if (!clientId) throw new CliInputError("signaliz campaign-os context requires --client-id <uuid>");
|
|
2128
|
+
const sourceLimit = numberFlag("source-limit") ?? 50;
|
|
2129
|
+
requireIntegerInRange(sourceLimit, "--source-limit", 1, 100);
|
|
2130
|
+
const result = await client.getCampaignOsClientContext(clientId, sourceLimit);
|
|
2131
|
+
output(result, () => {
|
|
2132
|
+
const selected = result.client;
|
|
2133
|
+
process.stdout.write(`${String(selected.name || clientId)} \xB7 Brain v${String(selected.brain_version || "?")}
|
|
2134
|
+
`);
|
|
2135
|
+
process.stdout.write(`${result.brain_sources.length} bounded sources \xB7 ${result.audiences.length} audiences \xB7 ${result.campaigns.length} campaigns \xB7 ${result.realtime_policies.length} realtime policies
|
|
2136
|
+
`);
|
|
2137
|
+
process.stdout.write("Raw source bodies and provider secrets were not returned.\n");
|
|
2138
|
+
});
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
if (action === "provider-runtime") {
|
|
2142
|
+
const clientId = flag("client-id");
|
|
2143
|
+
const provider = flag("provider");
|
|
2144
|
+
if (!clientId || !provider) {
|
|
2145
|
+
throw new CliInputError("signaliz campaign-os provider-runtime requires --client-id <uuid> --provider clay|instantly");
|
|
2146
|
+
}
|
|
2147
|
+
if (!["clay", "instantly"].includes(provider)) {
|
|
2148
|
+
throw new CliInputError("--provider must be clay or instantly");
|
|
2149
|
+
}
|
|
2150
|
+
const result = await client.getCampaignOsProviderRuntime(clientId, provider);
|
|
2151
|
+
output(result, () => {
|
|
2152
|
+
process.stdout.write(`${provider === "clay" ? "Clay" : "Instantly"} runtime for ${result.client.name}: ${result.connected ? "connected" : "not connected"}
|
|
2153
|
+
`);
|
|
2154
|
+
process.stdout.write("Provider secrets were not returned and no provider call, spend, or mutation started.\n");
|
|
2155
|
+
});
|
|
2156
|
+
return;
|
|
2157
|
+
}
|
|
2158
|
+
if (action === "draft") {
|
|
2159
|
+
const clientId = flag("client-id");
|
|
2160
|
+
const name = flag("name");
|
|
2161
|
+
if (!clientId || !name) throw new CliInputError('signaliz campaign-os draft requires --client-id <uuid> --name "Campaign"');
|
|
2162
|
+
const lane = flag("lane") || "one_time";
|
|
2163
|
+
if (!["one_time", "always_on", "realtime"].includes(lane)) {
|
|
2164
|
+
throw new CliInputError("--lane must be one_time, always_on, or realtime");
|
|
2165
|
+
}
|
|
2166
|
+
const targetCount = numberFlag("target-count");
|
|
2167
|
+
requireIntegerInRange(targetCount, "--target-count", 0, 1e7);
|
|
2168
|
+
const result = await client.createCampaignOsDraft({
|
|
2169
|
+
clientId,
|
|
2170
|
+
name,
|
|
2171
|
+
objective: flag("objective"),
|
|
2172
|
+
lane,
|
|
2173
|
+
targetCount,
|
|
2174
|
+
audienceBindingId: flag("audience-binding-id"),
|
|
2175
|
+
agentVendor: campaignOsAgentFlag(),
|
|
2176
|
+
idempotencyKey: flag("idempotency-key")
|
|
2177
|
+
});
|
|
2178
|
+
output(result, () => {
|
|
2179
|
+
const campaign = record(result.campaign);
|
|
2180
|
+
process.stdout.write(`Review-held draft created: ${String(campaign.name || name)} (${String(campaign.id || "")})
|
|
2181
|
+
`);
|
|
2182
|
+
process.stdout.write("Provider load: locked \xB7 activation: locked \xB7 send: locked\n");
|
|
2183
|
+
process.stdout.write("No Clay or Instantly mutation was performed.\n");
|
|
2184
|
+
});
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2187
|
+
if (action === "request") {
|
|
2188
|
+
const clientId = flag("client-id");
|
|
2189
|
+
const actionType = flag("action");
|
|
2190
|
+
const instructions = flag("instructions");
|
|
2191
|
+
if (!clientId || !actionType || !instructions) {
|
|
2192
|
+
throw new CliInputError('signaliz campaign-os request requires --client-id <uuid> --action <type> --instructions "..."');
|
|
2193
|
+
}
|
|
2194
|
+
if (!CAMPAIGN_OS_ACTIONS.has(actionType)) {
|
|
2195
|
+
throw new CliInputError(`--action must be one of: ${Array.from(CAMPAIGN_OS_ACTIONS).join(", ")}`);
|
|
2196
|
+
}
|
|
2197
|
+
const result = await client.submitCampaignOsActionRequest({
|
|
2198
|
+
clientId,
|
|
2199
|
+
campaignId: flag("campaign-id"),
|
|
2200
|
+
agentVendor: campaignOsAgentFlag(),
|
|
2201
|
+
actionType,
|
|
2202
|
+
instructions,
|
|
2203
|
+
idempotencyKey: flag("idempotency-key")
|
|
2204
|
+
});
|
|
2205
|
+
output(result, () => {
|
|
2206
|
+
const request = record(result.request);
|
|
2207
|
+
process.stdout.write(`Action request recorded: ${String(request.id || "")} \xB7 ${String(request.status || "review_required")}
|
|
2208
|
+
`);
|
|
2209
|
+
process.stdout.write("Execution did not start. Provider mutations require a separate Signaliz admin approval.\n");
|
|
2210
|
+
});
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
if (action === "receipts") {
|
|
2214
|
+
const limit = numberFlag("limit") ?? 50;
|
|
2215
|
+
requireIntegerInRange(limit, "--limit", 1, 200);
|
|
2216
|
+
const result = await client.listCampaignOsReceipts({
|
|
2217
|
+
clientId: flag("client-id"),
|
|
2218
|
+
campaignId: flag("campaign-id"),
|
|
2219
|
+
limit
|
|
2220
|
+
});
|
|
2221
|
+
output(result, () => {
|
|
2222
|
+
const requests = Array.isArray(result.action_requests) ? result.action_requests : [];
|
|
2223
|
+
const deliveries = Array.isArray(result.delivery_receipts) ? result.delivery_receipts : [];
|
|
2224
|
+
process.stdout.write(`${requests.length} agent request receipt(s) \xB7 ${deliveries.length} provider delivery receipt(s)
|
|
2225
|
+
`);
|
|
2226
|
+
process.stdout.write("Provider accepted and mailbox sent remain distinct states.\n");
|
|
2227
|
+
});
|
|
2228
|
+
return;
|
|
2229
|
+
}
|
|
2230
|
+
throw new CliInputError("Usage: signaliz campaign-os clients|context|provider-runtime|draft|request|receipts");
|
|
2231
|
+
}
|
|
2073
2232
|
async function main() {
|
|
2074
2233
|
const [, , command, ...args] = process.argv;
|
|
2075
2234
|
if (!command || ["help", "--help", "-h"].includes(command)) {
|
|
@@ -2095,6 +2254,8 @@ async function main() {
|
|
|
2095
2254
|
return flow();
|
|
2096
2255
|
case "builds":
|
|
2097
2256
|
return managedBuilds(args);
|
|
2257
|
+
case "campaign-os":
|
|
2258
|
+
return campaignOs(args);
|
|
2098
2259
|
case "signal-to-copy":
|
|
2099
2260
|
return signalToCopy();
|
|
2100
2261
|
case "health":
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signaliz/cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Signaliz CLI for core products, Signal Awareness, Signaliz Flow, and reusable managed builds.",
|
|
3
|
+
"version": "1.0.87",
|
|
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"
|
|
7
7
|
},
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"company-signals",
|
|
22
22
|
"signal-to-copy",
|
|
23
23
|
"signals-first",
|
|
24
|
+
"campaign-os",
|
|
24
25
|
"signal-awareness",
|
|
25
26
|
"signaliz-flow"
|
|
26
27
|
],
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"node": ">=18"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@signaliz/sdk": "^1.0.
|
|
33
|
+
"@signaliz/sdk": "^1.0.91"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"tsup": "^8.0.0",
|