deepline 0.3.564 → 0.3.565
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/client-core.ts +51 -0
- package/dist/bundling-sources/sdk/src/connector-sync.ts +241 -0
- package/dist/bundling-sources/sdk/src/index.ts +10 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +7 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/auth-AN2KCWG2.js +44 -0
- package/dist/cli/{auth-PXZ7JZUT.mjs → auth-YKIUCQ2Q.mjs} +5 -5
- package/dist/cli/{billing-AMYFMDZL.mjs → billing-HK23QHAA.mjs} +9 -9
- package/dist/cli/{billing-OY2ZN5XJ.js → billing-NIGAUQJF.js} +102 -102
- package/dist/cli/{chunk-ZOITMXVO.mjs → chunk-2US3VJXX.mjs} +1 -1
- package/dist/cli/{chunk-ZJ23RI3B.mjs → chunk-4ENCU2BI.mjs} +2 -2
- package/dist/cli/{chunk-4JQ6MHE7.js → chunk-4VKDPTHF.js} +4 -4
- package/dist/cli/{chunk-KBGP4CS5.js → chunk-5HV2CNXA.js} +10 -10
- package/dist/cli/{chunk-WDXXHTIF.js → chunk-6HCJQ23O.js} +23 -23
- package/dist/cli/{chunk-OCLHNDVN.mjs → chunk-A3EI3A3Q.mjs} +5 -5
- package/dist/cli/{chunk-RK5EKJAT.mjs → chunk-AAOXS3XM.mjs} +152 -2
- package/dist/cli/{chunk-56P2BEVI.mjs → chunk-AH2CBDQJ.mjs} +2 -2
- package/dist/cli/{chunk-DHZOC2QX.mjs → chunk-B2FQZ7P4.mjs} +2 -2
- package/dist/cli/{chunk-GWTFA5GD.js → chunk-B4FBMREO.js} +3 -3
- package/dist/cli/{chunk-YIDXJD5L.mjs → chunk-BCEXSQPK.mjs} +1 -1
- package/dist/cli/{chunk-R5555CB5.js → chunk-BDNVUPDX.js} +2 -2
- package/dist/cli/{search-output-AXVUC3TF.js → chunk-C5IA2OYE.js} +2 -199
- package/dist/cli/{chunk-XVYU3J2J.js → chunk-E73BRM5N.js} +13 -13
- package/dist/cli/{chunk-V2GHSOQB.js → chunk-EPQIA32E.js} +100 -100
- package/dist/cli/{chunk-QQTZ6KG4.mjs → chunk-EXOC3TLA.mjs} +4 -4
- package/dist/cli/{chunk-MY45K7SA.mjs → chunk-F4ZLUDKW.mjs} +5 -5
- package/dist/cli/{chunk-YMQOTCLU.js → chunk-FEWBYUUF.js} +2 -2
- package/dist/cli/{chunk-2SKEXMFV.js → chunk-FWH6QYTE.js} +5 -5
- package/dist/cli/{chunk-IW3N7ARM.js → chunk-FXRSHBRP.js} +159 -9
- package/dist/cli/{chunk-4SV43Z64.js → chunk-GE62FFN6.js} +3 -3
- package/dist/cli/{chunk-2ISK6CUL.mjs → chunk-GTX2RMQG.mjs} +11 -11
- package/dist/cli/{chunk-RBTOZO5M.js → chunk-H3NH5RJ6.js} +41 -41
- package/dist/cli/{chunk-TK6YKQ45.mjs → chunk-H4LHB6ES.mjs} +1 -1
- package/dist/cli/{chunk-UWX4TTJU.mjs → chunk-IFZA4IGI.mjs} +2 -2
- package/dist/cli/{chunk-XWDCKDUP.js → chunk-IKA37N6Y.js} +26 -26
- package/dist/cli/{chunk-WSEMXB7X.js → chunk-J5QAOURJ.js} +20 -20
- package/dist/cli/{chunk-4NNNJLAZ.mjs → chunk-JLXLCD6F.mjs} +2 -2
- package/dist/cli/{chunk-CXN574UU.mjs → chunk-K6RPKBD7.mjs} +1 -1
- package/dist/cli/{chunk-VACBPVIR.mjs → chunk-KOMEYB7H.mjs} +104 -0
- package/dist/cli/{chunk-655PNNU7.mjs → chunk-LHL6VWJE.mjs} +1 -1
- package/dist/cli/{chunk-TVF7XVPN.mjs → chunk-LKVWMLWI.mjs} +1 -1
- package/dist/cli/{chunk-QHBYLHOG.mjs → chunk-LOV5JGWO.mjs} +2 -2
- package/dist/cli/{search-output-N44NPUN6.mjs → chunk-MI5Q5FOD.mjs} +1 -198
- package/dist/cli/{chunk-7NSHH3NB.js → chunk-NH3LVGVR.js} +5 -5
- package/dist/cli/{chunk-DTTMFSNG.mjs → chunk-NOSGGCJ3.mjs} +1 -1
- package/dist/cli/{chunk-5CNHEUGJ.js → chunk-OEVCKW2M.js} +104 -0
- package/dist/cli/{chunk-HPXN5QZZ.js → chunk-OIDETCX2.js} +20 -20
- package/dist/cli/{chunk-Y2FZJRRM.js → chunk-P6BVT2OW.js} +2 -2
- package/dist/cli/{chunk-I4XWKMGR.js → chunk-PQEWFVJ3.js} +15 -15
- package/dist/cli/{chunk-DYTTZHYX.mjs → chunk-RULYYQB4.mjs} +5 -5
- package/dist/cli/{chunk-7DU4VODD.mjs → chunk-SEWLXJHM.mjs} +2 -2
- package/dist/cli/{chunk-RKG2E2JF.js → chunk-SL3IRGAW.js} +9 -9
- package/dist/cli/{chunk-I2GVGCMM.js → chunk-TCJZQRX6.js} +12 -12
- package/dist/cli/{chunk-WXB7PU3O.mjs → chunk-U7F4ODVQ.mjs} +1 -1
- package/dist/cli/{chunk-JVSHMUGE.mjs → chunk-UTQ6LQWG.mjs} +3 -3
- package/dist/cli/{chunk-KR76WIOX.js → chunk-UWMK5DLS.js} +1 -1
- package/dist/cli/{chunk-HEWVHSNN.mjs → chunk-V2TC2ARE.mjs} +4 -4
- package/dist/cli/{chunk-BRQVKZWJ.js → chunk-WPVJV23H.js} +7 -7
- package/dist/cli/{chunk-V2SNCH5X.js → chunk-XNOUOO6G.js} +6 -6
- package/dist/cli/{chunk-RW6PFYT5.mjs → chunk-YD5BBYS2.mjs} +5 -5
- package/dist/cli/{chunk-2PMHEUED.mjs → chunk-YGVLCJNY.mjs} +3 -3
- package/dist/cli/{chunk-XP6ALUAZ.mjs → chunk-YIKEVZUQ.mjs} +2 -2
- package/dist/cli/{chunk-HGGIWRA5.js → chunk-ZEKRYFMN.js} +48 -48
- package/dist/cli/{chunk-ZZW5A4HZ.js → chunk-ZIKVPGYC.js} +5 -5
- package/dist/cli/{chunk-HXZSXPT2.js → chunk-ZTHMJ4SK.js} +53 -53
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-SKAAESKY.js +22 -0
- package/dist/cli/{concurrent-runs-help-5GPKNDAY.mjs → concurrent-runs-help-WD2EUKO7.mjs} +6 -6
- package/dist/cli/{csv-ARPN6J6K.mjs → csv-RM3FOTS5.mjs} +4 -4
- package/dist/cli/{csv-X3FHV56H.js → csv-UI63ZOMD.js} +13 -13
- package/dist/cli/{db-2HWSS3MA.mjs → db-RIJBJCT7.mjs} +6 -6
- package/dist/cli/{db-WINZJRWC.js → db-V5SWE3WN.js} +27 -27
- package/dist/cli/{describe-333JCD22.mjs → describe-HZC4GOLO.mjs} +18 -18
- package/dist/cli/describe-RRWLYUQS.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-UHZHVQLO.js → executions-2Q23JJSI.js} +8 -8
- package/dist/cli/{executions-JYYXIRE6.mjs → executions-XRH267DY.mjs} +6 -6
- package/dist/cli/{feedback-6G4SDI7M.js → feedback-BEHH4KGB.js} +14 -14
- package/dist/cli/{feedback-KNGQ4VMG.mjs → feedback-Y5MWMTQ2.mjs} +6 -6
- package/dist/cli/{git-DREIWOYN.mjs → git-644DZQKA.mjs} +5 -5
- package/dist/cli/git-OEHB7UQH.js +26 -0
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/integrations-ILXWYGTO.js +284 -0
- package/dist/cli/integrations-PMXZ7V6Y.mjs +284 -0
- package/dist/cli/{legacy-noops-7LZ2HNLB.js → legacy-noops-USLUHQWW.js} +9 -9
- package/dist/cli/{legacy-noops-FSL5Y4TO.mjs → legacy-noops-YUG2HVGQ.mjs} +6 -6
- package/dist/cli/{mcp-TAVIRUQC.js → mcp-DFLBEEWG.js} +24 -24
- package/dist/cli/{mcp-WDJV3OCV.mjs → mcp-X63UPZS7.mjs} +4 -4
- package/dist/cli/{monitors-HGT2RVR5.js → monitors-POG6YUZ4.js} +100 -100
- package/dist/cli/{monitors-L5FSJSVD.mjs → monitors-QGI7QH4K.mjs} +7 -7
- package/dist/cli/{org-4LNYSIEM.js → org-E3NIDN32.js} +121 -121
- package/dist/cli/{org-J5DJCLTU.mjs → org-VAJL4BCS.mjs} +6 -6
- package/dist/cli/{outcomes-5DZ5EZ5Q.mjs → outcomes-FOE35FHM.mjs} +6 -6
- package/dist/cli/{outcomes-4QO264GU.js → outcomes-SCQFFBXS.js} +14 -14
- package/dist/cli/{play-SETNQCBB.mjs → play-7N4Z2LEH.mjs} +19 -19
- package/dist/cli/{play-FZY7NZAM.js → play-BGK7PDXO.js} +324 -324
- package/dist/cli/{providers-PIS6IQVA.mjs → providers-KDI3B22S.mjs} +6 -6
- package/dist/cli/{providers-754HLYAW.js → providers-OK2ES375.js} +9 -9
- package/dist/cli/{quickstart-2TIUCHQF.js → quickstart-HOHFIFVW.js} +6 -6
- package/dist/cli/{quickstart-5P4NYWZK.mjs → quickstart-LHJF7YCP.mjs} +4 -4
- package/dist/cli/{run-WAN4VZMS.mjs → run-BQIDPU5J.mjs} +23 -23
- package/dist/cli/{run-OQNK7G3I.js → run-K45RGJP4.js} +44 -44
- package/dist/cli/{search-PTX7IMBB.mjs → search-PD3OAWO3.mjs} +7 -7
- package/dist/cli/search-QCFLRPCX.js +32 -0
- package/dist/cli/search-output-FVT2FPUN.mjs +205 -0
- package/dist/cli/search-output-P2JVWNCK.js +205 -0
- package/dist/cli/{secrets-ZODIPUMI.mjs → secrets-4MCBJUGL.mjs} +6 -6
- package/dist/cli/{secrets-32WRPZB2.js → secrets-LDCXYN33.js} +15 -15
- package/dist/cli/{sessions-JRIS3JMT.mjs → sessions-36VI33IL.mjs} +6 -6
- package/dist/cli/sessions-WTQ6QNAU.js +23 -0
- package/dist/cli/{settings-YIZUG6T3.js → settings-3J4FUQPF.js} +85 -85
- package/dist/cli/{settings-OI3OHCD5.mjs → settings-D6L7S4ZC.mjs} +12 -12
- package/dist/cli/{setup-AF3I4UPE.js → setup-L6VH3OR4.js} +49 -49
- package/dist/cli/{setup-4QQ33WUA.mjs → setup-PBQ773AV.mjs} +9 -9
- package/dist/cli/skills-PENWR7KI.js +37 -0
- package/dist/cli/{skills-EITRSX56.mjs → skills-ZRTREJY2.mjs} +7 -7
- package/dist/cli/{tools-CMOLGIDR.mjs → tools-OAHCQUQB.mjs} +17 -17
- package/dist/cli/tools-TIN7MRLX.js +57 -0
- package/dist/cli/update-4TIZS6WV.js +37 -0
- package/dist/cli/{update-PGEARBAI.mjs → update-ZM4LSW5L.mjs} +9 -9
- package/dist/cli/{views-KFLXOZ5N.js → views-F4MEME43.js} +21 -21
- package/dist/cli/{views-2H77STII.mjs → views-W6PVUSE3.mjs} +6 -6
- package/dist/cli/{workflow-HCEMVZAZ.js → workflow-37V7F5I4.js} +17 -17
- package/dist/cli/{workflow-XWMAYWVX.mjs → workflow-7E2QYAIY.mjs} +7 -7
- package/dist/{client-CnphYDTe.d.mts → client-B5cSKEi4.d.mts} +1 -1
- package/dist/{client-core-DQOTt3yV.d.mts → client-core-BP19BoBb.d.mts} +107 -2
- package/dist/{client-core-Yad6-K7-.d.ts → client-core-Deqov12F.d.ts} +107 -2
- package/dist/{client-BSxuaObS.d.ts → client-vUZGmXT9.d.ts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +121 -118
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-645UXOAZ.js +0 -44
- package/dist/cli/concurrent-runs-help-QKZXIMSW.js +0 -22
- package/dist/cli/describe-6TJYCPFQ.js +0 -50
- package/dist/cli/git-TQNP4MAD.js +0 -26
- package/dist/cli/integrations-UY3T3ZHA.mjs +0 -129
- package/dist/cli/integrations-V6EO6JAM.js +0 -129
- package/dist/cli/search-VXKJDQA5.js +0 -32
- package/dist/cli/sessions-MW3SUF7R.js +0 -23
- package/dist/cli/skills-ECMGSQM4.js +0 -37
- package/dist/cli/tools-QTTCIEQM.js +0 -57
- package/dist/cli/update-N3YQGALD.js +0 -37
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatTextTable
|
|
3
|
+
} from "./chunk-MI5Q5FOD.mjs";
|
|
4
|
+
import {
|
|
5
|
+
DEFAULT_SUMMARY_WIDTH
|
|
6
|
+
} from "./chunk-5AEDYVB6.mjs";
|
|
7
|
+
import {
|
|
8
|
+
discoveryAuthLines
|
|
9
|
+
} from "./chunk-BM4GE67C.mjs";
|
|
10
|
+
import "./chunk-STXDSVQZ.mjs";
|
|
11
|
+
import "./chunk-PSX3WHIH.mjs";
|
|
12
|
+
import {
|
|
13
|
+
renderCommandEnvelopeText
|
|
14
|
+
} from "./chunk-JLXLCD6F.mjs";
|
|
15
|
+
import "./chunk-2US3VJXX.mjs";
|
|
16
|
+
import "./chunk-LKVWMLWI.mjs";
|
|
17
|
+
import "./chunk-ASB47RXJ.mjs";
|
|
18
|
+
import "./chunk-DLIRSHV6.mjs";
|
|
19
|
+
import "./chunk-Z3A2S3QM.mjs";
|
|
20
|
+
import "./chunk-2MGZAI54.mjs";
|
|
21
|
+
import "./chunk-H4LHB6ES.mjs";
|
|
22
|
+
import "./chunk-WZYKRD7T.mjs";
|
|
23
|
+
import "./chunk-KRD6H754.mjs";
|
|
24
|
+
|
|
25
|
+
// src/cli/search-output.ts
|
|
26
|
+
function clipSummary(value, width) {
|
|
27
|
+
const characters = Array.from(value.replace(/\s+/gu, " ").trim());
|
|
28
|
+
return characters.length <= width ? characters.join("") : `${characters.slice(0, width - 1).join("")}\u2026`;
|
|
29
|
+
}
|
|
30
|
+
function toolPrice(item) {
|
|
31
|
+
const pricing = item.pricing;
|
|
32
|
+
if (!pricing) return item.kind === "tool" ? "unknown" : "\u2014";
|
|
33
|
+
if (item.billingSource === "own_provider_credentials") return "0 (byok)";
|
|
34
|
+
if (pricing.benefit?.status === "included")
|
|
35
|
+
return typeof pricing.benefit.remaining === "number" ? `0 (${pricing.benefit.remaining.toLocaleString("en-US")} free left)*` : "0 (included)*";
|
|
36
|
+
if (pricing.benefit?.status === "unavailable")
|
|
37
|
+
return "inclusion unavailable*";
|
|
38
|
+
if (pricing.benefit?.status === "exhausted" && typeof pricing.creditsPerUnit === "number")
|
|
39
|
+
return `${pricing.creditsPerUnit}/${pricing.unit ?? "result"}*`;
|
|
40
|
+
const range = pricing.estimatedRange;
|
|
41
|
+
if (range)
|
|
42
|
+
return `${range.minCreditsPerUnit}\u2013${range.maxCreditsPerUnit}/${pricing.unit} (estimate)*`;
|
|
43
|
+
const observed = pricing.observedReference;
|
|
44
|
+
if (observed) return `${observed.creditsPerCall}/call (observed)*`;
|
|
45
|
+
const observedAvg = pricing.observedMax;
|
|
46
|
+
if (observedAvg?.avgCreditsPerCall && observedAvg.sampleCount)
|
|
47
|
+
return `variable, ${observedAvg.avgCreditsPerCall} avg*`;
|
|
48
|
+
const display = pricing.displayText ?? "";
|
|
49
|
+
const footnote = pricing.summary || pricing.details?.length || pricing.observedMax ? "*" : "";
|
|
50
|
+
const rate = display.match(
|
|
51
|
+
/^([\d.,]+) Deepline credits(?: \/ \$[\d.,]+)? per (call|result|page|item|basic profile|full profile)( \(estimate\))?$/
|
|
52
|
+
);
|
|
53
|
+
if (rate) return `${rate[1]}/${rate[2]}${rate[3] ?? ""}${footnote}`;
|
|
54
|
+
if (pricing.creditsPerUnit === 0 && /^Free\b/.test(display))
|
|
55
|
+
return `0 (free)${footnote}`;
|
|
56
|
+
if (!display || display === "Pricing unavailable.")
|
|
57
|
+
return `unknown${footnote}`;
|
|
58
|
+
return pricing.unit === "usage" ? "usage-based*" : "variable*";
|
|
59
|
+
}
|
|
60
|
+
var RATE_WINDOW_UNITS = {
|
|
61
|
+
1e3: "s",
|
|
62
|
+
6e4: "min",
|
|
63
|
+
36e5: "hr"
|
|
64
|
+
};
|
|
65
|
+
function rateLimitDisplay(item) {
|
|
66
|
+
const limits = (Array.isArray(item.rateLimits) ? item.rateLimits : []).filter(
|
|
67
|
+
(limit) => typeof limit?.requestsPerWindow === "number" && typeof limit?.windowMs === "number" && limit.windowMs > 0
|
|
68
|
+
);
|
|
69
|
+
const [tightest] = limits.sort(
|
|
70
|
+
(a, b) => a.requestsPerWindow / a.windowMs - b.requestsPerWindow / b.windowMs
|
|
71
|
+
);
|
|
72
|
+
return tightest ? `${tightest.requestsPerWindow}/${RATE_WINDOW_UNITS[tightest.windowMs] ?? `${tightest.windowMs / 1e3}s`}` : "\u2014";
|
|
73
|
+
}
|
|
74
|
+
function failureRateDisplay(rate) {
|
|
75
|
+
if (typeof rate !== "number") return "\u2014";
|
|
76
|
+
const percent = Math.round(rate * 100);
|
|
77
|
+
return percent === 0 && rate > 0 ? "<1%" : `${percent}%`;
|
|
78
|
+
}
|
|
79
|
+
function latencyDisplay(ms) {
|
|
80
|
+
if (typeof ms !== "number" || !Number.isFinite(ms)) return "\u2014";
|
|
81
|
+
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
82
|
+
if (ms < 6e4) return `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)}s`;
|
|
83
|
+
return `${(ms / 6e4).toFixed(1)}min`;
|
|
84
|
+
}
|
|
85
|
+
function searchRow(item, summaryWidth) {
|
|
86
|
+
const observedCost = item.observedCost;
|
|
87
|
+
const notes = [];
|
|
88
|
+
let cost;
|
|
89
|
+
if (!observedCost) {
|
|
90
|
+
cost = toolPrice(item);
|
|
91
|
+
} else if (observedCost.status === "available") {
|
|
92
|
+
cost = `${observedCost.avgCredits}/${observedCost.unit} (observed)`;
|
|
93
|
+
} else {
|
|
94
|
+
cost = observedCost.typical ? `${observedCost.typical.lowCredits}\u2013${observedCost.typical.highCredits}/${observedCost.typical.unit} (typical)` : "no data yet";
|
|
95
|
+
notes.push(`Cost: ${observedCost.displayText}`);
|
|
96
|
+
}
|
|
97
|
+
if (item.auth?.connectionRequired && typeof item.connectionMessage === "string") {
|
|
98
|
+
notes.push(item.connectionMessage);
|
|
99
|
+
} else if (item.connected === false && item.credentialStatus === "managed") {
|
|
100
|
+
notes.push("Temporarily unavailable.");
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
id: item.id,
|
|
104
|
+
kind: item.kind,
|
|
105
|
+
cost,
|
|
106
|
+
rateLimit: rateLimitDisplay(item),
|
|
107
|
+
// Production share of errored or rate-limited calls; absent when too few
|
|
108
|
+
// calls or orgs used the tool to say.
|
|
109
|
+
failureRate: failureRateDisplay(item.failureRate),
|
|
110
|
+
// Production share of calls that returned a result; same floor.
|
|
111
|
+
hitRate: failureRateDisplay(item.hitRate),
|
|
112
|
+
// Production p95 latency of successful calls; absent for the same reason.
|
|
113
|
+
p95: latencyDisplay(item.latencyP95Ms),
|
|
114
|
+
summary: clipSummary(item.description ?? "", summaryWidth),
|
|
115
|
+
notes
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
var SEARCH_KIND_COLUMN_ENABLED = false;
|
|
119
|
+
var OPTIONAL_COLUMNS = [
|
|
120
|
+
{ header: "RATE LIMIT", key: "rateLimit" },
|
|
121
|
+
{ header: "FAILURES", key: "failureRate" },
|
|
122
|
+
{ header: "HIT RATE", key: "hitRate" },
|
|
123
|
+
{ header: "P95", key: "p95" }
|
|
124
|
+
];
|
|
125
|
+
function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
126
|
+
if (result.results.length === 0)
|
|
127
|
+
return renderCommandEnvelopeText(result);
|
|
128
|
+
const rows = result.results.map((item) => searchRow(item, summaryWidth));
|
|
129
|
+
const kinds = new Set(rows.map((row) => row.kind));
|
|
130
|
+
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
131
|
+
const columns = [
|
|
132
|
+
{ header: onlyTools ? "TOOL" : "ID", value: (row) => row.id },
|
|
133
|
+
...SEARCH_KIND_COLUMN_ENABLED && !onlyTools ? [{ header: "KIND", value: (row) => row.kind }] : [],
|
|
134
|
+
{ header: "CREDITS", value: (row) => row.cost, alignment: "right" },
|
|
135
|
+
// Right-aligned figures that appear only when some row has one.
|
|
136
|
+
...OPTIONAL_COLUMNS.filter(
|
|
137
|
+
({ key }) => rows.some((row) => row[key] !== "\u2014")
|
|
138
|
+
).map(({ header, key }) => ({
|
|
139
|
+
header,
|
|
140
|
+
value: (row) => row[key],
|
|
141
|
+
alignment: "right"
|
|
142
|
+
})),
|
|
143
|
+
{ header: "SUMMARY", value: (row) => row.summary }
|
|
144
|
+
];
|
|
145
|
+
const render = result.render;
|
|
146
|
+
const sections = render?.sections ?? [];
|
|
147
|
+
const resultIndex = sections.findIndex(
|
|
148
|
+
({ title: title2 }) => title2 !== "ignored categories" && title2 !== "exact tool lookup"
|
|
149
|
+
);
|
|
150
|
+
const title = sections[resultIndex]?.title ?? `${result.total ?? rows.length} matches \u2014 showing ${rows.length}`;
|
|
151
|
+
const remaining = {
|
|
152
|
+
sections: sections.filter(
|
|
153
|
+
({ title: title2 }, index) => index !== resultIndex && title2 !== "exact tool lookup"
|
|
154
|
+
),
|
|
155
|
+
actions: render?.actions
|
|
156
|
+
};
|
|
157
|
+
const followUps = remaining.sections?.length || remaining.actions?.length ? `
|
|
158
|
+
${renderCommandEnvelopeText({ render: remaining })}` : "";
|
|
159
|
+
const exact = result.exactLookup?.toolId;
|
|
160
|
+
const matched = exact && result.results.find((item) => item.id === exact);
|
|
161
|
+
const contract = matched ? [
|
|
162
|
+
...matched.toolUsage?.effect ? [`Effect: ${matched.toolUsage.effect}`] : [],
|
|
163
|
+
...(matched.toolUsage?.requiredInputs ?? []).map(
|
|
164
|
+
({ name, meaning }) => ` ${name}${meaning ? ` \u2014 ${meaning}` : ""}`
|
|
165
|
+
),
|
|
166
|
+
...matched.auth ? discoveryAuthLines(matched.auth) : [],
|
|
167
|
+
...matched.describeCommand ? [matched.describeCommand] : [],
|
|
168
|
+
...matched.toolUsage?.example ? [matched.toolUsage.example.cli] : []
|
|
169
|
+
] : [];
|
|
170
|
+
const missingConnections = /* @__PURE__ */ new Set();
|
|
171
|
+
for (const item of result.results) {
|
|
172
|
+
if (item.id === exact || item.auth?.connectionRequired || item.credentialStatus !== "requires_connection")
|
|
173
|
+
continue;
|
|
174
|
+
const provider = typeof item.provider === "string" && item.provider.trim();
|
|
175
|
+
missingConnections.add(provider || item.id);
|
|
176
|
+
}
|
|
177
|
+
const notes = [...missingConnections].map(
|
|
178
|
+
(provider) => ` ${provider}: Not connected. Connect to use tools that require your credentials. See deepline describe <toolId> for setup.`
|
|
179
|
+
);
|
|
180
|
+
notes.push(
|
|
181
|
+
...rows.flatMap((row) => row.notes.map((note) => ` ${row.id}: ${note}`))
|
|
182
|
+
);
|
|
183
|
+
const details = [
|
|
184
|
+
...notes.length ? ["Notes", ...notes, ""] : [],
|
|
185
|
+
rows.some((row) => row.cost.endsWith("*")) ? "* See deepline describe <toolId> for full pricing information." : "Full descriptions and pricing: deepline describe <toolId>."
|
|
186
|
+
].join("\n");
|
|
187
|
+
const exactContract = contract.length ? `
|
|
188
|
+
|
|
189
|
+
Exact match
|
|
190
|
+
${contract.join("\n")}` : "";
|
|
191
|
+
const exactMiss = result.exactLookup?.status !== "found" ? result.exactLookup?.message : void 0;
|
|
192
|
+
return `${exactMiss ? `${exactMiss}
|
|
193
|
+
|
|
194
|
+
` : ""}${title}
|
|
195
|
+
|
|
196
|
+
${formatTextTable(rows, columns)}${exactContract}
|
|
197
|
+
|
|
198
|
+
${details}
|
|
199
|
+
${followUps}`;
|
|
200
|
+
}
|
|
201
|
+
export {
|
|
202
|
+
DEFAULT_SUMMARY_WIDTH,
|
|
203
|
+
SEARCH_KIND_COLUMN_ENABLED,
|
|
204
|
+
renderSearchResults
|
|
205
|
+
};
|
|
@@ -0,0 +1,205 @@
|
|
|
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 _chunkC5IA2OYEjs = require('./chunk-C5IA2OYE.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkD3BCSAN7js = require('./chunk-D3BCSAN7.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkLHPYCJNLjs = require('./chunk-LHPYCJNL.js');
|
|
10
|
+
require('./chunk-BVXIGOBZ.js');
|
|
11
|
+
require('./chunk-PMH4GLMD.js');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkJ5QAOURJjs = require('./chunk-J5QAOURJ.js');
|
|
15
|
+
require('./chunk-GE62FFN6.js');
|
|
16
|
+
require('./chunk-4VKDPTHF.js');
|
|
17
|
+
require('./chunk-6VLFQZK6.js');
|
|
18
|
+
require('./chunk-XNYIZMNQ.js');
|
|
19
|
+
require('./chunk-LFQJW4S2.js');
|
|
20
|
+
require('./chunk-CFJFUVX2.js');
|
|
21
|
+
require('./chunk-UWMK5DLS.js');
|
|
22
|
+
require('./chunk-OG64RBAC.js');
|
|
23
|
+
require('./chunk-COGTRVWW.js');
|
|
24
|
+
|
|
25
|
+
// src/cli/search-output.ts
|
|
26
|
+
function clipSummary(value, width) {
|
|
27
|
+
const characters = Array.from(value.replace(/\s+/gu, " ").trim());
|
|
28
|
+
return characters.length <= width ? characters.join("") : `${characters.slice(0, width - 1).join("")}\u2026`;
|
|
29
|
+
}
|
|
30
|
+
function toolPrice(item) {
|
|
31
|
+
const pricing = item.pricing;
|
|
32
|
+
if (!pricing) return item.kind === "tool" ? "unknown" : "\u2014";
|
|
33
|
+
if (item.billingSource === "own_provider_credentials") return "0 (byok)";
|
|
34
|
+
if (_optionalChain([pricing, 'access', _ => _.benefit, 'optionalAccess', _2 => _2.status]) === "included")
|
|
35
|
+
return typeof pricing.benefit.remaining === "number" ? `0 (${pricing.benefit.remaining.toLocaleString("en-US")} free left)*` : "0 (included)*";
|
|
36
|
+
if (_optionalChain([pricing, 'access', _3 => _3.benefit, 'optionalAccess', _4 => _4.status]) === "unavailable")
|
|
37
|
+
return "inclusion unavailable*";
|
|
38
|
+
if (_optionalChain([pricing, 'access', _5 => _5.benefit, 'optionalAccess', _6 => _6.status]) === "exhausted" && typeof pricing.creditsPerUnit === "number")
|
|
39
|
+
return `${pricing.creditsPerUnit}/${_nullishCoalesce(pricing.unit, () => ( "result"))}*`;
|
|
40
|
+
const range = pricing.estimatedRange;
|
|
41
|
+
if (range)
|
|
42
|
+
return `${range.minCreditsPerUnit}\u2013${range.maxCreditsPerUnit}/${pricing.unit} (estimate)*`;
|
|
43
|
+
const observed = pricing.observedReference;
|
|
44
|
+
if (observed) return `${observed.creditsPerCall}/call (observed)*`;
|
|
45
|
+
const observedAvg = pricing.observedMax;
|
|
46
|
+
if (_optionalChain([observedAvg, 'optionalAccess', _7 => _7.avgCreditsPerCall]) && observedAvg.sampleCount)
|
|
47
|
+
return `variable, ${observedAvg.avgCreditsPerCall} avg*`;
|
|
48
|
+
const display = _nullishCoalesce(pricing.displayText, () => ( ""));
|
|
49
|
+
const footnote = pricing.summary || _optionalChain([pricing, 'access', _8 => _8.details, 'optionalAccess', _9 => _9.length]) || pricing.observedMax ? "*" : "";
|
|
50
|
+
const rate = display.match(
|
|
51
|
+
/^([\d.,]+) Deepline credits(?: \/ \$[\d.,]+)? per (call|result|page|item|basic profile|full profile)( \(estimate\))?$/
|
|
52
|
+
);
|
|
53
|
+
if (rate) return `${rate[1]}/${rate[2]}${_nullishCoalesce(rate[3], () => ( ""))}${footnote}`;
|
|
54
|
+
if (pricing.creditsPerUnit === 0 && /^Free\b/.test(display))
|
|
55
|
+
return `0 (free)${footnote}`;
|
|
56
|
+
if (!display || display === "Pricing unavailable.")
|
|
57
|
+
return `unknown${footnote}`;
|
|
58
|
+
return pricing.unit === "usage" ? "usage-based*" : "variable*";
|
|
59
|
+
}
|
|
60
|
+
var RATE_WINDOW_UNITS = {
|
|
61
|
+
1e3: "s",
|
|
62
|
+
6e4: "min",
|
|
63
|
+
36e5: "hr"
|
|
64
|
+
};
|
|
65
|
+
function rateLimitDisplay(item) {
|
|
66
|
+
const limits = (Array.isArray(item.rateLimits) ? item.rateLimits : []).filter(
|
|
67
|
+
(limit) => typeof _optionalChain([limit, 'optionalAccess', _10 => _10.requestsPerWindow]) === "number" && typeof _optionalChain([limit, 'optionalAccess', _11 => _11.windowMs]) === "number" && limit.windowMs > 0
|
|
68
|
+
);
|
|
69
|
+
const [tightest] = limits.sort(
|
|
70
|
+
(a, b) => a.requestsPerWindow / a.windowMs - b.requestsPerWindow / b.windowMs
|
|
71
|
+
);
|
|
72
|
+
return tightest ? `${tightest.requestsPerWindow}/${_nullishCoalesce(RATE_WINDOW_UNITS[tightest.windowMs], () => ( `${tightest.windowMs / 1e3}s`))}` : "\u2014";
|
|
73
|
+
}
|
|
74
|
+
function failureRateDisplay(rate) {
|
|
75
|
+
if (typeof rate !== "number") return "\u2014";
|
|
76
|
+
const percent = Math.round(rate * 100);
|
|
77
|
+
return percent === 0 && rate > 0 ? "<1%" : `${percent}%`;
|
|
78
|
+
}
|
|
79
|
+
function latencyDisplay(ms) {
|
|
80
|
+
if (typeof ms !== "number" || !Number.isFinite(ms)) return "\u2014";
|
|
81
|
+
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
82
|
+
if (ms < 6e4) return `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)}s`;
|
|
83
|
+
return `${(ms / 6e4).toFixed(1)}min`;
|
|
84
|
+
}
|
|
85
|
+
function searchRow(item, summaryWidth) {
|
|
86
|
+
const observedCost = item.observedCost;
|
|
87
|
+
const notes = [];
|
|
88
|
+
let cost;
|
|
89
|
+
if (!observedCost) {
|
|
90
|
+
cost = toolPrice(item);
|
|
91
|
+
} else if (observedCost.status === "available") {
|
|
92
|
+
cost = `${observedCost.avgCredits}/${observedCost.unit} (observed)`;
|
|
93
|
+
} else {
|
|
94
|
+
cost = observedCost.typical ? `${observedCost.typical.lowCredits}\u2013${observedCost.typical.highCredits}/${observedCost.typical.unit} (typical)` : "no data yet";
|
|
95
|
+
notes.push(`Cost: ${observedCost.displayText}`);
|
|
96
|
+
}
|
|
97
|
+
if (_optionalChain([item, 'access', _12 => _12.auth, 'optionalAccess', _13 => _13.connectionRequired]) && typeof item.connectionMessage === "string") {
|
|
98
|
+
notes.push(item.connectionMessage);
|
|
99
|
+
} else if (item.connected === false && item.credentialStatus === "managed") {
|
|
100
|
+
notes.push("Temporarily unavailable.");
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
id: item.id,
|
|
104
|
+
kind: item.kind,
|
|
105
|
+
cost,
|
|
106
|
+
rateLimit: rateLimitDisplay(item),
|
|
107
|
+
// Production share of errored or rate-limited calls; absent when too few
|
|
108
|
+
// calls or orgs used the tool to say.
|
|
109
|
+
failureRate: failureRateDisplay(item.failureRate),
|
|
110
|
+
// Production share of calls that returned a result; same floor.
|
|
111
|
+
hitRate: failureRateDisplay(item.hitRate),
|
|
112
|
+
// Production p95 latency of successful calls; absent for the same reason.
|
|
113
|
+
p95: latencyDisplay(item.latencyP95Ms),
|
|
114
|
+
summary: clipSummary(_nullishCoalesce(item.description, () => ( "")), summaryWidth),
|
|
115
|
+
notes
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
var SEARCH_KIND_COLUMN_ENABLED = false;
|
|
119
|
+
var OPTIONAL_COLUMNS = [
|
|
120
|
+
{ header: "RATE LIMIT", key: "rateLimit" },
|
|
121
|
+
{ header: "FAILURES", key: "failureRate" },
|
|
122
|
+
{ header: "HIT RATE", key: "hitRate" },
|
|
123
|
+
{ header: "P95", key: "p95" }
|
|
124
|
+
];
|
|
125
|
+
function renderSearchResults(result, summaryWidth = _chunkD3BCSAN7js.DEFAULT_SUMMARY_WIDTH) {
|
|
126
|
+
if (result.results.length === 0)
|
|
127
|
+
return _chunkJ5QAOURJjs.renderCommandEnvelopeText.call(void 0, result);
|
|
128
|
+
const rows = result.results.map((item) => searchRow(item, summaryWidth));
|
|
129
|
+
const kinds = new Set(rows.map((row) => row.kind));
|
|
130
|
+
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
131
|
+
const columns = [
|
|
132
|
+
{ header: onlyTools ? "TOOL" : "ID", value: (row) => row.id },
|
|
133
|
+
...SEARCH_KIND_COLUMN_ENABLED && !onlyTools ? [{ header: "KIND", value: (row) => row.kind }] : [],
|
|
134
|
+
{ header: "CREDITS", value: (row) => row.cost, alignment: "right" },
|
|
135
|
+
// Right-aligned figures that appear only when some row has one.
|
|
136
|
+
...OPTIONAL_COLUMNS.filter(
|
|
137
|
+
({ key }) => rows.some((row) => row[key] !== "\u2014")
|
|
138
|
+
).map(({ header, key }) => ({
|
|
139
|
+
header,
|
|
140
|
+
value: (row) => row[key],
|
|
141
|
+
alignment: "right"
|
|
142
|
+
})),
|
|
143
|
+
{ header: "SUMMARY", value: (row) => row.summary }
|
|
144
|
+
];
|
|
145
|
+
const render = result.render;
|
|
146
|
+
const sections = _nullishCoalesce(_optionalChain([render, 'optionalAccess', _14 => _14.sections]), () => ( []));
|
|
147
|
+
const resultIndex = sections.findIndex(
|
|
148
|
+
({ title: title2 }) => title2 !== "ignored categories" && title2 !== "exact tool lookup"
|
|
149
|
+
);
|
|
150
|
+
const title = _nullishCoalesce(_optionalChain([sections, 'access', _15 => _15[resultIndex], 'optionalAccess', _16 => _16.title]), () => ( `${_nullishCoalesce(result.total, () => ( rows.length))} matches \u2014 showing ${rows.length}`));
|
|
151
|
+
const remaining = {
|
|
152
|
+
sections: sections.filter(
|
|
153
|
+
({ title: title2 }, index) => index !== resultIndex && title2 !== "exact tool lookup"
|
|
154
|
+
),
|
|
155
|
+
actions: _optionalChain([render, 'optionalAccess', _17 => _17.actions])
|
|
156
|
+
};
|
|
157
|
+
const followUps = _optionalChain([remaining, 'access', _18 => _18.sections, 'optionalAccess', _19 => _19.length]) || _optionalChain([remaining, 'access', _20 => _20.actions, 'optionalAccess', _21 => _21.length]) ? `
|
|
158
|
+
${_chunkJ5QAOURJjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
159
|
+
const exact = _optionalChain([result, 'access', _22 => _22.exactLookup, 'optionalAccess', _23 => _23.toolId]);
|
|
160
|
+
const matched = exact && result.results.find((item) => item.id === exact);
|
|
161
|
+
const contract = matched ? [
|
|
162
|
+
..._optionalChain([matched, 'access', _24 => _24.toolUsage, 'optionalAccess', _25 => _25.effect]) ? [`Effect: ${matched.toolUsage.effect}`] : [],
|
|
163
|
+
...(_nullishCoalesce(_optionalChain([matched, 'access', _26 => _26.toolUsage, 'optionalAccess', _27 => _27.requiredInputs]), () => ( []))).map(
|
|
164
|
+
({ name, meaning }) => ` ${name}${meaning ? ` \u2014 ${meaning}` : ""}`
|
|
165
|
+
),
|
|
166
|
+
...matched.auth ? _chunkLHPYCJNLjs.discoveryAuthLines.call(void 0, matched.auth) : [],
|
|
167
|
+
...matched.describeCommand ? [matched.describeCommand] : [],
|
|
168
|
+
..._optionalChain([matched, 'access', _28 => _28.toolUsage, 'optionalAccess', _29 => _29.example]) ? [matched.toolUsage.example.cli] : []
|
|
169
|
+
] : [];
|
|
170
|
+
const missingConnections = /* @__PURE__ */ new Set();
|
|
171
|
+
for (const item of result.results) {
|
|
172
|
+
if (item.id === exact || _optionalChain([item, 'access', _30 => _30.auth, 'optionalAccess', _31 => _31.connectionRequired]) || item.credentialStatus !== "requires_connection")
|
|
173
|
+
continue;
|
|
174
|
+
const provider = typeof item.provider === "string" && item.provider.trim();
|
|
175
|
+
missingConnections.add(provider || item.id);
|
|
176
|
+
}
|
|
177
|
+
const notes = [...missingConnections].map(
|
|
178
|
+
(provider) => ` ${provider}: Not connected. Connect to use tools that require your credentials. See deepline describe <toolId> for setup.`
|
|
179
|
+
);
|
|
180
|
+
notes.push(
|
|
181
|
+
...rows.flatMap((row) => row.notes.map((note) => ` ${row.id}: ${note}`))
|
|
182
|
+
);
|
|
183
|
+
const details = [
|
|
184
|
+
...notes.length ? ["Notes", ...notes, ""] : [],
|
|
185
|
+
rows.some((row) => row.cost.endsWith("*")) ? "* See deepline describe <toolId> for full pricing information." : "Full descriptions and pricing: deepline describe <toolId>."
|
|
186
|
+
].join("\n");
|
|
187
|
+
const exactContract = contract.length ? `
|
|
188
|
+
|
|
189
|
+
Exact match
|
|
190
|
+
${contract.join("\n")}` : "";
|
|
191
|
+
const exactMiss = _optionalChain([result, 'access', _32 => _32.exactLookup, 'optionalAccess', _33 => _33.status]) !== "found" ? _optionalChain([result, 'access', _34 => _34.exactLookup, 'optionalAccess', _35 => _35.message]) : void 0;
|
|
192
|
+
return `${exactMiss ? `${exactMiss}
|
|
193
|
+
|
|
194
|
+
` : ""}${title}
|
|
195
|
+
|
|
196
|
+
${_chunkC5IA2OYEjs.formatTextTable.call(void 0, rows, columns)}${exactContract}
|
|
197
|
+
|
|
198
|
+
${details}
|
|
199
|
+
${followUps}`;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
exports.DEFAULT_SUMMARY_WIDTH = _chunkD3BCSAN7js.DEFAULT_SUMMARY_WIDTH; exports.SEARCH_KIND_COLUMN_ENABLED = SEARCH_KIND_COLUMN_ENABLED; exports.renderSearchResults = renderSearchResults;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-IFZA4IGI.mjs";
|
|
4
|
+
import "./chunk-AAOXS3XM.mjs";
|
|
5
5
|
import "./chunk-FZHMNK6F.mjs";
|
|
6
6
|
import "./chunk-5TYLSS4Q.mjs";
|
|
7
7
|
import "./chunk-PSX3WHIH.mjs";
|
|
8
8
|
import {
|
|
9
9
|
getAuthedHttpClient,
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-JLXLCD6F.mjs";
|
|
12
|
+
import "./chunk-2US3VJXX.mjs";
|
|
13
|
+
import "./chunk-LKVWMLWI.mjs";
|
|
14
14
|
import "./chunk-ASB47RXJ.mjs";
|
|
15
15
|
import "./chunk-DLIRSHV6.mjs";
|
|
16
16
|
import "./chunk-Z3A2S3QM.mjs";
|
|
17
17
|
import "./chunk-2MGZAI54.mjs";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-H4LHB6ES.mjs";
|
|
19
19
|
import "./chunk-WZYKRD7T.mjs";
|
|
20
20
|
import "./chunk-KRD6H754.mjs";
|
|
21
21
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkNH3LVGVRjs = require('./chunk-NH3LVGVR.js');
|
|
4
|
+
require('./chunk-FXRSHBRP.js');
|
|
5
5
|
require('./chunk-4WAM6TLD.js');
|
|
6
6
|
require('./chunk-MJTVX4QK.js');
|
|
7
7
|
require('./chunk-PMH4GLMD.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
11
|
+
var _chunkJ5QAOURJjs = require('./chunk-J5QAOURJ.js');
|
|
12
|
+
require('./chunk-GE62FFN6.js');
|
|
13
|
+
require('./chunk-4VKDPTHF.js');
|
|
14
14
|
require('./chunk-6VLFQZK6.js');
|
|
15
15
|
require('./chunk-XNYIZMNQ.js');
|
|
16
16
|
require('./chunk-LFQJW4S2.js');
|
|
17
17
|
require('./chunk-CFJFUVX2.js');
|
|
18
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-UWMK5DLS.js');
|
|
19
19
|
require('./chunk-OG64RBAC.js');
|
|
20
20
|
require('./chunk-COGTRVWW.js');
|
|
21
21
|
|
|
@@ -207,9 +207,9 @@ function preventShellHistoryLeak(forbidden) {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
async function handleList(options) {
|
|
210
|
-
const client = new (0,
|
|
210
|
+
const client = new (0, _chunkNH3LVGVRjs.DeeplineClient)();
|
|
211
211
|
const secrets = await client.listSecrets();
|
|
212
|
-
|
|
212
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
213
213
|
{
|
|
214
214
|
secrets,
|
|
215
215
|
count: secrets.length,
|
|
@@ -227,14 +227,14 @@ async function handleList(options) {
|
|
|
227
227
|
}
|
|
228
228
|
async function handleCheck(nameInput, options) {
|
|
229
229
|
const name = normalizeSecretName(nameInput);
|
|
230
|
-
const client = new (0,
|
|
230
|
+
const client = new (0, _chunkNH3LVGVRjs.DeeplineClient)();
|
|
231
231
|
const playName = options.play === void 0 ? void 0 : normalizePlaySelector(options.play);
|
|
232
232
|
const check = playName !== void 0 ? await client.inspectSecret(name, { playName }) : null;
|
|
233
233
|
const secret = check ? check.secret : await client.checkSecret(name);
|
|
234
234
|
const ok = check ? check.ok : Boolean(secret);
|
|
235
235
|
const quotedPlay = `'${(_nullishCoalesce(options.play, () => ( "PLAY"))).replace(/'/g, `'"'"'`)}'`;
|
|
236
236
|
const scopeHint = check ? _optionalChain([secret, 'optionalAccess', _3 => _3.scope]) === "play" ? check.reason === "disabled" ? `The Play-scoped secret is disabled and no active org fallback is available. Restore it with: deepline secrets set ${name} --scope play --play ${quotedPlay}` : `The active Play-scoped secret takes precedence over the org secret.${ok ? "" : ` Restore it with: deepline secrets set ${name} --scope play --play ${quotedPlay}`}` : `No Play override.${ok ? " The org secret is available." : ` Set or rotate the org secret with: deepline secrets set ${name}`}` : `Metadata only. Verify effective scope and active version with: deepline secrets check ${name} --play <play-name>`;
|
|
237
|
-
|
|
237
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
238
238
|
{
|
|
239
239
|
ok,
|
|
240
240
|
name,
|
|
@@ -262,7 +262,7 @@ async function handleSet(nameInput, forbidden, options) {
|
|
|
262
262
|
const name = normalizeSecretName(nameInput);
|
|
263
263
|
const { scope, playName } = resolveSecretWriteScope(options);
|
|
264
264
|
const value = await readSecretValueFromOptions(options);
|
|
265
|
-
const { http } =
|
|
265
|
+
const { http } = _chunkJ5QAOURJjs.getAuthedHttpClient.call(void 0, );
|
|
266
266
|
const response = await http.post(
|
|
267
267
|
"/api/v2/secrets",
|
|
268
268
|
{
|
|
@@ -274,7 +274,7 @@ async function handleSet(nameInput, forbidden, options) {
|
|
|
274
274
|
}
|
|
275
275
|
);
|
|
276
276
|
const secret = response.secret;
|
|
277
|
-
|
|
277
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
278
278
|
{
|
|
279
279
|
ok: true,
|
|
280
280
|
secret,
|
|
@@ -302,7 +302,7 @@ async function handleNote(secretId, noteInput, options) {
|
|
|
302
302
|
}
|
|
303
303
|
const note = options.clear ? "" : noteInput;
|
|
304
304
|
if (options.dryRun) {
|
|
305
|
-
|
|
305
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
306
306
|
{
|
|
307
307
|
ok: true,
|
|
308
308
|
dryRun: true,
|
|
@@ -323,9 +323,9 @@ async function handleNote(secretId, noteInput, options) {
|
|
|
323
323
|
);
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
|
-
const client = new (0,
|
|
326
|
+
const client = new (0, _chunkNH3LVGVRjs.DeeplineClient)();
|
|
327
327
|
const secret = await client.updateSecretNote(secretId, note);
|
|
328
|
-
|
|
328
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
329
329
|
{
|
|
330
330
|
ok: true,
|
|
331
331
|
secret,
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
registerSessionSendRenderCommands,
|
|
4
4
|
registerSessionsCommands,
|
|
5
5
|
uploadAgentSession
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-UTQ6LQWG.mjs";
|
|
7
|
+
import "./chunk-BCEXSQPK.mjs";
|
|
8
|
+
import "./chunk-JLXLCD6F.mjs";
|
|
9
|
+
import "./chunk-2US3VJXX.mjs";
|
|
10
|
+
import "./chunk-LKVWMLWI.mjs";
|
|
11
11
|
import "./chunk-ASB47RXJ.mjs";
|
|
12
12
|
import "./chunk-DLIRSHV6.mjs";
|
|
13
13
|
import "./chunk-Z3A2S3QM.mjs";
|
|
14
14
|
import "./chunk-2MGZAI54.mjs";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-H4LHB6ES.mjs";
|
|
16
16
|
import "./chunk-WZYKRD7T.mjs";
|
|
17
17
|
import "./chunk-KRD6H754.mjs";
|
|
18
18
|
export {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkE73BRM5Njs = require('./chunk-E73BRM5N.js');
|
|
7
|
+
require('./chunk-FEWBYUUF.js');
|
|
8
|
+
require('./chunk-J5QAOURJ.js');
|
|
9
|
+
require('./chunk-GE62FFN6.js');
|
|
10
|
+
require('./chunk-4VKDPTHF.js');
|
|
11
|
+
require('./chunk-6VLFQZK6.js');
|
|
12
|
+
require('./chunk-XNYIZMNQ.js');
|
|
13
|
+
require('./chunk-LFQJW4S2.js');
|
|
14
|
+
require('./chunk-CFJFUVX2.js');
|
|
15
|
+
require('./chunk-UWMK5DLS.js');
|
|
16
|
+
require('./chunk-OG64RBAC.js');
|
|
17
|
+
require('./chunk-COGTRVWW.js');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
exports.feedbackAgentSessionId = _chunkE73BRM5Njs.feedbackAgentSessionId; exports.registerSessionSendRenderCommands = _chunkE73BRM5Njs.registerSessionSendRenderCommands; exports.registerSessionsCommands = _chunkE73BRM5Njs.registerSessionsCommands; exports.uploadAgentSession = _chunkE73BRM5Njs.uploadAgentSession;
|