deepline 0.3.557 → 0.3.559
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +23 -1
- package/dist/bundling-sources/shared_libs/observability/telemetry.ts +4 -1
- package/dist/cli/auth-3SBMYRAJ.js +44 -0
- package/dist/cli/{auth-SGWFS2DS.mjs → auth-D6S6E7BL.mjs} +5 -5
- package/dist/cli/{billing-XJZX3JSG.mjs → billing-3BNTAYUY.mjs} +8 -8
- package/dist/cli/{billing-G6C2LUSN.js → billing-7YRVKWAU.js} +99 -99
- package/dist/cli/{chunk-TPRMS2D7.mjs → chunk-22Z2U5MW.mjs} +3 -3
- package/dist/cli/{chunk-7AMUXIZ5.js → chunk-24XWLHKJ.js} +1 -1
- package/dist/cli/{chunk-UP2CQTGX.js → chunk-2YQGXPQ7.js} +2 -2
- package/dist/cli/{chunk-XJUHHIH4.mjs → chunk-3MVBZ4XI.mjs} +5 -5
- package/dist/cli/{chunk-24PL5QN5.mjs → chunk-53HQJS6D.mjs} +1 -1
- package/dist/cli/{chunk-CPDXS2UK.js → chunk-6ASDTHEN.js} +17 -17
- package/dist/cli/{chunk-ODBQY6MD.js → chunk-6BJHMXMA.js} +2 -2
- package/dist/cli/{chunk-L7DGWNF7.js → chunk-A4KQZ6P5.js} +8 -8
- package/dist/cli/{chunk-VLXLKNR4.mjs → chunk-BM4GE67C.mjs} +2 -1
- package/dist/cli/{chunk-PITVKXY3.mjs → chunk-D7DXRFM2.mjs} +1 -1
- package/dist/cli/{chunk-WSX76BQX.js → chunk-EEUJNR5K.js} +6 -6
- package/dist/cli/{chunk-4AE3A4SL.mjs → chunk-ENHQBPR5.mjs} +1 -1
- package/dist/cli/{chunk-5H7BLMNH.js → chunk-EYL4V32Q.js} +4 -4
- package/dist/cli/{chunk-5S2G32ZX.js → chunk-FDVSB4NF.js} +53 -53
- package/dist/cli/{chunk-JORWYP5P.mjs → chunk-FHMGNUOP.mjs} +1 -1
- package/dist/cli/{chunk-MZSUMGWN.js → chunk-G7IGOVPF.js} +20 -20
- package/dist/cli/{chunk-JX4X4KAZ.mjs → chunk-GETMCDVX.mjs} +7 -7
- package/dist/cli/{chunk-A6FYP3KU.js → chunk-GFHBS7HG.js} +5 -5
- package/dist/cli/{chunk-NW6NYTYM.mjs → chunk-GWS7XJI2.mjs} +4 -4
- package/dist/cli/{chunk-NXYBZSRL.mjs → chunk-HUJMFETO.mjs} +2 -2
- package/dist/cli/{chunk-VVGGQBAV.mjs → chunk-II33OPIO.mjs} +2 -2
- package/dist/cli/{chunk-UVFR7FW4.js → chunk-IUDO463I.js} +20 -20
- package/dist/cli/{chunk-B2V6NKX7.js → chunk-JME33A35.js} +20 -20
- package/dist/cli/{chunk-JMDLLVIR.js → chunk-JUTXZW3S.js} +11 -11
- package/dist/cli/{chunk-DTMUYIUO.js → chunk-K5BZF2VO.js} +9 -9
- package/dist/cli/{chunk-5RVSMMQV.mjs → chunk-KACD2TYW.mjs} +2 -2
- package/dist/cli/{chunk-YQDBHVYJ.mjs → chunk-KGCY3MSS.mjs} +5 -5
- package/dist/cli/{chunk-2YT2TFNX.js → chunk-LHPYCJNL.js} +2 -1
- package/dist/cli/{chunk-YUB7OX65.mjs → chunk-LTCV5BI2.mjs} +1 -1
- package/dist/cli/{chunk-L5JD66EF.js → chunk-LWOYDMYC.js} +3 -3
- package/dist/cli/{chunk-WZKWSIZS.mjs → chunk-MJ4JEJLL.mjs} +1 -1
- package/dist/cli/{chunk-TW7HFIQG.mjs → chunk-MPEMAGZS.mjs} +13 -13
- package/dist/cli/{chunk-ARYKF2YT.mjs → chunk-MWZEGRY2.mjs} +2 -2
- package/dist/cli/{chunk-4YNKJTCP.mjs → chunk-OFC24U3N.mjs} +2 -2
- package/dist/cli/{chunk-EZNYE6GZ.js → chunk-OJ3FRPEP.js} +10 -10
- package/dist/cli/{chunk-NHGQHMV7.js → chunk-OSHKFYY4.js} +41 -41
- package/dist/cli/{chunk-GENZXMNR.mjs → chunk-P2DFD2NG.mjs} +1 -1
- package/dist/cli/{chunk-JY2EJQL5.js → chunk-PNFC7VHH.js} +5 -5
- package/dist/cli/{chunk-6C3E6ZZ3.js → chunk-PQ52YTDB.js} +13 -13
- package/dist/cli/{chunk-OOCGLW46.mjs → chunk-PZUBDHQ7.mjs} +4 -4
- package/dist/cli/{chunk-25SOYGAX.js → chunk-QGVOD6Y4.js} +274 -274
- package/dist/cli/{chunk-JWPJXCD2.js → chunk-QQ6AVBHW.js} +23 -23
- package/dist/cli/{chunk-6ZBAXLOR.js → chunk-SSE5P2CX.js} +12 -12
- package/dist/cli/{chunk-PK6MYC5E.js → chunk-TBLP7HDL.js} +7 -7
- package/dist/cli/{chunk-C46GRCHZ.js → chunk-TIMFDVUN.js} +48 -48
- package/dist/cli/{chunk-K35ZLTN2.js → chunk-TPLISQND.js} +5 -5
- package/dist/cli/{chunk-CDLTF6M2.mjs → chunk-UA2VLWZH.mjs} +2 -2
- package/dist/cli/{chunk-C6M5TIPZ.mjs → chunk-UHIOXXAO.mjs} +1 -1
- package/dist/cli/{chunk-U7LDRRRB.mjs → chunk-URACGTQE.mjs} +1 -1
- package/dist/cli/{chunk-OBW2YFHR.mjs → chunk-VZKBLSTA.mjs} +2 -2
- package/dist/cli/{chunk-ZAR6JSI6.js → chunk-WZUOUQZ3.js} +3 -3
- package/dist/cli/{chunk-T26CM5LC.js → chunk-XNN45XYF.js} +2 -2
- package/dist/cli/{chunk-GC4HHDE4.mjs → chunk-XPS2UBYV.mjs} +3 -3
- package/dist/cli/{chunk-DUXL7U7U.mjs → chunk-XXZDT3U7.mjs} +2 -2
- package/dist/cli/{chunk-NWQZIBPY.js → chunk-YE7OCVI5.js} +26 -26
- package/dist/cli/{chunk-QUAPOFCA.mjs → chunk-YFUFYV4M.mjs} +5 -5
- package/dist/cli/{chunk-2TTAHHSJ.mjs → chunk-YODGCJPX.mjs} +2 -2
- package/dist/cli/{chunk-ZKLUGMPE.mjs → chunk-ZMC5FEJN.mjs} +2 -2
- package/dist/cli/{concurrent-runs-help-HSBXPVDN.mjs → concurrent-runs-help-FCAZLZNA.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-TVQO4USY.js +22 -0
- package/dist/cli/{csv-OQGWJ4HU.mjs → csv-BC26EB4B.mjs} +4 -4
- package/dist/cli/{csv-JEOU3DOF.js → csv-SCIQKZNH.js} +13 -13
- package/dist/cli/{db-75WPSR3C.js → db-IJRJVIQ3.js} +27 -27
- package/dist/cli/{db-YHCKYQJI.mjs → db-RVOPGYKY.mjs} +6 -6
- package/dist/cli/describe-4FBGZZK5.js +50 -0
- package/dist/cli/{describe-TSW245QQ.mjs → describe-K7CRL4PA.mjs} +21 -21
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-PNSETDOA.js → executions-IEVLTSXV.js} +8 -8
- package/dist/cli/{executions-NW3SQULX.mjs → executions-PDOO2GFK.mjs} +6 -6
- package/dist/cli/{feedback-R2Y4APBY.mjs → feedback-7YVUUROQ.mjs} +6 -6
- package/dist/cli/{feedback-LXTVGS4E.js → feedback-KHYOWTXA.js} +14 -14
- package/dist/cli/{git-S7DESBSB.mjs → git-426CAP5S.mjs} +5 -5
- package/dist/cli/git-O6A2FVJE.js +26 -0
- package/dist/cli/index.js +143 -143
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-ZLMM2CMG.js → integrations-BVHTRN3W.js} +15 -15
- package/dist/cli/{integrations-CQWODJ23.mjs → integrations-TNJ4IELE.mjs} +7 -7
- package/dist/cli/{legacy-noops-EGD7QOML.mjs → legacy-noops-2GB35THO.mjs} +6 -6
- package/dist/cli/{legacy-noops-4UDVSN5R.js → legacy-noops-F73BMPBV.js} +9 -9
- package/dist/cli/{mcp-Q3SKD3A2.mjs → mcp-BAGMQXNR.mjs} +4 -4
- package/dist/cli/{mcp-5W4HWAMB.js → mcp-KMTC7OBK.js} +24 -24
- package/dist/cli/{monitors-ZXHOLBOO.mjs → monitors-ECONWLHL.mjs} +7 -7
- package/dist/cli/{monitors-NA6QQRUK.js → monitors-O2BUIK7Q.js} +100 -100
- package/dist/cli/{org-25E7SBZP.js → org-5NQQ4PRU.js} +121 -121
- package/dist/cli/{org-O3NSKVA7.mjs → org-AEZZBWA3.mjs} +6 -6
- package/dist/cli/{outcomes-O5DS5XSH.js → outcomes-IKEQKAF7.js} +14 -14
- package/dist/cli/{outcomes-TEXVO2EV.mjs → outcomes-ZWHAJH5I.mjs} +6 -6
- package/dist/cli/{play-UFAJEDX4.mjs → play-BVKLMTAS.mjs} +20 -20
- package/dist/cli/{play-2FVIRT7Z.js → play-VDWB7FZ5.js} +337 -337
- package/dist/cli/{providers-4C4TJ5N3.js → providers-RXT3Q5Q7.js} +9 -9
- package/dist/cli/{providers-LCJA4VQ7.mjs → providers-SWRTGKJJ.mjs} +6 -6
- package/dist/cli/{quickstart-QOJLPGFW.mjs → quickstart-GQVXM7XV.mjs} +4 -4
- package/dist/cli/{quickstart-2OAKQFLT.js → quickstart-UJJNXI2S.js} +6 -6
- package/dist/cli/{run-SNAFQJWR.mjs → run-GDIEU622.mjs} +26 -26
- package/dist/cli/{run-SV3EPJGU.js → run-WOTVRFGN.js} +48 -48
- package/dist/cli/{search-KIJZGURG.mjs → search-EWC7V6GT.mjs} +7 -7
- package/dist/cli/search-UIZHXBHR.js +32 -0
- package/dist/cli/{search-output-OESDMVBG.mjs → search-output-FCW4R6Z4.mjs} +5 -5
- package/dist/cli/{search-output-WRHLYDZX.js → search-output-FL7STAYJ.js} +8 -8
- package/dist/cli/{secrets-GH6KF5VR.js → secrets-UXDUGONR.js} +15 -15
- package/dist/cli/{secrets-5WCCHFM5.mjs → secrets-XG22PDCR.mjs} +6 -6
- package/dist/cli/{sessions-52MAEUFQ.mjs → sessions-2OKBG7FD.mjs} +6 -6
- package/dist/cli/sessions-DPYJFTCW.js +23 -0
- package/dist/cli/{settings-HDOBMJ5A.mjs → settings-EDYA2V4W.mjs} +12 -12
- package/dist/cli/{settings-5RSARPXF.js → settings-RWN7YHK3.js} +85 -85
- package/dist/cli/{setup-4DTCFBOX.js → setup-HA3PG3ST.js} +49 -49
- package/dist/cli/{setup-UY3TSZZV.mjs → setup-UZW2IHAT.mjs} +9 -9
- package/dist/cli/skills-RQ6V5TGY.js +37 -0
- package/dist/cli/{skills-QUWJHOEZ.mjs → skills-V4KAUQQA.mjs} +7 -7
- package/dist/cli/{tools-U2LH642W.mjs → tools-HFUGLYHU.mjs} +19 -19
- package/dist/cli/tools-NGQKXMHP.js +57 -0
- package/dist/cli/{update-3H4E5YJ7.mjs → update-S3KEH7P2.mjs} +9 -9
- package/dist/cli/update-SJJK6XXM.js +37 -0
- package/dist/cli/{views-2LUZ3ATR.js → views-QH5L37UW.js} +21 -21
- package/dist/cli/{views-7WOYBLLQ.mjs → views-Y7Y5Y7V2.mjs} +6 -6
- package/dist/cli/{workflow-YME2SGMA.js → workflow-4W5JT5HP.js} +17 -17
- package/dist/cli/{workflow-55OASFLG.mjs → workflow-XNN54KIK.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -118
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-F7QPLPTB.js +0 -44
- package/dist/cli/concurrent-runs-help-3KEUX2GA.js +0 -22
- package/dist/cli/describe-ZUATHN4Z.js +0 -50
- package/dist/cli/git-GAXMETIP.js +0 -26
- package/dist/cli/search-DCHBSXPZ.js +0 -32
- package/dist/cli/sessions-MYG6BH6T.js +0 -23
- package/dist/cli/skills-EOC2MSQK.js +0 -37
- package/dist/cli/tools-AGOX64LC.js +0 -57
- package/dist/cli/update-OLLOIH4U.js +0 -37
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkG7IGOVPFjs = require('./chunk-G7IGOVPF.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkTIMFDVUNjs = require('./chunk-TIMFDVUN.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkIUDO463Ijs = require('./chunk-IUDO463I.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkLWOYDMYCjs = require('./chunk-LWOYDMYC.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkEYL4V32Qjs = require('./chunk-EYL4V32Q.js');
|
|
23
23
|
|
|
24
24
|
// src/cli/compatibility-catalog.ts
|
|
25
25
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -46,7 +46,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
46
46
|
async function reportAutoUpdateEvent(input) {
|
|
47
47
|
let apiKey = "";
|
|
48
48
|
try {
|
|
49
|
-
apiKey =
|
|
49
|
+
apiKey = _chunkLWOYDMYCjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
50
50
|
} catch (e2) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
@@ -62,15 +62,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
62
62
|
headers: {
|
|
63
63
|
Authorization: `Bearer ${apiKey}`,
|
|
64
64
|
"Content-Type": "application/json",
|
|
65
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
65
|
+
"User-Agent": `deepline-ts-sdk/${_chunkEYL4V32Qjs.SDK_VERSION}`,
|
|
66
66
|
"X-Deepline-Client-Family": "sdk",
|
|
67
67
|
"X-Deepline-CLI-Family": "sdk",
|
|
68
|
-
"X-Deepline-CLI-Version":
|
|
69
|
-
"X-Deepline-SDK-Version":
|
|
68
|
+
"X-Deepline-CLI-Version": _chunkEYL4V32Qjs.SDK_VERSION,
|
|
69
|
+
"X-Deepline-SDK-Version": _chunkEYL4V32Qjs.SDK_VERSION
|
|
70
70
|
},
|
|
71
71
|
body: JSON.stringify({
|
|
72
72
|
event: input.event,
|
|
73
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
73
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkEYL4V32Qjs.SDK_VERSION,
|
|
74
74
|
target_version: input.response.latest,
|
|
75
75
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
76
76
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -89,19 +89,19 @@ function envTruthy(name) {
|
|
|
89
89
|
return value === "1" || value === "true" || value === "yes";
|
|
90
90
|
}
|
|
91
91
|
function shouldSkipSelfUpdate(policy) {
|
|
92
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
92
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkG7IGOVPFjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkTIMFDVUNjs.isCiEnvironment.call(void 0, );
|
|
93
93
|
}
|
|
94
94
|
function isDowngradeAutoUpdateResponse(response) {
|
|
95
95
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
96
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
96
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkEYL4V32Qjs.SDK_VERSION;
|
|
97
97
|
if (!target) return false;
|
|
98
|
-
return
|
|
98
|
+
return _chunkG7IGOVPFjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
99
99
|
}
|
|
100
100
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
101
101
|
return new Promise((resolve) => {
|
|
102
102
|
const argv = _nullishCoalesce(runtime.argv, () => ( process.argv));
|
|
103
103
|
const platform = _nullishCoalesce(runtime.platform, () => ( process.platform));
|
|
104
|
-
const launch = plan.kind === "python-sidecar" ?
|
|
104
|
+
const launch = plan.kind === "python-sidecar" ? _chunkTIMFDVUNjs.resolveShellSpawn.call(void 0, plan.sidecarPath, argv.slice(2), platform) : {
|
|
105
105
|
command: _nullishCoalesce(runtime.execPath, () => ( process.execPath)),
|
|
106
106
|
args: argv.slice(1),
|
|
107
107
|
shell: false
|
|
@@ -148,7 +148,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
148
148
|
}
|
|
149
149
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
150
150
|
const target = response.latest;
|
|
151
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
151
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkEYL4V32Qjs.SDK_VERSION;
|
|
152
152
|
process.stderr.write(
|
|
153
153
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
154
154
|
`
|
|
@@ -156,21 +156,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
156
156
|
return false;
|
|
157
157
|
}
|
|
158
158
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
159
|
-
const plan =
|
|
159
|
+
const plan = _chunkG7IGOVPFjs.resolveUpdatePlan.call(void 0, {
|
|
160
160
|
packageSpec,
|
|
161
161
|
requireVerifiedNpmOwnership: true,
|
|
162
162
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
163
163
|
});
|
|
164
|
-
if (!
|
|
164
|
+
if (!_chunkG7IGOVPFjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
165
165
|
return false;
|
|
166
166
|
}
|
|
167
167
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
168
168
|
deferredAutoUpdate = async () => {
|
|
169
169
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
170
170
|
};
|
|
171
|
-
if (
|
|
171
|
+
if (_chunkIUDO463Ijs.isJsonOutputMode.call(void 0, )) {
|
|
172
172
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
173
|
-
|
|
173
|
+
_chunkIUDO463Ijs.addJsonNotice.call(void 0, {
|
|
174
174
|
code: "sdk_update_queued",
|
|
175
175
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
176
176
|
});
|
|
@@ -183,7 +183,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
183
183
|
return true;
|
|
184
184
|
}
|
|
185
185
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
186
|
-
if (!
|
|
186
|
+
if (!_chunkG7IGOVPFjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
187
187
|
const autoUpdate = response.auto_update;
|
|
188
188
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
189
189
|
process.stderr.write(
|
|
@@ -196,7 +196,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
196
196
|
event: "started",
|
|
197
197
|
installKind: plan.kind
|
|
198
198
|
});
|
|
199
|
-
const updateResult = await
|
|
199
|
+
const updateResult = await _chunkG7IGOVPFjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
200
200
|
if (updateResult.status === "skipped_previous_failure") {
|
|
201
201
|
void reportAutoUpdateEvent({
|
|
202
202
|
baseUrl,
|
|
@@ -234,7 +234,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
234
234
|
exitCode: 0
|
|
235
235
|
});
|
|
236
236
|
try {
|
|
237
|
-
await
|
|
237
|
+
await _chunkTIMFDVUNjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
238
238
|
mode: "detached",
|
|
239
239
|
update: _optionalChain([response, 'access', _36 => _36.skills, 'optionalAccess', _37 => _37.requires_cli_update]) ? void 0 : response.skills,
|
|
240
240
|
afterCliUpdate: {
|
|
@@ -261,7 +261,7 @@ var _crypto = require('crypto');
|
|
|
261
261
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
262
262
|
var activeToolExecuteCommand = null;
|
|
263
263
|
function progressLine(line) {
|
|
264
|
-
if (!
|
|
264
|
+
if (!_chunkIUDO463Ijs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
265
265
|
}
|
|
266
266
|
function beginToolExecuteCommand() {
|
|
267
267
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
|
3
|
+
var _chunkPNFC7VHHjs = require('./chunk-PNFC7VHH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkIUDO463Ijs = require('./chunk-IUDO463I.js');
|
|
7
7
|
|
|
8
8
|
// src/cli/commands/integration-commands.ts
|
|
9
9
|
var _commander = require('commander');
|
|
10
10
|
var _fs = require('fs');
|
|
11
11
|
var _path = require('path');
|
|
12
12
|
function printIntegrationResult(value, json, lines, nextCursor) {
|
|
13
|
-
|
|
13
|
+
_chunkIUDO463Ijs.printCommandEnvelope.call(void 0,
|
|
14
14
|
{},
|
|
15
15
|
{
|
|
16
16
|
json: json || void 0,
|
|
@@ -26,7 +26,7 @@ function registerIntegrationBalanceCommand(parent, hidden = false) {
|
|
|
26
26
|
return parent.command("balance <provider>", { hidden }).description(
|
|
27
27
|
"Read a fresh balance using this org\u2019s own provider connection (LeadMagic)."
|
|
28
28
|
).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
|
|
29
|
-
const balance = await new (0,
|
|
29
|
+
const balance = await new (0, _chunkPNFC7VHHjs.DeeplineClient)().getIntegrationBalance(
|
|
30
30
|
provider
|
|
31
31
|
);
|
|
32
32
|
printIntegrationResult(balance, options.json, [
|
|
@@ -40,7 +40,7 @@ function registerWorkspaceConnectionListCommand(parent, name = "workspace-connec
|
|
|
40
40
|
"List teammates\u2019 personal connections for this provider"
|
|
41
41
|
).option("--cursor <cursor>", "Read the next page of members").action(
|
|
42
42
|
async (options) => {
|
|
43
|
-
const client = new (0,
|
|
43
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
44
44
|
if (name === "list" && options.cursor && !options.members)
|
|
45
45
|
throw new Error(
|
|
46
46
|
"Use --cursor with --members to continue a member page."
|
|
@@ -82,7 +82,7 @@ function registerWorkspaceConnectionListCommand(parent, name = "workspace-connec
|
|
|
82
82
|
}
|
|
83
83
|
function registerLegacyHubSpotMembersCommand(parent, hidden = false) {
|
|
84
84
|
return parent.command("hubspot-members", { hidden }).description("List personal HubSpot connection status for org members.").option("--cursor <cursor>", "Read the next roster page").option("--json", "Print the roster page as JSON").action(async (options) => {
|
|
85
|
-
const page = await new (0,
|
|
85
|
+
const page = await new (0, _chunkPNFC7VHHjs.DeeplineClient)().listPersonalHubSpotMembers(
|
|
86
86
|
options.cursor
|
|
87
87
|
);
|
|
88
88
|
const rows = page.members.map((member) => {
|
|
@@ -108,7 +108,7 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
|
|
|
108
108
|
);
|
|
109
109
|
if (options.autoName && (action !== "connect" || options.name !== void 0))
|
|
110
110
|
throw new Error("Use --auto-name with connect and omit --name.");
|
|
111
|
-
const client = new (0,
|
|
111
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
112
112
|
const { connections } = action === "connect" ? { connections: [] } : options.name ? await client.listWorkspaceConnectionInventory(provider) : await client.listWorkspaceIntegrationConnections();
|
|
113
113
|
const row = connections.find(
|
|
114
114
|
(connection) => connection.provider === provider && (!("type" in connection) || connection.type === "oauth") && (options.name === void 0 || "name" in connection && connection.name === options.name)
|
|
@@ -141,7 +141,7 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
|
141
141
|
"Print the proposed change without contacting Google or saving it"
|
|
142
142
|
).option("--json", "Print the result as JSON").action(
|
|
143
143
|
async (action, options) => {
|
|
144
|
-
const client = new (0,
|
|
144
|
+
const client = new (0, _chunkPNFC7VHHjs.DeeplineClient)();
|
|
145
145
|
if (action === "list") {
|
|
146
146
|
const inventory = await client.listCalendarAvailabilityConnections();
|
|
147
147
|
const approvals = _optionalChain([inventory, 'access', _3 => _3.approvals, 'optionalAccess', _4 => _4.length]) ? inventory.approvals.map(
|
|
@@ -291,7 +291,7 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
|
291
291
|
}
|
|
292
292
|
function registerLegacyAvailabilityCalendarsCommand(parent, hidden = false) {
|
|
293
293
|
return parent.command("availability-calendars", { hidden }).description("Calendar discovery compatibility command for the pilot.").option("--cursor <cursor>", "Legacy calendar page cursor").option("--json", "Print the response as JSON").action(async (options) => {
|
|
294
|
-
const page = await new (0,
|
|
294
|
+
const page = await new (0, _chunkPNFC7VHHjs.DeeplineClient)().listAvailabilityCalendars(
|
|
295
295
|
options.cursor
|
|
296
296
|
);
|
|
297
297
|
printIntegrationResult(page, options.json, [
|
|
@@ -335,7 +335,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
335
335
|
printSetupPlan({ provider, action: "connect_link" }, options.json);
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
const link = await new (0,
|
|
338
|
+
const link = await new (0, _chunkPNFC7VHHjs.DeeplineClient)().getIntegrationConnectLink(
|
|
339
339
|
provider
|
|
340
340
|
);
|
|
341
341
|
printIntegrationResult(link, options.json, [link.connect_url]);
|
|
@@ -362,7 +362,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
362
362
|
);
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
365
|
-
const result2 = await new (0,
|
|
365
|
+
const result2 = await new (0, _chunkPNFC7VHHjs.DeeplineClient)().startIntegrationOAuth(
|
|
366
366
|
provider,
|
|
367
367
|
{
|
|
368
368
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -412,7 +412,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
412
412
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
|
-
const result = await new (0,
|
|
415
|
+
const result = await new (0, _chunkPNFC7VHHjs.DeeplineClient)().setIntegrationCredentials(
|
|
416
416
|
provider,
|
|
417
417
|
credentials,
|
|
418
418
|
{ expectedConnectionId: options.expectedConnectionId }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkLHPYCJNLjs = require('./chunk-LHPYCJNL.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -314,7 +314,7 @@ function extractorValueType(name) {
|
|
|
314
314
|
}
|
|
315
315
|
const named = NAMED_VALUE_SHAPES[definition.valueKind];
|
|
316
316
|
if (!named) return { type: "string" };
|
|
317
|
-
const { type, fields } =
|
|
317
|
+
const { type, fields } = _chunkLHPYCJNLjs.schemaField.call(void 0, name, named.schema, true);
|
|
318
318
|
return { type, ...fields ? { fields } : {}, shape: named.shape };
|
|
319
319
|
}
|
|
320
320
|
function jsonSchemaOf(wrapper) {
|
|
@@ -374,7 +374,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
374
374
|
// The server's public monitor pricing sends `display`.
|
|
375
375
|
cost: stringField(pricing, "display", "displayText") || void 0,
|
|
376
376
|
guidance: [],
|
|
377
|
-
inputs:
|
|
377
|
+
inputs: _chunkLHPYCJNLjs.schemaFields.call(void 0,
|
|
378
378
|
recordField(tool, "payload_schema", "payloadSchema")
|
|
379
379
|
),
|
|
380
380
|
outputs: [],
|
|
@@ -411,7 +411,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
411
411
|
(path) => path.replace(/^toolResponse\.raw\./, "")
|
|
412
412
|
);
|
|
413
413
|
const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
|
|
414
|
-
const { fields, ...typed } =
|
|
414
|
+
const { fields, ...typed } = _chunkLHPYCJNLjs.schemaField.call(void 0, name, node, true);
|
|
415
415
|
const valueType = stringField(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
|
|
416
416
|
const deepline = kind === "extractedValues" ? extractorValueType(name) : void 0;
|
|
417
417
|
const known = typed.type !== "unknown" ? void 0 : kind === "extractedLists" ? { type: "object[]" } : deepline;
|
|
@@ -480,7 +480,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
480
480
|
],
|
|
481
481
|
rateLimit: withPlanRateLimit(
|
|
482
482
|
recordField(recordField(tool, "pricing"), "benefit").requestsPerMinute,
|
|
483
|
-
|
|
483
|
+
_chunkLHPYCJNLjs.rateLimitSummary.call(void 0,
|
|
484
484
|
recordField(contract, "executionMetadata").configuredRateLimits
|
|
485
485
|
)
|
|
486
486
|
),
|
|
@@ -490,9 +490,9 @@ function describedTool(tool, requestedToolId) {
|
|
|
490
490
|
...connectCommand && !_optionalChain([tool, 'access', _5 => _5.auth, 'optionalAccess', _6 => _6.connectionRequired]) ? { connectCommand } : {},
|
|
491
491
|
...tool.auth ? { auth: tool.auth } : {},
|
|
492
492
|
...tool.toolUsage ? { toolUsage: tool.toolUsage } : {},
|
|
493
|
-
inputs:
|
|
493
|
+
inputs: _chunkLHPYCJNLjs.schemaFields.call(void 0, inputSchema),
|
|
494
494
|
outputs: [...lists, ...values].map(({ field }) => field),
|
|
495
|
-
rawResponse:
|
|
495
|
+
rawResponse: _chunkLHPYCJNLjs.schemaFields.call(void 0, outputSchema),
|
|
496
496
|
runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId), inputSchema }
|
|
497
497
|
};
|
|
498
498
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
|
3
|
+
var _chunkWZUOUQZ3js = require('./chunk-WZUOUQZ3.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkIUDO463Ijs = require('./chunk-IUDO463I.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -18,20 +18,20 @@ var _chunkUVFR7FW4js = require('./chunk-UVFR7FW4.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkLWOYDMYCjs = require('./chunk-LWOYDMYC.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkEYL4V32Qjs = require('./chunk-EYL4V32Q.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk24XWLHKJjs = require('./chunk-24XWLHKJ.js');
|
|
35
35
|
|
|
36
36
|
// src/compat.ts
|
|
37
37
|
var _crypto = require('crypto');
|
|
@@ -66,7 +66,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
66
66
|
return value === "1" || value === "true" || value === "yes";
|
|
67
67
|
}
|
|
68
68
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.HOME, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || _os.homedir.call(void 0, )) {
|
|
69
|
-
return _path.join.call(void 0,
|
|
69
|
+
return _path.join.call(void 0, _chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
70
70
|
}
|
|
71
71
|
function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12.HOME, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]) || _os.homedir.call(void 0, )) {
|
|
72
72
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -74,9 +74,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
74
74
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
75
75
|
return JSON.stringify({
|
|
76
76
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
77
|
-
version:
|
|
78
|
-
apiContract:
|
|
79
|
-
apiMajor:
|
|
77
|
+
version: _chunkEYL4V32Qjs.SDK_VERSION,
|
|
78
|
+
apiContract: _chunkEYL4V32Qjs.SDK_API_CONTRACT,
|
|
79
|
+
apiMajor: _chunkEYL4V32Qjs.SDK_API_MAJOR,
|
|
80
80
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
81
81
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
82
82
|
});
|
|
@@ -84,8 +84,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
84
84
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
85
85
|
return JSON.stringify({
|
|
86
86
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
87
|
-
version:
|
|
88
|
-
apiContract:
|
|
87
|
+
version: _chunkEYL4V32Qjs.SDK_VERSION,
|
|
88
|
+
apiContract: _chunkEYL4V32Qjs.SDK_API_CONTRACT,
|
|
89
89
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
90
90
|
});
|
|
91
91
|
}
|
|
@@ -110,7 +110,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
110
110
|
}
|
|
111
111
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
112
112
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
113
|
-
const path = _path.join.call(void 0,
|
|
113
|
+
const path = _path.join.call(void 0, _chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
114
114
|
try {
|
|
115
115
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
116
116
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -195,7 +195,7 @@ async function attemptSdkCompatibility(baseUrl, options, timeoutMs) {
|
|
|
195
195
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
196
196
|
try {
|
|
197
197
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
198
|
-
url.searchParams.set("version",
|
|
198
|
+
url.searchParams.set("version", _chunkEYL4V32Qjs.SDK_VERSION);
|
|
199
199
|
if (_optionalChain([options, 'access', _34 => _34.command, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()])) {
|
|
200
200
|
url.searchParams.set("command", options.command.trim());
|
|
201
201
|
}
|
|
@@ -203,7 +203,7 @@ async function attemptSdkCompatibility(baseUrl, options, timeoutMs) {
|
|
|
203
203
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
204
204
|
url.searchParams.set(
|
|
205
205
|
"skills_cli_capability",
|
|
206
|
-
String(
|
|
206
|
+
String(_chunk24XWLHKJjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
if (options.catalog) {
|
|
@@ -215,14 +215,14 @@ async function attemptSdkCompatibility(baseUrl, options, timeoutMs) {
|
|
|
215
215
|
const response = await fetch(url, {
|
|
216
216
|
method: "GET",
|
|
217
217
|
headers: {
|
|
218
|
-
...
|
|
219
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
220
|
-
"X-Deepline-SDK-Version":
|
|
221
|
-
"X-Deepline-API-Major": String(
|
|
222
|
-
"X-Deepline-API-Contract":
|
|
218
|
+
..._chunkEYL4V32Qjs.deploymentProtectionHeaders.call(void 0, ),
|
|
219
|
+
"User-Agent": `deepline-ts-sdk/${_chunkEYL4V32Qjs.SDK_VERSION}`,
|
|
220
|
+
"X-Deepline-SDK-Version": _chunkEYL4V32Qjs.SDK_VERSION,
|
|
221
|
+
"X-Deepline-API-Major": String(_chunkEYL4V32Qjs.SDK_API_MAJOR),
|
|
222
|
+
"X-Deepline-API-Contract": _chunkEYL4V32Qjs.SDK_API_CONTRACT,
|
|
223
223
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
224
224
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
225
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
225
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkLWOYDMYCjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
226
226
|
..._optionalChain([options, 'access', _37 => _37.catalog, 'optionalAccess', _38 => _38.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
227
227
|
},
|
|
228
228
|
signal: controller.signal
|
|
@@ -238,7 +238,7 @@ async function attemptSdkCompatibility(baseUrl, options, timeoutMs) {
|
|
|
238
238
|
if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
|
|
239
239
|
return {
|
|
240
240
|
ok: false,
|
|
241
|
-
transient:
|
|
241
|
+
transient: _chunkLWOYDMYCjs.TRANSIENT_HTTP_STATUSES.has(response.status),
|
|
242
242
|
error: new Error(
|
|
243
243
|
`SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
|
|
244
244
|
)
|
|
@@ -309,8 +309,8 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
309
309
|
}
|
|
310
310
|
async function requireSdkCompatibility(baseUrl, options = {}) {
|
|
311
311
|
if (shouldSkipCompatibilityCheck()) return null;
|
|
312
|
-
const maxRetries = _nullishCoalesce(options.maxRetries, () => (
|
|
313
|
-
const backoffMs = _nullishCoalesce(options.backoffMs, () => (
|
|
312
|
+
const maxRetries = _nullishCoalesce(options.maxRetries, () => ( _chunkLWOYDMYCjs.DEFAULT_MAX_RETRIES));
|
|
313
|
+
const backoffMs = _nullishCoalesce(options.backoffMs, () => ( _chunkLWOYDMYCjs.defaultRetryBackoffMs));
|
|
314
314
|
let attempt;
|
|
315
315
|
let attempts = 0;
|
|
316
316
|
for (; ; ) {
|
|
@@ -318,7 +318,7 @@ async function requireSdkCompatibility(baseUrl, options = {}) {
|
|
|
318
318
|
attempt = await attemptSdkCompatibility(
|
|
319
319
|
baseUrl,
|
|
320
320
|
options,
|
|
321
|
-
_nullishCoalesce(options.attemptTimeoutMs, () => (
|
|
321
|
+
_nullishCoalesce(options.attemptTimeoutMs, () => ( _chunkLWOYDMYCjs.DEFAULT_TIMEOUT))
|
|
322
322
|
);
|
|
323
323
|
if (attempt.ok) return acceptSdkCompatibility(baseUrl, options, attempt);
|
|
324
324
|
if (!attempt.transient || attempts > maxRetries) break;
|
|
@@ -467,7 +467,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
467
467
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
468
468
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
469
469
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
470
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
470
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkLWOYDMYCjs.DEFAULT_SKILL_AGENTS));
|
|
471
471
|
const values = {
|
|
472
472
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
473
473
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -598,25 +598,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
598
598
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
599
599
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
600
600
|
function shouldSkipSkillsSync() {
|
|
601
|
-
if (
|
|
601
|
+
if (_chunkEYL4V32Qjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
602
602
|
return true;
|
|
603
603
|
}
|
|
604
604
|
const value = _optionalChain([process, 'access', _62 => _62.env, 'access', _63 => _63.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65(), 'access', _66 => _66.toLowerCase, 'call', _67 => _67()]);
|
|
605
605
|
return value === "1" || value === "true" || value === "yes" || value === "on" || !isCliSkillsSyncEnabled();
|
|
606
606
|
}
|
|
607
607
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
608
|
-
return _path.join.call(void 0,
|
|
608
|
+
return _path.join.call(void 0, _chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
609
609
|
}
|
|
610
610
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
611
611
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
612
|
-
var agentLeaseSegment =
|
|
612
|
+
var agentLeaseSegment = _chunkLWOYDMYCjs.skillsAgentPathSegment;
|
|
613
613
|
function sortedLeaseAgents(agents) {
|
|
614
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
614
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkLWOYDMYCjs.KNOWN_SKILL_AGENTS] : agents;
|
|
615
615
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
616
616
|
}
|
|
617
617
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
618
618
|
return _path.join.call(void 0,
|
|
619
|
-
|
|
619
|
+
_chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
620
620
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
621
621
|
);
|
|
622
622
|
}
|
|
@@ -775,7 +775,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
775
775
|
constructor(baseUrl, error) {
|
|
776
776
|
const detail = error instanceof Error ? error.message : String(error);
|
|
777
777
|
super(
|
|
778
|
-
`Could not save skills state in ${
|
|
778
|
+
`Could not save skills state in ${_chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
779
779
|
);
|
|
780
780
|
this.name = "SkillsStateUnavailableError";
|
|
781
781
|
}
|
|
@@ -860,7 +860,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
860
860
|
}
|
|
861
861
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
862
862
|
return _path.join.call(void 0,
|
|
863
|
-
|
|
863
|
+
_chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
864
864
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
865
865
|
);
|
|
866
866
|
}
|
|
@@ -894,8 +894,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
894
894
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
895
895
|
}
|
|
896
896
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
897
|
-
if (shouldSkipSkillsSync() ||
|
|
898
|
-
const agents =
|
|
897
|
+
if (shouldSkipSkillsSync() || _chunkLWOYDMYCjs.hasActivePluginSkills.call(void 0, )) return;
|
|
898
|
+
const agents = _chunkLWOYDMYCjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
899
899
|
if (agents.length === 0) return;
|
|
900
900
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
901
901
|
}
|
|
@@ -918,7 +918,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError, sidecarPath) {
|
|
|
918
918
|
}
|
|
919
919
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
920
920
|
return _path.join.call(void 0,
|
|
921
|
-
|
|
921
|
+
_chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
922
922
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
923
923
|
);
|
|
924
924
|
}
|
|
@@ -947,7 +947,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
947
947
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
948
948
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
949
949
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
950
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _71 => _71.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
950
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _71 => _71.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkLWOYDMYCjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
951
951
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _72 => _72.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
952
952
|
notice(
|
|
953
953
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1035,7 +1035,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1035
1035
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1036
1036
|
}
|
|
1037
1037
|
function isDefaultAgentSet(agents) {
|
|
1038
|
-
return agents.length ===
|
|
1038
|
+
return agents.length === _chunkLWOYDMYCjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkLWOYDMYCjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1039
1039
|
}
|
|
1040
1040
|
function safeSkillFilePath(value) {
|
|
1041
1041
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1192,10 +1192,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1192
1192
|
method: "POST",
|
|
1193
1193
|
headers: { "Content-Type": "application/json" },
|
|
1194
1194
|
body: JSON.stringify({
|
|
1195
|
-
sdk_cli: { version:
|
|
1195
|
+
sdk_cli: { version: _chunkEYL4V32Qjs.SDK_VERSION },
|
|
1196
1196
|
skills: {
|
|
1197
1197
|
version: localVersion,
|
|
1198
|
-
capability:
|
|
1198
|
+
capability: _chunk24XWLHKJjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1199
1199
|
}
|
|
1200
1200
|
}),
|
|
1201
1201
|
signal: controller.signal
|
|
@@ -1234,7 +1234,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
function noInstallerProbePath(baseUrl) {
|
|
1236
1236
|
return _path.join.call(void 0,
|
|
1237
|
-
|
|
1237
|
+
_chunkLWOYDMYCjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1238
1238
|
"skills-sync-no-installer-unknown.json"
|
|
1239
1239
|
);
|
|
1240
1240
|
}
|
|
@@ -1314,7 +1314,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1314
1314
|
function resolveSkillsInstallSpawn(install, platform = process.platform) {
|
|
1315
1315
|
return resolveShellSpawn(install.command, install.args, platform);
|
|
1316
1316
|
}
|
|
1317
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1317
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkLWOYDMYCjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1318
1318
|
const commands = [];
|
|
1319
1319
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1320
1320
|
if (probes.bunx === "available") {
|
|
@@ -1458,7 +1458,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
1460
|
function writeSdkSkillsStatusLine(line) {
|
|
1461
|
-
const progress =
|
|
1461
|
+
const progress = _chunkWZUOUQZ3js.getActiveCliProgress.call(void 0, );
|
|
1462
1462
|
if (progress) {
|
|
1463
1463
|
progress.writeLine(line);
|
|
1464
1464
|
return;
|
|
@@ -1469,11 +1469,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1469
1469
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1470
1470
|
const skip = shouldSkipSkillsSync();
|
|
1471
1471
|
if (skip && !options.claim) return;
|
|
1472
|
-
const usingPluginSkills =
|
|
1472
|
+
const usingPluginSkills = _chunkLWOYDMYCjs.hasActivePluginSkills.call(void 0, );
|
|
1473
1473
|
if (usingPluginSkills) {
|
|
1474
1474
|
return;
|
|
1475
1475
|
}
|
|
1476
|
-
const agents =
|
|
1476
|
+
const agents = _chunkLWOYDMYCjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1477
1477
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1478
1478
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1479
1479
|
}
|
|
@@ -1510,7 +1510,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1510
1510
|
return;
|
|
1511
1511
|
}
|
|
1512
1512
|
try {
|
|
1513
|
-
const localVersion =
|
|
1513
|
+
const localVersion = _chunkLWOYDMYCjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1514
1514
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1515
1515
|
needsUpdate: options.update.needs_update,
|
|
1516
1516
|
remoteVersion: options.update.remote.version
|
|
@@ -1632,7 +1632,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1632
1632
|
update.remoteVersion,
|
|
1633
1633
|
agents
|
|
1634
1634
|
);
|
|
1635
|
-
void
|
|
1635
|
+
void _chunkIUDO463Ijs.maybeReportAutomaticSkillsSyncFailure.call(void 0, {
|
|
1636
1636
|
baseUrl,
|
|
1637
1637
|
remoteSkillsVersion: update.remoteVersion,
|
|
1638
1638
|
agents,
|
|
@@ -1663,7 +1663,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1663
1663
|
notice(
|
|
1664
1664
|
publishedFailure ? `Deepline could not verify the published skills: ${detail}. The local version remains stale; it will retry automatically on a later command.` : `Deepline agent-skills refresh could not verify the five installed targets: ${detail}. The local version remains stale. After fixing the install, remove ${failedSkillsSyncPath(baseUrl, agents)} to retry this version automatically.`
|
|
1665
1665
|
);
|
|
1666
|
-
void
|
|
1666
|
+
void _chunkIUDO463Ijs.maybeReportAutomaticSkillsSyncFailure.call(void 0, {
|
|
1667
1667
|
baseUrl,
|
|
1668
1668
|
remoteSkillsVersion: update.remoteVersion,
|
|
1669
1669
|
agents,
|
|
@@ -1676,7 +1676,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
runLegacySkillsCleanup(agents);
|
|
1679
|
-
if (!
|
|
1679
|
+
if (!_chunkLWOYDMYCjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1680
1680
|
notice(
|
|
1681
1681
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1682
1682
|
);
|