ccjk 13.3.6 → 13.3.7
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/chunks/agent-teams.mjs +7 -5
- package/dist/chunks/agent.mjs +2 -2
- package/dist/chunks/agents.mjs +16 -16
- package/dist/chunks/api-cli.mjs +6 -6
- package/dist/chunks/api-providers.mjs +1 -1
- package/dist/chunks/api.mjs +4 -4
- package/dist/chunks/auto-bootstrap.mjs +1 -1
- package/dist/chunks/auto-fix.mjs +49 -4
- package/dist/chunks/auto-fixer.mjs +7 -5
- package/dist/chunks/auto-init.mjs +9 -7208
- package/dist/chunks/auto-memory-bridge.mjs +9 -3
- package/dist/chunks/auto-updater.mjs +9 -9
- package/dist/chunks/auto-upgrade.mjs +5 -3
- package/dist/chunks/banner.mjs +4 -3
- package/dist/chunks/boost.mjs +118 -62
- package/dist/chunks/ccjk-agents.mjs +3 -3
- package/dist/chunks/ccjk-all.mjs +7 -7
- package/dist/chunks/ccjk-config.mjs +2 -2
- package/dist/chunks/ccjk-hooks.mjs +4 -4
- package/dist/chunks/ccjk-mcp.mjs +5 -5
- package/dist/chunks/ccjk-setup.mjs +5 -5
- package/dist/chunks/ccjk-skills.mjs +5 -5
- package/dist/chunks/ccr.mjs +18 -16
- package/dist/chunks/ccu.mjs +2 -2
- package/dist/chunks/check-updates.mjs +8 -8
- package/dist/chunks/claude-code-config-manager.mjs +12 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +7 -7
- package/dist/chunks/claude-config.mjs +1 -1
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +15 -15
- package/dist/chunks/codex-config-switch.mjs +7 -7
- package/dist/chunks/codex-provider-manager.mjs +7 -7
- package/dist/chunks/codex-uninstaller.mjs +2 -2
- package/dist/chunks/codex.mjs +5 -5
- package/dist/chunks/commands.mjs +2 -2
- package/dist/chunks/commands2.mjs +3 -3
- package/dist/chunks/commit.mjs +2 -2
- package/dist/chunks/completion.mjs +2 -2
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +8 -8
- package/dist/chunks/config.mjs +6 -5
- package/dist/chunks/config2.mjs +5 -5
- package/dist/chunks/config3.mjs +4 -4
- package/dist/chunks/constants.mjs +1 -1
- package/dist/chunks/context-opt.mjs +92 -90
- package/dist/chunks/context.mjs +659 -0
- package/dist/chunks/dashboard.mjs +14 -9
- package/dist/chunks/doctor.mjs +4 -4
- package/dist/chunks/eval.mjs +502 -0
- package/dist/chunks/evolution.mjs +46 -39
- package/dist/chunks/health-alerts.mjs +9 -9
- package/dist/chunks/help.mjs +1 -1
- package/dist/chunks/hook-installer.mjs +6 -3
- package/dist/chunks/index.mjs +23 -0
- package/dist/chunks/index10.mjs +634 -571
- package/dist/chunks/index11.mjs +1061 -569
- package/dist/chunks/index12.mjs +914 -1076
- package/dist/chunks/index13.mjs +136 -951
- package/dist/chunks/index14.mjs +209 -185
- package/dist/chunks/index2.mjs +19 -24
- package/dist/chunks/index3.mjs +19085 -12
- package/dist/chunks/index4.mjs +16 -19092
- package/dist/chunks/index5.mjs +7602 -16
- package/dist/chunks/index6.mjs +159 -7590
- package/dist/chunks/index7.mjs +1602 -171
- package/dist/chunks/index8.mjs +19 -1602
- package/dist/chunks/index9.mjs +612 -15
- package/dist/chunks/init.mjs +26 -19
- package/dist/chunks/installer.mjs +5 -5
- package/dist/chunks/installer2.mjs +2 -2
- package/dist/chunks/intent-engine.mjs +1 -1
- package/dist/chunks/interview.mjs +4 -4
- package/dist/chunks/manager.mjs +1 -1
- package/dist/chunks/marketplace.mjs +2 -2
- package/dist/chunks/mcp-cli.mjs +12 -12
- package/dist/chunks/mcp.mjs +8 -8
- package/dist/chunks/memory.mjs +8 -8
- package/dist/chunks/menu-hierarchical.mjs +24 -22
- package/dist/chunks/menu.mjs +27 -22
- package/dist/chunks/metrics-display.mjs +2 -2
- package/dist/chunks/migrator.mjs +1 -1
- package/dist/chunks/monitor.mjs +2 -2
- package/dist/chunks/notification.mjs +6 -6
- package/dist/chunks/onboarding-wizard.mjs +6 -5
- package/dist/chunks/onboarding.mjs +4 -4
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +2 -2
- package/dist/chunks/permission-manager.mjs +2 -2
- package/dist/chunks/permissions.mjs +3 -3
- package/dist/chunks/persistence-manager.mjs +19 -12
- package/dist/chunks/persistence.mjs +5 -3
- package/dist/chunks/plugin.mjs +2 -2
- package/dist/chunks/prompts.mjs +5 -5
- package/dist/chunks/providers.mjs +2 -2
- package/dist/chunks/quick-actions.mjs +7 -6
- package/dist/chunks/quick-provider.mjs +5 -4
- package/dist/chunks/quick-setup.mjs +20 -15
- package/dist/chunks/remote.mjs +15 -16
- package/dist/chunks/{convoy-manager.mjs → session-manager.mjs} +1129 -1095
- package/dist/chunks/session.mjs +2 -2
- package/dist/chunks/sessions.mjs +3 -3
- package/dist/chunks/silent-updater.mjs +1 -1
- package/dist/chunks/simple-config.mjs +2 -2
- package/dist/chunks/skill2.mjs +3 -3
- package/dist/chunks/skills-sync.mjs +5 -5
- package/dist/chunks/skills.mjs +3 -3
- package/dist/chunks/slash-commands.mjs +9 -8
- package/dist/chunks/smart-defaults.mjs +9 -5
- package/dist/chunks/startup.mjs +1 -1
- package/dist/chunks/stats.mjs +2 -2
- package/dist/chunks/status.mjs +37 -22
- package/dist/chunks/team.mjs +3 -3
- package/dist/chunks/thinking.mjs +4 -4
- package/dist/chunks/trace.mjs +2 -2
- package/dist/chunks/uninstall.mjs +9 -9
- package/dist/chunks/update.mjs +14 -11
- package/dist/chunks/upgrade-manager.mjs +3 -3
- package/dist/chunks/upgrade.mjs +25 -9
- package/dist/chunks/version-checker.mjs +4 -4
- package/dist/chunks/vim.mjs +3 -3
- package/dist/chunks/workflows.mjs +1 -1
- package/dist/chunks/wsl.mjs +1 -1
- package/dist/chunks/zero-config.mjs +4 -4
- package/dist/cli.mjs +60 -26
- package/dist/index.d.mts +4392 -4392
- package/dist/index.d.ts +4392 -4392
- package/dist/index.mjs +4314 -4314
- package/dist/shared/{ccjk.DcKLglJQ.mjs → ccjk.BIxuVL3_.mjs} +2 -2
- package/dist/shared/{ccjk.DJdmgr2d.mjs → ccjk.BJMRY2Ra.mjs} +5 -3
- package/dist/shared/{ccjk.B1TwPltj.mjs → ccjk.BOu1yav7.mjs} +3 -2
- package/dist/shared/{ccjk.mJpVRDZ8.mjs → ccjk.BWFpnOr3.mjs} +1 -1
- package/dist/shared/{ccjk.BfIpomdz.mjs → ccjk.CHUEFqmw.mjs} +3 -2
- package/dist/shared/{ccjk.CqdbaXqU.mjs → ccjk.CLUL0pAV.mjs} +9 -5
- package/dist/shared/{ccjk.Cot9p9_n.mjs → ccjk.Cjj8SVrn.mjs} +1 -1
- package/dist/shared/{ccjk.CfrpIIKy.mjs → ccjk.Crd_nEfj.mjs} +38 -20
- package/dist/shared/{ccjk.DCw2WnZU.mjs → ccjk.CvChMYvB.mjs} +1 -1
- package/dist/shared/{ccjk.CXzjn01x.mjs → ccjk.D8ZLYSZZ.mjs} +1 -1
- package/dist/shared/{ccjk.BrPUmTqm.mjs → ccjk.DJuyfrlL.mjs} +164 -82
- package/dist/shared/{ccjk.DHXfsrwn.mjs → ccjk.DRfdq6yl.mjs} +4 -4
- package/dist/shared/{ccjk.DXRAZcix.mjs → ccjk.DScm_NnL.mjs} +8 -4
- package/dist/shared/{ccjk.XsJWJuQP.mjs → ccjk.DfZKjHvG.mjs} +6 -128
- package/dist/shared/{ccjk.BFxsJM0k.mjs → ccjk.DwSebGy0.mjs} +4 -3
- package/dist/shared/ccjk.DxWqH-EF.mjs +170 -0
- package/dist/shared/{ccjk.Cwa_FiTX.mjs → ccjk.I6IuYdc_.mjs} +2 -2
- package/dist/shared/{ccjk.DpstNaeR.mjs → ccjk.KpFl2RDA.mjs} +3 -3
- package/dist/shared/{ccjk.dYDLfmph.mjs → ccjk._dESH4Rk.mjs} +1 -1
- package/dist/shared/{ccjk.BxSmJ8B7.mjs → ccjk.wLJHO0Af.mjs} +2 -1
- package/package.json +2 -1
- package/dist/chunks/index15.mjs +0 -218
- package/dist/shared/{ccjk.c-ETfBZ_.mjs → ccjk.eIn-g1yI.mjs} +96 -96
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import a from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
2
|
import { getCloudBaseUrl } from './constants.mjs';
|
|
3
|
-
import { i18n } from './
|
|
3
|
+
import { i18n } from './index5.mjs';
|
|
4
4
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
@@ -157,19 +157,21 @@ async function handleEvolutionCommand(action, args, options) {
|
|
|
157
157
|
}
|
|
158
158
|
} catch (error) {
|
|
159
159
|
const failedMsg = i18n.t("evolution:failed", "Failed");
|
|
160
|
-
console.error(a.red(
|
|
160
|
+
console.error(a.red(`\u274C ${failedMsg}:`), error.message);
|
|
161
161
|
process.exit(1);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
async function showTopCapabilities(client, options) {
|
|
165
165
|
const fetchingMsg = i18n.t("evolution:fetching", "Fetching top capabilities...");
|
|
166
|
-
console.log(a.blue(
|
|
166
|
+
console.log(a.blue(`\u{1F4CA} ${fetchingMsg}`));
|
|
167
167
|
const genes = await client.fetch({
|
|
168
168
|
minGDI: Number.parseInt(options.minGdi || "70"),
|
|
169
169
|
limit: Number.parseInt(options.limit || "30")
|
|
170
170
|
});
|
|
171
171
|
const foundMsg = i18n.t("evolution:found", "Found {{count}} capabilities", { count: genes.length });
|
|
172
|
-
console.log(a.green(
|
|
172
|
+
console.log(a.green(`
|
|
173
|
+
\u2705 ${foundMsg}
|
|
174
|
+
`));
|
|
173
175
|
if (genes.length === 0) {
|
|
174
176
|
const noResultsMsg = i18n.t("evolution:noResults", "No capabilities found");
|
|
175
177
|
console.log(a.yellow(noResultsMsg));
|
|
@@ -178,22 +180,22 @@ async function showTopCapabilities(client, options) {
|
|
|
178
180
|
genes.forEach((gene, index) => {
|
|
179
181
|
console.log(a.bold(`${index + 1}. ${gene.geneId.substring(0, 8)}`));
|
|
180
182
|
const problemLabel = a.cyan(i18n.t("evolution:problem", "Problem"));
|
|
181
|
-
console.log(
|
|
183
|
+
console.log(` ${problemLabel}: ${gene.problemSignature}`);
|
|
182
184
|
const solutionLabel = a.yellow(i18n.t("evolution:solution", "Solution"));
|
|
183
|
-
console.log(
|
|
184
|
-
console.log(
|
|
185
|
+
console.log(` ${solutionLabel}: ${gene.solutionStrategy}`);
|
|
186
|
+
console.log(` ${a.green("GDI")}: ${gene.gdi.toFixed(1)}`);
|
|
185
187
|
const usedLabel = a.gray(i18n.t("evolution:used", "Used"));
|
|
186
188
|
const timesLabel = i18n.t("evolution:times", "times");
|
|
187
|
-
console.log(
|
|
189
|
+
console.log(` ${usedLabel}: ${gene.usageCount} ${timesLabel}`);
|
|
188
190
|
const successLabel = a.gray(i18n.t("evolution:success", "Success"));
|
|
189
191
|
const successRate = (gene.successRate * 100).toFixed(1);
|
|
190
|
-
console.log(
|
|
192
|
+
console.log(` ${successLabel}: ${successRate}%`);
|
|
191
193
|
console.log();
|
|
192
194
|
});
|
|
193
195
|
}
|
|
194
196
|
async function searchSolutions(client, query, options) {
|
|
195
197
|
const searchingMsg = i18n.t("evolution:searching", "Searching for: {{query}}", { query });
|
|
196
|
-
console.log(a.blue(
|
|
198
|
+
console.log(a.blue(`\u{1F50D} ${searchingMsg}`));
|
|
197
199
|
const genes = await client.fetch({
|
|
198
200
|
signature: query,
|
|
199
201
|
minGDI: Number.parseInt(options.minGdi || "60"),
|
|
@@ -201,19 +203,22 @@ async function searchSolutions(client, query, options) {
|
|
|
201
203
|
});
|
|
202
204
|
if (genes.length === 0) {
|
|
203
205
|
const noSolutionsMsg = i18n.t("evolution:noSolutions", "No solutions found");
|
|
204
|
-
console.log(a.yellow(
|
|
206
|
+
console.log(a.yellow(`
|
|
207
|
+
${noSolutionsMsg}`));
|
|
205
208
|
return;
|
|
206
209
|
}
|
|
207
210
|
const foundMsg = i18n.t("evolution:foundSolutions", "Found {{count}} solutions", { count: genes.length });
|
|
208
|
-
console.log(a.green(
|
|
211
|
+
console.log(a.green(`
|
|
212
|
+
\u2705 ${foundMsg}
|
|
213
|
+
`));
|
|
209
214
|
genes.forEach((gene, index) => {
|
|
210
215
|
console.log(a.bold(`${index + 1}. ${gene.problemSignature}`));
|
|
211
|
-
console.log(
|
|
216
|
+
console.log(` ${gene.solutionStrategy}`);
|
|
212
217
|
const usedLabel = i18n.t("evolution:used", "Used");
|
|
213
|
-
console.log(
|
|
218
|
+
console.log(` GDI: ${gene.gdi.toFixed(1)} | ${usedLabel}: ${gene.usageCount}x`);
|
|
214
219
|
if (gene.tags.length > 0) {
|
|
215
220
|
const tagsLabel = a.gray(i18n.t("evolution:tags", "Tags"));
|
|
216
|
-
console.log(
|
|
221
|
+
console.log(` ${tagsLabel}: ${gene.tags.join(", ")}`);
|
|
217
222
|
}
|
|
218
223
|
console.log();
|
|
219
224
|
});
|
|
@@ -230,62 +235,64 @@ async function showGeneDetails(client, geneId) {
|
|
|
230
235
|
}
|
|
231
236
|
async function showStats(client) {
|
|
232
237
|
const fetchingMsg = i18n.t("evolution:fetchingStats", "Fetching statistics...");
|
|
233
|
-
console.log(a.blue(
|
|
238
|
+
console.log(a.blue(`\u{1F4CA} ${fetchingMsg}`));
|
|
234
239
|
const stats = await client.stats();
|
|
235
240
|
console.log(a.bold("\n\u{1F4C8} Evolution Layer Statistics\n"));
|
|
236
241
|
const totalLabel = a.cyan(i18n.t("evolution:totalGenes", "Total Genes in Pool"));
|
|
237
|
-
console.log(totalLabel
|
|
242
|
+
console.log(`${totalLabel}: ${stats.totalGenesInPool}`);
|
|
238
243
|
const myLabel = a.cyan(i18n.t("evolution:myContributions", "My Contributions"));
|
|
239
|
-
console.log(myLabel
|
|
244
|
+
console.log(`${myLabel}: ${stats.myContributions}`);
|
|
240
245
|
const reportsLabel = a.cyan(i18n.t("evolution:reportsSubmitted", "Reports Submitted"));
|
|
241
|
-
console.log(reportsLabel
|
|
246
|
+
console.log(`${reportsLabel}: ${stats.reportsSubmitted}`);
|
|
242
247
|
const successLabel = a.cyan(i18n.t("evolution:successRate", "Success Rate"));
|
|
243
|
-
console.log(successLabel
|
|
248
|
+
console.log(`${successLabel}: ${(stats.successRate * 100).toFixed(1)}%`);
|
|
244
249
|
}
|
|
245
250
|
function displayGene(gene) {
|
|
246
251
|
const detailsLabel = i18n.t("evolution:geneDetails", "Gene Details");
|
|
247
|
-
console.log(a.bold(
|
|
248
|
-
|
|
249
|
-
|
|
252
|
+
console.log(a.bold(`
|
|
253
|
+
\u{1F4E6} ${detailsLabel}
|
|
254
|
+
`));
|
|
255
|
+
console.log(`${a.cyan("ID")}: ${gene.geneId}`);
|
|
256
|
+
console.log(`${a.cyan("Version")}: ${gene.version}`);
|
|
250
257
|
console.log();
|
|
251
258
|
const problemLabel = i18n.t("evolution:problem", "Problem");
|
|
252
|
-
console.log(a.bold(problemLabel
|
|
253
|
-
console.log(
|
|
259
|
+
console.log(a.bold(`${problemLabel}:`));
|
|
260
|
+
console.log(` ${gene.problemSignature}`);
|
|
254
261
|
console.log();
|
|
255
262
|
const solutionLabel = i18n.t("evolution:solution", "Solution");
|
|
256
|
-
console.log(a.bold(solutionLabel
|
|
263
|
+
console.log(a.bold(`${solutionLabel}:`));
|
|
257
264
|
const strategyLabel = i18n.t("evolution:strategy", "Strategy");
|
|
258
|
-
console.log(
|
|
265
|
+
console.log(` ${strategyLabel}: ${gene.solutionStrategy}`);
|
|
259
266
|
if (gene.solutionCode) {
|
|
260
267
|
const codeLabel = i18n.t("evolution:code", "Code");
|
|
261
|
-
console.log(
|
|
262
|
-
const codeLines = gene.solutionCode.split("\n").map((line) =>
|
|
268
|
+
console.log(` ${codeLabel}:`);
|
|
269
|
+
const codeLines = gene.solutionCode.split("\n").map((line) => ` ${line}`).join("\n");
|
|
263
270
|
console.log(a.gray(codeLines));
|
|
264
271
|
}
|
|
265
272
|
if (gene.solutionSteps.length > 0) {
|
|
266
273
|
const stepsLabel = i18n.t("evolution:steps", "Steps");
|
|
267
|
-
console.log(
|
|
274
|
+
console.log(` ${stepsLabel}:`);
|
|
268
275
|
gene.solutionSteps.forEach((step, i) => {
|
|
269
|
-
console.log(
|
|
276
|
+
console.log(` ${i + 1}. ${step}`);
|
|
270
277
|
});
|
|
271
278
|
}
|
|
272
279
|
console.log();
|
|
273
280
|
const qualityLabel = i18n.t("evolution:quality", "Quality");
|
|
274
|
-
console.log(a.bold(qualityLabel
|
|
275
|
-
console.log(
|
|
281
|
+
console.log(a.bold(`${qualityLabel}:`));
|
|
282
|
+
console.log(` GDI: ${gene.gdi.toFixed(1)}`);
|
|
276
283
|
const successRateLabel = i18n.t("evolution:successRate", "Success Rate");
|
|
277
|
-
console.log(
|
|
284
|
+
console.log(` ${successRateLabel}: ${(gene.successRate * 100).toFixed(1)}%`);
|
|
278
285
|
const usageCountLabel = i18n.t("evolution:usageCount", "Usage Count");
|
|
279
|
-
console.log(
|
|
286
|
+
console.log(` ${usageCountLabel}: ${gene.usageCount}`);
|
|
280
287
|
const passRateLabel = i18n.t("evolution:passRate", "Pass Rate");
|
|
281
|
-
console.log(
|
|
288
|
+
console.log(` ${passRateLabel}: ${(gene.passRate * 100).toFixed(1)}%`);
|
|
282
289
|
if (gene.tags.length > 0) {
|
|
283
290
|
console.log();
|
|
284
291
|
const tagsLabel = i18n.t("evolution:tags", "Tags");
|
|
285
|
-
console.log(
|
|
292
|
+
console.log(` ${tagsLabel}: ${gene.tags.join(", ")}`);
|
|
286
293
|
}
|
|
287
294
|
const createdLabel = i18n.t("evolution:createdAt", "Created At");
|
|
288
|
-
console.log(
|
|
295
|
+
console.log(` ${createdLabel}: ${gene.createdAt}`);
|
|
289
296
|
}
|
|
290
297
|
|
|
291
298
|
export { handleEvolutionCommand };
|
|
@@ -75,7 +75,7 @@ class DatabaseHealthMonitor {
|
|
|
75
75
|
* Check database integrity
|
|
76
76
|
*/
|
|
77
77
|
async checkIntegrity() {
|
|
78
|
-
const
|
|
78
|
+
const _startTime = Date.now();
|
|
79
79
|
const errors = [];
|
|
80
80
|
const corruptedTables = [];
|
|
81
81
|
try {
|
|
@@ -99,14 +99,14 @@ class DatabaseHealthMonitor {
|
|
|
99
99
|
passed: passed && fkResult.length === 0,
|
|
100
100
|
errors,
|
|
101
101
|
corruptedTables: [...new Set(corruptedTables)],
|
|
102
|
-
duration: Date.now() -
|
|
102
|
+
duration: Date.now() - _startTime
|
|
103
103
|
};
|
|
104
104
|
} catch (error) {
|
|
105
105
|
return {
|
|
106
106
|
passed: false,
|
|
107
107
|
errors: [`Integrity check failed: ${error instanceof Error ? error.message : String(error)}`],
|
|
108
108
|
corruptedTables: [],
|
|
109
|
-
duration: Date.now() -
|
|
109
|
+
duration: Date.now() - _startTime
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -262,7 +262,7 @@ class DatabaseHealthMonitor {
|
|
|
262
262
|
* Create database backup
|
|
263
263
|
*/
|
|
264
264
|
async backup(label) {
|
|
265
|
-
const
|
|
265
|
+
const _startTime = Date.now();
|
|
266
266
|
try {
|
|
267
267
|
await this.checkpoint("FULL");
|
|
268
268
|
const timestamp = Date.now();
|
|
@@ -289,7 +289,7 @@ class DatabaseHealthMonitor {
|
|
|
289
289
|
success: true,
|
|
290
290
|
backupPath,
|
|
291
291
|
metadata,
|
|
292
|
-
duration: Date.now() -
|
|
292
|
+
duration: Date.now() - _startTime
|
|
293
293
|
};
|
|
294
294
|
} catch (error) {
|
|
295
295
|
return {
|
|
@@ -302,7 +302,7 @@ class DatabaseHealthMonitor {
|
|
|
302
302
|
projectCount: 0,
|
|
303
303
|
version: String(CURRENT_SCHEMA_VERSION)
|
|
304
304
|
},
|
|
305
|
-
duration: Date.now() -
|
|
305
|
+
duration: Date.now() - _startTime,
|
|
306
306
|
error: error instanceof Error ? error.message : String(error)
|
|
307
307
|
};
|
|
308
308
|
}
|
|
@@ -311,7 +311,7 @@ class DatabaseHealthMonitor {
|
|
|
311
311
|
* Restore database from backup
|
|
312
312
|
*/
|
|
313
313
|
async restore(backupPath) {
|
|
314
|
-
const
|
|
314
|
+
const _startTime = Date.now();
|
|
315
315
|
try {
|
|
316
316
|
if (!existsSync(backupPath)) {
|
|
317
317
|
throw new Error(`Backup file not found: ${backupPath}`);
|
|
@@ -347,7 +347,7 @@ class DatabaseHealthMonitor {
|
|
|
347
347
|
success: true,
|
|
348
348
|
restoredFrom: backupPath,
|
|
349
349
|
metadata,
|
|
350
|
-
duration: Date.now() -
|
|
350
|
+
duration: Date.now() - _startTime
|
|
351
351
|
};
|
|
352
352
|
} catch (error) {
|
|
353
353
|
return {
|
|
@@ -360,7 +360,7 @@ class DatabaseHealthMonitor {
|
|
|
360
360
|
projectCount: 0,
|
|
361
361
|
version: String(CURRENT_SCHEMA_VERSION)
|
|
362
362
|
},
|
|
363
|
-
duration: Date.now() -
|
|
363
|
+
duration: Date.now() - _startTime,
|
|
364
364
|
error: error instanceof Error ? error.message : String(error)
|
|
365
365
|
};
|
|
366
366
|
}
|
package/dist/chunks/help.mjs
CHANGED
|
@@ -8,7 +8,8 @@ import 'node:crypto';
|
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
|
|
10
10
|
async function installRecommendedHooks(hookIds) {
|
|
11
|
-
if (!hookIds.length)
|
|
11
|
+
if (!hookIds.length)
|
|
12
|
+
return 0;
|
|
12
13
|
const templatesPath = resolve(
|
|
13
14
|
import.meta.dirname ?? new URL(".", import.meta.url).pathname,
|
|
14
15
|
"../data/hook-templates.json"
|
|
@@ -16,7 +17,8 @@ async function installRecommendedHooks(hookIds) {
|
|
|
16
17
|
const raw = await readFile(templatesPath, "utf-8");
|
|
17
18
|
const allTemplates = JSON.parse(raw);
|
|
18
19
|
const selected = allTemplates.filter((t) => hookIds.includes(t.id));
|
|
19
|
-
if (!selected.length)
|
|
20
|
+
if (!selected.length)
|
|
21
|
+
return 0;
|
|
20
22
|
const settings = readJsonConfig("settings") ?? {};
|
|
21
23
|
const hooks = settings.hooks ?? {};
|
|
22
24
|
let added = 0;
|
|
@@ -24,7 +26,8 @@ async function installRecommendedHooks(hookIds) {
|
|
|
24
26
|
const event = tpl.event;
|
|
25
27
|
const existing = hooks[event] ?? [];
|
|
26
28
|
const alreadyExists = existing.some((h) => h.command === tpl.command);
|
|
27
|
-
if (alreadyExists)
|
|
29
|
+
if (alreadyExists)
|
|
30
|
+
continue;
|
|
28
31
|
const entry = {
|
|
29
32
|
type: "command",
|
|
30
33
|
command: tpl.command
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
+
export { c as configureOfficialMode, a as configureSimpleMode, b as configureWithPreset, e as detectCurrentMode, d as displayCurrentStatus, g as getCurrentConfig, q as quickSetup, r as runConfigWizard, t as testApiConnection, v as validateApiKey } from '../shared/ccjk.I6IuYdc_.mjs';
|
|
2
|
+
export { P as PROVIDER_PRESETS, g as getAllPresets, a as getChinesePresets, b as getPresetById, c as getRecommendedPresets } from '../shared/ccjk.DopKzo3z.mjs';
|
|
3
|
+
import './index2.mjs';
|
|
4
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
5
|
+
import './index3.mjs';
|
|
6
|
+
import 'node:readline';
|
|
7
|
+
import 'stream';
|
|
8
|
+
import 'node:tty';
|
|
9
|
+
import 'node:process';
|
|
10
|
+
import 'node:async_hooks';
|
|
11
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
12
|
+
import 'node:util';
|
|
13
|
+
import 'tty';
|
|
14
|
+
import 'fs';
|
|
15
|
+
import 'child_process';
|
|
16
|
+
import 'node:path';
|
|
17
|
+
import 'node:os';
|
|
18
|
+
import 'node:crypto';
|
|
19
|
+
import 'buffer';
|
|
20
|
+
import 'string_decoder';
|
|
1
21
|
import 'node:fs';
|
|
22
|
+
import './fs-operations.mjs';
|
|
23
|
+
import 'node:fs/promises';
|
|
24
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|