claude-code-session-manager 0.62.0 → 0.63.0
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/assets/AgentLibrary-BeJJa_zv.js +1 -0
- package/dist/assets/History-mWbqemhZ.js +2 -0
- package/dist/assets/Hooks-D_8sciZu.js +3 -0
- package/dist/assets/HostBilko-6aUJ7Smz.js +1 -0
- package/dist/assets/Library-CG1LDXLw.js +46 -0
- package/dist/assets/ListDetail-CIIJOWwI.js +1 -0
- package/dist/assets/MarkdownEditor-D0-y8V-f.js +1 -0
- package/dist/assets/McpServers-Kc-djiVi.js +2 -0
- package/dist/assets/Memory-B60DGRTW.js +8 -0
- package/dist/assets/Panel-CbTPsYHq.js +1 -0
- package/dist/assets/Permissions-C8KrSfrd.js +3 -0
- package/dist/assets/Plugins-BT8EumHb.js +2 -0
- package/dist/assets/ProvenanceBadge-cEqPpFsT.js +1 -0
- package/dist/assets/Scheduler-DbKPd0or.js +14 -0
- package/dist/assets/ScopeSwitcher-BNesCJ_t.js +1 -0
- package/dist/assets/Settings-Bjt7AQ6G.js +3 -0
- package/dist/assets/SkillReferenceGraph-DzuaPDM-.js +46 -0
- package/dist/assets/Skills-CVL_4X3T.js +3 -0
- package/dist/assets/SystemPrompt-Ct__nFF1.js +1 -0
- package/dist/assets/TagLibrary-DmrTfw4D.js +1 -0
- package/dist/assets/{TiptapBody-Bn-LMce4.js → TiptapBody-DaS0M_Ni.js} +1 -1
- package/dist/assets/Toggle-C0a-6xV7.js +1 -0
- package/dist/assets/index-CO_7DroC.js +3066 -0
- package/dist/assets/{index-DOXvph-Z.css → index-LlWpj2VJ.css} +1 -1
- package/dist/assets/listSkills-QORduPIk.js +1 -0
- package/dist/assets/settingsSchema-B7dMJaix.js +3 -0
- package/dist/assets/skillFrontmatter-Dif5JIg7.js +10 -0
- package/dist/index.html +2 -2
- package/package.json +1 -3
- package/src/main/__tests__/config-readText-bounded.test.cjs +84 -0
- package/src/main/__tests__/heapSnapshot.test.cjs +121 -0
- package/src/main/__tests__/historyAggregatorIntraday.test.cjs +313 -0
- package/src/main/__tests__/runLogRetention.test.cjs +343 -0
- package/src/main/__tests__/runVerify-transcript-commit-evidence.test.cjs +215 -0
- package/src/main/__tests__/scheduler-investigation-prompt.test.cjs +42 -1
- package/src/main/__tests__/scheduler-prd-missing-skip.test.cjs +54 -1
- package/src/main/__tests__/transcripts-batch-flush.test.cjs +249 -0
- package/src/main/__tests__/transcripts-doFlush-array.test.cjs +6 -0
- package/src/main/__tests__/transcripts-paged-reads.test.cjs +6 -0
- package/src/main/__tests__/transcriptsUsageFor.test.cjs +6 -0
- package/src/main/config.cjs +32 -29
- package/src/main/files.cjs +20 -0
- package/src/main/health.cjs +32 -0
- package/src/main/heapSnapshot.cjs +122 -0
- package/src/main/historyAggregator.cjs +176 -36
- package/src/main/index.cjs +10 -63
- package/src/main/ipcSchemas.cjs +20 -209
- package/src/main/lib/opsOwnership.cjs +0 -2
- package/src/main/lib/runLogRetention.cjs +358 -0
- package/src/main/lib/summarize.cjs +0 -1
- package/src/main/runVerify.cjs +55 -6
- package/src/main/scheduler.cjs +46 -7
- package/src/main/transcripts.cjs +29 -5
- package/src/preload/api.d.ts +18 -199
- package/src/preload/index.cjs +12 -102
- package/dist/assets/index-BfiMRkln.js +0 -3225
- package/src/main/__tests__/browserAgentServer.test.cjs +0 -235
- package/src/main/__tests__/browserView-destroyed-handler.test.cjs +0 -85
- package/src/main/__tests__/browserView-oauth-popup.test.cjs +0 -126
- package/src/main/__tests__/web-remote-e2e-pinning.test.cjs +0 -181
- package/src/main/browserAgentServer.cjs +0 -224
- package/src/main/browserCapture.cjs +0 -728
- package/src/main/browserView.cjs +0 -916
- package/src/main/lib/__tests__/browserAgentActions.test.cjs +0 -76
- package/src/main/lib/browserAgentActions.cjs +0 -114
- package/src/main/lib/e2eStateMachine.cjs +0 -39
- package/src/main/webRemote.cjs +0 -1367
- package/src/preload/browserViewPreload.cjs +0 -118
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preload for embedded Browser-tab WebContentsViews (PRD 408 recorder
|
|
3
|
-
* engine). Exposes a minimal `window.__smRecorder.setRecording(bool)` toggle
|
|
4
|
-
* via contextBridge so the main process can arm/disarm step capture without
|
|
5
|
-
* ever giving page script node/ipcRenderer access. Typed values are never
|
|
6
|
-
* captured — only the target selector + a `masked` flag — per the tab's
|
|
7
|
-
* "sandboxed · no filesystem · no passwords" guardrail.
|
|
8
|
-
*/
|
|
9
|
-
const { contextBridge, ipcRenderer } = require('electron');
|
|
10
|
-
|
|
11
|
-
// Secret handed to us via `additionalArguments` (never touches the DOM or a
|
|
12
|
-
// script tag the embedded page could inspect) — required on every toggle so
|
|
13
|
-
// the page itself can't call the exposeInMainWorld bridge to interfere with
|
|
14
|
-
// a recording session it has no business controlling.
|
|
15
|
-
const TOKEN_PREFIX = '--sm-record-token=';
|
|
16
|
-
const expectedToken = (process.argv.find((a) => a.startsWith(TOKEN_PREFIX)) || '').slice(TOKEN_PREFIX.length) || null;
|
|
17
|
-
|
|
18
|
-
let capturing = false;
|
|
19
|
-
let dragStart = null;
|
|
20
|
-
|
|
21
|
-
const DRAG_THRESHOLD_PX = 6;
|
|
22
|
-
|
|
23
|
-
function selectorFor(el) {
|
|
24
|
-
if (!el || el.nodeType !== 1) return '';
|
|
25
|
-
if (el.id) return `#${el.id}`;
|
|
26
|
-
const testId = typeof el.getAttribute === 'function' ? el.getAttribute('data-testid') : null;
|
|
27
|
-
if (testId) return `[data-testid="${testId}"]`;
|
|
28
|
-
const tag = el.tagName.toLowerCase();
|
|
29
|
-
const cls = typeof el.className === 'string' ? el.className.trim().split(/\s+/)[0] : '';
|
|
30
|
-
return cls ? `${tag}.${cls}` : tag;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function variableSuggestionFor(el) {
|
|
34
|
-
const name = String(el.name || el.id || '').toLowerCase();
|
|
35
|
-
if (el.type === 'password' || /pass/.test(name)) return 'password';
|
|
36
|
-
if (/email/.test(name)) return 'email';
|
|
37
|
-
if (/user/.test(name)) return 'username';
|
|
38
|
-
return name || 'value';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
document.addEventListener(
|
|
42
|
-
'click',
|
|
43
|
-
(e) => {
|
|
44
|
-
if (!capturing) return;
|
|
45
|
-
ipcRenderer.send('browser:record-event', {
|
|
46
|
-
verb: 'click',
|
|
47
|
-
target: selectorFor(e.target),
|
|
48
|
-
x: e.clientX,
|
|
49
|
-
y: e.clientY,
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
true,
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
document.addEventListener(
|
|
56
|
-
'mousedown',
|
|
57
|
-
(e) => {
|
|
58
|
-
if (!capturing) return;
|
|
59
|
-
if (e.button !== 0) return;
|
|
60
|
-
dragStart = { target: e.target, x: e.clientX, y: e.clientY };
|
|
61
|
-
},
|
|
62
|
-
true,
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
document.addEventListener(
|
|
66
|
-
'mousemove',
|
|
67
|
-
() => {
|
|
68
|
-
if (!capturing) return;
|
|
69
|
-
// No per-event emit — the coalesced step is emitted on mouseup.
|
|
70
|
-
},
|
|
71
|
-
true,
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
document.addEventListener(
|
|
75
|
-
'mouseup',
|
|
76
|
-
(e) => {
|
|
77
|
-
if (!capturing) return;
|
|
78
|
-
if (!dragStart) return;
|
|
79
|
-
const dx = e.clientX - dragStart.x;
|
|
80
|
-
const dy = e.clientY - dragStart.y;
|
|
81
|
-
if (Math.abs(dx) > DRAG_THRESHOLD_PX || Math.abs(dy) > DRAG_THRESHOLD_PX) {
|
|
82
|
-
ipcRenderer.send('browser:record-event', {
|
|
83
|
-
verb: 'drag',
|
|
84
|
-
target: selectorFor(dragStart.target),
|
|
85
|
-
x: dragStart.x,
|
|
86
|
-
y: dragStart.y,
|
|
87
|
-
endTarget: selectorFor(e.target),
|
|
88
|
-
endX: e.clientX,
|
|
89
|
-
endY: e.clientY,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
dragStart = null;
|
|
93
|
-
},
|
|
94
|
-
true,
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
document.addEventListener(
|
|
98
|
-
'change',
|
|
99
|
-
(e) => {
|
|
100
|
-
if (!capturing) return;
|
|
101
|
-
const el = e.target;
|
|
102
|
-
if (!el || (el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA')) return;
|
|
103
|
-
ipcRenderer.send('browser:record-event', {
|
|
104
|
-
verb: 'type',
|
|
105
|
-
target: selectorFor(el),
|
|
106
|
-
variableSuggestion: variableSuggestionFor(el),
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
true,
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
contextBridge.exposeInMainWorld('__smRecorder', {
|
|
113
|
-
setRecording: (v, token) => {
|
|
114
|
-
if (!expectedToken || token !== expectedToken) return;
|
|
115
|
-
capturing = !!v;
|
|
116
|
-
dragStart = null;
|
|
117
|
-
},
|
|
118
|
-
});
|