deepline 0.3.432 → 0.3.433
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/monitors/billing/credit-recovery.ts +97 -6
- package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +33 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +94 -10
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +46 -2
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-message.ts +4 -0
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +4 -4
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +36 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +95 -8
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +5 -1
- package/dist/cli/{auth-J7PBL7MX.mjs → auth-5LF5G3Z2.mjs} +4 -4
- package/dist/cli/auth-FGHYE2JG.js +40 -0
- package/dist/cli/{billing-MQG6ZJVV.mjs → billing-I7ZADV7D.mjs} +4 -4
- package/dist/cli/{billing-SJIZYLAY.js → billing-M34SJBAB.js} +73 -73
- package/dist/cli/{chunk-NVHT5QVI.mjs → chunk-2TNGO4DZ.mjs} +3 -3
- package/dist/cli/{chunk-7EH5BMGH.mjs → chunk-3C25DYSE.mjs} +3 -3
- package/dist/cli/{chunk-T5H4QYFP.mjs → chunk-3CZEDR4K.mjs} +5 -5
- package/dist/cli/{chunk-6K6BT5BB.mjs → chunk-3ET2ZKZS.mjs} +1 -1
- package/dist/cli/{chunk-XEZE25CL.mjs → chunk-42JTV4IM.mjs} +1 -1
- package/dist/cli/{chunk-ZM23AO4D.js → chunk-6R6SQQGQ.js} +4 -4
- package/dist/cli/{chunk-7FEOBXCX.mjs → chunk-B3XEZMYS.mjs} +8 -8
- package/dist/cli/{chunk-3PFDDZSK.mjs → chunk-BSQH4V3Y.mjs} +1 -1
- package/dist/cli/{chunk-BH3ZPOWQ.js → chunk-CXGNMAFV.js} +16 -16
- package/dist/cli/{chunk-4UEGE3TL.js → chunk-DAEODAWB.js} +35 -35
- package/dist/cli/{chunk-LNDWFZLO.js → chunk-FYDPU4QV.js} +26 -26
- package/dist/cli/{chunk-MXCJJGKV.mjs → chunk-G4P74R2F.mjs} +2 -2
- package/dist/cli/{chunk-2LN26ID6.mjs → chunk-GZS6ZB55.mjs} +1 -1
- package/dist/cli/{chunk-4FE6NO56.mjs → chunk-HAC6SRO5.mjs} +1 -1
- package/dist/cli/{chunk-YBD74BIU.js → chunk-I5CB3UUX.js} +50 -50
- package/dist/cli/{chunk-TWDC5S4Y.js → chunk-JNX4Y37G.js} +1 -1
- package/dist/cli/{chunk-2ZU5KRRK.js → chunk-JUZW32YP.js} +8 -8
- package/dist/cli/{chunk-DUFJ3BW3.js → chunk-KAWPJNUO.js} +20 -20
- package/dist/cli/{chunk-A27LVC2E.js → chunk-KQ5VO34X.js} +10 -10
- package/dist/cli/{chunk-WERGMZWN.js → chunk-N5VOE6KZ.js} +6 -6
- package/dist/cli/{chunk-VDPY5H2O.js → chunk-O7X44YGX.js} +8 -8
- package/dist/cli/{chunk-6PGOKDU6.js → chunk-PKOCM6JB.js} +52 -52
- package/dist/cli/{chunk-SH6USDDK.mjs → chunk-PM3DL6YP.mjs} +3 -3
- package/dist/cli/{chunk-YX7MZDHZ.mjs → chunk-PRA2CG4B.mjs} +1 -1
- package/dist/cli/{chunk-TZ4TBQ2Z.js → chunk-T77HG3R7.js} +2 -2
- package/dist/cli/{chunk-LRBTRCUF.mjs → chunk-UAUHERWW.mjs} +2 -2
- package/dist/cli/{chunk-WDXXERQH.js → chunk-UDJXL4SM.js} +79 -79
- package/dist/cli/{chunk-HVDBBCAX.mjs → chunk-VMCJGLJL.mjs} +2 -2
- package/dist/cli/{chunk-RP4IYLHA.js → chunk-WVCAELST.js} +6 -6
- package/dist/cli/{chunk-LUMGUYE2.mjs → chunk-XSEQLAHE.mjs} +2 -2
- package/dist/cli/{chunk-IDFPNLVX.mjs → chunk-YBSOJ6D4.mjs} +4 -4
- package/dist/cli/{chunk-GZRBC7HZ.js → chunk-ZMRP5UXN.js} +2 -2
- package/dist/cli/{csv-2KJBPEMG.mjs → csv-3TCORDI3.mjs} +3 -3
- package/dist/cli/{csv-Q47QCDHB.js → csv-R5I5ZWSC.js} +12 -12
- package/dist/cli/{db-FRBOGK6B.js → db-BXEK3WX2.js} +25 -25
- package/dist/cli/{db-RKW225IP.mjs → db-D7NC4XAM.mjs} +4 -4
- package/dist/cli/{describe-VEREOGGY.js → describe-LSOFG74H.js} +16 -16
- package/dist/cli/{describe-3Q7NYXXU.mjs → describe-SXYZTJQ5.mjs} +12 -12
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-I4L6VJZB.js → executions-BF5YRFHH.js} +6 -6
- package/dist/cli/{executions-FL3NUICN.mjs → executions-ULXJPGV4.mjs} +4 -4
- package/dist/cli/{feedback-NAGE2PRW.mjs → feedback-6FJOHQJB.mjs} +3 -3
- package/dist/cli/{feedback-WTZLQVI3.js → feedback-VJM56OFG.js} +7 -7
- package/dist/cli/git-TSBBSAK3.js +24 -0
- package/dist/cli/{git-QNJZP2MW.mjs → git-WGZMHPW3.mjs} +4 -4
- package/dist/cli/index.js +131 -131
- package/dist/cli/index.mjs +36 -36
- package/dist/cli/{legacy-noops-N5YDGZUF.mjs → legacy-noops-EVFQBQ6H.mjs} +4 -4
- package/dist/cli/{legacy-noops-2RXFVWWK.js → legacy-noops-ZRDESRRJ.js} +7 -7
- package/dist/cli/{monitors-ONRSWSUR.mjs → monitors-4PMVB7RD.mjs} +4 -4
- package/dist/cli/{monitors-CAZWVMZQ.js → monitors-FR4OSX77.js} +84 -84
- package/dist/cli/{org-VEDGZPM5.js → org-HSY6TVRI.js} +64 -64
- package/dist/cli/{org-XNOK4ER3.mjs → org-QBENPGXU.mjs} +4 -4
- package/dist/cli/{play-IGZ5BFVM.mjs → play-7O7GXOWT.mjs} +10 -10
- package/dist/cli/{play-HQVDEYK4.js → play-JSY4OSLN.js} +283 -283
- package/dist/cli/{providers-YCUFONNU.mjs → providers-76OM5TQ7.mjs} +4 -4
- package/dist/cli/{providers-JQIY4LTO.js → providers-RLLSVNR6.js} +7 -7
- package/dist/cli/{quickstart-2VOWSIUB.js → quickstart-MZZDW6VC.js} +5 -5
- package/dist/cli/{quickstart-TMYBEJO5.mjs → quickstart-UHB5GNJV.mjs} +3 -3
- package/dist/cli/search-GCMZS6IK.js +30 -0
- package/dist/cli/{search-KDSGVOKV.mjs → search-X5P34RAU.mjs} +5 -5
- package/dist/cli/{secrets-MOAG6VTW.js → secrets-EKVWSDQT.js} +13 -13
- package/dist/cli/{secrets-727RQLRS.mjs → secrets-L43HK4A6.mjs} +4 -4
- package/dist/cli/{sessions-GTOWZM56.js → sessions-IPV23HXJ.js} +5 -5
- package/dist/cli/{sessions-FOJSYLPP.mjs → sessions-QPK5NPXO.mjs} +4 -4
- package/dist/cli/{settings-GH2LESJC.js → settings-5CJ6SMAN.js} +75 -75
- package/dist/cli/{settings-PHQWG5PA.mjs → settings-NF4VMLGN.mjs} +8 -8
- package/dist/cli/{setup-3MLWDT7O.mjs → setup-3JVUB4V6.mjs} +7 -7
- package/dist/cli/{setup-K3QF5D4M.js → setup-FHK6S4JC.js} +42 -42
- package/dist/cli/{skills-O7LZQCX7.mjs → skills-HZLL2C7G.mjs} +5 -5
- package/dist/cli/skills-U2R75N5D.js +29 -0
- package/dist/cli/tools-N57LENEU.js +44 -0
- package/dist/cli/{tools-JFR7OIWE.mjs → tools-TG5SDGNS.mjs} +12 -12
- package/dist/cli/{update-XAIGSL6B.mjs → update-4UZ6PUZK.mjs} +7 -7
- package/dist/cli/update-WYEO75YZ.js +31 -0
- package/dist/cli/{workflow-7MJHESH5.mjs → workflow-FAJY6TR4.mjs} +5 -5
- package/dist/cli/{workflow-OBS3E5YV.js → workflow-UTPL4KIF.js} +15 -15
- package/dist/{client-C0VoQB5b.d.ts → client-CgmfMj_N.d.ts} +73 -4
- package/dist/{client-BuCrTjW6.d.mts → client-DIY1WpSW.d.mts} +73 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +80 -80
- 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/viewer/viewer.css +4 -0
- package/dist/viewer/viewer.js +19 -3
- package/package.json +1 -1
- package/dist/cli/auth-CAEXNNLE.js +0 -40
- package/dist/cli/git-YVMBJSIX.js +0 -24
- package/dist/cli/search-OFXBZEHY.js +0 -30
- package/dist/cli/skills-4TXIFS73.js +0 -29
- package/dist/cli/tools-WXKOQ2KT.js +0 -44
- package/dist/cli/update-MNROQP5A.js +0 -31
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCXGNMAFVjs = require('./chunk-CXGNMAFV.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkPKOCM6JBjs = require('./chunk-PKOCM6JB.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkN5VOE6KZjs = require('./chunk-N5VOE6KZ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk6R6SQQGQjs = require('./chunk-6R6SQQGQ.js');
|
|
19
19
|
|
|
20
20
|
// src/cli/compatibility-catalog.ts
|
|
21
21
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -42,7 +42,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
42
42
|
async function reportAutoUpdateEvent(input) {
|
|
43
43
|
let apiKey = "";
|
|
44
44
|
try {
|
|
45
|
-
apiKey =
|
|
45
|
+
apiKey = _chunk6R6SQQGQjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
46
46
|
} catch (e2) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -58,15 +58,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
58
58
|
headers: {
|
|
59
59
|
Authorization: `Bearer ${apiKey}`,
|
|
60
60
|
"Content-Type": "application/json",
|
|
61
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
61
|
+
"User-Agent": `deepline-ts-sdk/${_chunk6R6SQQGQjs.SDK_VERSION}`,
|
|
62
62
|
"X-Deepline-Client-Family": "sdk",
|
|
63
63
|
"X-Deepline-CLI-Family": "sdk",
|
|
64
|
-
"X-Deepline-CLI-Version":
|
|
65
|
-
"X-Deepline-SDK-Version":
|
|
64
|
+
"X-Deepline-CLI-Version": _chunk6R6SQQGQjs.SDK_VERSION,
|
|
65
|
+
"X-Deepline-SDK-Version": _chunk6R6SQQGQjs.SDK_VERSION
|
|
66
66
|
},
|
|
67
67
|
body: JSON.stringify({
|
|
68
68
|
event: input.event,
|
|
69
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
69
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunk6R6SQQGQjs.SDK_VERSION,
|
|
70
70
|
target_version: input.response.latest,
|
|
71
71
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
72
72
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -85,13 +85,13 @@ function envTruthy(name) {
|
|
|
85
85
|
return value === "1" || value === "true" || value === "yes";
|
|
86
86
|
}
|
|
87
87
|
function shouldSkipSelfUpdate(policy) {
|
|
88
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
88
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkCXGNMAFVjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkPKOCM6JBjs.isCiEnvironment.call(void 0, );
|
|
89
89
|
}
|
|
90
90
|
function isDowngradeAutoUpdateResponse(response) {
|
|
91
91
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
92
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
92
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunk6R6SQQGQjs.SDK_VERSION;
|
|
93
93
|
if (!target) return false;
|
|
94
|
-
return
|
|
94
|
+
return _chunkCXGNMAFVjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
95
95
|
}
|
|
96
96
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
97
97
|
return new Promise((resolve) => {
|
|
@@ -144,7 +144,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
144
144
|
}
|
|
145
145
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
146
146
|
const target = response.latest;
|
|
147
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
147
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunk6R6SQQGQjs.SDK_VERSION;
|
|
148
148
|
process.stderr.write(
|
|
149
149
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
150
150
|
`
|
|
@@ -152,21 +152,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
152
152
|
return false;
|
|
153
153
|
}
|
|
154
154
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
155
|
-
const plan =
|
|
155
|
+
const plan = _chunkCXGNMAFVjs.resolveUpdatePlan.call(void 0, {
|
|
156
156
|
packageSpec,
|
|
157
157
|
requireVerifiedNpmOwnership: true,
|
|
158
158
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
159
159
|
});
|
|
160
|
-
if (!
|
|
160
|
+
if (!_chunkCXGNMAFVjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
161
161
|
return false;
|
|
162
162
|
}
|
|
163
163
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
164
164
|
deferredAutoUpdate = async () => {
|
|
165
165
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
166
166
|
};
|
|
167
|
-
if (
|
|
167
|
+
if (_chunkN5VOE6KZjs.isJsonOutputMode.call(void 0, )) {
|
|
168
168
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
169
|
-
|
|
169
|
+
_chunkN5VOE6KZjs.addJsonNotice.call(void 0, {
|
|
170
170
|
code: "sdk_update_queued",
|
|
171
171
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
172
172
|
});
|
|
@@ -179,7 +179,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
179
179
|
return true;
|
|
180
180
|
}
|
|
181
181
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
182
|
-
if (!
|
|
182
|
+
if (!_chunkCXGNMAFVjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
183
183
|
const autoUpdate = response.auto_update;
|
|
184
184
|
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";
|
|
185
185
|
process.stderr.write(
|
|
@@ -192,7 +192,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
192
192
|
event: "started",
|
|
193
193
|
installKind: plan.kind
|
|
194
194
|
});
|
|
195
|
-
const updateResult = await
|
|
195
|
+
const updateResult = await _chunkCXGNMAFVjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
196
196
|
if (updateResult.status === "skipped_previous_failure") {
|
|
197
197
|
void reportAutoUpdateEvent({
|
|
198
198
|
baseUrl,
|
|
@@ -243,7 +243,7 @@ var _crypto = require('crypto');
|
|
|
243
243
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
244
244
|
var activeToolExecuteCommand = null;
|
|
245
245
|
function progressLine(line) {
|
|
246
|
-
if (!
|
|
246
|
+
if (!_chunkN5VOE6KZjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
247
247
|
}
|
|
248
248
|
function beginToolExecuteCommand() {
|
|
249
249
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -28,7 +28,7 @@ var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunk6R6SQQGQjs = require('./chunk-6R6SQQGQ.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
var _chunkNPBJI7REjs = require('./chunk-NPBJI7RE.js');
|
|
@@ -647,7 +647,7 @@ var ToolCalls = class {
|
|
|
647
647
|
idempotencyKey,
|
|
648
648
|
onResponse: (response2) => {
|
|
649
649
|
lastResponse = null;
|
|
650
|
-
atomicToolsSupported = response2.headers.get(
|
|
650
|
+
atomicToolsSupported = response2.headers.get(_chunk6R6SQQGQjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
651
651
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
652
652
|
if (_optionalChain([options, 'optionalAccess', _29 => _29.onServerTiming])) {
|
|
653
653
|
try {
|
|
@@ -997,8 +997,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
997
997
|
}
|
|
998
998
|
const receivers = _optionalChain([env, 'access', _51 => _51.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()]);
|
|
999
999
|
return {
|
|
1000
|
-
[
|
|
1001
|
-
...receivers ? { [
|
|
1000
|
+
[_chunk6R6SQQGQjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1001
|
+
...receivers ? { [_chunk6R6SQQGQjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1002
1002
|
};
|
|
1003
1003
|
}
|
|
1004
1004
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1069,7 +1069,7 @@ var PlayClient = class {
|
|
|
1069
1069
|
return _chunk2H4EY7KHjs.startPlayRun.call(void 0,
|
|
1070
1070
|
this.http,
|
|
1071
1071
|
resolved.request,
|
|
1072
|
-
_optionalChain([options, 'optionalAccess', _61 => _61.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1072
|
+
_optionalChain([options, 'optionalAccess', _61 => _61.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunk6R6SQQGQjs.SDK_API_MAJOR) } : headers,
|
|
1073
1073
|
options
|
|
1074
1074
|
);
|
|
1075
1075
|
}
|
|
@@ -1135,9 +1135,9 @@ var PlayClient = class {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
};
|
|
1137
1137
|
function createPlayClient(options) {
|
|
1138
|
-
const config =
|
|
1138
|
+
const config = _chunk6R6SQQGQjs.resolveConfig.call(void 0, options);
|
|
1139
1139
|
return new PlayClient(
|
|
1140
|
-
new (0,
|
|
1140
|
+
new (0, _chunk6R6SQQGQjs.HttpClient)(config),
|
|
1141
1141
|
_nullishCoalesce(config.environment, () => ( process.env))
|
|
1142
1142
|
);
|
|
1143
1143
|
}
|
|
@@ -3151,7 +3151,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3151
3151
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3152
3152
|
);
|
|
3153
3153
|
}
|
|
3154
|
-
return { [
|
|
3154
|
+
return { [_chunk6R6SQQGQjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3155
3155
|
}
|
|
3156
3156
|
function sleep(ms) {
|
|
3157
3157
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3389,9 +3389,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3389
3389
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3390
3390
|
*/
|
|
3391
3391
|
constructor(options) {
|
|
3392
|
-
this.config =
|
|
3392
|
+
this.config = _chunk6R6SQQGQjs.resolveConfig.call(void 0, options);
|
|
3393
3393
|
this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
|
|
3394
|
-
this.http = new (0,
|
|
3394
|
+
this.http = new (0, _chunk6R6SQQGQjs.HttpClient)(this.config);
|
|
3395
3395
|
this.playClient = new PlayClient(this.http, this.environment);
|
|
3396
3396
|
this.toolCalls = new ToolCalls(
|
|
3397
3397
|
this.http,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk6R6SQQGQjs = require('./chunk-6R6SQQGQ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -288,8 +288,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
288
288
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
289
289
|
var defaultBrowserCommandRunner = childProcess;
|
|
290
290
|
function getAuthedHttpClient() {
|
|
291
|
-
const config =
|
|
292
|
-
return { config, http: new (0,
|
|
291
|
+
const config = _chunk6R6SQQGQjs.resolveConfig.call(void 0, );
|
|
292
|
+
return { config, http: new (0, _chunk6R6SQQGQjs.HttpClient)(config) };
|
|
293
293
|
}
|
|
294
294
|
function stableOsUserId() {
|
|
295
295
|
try {
|
|
@@ -629,7 +629,7 @@ function collectLocalEnvInfo() {
|
|
|
629
629
|
os: `${process.platform} ${process.arch}`,
|
|
630
630
|
node_version: process.version,
|
|
631
631
|
home_dir: homeDir,
|
|
632
|
-
agent_runtime:
|
|
632
|
+
agent_runtime: _chunk6R6SQQGQjs.detectAgentRuntime.call(void 0, )
|
|
633
633
|
};
|
|
634
634
|
const env = process.env;
|
|
635
635
|
const optional = {
|
|
@@ -876,9 +876,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
876
876
|
}
|
|
877
877
|
function withAgentCommandContext(value) {
|
|
878
878
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
879
|
-
return
|
|
879
|
+
return _chunk6R6SQQGQjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
880
880
|
...valueRecord,
|
|
881
|
-
command_context:
|
|
881
|
+
command_context: _chunk6R6SQQGQjs.resolveCliCommandContext.call(void 0, )
|
|
882
882
|
} : value;
|
|
883
883
|
}
|
|
884
884
|
function printJson(value, fields) {
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkKQ5VO34Xjs = require('./chunk-KQ5VO34X.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkN5VOE6KZjs = require('./chunk-N5VOE6KZ.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk6R6SQQGQjs = require('./chunk-6R6SQQGQ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -5713,7 +5713,7 @@ var _fs = require('fs');
|
|
|
5713
5713
|
var _path = require('path');
|
|
5714
5714
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
5715
5715
|
function lastSearchPath() {
|
|
5716
|
-
return _path.join.call(void 0,
|
|
5716
|
+
return _path.join.call(void 0, _chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, _chunk6R6SQQGQjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
5717
5717
|
}
|
|
5718
5718
|
function rememberSearchRef(searchRef) {
|
|
5719
5719
|
try {
|
|
@@ -5877,7 +5877,7 @@ var OPTIONAL_COLUMNS = [
|
|
|
5877
5877
|
];
|
|
5878
5878
|
function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
5879
5879
|
if (result.results.length === 0)
|
|
5880
|
-
return
|
|
5880
|
+
return _chunkN5VOE6KZjs.renderCommandEnvelopeText.call(void 0, result);
|
|
5881
5881
|
const rows = result.results.map((item) => searchRow(item, summaryWidth));
|
|
5882
5882
|
const kinds = new Set(rows.map((row) => row.kind));
|
|
5883
5883
|
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
@@ -5902,7 +5902,7 @@ function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
|
5902
5902
|
actions: _optionalChain([render, 'optionalAccess', _12 => _12.actions])
|
|
5903
5903
|
};
|
|
5904
5904
|
const followUps = _optionalChain([remaining, 'access', _13 => _13.sections, 'optionalAccess', _14 => _14.length]) || _optionalChain([remaining, 'access', _15 => _15.actions, 'optionalAccess', _16 => _16.length]) ? `
|
|
5905
|
-
${
|
|
5905
|
+
${_chunkN5VOE6KZjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
5906
5906
|
const notes = rows.flatMap(
|
|
5907
5907
|
(row) => row.notes.map((note) => ` ${row.id}: ${note}`)
|
|
5908
5908
|
);
|
|
@@ -5987,7 +5987,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
5987
5987
|
console.error("--summary-width must be an integer of at least 2.");
|
|
5988
5988
|
return 1;
|
|
5989
5989
|
}
|
|
5990
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
5990
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunkKQ5VO34Xjs.DeeplineClient)().search({
|
|
5991
5991
|
query,
|
|
5992
5992
|
types,
|
|
5993
5993
|
exclude,
|
|
@@ -6001,7 +6001,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
6001
6001
|
});
|
|
6002
6002
|
if (searchRef) rememberSearchRef(searchRef);
|
|
6003
6003
|
pointAtDescribe(result);
|
|
6004
|
-
|
|
6004
|
+
_chunkN5VOE6KZjs.printCommandEnvelope.call(void 0, result, {
|
|
6005
6005
|
json: options.json === true,
|
|
6006
6006
|
text: renderSearchResults(result, summaryWidth)
|
|
6007
6007
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
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; } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkN5VOE6KZjs = require('./chunk-N5VOE6KZ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,13 +17,13 @@ var _chunkWERGMZWNjs = require('./chunk-WERGMZWN.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk6R6SQQGQjs = require('./chunk-6R6SQQGQ.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkJNX4Y37Gjs = require('./chunk-JNX4Y37G.js');
|
|
27
27
|
|
|
28
28
|
// src/compat.ts
|
|
29
29
|
var _crypto = require('crypto');
|
|
@@ -58,7 +58,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
58
58
|
return value === "1" || value === "true" || value === "yes";
|
|
59
59
|
}
|
|
60
60
|
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, )) {
|
|
61
|
-
return _path.join.call(void 0,
|
|
61
|
+
return _path.join.call(void 0, _chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
62
62
|
}
|
|
63
63
|
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, )) {
|
|
64
64
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -66,9 +66,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
66
66
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
67
67
|
return JSON.stringify({
|
|
68
68
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
69
|
-
version:
|
|
70
|
-
apiContract:
|
|
71
|
-
apiMajor:
|
|
69
|
+
version: _chunk6R6SQQGQjs.SDK_VERSION,
|
|
70
|
+
apiContract: _chunk6R6SQQGQjs.SDK_API_CONTRACT,
|
|
71
|
+
apiMajor: _chunk6R6SQQGQjs.SDK_API_MAJOR,
|
|
72
72
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
73
73
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
74
74
|
});
|
|
@@ -76,8 +76,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
76
76
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
77
77
|
return JSON.stringify({
|
|
78
78
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
79
|
-
version:
|
|
80
|
-
apiContract:
|
|
79
|
+
version: _chunk6R6SQQGQjs.SDK_VERSION,
|
|
80
|
+
apiContract: _chunk6R6SQQGQjs.SDK_API_CONTRACT,
|
|
81
81
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -102,7 +102,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
102
102
|
}
|
|
103
103
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
104
104
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
105
|
-
const path = _path.join.call(void 0,
|
|
105
|
+
const path = _path.join.call(void 0, _chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
106
106
|
try {
|
|
107
107
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
108
108
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -186,7 +186,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
186
186
|
);
|
|
187
187
|
try {
|
|
188
188
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
189
|
-
url.searchParams.set("version",
|
|
189
|
+
url.searchParams.set("version", _chunk6R6SQQGQjs.SDK_VERSION);
|
|
190
190
|
if (_optionalChain([options, 'access', _27 => _27.command, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()])) {
|
|
191
191
|
url.searchParams.set("command", options.command.trim());
|
|
192
192
|
}
|
|
@@ -194,7 +194,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
194
194
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
195
195
|
url.searchParams.set(
|
|
196
196
|
"skills_cli_capability",
|
|
197
|
-
String(
|
|
197
|
+
String(_chunkJNX4Y37Gjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
200
|
if (options.catalog) {
|
|
@@ -206,14 +206,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
206
206
|
const response = await fetch(url, {
|
|
207
207
|
method: "GET",
|
|
208
208
|
headers: {
|
|
209
|
-
...
|
|
210
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
211
|
-
"X-Deepline-SDK-Version":
|
|
212
|
-
"X-Deepline-API-Major": String(
|
|
213
|
-
"X-Deepline-API-Contract":
|
|
209
|
+
..._chunk6R6SQQGQjs.deploymentProtectionHeaders.call(void 0, ),
|
|
210
|
+
"User-Agent": `deepline-ts-sdk/${_chunk6R6SQQGQjs.SDK_VERSION}`,
|
|
211
|
+
"X-Deepline-SDK-Version": _chunk6R6SQQGQjs.SDK_VERSION,
|
|
212
|
+
"X-Deepline-API-Major": String(_chunk6R6SQQGQjs.SDK_API_MAJOR),
|
|
213
|
+
"X-Deepline-API-Contract": _chunk6R6SQQGQjs.SDK_API_CONTRACT,
|
|
214
214
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
215
215
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
216
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
216
|
+
...options.catalog ? { Authorization: `Bearer ${_chunk6R6SQQGQjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
217
217
|
..._optionalChain([options, 'access', _30 => _30.catalog, 'optionalAccess', _31 => _31.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
218
218
|
},
|
|
219
219
|
signal: controller.signal
|
|
@@ -374,7 +374,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
374
374
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
375
375
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
376
376
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
377
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
377
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunk6R6SQQGQjs.DEFAULT_SKILL_AGENTS));
|
|
378
378
|
const values = {
|
|
379
379
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
380
380
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -413,7 +413,7 @@ var CliProgress = (_class = class {
|
|
|
413
413
|
|
|
414
414
|
// --json output is one JSON document: progress never renders under it.
|
|
415
415
|
constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);
|
|
416
|
-
this.enabled = enabled && !
|
|
416
|
+
this.enabled = enabled && !_chunkN5VOE6KZjs.isJsonOutputMode.call(void 0, );
|
|
417
417
|
}
|
|
418
418
|
phase(message) {
|
|
419
419
|
if (!this.enabled || this.lastMessage === message) {
|
|
@@ -438,7 +438,7 @@ var CliProgress = (_class = class {
|
|
|
438
438
|
this.settle("\u2717");
|
|
439
439
|
}
|
|
440
440
|
writeLogLine(line) {
|
|
441
|
-
if (
|
|
441
|
+
if (_chunkN5VOE6KZjs.isJsonOutputMode.call(void 0, )) return;
|
|
442
442
|
if (!this.enabled) {
|
|
443
443
|
process.stderr.write(`${line}
|
|
444
444
|
`);
|
|
@@ -740,7 +740,7 @@ function buildEnvironmentContext() {
|
|
|
740
740
|
node_version: process.version,
|
|
741
741
|
runtime: "Node.js",
|
|
742
742
|
hostname: _os.hostname.call(void 0, ),
|
|
743
|
-
agent_runtime:
|
|
743
|
+
agent_runtime: _chunk6R6SQQGQjs.detectAgentRuntime.call(void 0, )
|
|
744
744
|
};
|
|
745
745
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
746
746
|
const normalized = _optionalChain([process, 'access', _60 => _60.env, 'access', _61 => _61[key], 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
|
|
@@ -762,15 +762,15 @@ function buildEnvironmentContext() {
|
|
|
762
762
|
}
|
|
763
763
|
function failureReportHeaders(apiKey) {
|
|
764
764
|
return {
|
|
765
|
-
...
|
|
765
|
+
..._chunk6R6SQQGQjs.deploymentProtectionHeaders.call(void 0, ),
|
|
766
766
|
Authorization: `Bearer ${apiKey}`,
|
|
767
767
|
"Content-Type": "application/json",
|
|
768
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
768
|
+
"User-Agent": `deepline-ts-sdk/${_chunk6R6SQQGQjs.SDK_VERSION}`,
|
|
769
769
|
"X-Deepline-Client-Family": "sdk",
|
|
770
770
|
"X-Deepline-CLI-Family": "sdk",
|
|
771
|
-
"X-Deepline-Agent-Runtime":
|
|
772
|
-
"X-Deepline-CLI-Version":
|
|
773
|
-
"X-Deepline-SDK-Version":
|
|
771
|
+
"X-Deepline-Agent-Runtime": _chunk6R6SQQGQjs.detectAgentRuntime.call(void 0, ),
|
|
772
|
+
"X-Deepline-CLI-Version": _chunk6R6SQQGQjs.SDK_VERSION,
|
|
773
|
+
"X-Deepline-SDK-Version": _chunk6R6SQQGQjs.SDK_VERSION
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
776
|
async function postFailureReport(input) {
|
|
@@ -798,7 +798,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
798
798
|
if (isFailureReportingDisabled()) return false;
|
|
799
799
|
let apiKey = "";
|
|
800
800
|
try {
|
|
801
|
-
apiKey =
|
|
801
|
+
apiKey = _chunk6R6SQQGQjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
802
802
|
} catch (e9) {
|
|
803
803
|
return false;
|
|
804
804
|
}
|
|
@@ -825,7 +825,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
825
825
|
failure_code: failureCode2,
|
|
826
826
|
failure_stage: failureStage,
|
|
827
827
|
error_body: "Automatic Deepline skills installation failed.",
|
|
828
|
-
cli_version:
|
|
828
|
+
cli_version: _chunk6R6SQQGQjs.SDK_VERSION,
|
|
829
829
|
context: {
|
|
830
830
|
environment: buildEnvironmentContext(),
|
|
831
831
|
skills_sync: {
|
|
@@ -945,7 +945,7 @@ function buildFailureReport(input) {
|
|
|
945
945
|
failure_kind: failureKind,
|
|
946
946
|
failure_code: code,
|
|
947
947
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
948
|
-
cli_version:
|
|
948
|
+
cli_version: _chunk6R6SQQGQjs.SDK_VERSION,
|
|
949
949
|
context: {
|
|
950
950
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
951
951
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -965,8 +965,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
965
965
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
966
966
|
const exitCode = resolvedExitCode(input);
|
|
967
967
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
968
|
-
const baseUrl =
|
|
969
|
-
const apiKey =
|
|
968
|
+
const baseUrl = _chunk6R6SQQGQjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
969
|
+
const apiKey = _chunk6R6SQQGQjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
970
970
|
if (!apiKey) return false;
|
|
971
971
|
return postFailureReport({
|
|
972
972
|
baseUrl,
|
|
@@ -1003,25 +1003,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
1003
1003
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
1004
1004
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
1005
1005
|
function shouldSkipSkillsSync() {
|
|
1006
|
-
if (
|
|
1006
|
+
if (_chunk6R6SQQGQjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
1007
1007
|
return true;
|
|
1008
1008
|
}
|
|
1009
1009
|
const value = _optionalChain([process, 'access', _84 => _84.env, 'access', _85 => _85.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _86 => _86.trim, 'call', _87 => _87(), 'access', _88 => _88.toLowerCase, 'call', _89 => _89()]);
|
|
1010
1010
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
1011
1011
|
}
|
|
1012
1012
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
1013
|
-
return _path.join.call(void 0,
|
|
1013
|
+
return _path.join.call(void 0, _chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
1014
1014
|
}
|
|
1015
1015
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
1016
1016
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
1017
|
-
var agentLeaseSegment =
|
|
1017
|
+
var agentLeaseSegment = _chunk6R6SQQGQjs.skillsAgentPathSegment;
|
|
1018
1018
|
function sortedLeaseAgents(agents) {
|
|
1019
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
1019
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunk6R6SQQGQjs.KNOWN_SKILL_AGENTS] : agents;
|
|
1020
1020
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
1021
1021
|
}
|
|
1022
1022
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
1023
1023
|
return _path.join.call(void 0,
|
|
1024
|
-
|
|
1024
|
+
_chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1025
1025
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
1026
1026
|
);
|
|
1027
1027
|
}
|
|
@@ -1180,7 +1180,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1180
1180
|
constructor(baseUrl, error) {
|
|
1181
1181
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1182
1182
|
super(
|
|
1183
|
-
`Could not save skills state in ${
|
|
1183
|
+
`Could not save skills state in ${_chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1184
1184
|
);
|
|
1185
1185
|
this.name = "SkillsStateUnavailableError";
|
|
1186
1186
|
}
|
|
@@ -1265,7 +1265,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1267
1267
|
return _path.join.call(void 0,
|
|
1268
|
-
|
|
1268
|
+
_chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1269
1269
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1270
1270
|
);
|
|
1271
1271
|
}
|
|
@@ -1299,8 +1299,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1299
1299
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1300
1300
|
}
|
|
1301
1301
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1302
|
-
if (shouldSkipSkillsSync() ||
|
|
1303
|
-
const agents =
|
|
1302
|
+
if (shouldSkipSkillsSync() || _chunk6R6SQQGQjs.hasActivePluginSkills.call(void 0, )) return;
|
|
1303
|
+
const agents = _chunk6R6SQQGQjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1304
1304
|
if (agents.length === 0) return;
|
|
1305
1305
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1306
1306
|
}
|
|
@@ -1316,7 +1316,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1318
1318
|
return _path.join.call(void 0,
|
|
1319
|
-
|
|
1319
|
+
_chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1320
1320
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
@@ -1345,7 +1345,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1345
1345
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1346
1346
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1347
1347
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1348
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _93 => _93.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1348
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _93 => _93.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunk6R6SQQGQjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1349
1349
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _94 => _94.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.`;
|
|
1350
1350
|
notice(
|
|
1351
1351
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1433,7 +1433,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1433
1433
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1434
1434
|
}
|
|
1435
1435
|
function isDefaultAgentSet(agents) {
|
|
1436
|
-
return agents.length ===
|
|
1436
|
+
return agents.length === _chunk6R6SQQGQjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunk6R6SQQGQjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1437
1437
|
}
|
|
1438
1438
|
function safeSkillFilePath(value) {
|
|
1439
1439
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1590,10 +1590,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1590
1590
|
method: "POST",
|
|
1591
1591
|
headers: { "Content-Type": "application/json" },
|
|
1592
1592
|
body: JSON.stringify({
|
|
1593
|
-
sdk_cli: { version:
|
|
1593
|
+
sdk_cli: { version: _chunk6R6SQQGQjs.SDK_VERSION },
|
|
1594
1594
|
skills: {
|
|
1595
1595
|
version: localVersion,
|
|
1596
|
-
capability:
|
|
1596
|
+
capability: _chunkJNX4Y37Gjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1597
1597
|
}
|
|
1598
1598
|
}),
|
|
1599
1599
|
signal: controller.signal
|
|
@@ -1632,7 +1632,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
function noInstallerProbePath(baseUrl) {
|
|
1634
1634
|
return _path.join.call(void 0,
|
|
1635
|
-
|
|
1635
|
+
_chunk6R6SQQGQjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1636
1636
|
"skills-sync-no-installer-unknown.json"
|
|
1637
1637
|
);
|
|
1638
1638
|
}
|
|
@@ -1711,7 +1711,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1711
1711
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1712
1712
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1713
1713
|
}
|
|
1714
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1714
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunk6R6SQQGQjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1715
1715
|
const commands = [];
|
|
1716
1716
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1717
1717
|
if (probes.bunx === "available") {
|
|
@@ -1863,11 +1863,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1863
1863
|
}
|
|
1864
1864
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1865
1865
|
if (shouldSkipSkillsSync()) return;
|
|
1866
|
-
const usingPluginSkills =
|
|
1866
|
+
const usingPluginSkills = _chunk6R6SQQGQjs.hasActivePluginSkills.call(void 0, );
|
|
1867
1867
|
if (usingPluginSkills) {
|
|
1868
1868
|
return;
|
|
1869
1869
|
}
|
|
1870
|
-
const agents =
|
|
1870
|
+
const agents = _chunk6R6SQQGQjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1871
1871
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1872
1872
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1873
1873
|
}
|
|
@@ -1895,7 +1895,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
1897
|
try {
|
|
1898
|
-
const localVersion =
|
|
1898
|
+
const localVersion = _chunk6R6SQQGQjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1899
1899
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1900
1900
|
needsUpdate: options.update.needs_update,
|
|
1901
1901
|
remoteVersion: options.update.remote.version
|
|
@@ -2061,7 +2061,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
}
|
|
2063
2063
|
runLegacySkillsCleanup(agents);
|
|
2064
|
-
if (!
|
|
2064
|
+
if (!_chunk6R6SQQGQjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
2065
2065
|
notice(
|
|
2066
2066
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
2067
2067
|
);
|