deepline 0.1.26 → 0.1.28
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 +6 -1
- package/dist/cli/index.js +171 -47
- package/dist/cli/index.mjs +169 -45
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +360 -41
- package/dist/repo/apps/play-runner-workers/src/entry.ts +101 -42
- package/dist/repo/sdk/src/plays/harness-stub.ts +2 -20
- package/dist/repo/sdk/src/version.ts +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -243,7 +243,7 @@ function saveProjectDeeplineEnvValues(baseUrl, values, startDir = projectEnvStar
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
// src/version.ts
|
|
246
|
-
var SDK_VERSION = "0.1.
|
|
246
|
+
var SDK_VERSION = "0.1.28";
|
|
247
247
|
var SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
248
248
|
|
|
249
249
|
// ../shared_libs/play-runtime/coordinator-headers.ts
|
|
@@ -525,7 +525,7 @@ function decodeSseFrame(frame) {
|
|
|
525
525
|
return parsed;
|
|
526
526
|
}
|
|
527
527
|
function sleep(ms) {
|
|
528
|
-
return new Promise((
|
|
528
|
+
return new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
// src/client.ts
|
|
@@ -533,7 +533,7 @@ var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "ca
|
|
|
533
533
|
var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
|
|
534
534
|
var COMPILE_MANIFEST_RETRY_DELAYS_MS = [250, 1e3];
|
|
535
535
|
function sleep2(ms) {
|
|
536
|
-
return new Promise((
|
|
536
|
+
return new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
537
537
|
}
|
|
538
538
|
function isTransientCompileManifestError(error) {
|
|
539
539
|
if (error instanceof DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -691,7 +691,7 @@ var DeeplineClient = class {
|
|
|
691
691
|
play.outputSchema,
|
|
692
692
|
"rowOutputSchema"
|
|
693
693
|
);
|
|
694
|
-
const
|
|
694
|
+
const runCommand2 = this.playRunCommand(play, { csvInput });
|
|
695
695
|
return {
|
|
696
696
|
name: play.name,
|
|
697
697
|
...play.reference ? { reference: play.reference } : {},
|
|
@@ -705,8 +705,8 @@ var DeeplineClient = class {
|
|
|
705
705
|
outputSchema: options?.compact ? this.compactSchema(play.outputSchema) : play.outputSchema ?? null,
|
|
706
706
|
...csvInput ? { csvInput } : {},
|
|
707
707
|
...rowOutputSchema ? { rowOutputSchema } : {},
|
|
708
|
-
runCommand,
|
|
709
|
-
examples: [
|
|
708
|
+
runCommand: runCommand2,
|
|
709
|
+
examples: [runCommand2],
|
|
710
710
|
currentPublishedVersion: play.currentPublishedVersion ?? null,
|
|
711
711
|
isDraftDirty: play.isDraftDirty
|
|
712
712
|
};
|
|
@@ -2023,7 +2023,7 @@ function buildCandidateUrls2(url) {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
2025
|
function sleep3(ms) {
|
|
2026
|
-
return new Promise((
|
|
2026
|
+
return new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
2027
2027
|
}
|
|
2028
2028
|
function printDeeplineLogo() {
|
|
2029
2029
|
if (process.stdout.isTTY && (process.stdout.columns ?? 80) >= 70) {
|
|
@@ -6464,7 +6464,7 @@ function writeStartedPlayRun(input) {
|
|
|
6464
6464
|
console.log(output);
|
|
6465
6465
|
}
|
|
6466
6466
|
function parsePlayRunOptions(args) {
|
|
6467
|
-
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--live|--latest|--revision-id <id>] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--<input> value]\nRun `deepline plays run --help` for idempotency, tool call id, and ctx.map guidance.";
|
|
6467
|
+
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--live|--latest|--revision-id <id>] [--watch] [--out output.csv] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--<input> value]\n Unknown --<input> value flags, such as --csv leads.csv or --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotency, tool call id, and ctx.map guidance.";
|
|
6468
6468
|
let filePath = null;
|
|
6469
6469
|
let playName = null;
|
|
6470
6470
|
let input = null;
|
|
@@ -7676,7 +7676,9 @@ Examples:
|
|
|
7676
7676
|
Notes:
|
|
7677
7677
|
Local files are bundled, preflighted, then run in Deepline cloud.
|
|
7678
7678
|
Named plays run the live saved revision.
|
|
7679
|
-
Unknown --foo and --foo.bar flags are
|
|
7679
|
+
Unknown --foo value and --foo.bar value flags are passed into play input.
|
|
7680
|
+
Example: --csv leads.csv becomes input.csv = "leads.csv"; --limit 5 becomes
|
|
7681
|
+
input.limit = 5.
|
|
7680
7682
|
File args accept local paths; the CLI stages files before submit.
|
|
7681
7683
|
--watch prints logs, previews, stats, and next commands.
|
|
7682
7684
|
--wait is accepted as a compatibility alias for --watch.
|
|
@@ -7723,7 +7725,15 @@ Examples:
|
|
|
7723
7725
|
).option("--watch", "Stream logs until completion").option("--wait", "Alias for --watch; stream logs until completion").option(
|
|
7724
7726
|
"--logs",
|
|
7725
7727
|
"When output is non-interactive, stream play logs to stderr while waiting"
|
|
7726
|
-
).option("--tail-timeout-ms <ms>", "Timeout while watching the run stream").option("--force", "Supersede any active runs for this play").option("--no-open", "Print the play page URL without opening a browser").option("--json", "Emit JSON output").
|
|
7728
|
+
).option("--tail-timeout-ms <ms>", "Timeout while watching the run stream").option("--force", "Supersede any active runs for this play").option("--no-open", "Print the play page URL without opening a browser").option("--json", "Emit JSON output").addHelpText(
|
|
7729
|
+
"afterAll",
|
|
7730
|
+
`
|
|
7731
|
+
Pass-through input flags:
|
|
7732
|
+
Unknown flags are accepted intentionally and become play input fields. Use
|
|
7733
|
+
this for play-specific inputs like --csv leads.csv, --limit 5, or
|
|
7734
|
+
--filters.title "GTM Engineer".
|
|
7735
|
+
`
|
|
7736
|
+
).action(async (target, options, command) => {
|
|
7727
7737
|
const passthroughArgs = [...command.args];
|
|
7728
7738
|
const explicitTarget = options.file || options.name;
|
|
7729
7739
|
const targetIsInputFlag = typeof target === "string" && target.startsWith("--");
|
|
@@ -8186,7 +8196,7 @@ function toListedTool(tool) {
|
|
|
8186
8196
|
...tool,
|
|
8187
8197
|
id: tool.toolId,
|
|
8188
8198
|
type: "tool",
|
|
8189
|
-
|
|
8199
|
+
executeCommand: `deepline tools execute ${tool.toolId}`
|
|
8190
8200
|
};
|
|
8191
8201
|
}
|
|
8192
8202
|
async function listTools(args) {
|
|
@@ -8259,7 +8269,7 @@ Inspect its schema with: deepline plays describe ${playName} --json`
|
|
|
8259
8269
|
);
|
|
8260
8270
|
}
|
|
8261
8271
|
function registerToolsCommands(program) {
|
|
8262
|
-
const tools = program.command("tools").description("Search, describe, and
|
|
8272
|
+
const tools = program.command("tools").description("Search, describe, and execute atomic provider tools.").addHelpText(
|
|
8263
8273
|
"after",
|
|
8264
8274
|
`
|
|
8265
8275
|
Concepts:
|
|
@@ -8269,11 +8279,11 @@ Concepts:
|
|
|
8269
8279
|
Common commands:
|
|
8270
8280
|
deepline tools search email --json
|
|
8271
8281
|
deepline tools describe hunter_email_verifier --json
|
|
8272
|
-
deepline tools
|
|
8282
|
+
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
8273
8283
|
|
|
8274
8284
|
Output:
|
|
8275
|
-
|
|
8276
|
-
|
|
8285
|
+
Use describe for tool contracts. get is accepted as a compatibility alias.
|
|
8286
|
+
Use execute to run a tool. run is accepted as a compatibility alias.
|
|
8277
8287
|
`
|
|
8278
8288
|
);
|
|
8279
8289
|
tools.command("list").description("List available tools.").addHelpText(
|
|
@@ -8298,7 +8308,7 @@ Examples:
|
|
|
8298
8308
|
`
|
|
8299
8309
|
Notes:
|
|
8300
8310
|
Ranked discovery for atomic provider/API operations. Results include tool ids
|
|
8301
|
-
that can be passed to deepline tools describe or deepline tools
|
|
8311
|
+
that can be passed to deepline tools describe or deepline tools execute.
|
|
8302
8312
|
|
|
8303
8313
|
Examples:
|
|
8304
8314
|
deepline tools search email
|
|
@@ -8314,18 +8324,18 @@ Examples:
|
|
|
8314
8324
|
includeSearchDebug: Boolean(options.includeSearchDebug)
|
|
8315
8325
|
});
|
|
8316
8326
|
});
|
|
8317
|
-
const addToolMetadataCommand = (command
|
|
8327
|
+
const addToolMetadataCommand = (command) => command.description("Show metadata for a tool.").addHelpText(
|
|
8318
8328
|
"after",
|
|
8319
8329
|
`
|
|
8320
8330
|
Notes:
|
|
8321
8331
|
Shows the tool contract, input schema, output schema, Deepline cost, aliases,
|
|
8322
|
-
and metadata. describe is the preferred discovery verb
|
|
8323
|
-
compatibility
|
|
8332
|
+
and metadata. describe is the preferred discovery verb. get is kept as a
|
|
8333
|
+
compatibility alias for the same metadata surface.
|
|
8324
8334
|
|
|
8325
8335
|
Examples:
|
|
8326
|
-
deepline tools
|
|
8327
|
-
deepline tools
|
|
8328
|
-
deepline tools
|
|
8336
|
+
deepline tools describe hunter_email_verifier
|
|
8337
|
+
deepline tools describe hunter_email_verifier --json | jq '.inputSchema'
|
|
8338
|
+
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
8329
8339
|
`
|
|
8330
8340
|
).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (toolId, options) => {
|
|
8331
8341
|
process.exitCode = await getTool([
|
|
@@ -8333,21 +8343,21 @@ Examples:
|
|
|
8333
8343
|
...options.json ? ["--json"] : []
|
|
8334
8344
|
]);
|
|
8335
8345
|
});
|
|
8336
|
-
addToolMetadataCommand(tools.command("describe <toolId>")
|
|
8337
|
-
|
|
8338
|
-
tools.command("call <toolId>").alias("execute").alias("run").description("Execute a tool by id.").addHelpText(
|
|
8346
|
+
addToolMetadataCommand(tools.command("describe <toolId>").alias("get"));
|
|
8347
|
+
tools.command("execute <toolId>").alias("run").description("Execute a tool by id.").addHelpText(
|
|
8339
8348
|
"after",
|
|
8340
8349
|
`
|
|
8341
8350
|
Notes:
|
|
8342
8351
|
Use tools for one atomic provider/API operation. Use plays for composed workflows,
|
|
8343
8352
|
waterfalls, row maps, checkpoints, and retries.
|
|
8353
|
+
execute is the canonical execution verb. run is a compatibility alias.
|
|
8344
8354
|
Calling a provider-backed tool can spend Deepline credits. Use --json for the
|
|
8345
8355
|
stable result payload and --full-output when debugging response metadata.
|
|
8346
8356
|
|
|
8347
8357
|
Examples:
|
|
8348
|
-
deepline tools
|
|
8349
|
-
deepline tools
|
|
8350
|
-
deepline tools
|
|
8358
|
+
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
8359
|
+
deepline tools execute hunter_email_verifier -p email=a@b.com
|
|
8360
|
+
deepline tools execute test_rate_limit --input '{"key":"smoke"}' --json | jq '.status'
|
|
8351
8361
|
`
|
|
8352
8362
|
).option("-p, --param <key=value>", "Pass one parameter. Repeat for multiple values.", (value, acc) => {
|
|
8353
8363
|
acc.push(value);
|
|
@@ -8636,7 +8646,7 @@ function normalizeOutputFormat(raw) {
|
|
|
8636
8646
|
function parseExecuteOptions(args) {
|
|
8637
8647
|
const toolId = args[0];
|
|
8638
8648
|
if (!toolId) {
|
|
8639
|
-
throw new Error(`Usage: deepline tools
|
|
8649
|
+
throw new Error(`Usage: deepline tools execute <toolId> [--param key=value ...] [--input '{"k":"v"}'] [--output-format auto|csv|csv_file|json|json_file] [--full-output] [--no-preview]`);
|
|
8640
8650
|
}
|
|
8641
8651
|
const params = {};
|
|
8642
8652
|
let outputFormat = "auto";
|
|
@@ -8830,11 +8840,123 @@ async function executeTool(args) {
|
|
|
8830
8840
|
return 0;
|
|
8831
8841
|
}
|
|
8832
8842
|
|
|
8843
|
+
// src/cli/commands/update.ts
|
|
8844
|
+
import { spawn } from "child_process";
|
|
8845
|
+
import { existsSync as existsSync7 } from "fs";
|
|
8846
|
+
import { dirname as dirname9, join as join9, resolve as resolve9 } from "path";
|
|
8847
|
+
function posixShellQuote(value) {
|
|
8848
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
8849
|
+
}
|
|
8850
|
+
function windowsCmdQuote(value) {
|
|
8851
|
+
return `"${value.replace(/"/g, '""')}"`;
|
|
8852
|
+
}
|
|
8853
|
+
function shellQuote2(value) {
|
|
8854
|
+
if (process.platform === "win32") {
|
|
8855
|
+
return /^[A-Za-z0-9_./:@%+=,-]+$/.test(value) ? value : windowsCmdQuote(value);
|
|
8856
|
+
}
|
|
8857
|
+
return posixShellQuote(value);
|
|
8858
|
+
}
|
|
8859
|
+
function buildSourceUpdateCommand(sourceRoot) {
|
|
8860
|
+
const quotedRoot = shellQuote2(sourceRoot);
|
|
8861
|
+
const cdCommand = process.platform === "win32" ? `cd /d ${quotedRoot}` : `cd ${quotedRoot}`;
|
|
8862
|
+
return `${cdCommand} && git fetch origin main --tags && git merge --ff-only origin/main`;
|
|
8863
|
+
}
|
|
8864
|
+
function findRepoBackedSdkRoot(startPath) {
|
|
8865
|
+
let current = resolve9(startPath);
|
|
8866
|
+
while (true) {
|
|
8867
|
+
if (existsSync7(join9(current, "sdk", "package.json")) && existsSync7(join9(current, "sdk", "bin", "deepline-dev.ts"))) {
|
|
8868
|
+
return current;
|
|
8869
|
+
}
|
|
8870
|
+
const parent = dirname9(current);
|
|
8871
|
+
if (parent === current) return null;
|
|
8872
|
+
current = parent;
|
|
8873
|
+
}
|
|
8874
|
+
}
|
|
8875
|
+
function resolveUpdatePlan() {
|
|
8876
|
+
const entrypoint = process.argv[1] ? resolve9(process.argv[1]) : "";
|
|
8877
|
+
const sourceRoot = entrypoint ? findRepoBackedSdkRoot(dirname9(entrypoint)) : null;
|
|
8878
|
+
if (sourceRoot) {
|
|
8879
|
+
return {
|
|
8880
|
+
kind: "source",
|
|
8881
|
+
repoRoot: sourceRoot,
|
|
8882
|
+
manualCommand: buildSourceUpdateCommand(sourceRoot)
|
|
8883
|
+
};
|
|
8884
|
+
}
|
|
8885
|
+
const command = "npm";
|
|
8886
|
+
const args = ["install", "-g", "deepline@latest"];
|
|
8887
|
+
return {
|
|
8888
|
+
kind: "npm-global",
|
|
8889
|
+
command,
|
|
8890
|
+
args,
|
|
8891
|
+
manualCommand: `${command} ${args.map(shellQuote2).join(" ")}`
|
|
8892
|
+
};
|
|
8893
|
+
}
|
|
8894
|
+
function runCommand(command, args) {
|
|
8895
|
+
return new Promise((resolveExitCode) => {
|
|
8896
|
+
const child = spawn(command, args, {
|
|
8897
|
+
stdio: "inherit",
|
|
8898
|
+
shell: process.platform === "win32",
|
|
8899
|
+
env: process.env
|
|
8900
|
+
});
|
|
8901
|
+
child.on("error", (error) => {
|
|
8902
|
+
process.stderr.write(`Failed to start ${command}: ${error.message}
|
|
8903
|
+
`);
|
|
8904
|
+
resolveExitCode(1);
|
|
8905
|
+
});
|
|
8906
|
+
child.on("close", (code) => {
|
|
8907
|
+
resolveExitCode(code ?? 1);
|
|
8908
|
+
});
|
|
8909
|
+
});
|
|
8910
|
+
}
|
|
8911
|
+
async function handleUpdate(options) {
|
|
8912
|
+
const plan = resolveUpdatePlan();
|
|
8913
|
+
if (options.json) {
|
|
8914
|
+
process.stdout.write(`${JSON.stringify(plan)}
|
|
8915
|
+
`);
|
|
8916
|
+
return 0;
|
|
8917
|
+
}
|
|
8918
|
+
if (options.printCommand) {
|
|
8919
|
+
process.stdout.write(`${plan.manualCommand}
|
|
8920
|
+
`);
|
|
8921
|
+
return 0;
|
|
8922
|
+
}
|
|
8923
|
+
if (plan.kind === "source") {
|
|
8924
|
+
process.stdout.write(
|
|
8925
|
+
`This Deepline CLI is running from SDK source, so it cannot safely update itself like an npm global.
|
|
8926
|
+
Update the backing checkout with:
|
|
8927
|
+
${plan.manualCommand}
|
|
8928
|
+
`
|
|
8929
|
+
);
|
|
8930
|
+
return 0;
|
|
8931
|
+
}
|
|
8932
|
+
process.stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
8933
|
+
`);
|
|
8934
|
+
return runCommand(plan.command, plan.args);
|
|
8935
|
+
}
|
|
8936
|
+
function registerUpdateCommand(program) {
|
|
8937
|
+
program.command("update").alias("upgrade").description("Update the Deepline SDK/CLI.").addHelpText(
|
|
8938
|
+
"after",
|
|
8939
|
+
`
|
|
8940
|
+
Notes:
|
|
8941
|
+
For the published npm CLI, this runs npm install -g deepline@latest.
|
|
8942
|
+
For repo-backed SDK wrappers such as cli-env sdk-prod or sdk-worktree, this
|
|
8943
|
+
prints the exact git command to update the checkout that provides the CLI.
|
|
8944
|
+
|
|
8945
|
+
Examples:
|
|
8946
|
+
deepline update
|
|
8947
|
+
deepline update --print-command
|
|
8948
|
+
deepline update --json
|
|
8949
|
+
`
|
|
8950
|
+
).option("--print-command", "Print the update command without running it").option("--json", "Emit the resolved update plan as JSON").action(async (options) => {
|
|
8951
|
+
process.exitCode = await handleUpdate(options);
|
|
8952
|
+
});
|
|
8953
|
+
}
|
|
8954
|
+
|
|
8833
8955
|
// src/cli/skills-sync.ts
|
|
8834
|
-
import { spawn, spawnSync as spawnSync2 } from "child_process";
|
|
8835
|
-
import { existsSync as
|
|
8956
|
+
import { spawn as spawn2, spawnSync as spawnSync2 } from "child_process";
|
|
8957
|
+
import { existsSync as existsSync8, mkdirSync as mkdirSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync8 } from "fs";
|
|
8836
8958
|
import { homedir as homedir4 } from "os";
|
|
8837
|
-
import { dirname as
|
|
8959
|
+
import { dirname as dirname10, join as join10 } from "path";
|
|
8838
8960
|
var CHECK_TIMEOUT_MS2 = 3e3;
|
|
8839
8961
|
var SDK_SKILL_NAME = "deepline-sdk";
|
|
8840
8962
|
var SKILL_AGENTS = ["codex", "claude-code", "cursor"];
|
|
@@ -8845,11 +8967,11 @@ function shouldSkipSkillsSync() {
|
|
|
8845
8967
|
}
|
|
8846
8968
|
function sdkSkillsVersionPath(baseUrl) {
|
|
8847
8969
|
const home = process.env.HOME?.trim() || homedir4();
|
|
8848
|
-
return
|
|
8970
|
+
return join10(home, ".local", "deepline", baseUrlSlug(baseUrl), "sdk-skills", ".version");
|
|
8849
8971
|
}
|
|
8850
8972
|
function readLocalSkillsVersion(baseUrl) {
|
|
8851
8973
|
const path = sdkSkillsVersionPath(baseUrl);
|
|
8852
|
-
if (!
|
|
8974
|
+
if (!existsSync8(path)) return "";
|
|
8853
8975
|
try {
|
|
8854
8976
|
return readFileSync5(path, "utf-8").trim();
|
|
8855
8977
|
} catch {
|
|
@@ -8858,7 +8980,7 @@ function readLocalSkillsVersion(baseUrl) {
|
|
|
8858
8980
|
}
|
|
8859
8981
|
function writeLocalSkillsVersion(baseUrl, version) {
|
|
8860
8982
|
const path = sdkSkillsVersionPath(baseUrl);
|
|
8861
|
-
mkdirSync5(
|
|
8983
|
+
mkdirSync5(dirname10(path), { recursive: true });
|
|
8862
8984
|
writeFileSync8(path, `${version}
|
|
8863
8985
|
`, "utf-8");
|
|
8864
8986
|
}
|
|
@@ -8929,7 +9051,7 @@ function hasCommand(command) {
|
|
|
8929
9051
|
});
|
|
8930
9052
|
return result.status === 0;
|
|
8931
9053
|
}
|
|
8932
|
-
function
|
|
9054
|
+
function shellQuote3(arg) {
|
|
8933
9055
|
return `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
8934
9056
|
}
|
|
8935
9057
|
function resolveSkillsInstallCommands(baseUrl) {
|
|
@@ -8937,7 +9059,7 @@ function resolveSkillsInstallCommands(baseUrl) {
|
|
|
8937
9059
|
const npxInstall = {
|
|
8938
9060
|
command: "npx",
|
|
8939
9061
|
args: npxArgs,
|
|
8940
|
-
manualCommand: `npx ${npxArgs.map(
|
|
9062
|
+
manualCommand: `npx ${npxArgs.map(shellQuote3).join(" ")}`
|
|
8941
9063
|
};
|
|
8942
9064
|
if (hasCommand("bunx")) {
|
|
8943
9065
|
const bunxArgs = buildBunxSkillsInstallArgs(baseUrl);
|
|
@@ -8945,7 +9067,7 @@ function resolveSkillsInstallCommands(baseUrl) {
|
|
|
8945
9067
|
{
|
|
8946
9068
|
command: "bunx",
|
|
8947
9069
|
args: bunxArgs,
|
|
8948
|
-
manualCommand: `bunx ${bunxArgs.map(
|
|
9070
|
+
manualCommand: `bunx ${bunxArgs.map(shellQuote3).join(" ")}`
|
|
8949
9071
|
},
|
|
8950
9072
|
npxInstall
|
|
8951
9073
|
];
|
|
@@ -8953,8 +9075,8 @@ function resolveSkillsInstallCommands(baseUrl) {
|
|
|
8953
9075
|
return [npxInstall];
|
|
8954
9076
|
}
|
|
8955
9077
|
function runOneSkillsInstall(install) {
|
|
8956
|
-
return new Promise((
|
|
8957
|
-
const child =
|
|
9078
|
+
return new Promise((resolve10) => {
|
|
9079
|
+
const child = spawn2(install.command, install.args, {
|
|
8958
9080
|
stdio: ["ignore", "ignore", "pipe"],
|
|
8959
9081
|
env: process.env
|
|
8960
9082
|
});
|
|
@@ -8963,7 +9085,7 @@ function runOneSkillsInstall(install) {
|
|
|
8963
9085
|
stderr += chunk.toString("utf-8");
|
|
8964
9086
|
});
|
|
8965
9087
|
child.on("error", (error) => {
|
|
8966
|
-
|
|
9088
|
+
resolve10({
|
|
8967
9089
|
ok: false,
|
|
8968
9090
|
detail: `failed to start ${install.command}: ${error.message}`,
|
|
8969
9091
|
manualCommand: install.manualCommand
|
|
@@ -8971,11 +9093,11 @@ function runOneSkillsInstall(install) {
|
|
|
8971
9093
|
});
|
|
8972
9094
|
child.on("close", (code) => {
|
|
8973
9095
|
if (code === 0) {
|
|
8974
|
-
|
|
9096
|
+
resolve10({ ok: true, detail: "", manualCommand: install.manualCommand });
|
|
8975
9097
|
return;
|
|
8976
9098
|
}
|
|
8977
9099
|
const detail = stderr.trim();
|
|
8978
|
-
|
|
9100
|
+
resolve10({
|
|
8979
9101
|
ok: false,
|
|
8980
9102
|
detail: detail ? `${install.command}: ${detail}` : `${install.command} exited ${code}`,
|
|
8981
9103
|
manualCommand: install.manualCommand
|
|
@@ -9062,7 +9184,8 @@ Common commands:
|
|
|
9062
9184
|
deepline plays search email --json
|
|
9063
9185
|
deepline plays describe person-linkedin-to-email --json
|
|
9064
9186
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}' --watch
|
|
9065
|
-
deepline tools
|
|
9187
|
+
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
9188
|
+
deepline update
|
|
9066
9189
|
|
|
9067
9190
|
Product model:
|
|
9068
9191
|
Tools are atomic provider/API operations that may spend credits.
|
|
@@ -9084,7 +9207,7 @@ Exit codes:
|
|
|
9084
9207
|
`
|
|
9085
9208
|
);
|
|
9086
9209
|
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
9087
|
-
if (actionCommand.name() === "version") {
|
|
9210
|
+
if (actionCommand.name() === "version" || actionCommand.name() === "update") {
|
|
9088
9211
|
return;
|
|
9089
9212
|
}
|
|
9090
9213
|
if (printStartupPhase) {
|
|
@@ -9115,6 +9238,7 @@ Exit codes:
|
|
|
9115
9238
|
registerCsvCommands(program);
|
|
9116
9239
|
registerDbCommands(program);
|
|
9117
9240
|
registerFeedbackCommands(program);
|
|
9241
|
+
registerUpdateCommand(program);
|
|
9118
9242
|
program.command("health").description("Check server health.").addHelpText(
|
|
9119
9243
|
"after",
|
|
9120
9244
|
`
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED