@echomem/mcp 1.4.19 → 1.4.21
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/README.md +12 -5
- package/dist/codex-session-files.js +7 -1
- package/dist/crypto.js +4 -0
- package/dist/encryption.js +14 -2
- package/dist/hud/cli.js +0 -0
- package/dist/index.js +59 -125
- package/dist/keystore.js +9 -19
- package/dist/migrate.js +88 -33
- package/dist/setup-page/client-core.js +194 -27
- package/dist/setup-page/client-extraction.js +129 -39
- package/dist/setup-page/client-lifecycle.js +1 -5
- package/dist/setup-page/client-report-city.js +14 -5
- package/dist/setup-page/styles-extraction.js +200 -6
- package/dist/setup-page/styles-website-alignment.js +183 -0
- package/dist/setup-page.js +1 -0
- package/dist/setup-preview.js +140 -37
- package/dist/setup.js +441 -45
- package/dist/v1-contract.js +1 -11
- package/package.json +6 -2
- package/templates/codex-skills/echomem-forget/SKILL.md +16 -0
- package/templates/codex-skills/echomem-forget/agents/openai.yaml +6 -0
- package/templates/codex-skills/echomem-login/SKILL.md +27 -0
- package/templates/codex-skills/echomem-login/agents/openai.yaml +6 -0
- package/templates/codex-skills/echomem-save/SKILL.md +14 -0
- package/templates/codex-skills/echomem-save/agents/openai.yaml +6 -0
- package/templates/codex-skills/echomem-search/SKILL.md +14 -0
- package/templates/codex-skills/echomem-search/agents/openai.yaml +6 -0
- package/dist/context-analysis/claude-canonical-adapter.js +0 -315
- package/dist/hud/efficiency.js +0 -447
package/dist/setup-preview.js
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
export const SETUP_PREVIEW_STATES = [
|
|
2
2
|
"consent",
|
|
3
3
|
"consent-required",
|
|
4
|
+
"scan",
|
|
4
5
|
"report",
|
|
5
6
|
"extract-counting",
|
|
6
7
|
"extract-ready",
|
|
8
|
+
"extract-free-selected",
|
|
9
|
+
"extract-free-trial-used",
|
|
10
|
+
"extract-limit",
|
|
11
|
+
"extract-pro-trial",
|
|
12
|
+
"extract-pro-active",
|
|
13
|
+
"extract-power-active",
|
|
14
|
+
"extract-team-active",
|
|
15
|
+
"extract-enterprise-active",
|
|
16
|
+
"extract-unknown",
|
|
17
|
+
"auth-login",
|
|
18
|
+
"auth-unlock",
|
|
19
|
+
"auth-setup",
|
|
7
20
|
"extract-run",
|
|
8
21
|
"extract-overdue",
|
|
9
22
|
"extract-done",
|
|
@@ -200,6 +213,62 @@ function previewWatermarkScript() {
|
|
|
200
213
|
document.body.appendChild(previewWatermark);
|
|
201
214
|
`;
|
|
202
215
|
}
|
|
216
|
+
function extractionPreviewBootstrap(options) {
|
|
217
|
+
const candidateCount = options.candidateCount ?? 520;
|
|
218
|
+
const quotaLimit = options.quotaLimit;
|
|
219
|
+
const quotaRemaining = options.quotaRemaining;
|
|
220
|
+
const historicalConversationQuota = quotaLimit == null || quotaRemaining == null
|
|
221
|
+
? null
|
|
222
|
+
: {
|
|
223
|
+
used: Math.max(0, quotaLimit - quotaRemaining),
|
|
224
|
+
limit: quotaLimit,
|
|
225
|
+
remaining: quotaRemaining,
|
|
226
|
+
};
|
|
227
|
+
const billingStatus = {
|
|
228
|
+
plan: options.plan,
|
|
229
|
+
paid: options.paid,
|
|
230
|
+
trialAvailable: options.trialAvailable,
|
|
231
|
+
trialUsed: options.trialUsed,
|
|
232
|
+
subscriptionStatus: options.subscriptionStatus ?? null,
|
|
233
|
+
trialEndedAt: options.trialEndedAt ?? null,
|
|
234
|
+
pricingUrl: "https://echoknows.com/pricing?source=mcp_onboarding",
|
|
235
|
+
account: {
|
|
236
|
+
displayName: "Preview User",
|
|
237
|
+
email: "preview@example.com",
|
|
238
|
+
avatarUrl: "/hud-assets/echo-face-cutout.png",
|
|
239
|
+
},
|
|
240
|
+
historicalConversationQuota,
|
|
241
|
+
};
|
|
242
|
+
return `
|
|
243
|
+
connected = true;
|
|
244
|
+
billingStatus = ${JSON.stringify(billingStatus)};
|
|
245
|
+
setupPlanChoice = ${JSON.stringify(options.selectFree ? "free" : "")};
|
|
246
|
+
stats = {
|
|
247
|
+
sessions: { total: ${candidateCount}, codex: ${Math.ceil(candidateCount * 0.68)}, claudeCode: ${Math.floor(candidateCount * 0.32)} },
|
|
248
|
+
migratable: {
|
|
249
|
+
pending: ${candidateCount}, pendingTotal: ${candidateCount}, pendingCodex: ${Math.ceil(candidateCount * 0.68)}, pendingClaudeCode: ${Math.floor(candidateCount * 0.32)},
|
|
250
|
+
alreadyMigrated: 108, skippedActive: 0,
|
|
251
|
+
eta: { estimatedLabel: "under 2 minutes" }, estimatedLabel: "under 2 minutes"
|
|
252
|
+
},
|
|
253
|
+
candidateSessions: Array.from({ length: ${candidateCount} }, function (_, index) {
|
|
254
|
+
var codex = index < ${Math.ceil(candidateCount * 0.68)};
|
|
255
|
+
return {
|
|
256
|
+
key: (codex ? "codex:" : "claude-code:") + "preview-" + index,
|
|
257
|
+
source: codex ? "codex" : "claude-code",
|
|
258
|
+
title: ["Plan the onboarding flow", "Repair memory extraction", "Review pricing limits", "Polish the EchoMem HUD"][index % 4] + " · " + (index + 1),
|
|
259
|
+
project: ["EchoMem Chrome", "MCP Server", "Memory Platform"][index % 3],
|
|
260
|
+
date: new Date(Date.UTC(2026, 6, 18 - (index % 12))).toISOString(),
|
|
261
|
+
characters: 42000 + index * 2700,
|
|
262
|
+
approxInputTokens: 10500 + index * 675,
|
|
263
|
+
turns: 18 + index
|
|
264
|
+
};
|
|
265
|
+
}),
|
|
266
|
+
discovery: { phase: "account", exact: false }
|
|
267
|
+
};
|
|
268
|
+
renderDashboard();
|
|
269
|
+
${options.showUnknownStatus ? 'setSetupPlanStatus("Plan check unavailable. Free still works.");' : ""}
|
|
270
|
+
${options.openSessionPicker ? "window.setTimeout(function () { openSessionPicker(); }, 0);" : ""}`;
|
|
271
|
+
}
|
|
203
272
|
export function renderSetupPreviewBootstrap(state) {
|
|
204
273
|
const watermark = previewWatermarkScript();
|
|
205
274
|
if (state === "consent") {
|
|
@@ -211,6 +280,17 @@ export function renderSetupPreviewBootstrap(state) {
|
|
|
211
280
|
renderLocalScanConsent();
|
|
212
281
|
setConsentStatus("Local history access is required to continue setup. Nothing will be scanned or uploaded unless you allow it.", "required");`;
|
|
213
282
|
}
|
|
283
|
+
if (state === "scan") {
|
|
284
|
+
return `${watermark}
|
|
285
|
+
reportEnvelope = {
|
|
286
|
+
schemaVersion: 1,
|
|
287
|
+
kind: "scanning",
|
|
288
|
+
mode: "preview",
|
|
289
|
+
scanId: "design-preview",
|
|
290
|
+
progress: { stage: "classifying-sessions", label: "Classifying repeated context", scanned: 116, total: 180, stageElapsedMs: 3000 }
|
|
291
|
+
};
|
|
292
|
+
renderLoading();`;
|
|
293
|
+
}
|
|
214
294
|
if (state === "report") {
|
|
215
295
|
const reportJson = JSON.stringify(previewReport);
|
|
216
296
|
return `${watermark}
|
|
@@ -223,43 +303,66 @@ export function renderSetupPreviewBootstrap(state) {
|
|
|
223
303
|
stats = null;
|
|
224
304
|
renderDashboard();`;
|
|
225
305
|
}
|
|
226
|
-
if (state === "extract-ready")
|
|
227
|
-
return `${watermark}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
306
|
+
if (state === "extract-ready")
|
|
307
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
308
|
+
plan: "free", paid: false, trialAvailable: true, trialUsed: false,
|
|
309
|
+
quotaLimit: 100, quotaRemaining: 28, candidateCount: 28,
|
|
310
|
+
})}`;
|
|
311
|
+
if (state === "extract-free-selected")
|
|
312
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
313
|
+
plan: "free", paid: false, trialAvailable: true, trialUsed: false,
|
|
314
|
+
quotaLimit: 100, quotaRemaining: 100, selectFree: true,
|
|
315
|
+
})}`;
|
|
316
|
+
if (state === "extract-free-trial-used")
|
|
317
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
318
|
+
plan: "free", paid: false, trialAvailable: false, trialUsed: true,
|
|
319
|
+
subscriptionStatus: "expired", trialEndedAt: "2026-07-20T00:00:00.000Z",
|
|
320
|
+
quotaLimit: 100, quotaRemaining: 100,
|
|
321
|
+
})}`;
|
|
322
|
+
if (state === "extract-limit")
|
|
323
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
324
|
+
plan: "free", paid: false, trialAvailable: false, trialUsed: true,
|
|
325
|
+
quotaLimit: 100, quotaRemaining: 0, selectFree: true, openSessionPicker: true,
|
|
326
|
+
})}`;
|
|
327
|
+
if (state === "extract-pro-trial")
|
|
328
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
329
|
+
plan: "pro", paid: true, trialAvailable: false, trialUsed: true,
|
|
330
|
+
subscriptionStatus: "trialing", trialEndedAt: "2026-08-04T00:00:00.000Z",
|
|
331
|
+
// The server currently grants trialing users Free's lifetime history allowance,
|
|
332
|
+
// even though recurring processing/search allowances resolve to Pro.
|
|
333
|
+
quotaLimit: 100, quotaRemaining: 100,
|
|
334
|
+
})}`;
|
|
335
|
+
if (state === "extract-pro-active")
|
|
336
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
337
|
+
plan: "pro", paid: true, trialAvailable: false, trialUsed: true,
|
|
338
|
+
subscriptionStatus: "active", quotaLimit: 250, quotaRemaining: 250,
|
|
339
|
+
})}`;
|
|
340
|
+
if (state === "extract-power-active")
|
|
341
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
342
|
+
plan: "power", paid: true, trialAvailable: false, trialUsed: true,
|
|
343
|
+
subscriptionStatus: "active", quotaLimit: 500, quotaRemaining: 500,
|
|
344
|
+
})}`;
|
|
345
|
+
if (state === "extract-team-active")
|
|
346
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
347
|
+
plan: "team", paid: true, trialAvailable: false, trialUsed: true,
|
|
348
|
+
subscriptionStatus: "active", quotaLimit: 250, quotaRemaining: 250,
|
|
349
|
+
})}`;
|
|
350
|
+
if (state === "extract-enterprise-active")
|
|
351
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
352
|
+
plan: "enterprise", paid: true, trialAvailable: false, trialUsed: true,
|
|
353
|
+
subscriptionStatus: "active", quotaLimit: 500, quotaRemaining: 500,
|
|
354
|
+
})}`;
|
|
355
|
+
if (state === "extract-unknown")
|
|
356
|
+
return `${watermark}${extractionPreviewBootstrap({
|
|
357
|
+
plan: "unknown", paid: false, trialAvailable: true, trialUsed: false,
|
|
358
|
+
showUnknownStatus: true,
|
|
359
|
+
})}`;
|
|
360
|
+
if (state === "auth-login")
|
|
361
|
+
return `${watermark}\n renderLocalLogin("");`;
|
|
362
|
+
if (state === "auth-unlock")
|
|
363
|
+
return `${watermark}\n renderLocalPassphrase("unlock", "preview@example.com");`;
|
|
364
|
+
if (state === "auth-setup")
|
|
365
|
+
return `${watermark}\n renderLocalPassphrase("setup", "preview@example.com");`;
|
|
263
366
|
if (state === "extract-run") {
|
|
264
367
|
return `${watermark}
|
|
265
368
|
renderProgress({ status: "running", total: 28, completed: 4, extracted: 19, failed: 1, latest: "preview session", latestRepo: "Preview Workspace" });`;
|