deepline 0.3.474 → 0.3.476
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/play.ts +2 -2
- package/dist/bundling-sources/sdk/src/release.ts +3 -3
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +19 -6
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +24 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +21 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +47 -21
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +18 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +163 -40
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
- package/dist/cli/auth-2ZY57Q7W.js +41 -0
- package/dist/cli/{auth-QMANU5PV.mjs → auth-A22724UX.mjs} +5 -5
- package/dist/cli/{billing-YJAP4VZN.mjs → billing-IIBEZ6J7.mjs} +6 -6
- package/dist/cli/{billing-WZ5POBZX.js → billing-T5Q6OO6M.js} +79 -79
- package/dist/cli/{chunk-35SZHTRW.mjs → chunk-2WEPQSA2.mjs} +5 -5
- package/dist/cli/{chunk-MXUJVCKV.mjs → chunk-2YHDNHRR.mjs} +4 -4
- package/dist/cli/{chunk-V4ILQ2DS.mjs → chunk-3A7TDUZV.mjs} +1 -1
- package/dist/cli/{chunk-BB4RZMWA.mjs → chunk-4WMIMSSI.mjs} +5 -5
- package/dist/cli/{chunk-ZRWQKTSX.mjs → chunk-4YWYLHED.mjs} +3 -3
- package/dist/cli/{chunk-ORQYKA4I.js → chunk-5AEEINTU.js} +4 -4
- package/dist/cli/{chunk-3NRZFMX4.js → chunk-5FBCMLJW.js} +6 -6
- package/dist/cli/{chunk-XNP7XTBN.js → chunk-5PYSYW63.js} +26 -26
- package/dist/cli/{chunk-PGKELBIY.js → chunk-6YZYCKWD.js} +51 -51
- package/dist/cli/{chunk-RXITRC37.js → chunk-7HAUVMRF.js} +3 -3
- package/dist/cli/{chunk-JCNJQH6X.js → chunk-A6BETJ2A.js} +3 -3
- package/dist/cli/{chunk-STLJYWUC.js → chunk-AS3VECCY.js} +7 -7
- package/dist/cli/{chunk-LHOEWAVD.js → chunk-B7PEXXRW.js} +53 -53
- package/dist/cli/{chunk-IK3VOGDR.js → chunk-CBVCCXIY.js} +21 -21
- package/dist/cli/{chunk-JEYX3345.mjs → chunk-CFSCHLNQ.mjs} +3 -3
- package/dist/cli/{chunk-3MZPWIOE.mjs → chunk-D7EQ4PI5.mjs} +1 -1
- package/dist/cli/{chunk-XP7FAYLN.js → chunk-EBWYNNTJ.js} +5 -5
- package/dist/cli/{chunk-DQZBERDL.mjs → chunk-F5PYBZ2H.mjs} +1 -1
- package/dist/cli/{chunk-AIPTW3EK.js → chunk-FK7SBMSZ.js} +3 -3
- package/dist/cli/{chunk-Z27NSLPC.mjs → chunk-FVPT44IJ.mjs} +1 -1
- package/dist/cli/{chunk-RGIQ5ZJX.mjs → chunk-H3GOAZHV.mjs} +2 -2
- package/dist/cli/{chunk-AWJKYS25.js → chunk-HSANVBVL.js} +2 -2
- package/dist/cli/{chunk-JSXMJSBE.js → chunk-IC3BZJR7.js} +8 -8
- package/dist/cli/{chunk-MNK4ZK2C.mjs → chunk-J4FCTFQS.mjs} +10 -10
- package/dist/cli/{chunk-MKSB2FTU.mjs → chunk-JU2KBLOR.mjs} +97 -12
- package/dist/cli/{chunk-EIKONWW7.mjs → chunk-KCP6XNRR.mjs} +1 -1
- package/dist/cli/{chunk-YKNULB7V.js → chunk-KGLIDLJ2.js} +5 -5
- package/dist/cli/{chunk-N62MS3XJ.js → chunk-L45IECBZ.js} +6 -6
- package/dist/cli/{chunk-7IYOWIEJ.mjs → chunk-LJFIUT5R.mjs} +2 -2
- package/dist/cli/{chunk-ZGC2SUAA.mjs → chunk-LZCYDU6Q.mjs} +2 -2
- package/dist/cli/{chunk-3ODBCZLL.js → chunk-MYYOCJZ2.js} +93 -93
- package/dist/cli/{chunk-DKR7QPEO.js → chunk-MZSLFWOT.js} +1 -1
- package/dist/cli/{chunk-26CZVDQN.mjs → chunk-NPNQCPFP.mjs} +2 -2
- package/dist/cli/{chunk-UKX4FESF.mjs → chunk-NREO7TT4.mjs} +2 -2
- package/dist/cli/{chunk-KKWQ24VM.mjs → chunk-NTJDZURV.mjs} +2 -2
- package/dist/cli/{chunk-4C34LGI4.js → chunk-PGNLD6L6.js} +10 -10
- package/dist/cli/{chunk-G3UHAYRX.js → chunk-TEJSRJNH.js} +8 -8
- package/dist/cli/{chunk-UGYLGT7B.mjs → chunk-UHTJWDYB.mjs} +3 -3
- package/dist/cli/{chunk-EK2TAZJZ.js → chunk-ULKGYVYP.js} +2 -2
- package/dist/cli/{chunk-DUGZKPRK.mjs → chunk-UYA7LJGC.mjs} +2 -2
- package/dist/cli/{chunk-YVJ6IWVD.mjs → chunk-VKBZLV2K.mjs} +1 -1
- package/dist/cli/{chunk-YFDTF2XC.js → chunk-VLYUFZUT.js} +9 -9
- package/dist/cli/{chunk-THDXVSNL.mjs → chunk-VPAVNEDQ.mjs} +4 -4
- package/dist/cli/{chunk-RLQIGBFK.js → chunk-W3BHZUPL.js} +3 -3
- package/dist/cli/{chunk-5QS4T4KR.js → chunk-WFVEMDQL.js} +2 -2
- package/dist/cli/{chunk-475V572K.js → chunk-WTPRRKZA.js} +131 -46
- package/dist/cli/{chunk-CXBEZAPU.js → chunk-YEJDFZJP.js} +16 -16
- package/dist/cli/{chunk-JJVYUKLY.mjs → chunk-YQOWMQEW.mjs} +1 -1
- package/dist/cli/{chunk-YK64UZXN.mjs → chunk-ZOXV6WFI.mjs} +1 -1
- package/dist/cli/{chunk-YX762HFK.mjs → chunk-ZV4OWYLZ.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ENKCFCSM.js → csv-FXOQ2PBE.js} +13 -13
- package/dist/cli/{csv-QCLQOIEA.mjs → csv-GPVCETS2.mjs} +4 -4
- package/dist/cli/{db-P25LGP33.mjs → db-F5UJTBGP.mjs} +6 -6
- package/dist/cli/{db-5TLBZDT3.js → db-LXYV4GPZ.js} +27 -27
- package/dist/cli/{describe-W2H5DHR6.mjs → describe-GYWCI7I6.mjs} +17 -17
- package/dist/cli/describe-IB7SUIUT.js +48 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-VYZCYUBR.mjs → executions-6NL2YW76.mjs} +6 -6
- package/dist/cli/{executions-YHFAWJOJ.js → executions-6SJKTY2L.js} +8 -8
- package/dist/cli/{feedback-K2FWYYLZ.mjs → feedback-7AMQCNTB.mjs} +4 -4
- package/dist/cli/{feedback-RJF3QSBB.js → feedback-E3HULSQD.js} +8 -8
- package/dist/cli/{git-S3APUPLL.mjs → git-74IS2EFH.mjs} +5 -5
- package/dist/cli/git-A2QIIMW5.js +25 -0
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-ICYZACTW.mjs → legacy-noops-52FFRTRZ.mjs} +5 -5
- package/dist/cli/{legacy-noops-3SWNRE7Z.js → legacy-noops-ALWUQPKS.js} +8 -8
- package/dist/cli/{monitors-DEZCEQLB.mjs → monitors-VTJIWWW2.mjs} +7 -7
- package/dist/cli/{monitors-VRIWTRPG.js → monitors-Z4ADOGTY.js} +91 -91
- package/dist/cli/{org-NX752DTE.js → org-2BTEKDF5.js} +72 -72
- package/dist/cli/{org-IQW5ZIAO.mjs → org-7GU6H7JL.mjs} +6 -6
- package/dist/cli/{pages-5WQRVVKX.mjs → pages-I6PFQGEU.mjs} +6 -6
- package/dist/cli/{pages-YIBWYGVS.js → pages-MG36E7RY.js} +17 -17
- package/dist/cli/{play-WOMJXS4O.mjs → play-7KFSLJX2.mjs} +18 -18
- package/dist/cli/{play-3EXNH3HD.js → play-VN52S3RV.js} +321 -321
- package/dist/cli/{providers-XDVPYRTS.mjs → providers-D46JDEL2.mjs} +6 -6
- package/dist/cli/{providers-C2WYSR2Y.js → providers-W5XLII66.js} +9 -9
- package/dist/cli/{quickstart-YMSIL2TK.mjs → quickstart-4GTXBZHY.mjs} +4 -4
- package/dist/cli/{quickstart-7RABZF66.js → quickstart-TIZAC63S.js} +6 -6
- package/dist/cli/{run-5QVVWFGL.js → run-FOVEMYYX.js} +36 -36
- package/dist/cli/{run-A4JD6TAR.mjs → run-LE3D4LVU.mjs} +22 -22
- package/dist/cli/{search-2TOSF2G3.mjs → search-6YL6WJMQ.mjs} +7 -7
- package/dist/cli/search-HN6SVDQU.js +32 -0
- package/dist/cli/{secrets-Q7UVOSNM.js → secrets-CSTTTMZH.js} +15 -15
- package/dist/cli/{secrets-BUN4ORE7.mjs → secrets-D66U6RTT.mjs} +6 -6
- package/dist/cli/{sessions-NXQOQ4HX.js → sessions-45M2NRAA.js} +6 -6
- package/dist/cli/{sessions-IAOORI6X.mjs → sessions-XIO3OUER.mjs} +5 -5
- package/dist/cli/{settings-WD4KSY5S.js → settings-N42CVKSK.js} +78 -78
- package/dist/cli/{settings-BMI373AI.mjs → settings-R33X2D5T.mjs} +11 -11
- package/dist/cli/{setup-55VIWAWR.mjs → setup-CBBC4FQP.mjs} +9 -9
- package/dist/cli/{setup-3IA7BVPE.js → setup-HREDVNF2.js} +44 -44
- package/dist/cli/{skills-GKITMBTM.mjs → skills-4X6WS2PT.mjs} +9 -7
- package/dist/cli/skills-QZ6HZX2T.js +33 -0
- package/dist/cli/tools-KFIH7UWB.js +55 -0
- package/dist/cli/{tools-XHCFC7GP.mjs → tools-YR46YFR2.mjs} +16 -16
- package/dist/cli/{update-SWB24YKE.mjs → update-5CYAZX5X.mjs} +9 -9
- package/dist/cli/update-VZLEJLWJ.js +33 -0
- package/dist/cli/{workflow-5QPMFI3Z.js → workflow-M7AA722W.js} +17 -17
- package/dist/cli/{workflow-XO4CKUA7.mjs → workflow-NKQ3CWPK.mjs} +7 -7
- package/dist/{client-Bgl0_zXi.d.mts → client-AjmfA5nR.d.mts} +1 -1
- package/dist/{client-_ah6IuhK.d.ts → client-DMyY-QL8.d.ts} +1 -1
- package/dist/{client-core-C-ZF5vh9.d.ts → client-core-C705vFyV.d.ts} +1 -1
- package/dist/{client-core-Bfsedm0_.d.mts → client-core-CpBbvLEX.d.mts} +1 -1
- package/dist/{compiler-manifest-CCOqDGjU.d.mts → compiler-manifest-hqIAukR0.d.mts} +1 -1
- package/dist/{compiler-manifest-CCOqDGjU.d.ts → compiler-manifest-hqIAukR0.d.ts} +1 -1
- package/dist/{errors-Cy3kPnsi.d.ts → errors-CRO2qQ6k.d.ts} +1 -1
- package/dist/{errors-BLccD7tG.d.mts → errors-DIHVetNY.d.mts} +1 -1
- package/dist/{index-D5e4h1-H.d.ts → index-B8DVoeYt.d.ts} +1 -1
- package/dist/{index-4-j44HuT.d.mts → index-DVZ_X4Gb.d.mts} +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +110 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +3 -3
- package/dist/release.d.ts +3 -3
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-O6KAH543.js +0 -41
- package/dist/cli/describe-44L7OBGM.js +0 -48
- package/dist/cli/git-F3EI5DY5.js +0 -25
- package/dist/cli/search-772R7YHI.js +0 -32
- package/dist/cli/skills-PUUTFMP3.js +0 -31
- package/dist/cli/tools-3WX7TUUG.js +0 -55
- package/dist/cli/update-PC3CLODV.js +0 -33
|
@@ -11,23 +11,29 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkB7PEXXRWjs = require('./chunk-B7PEXXRW.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkAS3VECCYjs = require('./chunk-AS3VECCY.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk7HAUVMRFjs = require('./chunk-7HAUVMRF.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk5AEEINTUjs = require('./chunk-5AEEINTU.js');
|
|
28
28
|
|
|
29
29
|
// src/cli/commands/skills.ts
|
|
30
30
|
var _child_process = require('child_process');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
31
37
|
var _fs = require('fs');
|
|
32
38
|
var _os = require('os');
|
|
33
39
|
var _path = require('path');
|
|
@@ -67,6 +73,55 @@ function workspaceSkillRootsForAgents(agents) {
|
|
|
67
73
|
)
|
|
68
74
|
].sort((a, b) => a.localeCompare(b));
|
|
69
75
|
}
|
|
76
|
+
function installedSkillRoots(agent, scope, root) {
|
|
77
|
+
if (scope === "local") {
|
|
78
|
+
const dirs = root ? WORKSPACE_SKILL_ROOTS_BY_AGENT[agent] : void 0;
|
|
79
|
+
return dirs ? dirs.map((dir) => _path.join.call(void 0, root, dir, "skills")) : null;
|
|
80
|
+
}
|
|
81
|
+
const home = _os.homedir.call(void 0, );
|
|
82
|
+
const shared = _path.join.call(void 0, home, ".agents", "skills");
|
|
83
|
+
const claude = _path.join.call(void 0,
|
|
84
|
+
_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.CLAUDE_CONFIG_DIR, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) || _path.join.call(void 0, home, ".claude"),
|
|
85
|
+
"skills"
|
|
86
|
+
);
|
|
87
|
+
switch (agent) {
|
|
88
|
+
case "claude-code":
|
|
89
|
+
return [claude];
|
|
90
|
+
case "codex":
|
|
91
|
+
case "cursor":
|
|
92
|
+
case "gemini-cli":
|
|
93
|
+
case "antigravity":
|
|
94
|
+
case "cline":
|
|
95
|
+
return [shared];
|
|
96
|
+
case "windsurf":
|
|
97
|
+
return [_path.join.call(void 0, home, ".codeium", "windsurf", "skills")];
|
|
98
|
+
case "*":
|
|
99
|
+
return [shared, claude];
|
|
100
|
+
default:
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
var INSTALL_MTIME_SLACK_MS = 2e3;
|
|
105
|
+
function writtenSince(path, sinceMs) {
|
|
106
|
+
try {
|
|
107
|
+
return _fs.statSync.call(void 0, path).mtimeMs >= sinceMs - INSTALL_MTIME_SLACK_MS;
|
|
108
|
+
} catch (e) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function missingInstalledSkills(plan, sinceMs) {
|
|
113
|
+
const missing = /* @__PURE__ */ new Set();
|
|
114
|
+
for (const agent of plan.agents) {
|
|
115
|
+
const dirs = installedSkillRoots(agent, plan.scope, plan.root);
|
|
116
|
+
if (!dirs) continue;
|
|
117
|
+
for (const name of plan.skillNames) {
|
|
118
|
+
if (!dirs.some((dir) => writtenSince(_path.join.call(void 0, dir, name, "SKILL.md"), sinceMs))) {
|
|
119
|
+
missing.add(name);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return [...missing].sort((a, b) => a.localeCompare(b));
|
|
124
|
+
}
|
|
70
125
|
function normalizeScope(value) {
|
|
71
126
|
if (value === "global") return "global";
|
|
72
127
|
if (value === "local") return "local";
|
|
@@ -77,7 +132,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
77
132
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
78
133
|
}
|
|
79
134
|
function resolveLocalRoot() {
|
|
80
|
-
const target =
|
|
135
|
+
const target = _chunk7HAUVMRFjs.resolveProjectPinTarget.call(void 0, );
|
|
81
136
|
if (!target.ok) {
|
|
82
137
|
throw new Error(
|
|
83
138
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -88,7 +143,7 @@ function resolveLocalRoot() {
|
|
|
88
143
|
return target.dir;
|
|
89
144
|
}
|
|
90
145
|
function detectSkillsAgents(input) {
|
|
91
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
146
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunk5AEEINTUjs.detectAgentRuntime.call(void 0, )));
|
|
92
147
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
93
148
|
if (knownAgent) return [knownAgent];
|
|
94
149
|
const roots = [
|
|
@@ -103,11 +158,11 @@ function detectSkillsAgents(input) {
|
|
|
103
158
|
return detected.length > 0 ? detected : ["*"];
|
|
104
159
|
}
|
|
105
160
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
106
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
161
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunk7HAUVMRFjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
107
162
|
}
|
|
108
163
|
function buildSkillsPlan(input) {
|
|
109
164
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
110
|
-
const legacyNames = [...
|
|
165
|
+
const legacyNames = [..._chunkB7PEXXRWjs.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
111
166
|
(a, b) => a.localeCompare(b)
|
|
112
167
|
);
|
|
113
168
|
return {
|
|
@@ -121,7 +176,7 @@ function buildSkillsPlan(input) {
|
|
|
121
176
|
args: [
|
|
122
177
|
"exec",
|
|
123
178
|
"--yes",
|
|
124
|
-
`--package=${
|
|
179
|
+
`--package=${_chunkB7PEXXRWjs.SKILLS_NPX_PACKAGE}`,
|
|
125
180
|
"--",
|
|
126
181
|
"skills",
|
|
127
182
|
"remove",
|
|
@@ -137,11 +192,11 @@ function buildSkillsPlan(input) {
|
|
|
137
192
|
args: [
|
|
138
193
|
"exec",
|
|
139
194
|
"--yes",
|
|
140
|
-
`--package=${
|
|
195
|
+
`--package=${_chunkB7PEXXRWjs.SKILLS_NPX_PACKAGE}`,
|
|
141
196
|
"--",
|
|
142
197
|
"skills",
|
|
143
198
|
"add",
|
|
144
|
-
|
|
199
|
+
_chunkB7PEXXRWjs.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
145
200
|
"--agent",
|
|
146
201
|
...input.agents,
|
|
147
202
|
...scopeArgs,
|
|
@@ -172,13 +227,13 @@ function readSkillsInstallState(path) {
|
|
|
172
227
|
try {
|
|
173
228
|
const parsed = JSON.parse(_fs.readFileSync.call(void 0, path, "utf8"));
|
|
174
229
|
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
|
|
175
|
-
} catch (
|
|
230
|
+
} catch (e2) {
|
|
176
231
|
return null;
|
|
177
232
|
}
|
|
178
233
|
}
|
|
179
234
|
function runProcess(command, args, cwd) {
|
|
180
235
|
return new Promise((resolve, reject) => {
|
|
181
|
-
const plan =
|
|
236
|
+
const plan = _chunkB7PEXXRWjs.resolveShellSpawn.call(void 0,
|
|
182
237
|
command,
|
|
183
238
|
args,
|
|
184
239
|
process.platform,
|
|
@@ -200,7 +255,7 @@ function runProcess(command, args, cwd) {
|
|
|
200
255
|
child.kill("SIGTERM");
|
|
201
256
|
reject(
|
|
202
257
|
new Error(
|
|
203
|
-
`${
|
|
258
|
+
`${_chunkB7PEXXRWjs.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
204
259
|
)
|
|
205
260
|
);
|
|
206
261
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -211,7 +266,7 @@ function runProcess(command, args, cwd) {
|
|
|
211
266
|
child.once("close", (code) => {
|
|
212
267
|
clearTimeout(timeout);
|
|
213
268
|
if (code && stderr.trim()) {
|
|
214
|
-
process.stderr.write(`${
|
|
269
|
+
process.stderr.write(`${_chunkB7PEXXRWjs.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
215
270
|
`);
|
|
216
271
|
}
|
|
217
272
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -225,7 +280,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
225
280
|
scope = normalizeScope(options.scope);
|
|
226
281
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
227
282
|
} catch (error) {
|
|
228
|
-
|
|
283
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
229
284
|
{
|
|
230
285
|
ok: false,
|
|
231
286
|
status: "failed",
|
|
@@ -237,22 +292,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
237
292
|
);
|
|
238
293
|
return 2;
|
|
239
294
|
}
|
|
240
|
-
const baseUrl =
|
|
295
|
+
const baseUrl = _chunk7HAUVMRFjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
241
296
|
const catalog = {
|
|
242
|
-
skillNames: [...
|
|
243
|
-
version:
|
|
297
|
+
skillNames: [..._chunkB7PEXXRWjs.DEFAULT_SDK_SKILL_NAMES],
|
|
298
|
+
version: _chunk5AEEINTUjs.SDK_VERSION
|
|
244
299
|
};
|
|
245
300
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
246
301
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
247
302
|
if (options.dryRun) {
|
|
248
|
-
|
|
303
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
249
304
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
250
305
|
{ json: options.json }
|
|
251
306
|
);
|
|
252
307
|
return 0;
|
|
253
308
|
}
|
|
254
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
255
|
-
|
|
309
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkB7PEXXRWjs.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
310
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
256
311
|
{
|
|
257
312
|
ok: true,
|
|
258
313
|
status: "current",
|
|
@@ -284,10 +339,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
284
339
|
}
|
|
285
340
|
if (scope === "local" && root) {
|
|
286
341
|
const managedNames = [
|
|
287
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
342
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkB7PEXXRWjs.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
288
343
|
];
|
|
289
344
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
290
|
-
|
|
345
|
+
_chunk7HAUVMRFjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
291
346
|
".deepline/",
|
|
292
347
|
...agentRoots.flatMap(
|
|
293
348
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -296,7 +351,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
296
351
|
}
|
|
297
352
|
let lease;
|
|
298
353
|
try {
|
|
299
|
-
lease = scope === "global" ? await
|
|
354
|
+
lease = scope === "global" ? await _chunkB7PEXXRWjs.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
300
355
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
301
356
|
onWait: () => process.stderr.write(
|
|
302
357
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -304,8 +359,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
304
359
|
}) : { release: () => {
|
|
305
360
|
} };
|
|
306
361
|
} catch (error) {
|
|
307
|
-
if (!(error instanceof
|
|
308
|
-
|
|
362
|
+
if (!(error instanceof _chunkB7PEXXRWjs.SkillsStateUnavailableError)) throw error;
|
|
363
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
309
364
|
{
|
|
310
365
|
ok: false,
|
|
311
366
|
status: "failed",
|
|
@@ -321,7 +376,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
321
376
|
return 5;
|
|
322
377
|
}
|
|
323
378
|
if (!lease) {
|
|
324
|
-
|
|
379
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
325
380
|
{
|
|
326
381
|
ok: false,
|
|
327
382
|
status: "failed",
|
|
@@ -330,7 +385,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
330
385
|
scope,
|
|
331
386
|
agents,
|
|
332
387
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
333
|
-
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${
|
|
388
|
+
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${_chunkB7PEXXRWjs.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
334
389
|
},
|
|
335
390
|
{ json: options.json }
|
|
336
391
|
);
|
|
@@ -357,17 +412,29 @@ async function runSkillsInstallWithLease(input) {
|
|
|
357
412
|
`
|
|
358
413
|
);
|
|
359
414
|
const execute = _nullishCoalesce(dependencies.runProcess, () => ( runProcess));
|
|
415
|
+
let missing = [];
|
|
416
|
+
const installStartedAt = Date.now();
|
|
360
417
|
try {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
418
|
+
for (let attempt = 1; attempt <= 2; attempt += 1) {
|
|
419
|
+
const installCode = await execute(
|
|
420
|
+
plan.install.command,
|
|
421
|
+
plan.install.args,
|
|
422
|
+
_nullishCoalesce(root, () => ( void 0))
|
|
423
|
+
);
|
|
424
|
+
if (installCode !== 0) {
|
|
425
|
+
throw new Error("Could not install the current Deepline skills.");
|
|
426
|
+
}
|
|
427
|
+
missing = missingInstalledSkills(plan, installStartedAt);
|
|
428
|
+
if (missing.length === 0) break;
|
|
429
|
+
if (attempt === 1) {
|
|
430
|
+
process.stderr.write(
|
|
431
|
+
`The skills installer left out ${missing.join(", ")}; retrying once...
|
|
432
|
+
`
|
|
433
|
+
);
|
|
434
|
+
}
|
|
368
435
|
}
|
|
369
436
|
} catch (error) {
|
|
370
|
-
|
|
437
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
371
438
|
{
|
|
372
439
|
ok: false,
|
|
373
440
|
status: "failed",
|
|
@@ -382,6 +449,23 @@ async function runSkillsInstallWithLease(input) {
|
|
|
382
449
|
);
|
|
383
450
|
return 5;
|
|
384
451
|
}
|
|
452
|
+
if (missing.length > 0) {
|
|
453
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
454
|
+
{
|
|
455
|
+
ok: false,
|
|
456
|
+
status: "failed",
|
|
457
|
+
code: "SKILLS_INSTALL_INCOMPLETE",
|
|
458
|
+
exitCode: 5,
|
|
459
|
+
scope,
|
|
460
|
+
agents,
|
|
461
|
+
missingSkills: missing,
|
|
462
|
+
message: `The skills installer exited successfully but did not install: ${missing.join(", ")}.`,
|
|
463
|
+
next: `deepline skills --scope ${scope}`
|
|
464
|
+
},
|
|
465
|
+
{ json: options.json }
|
|
466
|
+
);
|
|
467
|
+
return 5;
|
|
468
|
+
}
|
|
385
469
|
try {
|
|
386
470
|
const removeCode = await execute(
|
|
387
471
|
plan.remove.command,
|
|
@@ -406,7 +490,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
406
490
|
{
|
|
407
491
|
schemaVersion: 1,
|
|
408
492
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
409
|
-
cliVersion:
|
|
493
|
+
cliVersion: _chunk5AEEINTUjs.SDK_VERSION,
|
|
410
494
|
scope,
|
|
411
495
|
agents,
|
|
412
496
|
skillsVersion: plan.version,
|
|
@@ -419,9 +503,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
419
503
|
"utf8"
|
|
420
504
|
);
|
|
421
505
|
if (scope === "global") {
|
|
422
|
-
|
|
506
|
+
_chunkB7PEXXRWjs.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
423
507
|
}
|
|
424
|
-
|
|
508
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
425
509
|
{
|
|
426
510
|
ok: true,
|
|
427
511
|
status: "complete",
|
|
@@ -452,7 +536,7 @@ function registerSkillsCommand(program) {
|
|
|
452
536
|
"after",
|
|
453
537
|
`
|
|
454
538
|
Notes:
|
|
455
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
539
|
+
This command reinstalls current Deepline-managed skills using ${_chunkB7PEXXRWjs.SKILLS_NPX_PACKAGE},
|
|
456
540
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
457
541
|
persistent project.
|
|
458
542
|
|
|
@@ -464,13 +548,13 @@ Examples:
|
|
|
464
548
|
).action(async (options) => {
|
|
465
549
|
process.exitCode = await runSkillsCommand(options);
|
|
466
550
|
});
|
|
467
|
-
program.command(
|
|
551
|
+
program.command(_chunkB7PEXXRWjs.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
468
552
|
"--claim <token>",
|
|
469
553
|
"Owner token of the leases this child was started for."
|
|
470
554
|
).action(async (options) => {
|
|
471
|
-
const claim = _optionalChain([options, 'access',
|
|
555
|
+
const claim = _optionalChain([options, 'access', _5 => _5.claim, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]);
|
|
472
556
|
if (!claim) {
|
|
473
|
-
|
|
557
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
474
558
|
{
|
|
475
559
|
ok: false,
|
|
476
560
|
status: "failed",
|
|
@@ -483,7 +567,7 @@ Examples:
|
|
|
483
567
|
process.exitCode = 2;
|
|
484
568
|
return;
|
|
485
569
|
}
|
|
486
|
-
await
|
|
570
|
+
await _chunkB7PEXXRWjs.syncSdkSkillsIfNeeded.call(void 0, _chunk7HAUVMRFjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
487
571
|
mode: "inline",
|
|
488
572
|
notices: "defer",
|
|
489
573
|
claim
|
|
@@ -500,4 +584,5 @@ Examples:
|
|
|
500
584
|
|
|
501
585
|
|
|
502
586
|
|
|
503
|
-
|
|
587
|
+
|
|
588
|
+
exports.workspaceSkillRootsForAgents = workspaceSkillRootsForAgents; exports.missingInstalledSkills = missingInstalledSkills; exports.inferActiveSkillsScope = inferActiveSkillsScope; exports.detectSkillsAgents = detectSkillsAgents; exports.skillsStatePathForScope = skillsStatePathForScope; exports.buildSkillsPlan = buildSkillsPlan; exports.isSkillsPlanCurrent = isSkillsPlanCurrent; exports.runSkillsCommand = runSkillsCommand; exports.registerSkillsCommand = registerSkillsCommand;
|
|
@@ -1,19 +1,19 @@
|
|
|
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 _chunkULKGYVYPjs = require('./chunk-ULKGYVYP.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkWTPRRKZAjs = require('./chunk-WTPRRKZA.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkB7PEXXRWjs = require('./chunk-B7PEXXRW.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkAS3VECCYjs = require('./chunk-AS3VECCY.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunk7HAUVMRFjs = require('./chunk-7HAUVMRF.js');
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
var _child_process = require('child_process');
|
|
@@ -495,7 +495,7 @@ function normalizedNpmPrefix(value) {
|
|
|
495
495
|
}
|
|
496
496
|
function resolveNpmGlobalPrefix(env) {
|
|
497
497
|
try {
|
|
498
|
-
const plan =
|
|
498
|
+
const plan = _chunkB7PEXXRWjs.resolveShellSpawn.call(void 0,
|
|
499
499
|
"npm",
|
|
500
500
|
["prefix", "-g"],
|
|
501
501
|
process.platform,
|
|
@@ -556,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
557
557
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
558
558
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
559
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
560
|
-
const npmGlobalInstallFlags =
|
|
559
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkULKGYVYPjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
560
|
+
const npmGlobalInstallFlags = _chunkULKGYVYPjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
561
561
|
const args = installPrefix ? [
|
|
562
562
|
"install",
|
|
563
563
|
"-g",
|
|
@@ -567,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
567
567
|
packageSpec
|
|
568
568
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
569
569
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
570
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
570
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunk7HAUVMRFjs.autoDetectBaseUrl.call(void 0, )
|
|
571
571
|
);
|
|
572
572
|
return {
|
|
573
573
|
kind: "npm-global",
|
|
@@ -816,7 +816,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
816
816
|
function runCommand(command, args, env = process.env) {
|
|
817
817
|
return new Promise((resolveResult) => {
|
|
818
818
|
let output = "";
|
|
819
|
-
const plan =
|
|
819
|
+
const plan = _chunkB7PEXXRWjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
820
820
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
821
821
|
stdio: ["inherit", "pipe", "pipe"],
|
|
822
822
|
shell: plan.shell,
|
|
@@ -1199,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1199
1199
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1200
1200
|
}
|
|
1201
1201
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1202
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1202
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunk7HAUVMRFjs.autoDetectBaseUrl));
|
|
1203
1203
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1204
1204
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1205
1205
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1206
1206
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1207
1207
|
process.stdout.write = (() => true);
|
|
1208
1208
|
try {
|
|
1209
|
-
const exitCode = await
|
|
1209
|
+
const exitCode = await _chunkWTPRRKZAjs.runSkillsCommand.call(void 0, { json: true });
|
|
1210
1210
|
if (exitCode !== 0) {
|
|
1211
1211
|
throw new Error(
|
|
1212
1212
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1277,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1277
1277
|
]
|
|
1278
1278
|
};
|
|
1279
1279
|
if (options.json && !options.executeWithJson) {
|
|
1280
|
-
|
|
1280
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1281
1281
|
return 0;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (options.printCommand) {
|
|
1284
|
-
|
|
1284
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{
|
|
1286
1286
|
...plan,
|
|
1287
1287
|
render: {
|
|
@@ -1294,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1294
1294
|
return 0;
|
|
1295
1295
|
}
|
|
1296
1296
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1297
|
-
|
|
1297
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1298
1298
|
return 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1324,7 +1324,7 @@ To retry with full installer output, run: deepline skills
|
|
|
1324
1324
|
);
|
|
1325
1325
|
}
|
|
1326
1326
|
if (options.executeWithJson && options.json) {
|
|
1327
|
-
|
|
1327
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0,
|
|
1328
1328
|
{
|
|
1329
1329
|
ok: true,
|
|
1330
1330
|
pinnedVersion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PlayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5PYBZ2H.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZOXV6WFI.mjs";
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
package/dist/cli/command-docs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkWFVEMDQLjs = require('./chunk-WFVEMDQL.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 = _chunkWFVEMDQLjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunkWFVEMDQLjs.COMMAND_DOCS; exports.commandDocKey = _chunkWFVEMDQLjs.commandDocKey; exports.helpDetailFromArgv = _chunkWFVEMDQLjs.helpDetailFromArgv; exports.renderActionExplanation = _chunkWFVEMDQLjs.renderActionExplanation; exports.renderCommandExplanation = _chunkWFVEMDQLjs.renderCommandExplanation; exports.renderDocText = _chunkWFVEMDQLjs.renderDocText;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunkAS3VECCYjs = require('./chunk-AS3VECCY.js');
|
|
8
|
+
require('./chunk-7HAUVMRF.js');
|
|
9
|
+
require('./chunk-5AEEINTU.js');
|
|
10
10
|
require('./chunk-ALJJRZNJ.js');
|
|
11
11
|
require('./chunk-XNYIZMNQ.js');
|
|
12
12
|
require('./chunk-DIAWYWT5.js');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-A6BETJ2A.js');
|
|
14
14
|
require('./chunk-OG64RBAC.js');
|
|
15
15
|
require('./chunk-COGTRVWW.js');
|
|
16
16
|
|
|
@@ -128,7 +128,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
128
128
|
column.length,
|
|
129
129
|
...rows.map((row) => {
|
|
130
130
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
131
|
-
return (verbose ? value :
|
|
131
|
+
return (verbose ? value : _chunkAS3VECCYjs.clip.call(void 0, value, 42)).length;
|
|
132
132
|
})
|
|
133
133
|
)
|
|
134
134
|
])
|
|
@@ -138,7 +138,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
138
138
|
const body = rows.map(
|
|
139
139
|
(row) => columns.map((column) => {
|
|
140
140
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
141
|
-
const display = verbose ? raw :
|
|
141
|
+
const display = verbose ? raw : _chunkAS3VECCYjs.clip.call(void 0, raw, 42);
|
|
142
142
|
return display.padEnd(widths[column]);
|
|
143
143
|
}).join(" | ")
|
|
144
144
|
);
|
|
@@ -158,7 +158,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
158
158
|
{ exitCode: 2 }
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
|
-
const allRows =
|
|
161
|
+
const allRows = _chunkAS3VECCYjs.readCsvRows.call(void 0, csvPath);
|
|
162
162
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
163
163
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
164
164
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -171,7 +171,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
171
171
|
if (options.summary) {
|
|
172
172
|
const summaries = summarizeColumns(selected, columns);
|
|
173
173
|
if (format === "json") {
|
|
174
|
-
|
|
174
|
+
_chunkAS3VECCYjs.printJson.call(void 0, {
|
|
175
175
|
rows: summaries,
|
|
176
176
|
total_rows: selected.length,
|
|
177
177
|
source_total_rows: allRows.length
|
|
@@ -180,7 +180,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
180
180
|
}
|
|
181
181
|
const displayRows = summaryDisplayRows(summaries);
|
|
182
182
|
if (format === "csv") {
|
|
183
|
-
process.stdout.write(
|
|
183
|
+
process.stdout.write(_chunkAS3VECCYjs.csvStringFromRows.call(void 0, displayRows));
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
process.stdout.write(
|
|
@@ -195,7 +195,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
if (format === "json") {
|
|
198
|
-
|
|
198
|
+
_chunkAS3VECCYjs.printJson.call(void 0, {
|
|
199
199
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
200
200
|
});
|
|
201
201
|
return;
|
|
@@ -438,7 +438,7 @@ async function handleCsvRenderStart(options) {
|
|
|
438
438
|
if (log) {
|
|
439
439
|
detail = `
|
|
440
440
|
CSV render log:
|
|
441
|
-
${
|
|
441
|
+
${_chunkAS3VECCYjs.clip.call(void 0, log, 2e3)}`;
|
|
442
442
|
}
|
|
443
443
|
} catch (e7) {
|
|
444
444
|
}
|
|
@@ -489,7 +489,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
489
489
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
490
490
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
491
491
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
492
|
-
|
|
492
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0, payload, {
|
|
493
493
|
json: options.json,
|
|
494
494
|
text: `${lines.join("\n")}
|
|
495
495
|
`
|
|
@@ -525,7 +525,7 @@ async function handleCsvRenderStop(options) {
|
|
|
525
525
|
};
|
|
526
526
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
527
527
|
` : "No running CSV render process found.\n";
|
|
528
|
-
|
|
528
|
+
_chunkAS3VECCYjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
529
529
|
}
|
|
530
530
|
async function handleCsvRender(action, options) {
|
|
531
531
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|