deepline 0.3.294 → 0.3.295
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/compat.ts +35 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +14 -1
- package/dist/cli/auth-EDTRERZP.mjs +31 -0
- package/dist/cli/auth-TDHKB277.js +31 -0
- package/dist/cli/billing-ELIDPILY.js +1749 -0
- package/dist/cli/billing-EXGXJVAU.mjs +1749 -0
- package/dist/cli/chunk-2S5Y3TZP.js +5688 -0
- package/dist/cli/chunk-3KC45UVF.js +150 -0
- package/dist/cli/chunk-3XX5TEA4.js +15 -0
- package/dist/cli/chunk-4MBOJQPL.mjs +0 -0
- package/dist/cli/chunk-4NEFYBF7.js +2240 -0
- package/dist/cli/chunk-5JLQPVNX.js +3056 -0
- package/dist/cli/chunk-5KDKFHZI.js +1269 -0
- package/dist/cli/chunk-6A3TJUWC.js +76 -0
- package/dist/cli/chunk-6O5YZOVN.mjs +890 -0
- package/dist/cli/chunk-7P5AA3SN.js +344 -0
- package/dist/cli/chunk-AYHLUHE5.js +52 -0
- package/dist/cli/chunk-CBVIJSHF.mjs +560 -0
- package/dist/cli/chunk-CFVVCN4A.js +735 -0
- package/dist/cli/chunk-COGTRVWW.js +30 -0
- package/dist/cli/chunk-D4AZUZO4.js +190 -0
- package/dist/cli/chunk-DLIRSHV6.mjs +28 -0
- package/dist/cli/chunk-EACVZI6N.mjs +1995 -0
- package/dist/cli/chunk-EDWJY6T4.mjs +3056 -0
- package/dist/cli/chunk-EXMLR72R.mjs +0 -0
- package/dist/cli/chunk-F35VOIQL.js +890 -0
- package/dist/cli/chunk-GAMFK2ZP.mjs +148 -0
- package/dist/cli/chunk-GHRQQPW2.mjs +2240 -0
- package/dist/cli/chunk-GONRLVV3.js +3440 -0
- package/dist/cli/chunk-GVUJJJ5G.mjs +76 -0
- package/dist/cli/chunk-H7HIDGZ7.mjs +150 -0
- package/dist/cli/chunk-HUZXWOSK.mjs +503 -0
- package/dist/cli/chunk-I5YZLGMG.js +1 -0
- package/dist/cli/chunk-ITOFSXIU.mjs +15 -0
- package/dist/cli/chunk-J5NA2TTX.js +503 -0
- package/dist/cli/chunk-JCS5TPNY.mjs +3440 -0
- package/dist/cli/chunk-JNNOCMQY.js +47 -0
- package/dist/cli/chunk-KRD6H754.mjs +30 -0
- package/dist/cli/chunk-LA46MMTL.js +560 -0
- package/dist/cli/chunk-LDWT7RJK.mjs +190 -0
- package/dist/cli/chunk-M2V26OR5.js +499 -0
- package/dist/cli/chunk-MIMASXO4.mjs +389 -0
- package/dist/cli/chunk-MROPCKW2.mjs +190 -0
- package/dist/cli/chunk-NXDRDJ4K.js +389 -0
- package/dist/cli/chunk-NXGCO4JB.mjs +344 -0
- package/dist/cli/chunk-OG64RBAC.js +6 -0
- package/dist/cli/chunk-OQYEC4GL.mjs +34 -0
- package/dist/cli/chunk-OWJZUE3Y.mjs +103 -0
- package/dist/cli/chunk-SDK3ZA2C.js +103 -0
- package/dist/cli/chunk-SFLARO4Y.mjs +47 -0
- package/dist/cli/chunk-SVIIIYIQ.js +923 -0
- package/dist/cli/chunk-TAC3JIFE.mjs +354 -0
- package/dist/cli/chunk-U3PI7HBM.js +34 -0
- package/dist/cli/chunk-UFS752TU.mjs +52 -0
- package/dist/cli/chunk-UI37DQE7.mjs +499 -0
- package/dist/cli/chunk-UNEMDKXN.js +1 -0
- package/dist/cli/chunk-WB6Z2Q44.mjs +1622 -0
- package/dist/cli/chunk-WJYPBHTE.js +148 -0
- package/dist/cli/chunk-WOHBA5PV.js +354 -0
- package/dist/cli/chunk-WQICC2B3.js +190 -0
- package/dist/cli/chunk-WZYKRD7T.mjs +6 -0
- package/dist/cli/chunk-XL2FO6CW.mjs +5688 -0
- package/dist/cli/chunk-XNYIZMNQ.js +28 -0
- package/dist/cli/chunk-XRK2TZT5.js +1995 -0
- package/dist/cli/chunk-YJYPL5OK.mjs +1269 -0
- package/dist/cli/chunk-YWNDYCXR.mjs +735 -0
- package/dist/cli/chunk-YWWAF7KZ.mjs +923 -0
- package/dist/cli/chunk-ZDO3TO3M.js +1622 -0
- package/dist/cli/client-4JVOYVC5.js +20 -0
- package/dist/cli/client-EEN2IJN2.mjs +20 -0
- package/dist/cli/csv-BOHBEP2I.mjs +585 -0
- package/dist/cli/csv-S5NYRUEX.js +585 -0
- package/dist/cli/db-CLODWCOB.mjs +486 -0
- package/dist/cli/db-F6PKFOOV.js +486 -0
- package/dist/cli/executions-5TQAKLJU.js +28 -0
- package/dist/cli/executions-MAKW6QOY.mjs +28 -0
- package/dist/cli/feedback-GV4QJFEN.js +107 -0
- package/dist/cli/feedback-XY24TW7H.mjs +107 -0
- package/dist/cli/getting-started.js +18 -76
- package/dist/cli/getting-started.mjs +10 -37
- package/dist/cli/git-6S2C22T5.js +23 -0
- package/dist/cli/git-OZLBD5HH.mjs +23 -0
- package/dist/cli/index.js +291 -54294
- package/dist/cli/index.mjs +209 -54352
- package/dist/cli/legacy-noops-LLCGDPQE.js +157 -0
- package/dist/cli/legacy-noops-TYH3TW2D.mjs +157 -0
- package/dist/cli/monitors-CABMB4DW.js +3251 -0
- package/dist/cli/monitors-TTD55HMK.mjs +3251 -0
- package/dist/cli/org-MSF3RG76.js +849 -0
- package/dist/cli/org-SFJ77MWY.mjs +849 -0
- package/dist/cli/play-NXHJSCKL.mjs +18439 -0
- package/dist/cli/play-OKSFNNO4.js +18439 -0
- package/dist/cli/providers-QC2ERERL.js +95 -0
- package/dist/cli/providers-TIIAZEUA.mjs +95 -0
- package/dist/cli/proxy-env-EBANZHPV.js +161 -0
- package/dist/cli/proxy-env-M4ZHXHRL.mjs +161 -0
- package/dist/cli/quickstart-ICANHLMI.js +69 -0
- package/dist/cli/quickstart-KWUOP3FI.mjs +69 -0
- package/dist/cli/search-U5H2FDOO.mjs +18 -0
- package/dist/cli/search-XQRQOLWS.js +18 -0
- package/dist/cli/secrets-3J6YTWFA.mjs +400 -0
- package/dist/cli/secrets-YNMNZNOM.js +400 -0
- package/dist/cli/sessions-CLEES4L6.mjs +15 -0
- package/dist/cli/sessions-J6VR47FG.js +15 -0
- package/dist/cli/settings-EEKZMTY4.js +846 -0
- package/dist/cli/settings-UVLOQZRH.mjs +846 -0
- package/dist/cli/setup-DLMDXPGJ.mjs +1257 -0
- package/dist/cli/setup-HC4Q7QM4.js +1257 -0
- package/dist/cli/skills-33PHFBSB.mjs +28 -0
- package/dist/cli/skills-LFRY3KPX.js +28 -0
- package/dist/cli/tools-3COEPKML.mjs +2955 -0
- package/dist/cli/tools-QXEVCN45.js +2955 -0
- package/dist/cli/update-LSAC4FF5.mjs +28 -0
- package/dist/cli/update-NXHSPYXA.js +28 -0
- package/dist/cli/workflow-7S44OECF.mjs +1936 -0
- package/dist/cli/workflow-QPZWYSZE.js +1936 -0
- package/dist/helpers.js +6 -32
- package/dist/helpers.mjs +2 -0
- package/dist/index.js +1972 -12825
- package/dist/index.mjs +1910 -12672
- package/dist/install-integrity.json +110 -0
- package/dist/monitor-fleet-contract.js +31 -730
- package/dist/monitor-fleet-contract.mjs +18 -667
- package/dist/monitor-input-contract.js +10 -390
- package/dist/monitor-input-contract.mjs +7 -348
- package/dist/plays/bundle-play-file.mjs +13 -5178
- package/dist/plays/csv-data-input.js +5 -3132
- package/dist/plays/csv-data-input.mjs +5 -3105
- package/dist/plays/run-request.js +56 -664
- package/dist/plays/run-request.mjs +30 -588
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +5 -212
- package/dist/release.mjs +5 -185
- package/package.json +1 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { SDK_API_CONTRACT, SDK_API_MAJOR, SDK_VERSION } from './version.js';
|
|
2
|
-
import {
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import {
|
|
4
|
+
existsSync,
|
|
5
|
+
mkdirSync,
|
|
6
|
+
readFileSync,
|
|
7
|
+
renameSync,
|
|
8
|
+
rmSync,
|
|
9
|
+
writeFileSync,
|
|
10
|
+
} from 'node:fs';
|
|
3
11
|
import { homedir } from 'node:os';
|
|
4
12
|
import { dirname, join } from 'node:path';
|
|
5
13
|
import { sdkCliStateDirPath } from './config.js';
|
|
@@ -96,6 +104,21 @@ type CompatCacheFile = {
|
|
|
96
104
|
>;
|
|
97
105
|
};
|
|
98
106
|
|
|
107
|
+
function writeCompatibilityCacheFile(
|
|
108
|
+
path: string,
|
|
109
|
+
cache: CompatCacheFile,
|
|
110
|
+
): void {
|
|
111
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
112
|
+
const tempPath = `${path}.${process.pid}.${randomUUID()}.tmp`;
|
|
113
|
+
try {
|
|
114
|
+
writeFileSync(tempPath, `${JSON.stringify(cache, null, 2)}\n`);
|
|
115
|
+
// Concurrent CLI processes must never see a partially written policy.
|
|
116
|
+
renameSync(tempPath, path);
|
|
117
|
+
} finally {
|
|
118
|
+
rmSync(tempPath, { force: true });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
99
122
|
function shouldSkipCompatibilityCheck(): boolean {
|
|
100
123
|
const value =
|
|
101
124
|
process.env.DEEPLINE_SKIP_SDK_COMPAT_CHECK?.trim().toLowerCase();
|
|
@@ -273,7 +296,7 @@ function invalidateCachedCompatibility(
|
|
|
273
296
|
const entries = existing.entries ?? {};
|
|
274
297
|
delete entries[compatibilityCacheKey(baseUrl, command, skillsVersion)];
|
|
275
298
|
delete entries[legacyCompatibilityCacheKey(baseUrl, command)];
|
|
276
|
-
|
|
299
|
+
writeCompatibilityCacheFile(cachePath, { entries });
|
|
277
300
|
} catch {
|
|
278
301
|
// A cache that cannot be edited simply expires on its own TTL.
|
|
279
302
|
}
|
|
@@ -287,16 +310,21 @@ function writeCachedCompatibility(
|
|
|
287
310
|
): void {
|
|
288
311
|
try {
|
|
289
312
|
const path = sdkCompatibilityCachePath(baseUrl);
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
313
|
+
let existing: CompatCacheFile = {};
|
|
314
|
+
if (existsSync(path)) {
|
|
315
|
+
try {
|
|
316
|
+
existing = JSON.parse(readFileSync(path, 'utf8')) as CompatCacheFile;
|
|
317
|
+
} catch {
|
|
318
|
+
// A failed or overlapping old write can corrupt the optional cache.
|
|
319
|
+
// Replace it with this live policy instead of failing every future write.
|
|
320
|
+
}
|
|
321
|
+
}
|
|
293
322
|
const entries = existing.entries ?? {};
|
|
294
323
|
entries[compatibilityCacheKey(baseUrl, command, skillsVersion)] = {
|
|
295
324
|
savedAt: Date.now(),
|
|
296
325
|
response,
|
|
297
326
|
};
|
|
298
|
-
|
|
299
|
-
writeFileSync(path, `${JSON.stringify({ entries }, null, 2)}\n`);
|
|
327
|
+
writeCompatibilityCacheFile(path, { entries });
|
|
300
328
|
} catch {
|
|
301
329
|
// Compatibility checks are advisory unless the server explicitly responds
|
|
302
330
|
// with a blocking policy. Cache failures must not block normal CLI usage.
|
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.295',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
206
206
|
packageCapabilities: {
|
|
@@ -348,11 +348,24 @@ function formatInsufficientCreditsMessage(input: {
|
|
|
348
348
|
? ` Add credits at ${billingUrl}.`
|
|
349
349
|
: '';
|
|
350
350
|
const minimum = input.billing.minimum_balance_credits;
|
|
351
|
+
const estimate = input.billing.estimated_credits;
|
|
352
|
+
const estimatedPrice =
|
|
353
|
+
typeof estimate === 'number'
|
|
354
|
+
? ` Estimated price: ${formatCreditAmount(estimate)}.`
|
|
355
|
+
: '';
|
|
351
356
|
if (
|
|
352
357
|
typeof minimum === 'number' &&
|
|
353
358
|
input.billing.required_credits === minimum
|
|
354
359
|
) {
|
|
355
|
-
return `Workspace balance ${balance} is below the ${formatCreditAmount(minimum)}-credit workspace minimum for starting a billable call (${operation}); this is a workspace-wide minimum, separate from the tool's own price.${addSuffix}`;
|
|
360
|
+
return `Workspace balance ${balance} is below the ${formatCreditAmount(minimum)}-credit workspace minimum for starting a billable call (${operation}); this is a workspace-wide minimum, separate from the tool's own price.${estimatedPrice}${addSuffix}`;
|
|
361
|
+
}
|
|
362
|
+
// A required balance above the call's estimate is headroom, not a price.
|
|
363
|
+
if (
|
|
364
|
+
typeof estimate === 'number' &&
|
|
365
|
+
typeof input.billing.required_credits === 'number' &&
|
|
366
|
+
input.billing.required_credits > estimate
|
|
367
|
+
) {
|
|
368
|
+
return `Workspace balance ${balance} is below the ${required}-credit balance required to start ${operation}; this is a required balance, not the price.${estimatedPrice}${addSuffix}`;
|
|
356
369
|
}
|
|
357
370
|
return `Workspace balance ${balance} < required ${required} for ${operation}.${addSuffix}`;
|
|
358
371
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXIT_WORKSPACE_MISMATCH,
|
|
3
|
+
clearPendingClaim,
|
|
4
|
+
clearSatisfiedPendingClaim,
|
|
5
|
+
handleRegister,
|
|
6
|
+
handleStatus,
|
|
7
|
+
handleWait,
|
|
8
|
+
readPendingAuthClaim,
|
|
9
|
+
registerAuthCommands,
|
|
10
|
+
reportSetupCompleted,
|
|
11
|
+
resolvePendingAuthClaimForResume
|
|
12
|
+
} from "./chunk-YWWAF7KZ.mjs";
|
|
13
|
+
import "./chunk-6O5YZOVN.mjs";
|
|
14
|
+
import "./chunk-EACVZI6N.mjs";
|
|
15
|
+
import "./chunk-DLIRSHV6.mjs";
|
|
16
|
+
import "./chunk-LDWT7RJK.mjs";
|
|
17
|
+
import "./chunk-NXGCO4JB.mjs";
|
|
18
|
+
import "./chunk-WZYKRD7T.mjs";
|
|
19
|
+
import "./chunk-KRD6H754.mjs";
|
|
20
|
+
export {
|
|
21
|
+
EXIT_WORKSPACE_MISMATCH,
|
|
22
|
+
clearPendingClaim,
|
|
23
|
+
clearSatisfiedPendingClaim,
|
|
24
|
+
handleRegister,
|
|
25
|
+
handleStatus,
|
|
26
|
+
handleWait,
|
|
27
|
+
readPendingAuthClaim,
|
|
28
|
+
registerAuthCommands,
|
|
29
|
+
reportSetupCompleted,
|
|
30
|
+
resolvePendingAuthClaimForResume
|
|
31
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkSVIIIYIQjs = require('./chunk-SVIIIYIQ.js');
|
|
13
|
+
require('./chunk-F35VOIQL.js');
|
|
14
|
+
require('./chunk-XRK2TZT5.js');
|
|
15
|
+
require('./chunk-XNYIZMNQ.js');
|
|
16
|
+
require('./chunk-D4AZUZO4.js');
|
|
17
|
+
require('./chunk-7P5AA3SN.js');
|
|
18
|
+
require('./chunk-OG64RBAC.js');
|
|
19
|
+
require('./chunk-COGTRVWW.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkSVIIIYIQjs.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkSVIIIYIQjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkSVIIIYIQjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkSVIIIYIQjs.handleRegister; exports.handleStatus = _chunkSVIIIYIQjs.handleStatus; exports.handleWait = _chunkSVIIIYIQjs.handleWait; exports.readPendingAuthClaim = _chunkSVIIIYIQjs.readPendingAuthClaim; exports.registerAuthCommands = _chunkSVIIIYIQjs.registerAuthCommands; exports.reportSetupCompleted = _chunkSVIIIYIQjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkSVIIIYIQjs.resolvePendingAuthClaimForResume;
|