deepline 0.1.114 → 0.1.116
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/dist/cli/index.js +122 -125
- package/dist/cli/index.mjs +105 -108
- package/dist/index.js +63 -32
- package/dist/index.mjs +63 -32
- package/dist/repo/sdk/src/agent-runtime.ts +78 -0
- package/dist/repo/sdk/src/http.ts +1 -31
- package/dist/repo/sdk/src/release.ts +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -183,7 +183,7 @@ configureProxyFromEnv();
|
|
|
183
183
|
// src/cli/index.ts
|
|
184
184
|
var import_promises7 = require("fs/promises");
|
|
185
185
|
var import_node_path22 = require("path");
|
|
186
|
-
var
|
|
186
|
+
var import_node_os17 = require("os");
|
|
187
187
|
var import_commander3 = require("commander");
|
|
188
188
|
|
|
189
189
|
// src/config.ts
|
|
@@ -381,7 +381,7 @@ function resolveConfig(options) {
|
|
|
381
381
|
|
|
382
382
|
// src/http.ts
|
|
383
383
|
var import_node_fs2 = require("fs");
|
|
384
|
-
var
|
|
384
|
+
var import_node_os3 = require("os");
|
|
385
385
|
var import_node_path2 = require("path");
|
|
386
386
|
|
|
387
387
|
// src/release.ts
|
|
@@ -403,10 +403,10 @@ var SDK_RELEASE = {
|
|
|
403
403
|
// skill on the sdk sync surface, and the people-search-to-email prebuilt.
|
|
404
404
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
405
405
|
// the SDK enrich generator's one-second stale policy.
|
|
406
|
-
version: "0.1.
|
|
406
|
+
version: "0.1.116",
|
|
407
407
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
408
408
|
supportPolicy: {
|
|
409
|
-
latest: "0.1.
|
|
409
|
+
latest: "0.1.116",
|
|
410
410
|
minimumSupported: "0.1.53",
|
|
411
411
|
deprecatedBelow: "0.1.53",
|
|
412
412
|
commandMinimumSupported: [
|
|
@@ -424,6 +424,63 @@ var SDK_RELEASE = {
|
|
|
424
424
|
var SDK_VERSION = SDK_RELEASE.version;
|
|
425
425
|
var SDK_API_CONTRACT = SDK_RELEASE.apiContract;
|
|
426
426
|
|
|
427
|
+
// src/agent-runtime.ts
|
|
428
|
+
var import_node_os2 = require("os");
|
|
429
|
+
var EXPLICIT_AGENT_RUNTIMES = /* @__PURE__ */ new Set([
|
|
430
|
+
"claude_code",
|
|
431
|
+
"claude_cowork",
|
|
432
|
+
"codex",
|
|
433
|
+
"cline",
|
|
434
|
+
"cursor",
|
|
435
|
+
"gemini",
|
|
436
|
+
"antigravity",
|
|
437
|
+
"windsurf",
|
|
438
|
+
"unknown"
|
|
439
|
+
]);
|
|
440
|
+
function truthyEnv(name) {
|
|
441
|
+
return ["1", "true", "yes", "on"].includes(
|
|
442
|
+
String(process.env[name] ?? "").trim().toLowerCase()
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
function normalizeAgentRuntime(value) {
|
|
446
|
+
const explicit = value?.trim().toLowerCase().replace(/-/g, "_");
|
|
447
|
+
if (!explicit) return null;
|
|
448
|
+
if (explicit === "gemini_cli") return "gemini";
|
|
449
|
+
return EXPLICIT_AGENT_RUNTIMES.has(explicit) ? explicit : null;
|
|
450
|
+
}
|
|
451
|
+
function isCoworkLikeSandbox() {
|
|
452
|
+
const pluginMode = truthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
453
|
+
const claudeRemote = truthyEnv("CLAUDE_CODE_REMOTE");
|
|
454
|
+
const projectDir = Boolean(process.env.CLAUDE_PROJECT_DIR?.trim());
|
|
455
|
+
const pluginRoot = Boolean(process.env.DEEPLINE_PLUGIN_ROOT?.trim());
|
|
456
|
+
const home = process.env.HOME?.trim() || (0, import_node_os2.homedir)();
|
|
457
|
+
const sessionHome = home.startsWith("/sessions/");
|
|
458
|
+
return (pluginMode || pluginRoot) && (claudeRemote || projectDir || sessionHome);
|
|
459
|
+
}
|
|
460
|
+
function detectAgentRuntime(options = {}) {
|
|
461
|
+
const explicit = normalizeAgentRuntime(process.env.DEEPLINE_AGENT_RUNTIME);
|
|
462
|
+
if (explicit) return explicit;
|
|
463
|
+
if (process.env.CODEX_THREAD_ID?.trim()) return "codex";
|
|
464
|
+
if (options.detectCowork !== false && isCoworkLikeSandbox()) {
|
|
465
|
+
return "claude_cowork";
|
|
466
|
+
}
|
|
467
|
+
if (process.env.CLAUDECODE?.trim() === "1") return "claude_code";
|
|
468
|
+
if (process.env.CLINE_ACTIVE?.trim().toLowerCase() === "true") return "cline";
|
|
469
|
+
if (process.env.CURSOR_TRACE_ID?.trim() || process.env.CURSOR_AGENT?.trim()) {
|
|
470
|
+
return "cursor";
|
|
471
|
+
}
|
|
472
|
+
if (process.env.WINDSURF?.trim() || process.env.CASCADE?.trim()) {
|
|
473
|
+
return "windsurf";
|
|
474
|
+
}
|
|
475
|
+
if (process.env.ANTIGRAVITY?.trim() || process.env.ANTIGRAVITY_CLI?.trim() || process.env.ANTIGRAVITY_AGENT?.trim() || process.env.ANTIGRAVITY_WORKSPACE?.trim()) {
|
|
476
|
+
return "antigravity";
|
|
477
|
+
}
|
|
478
|
+
if (process.env.GEMINI_CLI?.trim() || process.env.GEMINI_CLI_VERSION?.trim() || process.env.GEMINI_SANDBOX?.trim() || process.env.GEMINI_CONFIG_DIR?.trim()) {
|
|
479
|
+
return "gemini";
|
|
480
|
+
}
|
|
481
|
+
return options.defaultRuntime ?? "unknown";
|
|
482
|
+
}
|
|
483
|
+
|
|
427
484
|
// ../shared_libs/play-runtime/coordinator-headers.ts
|
|
428
485
|
var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
|
|
429
486
|
var COORDINATOR_URL_OVERRIDE_HEADER = "x-deepline-coordinator-url";
|
|
@@ -450,7 +507,7 @@ var HttpClient = class {
|
|
|
450
507
|
if (explicit) return explicit;
|
|
451
508
|
try {
|
|
452
509
|
const versionPath = (0, import_node_path2.join)(
|
|
453
|
-
process.env.HOME?.trim() || (0,
|
|
510
|
+
process.env.HOME?.trim() || (0, import_node_os3.homedir)(),
|
|
454
511
|
".local",
|
|
455
512
|
"deepline",
|
|
456
513
|
baseUrlSlug(this.config.baseUrl),
|
|
@@ -864,32 +921,6 @@ function decodeSseFrame(frame) {
|
|
|
864
921
|
function sleep(ms) {
|
|
865
922
|
return new Promise((resolve16) => setTimeout(resolve16, ms));
|
|
866
923
|
}
|
|
867
|
-
function isTruthyEnv(name) {
|
|
868
|
-
const normalized = process.env[name]?.trim().toLowerCase();
|
|
869
|
-
return ["1", "true", "yes", "on"].includes(normalized ?? "");
|
|
870
|
-
}
|
|
871
|
-
function isCoworkLikeSandbox() {
|
|
872
|
-
const pluginMode = isTruthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
873
|
-
const claudeRemote = isTruthyEnv("CLAUDE_CODE_REMOTE");
|
|
874
|
-
const projectDir = Boolean(process.env.CLAUDE_PROJECT_DIR?.trim());
|
|
875
|
-
const pluginRoot = Boolean(process.env.DEEPLINE_PLUGIN_ROOT?.trim());
|
|
876
|
-
const home = process.env.HOME?.trim() ?? "";
|
|
877
|
-
const sessionHome = home.startsWith("/sessions/");
|
|
878
|
-
return (pluginMode || pluginRoot) && (claudeRemote || projectDir || sessionHome);
|
|
879
|
-
}
|
|
880
|
-
function detectAgentRuntime() {
|
|
881
|
-
if (process.env.CODEX_THREAD_ID?.trim()) return "codex";
|
|
882
|
-
if (isCoworkLikeSandbox()) return "claude_cowork";
|
|
883
|
-
if (process.env.CLAUDECODE?.trim() === "1") return "claude_code";
|
|
884
|
-
if (process.env.CLINE_ACTIVE?.trim().toLowerCase() === "true") return "cline";
|
|
885
|
-
if (process.env.CURSOR_TRACE_ID?.trim() || process.env.CURSOR_AGENT?.trim()) {
|
|
886
|
-
return "cursor";
|
|
887
|
-
}
|
|
888
|
-
if (process.env.WINDSURF?.trim() || process.env.CASCADE?.trim()) {
|
|
889
|
-
return "windsurf";
|
|
890
|
-
}
|
|
891
|
-
return "unknown";
|
|
892
|
-
}
|
|
893
924
|
function withCoworkNetworkHint(message) {
|
|
894
925
|
if (!isCoworkLikeSandbox() || message.includes(COWORK_NETWORK_HINT)) {
|
|
895
926
|
return message;
|
|
@@ -3463,7 +3494,7 @@ var DeeplineClient = class {
|
|
|
3463
3494
|
|
|
3464
3495
|
// src/compat.ts
|
|
3465
3496
|
var import_node_fs3 = require("fs");
|
|
3466
|
-
var
|
|
3497
|
+
var import_node_os4 = require("os");
|
|
3467
3498
|
var import_node_path3 = require("path");
|
|
3468
3499
|
var CHECK_TIMEOUT_MS = 2e3;
|
|
3469
3500
|
var COMPAT_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
@@ -3472,7 +3503,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
3472
3503
|
return value === "1" || value === "true" || value === "yes";
|
|
3473
3504
|
}
|
|
3474
3505
|
function compatibilityCachePath() {
|
|
3475
|
-
return (0, import_node_path3.join)((0,
|
|
3506
|
+
return (0, import_node_path3.join)((0, import_node_os4.homedir)(), ".cache", "deepline", "sdk-compat-cache.json");
|
|
3476
3507
|
}
|
|
3477
3508
|
function compatibilityCacheKey(baseUrl, command) {
|
|
3478
3509
|
return JSON.stringify({
|
|
@@ -3567,13 +3598,13 @@ function enforceSdkCompatibilityResponse(response) {
|
|
|
3567
3598
|
|
|
3568
3599
|
// src/cli/commands/auth.ts
|
|
3569
3600
|
var import_node_fs5 = require("fs");
|
|
3570
|
-
var
|
|
3601
|
+
var import_node_os6 = require("os");
|
|
3571
3602
|
var import_node_path5 = require("path");
|
|
3572
3603
|
|
|
3573
3604
|
// src/cli/utils.ts
|
|
3574
3605
|
var import_node_fs4 = require("fs");
|
|
3575
3606
|
var import_promises = require("fs/promises");
|
|
3576
|
-
var
|
|
3607
|
+
var import_node_os5 = require("os");
|
|
3577
3608
|
var import_node_path4 = require("path");
|
|
3578
3609
|
var childProcess = __toESM(require("child_process"));
|
|
3579
3610
|
var import_sync = require("csv-parse/sync");
|
|
@@ -3592,7 +3623,7 @@ async function writeOutputFile(filename, content) {
|
|
|
3592
3623
|
return fullPath;
|
|
3593
3624
|
}
|
|
3594
3625
|
function browserOpenStateFile() {
|
|
3595
|
-
const homeDir2 = process.env.HOME || (0,
|
|
3626
|
+
const homeDir2 = process.env.HOME || (0, import_node_os5.homedir)();
|
|
3596
3627
|
return (0, import_node_path4.join)(
|
|
3597
3628
|
homeDir2,
|
|
3598
3629
|
".local",
|
|
@@ -3669,7 +3700,7 @@ function readDefaultMacBrowserBundleId(runner = defaultBrowserCommandRunner) {
|
|
|
3669
3700
|
"json",
|
|
3670
3701
|
"-o",
|
|
3671
3702
|
"-",
|
|
3672
|
-
`${(0,
|
|
3703
|
+
`${(0, import_node_os5.homedir)()}/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist`
|
|
3673
3704
|
],
|
|
3674
3705
|
{ encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
|
|
3675
3706
|
);
|
|
@@ -3840,8 +3871,8 @@ function collectLocalEnvInfo() {
|
|
|
3840
3871
|
const info = {
|
|
3841
3872
|
os: `${process.platform} ${process.arch}`,
|
|
3842
3873
|
node_version: process.version,
|
|
3843
|
-
home_dir: (0,
|
|
3844
|
-
agent_runtime:
|
|
3874
|
+
home_dir: (0, import_node_os5.homedir)(),
|
|
3875
|
+
agent_runtime: detectAgentRuntime()
|
|
3845
3876
|
};
|
|
3846
3877
|
const env = process.env;
|
|
3847
3878
|
const optional = {
|
|
@@ -3865,26 +3896,6 @@ function collectLocalEnvInfo() {
|
|
|
3865
3896
|
}
|
|
3866
3897
|
return info;
|
|
3867
3898
|
}
|
|
3868
|
-
function detectAgentRuntime2() {
|
|
3869
|
-
if (process.env.CODEX_THREAD_ID?.trim()) return "codex";
|
|
3870
|
-
const pluginMode = process.env.DEEPLINE_PLUGIN_MODE?.trim().toLowerCase();
|
|
3871
|
-
const claudeRemote = process.env.CLAUDE_CODE_REMOTE?.trim().toLowerCase();
|
|
3872
|
-
const sessionHome = (process.env.HOME?.trim() || (0, import_node_os4.homedir)()).startsWith(
|
|
3873
|
-
"/sessions/"
|
|
3874
|
-
);
|
|
3875
|
-
if (["1", "true", "yes", "on"].includes(pluginMode ?? "") && (["1", "true", "yes", "on"].includes(claudeRemote ?? "") || Boolean(process.env.CLAUDE_PROJECT_DIR?.trim()) || sessionHome)) {
|
|
3876
|
-
return "claude_cowork";
|
|
3877
|
-
}
|
|
3878
|
-
if (process.env.CLAUDECODE?.trim() === "1") return "claude_code";
|
|
3879
|
-
if (process.env.CLINE_ACTIVE?.trim().toLowerCase() === "true") return "cline";
|
|
3880
|
-
if (process.env.CURSOR_TRACE_ID?.trim() || process.env.CURSOR_AGENT?.trim()) {
|
|
3881
|
-
return "cursor";
|
|
3882
|
-
}
|
|
3883
|
-
if (process.env.WINDSURF?.trim() || process.env.CASCADE?.trim()) {
|
|
3884
|
-
return "windsurf";
|
|
3885
|
-
}
|
|
3886
|
-
return "unknown";
|
|
3887
|
-
}
|
|
3888
3899
|
function readCsvRows(csvPath) {
|
|
3889
3900
|
const raw = (0, import_node_fs4.readFileSync)((0, import_node_path4.resolve)(csvPath), "utf-8");
|
|
3890
3901
|
return (0, import_sync.parse)(raw, {
|
|
@@ -4155,7 +4166,7 @@ async function httpJson(method, url, apiKey, body) {
|
|
|
4155
4166
|
"User-Agent": `deepline-ts-sdk/${SDK_VERSION}`,
|
|
4156
4167
|
"X-Deepline-Client-Family": "sdk",
|
|
4157
4168
|
"X-Deepline-CLI-Family": "sdk",
|
|
4158
|
-
"X-Deepline-Agent-Runtime":
|
|
4169
|
+
"X-Deepline-Agent-Runtime": detectAgentRuntime(),
|
|
4159
4170
|
"X-Deepline-CLI-Version": SDK_VERSION,
|
|
4160
4171
|
"X-Deepline-SDK-Version": SDK_VERSION,
|
|
4161
4172
|
"X-Deepline-API-Contract": SDK_API_CONTRACT
|
|
@@ -4257,7 +4268,7 @@ async function handleRegister(args) {
|
|
|
4257
4268
|
}
|
|
4258
4269
|
if (!agentName) {
|
|
4259
4270
|
try {
|
|
4260
|
-
agentName = (0,
|
|
4271
|
+
agentName = (0, import_node_os6.hostname)() || "Deepline CLI (TS)";
|
|
4261
4272
|
} catch {
|
|
4262
4273
|
agentName = "Deepline CLI (TS)";
|
|
4263
4274
|
}
|
|
@@ -6656,7 +6667,7 @@ Examples:
|
|
|
6656
6667
|
|
|
6657
6668
|
// src/cli/commands/enrich.ts
|
|
6658
6669
|
var import_promises5 = require("fs/promises");
|
|
6659
|
-
var
|
|
6670
|
+
var import_node_os9 = require("os");
|
|
6660
6671
|
var import_node_path14 = require("path");
|
|
6661
6672
|
|
|
6662
6673
|
// src/cli/commands/play.ts
|
|
@@ -6666,7 +6677,7 @@ var import_node_path13 = require("path");
|
|
|
6666
6677
|
var import_sync5 = require("csv-parse/sync");
|
|
6667
6678
|
|
|
6668
6679
|
// src/plays/bundle-play-file.ts
|
|
6669
|
-
var
|
|
6680
|
+
var import_node_os8 = require("os");
|
|
6670
6681
|
var import_node_path11 = require("path");
|
|
6671
6682
|
var import_node_url = require("url");
|
|
6672
6683
|
var import_node_fs9 = require("fs");
|
|
@@ -6675,7 +6686,7 @@ var import_node_fs9 = require("fs");
|
|
|
6675
6686
|
var import_node_crypto = require("crypto");
|
|
6676
6687
|
var import_node_fs8 = require("fs");
|
|
6677
6688
|
var import_promises3 = require("fs/promises");
|
|
6678
|
-
var
|
|
6689
|
+
var import_node_os7 = require("os");
|
|
6679
6690
|
var import_node_path9 = require("path");
|
|
6680
6691
|
var import_node_module = require("module");
|
|
6681
6692
|
var import_esbuild = require("esbuild");
|
|
@@ -6790,7 +6801,7 @@ var MAX_ESM_WORKERS_BUNDLE_BYTES = 115e4;
|
|
|
6790
6801
|
// ../shared_libs/plays/bundling/index.ts
|
|
6791
6802
|
var PLAY_BUNDLE_CACHE_VERSION = 24;
|
|
6792
6803
|
var PLAY_ARTIFACT_CACHE_DIR = (0, import_node_path9.join)(
|
|
6793
|
-
(0,
|
|
6804
|
+
(0, import_node_os7.tmpdir)(),
|
|
6794
6805
|
`deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`
|
|
6795
6806
|
);
|
|
6796
6807
|
var PLAY_PROXY_NAMESPACE = "deepline-play-runtime-ref";
|
|
@@ -8437,7 +8448,7 @@ function createSdkPlayBundlingAdapter() {
|
|
|
8437
8448
|
projectRoot: PROJECT_ROOT,
|
|
8438
8449
|
nodeModulesDir: (0, import_node_path11.resolve)(PROJECT_ROOT, "node_modules"),
|
|
8439
8450
|
cacheDir: (0, import_node_path11.join)(
|
|
8440
|
-
(0,
|
|
8451
|
+
(0, import_node_os8.tmpdir)(),
|
|
8441
8452
|
`deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION2}`
|
|
8442
8453
|
),
|
|
8443
8454
|
sdkSourceRoot: SDK_SOURCE_ROOT,
|
|
@@ -10135,11 +10146,11 @@ function createCliProgress(enabled) {
|
|
|
10135
10146
|
|
|
10136
10147
|
// src/cli/trace.ts
|
|
10137
10148
|
var cliTraceStartedAt = Date.now();
|
|
10138
|
-
function
|
|
10149
|
+
function isTruthyEnv(value) {
|
|
10139
10150
|
return value === "1" || value === "true" || value === "yes";
|
|
10140
10151
|
}
|
|
10141
10152
|
function isCliTraceEnabled() {
|
|
10142
|
-
return
|
|
10153
|
+
return isTruthyEnv(process.env.DEEPLINE_CLI_TRACE);
|
|
10143
10154
|
}
|
|
10144
10155
|
function recordCliTrace(event) {
|
|
10145
10156
|
if (!isCliTraceEnabled()) {
|
|
@@ -15016,11 +15027,11 @@ Concepts:
|
|
|
15016
15027
|
|
|
15017
15028
|
Common commands:
|
|
15018
15029
|
deepline plays search email --json
|
|
15019
|
-
deepline plays describe person-linkedin-to-email --json
|
|
15030
|
+
deepline plays describe prebuilt/person-linkedin-to-email --json
|
|
15020
15031
|
deepline plays check my.play.ts
|
|
15021
15032
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
15022
15033
|
deepline plays set-live my.play.ts --json
|
|
15023
|
-
deepline plays get person-linkedin-to-email --json
|
|
15034
|
+
deepline plays get prebuilt/person-linkedin-to-email --json
|
|
15024
15035
|
`
|
|
15025
15036
|
);
|
|
15026
15037
|
play.command("check <target>").description("Check a local play file or named/prebuilt play contract.").addHelpText(
|
|
@@ -15089,7 +15100,7 @@ Idempotent execution:
|
|
|
15089
15100
|
Examples:
|
|
15090
15101
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
15091
15102
|
deepline plays run my.play.ts --input @input.json --json
|
|
15092
|
-
deepline plays run person-linkedin-to-email --input '{"linkedin_url":"..."}'
|
|
15103
|
+
deepline plays run prebuilt/person-linkedin-to-email --input '{"linkedin_url":"..."}'
|
|
15093
15104
|
deepline plays run cto-search.play.ts --limit 5
|
|
15094
15105
|
deepline plays run long-background-play --no-wait
|
|
15095
15106
|
deepline runs export <run-id> --out output.csv
|
|
@@ -15156,8 +15167,8 @@ Notes:
|
|
|
15156
15167
|
contract and examples.
|
|
15157
15168
|
|
|
15158
15169
|
Examples:
|
|
15159
|
-
deepline plays get person-linkedin-to-email
|
|
15160
|
-
deepline plays get person-linkedin-to-email --json | jq '.play.liveRevision'
|
|
15170
|
+
deepline plays get prebuilt/person-linkedin-to-email
|
|
15171
|
+
deepline plays get prebuilt/person-linkedin-to-email --json | jq '.play.liveRevision'
|
|
15161
15172
|
deepline plays get prebuilt/name-and-domain-to-email-waterfall-batch --source > email-waterfall.play.ts
|
|
15162
15173
|
deepline plays get prebuilt/name-and-domain-to-email-waterfall-batch --source --out ./email-waterfall.play.ts
|
|
15163
15174
|
`
|
|
@@ -15209,7 +15220,7 @@ Examples:
|
|
|
15209
15220
|
deepline plays search email
|
|
15210
15221
|
deepline plays search email --all
|
|
15211
15222
|
deepline plays grep "linkedin to email" --compact --json
|
|
15212
|
-
deepline plays describe person-linkedin-to-email --json
|
|
15223
|
+
deepline plays describe prebuilt/person-linkedin-to-email --json
|
|
15213
15224
|
`
|
|
15214
15225
|
).option("--compact", "Emit compact schemas").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (query, options) => {
|
|
15215
15226
|
process.exitCode = await handlePlaySearch([
|
|
@@ -15251,8 +15262,8 @@ Notes:
|
|
|
15251
15262
|
Use \`get\` when you need full metadata, revisions, source fields, or latest runs.
|
|
15252
15263
|
|
|
15253
15264
|
Examples:
|
|
15254
|
-
deepline plays describe person-linkedin-to-email
|
|
15255
|
-
deepline plays describe person-linkedin-to-email --json
|
|
15265
|
+
deepline plays describe prebuilt/person-linkedin-to-email
|
|
15266
|
+
deepline plays describe prebuilt/person-linkedin-to-email --json
|
|
15256
15267
|
deepline plays get prebuilt/person-linkedin-to-email --source --out ./person-linkedin-to-email.play.ts
|
|
15257
15268
|
`
|
|
15258
15269
|
).option("--compact", "Emit compact schemas").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
|
|
@@ -17180,10 +17191,10 @@ function expandAtFilePath(rawPath) {
|
|
|
17180
17191
|
(_match, bareName, bracedName) => process.env[bareName ?? bracedName ?? ""] ?? ""
|
|
17181
17192
|
);
|
|
17182
17193
|
if (expanded === "~") {
|
|
17183
|
-
return (0,
|
|
17194
|
+
return (0, import_node_os9.homedir)();
|
|
17184
17195
|
}
|
|
17185
17196
|
if (expanded.startsWith("~/") || expanded.startsWith("~\\")) {
|
|
17186
|
-
return (0, import_node_path14.join)((0,
|
|
17197
|
+
return (0, import_node_path14.join)((0, import_node_os9.homedir)(), expanded.slice(2));
|
|
17187
17198
|
}
|
|
17188
17199
|
return expanded;
|
|
17189
17200
|
}
|
|
@@ -18044,7 +18055,7 @@ async function persistEnrichFailureReport(input2) {
|
|
|
18044
18055
|
if (input2.jobs.length === 0) {
|
|
18045
18056
|
return null;
|
|
18046
18057
|
}
|
|
18047
|
-
const stateDir = (0, import_node_path14.join)((0,
|
|
18058
|
+
const stateDir = (0, import_node_path14.join)((0, import_node_os9.homedir)(), ".local", "deepline", "runtime", "state");
|
|
18048
18059
|
await (0, import_promises5.mkdir)(stateDir, { recursive: true });
|
|
18049
18060
|
const reportPath = (0, import_node_path14.join)(
|
|
18050
18061
|
stateDir,
|
|
@@ -18508,7 +18519,7 @@ function registerEnrichCommand(program) {
|
|
|
18508
18519
|
forceAliases,
|
|
18509
18520
|
playName: options.name
|
|
18510
18521
|
});
|
|
18511
|
-
const tempDir = await (0, import_promises5.mkdtemp)((0, import_node_path14.join)((0,
|
|
18522
|
+
const tempDir = await (0, import_promises5.mkdtemp)((0, import_node_path14.join)((0, import_node_os9.tmpdir)(), "deepline-enrich-play-"));
|
|
18512
18523
|
const tempPlay = (0, import_node_path14.join)(tempDir, "deepline-enrich.play.ts");
|
|
18513
18524
|
try {
|
|
18514
18525
|
await (0, import_promises5.writeFile)(tempPlay, playSource, "utf8");
|
|
@@ -18675,7 +18686,7 @@ Examples:
|
|
|
18675
18686
|
|
|
18676
18687
|
// src/cli/commands/sessions.ts
|
|
18677
18688
|
var import_node_fs12 = require("fs");
|
|
18678
|
-
var
|
|
18689
|
+
var import_node_os10 = require("os");
|
|
18679
18690
|
var import_node_path15 = require("path");
|
|
18680
18691
|
var import_node_zlib = require("zlib");
|
|
18681
18692
|
var import_node_crypto4 = require("crypto");
|
|
@@ -18690,14 +18701,14 @@ var MAX_EVENT_OBJECT_KEYS = 80;
|
|
|
18690
18701
|
var TRUNCATION_MARKER = "...[truncated]";
|
|
18691
18702
|
var NOISE_EVENT_TYPES = /* @__PURE__ */ new Set(["progress", "file-history-snapshot"]);
|
|
18692
18703
|
function homeDir() {
|
|
18693
|
-
return process.env.HOME?.trim() || (0,
|
|
18704
|
+
return process.env.HOME?.trim() || (0, import_node_os10.homedir)();
|
|
18694
18705
|
}
|
|
18695
18706
|
function detectShellContext() {
|
|
18696
18707
|
const shellPath = process.env.SHELL?.trim() || process.env.ComSpec?.trim() || process.env.COMSPEC?.trim() || "";
|
|
18697
18708
|
return {
|
|
18698
18709
|
shell: shellPath ? (0, import_node_path15.basename)(shellPath).replace(/\.exe$/i, "") : "unknown",
|
|
18699
18710
|
shell_path: shellPath || null,
|
|
18700
|
-
os: (0,
|
|
18711
|
+
os: (0, import_node_os10.platform)(),
|
|
18701
18712
|
cwd: process.cwd()
|
|
18702
18713
|
};
|
|
18703
18714
|
}
|
|
@@ -20135,7 +20146,7 @@ Examples:
|
|
|
20135
20146
|
|
|
20136
20147
|
// src/cli/commands/switch.ts
|
|
20137
20148
|
var import_node_fs13 = require("fs");
|
|
20138
|
-
var
|
|
20149
|
+
var import_node_os11 = require("os");
|
|
20139
20150
|
var import_node_path16 = require("path");
|
|
20140
20151
|
function hostSlugFromBaseUrl(baseUrl) {
|
|
20141
20152
|
try {
|
|
@@ -20156,7 +20167,7 @@ function resolveConfigScope() {
|
|
|
20156
20167
|
return hostSlugFromBaseUrl(autoDetectBaseUrl());
|
|
20157
20168
|
}
|
|
20158
20169
|
function activeFamilyPath() {
|
|
20159
|
-
const home = process.env.HOME || process.env.USERPROFILE || (0,
|
|
20170
|
+
const home = process.env.HOME || process.env.USERPROFILE || (0, import_node_os11.homedir)();
|
|
20160
20171
|
return (0, import_node_path16.join)(
|
|
20161
20172
|
home,
|
|
20162
20173
|
".local",
|
|
@@ -20295,12 +20306,12 @@ Examples:
|
|
|
20295
20306
|
// src/cli/commands/tools.ts
|
|
20296
20307
|
var import_commander2 = require("commander");
|
|
20297
20308
|
var import_node_fs15 = require("fs");
|
|
20298
|
-
var
|
|
20309
|
+
var import_node_os13 = require("os");
|
|
20299
20310
|
var import_node_path18 = require("path");
|
|
20300
20311
|
|
|
20301
20312
|
// src/tool-output.ts
|
|
20302
20313
|
var import_node_fs14 = require("fs");
|
|
20303
|
-
var
|
|
20314
|
+
var import_node_os12 = require("os");
|
|
20304
20315
|
var import_node_path17 = require("path");
|
|
20305
20316
|
function isPlainObject(value) {
|
|
20306
20317
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
@@ -20397,7 +20408,7 @@ function tryConvertToList(payload, options) {
|
|
|
20397
20408
|
return null;
|
|
20398
20409
|
}
|
|
20399
20410
|
function ensureOutputDir() {
|
|
20400
|
-
const outputDir = (0, import_node_path17.join)((0,
|
|
20411
|
+
const outputDir = (0, import_node_path17.join)((0, import_node_os12.homedir)(), ".local", "share", "deepline", "data");
|
|
20401
20412
|
(0, import_node_fs14.mkdirSync)(outputDir, { recursive: true });
|
|
20402
20413
|
return outputDir;
|
|
20403
20414
|
}
|
|
@@ -21603,7 +21614,7 @@ function starterScriptJson(script) {
|
|
|
21603
21614
|
function seedToolListScript(input2) {
|
|
21604
21615
|
const stem = safeFileStem(input2.toolId);
|
|
21605
21616
|
const fileName = `${stem}-workflow-seed-${Date.now()}.play.ts`;
|
|
21606
|
-
const scriptDir = (0, import_node_fs15.mkdtempSync)((0, import_node_path18.join)((0,
|
|
21617
|
+
const scriptDir = (0, import_node_fs15.mkdtempSync)((0, import_node_path18.join)((0, import_node_os13.tmpdir)(), "deepline-workflow-seed-"));
|
|
21607
21618
|
(0, import_node_fs15.chmodSync)(scriptDir, 448);
|
|
21608
21619
|
const scriptPath = (0, import_node_path18.join)(scriptDir, fileName);
|
|
21609
21620
|
const projectDir = `deepline/projects/${stem}-workflow`;
|
|
@@ -22396,7 +22407,7 @@ Notes:
|
|
|
22396
22407
|
// src/cli/commands/update.ts
|
|
22397
22408
|
var import_node_child_process2 = require("child_process");
|
|
22398
22409
|
var import_node_fs16 = require("fs");
|
|
22399
|
-
var
|
|
22410
|
+
var import_node_os14 = require("os");
|
|
22400
22411
|
var import_node_path20 = require("path");
|
|
22401
22412
|
function posixShellQuote(value) {
|
|
22402
22413
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
@@ -22477,7 +22488,7 @@ function findRepoBackedSdkRoot(startPath) {
|
|
|
22477
22488
|
}
|
|
22478
22489
|
function resolveUpdatePlan(options = {}) {
|
|
22479
22490
|
const env = options.env ?? process.env;
|
|
22480
|
-
const homeDir2 = options.homeDir ?? (0,
|
|
22491
|
+
const homeDir2 = options.homeDir ?? (0, import_node_os14.homedir)();
|
|
22481
22492
|
const entrypoint = options.entrypoint ?? (process.argv[1] ? (0, import_node_path20.resolve)(process.argv[1]) : "");
|
|
22482
22493
|
const sourceRoot = entrypoint ? findRepoBackedSdkRoot((0, import_node_path20.dirname)(entrypoint)) : null;
|
|
22483
22494
|
if (sourceRoot) {
|
|
@@ -22789,7 +22800,13 @@ var command_compatibility_default = {
|
|
|
22789
22800
|
var install_commands_default = {
|
|
22790
22801
|
skills: {
|
|
22791
22802
|
index_path: "/.well-known/skills/index.json",
|
|
22792
|
-
default_agents: [
|
|
22803
|
+
default_agents: [
|
|
22804
|
+
"codex",
|
|
22805
|
+
"claude-code",
|
|
22806
|
+
"cursor",
|
|
22807
|
+
"gemini-cli",
|
|
22808
|
+
"antigravity"
|
|
22809
|
+
],
|
|
22793
22810
|
npx_binary: "npx",
|
|
22794
22811
|
npx_add_args_template: [
|
|
22795
22812
|
"--yes",
|
|
@@ -23004,7 +23021,7 @@ async function maybeAutoUpdateAndRelaunch(response) {
|
|
|
23004
23021
|
// src/cli/skills-sync.ts
|
|
23005
23022
|
var import_node_child_process4 = require("child_process");
|
|
23006
23023
|
var import_node_fs17 = require("fs");
|
|
23007
|
-
var
|
|
23024
|
+
var import_node_os15 = require("os");
|
|
23008
23025
|
var import_node_path21 = require("path");
|
|
23009
23026
|
var CHECK_TIMEOUT_MS2 = 3e3;
|
|
23010
23027
|
var SDK_PLAY_SKILL_NAME = "deepline-plays";
|
|
@@ -23031,7 +23048,7 @@ function readPluginSkillsVersion() {
|
|
|
23031
23048
|
}
|
|
23032
23049
|
}
|
|
23033
23050
|
function sdkSkillsVersionPath(baseUrl) {
|
|
23034
|
-
const home = process.env.HOME?.trim() || (0,
|
|
23051
|
+
const home = process.env.HOME?.trim() || (0, import_node_os15.homedir)();
|
|
23035
23052
|
return (0, import_node_path21.join)(
|
|
23036
23053
|
home,
|
|
23037
23054
|
".local",
|
|
@@ -23234,7 +23251,7 @@ async function syncSdkSkillsIfNeeded(baseUrl) {
|
|
|
23234
23251
|
}
|
|
23235
23252
|
|
|
23236
23253
|
// src/cli/failure-reporting.ts
|
|
23237
|
-
var
|
|
23254
|
+
var import_node_os16 = require("os");
|
|
23238
23255
|
var FAILURE_REPORT_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
|
|
23239
23256
|
var REPORT_FAILURE_TIMEOUT_MS = 1e4;
|
|
23240
23257
|
var MAX_FAILURE_TEXT_CHARS = 4e3;
|
|
@@ -23247,13 +23264,13 @@ var ASSIGNMENT_SECRET_RE = /\b(access[_-]?token|api[_-]?key|apikey|auth(?:orizat
|
|
|
23247
23264
|
var BEARER_SECRET_RE = /\b(bearer)\s+([A-Za-z0-9._-]+)/gi;
|
|
23248
23265
|
var GENERIC_TOKEN_RE = /\b(?:dlp|sk|ghp|xox[baprs])[-_A-Za-z0-9]{8,}\b/g;
|
|
23249
23266
|
var SECRET_OPTION_RE = /^--?(?:access[-_]?token|api[-_]?key|apikey|auth(?:orization)?|bearer|password|secret|session|token)$/i;
|
|
23250
|
-
function
|
|
23267
|
+
function truthyEnv2(name) {
|
|
23251
23268
|
return ["1", "true", "yes", "on"].includes(
|
|
23252
23269
|
String(process.env[name] ?? "").trim().toLowerCase()
|
|
23253
23270
|
);
|
|
23254
23271
|
}
|
|
23255
23272
|
function isFailureReportingDisabled() {
|
|
23256
|
-
return
|
|
23273
|
+
return truthyEnv2(FAILURE_REPORT_DISABLE_ENV);
|
|
23257
23274
|
}
|
|
23258
23275
|
function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
|
|
23259
23276
|
const home = process.env.HOME?.trim();
|
|
@@ -23334,35 +23351,15 @@ function isNetworkFailure(error) {
|
|
|
23334
23351
|
const code = classifyNetworkFailure(error);
|
|
23335
23352
|
return code !== "network_error" || /unable to connect|unable to stream/i.test(error.message);
|
|
23336
23353
|
}
|
|
23337
|
-
function detectAgentRuntime3() {
|
|
23338
|
-
if (process.env.CODEX_THREAD_ID?.trim()) return "codex";
|
|
23339
|
-
const pluginMode = truthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
23340
|
-
const claudeRemote = truthyEnv("CLAUDE_CODE_REMOTE");
|
|
23341
|
-
const projectDir = Boolean(process.env.CLAUDE_PROJECT_DIR?.trim());
|
|
23342
|
-
const pluginRoot = Boolean(process.env.DEEPLINE_PLUGIN_ROOT?.trim());
|
|
23343
|
-
const sessionHome = process.env.HOME?.trim().startsWith("/sessions/") ?? false;
|
|
23344
|
-
if ((pluginMode || pluginRoot) && (claudeRemote || projectDir || sessionHome)) {
|
|
23345
|
-
return "claude_cowork";
|
|
23346
|
-
}
|
|
23347
|
-
if (process.env.CLAUDECODE?.trim() === "1") return "claude_code";
|
|
23348
|
-
if (process.env.CLINE_ACTIVE?.trim().toLowerCase() === "true") return "cline";
|
|
23349
|
-
if (process.env.CURSOR_TRACE_ID?.trim() || process.env.CURSOR_AGENT?.trim()) {
|
|
23350
|
-
return "cursor";
|
|
23351
|
-
}
|
|
23352
|
-
if (process.env.WINDSURF?.trim() || process.env.CASCADE?.trim()) {
|
|
23353
|
-
return "windsurf";
|
|
23354
|
-
}
|
|
23355
|
-
return "unknown";
|
|
23356
|
-
}
|
|
23357
23354
|
function buildEnvironmentContext() {
|
|
23358
23355
|
const context = {
|
|
23359
|
-
os: (0,
|
|
23360
|
-
os_release: (0,
|
|
23361
|
-
platform: `${(0,
|
|
23356
|
+
os: (0, import_node_os16.platform)(),
|
|
23357
|
+
os_release: (0, import_node_os16.release)(),
|
|
23358
|
+
platform: `${(0, import_node_os16.platform)()}-${(0, import_node_os16.release)()}-${process.arch}`,
|
|
23362
23359
|
node_version: process.version,
|
|
23363
23360
|
runtime: "Node.js",
|
|
23364
|
-
hostname: (0,
|
|
23365
|
-
agent_runtime:
|
|
23361
|
+
hostname: (0, import_node_os16.hostname)(),
|
|
23362
|
+
agent_runtime: detectAgentRuntime()
|
|
23366
23363
|
};
|
|
23367
23364
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
23368
23365
|
const normalized = process.env[key]?.trim();
|
|
@@ -23477,7 +23474,7 @@ async function maybeReportSdkCliFailure(input2) {
|
|
|
23477
23474
|
"User-Agent": `deepline-ts-sdk/${SDK_VERSION}`,
|
|
23478
23475
|
"X-Deepline-Client-Family": "sdk",
|
|
23479
23476
|
"X-Deepline-CLI-Family": "sdk",
|
|
23480
|
-
"X-Deepline-Agent-Runtime":
|
|
23477
|
+
"X-Deepline-Agent-Runtime": detectAgentRuntime(),
|
|
23481
23478
|
"X-Deepline-CLI-Version": SDK_VERSION,
|
|
23482
23479
|
"X-Deepline-SDK-Version": SDK_VERSION
|
|
23483
23480
|
},
|
|
@@ -23541,7 +23538,7 @@ function topLevelCommandKnown(program, commandName) {
|
|
|
23541
23538
|
);
|
|
23542
23539
|
}
|
|
23543
23540
|
async function runPlayRunnerHealthCheck() {
|
|
23544
|
-
const dir = await (0, import_promises7.mkdtemp)((0, import_node_path22.join)((0,
|
|
23541
|
+
const dir = await (0, import_promises7.mkdtemp)((0, import_node_path22.join)((0, import_node_os17.tmpdir)(), "deepline-health-play-"));
|
|
23545
23542
|
const file = (0, import_node_path22.join)(dir, "health-check.play.ts");
|
|
23546
23543
|
try {
|
|
23547
23544
|
await (0, import_promises7.writeFile)(
|
|
@@ -23734,7 +23731,7 @@ Common commands:
|
|
|
23734
23731
|
deepline auth status --json
|
|
23735
23732
|
deepline sessions send --current-session --json
|
|
23736
23733
|
deepline plays search email --json
|
|
23737
|
-
deepline plays describe person-linkedin-to-email --json
|
|
23734
|
+
deepline plays describe prebuilt/person-linkedin-to-email --json
|
|
23738
23735
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
23739
23736
|
deepline secrets check HUBSPOT_TOKEN
|
|
23740
23737
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|