deepline 0.1.264 → 0.1.265
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/index.js +110 -257
- package/dist/cli/index.mjs +108 -255
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -703,7 +703,7 @@ var SDK_RELEASE = {
|
|
|
703
703
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
704
704
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
705
705
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
706
|
-
version: "0.1.
|
|
706
|
+
version: "0.1.265",
|
|
707
707
|
apiContract: "2026-07-admin-cli-local-cutover",
|
|
708
708
|
supportPolicy: {
|
|
709
709
|
minimumSupported: "0.1.53",
|
|
@@ -25722,243 +25722,82 @@ Examples:
|
|
|
25722
25722
|
);
|
|
25723
25723
|
}
|
|
25724
25724
|
|
|
25725
|
-
// src/cli/
|
|
25726
|
-
|
|
25727
|
-
|
|
25728
|
-
|
|
25729
|
-
|
|
25730
|
-
|
|
25731
|
-
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
|
|
25735
|
-
|
|
25736
|
-
|
|
25737
|
-
|
|
25738
|
-
|
|
25739
|
-
|
|
25740
|
-
|
|
25741
|
-
|
|
25742
|
-
});
|
|
25743
|
-
return result.status === 0;
|
|
25744
|
-
} catch {
|
|
25745
|
-
return false;
|
|
25725
|
+
// src/cli/getting-started.ts
|
|
25726
|
+
var DEEPLINE_GTM_SKILL = "/deepline-gtm";
|
|
25727
|
+
var DEEPLINE_GTM_STARTER_PROMPTS = [
|
|
25728
|
+
{
|
|
25729
|
+
id: "waterfall-email-lookup",
|
|
25730
|
+
title: "Waterfall email lookup",
|
|
25731
|
+
prompt: "/deepline-gtm Find 5 CTOs in NYC and get their verified work emails."
|
|
25732
|
+
},
|
|
25733
|
+
{
|
|
25734
|
+
id: "signal-based-outbound",
|
|
25735
|
+
title: "Signal-based outbound",
|
|
25736
|
+
prompt: "/deepline-gtm Find 5 leads engaging with Gong's competitors on LinkedIn. Score against CMO or VP of Marketing. Waterfall enrich their emails. Build a sequence-ready list with personalized first lines."
|
|
25737
|
+
},
|
|
25738
|
+
{
|
|
25739
|
+
id: "vc-portfolio-scrape",
|
|
25740
|
+
title: "VC portfolio scrape",
|
|
25741
|
+
prompt: "/deepline-gtm Pull 5 companies from Y Combinator W26. Find the Head of Marketing or VP Sales at each one. Waterfall their emails and write a personalized first line."
|
|
25746
25742
|
}
|
|
25743
|
+
];
|
|
25744
|
+
var DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
|
|
25745
|
+
function deeplineGtmGettingStartedPayload() {
|
|
25746
|
+
return {
|
|
25747
|
+
skill: DEEPLINE_GTM_SKILL,
|
|
25748
|
+
examples: DEEPLINE_GTM_STARTER_PROMPTS,
|
|
25749
|
+
question: DEEPLINE_GTM_HANDOFF_QUESTION,
|
|
25750
|
+
customProblemBehavior: "Turn the business problem into one exact /deepline-gtm prompt, show that reusable prompt, then execute it without asking the user to paste it again."
|
|
25751
|
+
};
|
|
25747
25752
|
}
|
|
25748
|
-
|
|
25749
|
-
|
|
25750
|
-
const child = spawn2("claude", [prompt], {
|
|
25751
|
-
stdio: "inherit",
|
|
25752
|
-
shell: process.platform === "win32"
|
|
25753
|
-
});
|
|
25754
|
-
child.on("error", () => resolve15(EXIT_SERVER3));
|
|
25755
|
-
child.on("close", (status) => resolve15(status ?? EXIT_OK2));
|
|
25756
|
-
});
|
|
25757
|
-
}
|
|
25758
|
-
function readBody(req) {
|
|
25759
|
-
return new Promise((resolve15, reject) => {
|
|
25760
|
-
let raw = "";
|
|
25761
|
-
req.setEncoding("utf8");
|
|
25762
|
-
req.on("data", (chunk) => {
|
|
25763
|
-
raw += chunk;
|
|
25764
|
-
if (raw.length > MAX_BODY_BYTES) {
|
|
25765
|
-
reject(new Error("Request body too large."));
|
|
25766
|
-
req.destroy();
|
|
25767
|
-
}
|
|
25768
|
-
});
|
|
25769
|
-
req.on("end", () => resolve15(raw));
|
|
25770
|
-
req.on("error", reject);
|
|
25771
|
-
});
|
|
25772
|
-
}
|
|
25773
|
-
function writeJson(res, status, payload) {
|
|
25774
|
-
res.writeHead(status, { "content-type": "application/json" });
|
|
25775
|
-
res.end(JSON.stringify(payload));
|
|
25776
|
-
}
|
|
25777
|
-
function startCallbackServer(input2) {
|
|
25778
|
-
const server = createServer((req, res) => {
|
|
25779
|
-
res.setHeader("Access-Control-Allow-Origin", req.headers.origin ?? "*");
|
|
25780
|
-
res.setHeader("Vary", "Origin");
|
|
25781
|
-
res.setHeader("Access-Control-Allow-Methods", "POST, OPTIONS");
|
|
25782
|
-
res.setHeader("Access-Control-Allow-Headers", "content-type");
|
|
25783
|
-
res.setHeader("Access-Control-Allow-Private-Network", "true");
|
|
25784
|
-
res.setHeader("Access-Control-Max-Age", "600");
|
|
25785
|
-
if (req.method === "OPTIONS") {
|
|
25786
|
-
res.writeHead(204);
|
|
25787
|
-
res.end();
|
|
25788
|
-
return;
|
|
25789
|
-
}
|
|
25790
|
-
if (req.method !== "POST" || req.url !== "/submit") {
|
|
25791
|
-
writeJson(res, 404, { error: "Not found." });
|
|
25792
|
-
return;
|
|
25793
|
-
}
|
|
25794
|
-
void readBody(req).then((raw) => {
|
|
25795
|
-
let body = null;
|
|
25796
|
-
try {
|
|
25797
|
-
body = JSON.parse(raw);
|
|
25798
|
-
} catch {
|
|
25799
|
-
body = null;
|
|
25800
|
-
}
|
|
25801
|
-
const state = typeof body?.state === "string" ? body.state : "";
|
|
25802
|
-
const prompt = typeof body?.prompt === "string" ? body.prompt.trim() : "";
|
|
25803
|
-
const workflowId = typeof body?.workflow_id === "string" && body.workflow_id.trim() ? body.workflow_id.trim() : null;
|
|
25804
|
-
if (!state || state !== input2.state) {
|
|
25805
|
-
writeJson(res, 403, { error: "Invalid quickstart state token." });
|
|
25806
|
-
return;
|
|
25807
|
-
}
|
|
25808
|
-
if (!prompt) {
|
|
25809
|
-
writeJson(res, 400, { error: "prompt is required." });
|
|
25810
|
-
return;
|
|
25811
|
-
}
|
|
25812
|
-
if (prompt.length > MAX_PROMPT_LENGTH) {
|
|
25813
|
-
writeJson(res, 400, {
|
|
25814
|
-
error: `prompt exceeds ${MAX_PROMPT_LENGTH} characters.`
|
|
25815
|
-
});
|
|
25816
|
-
return;
|
|
25817
|
-
}
|
|
25818
|
-
writeJson(res, 200, { ok: true });
|
|
25819
|
-
setImmediate(() => input2.onSelection({ prompt, workflowId }));
|
|
25820
|
-
}).catch(() => {
|
|
25821
|
-
writeJson(res, 400, { error: "Invalid request body." });
|
|
25822
|
-
});
|
|
25823
|
-
});
|
|
25824
|
-
return new Promise((resolve15, reject) => {
|
|
25825
|
-
server.once("error", reject);
|
|
25826
|
-
server.listen(0, "127.0.0.1", () => {
|
|
25827
|
-
const address = server.address();
|
|
25828
|
-
if (!address || typeof address === "string") {
|
|
25829
|
-
reject(new Error("Failed to bind quickstart callback server."));
|
|
25830
|
-
return;
|
|
25831
|
-
}
|
|
25832
|
-
resolve15({ server, port: address.port });
|
|
25833
|
-
});
|
|
25834
|
-
});
|
|
25835
|
-
}
|
|
25753
|
+
|
|
25754
|
+
// src/cli/commands/quickstart.ts
|
|
25836
25755
|
async function handleQuickstart(options) {
|
|
25837
25756
|
const jsonOutput = shouldEmitJson(options.json === true);
|
|
25838
|
-
const
|
|
25839
|
-
|
|
25840
|
-
|
|
25841
|
-
|
|
25842
|
-
);
|
|
25843
|
-
let apiKey = resolveApiKeyForBaseUrl(baseUrl);
|
|
25844
|
-
if (!apiKey) {
|
|
25845
|
-
if (interactive) {
|
|
25846
|
-
console.error("Not connected yet \u2014 registering this device first.");
|
|
25847
|
-
const registerExit = await handleRegister([]);
|
|
25848
|
-
if (registerExit !== EXIT_OK2) return registerExit;
|
|
25849
|
-
apiKey = resolveApiKeyForBaseUrl(baseUrl);
|
|
25850
|
-
}
|
|
25851
|
-
if (!apiKey) {
|
|
25852
|
-
console.error("Not connected. Run: deepline auth register");
|
|
25853
|
-
return EXIT_AUTH2;
|
|
25854
|
-
}
|
|
25855
|
-
}
|
|
25856
|
-
const state = randomBytes(32).toString("hex");
|
|
25857
|
-
let resolveSelection;
|
|
25858
|
-
const selectionPromise = new Promise((resolve15) => {
|
|
25859
|
-
resolveSelection = resolve15;
|
|
25860
|
-
});
|
|
25861
|
-
let callback;
|
|
25862
|
-
try {
|
|
25863
|
-
callback = await startCallbackServer({
|
|
25864
|
-
state,
|
|
25865
|
-
onSelection: (selection) => resolveSelection(selection)
|
|
25866
|
-
});
|
|
25867
|
-
} catch (error) {
|
|
25868
|
-
console.error(
|
|
25869
|
-
`Could not start the local quickstart listener: ${error instanceof Error ? error.message : String(error)}`
|
|
25870
|
-
);
|
|
25871
|
-
return EXIT_SERVER3;
|
|
25872
|
-
}
|
|
25873
|
-
const quickstartUrl = `${baseUrl}/cli/quickstart?cb=${callback.port}&state=${state}`;
|
|
25874
|
-
console.error(" Opening the recipe picker in your browser.");
|
|
25875
|
-
console.error(` If it didn't open, cmd+click: ${quickstartUrl}`);
|
|
25876
|
-
if (options.open !== false) {
|
|
25877
|
-
openInBrowser(quickstartUrl);
|
|
25878
|
-
}
|
|
25879
|
-
const timeoutSeconds = Number.parseInt(options.timeout ?? "300", 10);
|
|
25880
|
-
const timeoutMs = (Number.isFinite(timeoutSeconds) && timeoutSeconds > 0 ? timeoutSeconds : 300) * 1e3;
|
|
25881
|
-
const timeoutHandle = setTimeout(
|
|
25882
|
-
() => resolveSelection("timeout"),
|
|
25883
|
-
timeoutMs
|
|
25884
|
-
);
|
|
25885
|
-
const progress = createCliProgress(!jsonOutput);
|
|
25886
|
-
progress.phase("waiting for your pick in the browser (Ctrl+C to skip)");
|
|
25887
|
-
const onSigint = () => resolveSelection("sigint");
|
|
25888
|
-
process.once("SIGINT", onSigint);
|
|
25889
|
-
const outcome = await selectionPromise;
|
|
25890
|
-
clearTimeout(timeoutHandle);
|
|
25891
|
-
process.removeListener("SIGINT", onSigint);
|
|
25892
|
-
callback.server.close();
|
|
25893
|
-
if (outcome === "sigint") {
|
|
25894
|
-
progress.fail();
|
|
25895
|
-
console.error("\nSkipped \u2014 run `deepline quickstart` anytime.");
|
|
25896
|
-
return EXIT_OK2;
|
|
25897
|
-
}
|
|
25898
|
-
if (outcome === "timeout") {
|
|
25899
|
-
progress.fail();
|
|
25900
|
-
console.error(
|
|
25901
|
-
"Timed out waiting for a selection. Run: deepline quickstart"
|
|
25902
|
-
);
|
|
25903
|
-
return EXIT_AUTH2;
|
|
25904
|
-
}
|
|
25905
|
-
progress.complete();
|
|
25906
|
-
const { prompt, workflowId } = outcome;
|
|
25907
|
-
const claudeCommand = `claude ${shellQuote3(prompt)}`;
|
|
25908
|
-
const claudeAvailable = hasClaudeBinary();
|
|
25909
|
-
const willLaunch = options.launch !== false && !jsonOutput && interactive && claudeAvailable;
|
|
25757
|
+
const gettingStarted = {
|
|
25758
|
+
skill: DEEPLINE_GTM_SKILL,
|
|
25759
|
+
examples: DEEPLINE_GTM_STARTER_PROMPTS
|
|
25760
|
+
};
|
|
25910
25761
|
printCommandEnvelope(
|
|
25911
25762
|
{
|
|
25912
|
-
|
|
25913
|
-
|
|
25914
|
-
|
|
25915
|
-
|
|
25916
|
-
|
|
25917
|
-
|
|
25763
|
+
ok: true,
|
|
25764
|
+
status: "deprecated",
|
|
25765
|
+
code: "QUICKSTART_DEPRECATED",
|
|
25766
|
+
exitCode: 0,
|
|
25767
|
+
message: "`deepline quickstart` is deprecated. Start with the installed /deepline-gtm skill in your agent.",
|
|
25768
|
+
deprecatedCommand: "deepline quickstart",
|
|
25769
|
+
replacement: DEEPLINE_GTM_SKILL,
|
|
25770
|
+
gettingStarted,
|
|
25771
|
+
next: DEEPLINE_GTM_SKILL,
|
|
25918
25772
|
render: {
|
|
25919
25773
|
sections: [
|
|
25920
25774
|
{
|
|
25921
|
-
title: "quickstart",
|
|
25775
|
+
title: "quickstart deprecated",
|
|
25922
25776
|
lines: [
|
|
25923
|
-
|
|
25924
|
-
|
|
25777
|
+
`Use ${DEEPLINE_GTM_SKILL} in your agent instead.`,
|
|
25778
|
+
...DEEPLINE_GTM_STARTER_PROMPTS.map(
|
|
25779
|
+
(example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
|
|
25780
|
+
)
|
|
25925
25781
|
]
|
|
25926
25782
|
}
|
|
25927
|
-
]
|
|
25928
|
-
actions: [{ label: "Run", command: claudeCommand }]
|
|
25783
|
+
]
|
|
25929
25784
|
}
|
|
25930
25785
|
},
|
|
25931
25786
|
{ json: jsonOutput }
|
|
25932
25787
|
);
|
|
25933
|
-
|
|
25934
|
-
return launchClaude(prompt);
|
|
25935
|
-
}
|
|
25936
|
-
return EXIT_OK2;
|
|
25788
|
+
return 0;
|
|
25937
25789
|
}
|
|
25938
25790
|
function registerQuickstartCommands(program) {
|
|
25939
25791
|
program.command("quickstart").description(
|
|
25940
|
-
"
|
|
25792
|
+
"Deprecated compatibility command. Use /deepline-gtm in your agent."
|
|
25941
25793
|
).addHelpText(
|
|
25942
25794
|
"after",
|
|
25943
25795
|
`
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
on the same machine as the CLI. Once a recipe arrives, the CLI prints the
|
|
25948
|
-
matching claude command and, when Claude Code is installed and the shell is
|
|
25949
|
-
interactive, launches it directly. Press Ctrl+C while waiting to skip.
|
|
25950
|
-
|
|
25951
|
-
Examples:
|
|
25952
|
-
deepline quickstart
|
|
25953
|
-
deepline quickstart --no-open
|
|
25954
|
-
deepline quickstart --no-launch --json
|
|
25955
|
-
deepline quickstart --timeout 120
|
|
25796
|
+
Deprecated:
|
|
25797
|
+
Use the installed /deepline-gtm skill in your agent. This compatibility
|
|
25798
|
+
command prints three starter prompts and no longer opens a browser.
|
|
25956
25799
|
`
|
|
25957
|
-
).option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--no-open", "
|
|
25958
|
-
"--timeout <seconds>",
|
|
25959
|
-
"Maximum seconds to wait for a selection",
|
|
25960
|
-
"300"
|
|
25961
|
-
).action(async (options) => {
|
|
25800
|
+
).option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--no-open", "Deprecated compatibility option").option("--no-launch", "Deprecated compatibility option").option("--timeout <seconds>", "Deprecated compatibility option").action(async (options) => {
|
|
25962
25801
|
process.exitCode = await handleQuickstart(options);
|
|
25963
25802
|
});
|
|
25964
25803
|
}
|
|
@@ -27931,9 +27770,9 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
27931
27770
|
const getDatasetItemsTool = stringField2(getDatasetItems, "tool");
|
|
27932
27771
|
const getDatasetItemsPayload = recordField2(getDatasetItems, "payload");
|
|
27933
27772
|
return {
|
|
27934
|
-
getActorRun: `deepline tools execute ${getActorRunTool} --input ${
|
|
27773
|
+
getActorRun: `deepline tools execute ${getActorRunTool} --input ${shellQuote3(JSON.stringify(getActorRunPayload))} --json`,
|
|
27935
27774
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
27936
|
-
getDatasetItems: `deepline tools execute ${getDatasetItemsTool} --input ${
|
|
27775
|
+
getDatasetItems: `deepline tools execute ${getDatasetItemsTool} --input ${shellQuote3(JSON.stringify(getDatasetItemsPayload))} --json`
|
|
27937
27776
|
} : {}
|
|
27938
27777
|
};
|
|
27939
27778
|
}
|
|
@@ -28106,7 +27945,7 @@ function parseExecuteOptions(args) {
|
|
|
28106
27945
|
function safeFileStem(value) {
|
|
28107
27946
|
return value.trim().replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64) || "tool";
|
|
28108
27947
|
}
|
|
28109
|
-
function
|
|
27948
|
+
function shellQuote3(value) {
|
|
28110
27949
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
28111
27950
|
}
|
|
28112
27951
|
function powerShellQuote(value) {
|
|
@@ -28176,7 +28015,7 @@ export default definePlay(${JSON.stringify(playName)}, async (ctx) => {
|
|
|
28176
28015
|
path: scriptPath,
|
|
28177
28016
|
sourceCode: script,
|
|
28178
28017
|
projectDir,
|
|
28179
|
-
macCopyCommand: `mkdir -p ${
|
|
28018
|
+
macCopyCommand: `mkdir -p ${shellQuote3(projectDir)} && cp ${shellQuote3(scriptPath)} ${shellQuote3(`${projectDir}/${fileName}`)}`,
|
|
28180
28019
|
windowsCopyCommand: `New-Item -ItemType Directory -Force -Path ${powerShellQuote(projectDir.replace(/\//g, "\\"))} | Out-Null; Copy-Item -LiteralPath ${powerShellQuote(scriptPath)} -Destination ${powerShellQuote(`${projectDir.replace(/\//g, "\\")}\\${fileName}`)}`
|
|
28181
28020
|
};
|
|
28182
28021
|
}
|
|
@@ -28200,7 +28039,7 @@ function buildToolExecuteBaseEnvelope(input2) {
|
|
|
28200
28039
|
envelope,
|
|
28201
28040
|
"output"
|
|
28202
28041
|
);
|
|
28203
|
-
const inspectCommand = `deepline tools execute ${input2.toolId} --input ${
|
|
28042
|
+
const inspectCommand = `deepline tools execute ${input2.toolId} --input ${shellQuote3(JSON.stringify(input2.params))} --json`;
|
|
28204
28043
|
const actions = input2.listConversion ? [
|
|
28205
28044
|
{
|
|
28206
28045
|
label: "next",
|
|
@@ -29054,7 +28893,7 @@ Notes:
|
|
|
29054
28893
|
}
|
|
29055
28894
|
|
|
29056
28895
|
// src/cli/commands/update.ts
|
|
29057
|
-
import { spawn as
|
|
28896
|
+
import { spawn as spawn3 } from "child_process";
|
|
29058
28897
|
import {
|
|
29059
28898
|
existsSync as existsSync12,
|
|
29060
28899
|
mkdirSync as mkdirSync10,
|
|
@@ -29069,7 +28908,7 @@ import { homedir as homedir12 } from "os";
|
|
|
29069
28908
|
import { dirname as dirname13, isAbsolute as isAbsolute3, join as join15, relative as relative2, resolve as resolve13 } from "path";
|
|
29070
28909
|
|
|
29071
28910
|
// src/cli/commands/skills.ts
|
|
29072
|
-
import { spawn as
|
|
28911
|
+
import { spawn as spawn2 } from "child_process";
|
|
29073
28912
|
import { existsSync as existsSync11, mkdirSync as mkdirSync9, readFileSync as readFileSync12, writeFileSync as writeFileSync14 } from "fs";
|
|
29074
28913
|
import { homedir as homedir11 } from "os";
|
|
29075
28914
|
import { dirname as dirname12, join as join14 } from "path";
|
|
@@ -29343,7 +29182,7 @@ function readSkillsInstallState(path) {
|
|
|
29343
29182
|
}
|
|
29344
29183
|
function runProcess(command, args, cwd) {
|
|
29345
29184
|
return new Promise((resolve15, reject) => {
|
|
29346
|
-
const child =
|
|
29185
|
+
const child = spawn2(command, args, {
|
|
29347
29186
|
cwd,
|
|
29348
29187
|
env: process.env,
|
|
29349
29188
|
stdio: ["ignore", "ignore", "pipe"],
|
|
@@ -29583,14 +29422,14 @@ function posixShellQuote(value) {
|
|
|
29583
29422
|
function windowsCmdQuote(value) {
|
|
29584
29423
|
return `"${value.replace(/"/g, '""')}"`;
|
|
29585
29424
|
}
|
|
29586
|
-
function
|
|
29425
|
+
function shellQuote4(value) {
|
|
29587
29426
|
if (process.platform === "win32") {
|
|
29588
29427
|
return /^[A-Za-z0-9_./:@%+=,-]+$/.test(value) ? value : windowsCmdQuote(value);
|
|
29589
29428
|
}
|
|
29590
29429
|
return posixShellQuote(value);
|
|
29591
29430
|
}
|
|
29592
29431
|
function buildSourceUpdateCommand(sourceRoot) {
|
|
29593
|
-
const quotedRoot =
|
|
29432
|
+
const quotedRoot = shellQuote4(sourceRoot);
|
|
29594
29433
|
const cdCommand = process.platform === "win32" ? `cd /d ${quotedRoot}` : `cd ${quotedRoot}`;
|
|
29595
29434
|
return `${cdCommand} && git fetch origin main --tags && git merge --ff-only origin/main`;
|
|
29596
29435
|
}
|
|
@@ -29602,7 +29441,7 @@ function buildSidecarProjectConfigCommand(versionDir, nodeBin) {
|
|
|
29602
29441
|
"fs.mkdirSync(dir,{recursive:true});",
|
|
29603
29442
|
`fs.writeFileSync(path.join(dir,'package.json'),${JSON.stringify(NPM_SDK_SIDECAR_PACKAGE_JSON)});`
|
|
29604
29443
|
].join("");
|
|
29605
|
-
return `${
|
|
29444
|
+
return `${shellQuote4(nodeBin)} -e ${shellQuote4(script)} ${shellQuote4(versionDir)}`;
|
|
29606
29445
|
}
|
|
29607
29446
|
function sidecarStateDir(input2) {
|
|
29608
29447
|
const scope = input2.env.DEEPLINE_CONFIG_SCOPE?.trim();
|
|
@@ -29665,7 +29504,7 @@ function resolvePythonSidecarUpdatePlan(options) {
|
|
|
29665
29504
|
const npmCommand = "npm";
|
|
29666
29505
|
const registryUrl = sidecarRegistryUrl(hostUrl);
|
|
29667
29506
|
const versionDir = join15(stateDir, "versions", "<version>");
|
|
29668
|
-
const manualCommand = `${buildSidecarProjectConfigCommand(versionDir, nodeBin)} && ${npmCommand} install --prefix ${
|
|
29507
|
+
const manualCommand = `${buildSidecarProjectConfigCommand(versionDir, nodeBin)} && ${npmCommand} install --prefix ${shellQuote4(versionDir)} --registry ${shellQuote4(registryUrl)} ${NPM_SDK_INSTALL_COMMON_FLAGS.map(shellQuote4).join(" ")} ${shellQuote4(packageSpec)}`;
|
|
29669
29508
|
return {
|
|
29670
29509
|
kind: "python-sidecar",
|
|
29671
29510
|
stateDir,
|
|
@@ -29749,7 +29588,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
29749
29588
|
fallbackRegistryUrl: publicNpmFallbackRegistryUrl(
|
|
29750
29589
|
env.DEEPLINE_HOST_URL?.trim() || autoDetectBaseUrl()
|
|
29751
29590
|
),
|
|
29752
|
-
manualCommand: `${command} ${args.map(
|
|
29591
|
+
manualCommand: `${command} ${args.map(shellQuote4).join(" ")}`
|
|
29753
29592
|
};
|
|
29754
29593
|
}
|
|
29755
29594
|
var AUTO_UPDATE_FAILURE_FILE = ".auto-update-failure.json";
|
|
@@ -29869,7 +29708,7 @@ function installedPackageVersion(versionDir) {
|
|
|
29869
29708
|
function runCommand(command, args, env = process.env) {
|
|
29870
29709
|
return new Promise((resolveResult) => {
|
|
29871
29710
|
let output2 = "";
|
|
29872
|
-
const child =
|
|
29711
|
+
const child = spawn3(command, args, {
|
|
29873
29712
|
stdio: ["inherit", "pipe", "pipe"],
|
|
29874
29713
|
shell: process.platform === "win32",
|
|
29875
29714
|
env
|
|
@@ -29954,9 +29793,9 @@ function writeSidecarLauncher(input2) {
|
|
|
29954
29793
|
input2.path,
|
|
29955
29794
|
[
|
|
29956
29795
|
"#!/usr/bin/env sh",
|
|
29957
|
-
`export DEEPLINE_HOST_URL=${
|
|
29958
|
-
`export DEEPLINE_CONFIG_SCOPE=${
|
|
29959
|
-
`exec ${
|
|
29796
|
+
`export DEEPLINE_HOST_URL=${shellQuote4(input2.hostUrl)}`,
|
|
29797
|
+
`export DEEPLINE_CONFIG_SCOPE=${shellQuote4(input2.scope)}`,
|
|
29798
|
+
`exec ${shellQuote4(input2.nodeBin)} ${shellQuote4(input2.entryPath)} "$@"`,
|
|
29960
29799
|
""
|
|
29961
29800
|
].join("\n"),
|
|
29962
29801
|
{ encoding: "utf8", mode: 493 }
|
|
@@ -30168,7 +30007,7 @@ Examples:
|
|
|
30168
30007
|
}
|
|
30169
30008
|
|
|
30170
30009
|
// src/cli/commands/setup.ts
|
|
30171
|
-
import { spawnSync
|
|
30010
|
+
import { spawnSync } from "child_process";
|
|
30172
30011
|
import {
|
|
30173
30012
|
existsSync as existsSync13,
|
|
30174
30013
|
lstatSync,
|
|
@@ -30279,6 +30118,15 @@ function resolveScopeRoot(scope) {
|
|
|
30279
30118
|
function authScopeForSetup(scope) {
|
|
30280
30119
|
return scope === "local" ? "folder" : "global";
|
|
30281
30120
|
}
|
|
30121
|
+
function shouldOpenSetupAuthorization(runtime = detectAgentRuntime()) {
|
|
30122
|
+
return runtime !== "claude_cowork";
|
|
30123
|
+
}
|
|
30124
|
+
function openSetupAuthorization(authorizationUrl, options = {}) {
|
|
30125
|
+
const url = authorizationUrl.trim();
|
|
30126
|
+
if (!url || !shouldOpenSetupAuthorization(options.runtime)) return false;
|
|
30127
|
+
(options.open ?? openInBrowser)(url);
|
|
30128
|
+
return true;
|
|
30129
|
+
}
|
|
30282
30130
|
function setupStatePath(baseUrl, scope, root) {
|
|
30283
30131
|
return scope === "local" && root ? join16(root, ".deepline", "setup", "state.json") : join16(sdkCliStateDirPath(baseUrl), "setup.json");
|
|
30284
30132
|
}
|
|
@@ -30361,7 +30209,7 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
30361
30209
|
return removed;
|
|
30362
30210
|
}
|
|
30363
30211
|
function resolvePathCommands(command) {
|
|
30364
|
-
const lookup =
|
|
30212
|
+
const lookup = spawnSync(
|
|
30365
30213
|
process.platform === "win32" ? "where" : "which",
|
|
30366
30214
|
process.platform === "win32" ? [command] : ["-a", command],
|
|
30367
30215
|
{ encoding: "utf8", shell: process.platform === "win32" }
|
|
@@ -30376,7 +30224,7 @@ function resolvePathCommand(command) {
|
|
|
30376
30224
|
return resolvePathCommands(command)[0] ?? null;
|
|
30377
30225
|
}
|
|
30378
30226
|
function resolvePersistentGlobalCommand() {
|
|
30379
|
-
const prefix =
|
|
30227
|
+
const prefix = spawnSync("npm", ["prefix", "-g"], { encoding: "utf8" });
|
|
30380
30228
|
if (prefix.status !== 0) return null;
|
|
30381
30229
|
const root = String(prefix.stdout ?? "").trim();
|
|
30382
30230
|
if (!root) return null;
|
|
@@ -30468,9 +30316,6 @@ function rollbackCommand(scope, root) {
|
|
|
30468
30316
|
const prefix = scope === "local" && root ? ` --prefix ${JSON.stringify(join16(root, ".deepline", "runtime"))}` : "";
|
|
30469
30317
|
return `npm install -g${prefix} --no-audit --no-fund --include=optional --allow-scripts=esbuild deepline@${SDK_VERSION}`;
|
|
30470
30318
|
}
|
|
30471
|
-
function setupQuickstartCommand(baseUrl) {
|
|
30472
|
-
return baseUrl === "https://code.deepline.com" ? "deepline quickstart" : `DEEPLINE_HOST_URL=${JSON.stringify(baseUrl)} deepline quickstart`;
|
|
30473
|
-
}
|
|
30474
30319
|
function setupResumeCommand(baseUrl, scope) {
|
|
30475
30320
|
const hostPrefix = baseUrl === "https://code.deepline.com" ? "" : `DEEPLINE_HOST_URL=${JSON.stringify(baseUrl)} `;
|
|
30476
30321
|
return `${hostPrefix}deepline setup --scope ${scope} --json`;
|
|
@@ -30620,7 +30465,7 @@ async function runDoctorCommand(options) {
|
|
|
30620
30465
|
root,
|
|
30621
30466
|
authStatus
|
|
30622
30467
|
});
|
|
30623
|
-
const
|
|
30468
|
+
const gettingStarted = deeplineGtmGettingStartedPayload();
|
|
30624
30469
|
printCommandEnvelope(
|
|
30625
30470
|
{
|
|
30626
30471
|
ok,
|
|
@@ -30628,7 +30473,8 @@ async function runDoctorCommand(options) {
|
|
|
30628
30473
|
code: ok ? "DOCTOR_OK" : "DOCTOR_FAILED",
|
|
30629
30474
|
exitCode: ok ? 0 : 7,
|
|
30630
30475
|
checks,
|
|
30631
|
-
next: ok ?
|
|
30476
|
+
next: ok ? DEEPLINE_GTM_SKILL : "Review failed checks, then rerun: deepline doctor --json",
|
|
30477
|
+
...ok ? { gettingStarted } : {},
|
|
30632
30478
|
render: {
|
|
30633
30479
|
sections: [
|
|
30634
30480
|
{
|
|
@@ -30657,6 +30503,7 @@ function pendingResult(input2) {
|
|
|
30657
30503
|
phases: input2.phases
|
|
30658
30504
|
});
|
|
30659
30505
|
if (input2.authorizationUrl) {
|
|
30506
|
+
openSetupAuthorization(input2.authorizationUrl);
|
|
30660
30507
|
process.stderr.write(`Authorize Deepline: ${input2.authorizationUrl}
|
|
30661
30508
|
`);
|
|
30662
30509
|
}
|
|
@@ -30740,7 +30587,7 @@ async function runSetupCommand(options) {
|
|
|
30740
30587
|
json: options.json,
|
|
30741
30588
|
extra: {
|
|
30742
30589
|
persistentPath: globalCli.persistentPath,
|
|
30743
|
-
fallback: "https://code.deepline.com/
|
|
30590
|
+
fallback: "https://code.deepline.com/SKILL.md"
|
|
30744
30591
|
}
|
|
30745
30592
|
});
|
|
30746
30593
|
}
|
|
@@ -30943,14 +30790,15 @@ async function runSetupCommand(options) {
|
|
|
30943
30790
|
root,
|
|
30944
30791
|
authStatus: auth
|
|
30945
30792
|
});
|
|
30946
|
-
const
|
|
30793
|
+
const gettingStarted = deeplineGtmGettingStartedPayload();
|
|
30947
30794
|
const doctorPayload = {
|
|
30948
30795
|
ok: assessment.ok,
|
|
30949
30796
|
status: assessment.ok ? "complete" : "failed",
|
|
30950
30797
|
code: assessment.ok ? "DOCTOR_OK" : "DOCTOR_FAILED",
|
|
30951
30798
|
exitCode: assessment.ok ? 0 : 7,
|
|
30952
30799
|
checks: assessment.checks,
|
|
30953
|
-
next: assessment.ok ?
|
|
30800
|
+
next: assessment.ok ? DEEPLINE_GTM_SKILL : `deepline doctor --scope ${scope} --json`,
|
|
30801
|
+
...assessment.ok ? { gettingStarted } : {}
|
|
30954
30802
|
};
|
|
30955
30803
|
if (!assessment.ok) {
|
|
30956
30804
|
return reportSetupPhaseFailure({
|
|
@@ -30997,14 +30845,19 @@ async function runSetupCommand(options) {
|
|
|
30997
30845
|
currentPhase: null,
|
|
30998
30846
|
failedPhase: null,
|
|
30999
30847
|
resumed,
|
|
31000
|
-
next:
|
|
30848
|
+
next: DEEPLINE_GTM_SKILL,
|
|
30849
|
+
gettingStarted,
|
|
31001
30850
|
render: {
|
|
31002
30851
|
sections: [
|
|
31003
30852
|
{
|
|
31004
30853
|
title: "setup",
|
|
31005
30854
|
lines: [
|
|
31006
30855
|
"Deepline is installed and connected.",
|
|
31007
|
-
`
|
|
30856
|
+
`Use ${DEEPLINE_GTM_SKILL} in your agent.`,
|
|
30857
|
+
...DEEPLINE_GTM_STARTER_PROMPTS.map(
|
|
30858
|
+
(example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
|
|
30859
|
+
),
|
|
30860
|
+
gettingStarted.question
|
|
31008
30861
|
]
|
|
31009
30862
|
}
|
|
31010
30863
|
]
|
|
@@ -31020,7 +30873,7 @@ function registerSetupCommands(program) {
|
|
|
31020
30873
|
`
|
|
31021
30874
|
Notes:
|
|
31022
30875
|
Setup is idempotent. Bare setup resumes the first incomplete or failed phase.
|
|
31023
|
-
It installs skills before auth and does not run
|
|
30876
|
+
It installs skills before auth and does not run a starter workflow.
|
|
31024
30877
|
JSON output includes phase status and an exact retry command.
|
|
31025
30878
|
|
|
31026
30879
|
Examples:
|
|
@@ -31143,7 +30996,7 @@ function unknownCommandNameFromMessage(message) {
|
|
|
31143
30996
|
}
|
|
31144
30997
|
|
|
31145
30998
|
// src/cli/self-update.ts
|
|
31146
|
-
import { spawn as
|
|
30999
|
+
import { spawn as spawn4 } from "child_process";
|
|
31147
31000
|
function envTruthy(name) {
|
|
31148
31001
|
const value = process.env[name]?.trim().toLowerCase();
|
|
31149
31002
|
return value === "1" || value === "true" || value === "yes";
|
|
@@ -31192,7 +31045,7 @@ function relaunchCurrentCommand(plan) {
|
|
|
31192
31045
|
return new Promise((resolve15) => {
|
|
31193
31046
|
const command = plan.kind === "python-sidecar" ? plan.sidecarPath : process.execPath;
|
|
31194
31047
|
const args = plan.kind === "python-sidecar" ? process.argv.slice(2) : process.argv.slice(1);
|
|
31195
|
-
const child =
|
|
31048
|
+
const child = spawn4(command, args, {
|
|
31196
31049
|
stdio: "inherit",
|
|
31197
31050
|
shell: process.platform === "win32",
|
|
31198
31051
|
env: {
|
|
@@ -31257,7 +31110,7 @@ async function maybeAutoUpdateAndRelaunch(response) {
|
|
|
31257
31110
|
}
|
|
31258
31111
|
|
|
31259
31112
|
// src/cli/skills-sync.ts
|
|
31260
|
-
import { spawn as
|
|
31113
|
+
import { spawn as spawn5, spawnSync as spawnSync2 } from "child_process";
|
|
31261
31114
|
import {
|
|
31262
31115
|
existsSync as existsSync14,
|
|
31263
31116
|
mkdirSync as mkdirSync12,
|
|
@@ -31406,13 +31259,13 @@ function buildBunxSkillsInstallArgs(baseUrl, skillNames) {
|
|
|
31406
31259
|
});
|
|
31407
31260
|
}
|
|
31408
31261
|
function hasCommand(command) {
|
|
31409
|
-
const result =
|
|
31262
|
+
const result = spawnSync2(command, ["--version"], {
|
|
31410
31263
|
stdio: "ignore",
|
|
31411
31264
|
shell: process.platform === "win32"
|
|
31412
31265
|
});
|
|
31413
31266
|
return result.status === 0;
|
|
31414
31267
|
}
|
|
31415
|
-
function
|
|
31268
|
+
function shellQuote5(arg) {
|
|
31416
31269
|
return `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
31417
31270
|
}
|
|
31418
31271
|
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES) {
|
|
@@ -31422,7 +31275,7 @@ function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NA
|
|
|
31422
31275
|
commands.push({
|
|
31423
31276
|
command: "bunx",
|
|
31424
31277
|
args: bunxArgs,
|
|
31425
|
-
manualCommand: `bunx ${bunxArgs.map(
|
|
31278
|
+
manualCommand: `bunx ${bunxArgs.map(shellQuote5).join(" ")}`
|
|
31426
31279
|
});
|
|
31427
31280
|
}
|
|
31428
31281
|
if (hasCommand("npx")) {
|
|
@@ -31430,14 +31283,14 @@ function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NA
|
|
|
31430
31283
|
commands.push({
|
|
31431
31284
|
command: "npx",
|
|
31432
31285
|
args: npxArgs,
|
|
31433
|
-
manualCommand: `npx ${npxArgs.map(
|
|
31286
|
+
manualCommand: `npx ${npxArgs.map(shellQuote5).join(" ")}`
|
|
31434
31287
|
});
|
|
31435
31288
|
}
|
|
31436
31289
|
return commands;
|
|
31437
31290
|
}
|
|
31438
31291
|
function runOneSkillsInstall(install) {
|
|
31439
31292
|
return new Promise((resolve15) => {
|
|
31440
|
-
const child =
|
|
31293
|
+
const child = spawn5(install.command, install.args, {
|
|
31441
31294
|
stdio: ["ignore", "ignore", "pipe"],
|
|
31442
31295
|
env: process.env
|
|
31443
31296
|
});
|
|
@@ -31521,7 +31374,7 @@ function runLegacySkillsCleanup() {
|
|
|
31521
31374
|
}
|
|
31522
31375
|
];
|
|
31523
31376
|
for (const candidate of candidates) {
|
|
31524
|
-
const result =
|
|
31377
|
+
const result = spawnSync2(candidate.command, candidate.args, {
|
|
31525
31378
|
stdio: "ignore",
|
|
31526
31379
|
env: process.env,
|
|
31527
31380
|
shell: process.platform === "win32"
|
package/dist/index.js
CHANGED
|
@@ -437,7 +437,7 @@ var SDK_RELEASE = {
|
|
|
437
437
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
438
438
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
439
439
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
440
|
-
version: "0.1.
|
|
440
|
+
version: "0.1.265",
|
|
441
441
|
apiContract: "2026-07-admin-cli-local-cutover",
|
|
442
442
|
supportPolicy: {
|
|
443
443
|
minimumSupported: "0.1.53",
|
package/dist/index.mjs
CHANGED
|
@@ -367,7 +367,7 @@ var SDK_RELEASE = {
|
|
|
367
367
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
368
368
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
369
369
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
370
|
-
version: "0.1.
|
|
370
|
+
version: "0.1.265",
|
|
371
371
|
apiContract: "2026-07-admin-cli-local-cutover",
|
|
372
372
|
supportPolicy: {
|
|
373
373
|
minimumSupported: "0.1.53",
|