deepline 0.3.477 → 0.3.479
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +5 -4
- package/dist/bundling-sources/sdk/src/http-core.ts +84 -3
- package/dist/bundling-sources/sdk/src/http.ts +2 -0
- package/dist/bundling-sources/sdk/src/play.ts +8 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +11 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +10 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +11 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +77 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +83 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -27
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +13 -12
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +5 -2
- package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +37 -12
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +3 -1
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +29 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +15 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +57 -5
- package/dist/bundling-sources/shared_libs/product-notifications/slack-transport.ts +19 -0
- package/dist/cli/{auth-XVXRRWIQ.mjs → auth-D7DYB57R.mjs} +5 -5
- package/dist/cli/auth-MZDFNRPG.js +41 -0
- package/dist/cli/{billing-2H7GFJDT.js → billing-DHGSNM6E.js} +107 -87
- package/dist/cli/{billing-EOPUJ4JI.mjs → billing-DT4JT4QN.mjs} +34 -14
- package/dist/cli/{chunk-CH4VMDB5.js → chunk-27GSBTWD.js} +70 -52
- package/dist/cli/{chunk-PQQNMMWM.mjs → chunk-27PXHD2P.mjs} +1 -1
- package/dist/cli/{chunk-ACDXGOXE.js → chunk-33O2JGHE.js} +63 -11
- package/dist/cli/{chunk-255O6APS.js → chunk-3GIM7XRH.js} +2 -2
- package/dist/cli/{chunk-6IJJCRE5.mjs → chunk-3PHOAUU4.mjs} +23 -5
- package/dist/cli/{chunk-NC52JG66.js → chunk-3SGA53DX.js} +3 -3
- package/dist/cli/{chunk-RHIFH3GD.mjs → chunk-6C3QY5JS.mjs} +1 -1
- package/dist/cli/{chunk-NJMYX2TP.mjs → chunk-6QIXWFPO.mjs} +3 -3
- package/dist/cli/chunk-7I4B6V2S.mjs +127 -0
- package/dist/cli/{chunk-MZSLFWOT.js → chunk-7UFFWPQ2.js} +13 -9
- package/dist/cli/{chunk-RGNMMDSJ.js → chunk-AFHFZU5V.js} +37 -37
- package/dist/cli/{chunk-KWQNNPMH.js → chunk-AKVNUNL7.js} +3 -3
- package/dist/cli/{chunk-LXKGZKTL.js → chunk-CK2Q6AWR.js} +26 -26
- package/dist/cli/{chunk-DFKHXZQ7.mjs → chunk-D6MLXRMQ.mjs} +10 -10
- package/dist/cli/{chunk-7CILZKLE.js → chunk-EMVWC5LP.js} +5 -5
- package/dist/cli/{chunk-75NLWBYQ.js → chunk-FBEXJVQL.js} +93 -93
- package/dist/cli/{chunk-JS4UO6G4.mjs → chunk-FKEZ5DIJ.mjs} +2 -1
- package/dist/cli/{chunk-ZDPL5AIK.js → chunk-FV7WGK5X.js} +5 -5
- package/dist/cli/{chunk-E2CUSH56.js → chunk-G6V34EQ5.js} +16 -16
- package/dist/cli/{chunk-DS3DZUES.mjs → chunk-GICSDK72.mjs} +2 -2
- package/dist/cli/{chunk-C2V2HQDW.mjs → chunk-GONL4EFT.mjs} +2 -2
- package/dist/cli/{chunk-6KKDIISC.js → chunk-GQCH6Y7W.js} +1 -1
- package/dist/cli/{chunk-3UKKM6OS.js → chunk-GSULE54L.js} +7 -6
- package/dist/cli/{chunk-2YNLW43I.mjs → chunk-GZ43YXHT.mjs} +2 -2
- package/dist/cli/{chunk-UYA7LJGC.mjs → chunk-IL5AF6AR.mjs} +4 -2
- package/dist/cli/{chunk-R5FNCFEK.js → chunk-J5VDE42G.js} +3 -3
- package/dist/cli/{chunk-KMXBZIKO.mjs → chunk-JFGOMQW6.mjs} +2 -2
- package/dist/cli/{chunk-C46DWB56.mjs → chunk-JKUFOP7M.mjs} +1 -1
- package/dist/cli/{chunk-23EEVP5W.js → chunk-JMCTNS6S.js} +6 -6
- package/dist/cli/{chunk-ISEUOYCB.mjs → chunk-JNFNNJ75.mjs} +4 -4
- package/dist/cli/{chunk-C2AN2HTB.mjs → chunk-K5RRY7DJ.mjs} +4 -4
- package/dist/cli/{chunk-M2UL4ZS5.js → chunk-LXYDN5FE.js} +7 -7
- package/dist/cli/{chunk-3W6E3WVU.js → chunk-N4M6CO5H.js} +9 -9
- package/dist/cli/{chunk-RLCAECZH.mjs → chunk-N7E25EU2.mjs} +5 -5
- package/dist/cli/{chunk-YZA5UJXM.mjs → chunk-O5BUFQ2P.mjs} +1 -1
- package/dist/cli/{chunk-WFVEMDQL.js → chunk-OKAZHDYN.js} +4 -2
- package/dist/cli/{chunk-4RAENEAX.js → chunk-OVFCPV24.js} +53 -53
- package/dist/cli/{chunk-NO7ZC2GV.mjs → chunk-PUOKABQF.mjs} +5 -5
- package/dist/cli/{chunk-SG2SZQ4K.mjs → chunk-RJVUILW4.mjs} +2 -2
- package/dist/cli/{chunk-SVU2VR6Q.mjs → chunk-TZCHXF4R.mjs} +2 -2
- package/dist/cli/{chunk-XQLYPHYW.mjs → chunk-UOYA35OT.mjs} +1 -1
- package/dist/cli/{chunk-THMGJOR4.js → chunk-VKBLXJCK.js} +8 -8
- package/dist/cli/{chunk-UBNS6GSV.js → chunk-VRZXGJXH.js} +21 -21
- package/dist/cli/{chunk-DMWHEYZM.js → chunk-W4HIOBQQ.js} +2 -2
- package/dist/cli/{chunk-347EE4YE.js → chunk-W6N2S5N7.js} +8 -8
- package/dist/cli/{chunk-WRHLAAGN.mjs → chunk-XBYW5EHY.mjs} +1 -1
- package/dist/cli/{chunk-LJYTYNQZ.mjs → chunk-XDFARN7U.mjs} +55 -3
- package/dist/cli/{chunk-2QT6KN54.js → chunk-Y2MVDYV6.js} +10 -10
- package/dist/cli/{chunk-QODW5ILA.mjs → chunk-YC2QBF2W.mjs} +2 -2
- package/dist/cli/chunk-YGCKMI5P.js +127 -0
- package/dist/cli/{chunk-3A7TDUZV.mjs → chunk-ZBSUXXZS.mjs} +13 -9
- package/dist/cli/{chunk-2GZFIWSA.mjs → chunk-ZJRVHQSZ.mjs} +4 -4
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ECB7TYR2.js → csv-DQWOZ2BL.js} +13 -13
- package/dist/cli/{csv-IDRPTSSC.mjs → csv-JXFOD7DJ.mjs} +4 -4
- package/dist/cli/{db-FOBZD44N.mjs → db-NOGMZAQE.mjs} +6 -6
- package/dist/cli/{db-S74XZZ77.js → db-Q2OAAXRX.js} +27 -27
- package/dist/cli/describe-THHHNUEA.js +48 -0
- package/dist/cli/{describe-KMTPPI2J.mjs → describe-VKZTZLX6.mjs} +17 -17
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-ZE3JMNA4.js → executions-B3GDZ4GQ.js} +8 -8
- package/dist/cli/{executions-4JAIVE2E.mjs → executions-XU3JMNI3.mjs} +6 -6
- package/dist/cli/{feedback-W6VA47A3.js → feedback-5IW3ZKRP.js} +8 -8
- package/dist/cli/{feedback-EUX5PDBA.mjs → feedback-R5UQXINE.mjs} +4 -4
- package/dist/cli/{git-UOVG4PLH.mjs → git-7B4H7VEL.mjs} +5 -5
- package/dist/cli/git-BX27JAW4.js +25 -0
- package/dist/cli/index.js +161 -142
- package/dist/cli/index.mjs +65 -46
- package/dist/cli/{legacy-noops-3H35EH5Y.js → legacy-noops-AVT6T5QI.js} +8 -8
- package/dist/cli/{legacy-noops-ZBWUNFWV.mjs → legacy-noops-KY7JAALE.mjs} +5 -5
- package/dist/cli/{monitors-AYSGSUAK.mjs → monitors-G7L7AFXR.mjs} +7 -7
- package/dist/cli/{monitors-PI3KPLR2.js → monitors-GZB6CWK2.js} +91 -91
- package/dist/cli/{org-2BIG7U4V.mjs → org-QDUBOQTH.mjs} +6 -6
- package/dist/cli/{org-MVS3Y6BK.js → org-ZHHKAPCE.js} +72 -72
- package/dist/cli/{pages-VB6FOVDE.js → pages-5P3SPMN5.js} +17 -17
- package/dist/cli/{pages-4TRRL24G.mjs → pages-Q4WGQCST.mjs} +6 -6
- package/dist/cli/{play-BLT6IT2O.js → play-IRLKESZB.js} +585 -678
- package/dist/cli/{play-JR3VUOZM.mjs → play-WRSHD4RE.mjs} +26 -119
- package/dist/cli/{providers-547DPK4S.mjs → providers-7CQUHS57.mjs} +6 -6
- package/dist/cli/{providers-BBXIAGW4.js → providers-LKEYLN6D.js} +9 -9
- package/dist/cli/{quickstart-NTLXD7HS.mjs → quickstart-I6NYGMEE.mjs} +4 -4
- package/dist/cli/{quickstart-RNPI5B6J.js → quickstart-KS45M5SR.js} +6 -6
- package/dist/cli/{run-QZ4SFECD.mjs → run-AZETCL7R.mjs} +22 -22
- package/dist/cli/{run-BCCEXBOG.js → run-BLMOBNAN.js} +36 -36
- package/dist/cli/{search-PYNELH4C.mjs → search-EEKEP67Y.mjs} +7 -7
- package/dist/cli/search-PEQXXY2B.js +32 -0
- package/dist/cli/{secrets-O5WGREQ7.mjs → secrets-HAULG2EW.mjs} +6 -6
- package/dist/cli/{secrets-VD35LMYJ.js → secrets-M6NU3TD2.js} +15 -15
- package/dist/cli/{sessions-2TL6Z5J5.mjs → sessions-5MB4XKOK.mjs} +5 -5
- package/dist/cli/{sessions-NGGIBYXF.js → sessions-DSR5AHIA.js} +6 -6
- package/dist/cli/{settings-ERFNZRHO.js → settings-6US327NQ.js} +78 -78
- package/dist/cli/{settings-6KM74AJT.mjs → settings-JUQP4HYQ.mjs} +11 -11
- package/dist/cli/{setup-6X7EJ6RG.js → setup-5ZRSEQUD.js} +44 -44
- package/dist/cli/{setup-Y3BN6XRS.mjs → setup-JRH4UC47.mjs} +9 -9
- package/dist/cli/{skills-OUBQASHI.mjs → skills-HFOZ5WDH.mjs} +7 -7
- package/dist/cli/skills-P67KCVDR.js +33 -0
- package/dist/cli/{tools-EELZ5FF5.mjs → tools-CJEBZNPB.mjs} +16 -16
- package/dist/cli/tools-PDBEAI22.js +55 -0
- package/dist/cli/update-G6DI3BQW.js +33 -0
- package/dist/cli/{update-TX7SW32Y.mjs → update-VQJEPAAK.mjs} +9 -9
- package/dist/cli/{workflow-PUNQG7LG.mjs → workflow-EYWE3T75.mjs} +7 -7
- package/dist/cli/{workflow-5AI2BJA7.js → workflow-NKPDRZOP.js} +17 -17
- package/dist/{client-AjmfA5nR.d.mts → client-B9N1bcGc.d.mts} +1 -1
- package/dist/{client-DMyY-QL8.d.ts → client-Btw075Hq.d.ts} +1 -1
- package/dist/{client-core-C705vFyV.d.ts → client-core-DvGWlwtX.d.ts} +45 -6
- package/dist/{client-core-CpBbvLEX.d.mts → client-core-TulbIeRB.d.mts} +45 -6
- package/dist/{compiler-manifest-hqIAukR0.d.mts → compiler-manifest-gkO9ZkVg.d.mts} +37 -17
- package/dist/{compiler-manifest-hqIAukR0.d.ts → compiler-manifest-gkO9ZkVg.d.ts} +37 -17
- package/dist/{errors-CRO2qQ6k.d.ts → errors-Cc92LKH-.d.ts} +1 -1
- package/dist/{errors-DIHVetNY.d.mts → errors-CeCCOKSA.d.mts} +1 -1
- package/dist/{index-B8DVoeYt.d.ts → index-DJQKdV76.d.ts} +1 -1
- package/dist/{index-DVZ_X4Gb.d.mts → index-DsqWJL3Q.d.mts} +1 -1
- package/dist/index.d.mts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +112 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-QITP34OX.js +0 -41
- package/dist/cli/describe-PI7HCT7K.js +0 -48
- package/dist/cli/git-NDOGCQZY.js +0 -25
- package/dist/cli/search-YHEICYQL.js +0 -32
- package/dist/cli/skills-F7MPYC4P.js +0 -33
- package/dist/cli/tools-MCWDAK53.js +0 -55
- package/dist/cli/update-G5BRJOVT.js +0 -33
|
@@ -1,10 +1,10 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkLXYDN5FEjs = require('./chunk-LXYDN5FE.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk33O2JGHEjs = require('./chunk-33O2JGHE.js');
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
|
|
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
|
|
|
139
139
|
const newestFirst = listSessionFiles(agent).sort(
|
|
140
140
|
(a, b) => b.mtimeMs - a.mtimeMs
|
|
141
141
|
);
|
|
142
|
-
const sessionId =
|
|
142
|
+
const sessionId = _chunk33O2JGHEjs.agentSessionIdFromEnvironment.call(void 0,
|
|
143
143
|
process.env,
|
|
144
144
|
agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
|
|
145
145
|
);
|
|
@@ -451,7 +451,7 @@ function buildSessionUploadContent(raw) {
|
|
|
451
451
|
return { encodedContent: encoded, needsChunking: true };
|
|
452
452
|
}
|
|
453
453
|
async function uploadPayload(path, payload) {
|
|
454
|
-
const { http } =
|
|
454
|
+
const { http } = _chunkLXYDN5FEjs.getAuthedHttpClient.call(void 0, );
|
|
455
455
|
return await http.post(path, payload);
|
|
456
456
|
}
|
|
457
457
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -484,7 +484,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
484
484
|
...options.rating ? { rating: options.rating } : {}
|
|
485
485
|
});
|
|
486
486
|
const sessionIds = sessions.map((session) => session.sessionId);
|
|
487
|
-
|
|
487
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
|
|
488
488
|
{
|
|
489
489
|
...response,
|
|
490
490
|
ok: true,
|
|
@@ -516,7 +516,7 @@ async function handleSessionsSend(options) {
|
|
|
516
516
|
filename: _path.basename.call(void 0, filePath),
|
|
517
517
|
...rating ? { rating } : {}
|
|
518
518
|
});
|
|
519
|
-
|
|
519
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
|
|
520
520
|
{
|
|
521
521
|
...response2,
|
|
522
522
|
ok: true,
|
|
@@ -566,7 +566,7 @@ async function handleSessionsSend(options) {
|
|
|
566
566
|
...rating ? { rating } : {}
|
|
567
567
|
});
|
|
568
568
|
const sessionIds = built.map((session) => session.sessionId);
|
|
569
|
-
|
|
569
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
|
|
570
570
|
{
|
|
571
571
|
...response,
|
|
572
572
|
ok: true,
|
|
@@ -674,7 +674,7 @@ ${refreshMeta}
|
|
|
674
674
|
</body>
|
|
675
675
|
</html>`;
|
|
676
676
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
677
|
-
|
|
677
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
|
|
678
678
|
{
|
|
679
679
|
ok: true,
|
|
680
680
|
file: outputPath,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
17
17
|
import {
|
|
18
18
|
SDK_RELEASE
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-27PXHD2P.mjs";
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
22
|
var SDK_VERSION = SDK_RELEASE.version;
|
|
@@ -208,11 +208,61 @@ function mapNetworkError(baseUrl, error, targetLabel) {
|
|
|
208
208
|
code: "NETWORK_ABORTED"
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
+
const causeCode = networkCauseCode(error);
|
|
211
212
|
return {
|
|
212
|
-
message:
|
|
213
|
-
code: "NETWORK_ERROR"
|
|
213
|
+
message: connectionFailureMessage(baseUrl, error),
|
|
214
|
+
code: "NETWORK_ERROR",
|
|
215
|
+
...causeCode ? { details: { causeCode } } : {}
|
|
214
216
|
};
|
|
215
217
|
}
|
|
218
|
+
var BLOCKED_EGRESS_CAUSE_CODES = /* @__PURE__ */ new Set([
|
|
219
|
+
"EPERM",
|
|
220
|
+
"EACCES",
|
|
221
|
+
"ENOTFOUND",
|
|
222
|
+
"EAI_AGAIN",
|
|
223
|
+
"ENETUNREACH",
|
|
224
|
+
"EHOSTUNREACH",
|
|
225
|
+
"ETIMEDOUT",
|
|
226
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
227
|
+
]);
|
|
228
|
+
function networkCauseCode(error) {
|
|
229
|
+
const seen = /* @__PURE__ */ new Set();
|
|
230
|
+
const queue = [error];
|
|
231
|
+
while (queue.length > 0) {
|
|
232
|
+
const current = queue.shift();
|
|
233
|
+
if (!current || typeof current !== "object" || seen.has(current)) continue;
|
|
234
|
+
seen.add(current);
|
|
235
|
+
const record = current;
|
|
236
|
+
if (typeof record.code === "string" && /^[A-Z][A-Z0-9_]+$/.test(record.code))
|
|
237
|
+
return record.code;
|
|
238
|
+
queue.push(record.cause);
|
|
239
|
+
if (Array.isArray(record.errors)) queue.push(...record.errors);
|
|
240
|
+
}
|
|
241
|
+
return void 0;
|
|
242
|
+
}
|
|
243
|
+
function isLoopbackHost(hostname) {
|
|
244
|
+
return hostname === "localhost" || hostname === "[::1]" || hostname.startsWith("127.") || hostname.endsWith(".localhost");
|
|
245
|
+
}
|
|
246
|
+
function connectionFailureMessage(baseUrl, error) {
|
|
247
|
+
if (!error?.message) {
|
|
248
|
+
return `Unable to connect to ${baseUrl}. Is the computer able to access the url?`;
|
|
249
|
+
}
|
|
250
|
+
const causeCode = networkCauseCode(error);
|
|
251
|
+
let hostname = "";
|
|
252
|
+
try {
|
|
253
|
+
hostname = new URL(baseUrl).hostname;
|
|
254
|
+
} catch {
|
|
255
|
+
}
|
|
256
|
+
const blocked = hostname !== "" && !isLoopbackHost(hostname) && causeCode !== void 0 && (BLOCKED_EGRESS_CAUSE_CODES.has(causeCode) || causeCode === "ECONNREFUSED");
|
|
257
|
+
const causeMessage = error.cause instanceof Error ? error.cause.message.slice(0, 200) : "";
|
|
258
|
+
const cause = causeCode ?? causeMessage;
|
|
259
|
+
return [
|
|
260
|
+
`Unable to connect to ${baseUrl}. ${error.message}${cause && !error.message.includes(cause) ? ` (${cause})` : ""}.`,
|
|
261
|
+
...blocked ? [
|
|
262
|
+
`A sandbox, firewall, or proxy may be blocking ${hostname}; allow outbound HTTPS to it and retry.`
|
|
263
|
+
] : []
|
|
264
|
+
].join(" ");
|
|
265
|
+
}
|
|
216
266
|
function describeRequestTarget(path) {
|
|
217
267
|
const toolExecuteMatch = path.match(
|
|
218
268
|
/^\/api\/v2\/integrations\/([^/?#]+)\/execute(?:[/?#]|$)/
|
|
@@ -916,5 +966,7 @@ export {
|
|
|
916
966
|
detectAgentRuntime,
|
|
917
967
|
deploymentProtectionHeaders,
|
|
918
968
|
fetchWithDeploymentProtection,
|
|
969
|
+
networkCauseCode,
|
|
970
|
+
connectionFailureMessage,
|
|
919
971
|
HttpClient
|
|
920
972
|
};
|
|
@@ -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(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFBEXJVQLjs = require('./chunk-FBEXJVQL.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkJ5VDE42Gjs = require('./chunk-J5VDE42G.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,10 +14,10 @@ var _chunkAK7UKQ5Rjs = require('./chunk-AK7UKQ5R.js');
|
|
|
14
14
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkEMVWC5LPjs = require('./chunk-EMVWC5LP.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkLXYDN5FEjs = require('./chunk-LXYDN5FE.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/commands/describe.ts
|
|
23
23
|
var _fs = require('fs');
|
|
@@ -26,16 +26,16 @@ function nothingNamed(name) {
|
|
|
26
26
|
return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
|
|
27
27
|
}
|
|
28
28
|
function findNamed2(name, options) {
|
|
29
|
-
return _chunkAK7UKQ5Rjs.findNamed.call(void 0, name, options, _chunkAK7UKQ5Rjs.describeLookupsFor.call(void 0, new (0,
|
|
29
|
+
return _chunkAK7UKQ5Rjs.findNamed.call(void 0, name, options, _chunkAK7UKQ5Rjs.describeLookupsFor.call(void 0, new (0, _chunkEMVWC5LPjs.DeeplineClient)()));
|
|
30
30
|
}
|
|
31
31
|
async function describeAnything(name, options, onMissing) {
|
|
32
|
-
const client = new (0,
|
|
32
|
+
const client = new (0, _chunkEMVWC5LPjs.DeeplineClient)();
|
|
33
33
|
const lookups = _chunkAK7UKQ5Rjs.describeLookupsFor.call(void 0, client);
|
|
34
34
|
const outcome = await _chunkAK7UKQ5Rjs.describeName.call(void 0, name, options, {
|
|
35
35
|
...lookups,
|
|
36
36
|
// `tools describe` has already fetched the tool for its compatibility check.
|
|
37
37
|
tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
|
|
38
|
-
seedStarterScript:
|
|
38
|
+
seedStarterScript: _chunkFBEXJVQLjs.seedToolListScript
|
|
39
39
|
});
|
|
40
40
|
if (outcome.status === "missing") {
|
|
41
41
|
if (onMissing) return onMissing();
|
|
@@ -60,18 +60,18 @@ function deliver(envelope, lines, { json, out }) {
|
|
|
60
60
|
` : text;
|
|
61
61
|
_fs.writeFileSync.call(void 0, path, content);
|
|
62
62
|
const bytes = Buffer.byteLength(content);
|
|
63
|
-
|
|
63
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
|
|
64
64
|
{ path, bytes },
|
|
65
65
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
66
66
|
` }
|
|
67
67
|
);
|
|
68
68
|
return 0;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
71
71
|
return 0;
|
|
72
72
|
}
|
|
73
73
|
function registerDescribeCommand(program) {
|
|
74
|
-
|
|
74
|
+
_chunkJ5VDE42Gjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
|
|
75
75
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
76
76
|
).addHelpText(
|
|
77
77
|
"after",
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
HttpClient,
|
|
3
3
|
resolveCliCommandContext,
|
|
4
4
|
resolveConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O5BUFQ2P.mjs";
|
|
6
6
|
import {
|
|
7
7
|
detectAgentRuntime
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XDFARN7U.mjs";
|
|
9
9
|
import {
|
|
10
10
|
DeeplineError,
|
|
11
11
|
serializeToolExecutionFailure
|
|
@@ -0,0 +1,127 @@
|
|
|
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; }// ../plays/sandbox-runtime-limits.ts
|
|
2
|
+
var PLAY_SANDBOX_SIZE_LIMITS = {
|
|
3
|
+
standard: {
|
|
4
|
+
memoryGiB: 1,
|
|
5
|
+
cpu: 1,
|
|
6
|
+
diskGiB: 3
|
|
7
|
+
},
|
|
8
|
+
large: {
|
|
9
|
+
memoryGiB: 4,
|
|
10
|
+
cpu: 2,
|
|
11
|
+
diskGiB: 8
|
|
12
|
+
},
|
|
13
|
+
xlarge: {
|
|
14
|
+
memoryGiB: 8,
|
|
15
|
+
cpu: 4,
|
|
16
|
+
diskGiB: 10
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var PLAY_SANDBOX_SIZE_ALIASES = {
|
|
20
|
+
"1gb": "standard",
|
|
21
|
+
"4gb": "large",
|
|
22
|
+
"8gb": "xlarge"
|
|
23
|
+
};
|
|
24
|
+
var PLAY_SANDBOX_SIZE_INPUTS = [
|
|
25
|
+
...Object.keys(PLAY_SANDBOX_SIZE_LIMITS),
|
|
26
|
+
...Object.keys(
|
|
27
|
+
PLAY_SANDBOX_SIZE_ALIASES
|
|
28
|
+
)
|
|
29
|
+
];
|
|
30
|
+
var STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
31
|
+
timeoutSeconds: 30 * 60,
|
|
32
|
+
...PLAY_SANDBOX_SIZE_LIMITS.standard
|
|
33
|
+
};
|
|
34
|
+
var MAX_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
35
|
+
timeoutSeconds: 4 * 60 * 60,
|
|
36
|
+
...PLAY_SANDBOX_SIZE_LIMITS.xlarge
|
|
37
|
+
};
|
|
38
|
+
function modalSandboxMemoryLimitGiBForPlay(input) {
|
|
39
|
+
if (!Object.values(PLAY_SANDBOX_SIZE_LIMITS).some(
|
|
40
|
+
(profile) => profile.memoryGiB === input.memoryGiB
|
|
41
|
+
)) {
|
|
42
|
+
throw new Error(
|
|
43
|
+
`Unsupported Modal memory reservation: ${input.memoryGiB} GiB.`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return Math.min(
|
|
47
|
+
Math.max(4, input.memoryGiB * 2),
|
|
48
|
+
MAX_PLAY_SANDBOX_RUNTIME_LIMITS.memoryGiB
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function playSandboxSizeForLimits(limits) {
|
|
52
|
+
return _nullishCoalesce(_optionalChain([Object, 'access', _ => _.entries, 'call', _2 => _2(PLAY_SANDBOX_SIZE_LIMITS), 'access', _3 => _3.find, 'call', _4 => _4(
|
|
53
|
+
([, profile]) => profile.memoryGiB === limits.memoryGiB && profile.cpu === limits.cpu && profile.diskGiB === limits.diskGiB
|
|
54
|
+
), 'optionalAccess', _5 => _5[0]]), () => ( null));
|
|
55
|
+
}
|
|
56
|
+
var SUPPORTED_PLAY_SANDBOX_SIZES = PLAY_SANDBOX_SIZE_INPUTS.join(", ");
|
|
57
|
+
function normalizePlaySandboxSize(value) {
|
|
58
|
+
if (typeof value !== "string") return null;
|
|
59
|
+
if (Object.hasOwn(PLAY_SANDBOX_SIZE_LIMITS, value)) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return Object.hasOwn(PLAY_SANDBOX_SIZE_ALIASES, value) ? PLAY_SANDBOX_SIZE_ALIASES[value] : null;
|
|
63
|
+
}
|
|
64
|
+
function parseTimeout(value) {
|
|
65
|
+
const match = /^(\d+)\s*([mh])$/i.exec(value.trim());
|
|
66
|
+
if (!match) return null;
|
|
67
|
+
const amount = Number(match[1]);
|
|
68
|
+
if (!Number.isSafeInteger(amount) || amount <= 0) return null;
|
|
69
|
+
return amount * (match[2].toLowerCase() === "h" ? 3600 : 60);
|
|
70
|
+
}
|
|
71
|
+
function validatePlaySandboxRuntimeLimits(value) {
|
|
72
|
+
if (!playSandboxSizeForLimits(value)) {
|
|
73
|
+
throw new Error(
|
|
74
|
+
`Unsupported runtime sandbox resources: cpu=${value.cpu} memoryGiB=${value.memoryGiB} diskGiB=${value.diskGiB}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
if (!Number.isSafeInteger(value.timeoutSeconds) || value.timeoutSeconds <= 0) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".'
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
if (value.timeoutSeconds > MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`Requested runtime timeoutSeconds=${value.timeoutSeconds} exceeds this organisation's maximum ${MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds}.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
return { ...value };
|
|
88
|
+
}
|
|
89
|
+
function resolvePlaySandboxRuntimeLimits(declaration) {
|
|
90
|
+
const base = STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS;
|
|
91
|
+
if (!declaration) return { ...base };
|
|
92
|
+
const unsupportedProperties = Object.keys(declaration).filter(
|
|
93
|
+
(key) => key !== "timeout" && key !== "size"
|
|
94
|
+
);
|
|
95
|
+
if (unsupportedProperties.length > 0) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"}: ${unsupportedProperties.join(", ")}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
const size = declaration.size === void 0 ? "standard" : normalizePlaySandboxSize(declaration.size);
|
|
101
|
+
if (!size) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
const timeoutSeconds = declaration.timeout ? parseTimeout(declaration.timeout) : base.timeoutSeconds;
|
|
107
|
+
if (timeoutSeconds === null) {
|
|
108
|
+
throw new Error(
|
|
109
|
+
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".'
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
return validatePlaySandboxRuntimeLimits({
|
|
113
|
+
timeoutSeconds,
|
|
114
|
+
...PLAY_SANDBOX_SIZE_LIMITS[size]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
exports.PLAY_SANDBOX_SIZE_LIMITS = PLAY_SANDBOX_SIZE_LIMITS; exports.PLAY_SANDBOX_SIZE_INPUTS = PLAY_SANDBOX_SIZE_INPUTS; exports.STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS = STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS; exports.MAX_PLAY_SANDBOX_RUNTIME_LIMITS = MAX_PLAY_SANDBOX_RUNTIME_LIMITS; exports.modalSandboxMemoryLimitGiBForPlay = modalSandboxMemoryLimitGiBForPlay; exports.playSandboxSizeForLimits = playSandboxSizeForLimits; exports.SUPPORTED_PLAY_SANDBOX_SIZES = SUPPORTED_PLAY_SANDBOX_SIZES; exports.resolvePlaySandboxRuntimeLimits = resolvePlaySandboxRuntimeLimits;
|
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
validatePlaySourceFilesHaveNoInlineSecrets
|
|
6
6
|
} from "./chunk-H7HIDGZ7.mjs";
|
|
7
|
+
import {
|
|
8
|
+
PLAY_SANDBOX_SIZE_INPUTS,
|
|
9
|
+
SUPPORTED_PLAY_SANDBOX_SIZES
|
|
10
|
+
} from "./chunk-7I4B6V2S.mjs";
|
|
7
11
|
import {
|
|
8
12
|
InvalidToolResponseReceiptRevisionError,
|
|
9
13
|
PLAY_ARTIFACT_KINDS,
|
|
@@ -1389,11 +1393,9 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
1389
1393
|
errorMessage: 'rateLimit.every must be a static duration from "10s" to "24h", such as "5m".'
|
|
1390
1394
|
},
|
|
1391
1395
|
"runtime.size": {
|
|
1392
|
-
schema: Type.Union(
|
|
1393
|
-
Type.Literal(
|
|
1394
|
-
|
|
1395
|
-
Type.Literal("xlarge")
|
|
1396
|
-
]),
|
|
1396
|
+
schema: Type.Union(
|
|
1397
|
+
PLAY_SANDBOX_SIZE_INPUTS.map((size) => Type.Literal(size))
|
|
1398
|
+
),
|
|
1397
1399
|
fixtures: {
|
|
1398
1400
|
valid: "large",
|
|
1399
1401
|
invalid: "xxlarge",
|
|
@@ -1401,12 +1403,14 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
1401
1403
|
unresolved: { expression: "size" },
|
|
1402
1404
|
edition1: "standard"
|
|
1403
1405
|
},
|
|
1404
|
-
referenceType:
|
|
1406
|
+
referenceType: PLAY_SANDBOX_SIZE_INPUTS.map((size) => `'${size}'`).join(
|
|
1407
|
+
" | "
|
|
1408
|
+
),
|
|
1405
1409
|
required: false,
|
|
1406
1410
|
resolution: "static-required",
|
|
1407
1411
|
issueCode: "play_authoring_binding_invalid",
|
|
1408
|
-
description: "Deepline-managed sandbox size: standard (1 GiB memory, 1 CPU), large (4 GiB, 2 CPU), or xlarge (8 GiB, 4 CPU). Standard is the default.
|
|
1409
|
-
errorMessage: 'runtime.size must be the static literal "standard", "large", or "
|
|
1412
|
+
description: "Deepline-managed sandbox size: standard or 1gb (1 GiB memory, 1 CPU), large or 4gb (4 GiB, 2 CPU), or xlarge or 8gb (8 GiB, 4 CPU). Standard is the default. Each alias selects the same resource profile and compute price as its named size.",
|
|
1413
|
+
errorMessage: 'runtime.size must be the static literal "standard", "large", "xlarge", "1gb", "4gb", or "8gb".'
|
|
1410
1414
|
},
|
|
1411
1415
|
"ctx.customerDb.query.statement": {
|
|
1412
1416
|
schema: Type.Union([
|
|
@@ -4472,7 +4476,7 @@ function sandboxRuntimeDeclarationFromOptions(node, context) {
|
|
|
4472
4476
|
) : [];
|
|
4473
4477
|
if (unsupportedProperties.length > 0) {
|
|
4474
4478
|
throw new Error(
|
|
4475
|
-
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"} "${unsupportedProperties.join('", "')}". Use runtime.size with a Deepline prebuilt sandbox. Supported sizes:
|
|
4479
|
+
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"} "${unsupportedProperties.join('", "')}". Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${SUPPORTED_PLAY_SANDBOX_SIZES}.`
|
|
4476
4480
|
);
|
|
4477
4481
|
}
|
|
4478
4482
|
const timeout = resolveStaticProperty(runtime.value, "timeout", context);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedToolListScript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D6MLXRMQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addDescribeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JKUFOP7M.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describeLookupsFor,
|
|
9
9
|
describeName,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
} from "./chunk-JVHOS3K3.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RJVUILW4.mjs";
|
|
18
18
|
import {
|
|
19
19
|
printCommandEnvelope
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YC2QBF2W.mjs";
|
|
21
21
|
|
|
22
22
|
// src/cli/commands/describe.ts
|
|
23
23
|
import { writeFileSync } from "fs";
|
package/dist/cli/command-docs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkOKAZHDYNjs = require('./chunk-OKAZHDYN.js');
|
|
10
10
|
require('./chunk-COGTRVWW.js');
|
|
11
11
|
|
|
12
12
|
|
|
@@ -16,4 +16,4 @@ require('./chunk-COGTRVWW.js');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.CLI_DOC_SURFACE =
|
|
19
|
+
exports.CLI_DOC_SURFACE = _chunkOKAZHDYNjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunkOKAZHDYNjs.COMMAND_DOCS; exports.commandDocKey = _chunkOKAZHDYNjs.commandDocKey; exports.helpDetailFromArgv = _chunkOKAZHDYNjs.helpDetailFromArgv; exports.renderActionExplanation = _chunkOKAZHDYNjs.renderActionExplanation; exports.renderCommandExplanation = _chunkOKAZHDYNjs.renderCommandExplanation; exports.renderDocText = _chunkOKAZHDYNjs.renderDocText;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunkLXYDN5FEjs = require('./chunk-LXYDN5FE.js');
|
|
8
|
+
require('./chunk-3SGA53DX.js');
|
|
9
|
+
require('./chunk-33O2JGHE.js');
|
|
10
10
|
require('./chunk-ALJJRZNJ.js');
|
|
11
11
|
require('./chunk-XNYIZMNQ.js');
|
|
12
12
|
require('./chunk-DIAWYWT5.js');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-GQCH6Y7W.js');
|
|
14
14
|
require('./chunk-OG64RBAC.js');
|
|
15
15
|
require('./chunk-COGTRVWW.js');
|
|
16
16
|
|
|
@@ -128,7 +128,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
128
128
|
column.length,
|
|
129
129
|
...rows.map((row) => {
|
|
130
130
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
131
|
-
return (verbose ? value :
|
|
131
|
+
return (verbose ? value : _chunkLXYDN5FEjs.clip.call(void 0, value, 42)).length;
|
|
132
132
|
})
|
|
133
133
|
)
|
|
134
134
|
])
|
|
@@ -138,7 +138,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
138
138
|
const body = rows.map(
|
|
139
139
|
(row) => columns.map((column) => {
|
|
140
140
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
141
|
-
const display = verbose ? raw :
|
|
141
|
+
const display = verbose ? raw : _chunkLXYDN5FEjs.clip.call(void 0, raw, 42);
|
|
142
142
|
return display.padEnd(widths[column]);
|
|
143
143
|
}).join(" | ")
|
|
144
144
|
);
|
|
@@ -158,7 +158,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
158
158
|
{ exitCode: 2 }
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
|
-
const allRows =
|
|
161
|
+
const allRows = _chunkLXYDN5FEjs.readCsvRows.call(void 0, csvPath);
|
|
162
162
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
163
163
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
164
164
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -171,7 +171,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
171
171
|
if (options.summary) {
|
|
172
172
|
const summaries = summarizeColumns(selected, columns);
|
|
173
173
|
if (format === "json") {
|
|
174
|
-
|
|
174
|
+
_chunkLXYDN5FEjs.printJson.call(void 0, {
|
|
175
175
|
rows: summaries,
|
|
176
176
|
total_rows: selected.length,
|
|
177
177
|
source_total_rows: allRows.length
|
|
@@ -180,7 +180,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
180
180
|
}
|
|
181
181
|
const displayRows = summaryDisplayRows(summaries);
|
|
182
182
|
if (format === "csv") {
|
|
183
|
-
process.stdout.write(
|
|
183
|
+
process.stdout.write(_chunkLXYDN5FEjs.csvStringFromRows.call(void 0, displayRows));
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
process.stdout.write(
|
|
@@ -195,7 +195,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
if (format === "json") {
|
|
198
|
-
|
|
198
|
+
_chunkLXYDN5FEjs.printJson.call(void 0, {
|
|
199
199
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
200
200
|
});
|
|
201
201
|
return;
|
|
@@ -438,7 +438,7 @@ async function handleCsvRenderStart(options) {
|
|
|
438
438
|
if (log) {
|
|
439
439
|
detail = `
|
|
440
440
|
CSV render log:
|
|
441
|
-
${
|
|
441
|
+
${_chunkLXYDN5FEjs.clip.call(void 0, log, 2e3)}`;
|
|
442
442
|
}
|
|
443
443
|
} catch (e7) {
|
|
444
444
|
}
|
|
@@ -489,7 +489,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
489
489
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
490
490
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
491
491
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
492
|
-
|
|
492
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0, payload, {
|
|
493
493
|
json: options.json,
|
|
494
494
|
text: `${lines.join("\n")}
|
|
495
495
|
`
|
|
@@ -525,7 +525,7 @@ async function handleCsvRenderStop(options) {
|
|
|
525
525
|
};
|
|
526
526
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
527
527
|
` : "No running CSV render process found.\n";
|
|
528
|
-
|
|
528
|
+
_chunkLXYDN5FEjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
529
529
|
}
|
|
530
530
|
async function handleCsvRender(action, options) {
|
|
531
531
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-YC2QBF2W.mjs";
|
|
8
|
+
import "./chunk-O5BUFQ2P.mjs";
|
|
9
|
+
import "./chunk-XDFARN7U.mjs";
|
|
10
10
|
import "./chunk-4QF2K7TM.mjs";
|
|
11
11
|
import "./chunk-DLIRSHV6.mjs";
|
|
12
12
|
import "./chunk-HBL4PM5Q.mjs";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-27PXHD2P.mjs";
|
|
14
14
|
import "./chunk-WZYKRD7T.mjs";
|
|
15
15
|
import "./chunk-KRD6H754.mjs";
|
|
16
16
|
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-OVDNJAJN.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RJVUILW4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
planCustomerDbQuery
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FKEZ5DIJ.mjs";
|
|
10
10
|
import "./chunk-L2VKAASU.mjs";
|
|
11
11
|
import "./chunk-NELMCOWK.mjs";
|
|
12
12
|
import "./chunk-S3A4IXBQ.mjs";
|
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
printCommandEnvelope,
|
|
21
21
|
recordRows,
|
|
22
22
|
shouldEmitJson
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-YC2QBF2W.mjs";
|
|
24
|
+
import "./chunk-O5BUFQ2P.mjs";
|
|
25
|
+
import "./chunk-XDFARN7U.mjs";
|
|
26
26
|
import {
|
|
27
27
|
CustomerDbQueryOutcomeUnknownError
|
|
28
28
|
} from "./chunk-4QF2K7TM.mjs";
|
|
@@ -30,7 +30,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
30
30
|
import {
|
|
31
31
|
DeeplineError
|
|
32
32
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-27PXHD2P.mjs";
|
|
34
34
|
import "./chunk-WZYKRD7T.mjs";
|
|
35
35
|
import "./chunk-KRD6H754.mjs";
|
|
36
36
|
|