deepline 0.3.408 → 0.3.410
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/agent-runtime.ts +18 -1
- package/dist/bundling-sources/sdk/src/client.ts +212 -334
- package/dist/bundling-sources/sdk/src/compat.ts +45 -2
- package/dist/bundling-sources/sdk/src/db/query.ts +9 -10
- package/dist/bundling-sources/sdk/src/http.ts +38 -20
- package/dist/bundling-sources/sdk/src/index.ts +4 -5
- package/dist/bundling-sources/sdk/src/play.ts +10 -10
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +6 -4
- package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +114 -0
- package/dist/bundling-sources/sdk/src/plays/client.ts +431 -0
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +106 -16
- package/dist/bundling-sources/sdk/src/release.ts +13 -7
- package/dist/bundling-sources/sdk/src/runs/read-errors.ts +8 -0
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +124 -13
- package/dist/bundling-sources/sdk/src/tool-calls.ts +108 -19
- package/dist/bundling-sources/sdk/src/types.ts +18 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/execute-retry-contract.ts +37 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/package.json +3 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
- package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
- package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
- package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
- package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
- package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/cli/{auth-UVD3CUBB.mjs → auth-LLXLIILR.mjs} +6 -6
- package/dist/cli/auth-UG4WOYGL.js +40 -0
- package/dist/cli/{billing-BZVTXXLM.mjs → billing-5FVXZYAC.mjs} +8 -8
- package/dist/cli/{billing-BZVYAF6T.js → billing-NFPK7GYP.js} +84 -84
- package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
- package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
- package/dist/cli/{chunk-WTT6CLED.mjs → chunk-2YR7BIIC.mjs} +5 -2
- package/dist/cli/{chunk-3ZB6IIA7.js → chunk-36AHOWVS.js} +26 -26
- package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
- package/dist/cli/{chunk-LOYISF7S.mjs → chunk-4XQLVUC7.mjs} +738 -512
- package/dist/cli/{chunk-J5PTX66Y.js → chunk-5MLCBXXU.js} +8 -1
- package/dist/cli/chunk-5TUGWDEB.js +313 -0
- package/dist/cli/{chunk-D6FFBSM5.js → chunk-5UUQAGJS.js} +5 -2
- package/dist/cli/{chunk-4CFULMRB.mjs → chunk-5V5Y37BC.mjs} +2 -2
- package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
- package/dist/cli/{chunk-AUMD2VXP.js → chunk-63S7X326.js} +1032 -806
- package/dist/cli/{chunk-4QFT5LGV.mjs → chunk-6PGATQ6L.mjs} +6 -3
- package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
- package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
- package/dist/cli/{chunk-4RNDKFNQ.js → chunk-D37FEBES.js} +2 -2
- package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
- package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
- package/dist/cli/chunk-EQ4Z7RJW.mjs +35 -0
- package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
- package/dist/cli/{chunk-QUAQX3FQ.js → chunk-FVLNYDI4.js} +128 -376
- package/dist/cli/{chunk-BRJUESQV.js → chunk-FZJAM576.js} +50 -50
- package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
- package/dist/cli/{chunk-IOHRWLQE.mjs → chunk-IPG42SD2.mjs} +452 -138
- package/dist/cli/chunk-J33TSWO5.js +8 -0
- package/dist/cli/{chunk-XXLXOUUU.mjs → chunk-JNXJZ577.mjs} +1 -1
- package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
- package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
- package/dist/cli/{chunk-PYZZMAJQ.mjs → chunk-LFSHGNT2.mjs} +8 -1
- package/dist/cli/{chunk-2XXXFPTD.js → chunk-LTFL4JRN.js} +426 -721
- package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
- package/dist/cli/{chunk-URACNNLO.mjs → chunk-MN2OWLFA.mjs} +2 -2
- package/dist/cli/{chunk-Q3PUHXOY.js → chunk-NF4V5DTY.js} +12 -12
- package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
- package/dist/cli/chunk-NTVLGHFM.js +501 -0
- package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
- package/dist/cli/{chunk-E3PJF6YP.js → chunk-OBB4QXHA.js} +19 -4
- package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
- package/dist/cli/chunk-OZ6E3IRZ.js +6084 -0
- package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
- package/dist/cli/{chunk-IWBXJDZA.mjs → chunk-PZSLPBDA.mjs} +2 -2
- package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
- package/dist/cli/{chunk-ECVLPS67.js → chunk-QJI5FIOW.js} +170 -49
- package/dist/cli/{chunk-I3DHIXVJ.mjs → chunk-QL22Y56M.mjs} +149 -28
- package/dist/cli/{chunk-SD7MXAJA.mjs → chunk-RFB25DSQ.mjs} +36 -284
- package/dist/cli/chunk-T44IIOT6.mjs +501 -0
- package/dist/cli/chunk-VK2LZ5IP.js +35 -0
- package/dist/cli/chunk-VKKVSFRD.js +62 -0
- package/dist/cli/{chunk-RWCY6YI2.js → chunk-VYKV5XHL.js} +644 -330
- package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
- package/dist/cli/chunk-XHLKJOTN.mjs +313 -0
- package/dist/cli/{chunk-MJELBQBU.mjs → chunk-XIHWSXSV.mjs} +330 -625
- package/dist/cli/chunk-XNZJKRJA.mjs +6084 -0
- package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
- package/dist/cli/{chunk-ZBABPK6Y.js → chunk-ZFZ427HN.js} +11 -8
- package/dist/cli/{chunk-SJVVBWRL.mjs → chunk-ZKYEW55U.mjs} +16 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-XLGLHJ6P.js → csv-7U3FJYKZ.js} +14 -14
- package/dist/cli/{csv-WPSXG6ZZ.mjs → csv-ZWLDMM4A.mjs} +5 -5
- package/dist/cli/{db-5PTNJG4X.js → db-DNCGV5PC.js} +42 -47
- package/dist/cli/{db-ABS57ABJ.mjs → db-IMYXVMGI.mjs} +15 -20
- package/dist/cli/{describe-PVWQJ2PB.mjs → describe-Q23DWJUK.mjs} +20 -15
- package/dist/cli/{describe-EZS6PQXA.js → describe-S34JUX5W.js} +27 -22
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/describe-core.js +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-OKJGATQZ.mjs → executions-A73EUGSI.mjs} +8 -8
- package/dist/cli/{executions-FNTAFQ7Y.js → executions-XOMPX2YJ.js} +10 -10
- package/dist/cli/{feedback-W27HDMRR.mjs → feedback-N4GJ2POI.mjs} +11 -7
- package/dist/cli/{feedback-6YBOMSUA.js → feedback-QTCHNJJH.js} +13 -9
- package/dist/cli/{git-YOOUEL6M.mjs → git-4Q3JIQYZ.mjs} +6 -6
- package/dist/cli/git-I6CPBEVG.js +24 -0
- package/dist/cli/index.js +240 -352
- package/dist/cli/index.mjs +163 -275
- package/dist/cli/{legacy-noops-V6OKW7VR.mjs → legacy-noops-3SOVGFF7.mjs} +6 -6
- package/dist/cli/{legacy-noops-2VZ7XT6C.js → legacy-noops-4OSHZM34.js} +9 -9
- package/dist/cli/{monitors-FBWGVIUS.js → monitors-LVE2KZNG.js} +94 -94
- package/dist/cli/{monitors-P2YYWTWT.mjs → monitors-QP2XID2B.mjs} +8 -8
- package/dist/cli/{org-DVMG6H3C.mjs → org-IVRETVQA.mjs} +8 -8
- package/dist/cli/{org-3XUSVX5T.js → org-XFLK5IAP.js} +68 -68
- package/dist/cli/{play-GNC5CQAS.mjs → play-DE7VH6NU.mjs} +533 -98
- package/dist/cli/{play-YG5L4BWQ.js → play-XXTPPP23.js} +1067 -632
- package/dist/cli/{providers-7PSWG2OV.js → providers-DLD3I4JF.js} +11 -11
- package/dist/cli/{providers-JR33SLWL.mjs → providers-GX2NIZQQ.mjs} +8 -8
- package/dist/cli/{quickstart-VUOBQYIQ.mjs → quickstart-72B4L4PK.mjs} +5 -5
- package/dist/cli/{quickstart-FDVZ5BL3.js → quickstart-XNS3HSWC.js} +7 -7
- package/dist/cli/search-6NCH4HB5.js +30 -0
- package/dist/cli/{search-JZYLO33K.mjs → search-SUTRANJI.mjs} +9 -9
- package/dist/cli/{secrets-VS266FVA.js → secrets-6OBLOVEV.js} +17 -17
- package/dist/cli/{secrets-3MCYBT4I.mjs → secrets-FPFXXNUH.mjs} +8 -8
- package/dist/cli/sessions-235532DR.js +16 -0
- package/dist/cli/{sessions-ELLLT23E.mjs → sessions-R25I4QKN.mjs} +6 -6
- package/dist/cli/{settings-PZCKAFII.mjs → settings-AOP6F5PZ.mjs} +12 -12
- package/dist/cli/{settings-7364NMMA.js → settings-VL5FOFPN.js} +79 -79
- package/dist/cli/{setup-PMWYLCT6.js → setup-BSC67YT3.js} +45 -44
- package/dist/cli/{setup-A7GQ4KIA.mjs → setup-ZMPHBHVJ.mjs} +11 -10
- package/dist/cli/skills-3IWLYYRL.js +29 -0
- package/dist/cli/{skills-WS6BIFPQ.mjs → skills-KF65TVFO.mjs} +7 -7
- package/dist/cli/tools-LR66SPYU.js +44 -0
- package/dist/cli/{tools-BR4DOZA2.mjs → tools-SX4XIPM7.mjs} +19 -14
- package/dist/cli/{update-D2B7UNFT.mjs → update-QRMFRAQQ.mjs} +11 -9
- package/dist/cli/update-SP7UEO53.js +31 -0
- package/dist/cli/{workflow-PQXC2R47.mjs → workflow-FOEEEB7G.mjs} +44 -20
- package/dist/cli/{workflow-6ODTCYXU.js → workflow-KOCK2FLW.js} +54 -30
- package/dist/{client-Z9Pye1Wm.d.mts → client-74k4IPh6.d.mts} +137 -54
- package/dist/{client-BcvhDfJJ.d.ts → client-C1IK1f8c.d.ts} +137 -54
- package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
- package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
- package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
- package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
- package/dist/index.d.mts +47 -9
- package/dist/index.d.ts +47 -9
- package/dist/index.js +17 -14
- package/dist/index.mjs +13 -10
- package/dist/install-integrity.json +120 -104
- 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 +5 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- 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/plays/run-request.js +11 -3
- package/dist/plays/run-request.mjs +10 -2
- package/dist/release.d.mts +15 -6
- package/dist/release.d.ts +15 -6
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +2 -2
- package/dist/cli/auth-3GB2K636.js +0 -40
- package/dist/cli/chunk-67RWR34T.mjs +0 -155
- package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
- package/dist/cli/chunk-HQY2SG3K.js +0 -83
- package/dist/cli/chunk-OSFWFV72.js +0 -155
- package/dist/cli/chunk-Q3LFI3VH.js +0 -392
- package/dist/cli/chunk-WPAB4DCU.mjs +0 -83
- package/dist/cli/chunk-YMOFWHGO.mjs +0 -392
- package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
- package/dist/cli/git-YKUXXJOR.js +0 -24
- package/dist/cli/search-PPPYC5OZ.js +0 -30
- package/dist/cli/sessions-TEHEWW7O.js +0 -16
- package/dist/cli/skills-SYS7VRRK.js +0 -29
- package/dist/cli/tools-KK4BKVQR.js +0 -39
- package/dist/cli/update-2IV5JTX2.js +0 -29
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// ../plays/fetch-http-error.ts
|
|
2
|
+
var CtxFetchHttpError = class extends Error {
|
|
3
|
+
/** Build the error from the durable response record. */
|
|
4
|
+
constructor(response) {
|
|
5
|
+
const body = response.bodyText || "empty response body";
|
|
6
|
+
super(
|
|
7
|
+
`ctx.fetch(${response.url}) returned HTTP ${response.status}${response.statusText ? ` ${response.statusText}` : ""}: ${body}`
|
|
8
|
+
);
|
|
9
|
+
this.response = response;
|
|
10
|
+
this.name = "CtxFetchHttpError";
|
|
11
|
+
this.status = response.status;
|
|
12
|
+
this.statusText = response.statusText;
|
|
13
|
+
this.url = response.url;
|
|
14
|
+
this.headers = response.headers;
|
|
15
|
+
this.bodyText = response.bodyText;
|
|
16
|
+
this.json = response.json;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Play source and the runtime are separately bundled. Recognize the stable
|
|
20
|
+
* public error code so `instanceof` works across that boundary as well.
|
|
21
|
+
*/
|
|
22
|
+
static [Symbol.hasInstance](value) {
|
|
23
|
+
return value !== null && typeof value === "object" && value.code === "CTX_FETCH_HTTP_ERROR";
|
|
24
|
+
}
|
|
25
|
+
/** Stable machine-readable HTTP-failure code. */
|
|
26
|
+
code = "CTX_FETCH_HTTP_ERROR";
|
|
27
|
+
/** Upstream HTTP status. */
|
|
28
|
+
status;
|
|
29
|
+
/** Upstream HTTP status text. */
|
|
30
|
+
statusText;
|
|
31
|
+
/** Final response URL after redirects. */
|
|
32
|
+
url;
|
|
33
|
+
/** Secret-redacted response headers. */
|
|
34
|
+
headers;
|
|
35
|
+
/** Complete secret-redacted response body. */
|
|
36
|
+
bodyText;
|
|
37
|
+
/** Eagerly parsed secret-redacted JSON, or null. */
|
|
38
|
+
json;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// ../plays/ambiguous-write-error.ts
|
|
42
|
+
var CtxFetchAmbiguousWriteError = class extends Error {
|
|
43
|
+
constructor(method, origin, options) {
|
|
44
|
+
super(
|
|
45
|
+
`ctx.fetch ${method} to ${origin} was dispatched, but its outcome is unknown. Reconcile with the provider or retry only under its supported idempotency contract using the same intended-operation key.`,
|
|
46
|
+
options
|
|
47
|
+
);
|
|
48
|
+
this.method = method;
|
|
49
|
+
this.origin = origin;
|
|
50
|
+
this.name = "CtxFetchAmbiguousWriteError";
|
|
51
|
+
}
|
|
52
|
+
static [Symbol.hasInstance](value) {
|
|
53
|
+
return value !== null && typeof value === "object" && value.code === "CTX_FETCH_WRITE_OUTCOME_UNKNOWN";
|
|
54
|
+
}
|
|
55
|
+
code = "CTX_FETCH_WRITE_OUTCOME_UNKNOWN";
|
|
56
|
+
outcome = "unknown";
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
CtxFetchHttpError,
|
|
61
|
+
CtxFetchAmbiguousWriteError
|
|
62
|
+
};
|
|
@@ -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 _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkFVLNYDI4js = require('./chunk-FVLNYDI4.js');
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
|
|
@@ -139,7 +139,10 @@ 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 = _chunkFVLNYDI4js.agentSessionIdFromEnvironment.call(void 0,
|
|
143
|
+
process.env,
|
|
144
|
+
agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
|
|
145
|
+
);
|
|
143
146
|
const cwd = process.cwd();
|
|
144
147
|
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(newestFirst.find((candidate) => candidate.sessionId === sessionId), () => ( newestFirst.find(
|
|
145
148
|
(candidate) => sessionStartedInDirectory(candidate, cwd)
|
|
@@ -448,7 +451,7 @@ function buildSessionUploadContent(raw) {
|
|
|
448
451
|
return { encodedContent: encoded, needsChunking: true };
|
|
449
452
|
}
|
|
450
453
|
async function uploadPayload(path, payload) {
|
|
451
|
-
const { http } =
|
|
454
|
+
const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
|
|
452
455
|
return await http.post(path, payload);
|
|
453
456
|
}
|
|
454
457
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -481,7 +484,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
481
484
|
...options.rating ? { rating: options.rating } : {}
|
|
482
485
|
});
|
|
483
486
|
const sessionIds = sessions.map((session) => session.sessionId);
|
|
484
|
-
|
|
487
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
485
488
|
{
|
|
486
489
|
...response,
|
|
487
490
|
ok: true,
|
|
@@ -513,7 +516,7 @@ async function handleSessionsSend(options) {
|
|
|
513
516
|
filename: _path.basename.call(void 0, filePath),
|
|
514
517
|
...rating ? { rating } : {}
|
|
515
518
|
});
|
|
516
|
-
|
|
519
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
517
520
|
{
|
|
518
521
|
...response2,
|
|
519
522
|
ok: true,
|
|
@@ -563,7 +566,7 @@ async function handleSessionsSend(options) {
|
|
|
563
566
|
...rating ? { rating } : {}
|
|
564
567
|
});
|
|
565
568
|
const sessionIds = built.map((session) => session.sessionId);
|
|
566
|
-
|
|
569
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
567
570
|
{
|
|
568
571
|
...response,
|
|
569
572
|
ok: true,
|
|
@@ -671,7 +674,7 @@ ${refreshMeta}
|
|
|
671
674
|
</body>
|
|
672
675
|
</html>`;
|
|
673
676
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
674
|
-
|
|
677
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
675
678
|
{
|
|
676
679
|
ok: true,
|
|
677
680
|
file: outputPath,
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeRawStderr
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5V5Y37BC.mjs";
|
|
4
|
+
|
|
5
|
+
// src/cli/maintenance-policy.ts
|
|
6
|
+
import { InvalidArgumentError } from "commander";
|
|
7
|
+
function parseCliMaintenancePolicy(value) {
|
|
8
|
+
if (value === "configured" || value === "off") return value;
|
|
9
|
+
throw new InvalidArgumentError(
|
|
10
|
+
"Maintenance policy must be configured or off."
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function resolveCliMaintenancePolicy(input) {
|
|
14
|
+
return input.dryRun ? "off" : input.maintenance ?? "configured";
|
|
15
|
+
}
|
|
4
16
|
|
|
5
17
|
// src/cli/trace.ts
|
|
6
18
|
var cliTraceStartedAt = Date.now();
|
|
@@ -51,6 +63,9 @@ async function traceCliSpan(phase, fields, run) {
|
|
|
51
63
|
}
|
|
52
64
|
|
|
53
65
|
export {
|
|
66
|
+
parseCliMaintenancePolicy,
|
|
67
|
+
resolveCliMaintenancePolicy,
|
|
68
|
+
isCliTraceEnabled,
|
|
54
69
|
recordCliTrace,
|
|
55
70
|
traceCliSpan
|
|
56
71
|
};
|
package/dist/cli/command-docs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk5MLCBXXUjs = require('./chunk-5MLCBXXU.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 = _chunk5MLCBXXUjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunk5MLCBXXUjs.COMMAND_DOCS; exports.commandDocKey = _chunk5MLCBXXUjs.commandDocKey; exports.helpDetailFromArgv = _chunk5MLCBXXUjs.helpDetailFromArgv; exports.renderActionExplanation = _chunk5MLCBXXUjs.renderActionExplanation; exports.renderCommandExplanation = _chunk5MLCBXXUjs.renderCommandExplanation; exports.renderDocText = _chunk5MLCBXXUjs.renderDocText;
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
|
|
8
|
+
require('./chunk-FVLNYDI4.js');
|
|
9
|
+
require('./chunk-NPBJI7RE.js');
|
|
10
10
|
require('./chunk-XNYIZMNQ.js');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-PPDBRJRW.js');
|
|
12
|
+
require('./chunk-5UUQAGJS.js');
|
|
13
13
|
require('./chunk-OG64RBAC.js');
|
|
14
14
|
require('./chunk-COGTRVWW.js');
|
|
15
15
|
|
|
@@ -127,7 +127,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
127
127
|
column.length,
|
|
128
128
|
...rows.map((row) => {
|
|
129
129
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
130
|
-
return (verbose ? value :
|
|
130
|
+
return (verbose ? value : _chunkNF4V5DTYjs.clip.call(void 0, value, 42)).length;
|
|
131
131
|
})
|
|
132
132
|
)
|
|
133
133
|
])
|
|
@@ -137,7 +137,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
137
137
|
const body = rows.map(
|
|
138
138
|
(row) => columns.map((column) => {
|
|
139
139
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
140
|
-
const display = verbose ? raw :
|
|
140
|
+
const display = verbose ? raw : _chunkNF4V5DTYjs.clip.call(void 0, raw, 42);
|
|
141
141
|
return display.padEnd(widths[column]);
|
|
142
142
|
}).join(" | ")
|
|
143
143
|
);
|
|
@@ -157,7 +157,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
157
157
|
{ exitCode: 2 }
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
const allRows =
|
|
160
|
+
const allRows = _chunkNF4V5DTYjs.readCsvRows.call(void 0, csvPath);
|
|
161
161
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
162
162
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
163
163
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -170,7 +170,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
170
170
|
if (options.summary) {
|
|
171
171
|
const summaries = summarizeColumns(selected, columns);
|
|
172
172
|
if (format === "json") {
|
|
173
|
-
|
|
173
|
+
_chunkNF4V5DTYjs.printJson.call(void 0, {
|
|
174
174
|
rows: summaries,
|
|
175
175
|
total_rows: selected.length,
|
|
176
176
|
source_total_rows: allRows.length
|
|
@@ -179,7 +179,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
179
179
|
}
|
|
180
180
|
const displayRows = summaryDisplayRows(summaries);
|
|
181
181
|
if (format === "csv") {
|
|
182
|
-
process.stdout.write(
|
|
182
|
+
process.stdout.write(_chunkNF4V5DTYjs.csvStringFromRows.call(void 0, displayRows));
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
process.stdout.write(
|
|
@@ -194,7 +194,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
if (format === "json") {
|
|
197
|
-
|
|
197
|
+
_chunkNF4V5DTYjs.printJson.call(void 0, {
|
|
198
198
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
199
199
|
});
|
|
200
200
|
return;
|
|
@@ -437,7 +437,7 @@ async function handleCsvRenderStart(options) {
|
|
|
437
437
|
if (log) {
|
|
438
438
|
detail = `
|
|
439
439
|
CSV render log:
|
|
440
|
-
${
|
|
440
|
+
${_chunkNF4V5DTYjs.clip.call(void 0, log, 2e3)}`;
|
|
441
441
|
}
|
|
442
442
|
} catch (e7) {
|
|
443
443
|
}
|
|
@@ -488,7 +488,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
488
488
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
489
489
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
490
490
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
491
|
-
|
|
491
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0, payload, {
|
|
492
492
|
json: options.json,
|
|
493
493
|
text: `${lines.join("\n")}
|
|
494
494
|
`
|
|
@@ -524,7 +524,7 @@ async function handleCsvRenderStop(options) {
|
|
|
524
524
|
};
|
|
525
525
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
526
526
|
` : "No running CSV render process found.\n";
|
|
527
|
-
|
|
527
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
528
528
|
}
|
|
529
529
|
async function handleCsvRender(action, options) {
|
|
530
530
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-5V5Y37BC.mjs";
|
|
8
|
+
import "./chunk-RFB25DSQ.mjs";
|
|
9
|
+
import "./chunk-MAMVGOSC.mjs";
|
|
10
10
|
import "./chunk-DLIRSHV6.mjs";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-E4IXDAZI.mjs";
|
|
12
|
+
import "./chunk-2YR7BIIC.mjs";
|
|
13
13
|
import "./chunk-WZYKRD7T.mjs";
|
|
14
14
|
import "./chunk-KRD6H754.mjs";
|
|
15
15
|
|
|
@@ -4,9 +4,9 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunk63S7X326js = require('./chunk-63S7X326.js');
|
|
8
|
+
require('./chunk-E4CABWXL.js');
|
|
9
|
+
require('./chunk-2H4EY7KH.js');
|
|
10
10
|
require('./chunk-KXMNM4AQ.js');
|
|
11
11
|
require('./chunk-XDVT3GOM.js');
|
|
12
12
|
|
|
@@ -18,16 +18,16 @@ require('./chunk-XDVT3GOM.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
22
|
-
require('./chunk-
|
|
21
|
+
var _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
|
|
22
|
+
require('./chunk-FVLNYDI4.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkNPBJI7REjs = require('./chunk-NPBJI7RE.js');
|
|
26
26
|
require('./chunk-XNYIZMNQ.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
30
|
-
require('./chunk-
|
|
29
|
+
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
30
|
+
require('./chunk-5UUQAGJS.js');
|
|
31
31
|
require('./chunk-OG64RBAC.js');
|
|
32
32
|
require('./chunk-COGTRVWW.js');
|
|
33
33
|
|
|
@@ -50,8 +50,8 @@ function formatCell(value) {
|
|
|
50
50
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
51
51
|
}
|
|
52
52
|
function tableLines(result) {
|
|
53
|
-
const rows =
|
|
54
|
-
const responseColumns =
|
|
53
|
+
const rows = _chunkNF4V5DTYjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
54
|
+
const responseColumns = _chunkNF4V5DTYjs.dataExportColumns.call(void 0,
|
|
55
55
|
rows,
|
|
56
56
|
customerDbColumnNames(result)
|
|
57
57
|
);
|
|
@@ -70,7 +70,7 @@ function tableLines(result) {
|
|
|
70
70
|
`Showing ${columns.length}/${responseColumns.length} columns; hidden metadata: ${hiddenColumns.join(", ")}`
|
|
71
71
|
);
|
|
72
72
|
lines.push(
|
|
73
|
-
"
|
|
73
|
+
"Use --json or select metadata columns explicitly when you need run ids/errors/stages."
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
if (rows.length === 0) {
|
|
@@ -97,7 +97,7 @@ function tableLines(result) {
|
|
|
97
97
|
return lines;
|
|
98
98
|
}
|
|
99
99
|
function customerDbRows(result) {
|
|
100
|
-
return
|
|
100
|
+
return _chunkNF4V5DTYjs.recordRows.call(void 0, result.rows);
|
|
101
101
|
}
|
|
102
102
|
function customerDbColumnNames(result) {
|
|
103
103
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -119,29 +119,29 @@ function collectErrorText(value) {
|
|
|
119
119
|
].filter(Boolean).join("\n");
|
|
120
120
|
}
|
|
121
121
|
function formatDbQueryError(sql, error) {
|
|
122
|
-
const text = error instanceof
|
|
122
|
+
const text = error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
|
|
123
123
|
const lower = text.toLowerCase();
|
|
124
124
|
const referencesStorage = /"storage"\.|storage\./i.test(sql);
|
|
125
125
|
const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
|
|
126
126
|
const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
|
|
127
127
|
if (referencesStorage && relationMissing) {
|
|
128
128
|
return [
|
|
129
|
-
...error instanceof
|
|
130
|
-
error instanceof
|
|
129
|
+
...error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
130
|
+
error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
|
|
131
131
|
"Play dataset tables are created only when the corresponding ctx.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
|
|
132
|
-
"Use `deepline runs get <run-id> --full` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
132
|
+
"Use `deepline runs get <run-id> --full --json` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
133
133
|
`Original error: ${errorMessage(error)}`
|
|
134
134
|
].join("\n");
|
|
135
135
|
}
|
|
136
136
|
if (referencesStorage && runIdColumnMissing) {
|
|
137
137
|
return [
|
|
138
|
-
...error instanceof
|
|
138
|
+
...error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
139
139
|
"Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
|
|
140
140
|
"Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
|
|
141
141
|
`Original error: ${errorMessage(error)}`
|
|
142
142
|
].join("\n");
|
|
143
143
|
}
|
|
144
|
-
if (error instanceof
|
|
144
|
+
if (error instanceof _chunkPPDBRJRWjs.DeeplineError) {
|
|
145
145
|
return error.message;
|
|
146
146
|
}
|
|
147
147
|
return errorMessage(error);
|
|
@@ -150,7 +150,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
150
150
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
151
151
|
_fs.writeFileSync.call(void 0,
|
|
152
152
|
resolved,
|
|
153
|
-
|
|
153
|
+
_chunkNF4V5DTYjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
154
154
|
"utf-8"
|
|
155
155
|
);
|
|
156
156
|
return resolved;
|
|
@@ -191,18 +191,18 @@ function dbQueryExportEnvelope(input) {
|
|
|
191
191
|
function renderDbQueryResult(result, query, options) {
|
|
192
192
|
const { sql, maxRows, operationKey } = query;
|
|
193
193
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
194
|
-
const jsonOutput = explicitJsonOutput ||
|
|
194
|
+
const jsonOutput = explicitJsonOutput || _chunkNF4V5DTYjs.shouldEmitJson.call(void 0, );
|
|
195
195
|
const toolPayload = JSON.stringify({
|
|
196
196
|
sql,
|
|
197
197
|
result_mode: "rows",
|
|
198
198
|
...maxRows ? { max_rows: maxRows } : {},
|
|
199
199
|
...operationKey !== void 0 ? { operation_key: operationKey } : {}
|
|
200
200
|
});
|
|
201
|
-
const toolCommand = `deepline tools execute query_customer_db --payload ${_chunkAID3OYVJjs.shellQuote.call(void 0, toolPayload)}`;
|
|
201
|
+
const toolCommand = `deepline tools execute query_customer_db --payload ${_chunkAID3OYVJjs.shellQuote.call(void 0, toolPayload)} --json`;
|
|
202
202
|
if (format === "csv") {
|
|
203
203
|
if (outPath) {
|
|
204
204
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
205
|
-
|
|
205
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
206
206
|
dbQueryExportEnvelope({
|
|
207
207
|
result,
|
|
208
208
|
format,
|
|
@@ -218,7 +218,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
218
218
|
);
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
222
222
|
dbQueryExportEnvelope({
|
|
223
223
|
result,
|
|
224
224
|
format,
|
|
@@ -228,7 +228,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
228
228
|
}),
|
|
229
229
|
{
|
|
230
230
|
json: explicitJsonOutput,
|
|
231
|
-
text:
|
|
231
|
+
text: _chunkNF4V5DTYjs.dataExportCsvString.call(void 0,
|
|
232
232
|
customerDbRows(result),
|
|
233
233
|
customerDbColumnNames(result)
|
|
234
234
|
)
|
|
@@ -237,14 +237,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
if (format === "markdown") {
|
|
240
|
-
const content =
|
|
240
|
+
const content = _chunkNF4V5DTYjs.markdownTableFromRows.call(void 0,
|
|
241
241
|
customerDbRows(result),
|
|
242
242
|
customerDbColumnNames(result)
|
|
243
243
|
);
|
|
244
244
|
if (outPath) {
|
|
245
245
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
246
246
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
247
|
-
|
|
247
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
248
248
|
dbQueryExportEnvelope({
|
|
249
249
|
result,
|
|
250
250
|
format,
|
|
@@ -260,7 +260,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
260
260
|
);
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
264
264
|
dbQueryExportEnvelope({
|
|
265
265
|
result,
|
|
266
266
|
format,
|
|
@@ -275,7 +275,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
275
275
|
);
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
279
279
|
{
|
|
280
280
|
...result,
|
|
281
281
|
next: {
|
|
@@ -349,9 +349,9 @@ async function runDbQueryCommand(options) {
|
|
|
349
349
|
...maxRows === void 0 ? {} : { maxRows },
|
|
350
350
|
...operationKey === void 0 ? {} : { operationKey }
|
|
351
351
|
};
|
|
352
|
-
const plan =
|
|
352
|
+
const plan = _chunk63S7X326js.planCustomerDbQuery.call(void 0, query);
|
|
353
353
|
if (options.dryRun) {
|
|
354
|
-
|
|
354
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
355
355
|
{
|
|
356
356
|
dryRun: true,
|
|
357
357
|
...plan,
|
|
@@ -364,11 +364,11 @@ async function runDbQueryCommand(options) {
|
|
|
364
364
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
|
-
{ json: options.json ||
|
|
367
|
+
{ json: options.json || _chunkNF4V5DTYjs.shouldEmitJson.call(void 0, ) }
|
|
368
368
|
);
|
|
369
369
|
return 0;
|
|
370
370
|
}
|
|
371
|
-
const client = new (0,
|
|
371
|
+
const client = new (0, _chunk63S7X326js.DeeplineClient)();
|
|
372
372
|
const result = await client.db.query(query);
|
|
373
373
|
renderDbQueryResult(result, query, {
|
|
374
374
|
format,
|
|
@@ -377,8 +377,8 @@ async function runDbQueryCommand(options) {
|
|
|
377
377
|
});
|
|
378
378
|
return 0;
|
|
379
379
|
} catch (error) {
|
|
380
|
-
if (error instanceof
|
|
381
|
-
|
|
380
|
+
if (error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkNF4V5DTYjs.shouldEmitJson.call(void 0, ))) {
|
|
381
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
382
382
|
{
|
|
383
383
|
ok: false,
|
|
384
384
|
error: {
|
|
@@ -426,15 +426,15 @@ function dbRepairPlainText(result) {
|
|
|
426
426
|
async function handleDbRepair(args) {
|
|
427
427
|
const providerIndex = args.indexOf("--provider");
|
|
428
428
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
429
|
-
const jsonOutput =
|
|
430
|
-
const client = new (0,
|
|
429
|
+
const jsonOutput = _chunkNF4V5DTYjs.argsWantJson.call(void 0, args);
|
|
430
|
+
const client = new (0, _chunk63S7X326js.DeeplineClient)();
|
|
431
431
|
let result;
|
|
432
432
|
try {
|
|
433
433
|
result = await client.repairIngestionStorage(
|
|
434
434
|
provider ? { provider } : void 0
|
|
435
435
|
);
|
|
436
436
|
} catch (error) {
|
|
437
|
-
if (error instanceof
|
|
437
|
+
if (error instanceof _chunkPPDBRJRWjs.DeeplineError && error.statusCode === 403) {
|
|
438
438
|
console.error(
|
|
439
439
|
"deepline db repair requires org admin. Ask an organization admin to run it."
|
|
440
440
|
);
|
|
@@ -443,7 +443,7 @@ async function handleDbRepair(args) {
|
|
|
443
443
|
console.error(errorMessage2(error));
|
|
444
444
|
return 1;
|
|
445
445
|
}
|
|
446
|
-
|
|
446
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
447
447
|
{
|
|
448
448
|
command: "db repair",
|
|
449
449
|
status: result.status,
|
|
@@ -503,7 +503,8 @@ Examples:
|
|
|
503
503
|
--format csv and --format markdown are explicit data/display formats and can
|
|
504
504
|
be written directly with --out.
|
|
505
505
|
Effects: SQL may mutate customer storage; --out writes one local export. SQL does not spend credits.
|
|
506
|
-
SQL is attempted once, without
|
|
506
|
+
Unkeyed SQL is attempted once, without retries or URL failover; a lost response means unknown outcome.
|
|
507
|
+
Keyed SQL can recover only with the same operation key and the server's matching atomic acknowledgement.
|
|
507
508
|
For recoverable writes, choose --operation-key before execution. Recover with the original key,
|
|
508
509
|
SQL and options; a new key starts a new operation. A key added afterward cannot recover unkeyed SQL.
|
|
509
510
|
--dry-run shows this plan without executing SQL, exporting data, or maintaining the installation.
|
|
@@ -523,10 +524,7 @@ Examples:
|
|
|
523
524
|
).option("--max-rows <n>", "Maximum returned rows").option(
|
|
524
525
|
"--operation-key <key>",
|
|
525
526
|
"Recover this intended transactional SQL operation; separate intentions need separate keys"
|
|
526
|
-
).option("--format <format>", "Output format: table, json, csv, or markdown").option("--out <path>", "Write csv or markdown output to a file").option(
|
|
527
|
-
"--json",
|
|
528
|
-
"Emit raw JSON response"
|
|
529
|
-
).action(async (options) => {
|
|
527
|
+
).option("--format <format>", "Output format: table, json, csv, or markdown").option("--out <path>", "Write csv or markdown output to a file").option("--json", "Emit raw JSON response").action(async (options) => {
|
|
530
528
|
process.exitCode = await runDbQueryCommand(options);
|
|
531
529
|
});
|
|
532
530
|
db.command("repair").description(
|
|
@@ -546,10 +544,7 @@ Examples:
|
|
|
546
544
|
).option(
|
|
547
545
|
"--provider <provider>",
|
|
548
546
|
"Limit materialized-table repair to one provider"
|
|
549
|
-
).option(
|
|
550
|
-
"--json",
|
|
551
|
-
"Emit raw JSON response"
|
|
552
|
-
).action(async (options) => {
|
|
547
|
+
).option("--json", "Emit raw JSON response").action(async (options) => {
|
|
553
548
|
process.exitCode = await handleDbRepair([
|
|
554
549
|
...options.provider ? ["--provider", options.provider] : [],
|
|
555
550
|
...options.json ? ["--json"] : []
|