deepline 0.3.160 → 0.3.161

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 CHANGED
@@ -16,11 +16,22 @@ Claude Code, Codex, or your terminal.
16
16
 
17
17
  ## Install
18
18
 
19
+ Check `npm --version` and use the matching command.
20
+
21
+ For npm 11.16 or newer:
22
+
23
+ ```bash
24
+ npm install -g --allow-scripts=esbuild deepline@latest
25
+ ```
26
+
27
+ For older npm:
28
+
19
29
  ```bash
20
30
  npm install -g deepline@latest
21
- deepline setup --json
22
31
  ```
23
32
 
33
+ Then run `deepline setup --json`.
34
+
24
35
  Setup opens your browser so you can sign in, then installs Deepline's skills
25
36
  for your coding agent. If global skill setup is unavailable, Deepline retries
26
37
  with project-local skills automatically.
@@ -30,7 +41,7 @@ with project-local skills automatically.
30
41
  Paste this into Claude Code, Codex, or another coding agent:
31
42
 
32
43
  ```text
33
- Set up https://code.deepline.com/INSTALL.md
44
+ Install the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md.
34
45
  ```
35
46
 
36
47
  Once setup is complete, tell your agent what you want to do:
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.160',
203
+ version: '0.3.161',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
package/dist/cli/index.js CHANGED
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
3051
3051
  // getters keep their established compatibility behavior.
3052
3052
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3053
3053
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3054
- version: "0.3.160",
3054
+ version: "0.3.161",
3055
3055
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3056
3056
  packageCapabilities: {
3057
3057
  updatePreferences: 1
@@ -42469,7 +42469,7 @@ Examples:
42469
42469
  }
42470
42470
 
42471
42471
  // src/cli/commands/setup.ts
42472
- var import_node_child_process4 = require("child_process");
42472
+ var import_node_child_process5 = require("child_process");
42473
42473
  var import_node_fs20 = require("fs");
42474
42474
  var import_node_os14 = require("os");
42475
42475
  var import_node_path25 = require("path");
@@ -44224,6 +44224,32 @@ Examples:
44224
44224
  });
44225
44225
  }
44226
44226
 
44227
+ // src/cli/npm-script-policy.ts
44228
+ var import_node_child_process4 = require("child_process");
44229
+ function npmSupportsAllowScripts(version) {
44230
+ const match = /^(\d+)\.(\d+)(?:\.|$)/.exec(version?.trim() ?? "");
44231
+ if (!match) return false;
44232
+ const major = Number(match[1]);
44233
+ const minor = Number(match[2]);
44234
+ return major > 11 || major === 11 && minor >= 16;
44235
+ }
44236
+ function readNpmVersion(env) {
44237
+ try {
44238
+ const plan = resolveShellSpawn("npm", ["--version"]);
44239
+ const result = (0, import_node_child_process4.spawnSync)(plan.command, plan.args, {
44240
+ encoding: "utf8",
44241
+ env,
44242
+ shell: plan.shell,
44243
+ stdio: ["ignore", "pipe", "ignore"],
44244
+ timeout: 5e3
44245
+ });
44246
+ if (result.status !== 0) return null;
44247
+ return String(result.stdout ?? "").trim() || null;
44248
+ } catch {
44249
+ return null;
44250
+ }
44251
+ }
44252
+
44227
44253
  // src/cli/commands/setup.ts
44228
44254
  var SETUP_PHASE_NAMES = [
44229
44255
  "cli",
@@ -44413,7 +44439,7 @@ function removeKnownLegacyPaths(baseUrl) {
44413
44439
  }).removeRetiredArtifacts();
44414
44440
  }
44415
44441
  function resolvePathCommands(command) {
44416
- const lookup = (0, import_node_child_process4.spawnSync)(
44442
+ const lookup = (0, import_node_child_process5.spawnSync)(
44417
44443
  process.platform === "win32" ? "where" : "which",
44418
44444
  process.platform === "win32" ? [command] : ["-a", command],
44419
44445
  { encoding: "utf8", shell: process.platform === "win32" }
@@ -44440,7 +44466,7 @@ function isHomebrewFormulaCommand(path) {
44440
44466
  }
44441
44467
  function resolvePersistentGlobalCommand(dependencies = {}) {
44442
44468
  const platform3 = dependencies.platform ?? process.platform;
44443
- const run = dependencies.spawn ?? import_node_child_process4.spawnSync;
44469
+ const run = dependencies.spawn ?? import_node_child_process5.spawnSync;
44444
44470
  const pathExists = dependencies.exists ?? import_node_fs20.existsSync;
44445
44471
  const pathClis = dependencies.pathClis ?? resolvePathCommands("deepline");
44446
44472
  const homebrewCommand = pathClis.find(isHomebrewFormulaCommand);
@@ -44539,7 +44565,8 @@ function failSetupPhase(phases, phase, code) {
44539
44565
  }
44540
44566
  function rollbackCommand(scope, root) {
44541
44567
  const prefix = scope === "local" && root ? ` --prefix ${JSON.stringify((0, import_node_path25.join)(root, ".deepline", "runtime"))}` : "";
44542
- return `npm install -g${prefix} --no-audit --no-fund --include=optional deepline@${SDK_VERSION}`;
44568
+ const allowScriptsFlag = npmSupportsAllowScripts(readNpmVersion(process.env)) ? " --allow-scripts=esbuild" : "";
44569
+ return `npm install -g${prefix} --no-audit --no-fund --include=optional${allowScriptsFlag} deepline@${SDK_VERSION}`;
44543
44570
  }
44544
44571
  function setupResumeCommand(baseUrl, scope) {
44545
44572
  const hostPrefix = baseUrl === "https://code.deepline.com" ? "" : `DEEPLINE_HOST_URL=${JSON.stringify(baseUrl)} `;
@@ -45280,7 +45307,7 @@ function consumePendingCliUpdateMessages(homeDir2 = (0, import_node_os15.homedir
45280
45307
  }
45281
45308
 
45282
45309
  // src/cli/commands/update.ts
45283
- var import_node_child_process5 = require("child_process");
45310
+ var import_node_child_process6 = require("child_process");
45284
45311
  var import_node_fs23 = require("fs");
45285
45312
  var import_node_os16 = require("os");
45286
45313
  var import_node_path28 = require("path");
@@ -45631,7 +45658,7 @@ function normalizedNpmPrefix(value) {
45631
45658
  function resolveNpmGlobalPrefix(env) {
45632
45659
  try {
45633
45660
  const plan = resolveShellSpawn("npm", ["prefix", "-g"]);
45634
- const result = (0, import_node_child_process5.spawnSync)(plan.command, plan.args, {
45661
+ const result = (0, import_node_child_process6.spawnSync)(plan.command, plan.args, {
45635
45662
  encoding: "utf8",
45636
45663
  env,
45637
45664
  shell: plan.shell,
@@ -45686,14 +45713,16 @@ function resolveUpdatePlan(options = {}) {
45686
45713
  const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
45687
45714
  const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
45688
45715
  const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
45716
+ const npmVersion = options.npmVersion === void 0 ? readNpmVersion(env) : options.npmVersion;
45717
+ const npmGlobalInstallFlags = npmSupportsAllowScripts(npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
45689
45718
  const args = installPrefix ? [
45690
45719
  "install",
45691
45720
  "-g",
45692
45721
  "--prefix",
45693
45722
  installPrefix,
45694
- ...NPM_SDK_INSTALL_COMMON_FLAGS,
45723
+ ...npmGlobalInstallFlags,
45695
45724
  packageSpec
45696
- ] : ["install", "-g", ...NPM_SDK_INSTALL_COMMON_FLAGS, packageSpec];
45725
+ ] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
45697
45726
  const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
45698
45727
  env.DEEPLINE_HOST_URL?.trim() || autoDetectBaseUrl()
45699
45728
  );
@@ -45843,7 +45872,7 @@ function runCommand(command, args, env = process.env) {
45843
45872
  return new Promise((resolveResult) => {
45844
45873
  let output2 = "";
45845
45874
  const plan = resolveShellSpawn(command, args);
45846
- const child = (0, import_node_child_process5.spawn)(plan.command, plan.args, {
45875
+ const child = (0, import_node_child_process6.spawn)(plan.command, plan.args, {
45847
45876
  stdio: ["inherit", "pipe", "pipe"],
45848
45877
  shell: plan.shell,
45849
45878
  env
@@ -50823,7 +50852,7 @@ function registerDeeplineCommandGroups(program) {
50823
50852
  }
50824
50853
 
50825
50854
  // src/cli/self-update.ts
50826
- var import_node_child_process6 = require("child_process");
50855
+ var import_node_child_process7 = require("child_process");
50827
50856
  var AUTO_UPDATE_TELEMETRY_TIMEOUT_MS = 2e3;
50828
50857
  var TRUSTED_AUTO_UPDATE_ORIGIN = "https://code.deepline.com";
50829
50858
  function trustedAutoUpdateRegistryUrl(baseUrl) {
@@ -50919,7 +50948,7 @@ function relaunchCurrentCommand(plan) {
50919
50948
  return new Promise((resolve22) => {
50920
50949
  const command = plan.kind === "python-sidecar" ? plan.sidecarPath : process.execPath;
50921
50950
  const args = plan.kind === "python-sidecar" ? process.argv.slice(2) : process.argv.slice(1);
50922
- const child = (0, import_node_child_process6.spawn)(command, args, {
50951
+ const child = (0, import_node_child_process7.spawn)(command, args, {
50923
50952
  stdio: "inherit",
50924
50953
  shell: process.platform === "win32",
50925
50954
  env: {
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
3046
3046
  // getters keep their established compatibility behavior.
3047
3047
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3048
3048
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3049
- version: "0.3.160",
3049
+ version: "0.3.161",
3050
3050
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3051
3051
  packageCapabilities: {
3052
3052
  updatePreferences: 1
@@ -42554,7 +42554,7 @@ Examples:
42554
42554
  }
42555
42555
 
42556
42556
  // src/cli/commands/setup.ts
42557
- import { spawnSync as spawnSync2 } from "child_process";
42557
+ import { spawnSync as spawnSync3 } from "child_process";
42558
42558
  import {
42559
42559
  existsSync as existsSync15,
42560
42560
  lstatSync as lstatSync2,
@@ -44331,6 +44331,32 @@ Examples:
44331
44331
  });
44332
44332
  }
44333
44333
 
44334
+ // src/cli/npm-script-policy.ts
44335
+ import { spawnSync as spawnSync2 } from "child_process";
44336
+ function npmSupportsAllowScripts(version) {
44337
+ const match = /^(\d+)\.(\d+)(?:\.|$)/.exec(version?.trim() ?? "");
44338
+ if (!match) return false;
44339
+ const major = Number(match[1]);
44340
+ const minor = Number(match[2]);
44341
+ return major > 11 || major === 11 && minor >= 16;
44342
+ }
44343
+ function readNpmVersion(env) {
44344
+ try {
44345
+ const plan = resolveShellSpawn("npm", ["--version"]);
44346
+ const result = spawnSync2(plan.command, plan.args, {
44347
+ encoding: "utf8",
44348
+ env,
44349
+ shell: plan.shell,
44350
+ stdio: ["ignore", "pipe", "ignore"],
44351
+ timeout: 5e3
44352
+ });
44353
+ if (result.status !== 0) return null;
44354
+ return String(result.stdout ?? "").trim() || null;
44355
+ } catch {
44356
+ return null;
44357
+ }
44358
+ }
44359
+
44334
44360
  // src/cli/commands/setup.ts
44335
44361
  var SETUP_PHASE_NAMES = [
44336
44362
  "cli",
@@ -44520,7 +44546,7 @@ function removeKnownLegacyPaths(baseUrl) {
44520
44546
  }).removeRetiredArtifacts();
44521
44547
  }
44522
44548
  function resolvePathCommands(command) {
44523
- const lookup = spawnSync2(
44549
+ const lookup = spawnSync3(
44524
44550
  process.platform === "win32" ? "where" : "which",
44525
44551
  process.platform === "win32" ? [command] : ["-a", command],
44526
44552
  { encoding: "utf8", shell: process.platform === "win32" }
@@ -44547,7 +44573,7 @@ function isHomebrewFormulaCommand(path) {
44547
44573
  }
44548
44574
  function resolvePersistentGlobalCommand(dependencies = {}) {
44549
44575
  const platform3 = dependencies.platform ?? process.platform;
44550
- const run = dependencies.spawn ?? spawnSync2;
44576
+ const run = dependencies.spawn ?? spawnSync3;
44551
44577
  const pathExists = dependencies.exists ?? existsSync15;
44552
44578
  const pathClis = dependencies.pathClis ?? resolvePathCommands("deepline");
44553
44579
  const homebrewCommand = pathClis.find(isHomebrewFormulaCommand);
@@ -44646,7 +44672,8 @@ function failSetupPhase(phases, phase, code) {
44646
44672
  }
44647
44673
  function rollbackCommand(scope, root) {
44648
44674
  const prefix = scope === "local" && root ? ` --prefix ${JSON.stringify(join20(root, ".deepline", "runtime"))}` : "";
44649
- return `npm install -g${prefix} --no-audit --no-fund --include=optional deepline@${SDK_VERSION}`;
44675
+ const allowScriptsFlag = npmSupportsAllowScripts(readNpmVersion(process.env)) ? " --allow-scripts=esbuild" : "";
44676
+ return `npm install -g${prefix} --no-audit --no-fund --include=optional${allowScriptsFlag} deepline@${SDK_VERSION}`;
44650
44677
  }
44651
44678
  function setupResumeCommand(baseUrl, scope) {
44652
44679
  const hostPrefix = baseUrl === "https://code.deepline.com" ? "" : `DEEPLINE_HOST_URL=${JSON.stringify(baseUrl)} `;
@@ -45394,7 +45421,7 @@ function consumePendingCliUpdateMessages(homeDir2 = homedir10()) {
45394
45421
  }
45395
45422
 
45396
45423
  // src/cli/commands/update.ts
45397
- import { spawn as spawn4, spawnSync as spawnSync3 } from "child_process";
45424
+ import { spawn as spawn4, spawnSync as spawnSync4 } from "child_process";
45398
45425
  import {
45399
45426
  existsSync as existsSync18,
45400
45427
  mkdirSync as mkdirSync14,
@@ -45761,7 +45788,7 @@ function normalizedNpmPrefix(value) {
45761
45788
  function resolveNpmGlobalPrefix(env) {
45762
45789
  try {
45763
45790
  const plan = resolveShellSpawn("npm", ["prefix", "-g"]);
45764
- const result = spawnSync3(plan.command, plan.args, {
45791
+ const result = spawnSync4(plan.command, plan.args, {
45765
45792
  encoding: "utf8",
45766
45793
  env,
45767
45794
  shell: plan.shell,
@@ -45816,14 +45843,16 @@ function resolveUpdatePlan(options = {}) {
45816
45843
  const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
45817
45844
  const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
45818
45845
  const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
45846
+ const npmVersion = options.npmVersion === void 0 ? readNpmVersion(env) : options.npmVersion;
45847
+ const npmGlobalInstallFlags = npmSupportsAllowScripts(npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
45819
45848
  const args = installPrefix ? [
45820
45849
  "install",
45821
45850
  "-g",
45822
45851
  "--prefix",
45823
45852
  installPrefix,
45824
- ...NPM_SDK_INSTALL_COMMON_FLAGS,
45853
+ ...npmGlobalInstallFlags,
45825
45854
  packageSpec
45826
- ] : ["install", "-g", ...NPM_SDK_INSTALL_COMMON_FLAGS, packageSpec];
45855
+ ] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
45827
45856
  const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
45828
45857
  env.DEEPLINE_HOST_URL?.trim() || autoDetectBaseUrl()
45829
45858
  );
package/dist/index.js CHANGED
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
864
864
  // getters keep their established compatibility behavior.
865
865
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
866
866
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
867
- version: "0.3.160",
867
+ version: "0.3.161",
868
868
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
869
869
  packageCapabilities: {
870
870
  updatePreferences: 1
package/dist/index.mjs CHANGED
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
768
768
  // getters keep their established compatibility behavior.
769
769
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
770
770
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
771
- version: "0.3.160",
771
+ version: "0.3.161",
772
772
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
773
773
  packageCapabilities: {
774
774
  updatePreferences: 1
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.160";
152
+ readonly version: "0.3.161";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.d.ts CHANGED
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.160";
152
+ readonly version: "0.3.161";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.js CHANGED
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
74
74
  // getters keep their established compatibility behavior.
75
75
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
76
76
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
77
- version: "0.3.160",
77
+ version: "0.3.161",
78
78
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
79
79
  packageCapabilities: {
80
80
  updatePreferences: 1
package/dist/release.mjs CHANGED
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
48
48
  // getters keep their established compatibility behavior.
49
49
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
50
50
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
51
- version: "0.3.160",
51
+ version: "0.3.161",
52
52
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
53
53
  packageCapabilities: {
54
54
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.160",
3
+ "version": "0.3.161",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",