deepline 0.3.524 → 0.3.526
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/client-core.ts +8 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +14 -0
- package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +10 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +33 -5
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +38 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +94 -9
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure-class.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-retry-summary.ts +202 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +60 -8
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +112 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +39 -1
- 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 +52 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +10 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-retry-facts.ts +62 -0
- package/dist/cli/{auth-QXJMVLPN.mjs → auth-JATW5XZE.mjs} +5 -5
- package/dist/cli/auth-L2POG3LL.js +43 -0
- package/dist/cli/{billing-N5R4HTHT.js → billing-TSHBJIJS.js} +83 -83
- package/dist/cli/{billing-SNSIFM4B.mjs → billing-UT5LIESH.mjs} +8 -8
- package/dist/cli/{chunk-PFKWKWUJ.mjs → chunk-26ULNPQ7.mjs} +2 -2
- package/dist/cli/{chunk-OQ5G7RFQ.mjs → chunk-2GJW4RAQ.mjs} +70 -3
- package/dist/cli/{chunk-HLAFGQPV.mjs → chunk-2JNX3MDG.mjs} +5 -2
- package/dist/cli/{chunk-V7KUBDEB.js → chunk-3MYI3IXW.js} +144 -141
- package/dist/cli/{chunk-WOEPDSO3.js → chunk-3ZEV5BS5.js} +26 -26
- package/dist/cli/{chunk-ATATJNJ6.js → chunk-46HEYGLY.js} +9 -9
- package/dist/cli/{chunk-I75VRGQG.js → chunk-477PXM65.js} +22 -22
- package/dist/cli/{chunk-RVHUW4TN.js → chunk-5YAJGRWB.js} +17 -17
- package/dist/cli/{chunk-T43FF5PF.mjs → chunk-6COGHW7B.mjs} +2 -2
- package/dist/cli/{chunk-V4RJ57MA.js → chunk-6DHEV6IA.js} +2 -2
- package/dist/cli/{chunk-VHTVXS5A.js → chunk-6H56LKJB.js} +16 -16
- package/dist/cli/{chunk-YKFW3NNA.mjs → chunk-6JMWATX5.mjs} +5 -5
- package/dist/cli/{chunk-II3BJKCH.mjs → chunk-77RAGJIZ.mjs} +2 -2
- package/dist/cli/{chunk-ITJ7NB2D.mjs → chunk-7AOFSZJM.mjs} +3 -1
- package/dist/cli/{chunk-OCT4SUJA.js → chunk-7COEN3IR.js} +146 -79
- package/dist/cli/{chunk-XURWFEXM.mjs → chunk-7FCD34YS.mjs} +31 -17
- package/dist/cli/{chunk-BXVYVIMB.js → chunk-B33J4YCC.js} +3 -3
- package/dist/cli/{chunk-RTDX5NNN.mjs → chunk-BFH3DJYV.mjs} +84 -57
- package/dist/cli/{chunk-GJYLC4JB.mjs → chunk-BNH4Y35W.mjs} +2 -2
- package/dist/cli/{chunk-GMO3JDZA.mjs → chunk-BVITYMBK.mjs} +2 -2
- package/dist/cli/{chunk-7QM6DNR4.js → chunk-BYEF4RBX.js} +11 -11
- package/dist/cli/{chunk-536TGWR6.mjs → chunk-C3EW6I65.mjs} +2 -2
- package/dist/cli/{chunk-HTYT2OHB.js → chunk-CDP3LMDT.js} +6 -6
- package/dist/cli/{chunk-YXVYPYIP.js → chunk-CYN2AHR6.js} +10 -10
- package/dist/cli/{chunk-CH7JVSA7.mjs → chunk-D2XMFXFM.mjs} +8 -8
- package/dist/cli/{chunk-2ZWNIS54.js → chunk-D5OEUPPM.js} +269 -269
- package/dist/cli/{chunk-FXTV5B3D.mjs → chunk-DY2AT3JQ.mjs} +12 -12
- package/dist/cli/{chunk-Z4MOEQSY.js → chunk-ED2N4NRI.js} +21 -21
- package/dist/cli/{chunk-RIX26ZJD.mjs → chunk-EEYZLTXX.mjs} +1 -1
- package/dist/cli/{chunk-7E6B7VMS.js → chunk-F5KFGF45.js} +5 -5
- package/dist/cli/{chunk-TZTWH53O.js → chunk-FMPGWAIR.js} +1 -1
- package/dist/cli/{chunk-R2VZVHJP.mjs → chunk-GESIFFQX.mjs} +1 -1
- package/dist/cli/{chunk-YCIXY66B.mjs → chunk-HPACLONQ.mjs} +2 -2
- package/dist/cli/{chunk-WCVIPZWX.mjs → chunk-IMP7WR22.mjs} +5 -5
- package/dist/cli/{chunk-KSQXBLRW.mjs → chunk-IWLDJQGV.mjs} +3 -3
- package/dist/cli/{chunk-EQNAQENZ.js → chunk-J5OXJ4JI.js} +2 -2
- package/dist/cli/{chunk-NUC7ZVDG.mjs → chunk-MQB25LMV.mjs} +5 -5
- package/dist/cli/{chunk-RUULUCBP.js → chunk-O7WUATQC.js} +97 -70
- package/dist/cli/{chunk-NMU3VR5U.js → chunk-PMH4GLMD.js} +1 -0
- package/dist/cli/{chunk-S3A4IXBQ.mjs → chunk-PSX3WHIH.mjs} +1 -0
- package/dist/cli/{chunk-LRWDZDBS.js → chunk-RZJWHL7L.js} +5 -5
- package/dist/cli/{chunk-66N76YZG.js → chunk-SCLRGDF4.js} +44 -44
- package/dist/cli/{chunk-SMWFOGUT.js → chunk-SJ6KUCGM.js} +53 -53
- package/dist/cli/{chunk-PFKKZVFK.js → chunk-TBQC2XS3.js} +41 -41
- package/dist/cli/{chunk-2ZX7XSAQ.mjs → chunk-TCLJXJAG.mjs} +4 -4
- package/dist/cli/{chunk-YGOI5ZE5.mjs → chunk-TVHDWS5U.mjs} +1 -1
- package/dist/cli/{chunk-MW3YMPD2.mjs → chunk-TXJW6RIM.mjs} +1 -1
- package/dist/cli/{chunk-KKPBCB6D.mjs → chunk-U6OUX47C.mjs} +2 -2
- package/dist/cli/{chunk-GTGJBZVH.js → chunk-UTCGCES2.js} +7 -7
- package/dist/cli/{chunk-V2YIBBVT.mjs → chunk-UUIC2JFZ.mjs} +1 -1
- package/dist/cli/{chunk-JDIQBZ6O.js → chunk-UWCEBS7F.js} +14 -14
- package/dist/cli/{chunk-ANKD3AIR.js → chunk-WBY3R55B.js} +2 -2
- package/dist/cli/{chunk-SF4QJVBE.js → chunk-WITNIMLE.js} +3 -3
- package/dist/cli/{chunk-7OQGZBDG.js → chunk-WL6GAZBD.js} +31 -17
- package/dist/cli/{chunk-R457IMHJ.mjs → chunk-WOLY6SU4.mjs} +1 -1
- package/dist/cli/{chunk-3WWTBQHC.mjs → chunk-XVIMOB2U.mjs} +2 -2
- package/dist/cli/{chunk-NTLBZUHD.js → chunk-XYIECA7M.js} +4 -2
- package/dist/cli/{chunk-BXIQD2IY.mjs → chunk-Y47OCS5V.mjs} +1 -1
- package/dist/cli/{chunk-EO55Y4QW.mjs → chunk-YNFPZVII.mjs} +5 -5
- package/dist/cli/{chunk-BN5VKY4X.js → chunk-ZS2WHWWL.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-HT2JBCW2.mjs → csv-4BLFRED6.mjs} +4 -4
- package/dist/cli/{csv-Q2LWKXAV.js → csv-KSJB5Z3M.js} +13 -13
- package/dist/cli/{db-XEV4WEE4.js → db-G7Z5CKO2.js} +28 -28
- package/dist/cli/{db-CS3XQ2LX.mjs → db-OVW6C3DV.mjs} +7 -7
- package/dist/cli/describe-KMYR2JBC.js +50 -0
- package/dist/cli/describe-OEFTD7WQ.mjs +50 -0
- package/dist/cli/describe-core.d.mts +4 -2
- package/dist/cli/describe-core.d.ts +4 -2
- package/dist/cli/describe-core.js +5 -5
- package/dist/cli/describe-core.mjs +4 -4
- package/dist/cli/{executions-L6XFG5MP.mjs → executions-7ZKQ4ZU3.mjs} +7 -7
- package/dist/cli/{executions-JCC34WAD.js → executions-O7USCBCW.js} +9 -9
- package/dist/cli/{feedback-AWBDO5I6.mjs → feedback-KUBL5E3I.mjs} +61 -13
- package/dist/cli/{feedback-HV2M2G7N.js → feedback-Y55WCRIQ.js} +65 -17
- package/dist/cli/{git-S4LRXTRX.mjs → git-C6ZAU5JA.mjs} +5 -5
- package/dist/cli/git-NBVQ3VGW.js +25 -0
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-7MOKBL4O.mjs → legacy-noops-MUXD4HRC.mjs} +6 -6
- package/dist/cli/{legacy-noops-RGSZUD6V.js → legacy-noops-OVWX4KB3.js} +9 -9
- package/dist/cli/{monitors-XQNXDZPQ.mjs → monitors-2ZSGBY52.mjs} +8 -8
- package/dist/cli/{monitors-JEFM2C5W.js → monitors-3QVYGYWA.js} +101 -101
- package/dist/cli/{org-KTMJZGTN.mjs → org-RDSPE5FB.mjs} +7 -7
- package/dist/cli/{org-GYLA5V32.js → org-S6Z3SDLI.js} +87 -87
- package/dist/cli/{pages-WOMU2T2O.mjs → pages-K5DSMHLJ.mjs} +7 -7
- package/dist/cli/{pages-RY4U7OCL.js → pages-VUWF2OR7.js} +19 -19
- package/dist/cli/{play-KOYGGNYS.mjs → play-PZLXOYEX.mjs} +151 -102
- package/dist/cli/{play-2Q6MWJ3D.js → play-SQOJTUFC.js} +756 -707
- package/dist/cli/{providers-7YKDITJC.mjs → providers-AMIGP3D4.mjs} +7 -7
- package/dist/cli/{providers-HOIRHMN2.js → providers-FZBEPUOI.js} +10 -10
- package/dist/cli/{quickstart-RDXHSMVX.mjs → quickstart-HNOQKGOF.mjs} +4 -4
- package/dist/cli/{quickstart-OWCJOSQA.js → quickstart-QIHZDBGM.js} +6 -6
- package/dist/cli/{run-MT2ABKO5.js → run-IQGM3TO2.js} +46 -46
- package/dist/cli/{run-RT73NDP5.mjs → run-JDW6BDNT.mjs} +27 -27
- package/dist/cli/search-BNWRL3YY.js +33 -0
- package/dist/cli/{search-CJPKIGSA.mjs → search-DMVUKJ23.mjs} +9 -9
- package/dist/cli/{search-output-AREMA544.mjs → search-output-5UAPUUHH.mjs} +4 -4
- package/dist/cli/{search-output-OSBZ7WK6.js → search-output-UUW6UNHF.js} +6 -6
- package/dist/cli/{secrets-BTIY2FEJ.mjs → secrets-46KSTPFN.mjs} +7 -7
- package/dist/cli/{secrets-OV6KH633.js → secrets-U532KN24.js} +16 -16
- package/dist/cli/sessions-JZUONXH4.js +22 -0
- package/dist/cli/sessions-RUNWYHYX.mjs +22 -0
- package/dist/cli/{settings-7BQIC7QN.mjs → settings-56L3WHCY.mjs} +14 -14
- package/dist/cli/{settings-LBIECYDB.js → settings-O2A37FFA.js} +87 -87
- package/dist/cli/{setup-QZE7QR3F.js → setup-ETFSMSCH.js} +50 -50
- package/dist/cli/{setup-XPTSNNES.mjs → setup-Q27X6JZY.mjs} +10 -10
- package/dist/cli/skills-IKDJ5JDN.js +37 -0
- package/dist/cli/{skills-TGGKIQLT.mjs → skills-WFQRZL4D.mjs} +8 -8
- package/dist/cli/tools-B735AA67.js +57 -0
- package/dist/cli/{tools-MKIFX2TQ.mjs → tools-EV6CKJOX.mjs} +20 -20
- package/dist/cli/update-CNNURAM3.js +35 -0
- package/dist/cli/{update-5R3D3WNH.mjs → update-KIPPFVCH.mjs} +10 -10
- package/dist/cli/{views-VPWEINIA.js → views-DNZ2HFTA.js} +19 -19
- package/dist/cli/{views-VHKDHHUP.mjs → views-LMJXWD4N.mjs} +7 -7
- package/dist/cli/{workflow-D5DF65N6.mjs → workflow-3XKUQ73U.mjs} +8 -8
- package/dist/cli/{workflow-7K2VEQ4V.js → workflow-ZUDTIOK6.js} +18 -18
- package/dist/{client-C5_6W8yd.d.mts → client-Bd2meveV.d.mts} +1 -1
- package/dist/{client-iXW4TOat.d.ts → client-CBCVhL8U.d.ts} +1 -1
- package/dist/{client-core-Dob428Z4.d.mts → client-core-CGj8V9mw.d.mts} +67 -0
- package/dist/{client-core-B-GPfmaC.d.ts → client-core-CsRRWCFy.d.ts} +67 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +121 -118
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/play-description.js +2 -2
- package/dist/plays/play-description.mjs +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-OKPHHMMP.js +0 -43
- package/dist/cli/describe-5G5NXO5E.js +0 -50
- package/dist/cli/describe-OUTXLDGZ.mjs +0 -50
- package/dist/cli/git-GDPTG52F.js +0 -25
- package/dist/cli/search-7VBA6IGS.js +0 -33
- package/dist/cli/sessions-3CO3ZFOD.mjs +0 -18
- package/dist/cli/sessions-B3WNEWRW.js +0 -18
- package/dist/cli/skills-TXBRTWEV.js +0 -37
- package/dist/cli/tools-RZJV4X3J.js +0 -57
- package/dist/cli/update-YWGGPWUA.js +0 -35
|
@@ -1,13 +1,15 @@
|
|
|
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 _chunkJ5OXJ4JIjs = require('./chunk-J5OXJ4JI.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkUTCGCES2js = require('./chunk-UTCGCES2.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk7COEN3IRjs = require('./chunk-7COEN3IR.js');
|
|
11
13
|
|
|
12
14
|
// src/cli/commands/sessions.ts
|
|
13
15
|
|
|
@@ -48,14 +50,17 @@ function detectShellContext() {
|
|
|
48
50
|
cwd: process.cwd()
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
|
-
function claudeProjectsRoot() {
|
|
52
|
-
return _path.join.call(void 0, homeDir(), ".claude", "projects");
|
|
53
|
-
}
|
|
54
53
|
function codexSessionsRoot() {
|
|
55
54
|
return _path.join.call(void 0, homeDir(), ".codex", "sessions");
|
|
56
55
|
}
|
|
57
56
|
function listClaudeSessionFiles() {
|
|
58
|
-
const
|
|
57
|
+
const files = [];
|
|
58
|
+
for (const root of _chunk7COEN3IRjs.claudeProjectsRoots.call(void 0, )) {
|
|
59
|
+
files.push(...listClaudeSessionFilesIn(root));
|
|
60
|
+
}
|
|
61
|
+
return files;
|
|
62
|
+
}
|
|
63
|
+
function listClaudeSessionFilesIn(root) {
|
|
59
64
|
if (!_fs.existsSync.call(void 0, root)) return [];
|
|
60
65
|
const projectDirs = readDirectoryNames(root);
|
|
61
66
|
const files = [];
|
|
@@ -142,14 +147,26 @@ function currentSessionFile(agent) {
|
|
|
142
147
|
const newestFirst = listSessionFiles(agent).sort(
|
|
143
148
|
(a, b) => b.mtimeMs - a.mtimeMs
|
|
144
149
|
);
|
|
145
|
-
const sessionId =
|
|
150
|
+
const sessionId = _chunk7COEN3IRjs.agentSessionIdFromEnvironment.call(void 0,
|
|
146
151
|
process.env,
|
|
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 : _chunk7COEN3IRjs.coworkTranscriptFromEnvironment.call(void 0, );
|
|
160
|
+
const coworkStat = cowork ? statIfReadable(cowork.filePath) : null;
|
|
161
|
+
if (cowork && coworkStat) {
|
|
162
|
+
return { agent: "claude", ...cowork, mtimeMs: coworkStat.mtimeMs };
|
|
163
|
+
}
|
|
164
|
+
return _nullishCoalesce(_nullishCoalesce(newestFirst.find(
|
|
151
165
|
(candidate) => sessionStartedInDirectory(candidate, cwd)
|
|
152
|
-
)
|
|
166
|
+
), () => ( newestFirst[0])), () => ( null));
|
|
167
|
+
}
|
|
168
|
+
function feedbackAgentSessionId(agentRuntime) {
|
|
169
|
+
return _nullishCoalesce(_chunk7COEN3IRjs.agentSessionIdFromEnvironment.call(void 0, process.env, agentRuntime), () => ( (agentRuntime === "claude_cowork" || agentRuntime === "claude_code" ? _nullishCoalesce(_optionalChain([_chunk7COEN3IRjs.coworkTranscriptFromEnvironment.call(void 0, ), 'optionalAccess', _17 => _17.sessionId]), () => ( null)) : null)));
|
|
153
170
|
}
|
|
154
171
|
function sessionStartedInDirectory(candidate, cwd) {
|
|
155
172
|
if (candidate.agent === "claude") {
|
|
@@ -164,7 +181,7 @@ function readCodexSessionCwd(filePath) {
|
|
|
164
181
|
const head = Buffer.alloc(8192);
|
|
165
182
|
const length = _fs.readSync.call(void 0, fd, head, 0, head.length, 0);
|
|
166
183
|
const match = head.toString("utf8", 0, length).match(/"cwd":("(?:[^"\\]|\\.)*")/);
|
|
167
|
-
return _optionalChain([match, 'optionalAccess',
|
|
184
|
+
return _optionalChain([match, 'optionalAccess', _18 => _18[1]]) ? JSON.parse(match[1]) : null;
|
|
168
185
|
} finally {
|
|
169
186
|
_fs.closeSync.call(void 0, fd);
|
|
170
187
|
}
|
|
@@ -177,7 +194,7 @@ function sessionIdFromClaudeFilePath(filePath) {
|
|
|
177
194
|
}
|
|
178
195
|
function sessionIdFromCodexFilePath(filePath) {
|
|
179
196
|
const match = _path.basename.call(void 0, filePath, ".jsonl").match(UUID_IN_TEXT_RE);
|
|
180
|
-
return _nullishCoalesce(_optionalChain([match, 'optionalAccess',
|
|
197
|
+
return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _19 => _19[0]]), () => ( null));
|
|
181
198
|
}
|
|
182
199
|
function readCodexSessionId(filePath) {
|
|
183
200
|
try {
|
|
@@ -189,7 +206,7 @@ function readCodexSessionId(filePath) {
|
|
|
189
206
|
if (!parsed || typeof parsed !== "object") continue;
|
|
190
207
|
const record = parsed;
|
|
191
208
|
const payload = record.payload && typeof record.payload === "object" ? record.payload : null;
|
|
192
|
-
const id = record.type === "session_meta" && typeof _optionalChain([payload, 'optionalAccess',
|
|
209
|
+
const id = record.type === "session_meta" && typeof _optionalChain([payload, 'optionalAccess', _20 => _20.id]) === "string" ? payload.id : null;
|
|
193
210
|
if (id && UUID_RE.test(id)) return id;
|
|
194
211
|
}
|
|
195
212
|
} catch (e5) {
|
|
@@ -198,9 +215,10 @@ function readCodexSessionId(filePath) {
|
|
|
198
215
|
return null;
|
|
199
216
|
}
|
|
200
217
|
function sessionSearchDescription(agent) {
|
|
201
|
-
|
|
218
|
+
const claude = _chunk7COEN3IRjs.claudeProjectsRoots.call(void 0, ).map((root) => _path.join.call(void 0, 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();
|
|
@@ -257,7 +275,7 @@ function resolveSessionTargets(input) {
|
|
|
257
275
|
}
|
|
258
276
|
targets.push({
|
|
259
277
|
sessionId,
|
|
260
|
-
label: _nullishCoalesce(_optionalChain([input, 'access',
|
|
278
|
+
label: _nullishCoalesce(_optionalChain([input, 'access', _21 => _21.labels, 'optionalAccess', _22 => _22[index]]), () => ( `${candidate.agent}-session-${sessionId}`)),
|
|
261
279
|
filePath: candidate.filePath,
|
|
262
280
|
agent: candidate.agent
|
|
263
281
|
});
|
|
@@ -454,7 +472,7 @@ function buildSessionUploadContent(raw) {
|
|
|
454
472
|
return { encodedContent: encoded, needsChunking: true };
|
|
455
473
|
}
|
|
456
474
|
async function uploadPayload(path, payload) {
|
|
457
|
-
const { http } =
|
|
475
|
+
const { http } = _chunkUTCGCES2js.getAuthedHttpClient.call(void 0, );
|
|
458
476
|
return await http.post(path, payload);
|
|
459
477
|
}
|
|
460
478
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -479,36 +497,60 @@ 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: _optionalChain([built, 'access', _23 => _23[0], 'optionalAccess', _24 => _24.sessionId]),
|
|
518
|
+
content: _optionalChain([built, 'access', _25 => _25[0], 'optionalAccess', _26 => _26.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(_fs.readFileSync.call(void 0, 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
|
-
if (
|
|
553
|
+
if (_chunkJ5OXJ4JIjs.rejectRestrictedFeedback.call(void 0, options)) return;
|
|
512
554
|
const rating = parseSessionRating(options.rating);
|
|
513
555
|
if (options.file) {
|
|
514
556
|
const filePath = _path.resolve.call(void 0, options.file);
|
|
@@ -520,7 +562,7 @@ async function handleSessionsSend(options) {
|
|
|
520
562
|
filename: _path.basename.call(void 0, filePath),
|
|
521
563
|
...rating ? { rating } : {}
|
|
522
564
|
});
|
|
523
|
-
|
|
565
|
+
_chunkUTCGCES2js.printCommandEnvelope.call(void 0,
|
|
524
566
|
{
|
|
525
567
|
...response2,
|
|
526
568
|
ok: true,
|
|
@@ -546,31 +588,13 @@ 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 && !_optionalChain([options, 'access', _22 => _22.label, 'optionalAccess', _23 => _23.length]) ? await uploadPayload("/api/v2/cli/send-session", {
|
|
558
|
-
session_id: _optionalChain([built, 'access', _24 => _24[0], 'optionalAccess', _25 => _25.sessionId]),
|
|
559
|
-
content: _optionalChain([built, 'access', _26 => _26[0], 'optionalAccess', _27 => _27.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(_optionalChain([options, 'access', _27 => _27.label, 'optionalAccess', _28 => _28.length]))
|
|
571
595
|
});
|
|
572
596
|
const sessionIds = built.map((session) => session.sessionId);
|
|
573
|
-
|
|
597
|
+
_chunkUTCGCES2js.printCommandEnvelope.call(void 0,
|
|
574
598
|
{
|
|
575
599
|
...response,
|
|
576
600
|
ok: true,
|
|
@@ -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
|
]
|
|
@@ -591,7 +615,7 @@ async function handleSessionsSend(options) {
|
|
|
591
615
|
);
|
|
592
616
|
}
|
|
593
617
|
function loadViewerAssets() {
|
|
594
|
-
const cliEntry = _optionalChain([process, 'access',
|
|
618
|
+
const cliEntry = _optionalChain([process, 'access', _29 => _29.argv, 'access', _30 => _30[1], 'optionalAccess', _31 => _31.trim, 'call', _32 => _32()]) ? _fs.realpathSync.call(void 0, _path.resolve.call(void 0, process.argv[1])) : null;
|
|
595
619
|
const candidateRoots = [
|
|
596
620
|
...cliEntry ? [
|
|
597
621
|
_path.join.call(void 0, _path.dirname.call(void 0, _path.dirname.call(void 0, cliEntry)), "viewer"),
|
|
@@ -644,7 +668,7 @@ async function handleSessionsRender(options) {
|
|
|
644
668
|
_fs.mkdirSync.call(void 0, outputDir, { recursive: true });
|
|
645
669
|
outputPath = _path.join.call(void 0,
|
|
646
670
|
outputDir,
|
|
647
|
-
targets.length > 1 ? "session-viewer.html" : `session-${_optionalChain([targets, 'access',
|
|
671
|
+
targets.length > 1 ? "session-viewer.html" : `session-${_optionalChain([targets, 'access', _33 => _33[0], 'optionalAccess', _34 => _34.sessionId])}.html`
|
|
648
672
|
);
|
|
649
673
|
} else {
|
|
650
674
|
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, outputPath), { recursive: true });
|
|
@@ -678,7 +702,7 @@ ${refreshMeta}
|
|
|
678
702
|
</body>
|
|
679
703
|
</html>`;
|
|
680
704
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
681
|
-
|
|
705
|
+
_chunkUTCGCES2js.printCommandEnvelope.call(void 0,
|
|
682
706
|
{
|
|
683
707
|
ok: true,
|
|
684
708
|
file: outputPath,
|
|
@@ -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
|
|
@@ -788,4 +813,6 @@ Examples:
|
|
|
788
813
|
|
|
789
814
|
|
|
790
815
|
|
|
791
|
-
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
exports.feedbackAgentSessionId = feedbackAgentSessionId; exports.uploadAgentSession = uploadAgentSession; exports.registerSessionsCommands = registerSessionsCommands; exports.registerSessionSendRenderCommands = registerSessionSendRenderCommands;
|
|
@@ -111,6 +111,7 @@ function describePlayDetail(detail, options = {}) {
|
|
|
111
111
|
const play = detail.play;
|
|
112
112
|
return {
|
|
113
113
|
...describePlayListItem(play, options),
|
|
114
|
+
...play.ownerType === "org" && play._id ? { playId: play._id } : {},
|
|
114
115
|
currentPublishedVersion: _nullishCoalesce(_nullishCoalesce(play.currentPublishedVersion, () => ( _optionalChain([play, 'access', _22 => _22.liveRevision, 'optionalAccess', _23 => _23.version]))), () => ( null)),
|
|
115
116
|
latestRunId: _nullishCoalesce(_nullishCoalesce(play.latestRunId, () => ( _optionalChain([detail, 'access', _24 => _24.latestRuns, 'access', _25 => _25[0], 'optionalAccess', _26 => _26.workflowId]))), () => ( null)),
|
|
116
117
|
...play.triggerMetadata ? { triggerMetadata: play.triggerMetadata } : {},
|
|
@@ -111,6 +111,7 @@ function describePlayDetail(detail, options = {}) {
|
|
|
111
111
|
const play = detail.play;
|
|
112
112
|
return {
|
|
113
113
|
...describePlayListItem(play, options),
|
|
114
|
+
...play.ownerType === "org" && play._id ? { playId: play._id } : {},
|
|
114
115
|
currentPublishedVersion: play.currentPublishedVersion ?? play.liveRevision?.version ?? null,
|
|
115
116
|
latestRunId: play.latestRunId ?? detail.latestRuns[0]?.workflowId ?? null,
|
|
116
117
|
...play.triggerMetadata ? { triggerMetadata: play.triggerMetadata } : {},
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk3MYI3IXWjs = require('./chunk-3MYI3IXW.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkWITNIMLEjs = require('./chunk-WITNIMLE.js');
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
|
-
var DeeplineClient2 = class extends
|
|
10
|
+
var DeeplineClient2 = class extends _chunk3MYI3IXWjs.DeeplineClient {
|
|
11
11
|
constructor(options) {
|
|
12
|
-
const config =
|
|
13
|
-
super(config, new (0,
|
|
12
|
+
const config = _chunkWITNIMLEjs.resolveConfig.call(void 0, options);
|
|
13
|
+
super(config, new (0, _chunkWITNIMLEjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -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(); } } 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 _chunkB33J4YCCjs = require('./chunk-B33J4YCC.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkUWCEBS7Fjs = require('./chunk-UWCEBS7F.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,17 +14,17 @@ var _chunkJDIQBZ6Ojs = require('./chunk-JDIQBZ6O.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkWITNIMLEjs = require('./chunk-WITNIMLE.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk7COEN3IRjs = require('./chunk-7COEN3IR.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkFMPGWAIRjs = require('./chunk-FMPGWAIR.js');
|
|
28
28
|
|
|
29
29
|
// src/compat.ts
|
|
30
30
|
var _crypto = require('crypto');
|
|
@@ -59,7 +59,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
59
59
|
return value === "1" || value === "true" || value === "yes";
|
|
60
60
|
}
|
|
61
61
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.HOME, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || _os.homedir.call(void 0, )) {
|
|
62
|
-
return _path.join.call(void 0,
|
|
62
|
+
return _path.join.call(void 0, _chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
63
63
|
}
|
|
64
64
|
function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12.HOME, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14()]) || _os.homedir.call(void 0, )) {
|
|
65
65
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -67,9 +67,9 @@ function legacySdkCompatibilityCachePath(homeDir = _optionalChain([process, 'acc
|
|
|
67
67
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
68
68
|
return JSON.stringify({
|
|
69
69
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
70
|
-
version:
|
|
71
|
-
apiContract:
|
|
72
|
-
apiMajor:
|
|
70
|
+
version: _chunk7COEN3IRjs.SDK_VERSION,
|
|
71
|
+
apiContract: _chunk7COEN3IRjs.SDK_API_CONTRACT,
|
|
72
|
+
apiMajor: _chunk7COEN3IRjs.SDK_API_MAJOR,
|
|
73
73
|
command: _optionalChain([command, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || null,
|
|
74
74
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
75
75
|
});
|
|
@@ -77,8 +77,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
77
77
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
78
78
|
return JSON.stringify({
|
|
79
79
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
80
|
-
version:
|
|
81
|
-
apiContract:
|
|
80
|
+
version: _chunk7COEN3IRjs.SDK_VERSION,
|
|
81
|
+
apiContract: _chunk7COEN3IRjs.SDK_API_CONTRACT,
|
|
82
82
|
command: _optionalChain([command, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || null
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -103,7 +103,7 @@ function isSavedWithin(savedAt, windowMs, now) {
|
|
|
103
103
|
}
|
|
104
104
|
var UPDATE_ADVISORY_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
105
105
|
function claimUpdateAdvisory(baseUrl, now = Date.now()) {
|
|
106
|
-
const path = _path.join.call(void 0,
|
|
106
|
+
const path = _path.join.call(void 0, _chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl), "update-advisory.json");
|
|
107
107
|
try {
|
|
108
108
|
const { shownAt } = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
109
109
|
if (isSavedWithin(shownAt, UPDATE_ADVISORY_INTERVAL_MS, now)) return false;
|
|
@@ -190,7 +190,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
190
190
|
);
|
|
191
191
|
try {
|
|
192
192
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
193
|
-
url.searchParams.set("version",
|
|
193
|
+
url.searchParams.set("version", _chunk7COEN3IRjs.SDK_VERSION);
|
|
194
194
|
if (_optionalChain([options, 'access', _34 => _34.command, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()])) {
|
|
195
195
|
url.searchParams.set("command", options.command.trim());
|
|
196
196
|
}
|
|
@@ -198,7 +198,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
198
198
|
url.searchParams.set("skills_version", _nullishCoalesce(options.skillsVersion, () => ( "")));
|
|
199
199
|
url.searchParams.set(
|
|
200
200
|
"skills_cli_capability",
|
|
201
|
-
String(
|
|
201
|
+
String(_chunkFMPGWAIRjs.SDK_RELEASE.packageCapabilities.skillsGuidance)
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
if (options.catalog) {
|
|
@@ -210,14 +210,14 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
210
210
|
const response = await fetch(url, {
|
|
211
211
|
method: "GET",
|
|
212
212
|
headers: {
|
|
213
|
-
...
|
|
214
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
215
|
-
"X-Deepline-SDK-Version":
|
|
216
|
-
"X-Deepline-API-Major": String(
|
|
217
|
-
"X-Deepline-API-Contract":
|
|
213
|
+
..._chunk7COEN3IRjs.deploymentProtectionHeaders.call(void 0, ),
|
|
214
|
+
"User-Agent": `deepline-ts-sdk/${_chunk7COEN3IRjs.SDK_VERSION}`,
|
|
215
|
+
"X-Deepline-SDK-Version": _chunk7COEN3IRjs.SDK_VERSION,
|
|
216
|
+
"X-Deepline-API-Major": String(_chunk7COEN3IRjs.SDK_API_MAJOR),
|
|
217
|
+
"X-Deepline-API-Contract": _chunk7COEN3IRjs.SDK_API_CONTRACT,
|
|
218
218
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
219
219
|
"X-Deepline-CLI-Auto-Update-Capability": SDK_CLI_AUTO_UPDATE_CAPABILITY,
|
|
220
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
220
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkWITNIMLEjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {},
|
|
221
221
|
..._optionalChain([options, 'access', _37 => _37.catalog, 'optionalAccess', _38 => _38.cliInvocationId]) ? { "X-Deepline-CLI-Invocation-ID": options.catalog.cliInvocationId } : {}
|
|
222
222
|
},
|
|
223
223
|
signal: controller.signal
|
|
@@ -386,7 +386,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
386
386
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
387
387
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
388
388
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
389
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
389
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkWITNIMLEjs.DEFAULT_SKILL_AGENTS));
|
|
390
390
|
const values = {
|
|
391
391
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
392
392
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -514,25 +514,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
514
514
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
515
515
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
516
516
|
function shouldSkipSkillsSync() {
|
|
517
|
-
if (
|
|
517
|
+
if (_chunk7COEN3IRjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
518
518
|
return true;
|
|
519
519
|
}
|
|
520
520
|
const value = _optionalChain([process, 'access', _57 => _57.env, 'access', _58 => _58.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _59 => _59.trim, 'call', _60 => _60(), 'access', _61 => _61.toLowerCase, 'call', _62 => _62()]);
|
|
521
521
|
return value === "1" || value === "true" || value === "yes" || value === "on" || !isCliSkillsSyncEnabled();
|
|
522
522
|
}
|
|
523
523
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
524
|
-
return _path.join.call(void 0,
|
|
524
|
+
return _path.join.call(void 0, _chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
525
525
|
}
|
|
526
526
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
527
527
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
528
|
-
var agentLeaseSegment =
|
|
528
|
+
var agentLeaseSegment = _chunkWITNIMLEjs.skillsAgentPathSegment;
|
|
529
529
|
function sortedLeaseAgents(agents) {
|
|
530
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
530
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkWITNIMLEjs.KNOWN_SKILL_AGENTS] : agents;
|
|
531
531
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
532
532
|
}
|
|
533
533
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
534
534
|
return _path.join.call(void 0,
|
|
535
|
-
|
|
535
|
+
_chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
536
536
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
537
537
|
);
|
|
538
538
|
}
|
|
@@ -691,7 +691,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
691
691
|
constructor(baseUrl, error) {
|
|
692
692
|
const detail = error instanceof Error ? error.message : String(error);
|
|
693
693
|
super(
|
|
694
|
-
`Could not save skills state in ${
|
|
694
|
+
`Could not save skills state in ${_chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
695
695
|
);
|
|
696
696
|
this.name = "SkillsStateUnavailableError";
|
|
697
697
|
}
|
|
@@ -776,7 +776,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
776
776
|
}
|
|
777
777
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
778
778
|
return _path.join.call(void 0,
|
|
779
|
-
|
|
779
|
+
_chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
780
780
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
781
781
|
);
|
|
782
782
|
}
|
|
@@ -810,8 +810,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
810
810
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
811
811
|
}
|
|
812
812
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
813
|
-
if (shouldSkipSkillsSync() ||
|
|
814
|
-
const agents =
|
|
813
|
+
if (shouldSkipSkillsSync() || _chunkWITNIMLEjs.hasActivePluginSkills.call(void 0, )) return;
|
|
814
|
+
const agents = _chunkWITNIMLEjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
815
815
|
if (agents.length === 0) return;
|
|
816
816
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
817
817
|
}
|
|
@@ -833,7 +833,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError, sidecarPath) {
|
|
|
833
833
|
}
|
|
834
834
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
835
835
|
return _path.join.call(void 0,
|
|
836
|
-
|
|
836
|
+
_chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
837
837
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
838
838
|
);
|
|
839
839
|
}
|
|
@@ -862,7 +862,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
862
862
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
863
863
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
864
864
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
865
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _66 => _66.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
865
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _66 => _66.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkWITNIMLEjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
866
866
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _67 => _67.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
867
867
|
notice(
|
|
868
868
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -950,7 +950,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
950
950
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
951
951
|
}
|
|
952
952
|
function isDefaultAgentSet(agents) {
|
|
953
|
-
return agents.length ===
|
|
953
|
+
return agents.length === _chunkWITNIMLEjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkWITNIMLEjs.DEFAULT_SKILL_AGENTS[index]);
|
|
954
954
|
}
|
|
955
955
|
function safeSkillFilePath(value) {
|
|
956
956
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1107,10 +1107,10 @@ async function fetchSkillsUpdate(baseUrl, localVersion) {
|
|
|
1107
1107
|
method: "POST",
|
|
1108
1108
|
headers: { "Content-Type": "application/json" },
|
|
1109
1109
|
body: JSON.stringify({
|
|
1110
|
-
sdk_cli: { version:
|
|
1110
|
+
sdk_cli: { version: _chunk7COEN3IRjs.SDK_VERSION },
|
|
1111
1111
|
skills: {
|
|
1112
1112
|
version: localVersion,
|
|
1113
|
-
capability:
|
|
1113
|
+
capability: _chunkFMPGWAIRjs.SDK_RELEASE.packageCapabilities.skillsGuidance
|
|
1114
1114
|
}
|
|
1115
1115
|
}),
|
|
1116
1116
|
signal: controller.signal
|
|
@@ -1149,7 +1149,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
function noInstallerProbePath(baseUrl) {
|
|
1151
1151
|
return _path.join.call(void 0,
|
|
1152
|
-
|
|
1152
|
+
_chunkWITNIMLEjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1153
1153
|
"skills-sync-no-installer-unknown.json"
|
|
1154
1154
|
);
|
|
1155
1155
|
}
|
|
@@ -1228,7 +1228,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1228
1228
|
function resolveSkillsInstallSpawn(install, platform = process.platform) {
|
|
1229
1229
|
return resolveShellSpawn(install.command, install.args, platform);
|
|
1230
1230
|
}
|
|
1231
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1231
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkWITNIMLEjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1232
1232
|
const commands = [];
|
|
1233
1233
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1234
1234
|
if (probes.bunx === "available") {
|
|
@@ -1370,7 +1370,7 @@ function runLegacySkillsCleanup(agents) {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
function writeSdkSkillsStatusLine(line) {
|
|
1373
|
-
const progress =
|
|
1373
|
+
const progress = _chunkB33J4YCCjs.getActiveCliProgress.call(void 0, );
|
|
1374
1374
|
if (progress) {
|
|
1375
1375
|
progress.writeLine(line);
|
|
1376
1376
|
return;
|
|
@@ -1381,11 +1381,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1381
1381
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1382
1382
|
const skip = shouldSkipSkillsSync();
|
|
1383
1383
|
if (skip && !options.claim) return;
|
|
1384
|
-
const usingPluginSkills =
|
|
1384
|
+
const usingPluginSkills = _chunkWITNIMLEjs.hasActivePluginSkills.call(void 0, );
|
|
1385
1385
|
if (usingPluginSkills) {
|
|
1386
1386
|
return;
|
|
1387
1387
|
}
|
|
1388
|
-
const agents =
|
|
1388
|
+
const agents = _chunkWITNIMLEjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1389
1389
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1390
1390
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1391
1391
|
}
|
|
@@ -1422,7 +1422,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1422
1422
|
return;
|
|
1423
1423
|
}
|
|
1424
1424
|
try {
|
|
1425
|
-
const localVersion =
|
|
1425
|
+
const localVersion = _chunkWITNIMLEjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1426
1426
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1427
1427
|
needsUpdate: options.update.needs_update,
|
|
1428
1428
|
remoteVersion: options.update.remote.version
|
|
@@ -1544,7 +1544,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1544
1544
|
update.remoteVersion,
|
|
1545
1545
|
agents
|
|
1546
1546
|
);
|
|
1547
|
-
void
|
|
1547
|
+
void _chunkUWCEBS7Fjs.maybeReportAutomaticSkillsSyncFailure.call(void 0, {
|
|
1548
1548
|
baseUrl,
|
|
1549
1549
|
remoteSkillsVersion: update.remoteVersion,
|
|
1550
1550
|
agents,
|
|
@@ -1575,7 +1575,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1575
1575
|
notice(
|
|
1576
1576
|
publishedFailure ? `Deepline could not verify the published skills: ${detail}. The local version remains stale; it will retry automatically on a later command.` : `Deepline agent-skills refresh could not verify the five installed targets: ${detail}. The local version remains stale. After fixing the install, remove ${failedSkillsSyncPath(baseUrl, agents)} to retry this version automatically.`
|
|
1577
1577
|
);
|
|
1578
|
-
void
|
|
1578
|
+
void _chunkUWCEBS7Fjs.maybeReportAutomaticSkillsSyncFailure.call(void 0, {
|
|
1579
1579
|
baseUrl,
|
|
1580
1580
|
remoteSkillsVersion: update.remoteVersion,
|
|
1581
1581
|
agents,
|
|
@@ -1588,7 +1588,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
1590
|
runLegacySkillsCleanup(agents);
|
|
1591
|
-
if (!
|
|
1591
|
+
if (!_chunkWITNIMLEjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1592
1592
|
notice(
|
|
1593
1593
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1594
1594
|
);
|