deepline 0.3.525 → 0.3.527
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 +98 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +14 -5
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure-class.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +24 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +35 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-inventory.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +39 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +50 -8
- package/dist/cli/auth-C7BBYIQD.js +43 -0
- package/dist/cli/{auth-TH3VGYBK.mjs → auth-LRMMQFJ4.mjs} +5 -5
- package/dist/cli/{billing-TWKVUFU2.js → billing-M76MMWZB.js} +82 -82
- package/dist/cli/{billing-CMHFI2LN.mjs → billing-WZZDXVRJ.mjs} +7 -7
- package/dist/cli/{chunk-CQSANB3V.js → chunk-2A6IRSE6.js} +5 -5
- package/dist/cli/{chunk-CZNEQMJR.mjs → chunk-2L3HVEBM.mjs} +1 -1
- package/dist/cli/{chunk-DYS3KWYF.js → chunk-3L2DNG5X.js} +11 -11
- package/dist/cli/{chunk-2WFVLOB7.js → chunk-3PQDEBO6.js} +1 -1
- package/dist/cli/{chunk-KPINGHIF.mjs → chunk-4YN7DZEA.mjs} +2 -2
- package/dist/cli/{chunk-OXFIJYN3.mjs → chunk-5YR6CDJ2.mjs} +6 -6
- package/dist/cli/{chunk-5JFAQUZS.js → chunk-66YLAQ2X.js} +26 -26
- package/dist/cli/{chunk-U4M32NFS.mjs → chunk-77VNC2KF.mjs} +1 -1
- package/dist/cli/{chunk-TFEGJEYO.js → chunk-7DPWGAOU.js} +3 -3
- package/dist/cli/{chunk-WEYFSBAD.mjs → chunk-7FCD34YS.mjs} +18 -11
- package/dist/cli/{chunk-CLTL7ZJI.mjs → chunk-AXFHQWGA.mjs} +1 -1
- package/dist/cli/{chunk-4UWXFXQF.js → chunk-C7A44BZ7.js} +3 -3
- package/dist/cli/{chunk-LAMGJQDY.mjs → chunk-E4TEZE62.mjs} +2 -2
- package/dist/cli/{chunk-S5LUY3KJ.js → chunk-EOL7PXLW.js} +7 -7
- package/dist/cli/{chunk-N4MMU3QF.js → chunk-ETXQZGQU.js} +16 -16
- package/dist/cli/{chunk-IMO3HXWZ.mjs → chunk-GIRMVMXP.mjs} +1 -1
- package/dist/cli/{chunk-YC7FKAJ4.mjs → chunk-HA2J2OAS.mjs} +10 -10
- package/dist/cli/{chunk-NRBCETWL.js → chunk-HB3YUHEL.js} +44 -44
- package/dist/cli/{chunk-P62LON53.js → chunk-HQZLTK3P.js} +2 -2
- package/dist/cli/{chunk-UQYKSOGO.mjs → chunk-JEIGNX3G.mjs} +5 -5
- package/dist/cli/{chunk-LE537GBC.js → chunk-JSEISVAZ.js} +138 -78
- package/dist/cli/{chunk-GCLNX72G.mjs → chunk-JSVHBJE2.mjs} +2 -2
- package/dist/cli/{chunk-ETHVJ2ZE.mjs → chunk-KDFUQRVU.mjs} +1 -1
- package/dist/cli/{chunk-QR7VYYNM.js → chunk-LHMHUA5D.js} +7 -7
- package/dist/cli/{chunk-ZWFTHEPT.mjs → chunk-M45S7JAY.mjs} +2 -2
- package/dist/cli/{chunk-WGRDOPAK.mjs → chunk-MIL5YDKZ.mjs} +2 -2
- package/dist/cli/{chunk-TXSBPBHB.mjs → chunk-MMM2WMTF.mjs} +5 -5
- package/dist/cli/{chunk-EP6YH6QJ.mjs → chunk-NVII3RWQ.mjs} +2 -2
- package/dist/cli/{chunk-V2GN4PLK.js → chunk-OKRBGXDI.js} +5 -5
- package/dist/cli/{chunk-LXKH4MKH.js → chunk-OLSATEDQ.js} +6 -6
- package/dist/cli/{chunk-V65J64FL.js → chunk-OXHY3LD3.js} +53 -53
- package/dist/cli/{chunk-OWQF6WVH.mjs → chunk-P5ZU5ZHA.mjs} +61 -1
- package/dist/cli/{chunk-RMZ6CISE.mjs → chunk-QKKT5G4K.mjs} +3 -3
- package/dist/cli/{chunk-JVWSIA2V.mjs → chunk-QKY3H3HA.mjs} +4 -4
- package/dist/cli/{chunk-WA3FG7DH.js → chunk-R6IWWPY7.js} +14 -14
- package/dist/cli/{chunk-MRUFGOJR.js → chunk-RGL2YGJZ.js} +2 -2
- package/dist/cli/{chunk-7C4F4TLR.mjs → chunk-RMCKTV4R.mjs} +1 -1
- package/dist/cli/{chunk-NO4URKKT.mjs → chunk-RTPLRMEB.mjs} +5 -5
- package/dist/cli/{chunk-ESWM2JW4.js → chunk-SRQQAUXN.js} +2 -2
- package/dist/cli/{chunk-CKTRQSRA.js → chunk-UAQ7ZWRP.js} +22 -22
- package/dist/cli/{chunk-7OF3A4KJ.mjs → chunk-UJHS2O5O.mjs} +84 -57
- package/dist/cli/{chunk-VYIAWAKJ.mjs → chunk-UKOG6PCB.mjs} +1 -1
- package/dist/cli/{chunk-UXF3ODJJ.mjs → chunk-VTXBV4AX.mjs} +1 -1
- package/dist/cli/{chunk-M43ZYNDA.mjs → chunk-VV2AFJ3I.mjs} +5 -5
- package/dist/cli/{chunk-CWRL6IQP.js → chunk-WL6GAZBD.js} +18 -11
- package/dist/cli/{chunk-NB2ECLQE.js → chunk-XI47UAVU.js} +9 -9
- package/dist/cli/{chunk-AVDEYOVP.js → chunk-XYG4IOJK.js} +98 -98
- package/dist/cli/{chunk-KEZ3KBWW.js → chunk-YJ4YVFXC.js} +97 -70
- package/dist/cli/{chunk-5BSGWIQD.mjs → chunk-YKPMIJJ2.mjs} +2 -2
- package/dist/cli/{chunk-MHBSRNI7.js → chunk-YSDPYQBH.js} +41 -41
- package/dist/cli/{chunk-KBOSALBI.js → chunk-YUYDP2EG.js} +6 -6
- package/dist/cli/{chunk-TO72GW5I.js → chunk-ZHY7AY5V.js} +16 -16
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-OO554TPX.mjs → csv-FEFNXZF7.mjs} +4 -4
- package/dist/cli/{csv-5JHWVJ5N.js → csv-IRP6VT7Q.js} +13 -13
- package/dist/cli/{db-SQKJ6RKU.mjs → db-IHECMWZ3.mjs} +6 -6
- package/dist/cli/{db-CYQJ4OXF.js → db-Y5VNPNRD.js} +27 -27
- package/dist/cli/describe-MNJVJHRE.js +50 -0
- package/dist/cli/{describe-N7AKTUQV.mjs → describe-XCVC2WLL.mjs} +18 -18
- package/dist/cli/{executions-F34DORW6.mjs → executions-3FWZYUJV.mjs} +6 -6
- package/dist/cli/{executions-K7EGCRKX.js → executions-QH3KJ6MA.js} +8 -8
- package/dist/cli/{feedback-NOQVCA3Q.js → feedback-BGHWMOLH.js} +65 -17
- package/dist/cli/{feedback-GQHKCS66.mjs → feedback-F3OZXOPM.mjs} +61 -13
- package/dist/cli/git-MDOHEW5J.js +25 -0
- package/dist/cli/{git-2EEITXDB.mjs → git-RWPH3D75.mjs} +5 -5
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-JHMY5XRB.mjs → legacy-noops-5ADSTBJ5.mjs} +6 -6
- package/dist/cli/{legacy-noops-RFNHQ7RG.js → legacy-noops-G6CYD5LM.js} +9 -9
- package/dist/cli/{monitors-RDMP6SPZ.mjs → monitors-AFNAU3A2.mjs} +7 -7
- package/dist/cli/{monitors-UKRZ4BDK.js → monitors-VZCBZO26.js} +100 -100
- package/dist/cli/{org-RF3G4KMB.mjs → org-JVLYTU24.mjs} +6 -6
- package/dist/cli/{org-OX7TYTHV.js → org-X4QRYBC4.js} +86 -86
- package/dist/cli/{pages-FBM3MGSP.mjs → pages-VELKZKBL.mjs} +6 -6
- package/dist/cli/{pages-MKQT5LFV.js → pages-YMM4KBW5.js} +18 -18
- package/dist/cli/{play-OOVX2DMV.js → play-J7DEBHI7.js} +317 -317
- package/dist/cli/{play-YWC2UORM.mjs → play-MIY6BYRB.mjs} +18 -18
- package/dist/cli/{providers-3PEQESIU.mjs → providers-2H3W3W7G.mjs} +6 -6
- package/dist/cli/{providers-2CGZYLER.js → providers-TOUB7Y2A.js} +9 -9
- package/dist/cli/{quickstart-KVB36SOW.mjs → quickstart-GKAS5265.mjs} +4 -4
- package/dist/cli/{quickstart-6AANHKQZ.js → quickstart-LHY2LN3P.js} +6 -6
- package/dist/cli/{run-QC23NRKO.mjs → run-KYGNOWYD.mjs} +23 -23
- package/dist/cli/{run-NJ7WV5TK.js → run-QCAVDPE5.js} +41 -41
- package/dist/cli/search-G67CEHR7.js +33 -0
- package/dist/cli/{search-7BMFFZI2.mjs → search-YPGAIFDX.mjs} +8 -8
- package/dist/cli/{search-output-XC2AVBFX.js → search-output-ASELNQ2U.js} +6 -6
- package/dist/cli/{search-output-CALZ4ZI2.mjs → search-output-OOC3VK4T.mjs} +4 -4
- package/dist/cli/{secrets-VHU4B2D4.js → secrets-KX3TQB4R.js} +15 -15
- package/dist/cli/{secrets-7ZHA57DI.mjs → secrets-VJ4XYSMZ.mjs} +6 -6
- package/dist/cli/sessions-KUN7H7E5.mjs +22 -0
- package/dist/cli/sessions-QILPX4XQ.js +22 -0
- package/dist/cli/{settings-WV77QJGD.js → settings-5NIF4BU7.js} +86 -86
- package/dist/cli/{settings-AVY4NNHI.mjs → settings-JKFYZ2IT.mjs} +13 -13
- package/dist/cli/{setup-AOUJ3RMU.mjs → setup-5AX3TN6G.mjs} +10 -10
- package/dist/cli/{setup-GE5TLTC4.js → setup-MYV3IHPS.js} +50 -50
- package/dist/cli/{skills-FVWO2G66.mjs → skills-JLS4CINQ.mjs} +8 -8
- package/dist/cli/skills-NG32XTZI.js +37 -0
- package/dist/cli/tools-OZG3V77R.js +57 -0
- package/dist/cli/{tools-URE655B4.mjs → tools-VBYKD3MJ.mjs} +17 -17
- package/dist/cli/{update-5B4G4345.mjs → update-QWAIVJRI.mjs} +10 -10
- package/dist/cli/update-YL5WVSKU.js +35 -0
- package/dist/cli/{views-GSECJ5IK.mjs → views-TBWGZAVZ.mjs} +6 -6
- package/dist/cli/{views-IC762HEQ.js → views-ZW56JZB5.js} +18 -18
- package/dist/cli/{workflow-EME7ZEOV.js → workflow-EKSZST6M.js} +17 -17
- package/dist/cli/{workflow-6UQM565I.mjs → workflow-X7UQPJMQ.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +107 -106
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-K7PMRXNG.js +0 -43
- package/dist/cli/describe-PASXOL3R.js +0 -50
- package/dist/cli/git-UU4YFJ2Q.js +0 -25
- package/dist/cli/search-NH4DTXUK.js +0 -33
- package/dist/cli/sessions-2TE5JWVP.js +0 -18
- package/dist/cli/sessions-YYULWFZE.mjs +0 -18
- package/dist/cli/skills-OL7LD6QX.js +0 -37
- package/dist/cli/tools-VQ5JO6DI.js +0 -57
- package/dist/cli/update-7ZOIOTZN.js +0 -35
|
@@ -1,13 +1,13 @@
|
|
|
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 _chunk7DPWGAOUjs = require('./chunk-7DPWGAOU.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkJSEISVAZjs = require('./chunk-JSEISVAZ.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
@@ -150,7 +150,7 @@ function buildEnvironmentContext() {
|
|
|
150
150
|
node_version: process.version,
|
|
151
151
|
runtime: "Node.js",
|
|
152
152
|
hostname: _os.hostname.call(void 0, ),
|
|
153
|
-
agent_runtime:
|
|
153
|
+
agent_runtime: _chunkJSEISVAZjs.detectAgentRuntime.call(void 0, )
|
|
154
154
|
};
|
|
155
155
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
156
156
|
const normalized = _optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6[key], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);
|
|
@@ -171,18 +171,18 @@ function buildEnvironmentContext() {
|
|
|
171
171
|
return context;
|
|
172
172
|
}
|
|
173
173
|
function failureReportHeaders(apiKey) {
|
|
174
|
-
const agentSessionId =
|
|
174
|
+
const agentSessionId = _chunkJSEISVAZjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
175
175
|
return {
|
|
176
|
-
...
|
|
176
|
+
..._chunkJSEISVAZjs.deploymentProtectionHeaders.call(void 0, ),
|
|
177
177
|
...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
|
|
178
178
|
Authorization: `Bearer ${apiKey}`,
|
|
179
179
|
"Content-Type": "application/json",
|
|
180
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
180
|
+
"User-Agent": `deepline-ts-sdk/${_chunkJSEISVAZjs.SDK_VERSION}`,
|
|
181
181
|
"X-Deepline-Client-Family": "sdk",
|
|
182
182
|
"X-Deepline-CLI-Family": "sdk",
|
|
183
|
-
"X-Deepline-Agent-Runtime":
|
|
184
|
-
"X-Deepline-CLI-Version":
|
|
185
|
-
"X-Deepline-SDK-Version":
|
|
183
|
+
"X-Deepline-Agent-Runtime": _chunkJSEISVAZjs.detectAgentRuntime.call(void 0, ),
|
|
184
|
+
"X-Deepline-CLI-Version": _chunkJSEISVAZjs.SDK_VERSION,
|
|
185
|
+
"X-Deepline-SDK-Version": _chunkJSEISVAZjs.SDK_VERSION
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
async function postFailureReport(input) {
|
|
@@ -210,7 +210,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
210
210
|
if (isFailureReportingDisabled()) return false;
|
|
211
211
|
let apiKey = "";
|
|
212
212
|
try {
|
|
213
|
-
apiKey =
|
|
213
|
+
apiKey = _chunk7DPWGAOUjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
214
214
|
} catch (e2) {
|
|
215
215
|
return false;
|
|
216
216
|
}
|
|
@@ -237,7 +237,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
237
237
|
failure_code: failureCode2,
|
|
238
238
|
failure_stage: failureStage,
|
|
239
239
|
error_body: "Automatic Deepline skills installation failed.",
|
|
240
|
-
cli_version:
|
|
240
|
+
cli_version: _chunkJSEISVAZjs.SDK_VERSION,
|
|
241
241
|
context: {
|
|
242
242
|
environment: buildEnvironmentContext(),
|
|
243
243
|
skills_sync: {
|
|
@@ -357,7 +357,7 @@ function buildFailureReport(input) {
|
|
|
357
357
|
failure_kind: failureKind,
|
|
358
358
|
failure_code: code,
|
|
359
359
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
360
|
-
cli_version:
|
|
360
|
+
cli_version: _chunkJSEISVAZjs.SDK_VERSION,
|
|
361
361
|
context: {
|
|
362
362
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
363
363
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -377,8 +377,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
377
377
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
378
378
|
const exitCode = resolvedExitCode(input);
|
|
379
379
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
380
|
-
const baseUrl =
|
|
381
|
-
const apiKey =
|
|
380
|
+
const baseUrl = _chunk7DPWGAOUjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
381
|
+
const apiKey = _chunk7DPWGAOUjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
382
382
|
if (!apiKey) return false;
|
|
383
383
|
return postFailureReport({
|
|
384
384
|
baseUrl,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEOL7PXLWjs = require('./chunk-EOL7PXLW.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/maintenance-policy.ts
|
|
6
6
|
var _commander = require('commander');
|
|
@@ -33,7 +33,7 @@ function recordCliTrace(event) {
|
|
|
33
33
|
sinceStartMs: now - cliTraceStartedAt,
|
|
34
34
|
...event
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
_chunkEOL7PXLWjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
async function traceCliSpan(phase, fields, run) {
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.527",
|
|
53
53
|
updateSummary: {
|
|
54
54
|
introducedIn: "0.3.90",
|
|
55
55
|
summary: "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."
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KDFUQRVU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runSkillsCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QKY3H3HA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveShellSpawn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VV2AFJ3I.mjs";
|
|
11
11
|
import {
|
|
12
12
|
printCommandEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JSVHBJE2.mjs";
|
|
14
14
|
import {
|
|
15
15
|
autoDetectBaseUrl
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-77VNC2KF.mjs";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHB3YUHELjs = require('./chunk-HB3YUHEL.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/npm-script-policy.ts
|
|
6
6
|
var _child_process = require('child_process');
|
|
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
|
|
|
13
13
|
}
|
|
14
14
|
function readNpmVersion(env) {
|
|
15
15
|
try {
|
|
16
|
-
const plan =
|
|
16
|
+
const plan = _chunkHB3YUHELjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
|
|
17
17
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
18
18
|
encoding: "utf8",
|
|
19
19
|
env,
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkZHY7AY5Vjs = require('./chunk-ZHY7AY5V.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkHB3YUHELjs = require('./chunk-HB3YUHEL.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkEOL7PXLWjs = require('./chunk-EOL7PXLW.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk7DPWGAOUjs = require('./chunk-7DPWGAOU.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkJSEISVAZjs = require('./chunk-JSEISVAZ.js');
|
|
22
22
|
|
|
23
23
|
// src/cli/compatibility-catalog.ts
|
|
24
24
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -45,7 +45,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
45
45
|
async function reportAutoUpdateEvent(input) {
|
|
46
46
|
let apiKey = "";
|
|
47
47
|
try {
|
|
48
|
-
apiKey =
|
|
48
|
+
apiKey = _chunk7DPWGAOUjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
49
49
|
} catch (e2) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
@@ -61,15 +61,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
61
61
|
headers: {
|
|
62
62
|
Authorization: `Bearer ${apiKey}`,
|
|
63
63
|
"Content-Type": "application/json",
|
|
64
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
64
|
+
"User-Agent": `deepline-ts-sdk/${_chunkJSEISVAZjs.SDK_VERSION}`,
|
|
65
65
|
"X-Deepline-Client-Family": "sdk",
|
|
66
66
|
"X-Deepline-CLI-Family": "sdk",
|
|
67
|
-
"X-Deepline-CLI-Version":
|
|
68
|
-
"X-Deepline-SDK-Version":
|
|
67
|
+
"X-Deepline-CLI-Version": _chunkJSEISVAZjs.SDK_VERSION,
|
|
68
|
+
"X-Deepline-SDK-Version": _chunkJSEISVAZjs.SDK_VERSION
|
|
69
69
|
},
|
|
70
70
|
body: JSON.stringify({
|
|
71
71
|
event: input.event,
|
|
72
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
72
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkJSEISVAZjs.SDK_VERSION,
|
|
73
73
|
target_version: input.response.latest,
|
|
74
74
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
75
75
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -88,13 +88,13 @@ function envTruthy(name) {
|
|
|
88
88
|
return value === "1" || value === "true" || value === "yes";
|
|
89
89
|
}
|
|
90
90
|
function shouldSkipSelfUpdate(policy) {
|
|
91
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
91
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkZHY7AY5Vjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkHB3YUHELjs.isCiEnvironment.call(void 0, );
|
|
92
92
|
}
|
|
93
93
|
function isDowngradeAutoUpdateResponse(response) {
|
|
94
94
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
95
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
95
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkJSEISVAZjs.SDK_VERSION;
|
|
96
96
|
if (!target) return false;
|
|
97
|
-
return
|
|
97
|
+
return _chunkZHY7AY5Vjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
98
98
|
}
|
|
99
99
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
100
100
|
return new Promise((resolve) => {
|
|
@@ -147,7 +147,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
147
147
|
}
|
|
148
148
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
149
149
|
const target = response.latest;
|
|
150
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
150
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkJSEISVAZjs.SDK_VERSION;
|
|
151
151
|
process.stderr.write(
|
|
152
152
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
153
153
|
`
|
|
@@ -155,21 +155,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
157
157
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
158
|
-
const plan =
|
|
158
|
+
const plan = _chunkZHY7AY5Vjs.resolveUpdatePlan.call(void 0, {
|
|
159
159
|
packageSpec,
|
|
160
160
|
requireVerifiedNpmOwnership: true,
|
|
161
161
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
162
162
|
});
|
|
163
|
-
if (!
|
|
163
|
+
if (!_chunkZHY7AY5Vjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
164
164
|
return false;
|
|
165
165
|
}
|
|
166
166
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
167
167
|
deferredAutoUpdate = async () => {
|
|
168
168
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
169
169
|
};
|
|
170
|
-
if (
|
|
170
|
+
if (_chunkEOL7PXLWjs.isJsonOutputMode.call(void 0, )) {
|
|
171
171
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
172
|
-
|
|
172
|
+
_chunkEOL7PXLWjs.addJsonNotice.call(void 0, {
|
|
173
173
|
code: "sdk_update_queued",
|
|
174
174
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
175
175
|
});
|
|
@@ -182,7 +182,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
182
182
|
return true;
|
|
183
183
|
}
|
|
184
184
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
185
|
-
if (!
|
|
185
|
+
if (!_chunkZHY7AY5Vjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
186
186
|
const autoUpdate = response.auto_update;
|
|
187
187
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
188
188
|
process.stderr.write(
|
|
@@ -195,7 +195,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
195
195
|
event: "started",
|
|
196
196
|
installKind: plan.kind
|
|
197
197
|
});
|
|
198
|
-
const updateResult = await
|
|
198
|
+
const updateResult = await _chunkZHY7AY5Vjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
199
199
|
if (updateResult.status === "skipped_previous_failure") {
|
|
200
200
|
void reportAutoUpdateEvent({
|
|
201
201
|
baseUrl,
|
|
@@ -233,7 +233,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
233
233
|
exitCode: 0
|
|
234
234
|
});
|
|
235
235
|
try {
|
|
236
|
-
await
|
|
236
|
+
await _chunkHB3YUHELjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
237
237
|
mode: "detached",
|
|
238
238
|
update: _optionalChain([response, 'access', _36 => _36.skills, 'optionalAccess', _37 => _37.requires_cli_update]) ? void 0 : response.skills,
|
|
239
239
|
afterCliUpdate: {
|
|
@@ -260,7 +260,7 @@ var _crypto = require('crypto');
|
|
|
260
260
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
261
261
|
var activeToolExecuteCommand = null;
|
|
262
262
|
function progressLine(line) {
|
|
263
|
-
if (!
|
|
263
|
+
if (!_chunkEOL7PXLWjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
264
264
|
}
|
|
265
265
|
function beginToolExecuteCommand() {
|
|
266
266
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rejectRestrictedFeedback
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UKOG6PCB.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getAuthedHttpClient,
|
|
6
6
|
printCommandEnvelope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JSVHBJE2.mjs";
|
|
8
8
|
import {
|
|
9
|
-
agentSessionIdFromEnvironment
|
|
10
|
-
|
|
9
|
+
agentSessionIdFromEnvironment,
|
|
10
|
+
claudeProjectsRoots,
|
|
11
|
+
coworkTranscriptFromEnvironment
|
|
12
|
+
} from "./chunk-P5ZU5ZHA.mjs";
|
|
11
13
|
|
|
12
14
|
// src/cli/commands/sessions.ts
|
|
13
15
|
import {
|
|
@@ -48,14 +50,17 @@ function detectShellContext() {
|
|
|
48
50
|
cwd: process.cwd()
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
|
-
function claudeProjectsRoot() {
|
|
52
|
-
return join(homeDir(), ".claude", "projects");
|
|
53
|
-
}
|
|
54
53
|
function codexSessionsRoot() {
|
|
55
54
|
return join(homeDir(), ".codex", "sessions");
|
|
56
55
|
}
|
|
57
56
|
function listClaudeSessionFiles() {
|
|
58
|
-
const
|
|
57
|
+
const files = [];
|
|
58
|
+
for (const root of claudeProjectsRoots()) {
|
|
59
|
+
files.push(...listClaudeSessionFilesIn(root));
|
|
60
|
+
}
|
|
61
|
+
return files;
|
|
62
|
+
}
|
|
63
|
+
function listClaudeSessionFilesIn(root) {
|
|
59
64
|
if (!existsSync(root)) return [];
|
|
60
65
|
const projectDirs = readDirectoryNames(root);
|
|
61
66
|
const files = [];
|
|
@@ -147,10 +152,22 @@ function currentSessionFile(agent) {
|
|
|
147
152
|
agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
|
|
148
153
|
);
|
|
149
154
|
const cwd = process.cwd();
|
|
150
|
-
|
|
155
|
+
const named = newestFirst.find(
|
|
156
|
+
(candidate) => candidate.sessionId === sessionId
|
|
157
|
+
);
|
|
158
|
+
if (named) return named;
|
|
159
|
+
const cowork = agent === "codex" ? null : coworkTranscriptFromEnvironment();
|
|
160
|
+
const coworkStat = cowork ? statIfReadable(cowork.filePath) : null;
|
|
161
|
+
if (cowork && coworkStat) {
|
|
162
|
+
return { agent: "claude", ...cowork, mtimeMs: coworkStat.mtimeMs };
|
|
163
|
+
}
|
|
164
|
+
return newestFirst.find(
|
|
151
165
|
(candidate) => sessionStartedInDirectory(candidate, cwd)
|
|
152
166
|
) ?? newestFirst[0] ?? null;
|
|
153
167
|
}
|
|
168
|
+
function feedbackAgentSessionId(agentRuntime) {
|
|
169
|
+
return agentSessionIdFromEnvironment(process.env, agentRuntime) ?? (agentRuntime === "claude_cowork" || agentRuntime === "claude_code" ? coworkTranscriptFromEnvironment()?.sessionId ?? null : null);
|
|
170
|
+
}
|
|
154
171
|
function sessionStartedInDirectory(candidate, cwd) {
|
|
155
172
|
if (candidate.agent === "claude") {
|
|
156
173
|
return basename(dirname(candidate.filePath)) === cwd.replace(/[^a-zA-Z0-9]/g, "-");
|
|
@@ -198,9 +215,10 @@ function readCodexSessionId(filePath) {
|
|
|
198
215
|
return null;
|
|
199
216
|
}
|
|
200
217
|
function sessionSearchDescription(agent) {
|
|
201
|
-
|
|
218
|
+
const claude = claudeProjectsRoots().map((root) => join(root, "*", "<session-id>.jsonl")).join(", ");
|
|
219
|
+
if (agent === "claude") return claude;
|
|
202
220
|
if (agent === "codex") return "~/.codex/sessions/**/*.jsonl";
|
|
203
|
-
return
|
|
221
|
+
return `${claude} or ~/.codex/sessions/**/*.jsonl`;
|
|
204
222
|
}
|
|
205
223
|
function parseSessionAgent(value) {
|
|
206
224
|
const normalized = String(value || "auto").trim().toLowerCase();
|
|
@@ -479,33 +497,57 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
479
497
|
});
|
|
480
498
|
}
|
|
481
499
|
}
|
|
482
|
-
|
|
500
|
+
return await uploadPayload("/api/v2/cli/send-session/finalize", {
|
|
483
501
|
upload_id: uploadId,
|
|
484
502
|
session_ids: sessions.map((session) => session.sessionId),
|
|
485
503
|
labels: sessions.map((session) => session.label),
|
|
486
504
|
environments: sessions.map(() => detectShellContext()),
|
|
487
505
|
...options.rating ? { rating: options.rating } : {}
|
|
488
506
|
});
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
507
|
+
}
|
|
508
|
+
async function uploadBuiltSessions(built, options) {
|
|
509
|
+
if (built.some((session) => session.needsChunking)) {
|
|
510
|
+
return {
|
|
511
|
+
response: await uploadChunkedSessions(built, { rating: options.rating }),
|
|
512
|
+
chunked: true
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
const { rating } = options;
|
|
516
|
+
const response = built.length === 1 && !options.labeled ? await uploadPayload("/api/v2/cli/send-session", {
|
|
517
|
+
session_id: built[0]?.sessionId,
|
|
518
|
+
content: built[0]?.encodedContent,
|
|
519
|
+
environment: detectShellContext(),
|
|
520
|
+
...rating ? { rating } : {}
|
|
521
|
+
}) : await uploadPayload("/api/v2/cli/send-session", {
|
|
522
|
+
sessions: built.map((session) => ({
|
|
523
|
+
session_id: session.sessionId,
|
|
524
|
+
content: session.encodedContent,
|
|
525
|
+
label: session.label,
|
|
526
|
+
environment: detectShellContext()
|
|
527
|
+
})),
|
|
528
|
+
environment: detectShellContext(),
|
|
529
|
+
...rating ? { rating } : {}
|
|
530
|
+
});
|
|
531
|
+
return { response, chunked: false };
|
|
532
|
+
}
|
|
533
|
+
function buildSession(target) {
|
|
534
|
+
return {
|
|
535
|
+
...target,
|
|
536
|
+
...buildSessionUploadContent(readFileSync(target.filePath))
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
async function uploadAgentSession(agentRuntime) {
|
|
540
|
+
const sessionId = feedbackAgentSessionId(agentRuntime);
|
|
541
|
+
if (!sessionId) {
|
|
542
|
+
throw new Error(
|
|
543
|
+
`No ${agentRuntime} session was found to attach. To find one, Deepline needs a session ID set by the agent or a Claude Cowork session.`
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
const agent = agentRuntime === "codex" ? "codex" : agentRuntime.startsWith("claude_") ? "claude" : "auto";
|
|
547
|
+
const [target] = resolveSessionTargets({ sessionIds: [sessionId], agent });
|
|
548
|
+
if (!target) throw new Error(`Session file not found: ${sessionId}`);
|
|
549
|
+
await uploadBuiltSessions([buildSession(target)], { labeled: false });
|
|
550
|
+
return target.sessionId;
|
|
509
551
|
}
|
|
510
552
|
async function handleSessionsSend(options) {
|
|
511
553
|
if (rejectRestrictedFeedback(options)) return;
|
|
@@ -546,28 +588,10 @@ async function handleSessionsSend(options) {
|
|
|
546
588
|
currentSession: options.currentSession,
|
|
547
589
|
agent: options.agent
|
|
548
590
|
});
|
|
549
|
-
const built = targets.map(
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
if (built.some((session) => session.needsChunking)) {
|
|
554
|
-
await uploadChunkedSessions(built, { json: options.json, rating });
|
|
555
|
-
return;
|
|
556
|
-
}
|
|
557
|
-
const response = built.length === 1 && !options.label?.length ? await uploadPayload("/api/v2/cli/send-session", {
|
|
558
|
-
session_id: built[0]?.sessionId,
|
|
559
|
-
content: built[0]?.encodedContent,
|
|
560
|
-
environment: detectShellContext(),
|
|
561
|
-
...rating ? { rating } : {}
|
|
562
|
-
}) : await uploadPayload("/api/v2/cli/send-session", {
|
|
563
|
-
sessions: built.map((session) => ({
|
|
564
|
-
session_id: session.sessionId,
|
|
565
|
-
content: session.encodedContent,
|
|
566
|
-
label: session.label,
|
|
567
|
-
environment: detectShellContext()
|
|
568
|
-
})),
|
|
569
|
-
environment: detectShellContext(),
|
|
570
|
-
...rating ? { rating } : {}
|
|
591
|
+
const built = targets.map(buildSession);
|
|
592
|
+
const { response, chunked } = await uploadBuiltSessions(built, {
|
|
593
|
+
rating,
|
|
594
|
+
labeled: Boolean(options.label?.length)
|
|
571
595
|
});
|
|
572
596
|
const sessionIds = built.map((session) => session.sessionId);
|
|
573
597
|
printCommandEnvelope(
|
|
@@ -581,7 +605,7 @@ async function handleSessionsSend(options) {
|
|
|
581
605
|
{
|
|
582
606
|
title: "sessions send",
|
|
583
607
|
lines: [
|
|
584
|
-
`Session ${sessionIds.join(", ")} uploaded to #internal-reports.`
|
|
608
|
+
`Session ${sessionIds.join(", ")} uploaded to #internal-reports${chunked ? " (chunked)" : ""}.`
|
|
585
609
|
]
|
|
586
610
|
}
|
|
587
611
|
]
|
|
@@ -705,8 +729,9 @@ function registerSessionsCommands(program) {
|
|
|
705
729
|
`
|
|
706
730
|
Notes:
|
|
707
731
|
Session commands operate on local Claude and Codex JSONL files under
|
|
708
|
-
~/.claude/projects
|
|
709
|
-
|
|
732
|
+
~/.claude/projects (or $CLAUDE_CONFIG_DIR/projects, or a Claude Cowork
|
|
733
|
+
session's ~/mnt/.claude/projects) and ~/.codex/sessions. send uploads a
|
|
734
|
+
compacted transcript or file to Deepline. render writes a local HTML viewer.
|
|
710
735
|
|
|
711
736
|
Examples:
|
|
712
737
|
deepline sessions send --current-session
|
|
@@ -786,6 +811,8 @@ Examples:
|
|
|
786
811
|
}
|
|
787
812
|
|
|
788
813
|
export {
|
|
814
|
+
feedbackAgentSessionId,
|
|
815
|
+
uploadAgentSession,
|
|
789
816
|
registerSessionsCommands,
|
|
790
817
|
registerSessionSendRenderCommands
|
|
791
818
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveCliProgress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GIRMVMXP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
maybeReportAutomaticSkillsSyncFailure
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MIL5YDKZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_SKILL_AGENTS,
|
|
9
9
|
KNOWN_SKILL_AGENTS,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
sdkCliStateDirPath,
|
|
15
15
|
skillsAgentPathSegment,
|
|
16
16
|
writeSdkSkillsLocalVersion
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-77VNC2KF.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_API_CONTRACT,
|
|
20
20
|
SDK_API_MAJOR,
|
|
21
21
|
SDK_VERSION,
|
|
22
22
|
deploymentProtectionHeaders,
|
|
23
23
|
detectAgentRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-P5ZU5ZHA.mjs";
|
|
25
25
|
import {
|
|
26
26
|
SDK_RELEASE
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RMCKTV4R.mjs";
|
|
28
28
|
|
|
29
29
|
// src/compat.ts
|
|
30
30
|
import { randomUUID } from "crypto";
|
|
@@ -2117,10 +2117,13 @@ When:
|
|
|
2117
2117
|
succeeds, tell the user: "Session sent to Deepline. Rating: <rating>".
|
|
2118
2118
|
[[cli:
|
|
2119
2119
|
Input:
|
|
2120
|
-
--current-session (the calling agent's session, else the
|
|
2121
|
-
|
|
2122
|
-
optional --label), or --file
|
|
2123
|
-
|
|
2120
|
+
--current-session (the calling agent's session, else the Claude Cowork
|
|
2121
|
+
session this runs in, else the newest one started in this directory), or
|
|
2122
|
+
--session-id <uuid> (repeatable, each with an optional --label), or --file
|
|
2123
|
+
<path> for a raw file. Claude transcripts are found under
|
|
2124
|
+
$CLAUDE_CONFIG_DIR/projects, a Cowork session's ~/mnt/.claude/projects,
|
|
2125
|
+
and ~/.claude/projects. --agent auto|claude|codex limits where transcripts
|
|
2126
|
+
are looked for.
|
|
2124
2127
|
--rating good|poor|neutral, judged by outcome and not tone: good when the
|
|
2125
2128
|
user's goal was met without product problems; poor when it was missed, or
|
|
2126
2129
|
a product failure, bug, or avoidable friction (including a substantial
|
|
@@ -2135,10 +2138,6 @@ Cost:
|
|
|
2135
2138
|
Free.
|
|
2136
2139
|
Avoid:
|
|
2137
2140
|
The command is sessions, plural; the singular session form is the old one.
|
|
2138
|
-
In a Cowork sandbox the transcripts are mounted under
|
|
2139
|
-
~/mnt/.claude/projects: when no session files are found and that directory
|
|
2140
|
-
exists, link it to ~/.claude/projects and retry, or pass the newest
|
|
2141
|
-
transcript there with [[--file]].
|
|
2142
2141
|
`
|
|
2143
2142
|
},
|
|
2144
2143
|
"settings feedback": {
|
|
@@ -2160,7 +2159,9 @@ Cost:
|
|
|
2160
2159
|
core: `
|
|
2161
2160
|
Purpose:
|
|
2162
2161
|
Send a bug report or product feedback to the Deepline team. The calling
|
|
2163
|
-
agent's session id is attached, so a report can be matched to a transcript
|
|
2162
|
+
agent's session id is attached, so a report can be matched to a transcript,
|
|
2163
|
+
but the transcript itself is uploaded only with [[--attach-session]] or
|
|
2164
|
+
[[sessions send]]. Never tell the user a transcript is attached otherwise.
|
|
2164
2165
|
When:
|
|
2165
2166
|
Confirm the report text with the user before sending with [[--requested]].
|
|
2166
2167
|
When the feedback setting is off, send only if the user explicitly requests
|
|
@@ -2183,14 +2184,20 @@ Input:
|
|
|
2183
2184
|
--error-outcome terminal when an error stopped the task, continued when
|
|
2184
2185
|
work went on, including through a workaround; omit it when no error
|
|
2185
2186
|
occurred. Pass --requested when the user requested or approved the report.
|
|
2186
|
-
--
|
|
2187
|
+
--attach-session also uploads the calling agent's own session transcript
|
|
2188
|
+
(the session it names, or the Claude Cowork session) and links it; when
|
|
2189
|
+
none is found, nothing is sent. Pass it only when the user agreed to share
|
|
2190
|
+
the session. --json.
|
|
2187
2191
|
Put the evidence in the text. A slow run: the goal, the play and run id,
|
|
2188
2192
|
input size, observed duration, status changes or polling count, and what
|
|
2189
2193
|
you expected. Extra steps: the goal, the command path you took, the
|
|
2190
2194
|
detours, and the direct path you expected.
|
|
2191
2195
|
]]
|
|
2192
2196
|
Output (JSON):
|
|
2193
|
-
A confirmation envelope for the report
|
|
2197
|
+
A confirmation envelope for the report, with session_id (null when none
|
|
2198
|
+
was found), transcript_uploaded, and warnings. When an agent's session
|
|
2199
|
+
can't be found, a warning on stderr names the sessions send command that
|
|
2200
|
+
uploads the transcript.
|
|
2194
2201
|
Cost:
|
|
2195
2202
|
Free. A report does not authorize a paid reproduction or a session upload.
|
|
2196
2203
|
`
|