@signaliz/cli 1.0.82 → 1.0.84
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 +11 -2
- package/dist/bin.js +84 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @signaliz/cli
|
|
2
2
|
|
|
3
|
-
The Signaliz CLI exposes
|
|
4
|
-
Signaliz Flow through
|
|
3
|
+
The Signaliz CLI exposes the Signaliz core products, Signal Awareness,
|
|
4
|
+
Signaliz Flow, and delivered managed builds through one public contract:
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
npm install -g @signaliz/cli
|
|
@@ -19,6 +19,7 @@ signaliz auth login
|
|
|
19
19
|
# https://api.signaliz.com/functions/v1/api/v1/signal-awareness/companies/delete
|
|
20
20
|
# https://api.signaliz.com/functions/v1/api/v1/signal-awareness/companies/schedule
|
|
21
21
|
# https://api.signaliz.com/functions/v1/api/v1/flow
|
|
22
|
+
# https://api.signaliz.com/functions/v1/api/v1/managed-builds
|
|
22
23
|
# The same contracts are available under /api/v2/.
|
|
23
24
|
|
|
24
25
|
signaliz find-email --company-domain example.com --full-name "Jane Doe"
|
|
@@ -70,6 +71,14 @@ signaliz flow --signal-query "companies with recent hiring" \
|
|
|
70
71
|
signaliz flow --run-id run_... --json
|
|
71
72
|
# Keep polling the returned run ID until status is completed or failed.
|
|
72
73
|
# Flow leaves generated copy in review and never sends outreach.
|
|
74
|
+
|
|
75
|
+
# Delivered GTM Contractor builds publish their Clay budget and fixed
|
|
76
|
+
# Signaliz-credit price before each reusable run.
|
|
77
|
+
signaliz builds list
|
|
78
|
+
signaliz builds get --build-id BLD-A1B2C3D4E5F6
|
|
79
|
+
signaliz builds run --build-id BLD-A1B2C3D4E5F6 \
|
|
80
|
+
--input request.json --idempotency-key customer-run-001
|
|
81
|
+
signaliz builds status --run-id 11111111-1111-4111-8111-111111111111 --json
|
|
73
82
|
```
|
|
74
83
|
|
|
75
84
|
Use `--json` with any product command for structured output.
|
package/dist/bin.js
CHANGED
|
@@ -17,7 +17,7 @@ var CONFIG_DIR = (0, import_node_path.join)((0, import_node_os.homedir)(), ".sig
|
|
|
17
17
|
var CONFIG_FILE = (0, import_node_path.join)(CONFIG_DIR, "config.json");
|
|
18
18
|
var HELP = `Signaliz CLI
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Product commands:
|
|
21
21
|
signaliz find-email --linkedin-url https://www.linkedin.com/in/jane-doe [--no-wait]
|
|
22
22
|
signaliz find-email --company-domain example.com --full-name "Jane Doe" [--no-wait]
|
|
23
23
|
signaliz find-email --run-id run_... Resume an existing Find Email run without duplicate spend
|
|
@@ -50,6 +50,10 @@ Six product commands:
|
|
|
50
50
|
signaliz awareness schedule --domain acme.com --schedule daily|weekly|monthly
|
|
51
51
|
signaliz flow --signal-query "companies with recent hiring" --campaign-offer "..." [--limit 5] [--lookback-days 90] [--people-titles "CEO,VP Sales"]
|
|
52
52
|
signaliz flow --run-id run_... Read a durable Flow checkpoint without dispatching new work
|
|
53
|
+
signaliz builds list
|
|
54
|
+
signaliz builds get --build-id BLD-...
|
|
55
|
+
signaliz builds run --build-id BLD-... [--input request.json] [--idempotency-key <key>]
|
|
56
|
+
signaliz builds status --run-id <uuid> [--limit 100]
|
|
53
57
|
|
|
54
58
|
Access and connection:
|
|
55
59
|
signaliz auth login
|
|
@@ -1944,6 +1948,83 @@ async function awareness(args) {
|
|
|
1944
1948
|
output(result, () => process.stdout.write(`Monitor deleted: ${monitorId || domain}
|
|
1945
1949
|
`));
|
|
1946
1950
|
}
|
|
1951
|
+
function readManagedBuildInput() {
|
|
1952
|
+
const source = flag("input");
|
|
1953
|
+
if (!source) return {};
|
|
1954
|
+
let raw;
|
|
1955
|
+
try {
|
|
1956
|
+
raw = source.trim().startsWith("{") ? source.trim() : (0, import_node_fs.readFileSync)(source === "-" ? 0 : source, "utf8").trim();
|
|
1957
|
+
} catch (error) {
|
|
1958
|
+
throw new CliInputError(`Unable to read managed-build input: ${error instanceof Error ? error.message : String(error)}`);
|
|
1959
|
+
}
|
|
1960
|
+
try {
|
|
1961
|
+
const parsed = JSON.parse(raw);
|
|
1962
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("input must be one JSON object");
|
|
1963
|
+
return parsed;
|
|
1964
|
+
} catch (error) {
|
|
1965
|
+
throw new CliInputError(`Managed-build input must be valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
async function managedBuilds(args) {
|
|
1969
|
+
const action = args[0] || "list";
|
|
1970
|
+
const client = createClient();
|
|
1971
|
+
if (action === "list") {
|
|
1972
|
+
const result = await client.listManagedBuilds();
|
|
1973
|
+
output(result, () => {
|
|
1974
|
+
if (!result.builds.length) return process.stdout.write("No Final Build systems are assigned to this workspace.\n");
|
|
1975
|
+
for (const build of result.builds) {
|
|
1976
|
+
process.stdout.write(`${build.build_id} ${build.name} ${build.fixed_credits_per_run} credits/run
|
|
1977
|
+
`);
|
|
1978
|
+
}
|
|
1979
|
+
});
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
if (action === "get") {
|
|
1983
|
+
const buildId = flag("build-id");
|
|
1984
|
+
if (!buildId) throw new CliInputError("signaliz builds get requires --build-id BLD-...");
|
|
1985
|
+
const result = await client.getManagedBuild(buildId);
|
|
1986
|
+
output(result, () => {
|
|
1987
|
+
process.stdout.write(`${result.build.build_id} \u2014 ${result.build.name}
|
|
1988
|
+
`);
|
|
1989
|
+
process.stdout.write(`Fixed price: ${result.build.fixed_credits_per_run} Signaliz credits/run (${result.build.clay_credits_budget_per_run} Clay-credit budget)
|
|
1990
|
+
`);
|
|
1991
|
+
if (result.build.delivery_notes) process.stdout.write(`${result.build.delivery_notes}
|
|
1992
|
+
`);
|
|
1993
|
+
});
|
|
1994
|
+
return;
|
|
1995
|
+
}
|
|
1996
|
+
if (action === "run") {
|
|
1997
|
+
const buildId = flag("build-id");
|
|
1998
|
+
if (!buildId) throw new CliInputError("signaliz builds run requires --build-id BLD-...");
|
|
1999
|
+
const result = await client.runManagedBuild(buildId, readManagedBuildInput(), flag("idempotency-key"));
|
|
2000
|
+
output(result, () => {
|
|
2001
|
+
process.stdout.write(`Managed build queued: ${result.run.run_id}
|
|
2002
|
+
`);
|
|
2003
|
+
process.stdout.write(`Charged: ${result.run.fixed_credits_charged} Signaliz credits (${result.run.billing_status})
|
|
2004
|
+
`);
|
|
2005
|
+
process.stdout.write(`Check results: signaliz builds status --run-id ${result.run.run_id}
|
|
2006
|
+
`);
|
|
2007
|
+
});
|
|
2008
|
+
return;
|
|
2009
|
+
}
|
|
2010
|
+
if (action === "status") {
|
|
2011
|
+
const runId = flag("run-id");
|
|
2012
|
+
if (!runId) throw new CliInputError("signaliz builds status requires --run-id <uuid>");
|
|
2013
|
+
const limit = numberFlag("limit") ?? 100;
|
|
2014
|
+
requireIntegerInRange(limit, "--limit", 1, 500);
|
|
2015
|
+
const result = await client.getManagedBuildRun(runId, limit);
|
|
2016
|
+
output(result, () => {
|
|
2017
|
+
process.stdout.write(`${result.run.build_id} run ${result.run.run_id}: ${result.run.status}
|
|
2018
|
+
`);
|
|
2019
|
+
process.stdout.write(`Results returned: ${result.returned || 0}
|
|
2020
|
+
`);
|
|
2021
|
+
if (result.run.error) process.stdout.write(`Error: ${result.run.error}
|
|
2022
|
+
`);
|
|
2023
|
+
});
|
|
2024
|
+
return;
|
|
2025
|
+
}
|
|
2026
|
+
throw new CliInputError("Usage: signaliz builds list|get|run|status");
|
|
2027
|
+
}
|
|
1947
2028
|
async function main() {
|
|
1948
2029
|
const [, , command, ...args] = process.argv;
|
|
1949
2030
|
if (!command || ["help", "--help", "-h"].includes(command)) {
|
|
@@ -1967,6 +2048,8 @@ async function main() {
|
|
|
1967
2048
|
return awareness(args);
|
|
1968
2049
|
case "flow":
|
|
1969
2050
|
return flow();
|
|
2051
|
+
case "builds":
|
|
2052
|
+
return managedBuilds(args);
|
|
1970
2053
|
case "signal-to-copy":
|
|
1971
2054
|
return signalToCopy();
|
|
1972
2055
|
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
|
|
3
|
+
"version": "1.0.84",
|
|
4
|
+
"description": "Signaliz CLI for core products, Signal Awareness, Signaliz Flow, and reusable managed builds.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"signaliz": "dist/bin.js"
|
|
7
7
|
},
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsup src/bin.ts --format cjs --clean",
|
|
14
|
-
"test": "npm run build && node tests/help.test.cjs",
|
|
14
|
+
"test": "npm run build && node tests/help.test.cjs && node tests/managed-builds.test.cjs",
|
|
15
15
|
"prepublishOnly": "npm run build"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"node": ">=18"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@signaliz/sdk": "^1.0.
|
|
32
|
+
"@signaliz/sdk": "^1.0.88"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"tsup": "^8.0.0",
|