deepline 0.3.294 → 0.3.295

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.
Files changed (136) hide show
  1. package/dist/bundling-sources/sdk/src/compat.ts +35 -7
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +14 -1
  4. package/dist/cli/auth-EDTRERZP.mjs +31 -0
  5. package/dist/cli/auth-TDHKB277.js +31 -0
  6. package/dist/cli/billing-ELIDPILY.js +1749 -0
  7. package/dist/cli/billing-EXGXJVAU.mjs +1749 -0
  8. package/dist/cli/chunk-2S5Y3TZP.js +5688 -0
  9. package/dist/cli/chunk-3KC45UVF.js +150 -0
  10. package/dist/cli/chunk-3XX5TEA4.js +15 -0
  11. package/dist/cli/chunk-4MBOJQPL.mjs +0 -0
  12. package/dist/cli/chunk-4NEFYBF7.js +2240 -0
  13. package/dist/cli/chunk-5JLQPVNX.js +3056 -0
  14. package/dist/cli/chunk-5KDKFHZI.js +1269 -0
  15. package/dist/cli/chunk-6A3TJUWC.js +76 -0
  16. package/dist/cli/chunk-6O5YZOVN.mjs +890 -0
  17. package/dist/cli/chunk-7P5AA3SN.js +344 -0
  18. package/dist/cli/chunk-AYHLUHE5.js +52 -0
  19. package/dist/cli/chunk-CBVIJSHF.mjs +560 -0
  20. package/dist/cli/chunk-CFVVCN4A.js +735 -0
  21. package/dist/cli/chunk-COGTRVWW.js +30 -0
  22. package/dist/cli/chunk-D4AZUZO4.js +190 -0
  23. package/dist/cli/chunk-DLIRSHV6.mjs +28 -0
  24. package/dist/cli/chunk-EACVZI6N.mjs +1995 -0
  25. package/dist/cli/chunk-EDWJY6T4.mjs +3056 -0
  26. package/dist/cli/chunk-EXMLR72R.mjs +0 -0
  27. package/dist/cli/chunk-F35VOIQL.js +890 -0
  28. package/dist/cli/chunk-GAMFK2ZP.mjs +148 -0
  29. package/dist/cli/chunk-GHRQQPW2.mjs +2240 -0
  30. package/dist/cli/chunk-GONRLVV3.js +3440 -0
  31. package/dist/cli/chunk-GVUJJJ5G.mjs +76 -0
  32. package/dist/cli/chunk-H7HIDGZ7.mjs +150 -0
  33. package/dist/cli/chunk-HUZXWOSK.mjs +503 -0
  34. package/dist/cli/chunk-I5YZLGMG.js +1 -0
  35. package/dist/cli/chunk-ITOFSXIU.mjs +15 -0
  36. package/dist/cli/chunk-J5NA2TTX.js +503 -0
  37. package/dist/cli/chunk-JCS5TPNY.mjs +3440 -0
  38. package/dist/cli/chunk-JNNOCMQY.js +47 -0
  39. package/dist/cli/chunk-KRD6H754.mjs +30 -0
  40. package/dist/cli/chunk-LA46MMTL.js +560 -0
  41. package/dist/cli/chunk-LDWT7RJK.mjs +190 -0
  42. package/dist/cli/chunk-M2V26OR5.js +499 -0
  43. package/dist/cli/chunk-MIMASXO4.mjs +389 -0
  44. package/dist/cli/chunk-MROPCKW2.mjs +190 -0
  45. package/dist/cli/chunk-NXDRDJ4K.js +389 -0
  46. package/dist/cli/chunk-NXGCO4JB.mjs +344 -0
  47. package/dist/cli/chunk-OG64RBAC.js +6 -0
  48. package/dist/cli/chunk-OQYEC4GL.mjs +34 -0
  49. package/dist/cli/chunk-OWJZUE3Y.mjs +103 -0
  50. package/dist/cli/chunk-SDK3ZA2C.js +103 -0
  51. package/dist/cli/chunk-SFLARO4Y.mjs +47 -0
  52. package/dist/cli/chunk-SVIIIYIQ.js +923 -0
  53. package/dist/cli/chunk-TAC3JIFE.mjs +354 -0
  54. package/dist/cli/chunk-U3PI7HBM.js +34 -0
  55. package/dist/cli/chunk-UFS752TU.mjs +52 -0
  56. package/dist/cli/chunk-UI37DQE7.mjs +499 -0
  57. package/dist/cli/chunk-UNEMDKXN.js +1 -0
  58. package/dist/cli/chunk-WB6Z2Q44.mjs +1622 -0
  59. package/dist/cli/chunk-WJYPBHTE.js +148 -0
  60. package/dist/cli/chunk-WOHBA5PV.js +354 -0
  61. package/dist/cli/chunk-WQICC2B3.js +190 -0
  62. package/dist/cli/chunk-WZYKRD7T.mjs +6 -0
  63. package/dist/cli/chunk-XL2FO6CW.mjs +5688 -0
  64. package/dist/cli/chunk-XNYIZMNQ.js +28 -0
  65. package/dist/cli/chunk-XRK2TZT5.js +1995 -0
  66. package/dist/cli/chunk-YJYPL5OK.mjs +1269 -0
  67. package/dist/cli/chunk-YWNDYCXR.mjs +735 -0
  68. package/dist/cli/chunk-YWWAF7KZ.mjs +923 -0
  69. package/dist/cli/chunk-ZDO3TO3M.js +1622 -0
  70. package/dist/cli/client-4JVOYVC5.js +20 -0
  71. package/dist/cli/client-EEN2IJN2.mjs +20 -0
  72. package/dist/cli/csv-BOHBEP2I.mjs +585 -0
  73. package/dist/cli/csv-S5NYRUEX.js +585 -0
  74. package/dist/cli/db-CLODWCOB.mjs +486 -0
  75. package/dist/cli/db-F6PKFOOV.js +486 -0
  76. package/dist/cli/executions-5TQAKLJU.js +28 -0
  77. package/dist/cli/executions-MAKW6QOY.mjs +28 -0
  78. package/dist/cli/feedback-GV4QJFEN.js +107 -0
  79. package/dist/cli/feedback-XY24TW7H.mjs +107 -0
  80. package/dist/cli/getting-started.js +18 -76
  81. package/dist/cli/getting-started.mjs +10 -37
  82. package/dist/cli/git-6S2C22T5.js +23 -0
  83. package/dist/cli/git-OZLBD5HH.mjs +23 -0
  84. package/dist/cli/index.js +291 -54294
  85. package/dist/cli/index.mjs +209 -54352
  86. package/dist/cli/legacy-noops-LLCGDPQE.js +157 -0
  87. package/dist/cli/legacy-noops-TYH3TW2D.mjs +157 -0
  88. package/dist/cli/monitors-CABMB4DW.js +3251 -0
  89. package/dist/cli/monitors-TTD55HMK.mjs +3251 -0
  90. package/dist/cli/org-MSF3RG76.js +849 -0
  91. package/dist/cli/org-SFJ77MWY.mjs +849 -0
  92. package/dist/cli/play-NXHJSCKL.mjs +18439 -0
  93. package/dist/cli/play-OKSFNNO4.js +18439 -0
  94. package/dist/cli/providers-QC2ERERL.js +95 -0
  95. package/dist/cli/providers-TIIAZEUA.mjs +95 -0
  96. package/dist/cli/proxy-env-EBANZHPV.js +161 -0
  97. package/dist/cli/proxy-env-M4ZHXHRL.mjs +161 -0
  98. package/dist/cli/quickstart-ICANHLMI.js +69 -0
  99. package/dist/cli/quickstart-KWUOP3FI.mjs +69 -0
  100. package/dist/cli/search-U5H2FDOO.mjs +18 -0
  101. package/dist/cli/search-XQRQOLWS.js +18 -0
  102. package/dist/cli/secrets-3J6YTWFA.mjs +400 -0
  103. package/dist/cli/secrets-YNMNZNOM.js +400 -0
  104. package/dist/cli/sessions-CLEES4L6.mjs +15 -0
  105. package/dist/cli/sessions-J6VR47FG.js +15 -0
  106. package/dist/cli/settings-EEKZMTY4.js +846 -0
  107. package/dist/cli/settings-UVLOQZRH.mjs +846 -0
  108. package/dist/cli/setup-DLMDXPGJ.mjs +1257 -0
  109. package/dist/cli/setup-HC4Q7QM4.js +1257 -0
  110. package/dist/cli/skills-33PHFBSB.mjs +28 -0
  111. package/dist/cli/skills-LFRY3KPX.js +28 -0
  112. package/dist/cli/tools-3COEPKML.mjs +2955 -0
  113. package/dist/cli/tools-QXEVCN45.js +2955 -0
  114. package/dist/cli/update-LSAC4FF5.mjs +28 -0
  115. package/dist/cli/update-NXHSPYXA.js +28 -0
  116. package/dist/cli/workflow-7S44OECF.mjs +1936 -0
  117. package/dist/cli/workflow-QPZWYSZE.js +1936 -0
  118. package/dist/helpers.js +6 -32
  119. package/dist/helpers.mjs +2 -0
  120. package/dist/index.js +1972 -12825
  121. package/dist/index.mjs +1910 -12672
  122. package/dist/install-integrity.json +110 -0
  123. package/dist/monitor-fleet-contract.js +31 -730
  124. package/dist/monitor-fleet-contract.mjs +18 -667
  125. package/dist/monitor-input-contract.js +10 -390
  126. package/dist/monitor-input-contract.mjs +7 -348
  127. package/dist/plays/bundle-play-file.mjs +13 -5178
  128. package/dist/plays/csv-data-input.js +5 -3132
  129. package/dist/plays/csv-data-input.mjs +5 -3105
  130. package/dist/plays/run-request.js +56 -664
  131. package/dist/plays/run-request.mjs +30 -588
  132. package/dist/release.d.mts +1 -1
  133. package/dist/release.d.ts +1 -1
  134. package/dist/release.js +5 -212
  135. package/dist/release.mjs +5 -185
  136. package/package.json +1 -1
@@ -0,0 +1,95 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunk2S5Y3TZPjs = require('./chunk-2S5Y3TZP.js');
4
+ require('./chunk-LA46MMTL.js');
5
+
6
+
7
+
8
+ var _chunkF35VOIQLjs = require('./chunk-F35VOIQL.js');
9
+ require('./chunk-XRK2TZT5.js');
10
+ require('./chunk-XNYIZMNQ.js');
11
+ require('./chunk-D4AZUZO4.js');
12
+ require('./chunk-6A3TJUWC.js');
13
+ require('./chunk-7P5AA3SN.js');
14
+ require('./chunk-OG64RBAC.js');
15
+ require('./chunk-COGTRVWW.js');
16
+
17
+ // src/cli/commands/providers.ts
18
+ async function listProviders(options = {}) {
19
+ const client = new (0, _chunk2S5Y3TZPjs.DeeplineClient)();
20
+ const changed = options.changed === true;
21
+ const emitJson = options.json === true || _chunkF35VOIQLjs.shouldEmitJson.call(void 0, );
22
+ const providers = await client.listProviders({ changed });
23
+ const render = {
24
+ sections: [
25
+ {
26
+ title: changed ? `${providers.length} recently added providers:` : `${providers.length} providers:`,
27
+ lines: providers.map((provider) => {
28
+ const release = provider.releasedAt ? ` - v${_nullishCoalesce(provider.version, () => ( "unknown"))} (${provider.releasedAt})` : "";
29
+ return `${provider.provider} (${provider.displayName}) - ${provider.toolCount} tools${release}`;
30
+ })
31
+ },
32
+ {
33
+ title: "next",
34
+ lines: [
35
+ "Run `deepline tools list <category>` to browse provider tools by category."
36
+ ]
37
+ }
38
+ ]
39
+ };
40
+ _chunkF35VOIQLjs.printCommandEnvelope.call(void 0,
41
+ {
42
+ providers,
43
+ count: providers.length,
44
+ filters: { changed },
45
+ commandTemplates: {
46
+ list: "deepline providers list",
47
+ changed: "deepline providers list --changed"
48
+ },
49
+ render
50
+ },
51
+ { json: emitJson }
52
+ );
53
+ return 0;
54
+ }
55
+ function registerProviderCommands(program) {
56
+ const providers = program.command("providers").description("Browse the catalog of provider integrations.").addHelpText(
57
+ "after",
58
+ `
59
+ Notes:
60
+ This directory is served by Deepline's provider catalog; it does not require
61
+ cloning a public plugins repository. Use --changed to show recently added
62
+ providers with their catalog version and release date.
63
+
64
+ Examples:
65
+ deepline providers list
66
+ deepline providers list --changed
67
+ deepline providers list --changed --json
68
+ `
69
+ );
70
+ providers.command("list").description("List discoverable providers and their available tool counts.").addHelpText(
71
+ "after",
72
+ `
73
+ Notes:
74
+ The catalog does not require cloning a public plugins repository. Use
75
+ --changed to show recently added providers with their catalog version and
76
+ release date.
77
+
78
+ Examples:
79
+ deepline providers list
80
+ deepline providers list --changed
81
+ deepline providers list --changed --json
82
+ `
83
+ ).option(
84
+ "--changed",
85
+ "Only list recently added providers with release metadata"
86
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
87
+ process.exitCode = await listProviders({
88
+ changed: Boolean(options.changed),
89
+ json: Boolean(options.json)
90
+ });
91
+ });
92
+ }
93
+
94
+
95
+ exports.registerProviderCommands = registerProviderCommands;
@@ -0,0 +1,95 @@
1
+ import {
2
+ DeeplineClient
3
+ } from "./chunk-XL2FO6CW.mjs";
4
+ import "./chunk-CBVIJSHF.mjs";
5
+ import {
6
+ printCommandEnvelope,
7
+ shouldEmitJson
8
+ } from "./chunk-6O5YZOVN.mjs";
9
+ import "./chunk-EACVZI6N.mjs";
10
+ import "./chunk-DLIRSHV6.mjs";
11
+ import "./chunk-LDWT7RJK.mjs";
12
+ import "./chunk-GVUJJJ5G.mjs";
13
+ import "./chunk-NXGCO4JB.mjs";
14
+ import "./chunk-WZYKRD7T.mjs";
15
+ import "./chunk-KRD6H754.mjs";
16
+
17
+ // src/cli/commands/providers.ts
18
+ async function listProviders(options = {}) {
19
+ const client = new DeeplineClient();
20
+ const changed = options.changed === true;
21
+ const emitJson = options.json === true || shouldEmitJson();
22
+ const providers = await client.listProviders({ changed });
23
+ const render = {
24
+ sections: [
25
+ {
26
+ title: changed ? `${providers.length} recently added providers:` : `${providers.length} providers:`,
27
+ lines: providers.map((provider) => {
28
+ const release = provider.releasedAt ? ` - v${provider.version ?? "unknown"} (${provider.releasedAt})` : "";
29
+ return `${provider.provider} (${provider.displayName}) - ${provider.toolCount} tools${release}`;
30
+ })
31
+ },
32
+ {
33
+ title: "next",
34
+ lines: [
35
+ "Run `deepline tools list <category>` to browse provider tools by category."
36
+ ]
37
+ }
38
+ ]
39
+ };
40
+ printCommandEnvelope(
41
+ {
42
+ providers,
43
+ count: providers.length,
44
+ filters: { changed },
45
+ commandTemplates: {
46
+ list: "deepline providers list",
47
+ changed: "deepline providers list --changed"
48
+ },
49
+ render
50
+ },
51
+ { json: emitJson }
52
+ );
53
+ return 0;
54
+ }
55
+ function registerProviderCommands(program) {
56
+ const providers = program.command("providers").description("Browse the catalog of provider integrations.").addHelpText(
57
+ "after",
58
+ `
59
+ Notes:
60
+ This directory is served by Deepline's provider catalog; it does not require
61
+ cloning a public plugins repository. Use --changed to show recently added
62
+ providers with their catalog version and release date.
63
+
64
+ Examples:
65
+ deepline providers list
66
+ deepline providers list --changed
67
+ deepline providers list --changed --json
68
+ `
69
+ );
70
+ providers.command("list").description("List discoverable providers and their available tool counts.").addHelpText(
71
+ "after",
72
+ `
73
+ Notes:
74
+ The catalog does not require cloning a public plugins repository. Use
75
+ --changed to show recently added providers with their catalog version and
76
+ release date.
77
+
78
+ Examples:
79
+ deepline providers list
80
+ deepline providers list --changed
81
+ deepline providers list --changed --json
82
+ `
83
+ ).option(
84
+ "--changed",
85
+ "Only list recently added providers with release metadata"
86
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
87
+ process.exitCode = await listProviders({
88
+ changed: Boolean(options.changed),
89
+ json: Boolean(options.json)
90
+ });
91
+ });
92
+ }
93
+ export {
94
+ registerProviderCommands
95
+ };
@@ -0,0 +1,161 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;require('./chunk-COGTRVWW.js');
2
+
3
+ // src/cli/proxy-env.ts
4
+ var _undici = require('undici');
5
+ function defaultPort(protocol) {
6
+ return protocol === "https:" ? "443" : "80";
7
+ }
8
+ function proxyEnvValue(name) {
9
+ return _nullishCoalesce(_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2[name], 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]), () => ( ""));
10
+ }
11
+ function firstProxyEnv(...names) {
12
+ for (const name of names) {
13
+ const value = proxyEnvValue(name);
14
+ if (value) {
15
+ return value;
16
+ }
17
+ }
18
+ return "";
19
+ }
20
+ function ipv4ToNumber(value) {
21
+ const parts = value.split(".");
22
+ if (parts.length !== 4) {
23
+ return null;
24
+ }
25
+ let result = 0;
26
+ for (const part of parts) {
27
+ if (!/^\d+$/.test(part)) {
28
+ return null;
29
+ }
30
+ const parsed = Number(part);
31
+ if (parsed < 0 || parsed > 255) {
32
+ return null;
33
+ }
34
+ result = (result << 8) + parsed;
35
+ }
36
+ return result >>> 0;
37
+ }
38
+ function ipv4MatchesCidr(hostname, cidr) {
39
+ const [range, bitsRaw] = cidr.split("/");
40
+ const hostValue = ipv4ToNumber(hostname);
41
+ const rangeValue = range ? ipv4ToNumber(range) : null;
42
+ const bits = Number(bitsRaw);
43
+ if (hostValue === null || rangeValue === null || !Number.isInteger(bits) || bits < 0 || bits > 32) {
44
+ return false;
45
+ }
46
+ const mask = bits === 0 ? 0 : 4294967295 << 32 - bits >>> 0;
47
+ return (hostValue & mask) === (rangeValue & mask);
48
+ }
49
+ function splitNoProxyHostPort(entry) {
50
+ const bracketed = entry.match(/^\[([^\]]+)\](?::(\d+))?$/);
51
+ if (bracketed) {
52
+ return { host: bracketed[1].toLowerCase(), port: _nullishCoalesce(bracketed[2], () => ( null)) };
53
+ }
54
+ const portMatch = entry.match(/^([^:]+):(\d+)$/);
55
+ if (portMatch) {
56
+ return { host: portMatch[1].toLowerCase(), port: _nullishCoalesce(portMatch[2], () => ( null)) };
57
+ }
58
+ return { host: entry.toLowerCase(), port: null };
59
+ }
60
+ function noProxyMatches(url, noProxy) {
61
+ const hostname = url.hostname.replace(/^\[|\]$/g, "").toLowerCase();
62
+ const port = url.port || defaultPort(url.protocol);
63
+ for (const rawEntry of noProxy.split(/[,\s]+/)) {
64
+ const entry = rawEntry.trim().toLowerCase();
65
+ if (!entry) {
66
+ continue;
67
+ }
68
+ if (entry === "*") {
69
+ return true;
70
+ }
71
+ const { host, port: entryPort } = splitNoProxyHostPort(entry);
72
+ if (entryPort && entryPort !== port) {
73
+ continue;
74
+ }
75
+ if (host.includes("/") && ipv4MatchesCidr(hostname, host)) {
76
+ return true;
77
+ }
78
+ if (host.startsWith("*.")) {
79
+ const suffix = host.slice(2);
80
+ if (hostname.endsWith(`.${suffix}`)) {
81
+ return true;
82
+ }
83
+ continue;
84
+ }
85
+ if (host.startsWith(".")) {
86
+ const suffix = host.slice(1);
87
+ if (hostname === suffix || hostname.endsWith(host)) {
88
+ return true;
89
+ }
90
+ continue;
91
+ }
92
+ if (hostname === host || hostname.endsWith(`.${host}`)) {
93
+ return true;
94
+ }
95
+ }
96
+ return false;
97
+ }
98
+ var EnvProxyDispatcher = (_class = class extends _undici.Dispatcher {
99
+ __init() {this.directAgent = new (0, _undici.Agent)()}
100
+
101
+
102
+
103
+ constructor(options) {
104
+ super();_class.prototype.__init.call(this);;
105
+ this.httpProxyAgent = options.httpProxy ? new (0, _undici.ProxyAgent)(options.httpProxy) : null;
106
+ this.httpsProxyAgent = options.httpsProxy ? new (0, _undici.ProxyAgent)(options.httpsProxy) : this.httpProxyAgent;
107
+ this.noProxy = options.noProxy;
108
+ }
109
+ dispatch(options, handler) {
110
+ const origin = new URL(String(options.origin));
111
+ if (this.noProxy && noProxyMatches(origin, this.noProxy)) {
112
+ return this.directAgent.dispatch(options, handler);
113
+ }
114
+ const proxyAgent = origin.protocol === "https:" ? this.httpsProxyAgent : this.httpProxyAgent;
115
+ return (_nullishCoalesce(proxyAgent, () => ( this.directAgent))).dispatch(options, handler);
116
+ }
117
+ close(callback) {
118
+ const promise = Promise.all([
119
+ this.directAgent.close(),
120
+ _optionalChain([this, 'access', _5 => _5.httpProxyAgent, 'optionalAccess', _6 => _6.close, 'call', _7 => _7()]),
121
+ this.httpsProxyAgent && this.httpsProxyAgent !== this.httpProxyAgent ? this.httpsProxyAgent.close() : void 0
122
+ ]).then(() => void 0);
123
+ if (callback) {
124
+ promise.then(callback, callback);
125
+ return;
126
+ }
127
+ return promise;
128
+ }
129
+ destroy(errorOrCallback, callback) {
130
+ const error = typeof errorOrCallback === "function" ? null : _nullishCoalesce(errorOrCallback, () => ( null));
131
+ const done = typeof errorOrCallback === "function" ? errorOrCallback : callback;
132
+ const promise = Promise.all([
133
+ this.directAgent.destroy(error),
134
+ _optionalChain([this, 'access', _8 => _8.httpProxyAgent, 'optionalAccess', _9 => _9.destroy, 'call', _10 => _10(error)]),
135
+ this.httpsProxyAgent && this.httpsProxyAgent !== this.httpProxyAgent ? this.httpsProxyAgent.destroy(error) : void 0
136
+ ]).then(() => void 0);
137
+ if (done) {
138
+ promise.then(done, done);
139
+ return;
140
+ }
141
+ return promise;
142
+ }
143
+ }, _class);
144
+ function configureProxyFromEnv() {
145
+ const httpProxy = firstProxyEnv("HTTP_PROXY", "http_proxy");
146
+ const httpsProxy = firstProxyEnv("HTTPS_PROXY", "https_proxy") || httpProxy;
147
+ if (!httpProxy && !httpsProxy) {
148
+ return;
149
+ }
150
+ _undici.setGlobalDispatcher.call(void 0,
151
+ new EnvProxyDispatcher({
152
+ httpProxy,
153
+ httpsProxy,
154
+ noProxy: firstProxyEnv("NO_PROXY", "no_proxy")
155
+ })
156
+ );
157
+ }
158
+ configureProxyFromEnv();
159
+
160
+
161
+ exports.configureProxyFromEnv = configureProxyFromEnv;
@@ -0,0 +1,161 @@
1
+ import "./chunk-KRD6H754.mjs";
2
+
3
+ // src/cli/proxy-env.ts
4
+ import { Agent, Dispatcher, ProxyAgent, setGlobalDispatcher } from "undici";
5
+ function defaultPort(protocol) {
6
+ return protocol === "https:" ? "443" : "80";
7
+ }
8
+ function proxyEnvValue(name) {
9
+ return process.env[name]?.trim() ?? "";
10
+ }
11
+ function firstProxyEnv(...names) {
12
+ for (const name of names) {
13
+ const value = proxyEnvValue(name);
14
+ if (value) {
15
+ return value;
16
+ }
17
+ }
18
+ return "";
19
+ }
20
+ function ipv4ToNumber(value) {
21
+ const parts = value.split(".");
22
+ if (parts.length !== 4) {
23
+ return null;
24
+ }
25
+ let result = 0;
26
+ for (const part of parts) {
27
+ if (!/^\d+$/.test(part)) {
28
+ return null;
29
+ }
30
+ const parsed = Number(part);
31
+ if (parsed < 0 || parsed > 255) {
32
+ return null;
33
+ }
34
+ result = (result << 8) + parsed;
35
+ }
36
+ return result >>> 0;
37
+ }
38
+ function ipv4MatchesCidr(hostname, cidr) {
39
+ const [range, bitsRaw] = cidr.split("/");
40
+ const hostValue = ipv4ToNumber(hostname);
41
+ const rangeValue = range ? ipv4ToNumber(range) : null;
42
+ const bits = Number(bitsRaw);
43
+ if (hostValue === null || rangeValue === null || !Number.isInteger(bits) || bits < 0 || bits > 32) {
44
+ return false;
45
+ }
46
+ const mask = bits === 0 ? 0 : 4294967295 << 32 - bits >>> 0;
47
+ return (hostValue & mask) === (rangeValue & mask);
48
+ }
49
+ function splitNoProxyHostPort(entry) {
50
+ const bracketed = entry.match(/^\[([^\]]+)\](?::(\d+))?$/);
51
+ if (bracketed) {
52
+ return { host: bracketed[1].toLowerCase(), port: bracketed[2] ?? null };
53
+ }
54
+ const portMatch = entry.match(/^([^:]+):(\d+)$/);
55
+ if (portMatch) {
56
+ return { host: portMatch[1].toLowerCase(), port: portMatch[2] ?? null };
57
+ }
58
+ return { host: entry.toLowerCase(), port: null };
59
+ }
60
+ function noProxyMatches(url, noProxy) {
61
+ const hostname = url.hostname.replace(/^\[|\]$/g, "").toLowerCase();
62
+ const port = url.port || defaultPort(url.protocol);
63
+ for (const rawEntry of noProxy.split(/[,\s]+/)) {
64
+ const entry = rawEntry.trim().toLowerCase();
65
+ if (!entry) {
66
+ continue;
67
+ }
68
+ if (entry === "*") {
69
+ return true;
70
+ }
71
+ const { host, port: entryPort } = splitNoProxyHostPort(entry);
72
+ if (entryPort && entryPort !== port) {
73
+ continue;
74
+ }
75
+ if (host.includes("/") && ipv4MatchesCidr(hostname, host)) {
76
+ return true;
77
+ }
78
+ if (host.startsWith("*.")) {
79
+ const suffix = host.slice(2);
80
+ if (hostname.endsWith(`.${suffix}`)) {
81
+ return true;
82
+ }
83
+ continue;
84
+ }
85
+ if (host.startsWith(".")) {
86
+ const suffix = host.slice(1);
87
+ if (hostname === suffix || hostname.endsWith(host)) {
88
+ return true;
89
+ }
90
+ continue;
91
+ }
92
+ if (hostname === host || hostname.endsWith(`.${host}`)) {
93
+ return true;
94
+ }
95
+ }
96
+ return false;
97
+ }
98
+ var EnvProxyDispatcher = class extends Dispatcher {
99
+ directAgent = new Agent();
100
+ httpProxyAgent;
101
+ httpsProxyAgent;
102
+ noProxy;
103
+ constructor(options) {
104
+ super();
105
+ this.httpProxyAgent = options.httpProxy ? new ProxyAgent(options.httpProxy) : null;
106
+ this.httpsProxyAgent = options.httpsProxy ? new ProxyAgent(options.httpsProxy) : this.httpProxyAgent;
107
+ this.noProxy = options.noProxy;
108
+ }
109
+ dispatch(options, handler) {
110
+ const origin = new URL(String(options.origin));
111
+ if (this.noProxy && noProxyMatches(origin, this.noProxy)) {
112
+ return this.directAgent.dispatch(options, handler);
113
+ }
114
+ const proxyAgent = origin.protocol === "https:" ? this.httpsProxyAgent : this.httpProxyAgent;
115
+ return (proxyAgent ?? this.directAgent).dispatch(options, handler);
116
+ }
117
+ close(callback) {
118
+ const promise = Promise.all([
119
+ this.directAgent.close(),
120
+ this.httpProxyAgent?.close(),
121
+ this.httpsProxyAgent && this.httpsProxyAgent !== this.httpProxyAgent ? this.httpsProxyAgent.close() : void 0
122
+ ]).then(() => void 0);
123
+ if (callback) {
124
+ promise.then(callback, callback);
125
+ return;
126
+ }
127
+ return promise;
128
+ }
129
+ destroy(errorOrCallback, callback) {
130
+ const error = typeof errorOrCallback === "function" ? null : errorOrCallback ?? null;
131
+ const done = typeof errorOrCallback === "function" ? errorOrCallback : callback;
132
+ const promise = Promise.all([
133
+ this.directAgent.destroy(error),
134
+ this.httpProxyAgent?.destroy(error),
135
+ this.httpsProxyAgent && this.httpsProxyAgent !== this.httpProxyAgent ? this.httpsProxyAgent.destroy(error) : void 0
136
+ ]).then(() => void 0);
137
+ if (done) {
138
+ promise.then(done, done);
139
+ return;
140
+ }
141
+ return promise;
142
+ }
143
+ };
144
+ function configureProxyFromEnv() {
145
+ const httpProxy = firstProxyEnv("HTTP_PROXY", "http_proxy");
146
+ const httpsProxy = firstProxyEnv("HTTPS_PROXY", "https_proxy") || httpProxy;
147
+ if (!httpProxy && !httpsProxy) {
148
+ return;
149
+ }
150
+ setGlobalDispatcher(
151
+ new EnvProxyDispatcher({
152
+ httpProxy,
153
+ httpsProxy,
154
+ noProxy: firstProxyEnv("NO_PROXY", "no_proxy")
155
+ })
156
+ );
157
+ }
158
+ configureProxyFromEnv();
159
+ export {
160
+ configureProxyFromEnv
161
+ };
@@ -0,0 +1,69 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkF35VOIQLjs = require('./chunk-F35VOIQL.js');
5
+ require('./chunk-XRK2TZT5.js');
6
+ require('./chunk-XNYIZMNQ.js');
7
+ require('./chunk-D4AZUZO4.js');
8
+
9
+
10
+
11
+ var _chunkJNNOCMQYjs = require('./chunk-JNNOCMQY.js');
12
+ require('./chunk-7P5AA3SN.js');
13
+ require('./chunk-OG64RBAC.js');
14
+ require('./chunk-COGTRVWW.js');
15
+
16
+ // src/cli/commands/quickstart.ts
17
+ async function handleQuickstart(options) {
18
+ const jsonOutput = _chunkF35VOIQLjs.shouldEmitJson.call(void 0, options.json === true);
19
+ const gettingStarted = {
20
+ skill: _chunkJNNOCMQYjs.DEEPLINE_GTM_SKILL,
21
+ examples: _chunkJNNOCMQYjs.DEEPLINE_GTM_STARTER_PROMPTS
22
+ };
23
+ _chunkF35VOIQLjs.printCommandEnvelope.call(void 0,
24
+ {
25
+ ok: true,
26
+ status: "deprecated",
27
+ code: "QUICKSTART_DEPRECATED",
28
+ exitCode: 0,
29
+ message: "`deepline quickstart` is deprecated. Start with the installed /deepline-gtm skill in your agent.",
30
+ deprecatedCommand: "deepline quickstart",
31
+ replacement: _chunkJNNOCMQYjs.DEEPLINE_GTM_SKILL,
32
+ gettingStarted,
33
+ next: _chunkJNNOCMQYjs.DEEPLINE_GTM_SKILL,
34
+ render: {
35
+ sections: [
36
+ {
37
+ title: "quickstart deprecated",
38
+ lines: [
39
+ `Use ${_chunkJNNOCMQYjs.DEEPLINE_GTM_SKILL} in your agent instead.`,
40
+ ..._chunkJNNOCMQYjs.DEEPLINE_GTM_STARTER_PROMPTS.map(
41
+ (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
42
+ )
43
+ ]
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ { json: jsonOutput }
49
+ );
50
+ return 0;
51
+ }
52
+ function registerQuickstartCommands(program) {
53
+ program.command("quickstart", { hidden: true }).description(
54
+ "Deprecated compatibility command. Use /deepline-gtm in your agent."
55
+ ).addHelpText(
56
+ "after",
57
+ `
58
+ Deprecated:
59
+ Use the installed /deepline-gtm skill in your agent. This compatibility
60
+ command prints three starter prompts and no longer opens a browser.
61
+ `
62
+ ).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) => {
63
+ process.exitCode = await handleQuickstart(options);
64
+ });
65
+ }
66
+
67
+
68
+
69
+ exports.handleQuickstart = handleQuickstart; exports.registerQuickstartCommands = registerQuickstartCommands;
@@ -0,0 +1,69 @@
1
+ import {
2
+ printCommandEnvelope,
3
+ shouldEmitJson
4
+ } from "./chunk-6O5YZOVN.mjs";
5
+ import "./chunk-EACVZI6N.mjs";
6
+ import "./chunk-DLIRSHV6.mjs";
7
+ import "./chunk-LDWT7RJK.mjs";
8
+ import {
9
+ DEEPLINE_GTM_SKILL,
10
+ DEEPLINE_GTM_STARTER_PROMPTS
11
+ } from "./chunk-SFLARO4Y.mjs";
12
+ import "./chunk-NXGCO4JB.mjs";
13
+ import "./chunk-WZYKRD7T.mjs";
14
+ import "./chunk-KRD6H754.mjs";
15
+
16
+ // src/cli/commands/quickstart.ts
17
+ async function handleQuickstart(options) {
18
+ const jsonOutput = shouldEmitJson(options.json === true);
19
+ const gettingStarted = {
20
+ skill: DEEPLINE_GTM_SKILL,
21
+ examples: DEEPLINE_GTM_STARTER_PROMPTS
22
+ };
23
+ printCommandEnvelope(
24
+ {
25
+ ok: true,
26
+ status: "deprecated",
27
+ code: "QUICKSTART_DEPRECATED",
28
+ exitCode: 0,
29
+ message: "`deepline quickstart` is deprecated. Start with the installed /deepline-gtm skill in your agent.",
30
+ deprecatedCommand: "deepline quickstart",
31
+ replacement: DEEPLINE_GTM_SKILL,
32
+ gettingStarted,
33
+ next: DEEPLINE_GTM_SKILL,
34
+ render: {
35
+ sections: [
36
+ {
37
+ title: "quickstart deprecated",
38
+ lines: [
39
+ `Use ${DEEPLINE_GTM_SKILL} in your agent instead.`,
40
+ ...DEEPLINE_GTM_STARTER_PROMPTS.map(
41
+ (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
42
+ )
43
+ ]
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ { json: jsonOutput }
49
+ );
50
+ return 0;
51
+ }
52
+ function registerQuickstartCommands(program) {
53
+ program.command("quickstart", { hidden: true }).description(
54
+ "Deprecated compatibility command. Use /deepline-gtm in your agent."
55
+ ).addHelpText(
56
+ "after",
57
+ `
58
+ Deprecated:
59
+ Use the installed /deepline-gtm skill in your agent. This compatibility
60
+ command prints three starter prompts and no longer opens a browser.
61
+ `
62
+ ).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) => {
63
+ process.exitCode = await handleQuickstart(options);
64
+ });
65
+ }
66
+ export {
67
+ handleQuickstart,
68
+ registerQuickstartCommands
69
+ };
@@ -0,0 +1,18 @@
1
+ import {
2
+ registerDeprecatedSearchCommand,
3
+ registerSearchCommand
4
+ } from "./chunk-MROPCKW2.mjs";
5
+ import "./chunk-XL2FO6CW.mjs";
6
+ import "./chunk-CBVIJSHF.mjs";
7
+ import "./chunk-6O5YZOVN.mjs";
8
+ import "./chunk-EACVZI6N.mjs";
9
+ import "./chunk-DLIRSHV6.mjs";
10
+ import "./chunk-LDWT7RJK.mjs";
11
+ import "./chunk-GVUJJJ5G.mjs";
12
+ import "./chunk-NXGCO4JB.mjs";
13
+ import "./chunk-WZYKRD7T.mjs";
14
+ import "./chunk-KRD6H754.mjs";
15
+ export {
16
+ registerDeprecatedSearchCommand,
17
+ registerSearchCommand
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkWQICC2B3js = require('./chunk-WQICC2B3.js');
5
+ require('./chunk-2S5Y3TZP.js');
6
+ require('./chunk-LA46MMTL.js');
7
+ require('./chunk-F35VOIQL.js');
8
+ require('./chunk-XRK2TZT5.js');
9
+ require('./chunk-XNYIZMNQ.js');
10
+ require('./chunk-D4AZUZO4.js');
11
+ require('./chunk-6A3TJUWC.js');
12
+ require('./chunk-7P5AA3SN.js');
13
+ require('./chunk-OG64RBAC.js');
14
+ require('./chunk-COGTRVWW.js');
15
+
16
+
17
+
18
+ exports.registerDeprecatedSearchCommand = _chunkWQICC2B3js.registerDeprecatedSearchCommand; exports.registerSearchCommand = _chunkWQICC2B3js.registerSearchCommand;