deepline 0.3.294 → 0.3.296
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/compat.ts +35 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +108 -35
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +25 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +14 -1
- package/dist/cli/auth-JCGIDVDF.mjs +31 -0
- package/dist/cli/auth-QDWV3TXX.js +31 -0
- package/dist/cli/billing-OQBSIXRG.mjs +1749 -0
- package/dist/cli/billing-YBK3J4WP.js +1749 -0
- package/dist/cli/chunk-2C3AVPTY.js +5688 -0
- package/dist/cli/chunk-2MZ5EQZE.mjs +499 -0
- package/dist/cli/chunk-3KC45UVF.js +150 -0
- package/dist/cli/chunk-3XX5TEA4.js +15 -0
- package/dist/cli/chunk-4MBOJQPL.mjs +0 -0
- package/dist/cli/chunk-4Y6CG4GE.js +2240 -0
- package/dist/cli/chunk-4ZB3CJRD.js +1269 -0
- package/dist/cli/chunk-5JLQPVNX.js +3056 -0
- package/dist/cli/chunk-6A3TJUWC.js +76 -0
- package/dist/cli/chunk-6HPEDBSJ.js +1995 -0
- package/dist/cli/chunk-7D6QG5KF.js +890 -0
- package/dist/cli/chunk-7P5AA3SN.js +344 -0
- package/dist/cli/chunk-7UAO5MWV.mjs +190 -0
- package/dist/cli/chunk-A7427JJH.js +190 -0
- package/dist/cli/chunk-AQRTLPHZ.js +735 -0
- package/dist/cli/chunk-AYHLUHE5.js +52 -0
- package/dist/cli/chunk-BZ77OTRF.mjs +923 -0
- package/dist/cli/chunk-CBVIJSHF.mjs +560 -0
- package/dist/cli/chunk-COGTRVWW.js +30 -0
- package/dist/cli/chunk-DLIRSHV6.mjs +28 -0
- package/dist/cli/chunk-DYWHXO7O.mjs +34 -0
- package/dist/cli/chunk-EDWJY6T4.mjs +3056 -0
- package/dist/cli/chunk-EXMLR72R.mjs +0 -0
- package/dist/cli/chunk-G46HHFNB.mjs +1269 -0
- package/dist/cli/chunk-GAMFK2ZP.mjs +148 -0
- package/dist/cli/chunk-GLKUGBTP.mjs +2240 -0
- package/dist/cli/chunk-GONRLVV3.js +3440 -0
- package/dist/cli/chunk-GVUJJJ5G.mjs +76 -0
- package/dist/cli/chunk-H7HIDGZ7.mjs +150 -0
- package/dist/cli/chunk-HUZXWOSK.mjs +503 -0
- package/dist/cli/chunk-I5YZLGMG.js +1 -0
- package/dist/cli/chunk-ITOFSXIU.mjs +15 -0
- package/dist/cli/chunk-J2D3VDOU.mjs +5688 -0
- package/dist/cli/chunk-J5NA2TTX.js +503 -0
- package/dist/cli/chunk-JCS5TPNY.mjs +3440 -0
- package/dist/cli/chunk-JNNOCMQY.js +47 -0
- package/dist/cli/chunk-KRD6H754.mjs +30 -0
- package/dist/cli/chunk-L4HBNHFW.js +34 -0
- package/dist/cli/chunk-LA46MMTL.js +560 -0
- package/dist/cli/chunk-LIKFCE7Z.js +190 -0
- package/dist/cli/chunk-MIMASXO4.mjs +389 -0
- package/dist/cli/chunk-NPPJX3BL.mjs +1995 -0
- package/dist/cli/chunk-NTEZFZLE.mjs +890 -0
- package/dist/cli/chunk-NXDRDJ4K.js +389 -0
- package/dist/cli/chunk-NXGCO4JB.mjs +344 -0
- package/dist/cli/chunk-OG64RBAC.js +6 -0
- package/dist/cli/chunk-OWJZUE3Y.mjs +103 -0
- package/dist/cli/chunk-QSIO4TX2.mjs +190 -0
- package/dist/cli/chunk-RCUE5C5C.mjs +735 -0
- package/dist/cli/chunk-SDK3ZA2C.js +103 -0
- package/dist/cli/chunk-SFLARO4Y.mjs +47 -0
- package/dist/cli/chunk-TAC3JIFE.mjs +354 -0
- package/dist/cli/chunk-UC6GHEL4.js +499 -0
- package/dist/cli/chunk-UFS752TU.mjs +52 -0
- package/dist/cli/chunk-UNEMDKXN.js +1 -0
- package/dist/cli/chunk-WB6Z2Q44.mjs +1622 -0
- package/dist/cli/chunk-WJYPBHTE.js +148 -0
- package/dist/cli/chunk-WOHBA5PV.js +354 -0
- package/dist/cli/chunk-WZYKRD7T.mjs +6 -0
- package/dist/cli/chunk-XNYIZMNQ.js +28 -0
- package/dist/cli/chunk-ZDO3TO3M.js +1622 -0
- package/dist/cli/chunk-ZDOC4HFL.js +923 -0
- package/dist/cli/client-CZDA4JKO.mjs +20 -0
- package/dist/cli/client-IZGIN2ZA.js +20 -0
- package/dist/cli/csv-6KOMZA2H.mjs +585 -0
- package/dist/cli/csv-UTEQY3NA.js +585 -0
- package/dist/cli/db-D5EP6TKO.mjs +486 -0
- package/dist/cli/db-SIBLPIKC.js +486 -0
- package/dist/cli/executions-2PHT57IO.js +28 -0
- package/dist/cli/executions-DFWM2YYY.mjs +28 -0
- package/dist/cli/feedback-GZW37JMI.mjs +107 -0
- package/dist/cli/feedback-IQVWIJZ4.js +107 -0
- package/dist/cli/getting-started.js +18 -76
- package/dist/cli/getting-started.mjs +10 -37
- package/dist/cli/git-563GYLMA.js +23 -0
- package/dist/cli/git-B72Y4FFQ.mjs +23 -0
- package/dist/cli/index.js +291 -54294
- package/dist/cli/index.mjs +209 -54352
- package/dist/cli/legacy-noops-37F5MX2P.mjs +157 -0
- package/dist/cli/legacy-noops-IFGVDCOM.js +157 -0
- package/dist/cli/monitors-42H6LOVT.mjs +3251 -0
- package/dist/cli/monitors-GQCHXBXZ.js +3251 -0
- package/dist/cli/org-4GCPBTGR.js +849 -0
- package/dist/cli/org-JYZA3ZRJ.mjs +849 -0
- package/dist/cli/play-46ZJ4FMI.js +18439 -0
- package/dist/cli/play-Q2XV3FZZ.mjs +18439 -0
- package/dist/cli/providers-CTKQP45X.mjs +95 -0
- package/dist/cli/providers-PCNF5E3K.js +95 -0
- package/dist/cli/proxy-env-EBANZHPV.js +161 -0
- package/dist/cli/proxy-env-M4ZHXHRL.mjs +161 -0
- package/dist/cli/quickstart-FTHWRVWN.js +69 -0
- package/dist/cli/quickstart-X7EVVWRG.mjs +69 -0
- package/dist/cli/search-73YPOFDO.mjs +18 -0
- package/dist/cli/search-XA5UVC3G.js +18 -0
- package/dist/cli/secrets-OUMPT4FX.mjs +400 -0
- package/dist/cli/secrets-UOEVR73Q.js +400 -0
- package/dist/cli/sessions-CMKXCN5Y.js +15 -0
- package/dist/cli/sessions-ZIFGDZE7.mjs +15 -0
- package/dist/cli/settings-OO5R3G52.mjs +846 -0
- package/dist/cli/settings-ULZT2NIC.js +846 -0
- package/dist/cli/setup-6GZH52OZ.mjs +1257 -0
- package/dist/cli/setup-DHGERXPZ.js +1257 -0
- package/dist/cli/skills-Q7NUCS2W.js +28 -0
- package/dist/cli/skills-T3EY2656.mjs +28 -0
- package/dist/cli/tools-BIMOAOTX.mjs +2955 -0
- package/dist/cli/tools-ODXVCKO7.js +2955 -0
- package/dist/cli/update-UMB3ULBR.js +28 -0
- package/dist/cli/update-X4HX7Z3M.mjs +28 -0
- package/dist/cli/workflow-EAUFVPIP.mjs +1936 -0
- package/dist/cli/workflow-IVLCPFTG.js +1936 -0
- package/dist/helpers.js +6 -32
- package/dist/helpers.mjs +2 -0
- package/dist/index.js +1972 -12825
- package/dist/index.mjs +1910 -12672
- package/dist/install-integrity.json +110 -0
- package/dist/monitor-fleet-contract.js +31 -730
- package/dist/monitor-fleet-contract.mjs +18 -667
- package/dist/monitor-input-contract.js +10 -390
- package/dist/monitor-input-contract.mjs +7 -348
- package/dist/plays/bundle-play-file.mjs +13 -5178
- package/dist/plays/csv-data-input.js +5 -3132
- package/dist/plays/csv-data-input.mjs +5 -3105
- package/dist/plays/run-request.js +56 -664
- package/dist/plays/run-request.mjs +30 -588
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +5 -212
- package/dist/release.mjs +5 -185
- package/package.json +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
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; }
|
|
2
|
+
|
|
3
|
+
var _chunk2C3AVPTYjs = require('./chunk-2C3AVPTY.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk7D6QG5KFjs = require('./chunk-7D6QG5KF.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunk6HPEDBSJjs = require('./chunk-6HPEDBSJ.js');
|
|
11
|
+
|
|
12
|
+
// src/cli/search-ref.ts
|
|
13
|
+
var _fs = require('fs');
|
|
14
|
+
var _path = require('path');
|
|
15
|
+
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
16
|
+
function lastSearchPath() {
|
|
17
|
+
return _path.join.call(void 0, _chunk6HPEDBSJjs.sdkCliStateDirPath.call(void 0, _chunk6HPEDBSJjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
18
|
+
}
|
|
19
|
+
function rememberSearchRef(searchRef) {
|
|
20
|
+
try {
|
|
21
|
+
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, lastSearchPath()), { recursive: true });
|
|
22
|
+
_fs.writeFileSync.call(void 0,
|
|
23
|
+
lastSearchPath(),
|
|
24
|
+
JSON.stringify({ searchRef, at: Date.now() }),
|
|
25
|
+
{ mode: 384 }
|
|
26
|
+
);
|
|
27
|
+
} catch (e) {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function recentSearchRef() {
|
|
31
|
+
try {
|
|
32
|
+
const saved = JSON.parse(_fs.readFileSync.call(void 0, lastSearchPath(), "utf8"));
|
|
33
|
+
return typeof saved.searchRef === "string" && typeof saved.at === "number" && Date.now() - saved.at < SEARCH_REF_TTL_MS ? saved.searchRef : void 0;
|
|
34
|
+
} catch (e2) {
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// src/cli/commands/search.ts
|
|
40
|
+
var SEARCH_TYPES = [
|
|
41
|
+
"tools",
|
|
42
|
+
"plays",
|
|
43
|
+
"monitors",
|
|
44
|
+
"prebuilts",
|
|
45
|
+
"custom"
|
|
46
|
+
];
|
|
47
|
+
var USAGE = "Usage: deepline search [query] [--type <types>] [--categories <categories>] [--search_terms <terms>] [--json]";
|
|
48
|
+
function parseTypes(flag, raw) {
|
|
49
|
+
const names = (_nullishCoalesce(raw, () => ( ""))).split(",").map((name) => name.trim().toLowerCase()).filter(Boolean);
|
|
50
|
+
const unknown = names.filter(
|
|
51
|
+
(name) => !SEARCH_TYPES.includes(name)
|
|
52
|
+
);
|
|
53
|
+
if (unknown.length > 0) {
|
|
54
|
+
throw new Error(
|
|
55
|
+
`Unknown ${flag} ${unknown.join(", ")}. Use any of: ${SEARCH_TYPES.join(", ")}.`
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return names;
|
|
59
|
+
}
|
|
60
|
+
function optionalInteger(raw) {
|
|
61
|
+
return raw === void 0 ? void 0 : Number.parseInt(raw, 10);
|
|
62
|
+
}
|
|
63
|
+
function appendCsv(value, previous) {
|
|
64
|
+
return previous ? `${previous},${value}` : value;
|
|
65
|
+
}
|
|
66
|
+
function addSearchOptions(command) {
|
|
67
|
+
return command.option(
|
|
68
|
+
"--categories <categories>",
|
|
69
|
+
"Comma-separated tool categories; may be used without a query"
|
|
70
|
+
).option(
|
|
71
|
+
"--search_terms <terms>",
|
|
72
|
+
"Comma-separated structured search terms; may be used without a query"
|
|
73
|
+
).option("--search-terms <terms>", "Alias for --search_terms").option(
|
|
74
|
+
"--task <sentence>",
|
|
75
|
+
"What you are trying to accomplish: input you have -> result you need"
|
|
76
|
+
).option("--limit <count>", "Maximum ranked results to return (1-50)").option("--offset <count>", "Zero-based ranked result offset").option("--search-mode <mode>", "Ranked search mode: v1 or v2").option("--include-search-debug", "Include ranked search debug metadata").option("--json", "Emit JSON output instead of the readable default");
|
|
77
|
+
}
|
|
78
|
+
async function runSearch(queryInput, options, types, exclude = []) {
|
|
79
|
+
const query = _nullishCoalesce(_optionalChain([queryInput, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]), () => ( ""));
|
|
80
|
+
const searchTerms = _nullishCoalesce(options.searchTerms, () => ( options.search_terms));
|
|
81
|
+
if (!query && !_optionalChain([options, 'access', _3 => _3.categories, 'optionalAccess', _4 => _4.trim, 'call', _5 => _5()]) && !_optionalChain([searchTerms, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()])) {
|
|
82
|
+
console.error(USAGE);
|
|
83
|
+
return 1;
|
|
84
|
+
}
|
|
85
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunk2C3AVPTYjs.DeeplineClient)().search({
|
|
86
|
+
query,
|
|
87
|
+
types,
|
|
88
|
+
exclude,
|
|
89
|
+
categories: options.categories,
|
|
90
|
+
searchTerms,
|
|
91
|
+
task: options.task,
|
|
92
|
+
limit: optionalInteger(options.limit),
|
|
93
|
+
offset: optionalInteger(options.offset),
|
|
94
|
+
searchMode: options.searchMode === "v1" || options.searchMode === "v2" ? options.searchMode : void 0,
|
|
95
|
+
includeSearchDebug: Boolean(options.includeSearchDebug)
|
|
96
|
+
});
|
|
97
|
+
if (searchRef) rememberSearchRef(searchRef);
|
|
98
|
+
_chunk7D6QG5KFjs.printCommandEnvelope.call(void 0, result, {
|
|
99
|
+
json: options.json === true
|
|
100
|
+
});
|
|
101
|
+
return 0;
|
|
102
|
+
}
|
|
103
|
+
function registerDeprecatedSearchCommand(parent, typesFor) {
|
|
104
|
+
const name = `deepline ${parent.name()} search`;
|
|
105
|
+
addSearchOptions(
|
|
106
|
+
parent.command("search [query]").description(`Deprecated. Use deepline search --type <types>.`).addHelpText(
|
|
107
|
+
"after",
|
|
108
|
+
`
|
|
109
|
+
Notes:
|
|
110
|
+
Deprecated alias for the unified search. It runs deepline search with the
|
|
111
|
+
matching --type and returns the same results envelope.
|
|
112
|
+
|
|
113
|
+
Examples:
|
|
114
|
+
deepline search email --type ${typesFor({}).join(",")}
|
|
115
|
+
`
|
|
116
|
+
).option("--all", "Include plays your workspace created").option("--compact", "Accepted for compatibility; results are compact")
|
|
117
|
+
).action(async (query, options) => {
|
|
118
|
+
const types = typesFor(options);
|
|
119
|
+
console.error(
|
|
120
|
+
`${name} is deprecated. Use: deepline search${query ? ` ${JSON.stringify(query)}` : ""} --type ${types.join(",")}`
|
|
121
|
+
);
|
|
122
|
+
process.exitCode = await runSearch(query, options, types);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function registerSearchCommand(program) {
|
|
126
|
+
addSearchOptions(
|
|
127
|
+
program.command("search [query]").description(
|
|
128
|
+
"Search tools, monitors, and plays together, ranked by intent."
|
|
129
|
+
).addHelpText(
|
|
130
|
+
"after",
|
|
131
|
+
`
|
|
132
|
+
Notes:
|
|
133
|
+
One ranked search across everything Deepline can run, deploy, or explain.
|
|
134
|
+
Every result carries a kind: tool, monitor_type, prebuilt_play, custom_play
|
|
135
|
+
(a play your workspace created), or doc. Narrow with --type, a
|
|
136
|
+
comma-separated list of:
|
|
137
|
+
tools atomic provider operations (deepline tools execute)
|
|
138
|
+
monitors monitor types you can deploy
|
|
139
|
+
prebuilts Deepline-maintained plays
|
|
140
|
+
custom plays your workspace created
|
|
141
|
+
plays prebuilts and custom together
|
|
142
|
+
--exclude takes the same names and leaves those kinds out instead.
|
|
143
|
+
Ranking uses a third-party AI relevance model. For plays your workspace
|
|
144
|
+
created it is sent only the play name and description, never play code.
|
|
145
|
+
Both flags may be repeated: --type tools --type prebuilts.
|
|
146
|
+
Provide a query, or omit it only when --categories and/or --search_terms is
|
|
147
|
+
supplied. Use --limit and --offset to page (limit 1-50, offset zero-based);
|
|
148
|
+
JSON includes next_offset. Pass --task with one sentence on what you are
|
|
149
|
+
trying to accomplish: the input you have and the result you need. It
|
|
150
|
+
materially improves ranking, especially for short queries.
|
|
151
|
+
Search prints a readable result list by default, piped or not, and that is
|
|
152
|
+
the recommended form. Pass --json only when a program parses the result.
|
|
153
|
+
|
|
154
|
+
Examples:
|
|
155
|
+
deepline search "find work email"
|
|
156
|
+
deepline search "find work email" --type tools --limit 10
|
|
157
|
+
deepline search "company to contacts" --type plays
|
|
158
|
+
deepline search "enrich a company" --exclude monitors,custom
|
|
159
|
+
deepline search linkedin --task "I have 200 LinkedIn profile URLs and need each person's current title and company"
|
|
160
|
+
deepline search --type tools --categories company_search --search_terms "investors,funding"
|
|
161
|
+
`
|
|
162
|
+
).option(
|
|
163
|
+
"--type <types>",
|
|
164
|
+
`Kinds to search, comma-separated or repeated: ${SEARCH_TYPES.join(", ")}`,
|
|
165
|
+
appendCsv
|
|
166
|
+
).option(
|
|
167
|
+
"--exclude <types>",
|
|
168
|
+
"Kinds to leave out, comma-separated or repeated; the opposite of --type",
|
|
169
|
+
appendCsv
|
|
170
|
+
)
|
|
171
|
+
).action(async (query, options) => {
|
|
172
|
+
let types;
|
|
173
|
+
let exclude;
|
|
174
|
+
try {
|
|
175
|
+
types = parseTypes("--type", options.type);
|
|
176
|
+
exclude = parseTypes("--exclude", options.exclude);
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
179
|
+
process.exitCode = 1;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
process.exitCode = await runSearch(query, options, types, exclude);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
exports.recentSearchRef = recentSearchRef; exports.registerDeprecatedSearchCommand = registerDeprecatedSearchCommand; exports.registerSearchCommand = registerSearchCommand;
|