claude-sessions-mcp 0.1.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/LICENSE +21 -0
- package/README.md +145 -0
- package/dist/chunk-D2SPLCNE.js +48 -0
- package/dist/chunk-D2SPLCNE.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +369 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.js +9 -0
- package/dist/server.js.map +1 -0
- package/dist/web/client/_app/immutable/assets/0.BNKw18IQ.css +1 -0
- package/dist/web/client/_app/immutable/assets/0.BNKw18IQ.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.BNKw18IQ.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/9luERNGW.js +1 -0
- package/dist/web/client/_app/immutable/chunks/9luERNGW.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/9luERNGW.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/B4TJWzDE.js +1 -0
- package/dist/web/client/_app/immutable/chunks/B4TJWzDE.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/B4TJWzDE.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/ChOgyrGO.js +2 -0
- package/dist/web/client/_app/immutable/chunks/ChOgyrGO.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/ChOgyrGO.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DUFLAPco.js +1 -0
- package/dist/web/client/_app/immutable/chunks/DUFLAPco.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DUFLAPco.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DbCO4Be8.js +1 -0
- package/dist/web/client/_app/immutable/chunks/DbCO4Be8.js.br +1 -0
- package/dist/web/client/_app/immutable/chunks/DbCO4Be8.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/app.CQAI9q_h.js +2 -0
- package/dist/web/client/_app/immutable/entry/app.CQAI9q_h.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.CQAI9q_h.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.lvsJ5TiJ.js +1 -0
- package/dist/web/client/_app/immutable/entry/start.lvsJ5TiJ.js.br +2 -0
- package/dist/web/client/_app/immutable/entry/start.lvsJ5TiJ.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Cd8eOV9t.js +1 -0
- package/dist/web/client/_app/immutable/nodes/0.Cd8eOV9t.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Cd8eOV9t.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/1.DVVhj1K8.js +1 -0
- package/dist/web/client/_app/immutable/nodes/1.DVVhj1K8.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.DVVhj1K8.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/2.DqJoUS41.js +1 -0
- package/dist/web/client/_app/immutable/nodes/2.DqJoUS41.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.DqJoUS41.js.gz +0 -0
- package/dist/web/client/_app/version.json +1 -0
- package/dist/web/client/_app/version.json.br +0 -0
- package/dist/web/client/_app/version.json.gz +0 -0
- package/dist/web/client/favicon.png +0 -0
- package/dist/web/env.js +45 -0
- package/dist/web/handler.js +1390 -0
- package/dist/web/index.js +334 -0
- package/dist/web/server/chunks/0-D_Gx_HFy.js +17 -0
- package/dist/web/server/chunks/0-D_Gx_HFy.js.map +1 -0
- package/dist/web/server/chunks/1-B6558drr.js +9 -0
- package/dist/web/server/chunks/1-B6558drr.js.map +1 -0
- package/dist/web/server/chunks/2-Bx262N6m.js +9 -0
- package/dist/web/server/chunks/2-Bx262N6m.js.map +1 -0
- package/dist/web/server/chunks/_layout.svelte-Dqh3cdpb.js +28 -0
- package/dist/web/server/chunks/_layout.svelte-Dqh3cdpb.js.map +1 -0
- package/dist/web/server/chunks/_page.svelte-BzYm1sb_.js +65 -0
- package/dist/web/server/chunks/_page.svelte-BzYm1sb_.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-BXCTPhzX.js +28 -0
- package/dist/web/server/chunks/_server.ts-BXCTPhzX.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-Bxqo8tYS.js +14 -0
- package/dist/web/server/chunks/_server.ts-Bxqo8tYS.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-C5Bf6au4.js +26 -0
- package/dist/web/server/chunks/_server.ts-C5Bf6au4.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-C88EFL4g.js +19 -0
- package/dist/web/server/chunks/_server.ts-C88EFL4g.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-D8vMV9FN.js +18 -0
- package/dist/web/server/chunks/_server.ts-D8vMV9FN.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-DW3OhHzP.js +37 -0
- package/dist/web/server/chunks/_server.ts-DW3OhHzP.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-Ne8LE0dr.js +18 -0
- package/dist/web/server/chunks/_server.ts-Ne8LE0dr.js.map +1 -0
- package/dist/web/server/chunks/context-R2425nfV.js +64 -0
- package/dist/web/server/chunks/context-R2425nfV.js.map +1 -0
- package/dist/web/server/chunks/error.svelte-DazOwnSn.js +45 -0
- package/dist/web/server/chunks/error.svelte-DazOwnSn.js.map +1 -0
- package/dist/web/server/chunks/exports-BzHwARwz.js +326 -0
- package/dist/web/server/chunks/exports-BzHwARwz.js.map +1 -0
- package/dist/web/server/chunks/index-CXFDTUAl.js +913 -0
- package/dist/web/server/chunks/index-CXFDTUAl.js.map +1 -0
- package/dist/web/server/chunks/index-CoD1IJuy.js +190 -0
- package/dist/web/server/chunks/index-CoD1IJuy.js.map +1 -0
- package/dist/web/server/chunks/session-ioLIuaZI.js +302 -0
- package/dist/web/server/chunks/session-ioLIuaZI.js.map +1 -0
- package/dist/web/server/index.js +8132 -0
- package/dist/web/server/index.js.map +1 -0
- package/dist/web/server/manifest.js +95 -0
- package/dist/web/server/manifest.js.map +1 -0
- package/dist/web/shims.js +32 -0
- package/package.json +94 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import { handler } from './handler.js';
|
|
3
|
+
import { env } from './env.js';
|
|
4
|
+
import http from 'node:http';
|
|
5
|
+
import { setImmediate } from 'node:timers';
|
|
6
|
+
import * as qs from 'node:querystring';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {string|RegExp} input The route pattern
|
|
10
|
+
* @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
|
|
11
|
+
*/
|
|
12
|
+
function parse$1(input, loose) {
|
|
13
|
+
if (input instanceof RegExp) return { keys:false, pattern:input };
|
|
14
|
+
var c, o, tmp, ext, keys=[], pattern='', arr = input.split('/');
|
|
15
|
+
arr[0] || arr.shift();
|
|
16
|
+
|
|
17
|
+
while (tmp = arr.shift()) {
|
|
18
|
+
c = tmp[0];
|
|
19
|
+
if (c === '*') {
|
|
20
|
+
keys.push(c);
|
|
21
|
+
pattern += tmp[1] === '?' ? '(?:/(.*))?' : '/(.*)';
|
|
22
|
+
} else if (c === ':') {
|
|
23
|
+
o = tmp.indexOf('?', 1);
|
|
24
|
+
ext = tmp.indexOf('.', 1);
|
|
25
|
+
keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
|
|
26
|
+
pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
|
|
27
|
+
if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
|
|
28
|
+
} else {
|
|
29
|
+
pattern += '/' + tmp;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
keys: keys,
|
|
35
|
+
pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const MAP = {
|
|
40
|
+
"": 0,
|
|
41
|
+
GET: 1,
|
|
42
|
+
HEAD: 2,
|
|
43
|
+
PATCH: 3,
|
|
44
|
+
OPTIONS: 4,
|
|
45
|
+
CONNECT: 5,
|
|
46
|
+
DELETE: 6,
|
|
47
|
+
TRACE: 7,
|
|
48
|
+
POST: 8,
|
|
49
|
+
PUT: 9,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
class Trouter {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.routes = [];
|
|
55
|
+
|
|
56
|
+
this.all = this.add.bind(this, '');
|
|
57
|
+
this.get = this.add.bind(this, 'GET');
|
|
58
|
+
this.head = this.add.bind(this, 'HEAD');
|
|
59
|
+
this.patch = this.add.bind(this, 'PATCH');
|
|
60
|
+
this.options = this.add.bind(this, 'OPTIONS');
|
|
61
|
+
this.connect = this.add.bind(this, 'CONNECT');
|
|
62
|
+
this.delete = this.add.bind(this, 'DELETE');
|
|
63
|
+
this.trace = this.add.bind(this, 'TRACE');
|
|
64
|
+
this.post = this.add.bind(this, 'POST');
|
|
65
|
+
this.put = this.add.bind(this, 'PUT');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
use(route, ...fns) {
|
|
69
|
+
let handlers = [].concat.apply([], fns);
|
|
70
|
+
let { keys, pattern } = parse$1(route, true);
|
|
71
|
+
this.routes.push({ keys, pattern, method: '', handlers, midx: MAP[''] });
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
add(method, route, ...fns) {
|
|
76
|
+
let { keys, pattern } = parse$1(route);
|
|
77
|
+
let handlers = [].concat.apply([], fns);
|
|
78
|
+
this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] });
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
find(method, url) {
|
|
83
|
+
let midx = MAP[method];
|
|
84
|
+
let isHEAD = (midx === 2);
|
|
85
|
+
let i=0, j=0, k, tmp, arr=this.routes;
|
|
86
|
+
let matches=[], params={}, handlers=[];
|
|
87
|
+
for (; i < arr.length; i++) {
|
|
88
|
+
tmp = arr[i];
|
|
89
|
+
if (tmp.midx === midx || tmp.midx === 0 || (isHEAD && tmp.midx===1) ) {
|
|
90
|
+
if (tmp.keys === false) {
|
|
91
|
+
matches = tmp.pattern.exec(url);
|
|
92
|
+
if (matches === null) continue;
|
|
93
|
+
if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
|
|
94
|
+
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
95
|
+
} else if (tmp.keys.length > 0) {
|
|
96
|
+
matches = tmp.pattern.exec(url);
|
|
97
|
+
if (matches === null) continue;
|
|
98
|
+
for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
|
|
99
|
+
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
100
|
+
} else if (tmp.pattern.test(url)) {
|
|
101
|
+
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
102
|
+
}
|
|
103
|
+
} // else not a match
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return { params, handlers };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @typedef ParsedURL
|
|
112
|
+
* @type {import('.').ParsedURL}
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @typedef Request
|
|
117
|
+
* @property {string} url
|
|
118
|
+
* @property {ParsedURL} _parsedUrl
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @param {Request} req
|
|
123
|
+
* @returns {ParsedURL|void}
|
|
124
|
+
*/
|
|
125
|
+
function parse(req) {
|
|
126
|
+
let raw = req.url;
|
|
127
|
+
if (raw == null) return;
|
|
128
|
+
|
|
129
|
+
let prev = req._parsedUrl;
|
|
130
|
+
if (prev && prev.raw === raw) return prev;
|
|
131
|
+
|
|
132
|
+
let pathname=raw, search='', query;
|
|
133
|
+
|
|
134
|
+
if (raw.length > 1) {
|
|
135
|
+
let idx = raw.indexOf('?', 1);
|
|
136
|
+
|
|
137
|
+
if (idx !== -1) {
|
|
138
|
+
search = raw.substring(idx);
|
|
139
|
+
pathname = raw.substring(0, idx);
|
|
140
|
+
if (search.length > 1) {
|
|
141
|
+
query = qs.parse(search.substring(1));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return req._parsedUrl = { pathname, search, query, raw };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function onError(err, req, res) {
|
|
150
|
+
let code = typeof err.status === 'number' && err.status;
|
|
151
|
+
code = res.statusCode = (code && code >= 100 ? code : 500);
|
|
152
|
+
if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
|
|
153
|
+
else res.end(err.message || http.STATUS_CODES[code]);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const mount = fn => fn instanceof Polka ? fn.attach : fn;
|
|
157
|
+
|
|
158
|
+
class Polka extends Trouter {
|
|
159
|
+
constructor(opts={}) {
|
|
160
|
+
super();
|
|
161
|
+
this.parse = parse;
|
|
162
|
+
this.server = opts.server;
|
|
163
|
+
this.handler = this.handler.bind(this);
|
|
164
|
+
this.onError = opts.onError || onError; // catch-all handler
|
|
165
|
+
this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
|
|
166
|
+
this.attach = (req, res) => setImmediate(this.handler, req, res);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
use(base, ...fns) {
|
|
170
|
+
if (base === '/') {
|
|
171
|
+
super.use(base, fns.map(mount));
|
|
172
|
+
} else if (typeof base === 'function' || base instanceof Polka) {
|
|
173
|
+
super.use('/', [base, ...fns].map(mount));
|
|
174
|
+
} else {
|
|
175
|
+
super.use(base,
|
|
176
|
+
(req, _, next) => {
|
|
177
|
+
if (typeof base === 'string') {
|
|
178
|
+
let len = base.length;
|
|
179
|
+
base.startsWith('/') || len++;
|
|
180
|
+
req.url = req.url.substring(len) || '/';
|
|
181
|
+
req.path = req.path.substring(len) || '/';
|
|
182
|
+
} else {
|
|
183
|
+
req.url = req.url.replace(base, '') || '/';
|
|
184
|
+
req.path = req.path.replace(base, '') || '/';
|
|
185
|
+
}
|
|
186
|
+
if (req.url.charAt(0) !== '/') {
|
|
187
|
+
req.url = '/' + req.url;
|
|
188
|
+
}
|
|
189
|
+
next();
|
|
190
|
+
},
|
|
191
|
+
fns.map(mount),
|
|
192
|
+
(req, _, next) => {
|
|
193
|
+
req.path = req._parsedUrl.pathname;
|
|
194
|
+
req.url = req.path + req._parsedUrl.search;
|
|
195
|
+
next();
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
return this; // chainable
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
listen() {
|
|
203
|
+
(this.server = this.server || http.createServer()).on('request', this.attach);
|
|
204
|
+
this.server.listen.apply(this.server, arguments);
|
|
205
|
+
return this;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
handler(req, res, next) {
|
|
209
|
+
let info = this.parse(req), path = info.pathname;
|
|
210
|
+
let obj = this.find(req.method, req.path=path);
|
|
211
|
+
|
|
212
|
+
req.url = path + info.search;
|
|
213
|
+
req.originalUrl = req.originalUrl || req.url;
|
|
214
|
+
req.query = info.query || {};
|
|
215
|
+
req.search = info.search;
|
|
216
|
+
req.params = obj.params;
|
|
217
|
+
|
|
218
|
+
if (path.length > 1 && path.indexOf('%', 1) !== -1) {
|
|
219
|
+
for (let k in req.params) {
|
|
220
|
+
try { req.params[k] = decodeURIComponent(req.params[k]); }
|
|
221
|
+
catch (e) { /* malform uri segment */ }
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
|
|
226
|
+
let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
|
|
227
|
+
(next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function polka (opts) {
|
|
232
|
+
return new Polka(opts);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const path = env('SOCKET_PATH', false);
|
|
236
|
+
const host = env('HOST', '0.0.0.0');
|
|
237
|
+
const port = env('PORT', !path && '3000');
|
|
238
|
+
|
|
239
|
+
const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));
|
|
240
|
+
const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));
|
|
241
|
+
const listen_pid = parseInt(env('LISTEN_PID', '0'));
|
|
242
|
+
const listen_fds = parseInt(env('LISTEN_FDS', '0'));
|
|
243
|
+
// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html
|
|
244
|
+
const SD_LISTEN_FDS_START = 3;
|
|
245
|
+
|
|
246
|
+
if (listen_pid !== 0 && listen_pid !== process.pid) {
|
|
247
|
+
throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);
|
|
248
|
+
}
|
|
249
|
+
if (listen_fds > 1) {
|
|
250
|
+
throw new Error(
|
|
251
|
+
`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const socket_activation = listen_pid === process.pid && listen_fds === 1;
|
|
256
|
+
|
|
257
|
+
let requests = 0;
|
|
258
|
+
/** @type {NodeJS.Timeout | void} */
|
|
259
|
+
let shutdown_timeout_id;
|
|
260
|
+
/** @type {NodeJS.Timeout | void} */
|
|
261
|
+
let idle_timeout_id;
|
|
262
|
+
|
|
263
|
+
const server = polka().use(handler);
|
|
264
|
+
|
|
265
|
+
if (socket_activation) {
|
|
266
|
+
server.listen({ fd: SD_LISTEN_FDS_START }, () => {
|
|
267
|
+
console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);
|
|
268
|
+
});
|
|
269
|
+
} else {
|
|
270
|
+
server.listen({ path, host, port }, () => {
|
|
271
|
+
console.log(`Listening on ${path || `http://${host}:${port}`}`);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */
|
|
276
|
+
function graceful_shutdown(reason) {
|
|
277
|
+
if (shutdown_timeout_id) return;
|
|
278
|
+
|
|
279
|
+
// If a connection was opened with a keep-alive header close() will wait for the connection to
|
|
280
|
+
// time out rather than close it even if it is not handling any requests, so call this first
|
|
281
|
+
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
282
|
+
server.server.closeIdleConnections();
|
|
283
|
+
|
|
284
|
+
server.server.close((error) => {
|
|
285
|
+
// occurs if the server is already closed
|
|
286
|
+
if (error) return;
|
|
287
|
+
|
|
288
|
+
if (shutdown_timeout_id) {
|
|
289
|
+
clearTimeout(shutdown_timeout_id);
|
|
290
|
+
}
|
|
291
|
+
if (idle_timeout_id) {
|
|
292
|
+
clearTimeout(idle_timeout_id);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// @ts-expect-error custom events cannot be typed
|
|
296
|
+
process.emit('sveltekit:shutdown', reason);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
shutdown_timeout_id = setTimeout(
|
|
300
|
+
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
301
|
+
() => server.server.closeAllConnections(),
|
|
302
|
+
shutdown_timeout * 1000
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
server.server.on(
|
|
307
|
+
'request',
|
|
308
|
+
/** @param {import('node:http').IncomingMessage} req */
|
|
309
|
+
(req) => {
|
|
310
|
+
requests++;
|
|
311
|
+
|
|
312
|
+
if (socket_activation && idle_timeout_id) {
|
|
313
|
+
idle_timeout_id = clearTimeout(idle_timeout_id);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
req.on('close', () => {
|
|
317
|
+
requests--;
|
|
318
|
+
|
|
319
|
+
if (shutdown_timeout_id) {
|
|
320
|
+
// close connections as soon as they become idle, so they don't accept new requests
|
|
321
|
+
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
322
|
+
server.server.closeIdleConnections();
|
|
323
|
+
}
|
|
324
|
+
if (requests === 0 && socket_activation && idle_timeout) {
|
|
325
|
+
idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
|
|
331
|
+
process.on('SIGTERM', graceful_shutdown);
|
|
332
|
+
process.on('SIGINT', graceful_shutdown);
|
|
333
|
+
|
|
334
|
+
export { host, path, port, server };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const ssr = true;
|
|
2
|
+
|
|
3
|
+
var _layout_ts = /*#__PURE__*/Object.freeze({
|
|
4
|
+
__proto__: null,
|
|
5
|
+
ssr: ssr
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const index = 0;
|
|
9
|
+
let component_cache;
|
|
10
|
+
const component = async () => component_cache ??= (await import('./_layout.svelte-Dqh3cdpb.js')).default;
|
|
11
|
+
const universal_id = "src/routes/+layout.ts";
|
|
12
|
+
const imports = ["_app/immutable/nodes/0.Cd8eOV9t.js","_app/immutable/chunks/ChOgyrGO.js","_app/immutable/chunks/B4TJWzDE.js","_app/immutable/chunks/9luERNGW.js","_app/immutable/chunks/DbCO4Be8.js"];
|
|
13
|
+
const stylesheets = ["_app/immutable/assets/0.BNKw18IQ.css"];
|
|
14
|
+
const fonts = [];
|
|
15
|
+
|
|
16
|
+
export { component, fonts, imports, index, stylesheets, _layout_ts as universal, universal_id };
|
|
17
|
+
//# sourceMappingURL=0-D_Gx_HFy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0-D_Gx_HFy.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_layout.ts.js","../../../../web/.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["const ssr = true;\nexport {\n ssr\n};\n","import * as universal from '../entries/pages/_layout.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/+layout.ts\";\nexport const imports = [\"_app/immutable/nodes/0.Cd8eOV9t.js\",\"_app/immutable/chunks/ChOgyrGO.js\",\"_app/immutable/chunks/B4TJWzDE.js\",\"_app/immutable/chunks/9luERNGW.js\",\"_app/immutable/chunks/DbCO4Be8.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.BNKw18IQ.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,GAAG,GAAG,IAAI;;;;;;;ACEJ,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAElG,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 1;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./error.svelte-DazOwnSn.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/1.DVVhj1K8.js","_app/immutable/chunks/ChOgyrGO.js","_app/immutable/chunks/B4TJWzDE.js","_app/immutable/chunks/DUFLAPco.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=1-B6558drr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1-B6558drr.js","sources":["../../../../web/.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.DVVhj1K8.js\",\"_app/immutable/chunks/ChOgyrGO.js\",\"_app/immutable/chunks/B4TJWzDE.js\",\"_app/immutable/chunks/DUFLAPco.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 2;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-BzYm1sb_.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/2.DqJoUS41.js","_app/immutable/chunks/ChOgyrGO.js","_app/immutable/chunks/B4TJWzDE.js","_app/immutable/chunks/9luERNGW.js","_app/immutable/chunks/DbCO4Be8.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=2-Bx262N6m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2-Bx262N6m.js","sources":["../../../../web/.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.DqJoUS41.js\",\"_app/immutable/chunks/ChOgyrGO.js\",\"_app/immutable/chunks/B4TJWzDE.js\",\"_app/immutable/chunks/9luERNGW.js\",\"_app/immutable/chunks/DbCO4Be8.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAChG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { w as head, x as attr } from './index-CXFDTUAl.js';
|
|
2
|
+
import { e as escape_html } from './context-R2425nfV.js';
|
|
3
|
+
|
|
4
|
+
function _layout($$renderer, $$props) {
|
|
5
|
+
$$renderer.component(($$renderer2) => {
|
|
6
|
+
let { children } = $$props;
|
|
7
|
+
let cleaning = false;
|
|
8
|
+
head("12qhfyh", $$renderer2, ($$renderer3) => {
|
|
9
|
+
$$renderer3.title(($$renderer4) => {
|
|
10
|
+
$$renderer4.push(`<title>Claude Session Manager</title>`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
$$renderer2.push(`<div class="min-h-screen flex flex-col bg-gh-bg text-gh-text"><header class="bg-gh-bg-secondary border-b border-gh-border px-8 py-4 flex justify-between items-center"><div class="flex items-center gap-3"><h1 class="text-2xl font-semibold">Claude Session Manager</h1> `);
|
|
14
|
+
{
|
|
15
|
+
$$renderer2.push("<!--[!-->");
|
|
16
|
+
}
|
|
17
|
+
$$renderer2.push(`<!--]--></div> <div class="flex gap-2"><button class="bg-gh-border-subtle border border-gh-border text-gh-text px-4 py-2 rounded-md text-sm transition-colors hover:bg-gh-border hover:border-gh-text-secondary disabled:opacity-50 disabled:cursor-not-allowed"${attr("disabled", cleaning, true)}>${escape_html("Clear Empty Sessions")}</button></div></header> <main class="flex-1 p-8 max-w-7xl mx-auto w-full">`);
|
|
18
|
+
children($$renderer2);
|
|
19
|
+
$$renderer2.push(`<!----></main></div> `);
|
|
20
|
+
{
|
|
21
|
+
$$renderer2.push("<!--[!-->");
|
|
22
|
+
}
|
|
23
|
+
$$renderer2.push(`<!--]-->`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { _layout as default };
|
|
28
|
+
//# sourceMappingURL=_layout.svelte-Dqh3cdpb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_layout.svelte-Dqh3cdpb.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { w as head, x as attr } from \"../../chunks/index.js\";\nimport { e as escape_html } from \"../../chunks/context.js\";\nfunction _layout($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { children } = $$props;\n let cleaning = false;\n head(\"12qhfyh\", $$renderer2, ($$renderer3) => {\n $$renderer3.title(($$renderer4) => {\n $$renderer4.push(`<title>Claude Session Manager</title>`);\n });\n });\n $$renderer2.push(`<div class=\"min-h-screen flex flex-col bg-gh-bg text-gh-text\"><header class=\"bg-gh-bg-secondary border-b border-gh-border px-8 py-4 flex justify-between items-center\"><div class=\"flex items-center gap-3\"><h1 class=\"text-2xl font-semibold\">Claude Session Manager</h1> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></div> <div class=\"flex gap-2\"><button class=\"bg-gh-border-subtle border border-gh-border text-gh-text px-4 py-2 rounded-md text-sm transition-colors hover:bg-gh-border hover:border-gh-text-secondary disabled:opacity-50 disabled:cursor-not-allowed\"${attr(\"disabled\", cleaning, true)}>${escape_html(\"Clear Empty Sessions\")}</button></div></header> <main class=\"flex-1 p-8 max-w-7xl mx-auto w-full\">`);\n children($$renderer2);\n $$renderer2.push(`<!----></main></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _layout as default\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO;AAC9B,IAAI,IAAI,QAAQ,GAAG,KAAK;AACxB,IAAI,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,WAAW,KAAK;AAClD,MAAM,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACzC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,qCAAqC,CAAC,CAAC;AACjE,MAAM,CAAC,CAAC;AACR,IAAI,CAAC,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,2QAA2Q,CAAC,CAAC;AACnS,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,gQAAgQ,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAC,2EAA2E,CAAC,CAAC;AAC7a,IAAI,QAAQ,CAAC,WAAW,CAAC;AACzB,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC;AAC7C,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { y as ensure_array_like, z as attr_class, x as attr, F as stringify } from './index-CXFDTUAl.js';
|
|
2
|
+
import { e as escape_html } from './context-R2425nfV.js';
|
|
3
|
+
|
|
4
|
+
function _page($$renderer, $$props) {
|
|
5
|
+
$$renderer.component(($$renderer2) => {
|
|
6
|
+
let projects = [];
|
|
7
|
+
let projectSessions = /* @__PURE__ */ new Map();
|
|
8
|
+
let expandedProjects = /* @__PURE__ */ new Set();
|
|
9
|
+
let selectedSession = null;
|
|
10
|
+
let loadingProject = null;
|
|
11
|
+
const formatProjectName = (displayName) => {
|
|
12
|
+
return displayName.replace(/^\/Users\/[^/]+/, "~");
|
|
13
|
+
};
|
|
14
|
+
const nonEmptyProjects = projects.filter((p) => p.sessionCount > 0);
|
|
15
|
+
$$renderer2.push(`<div class="grid grid-cols-[350px_1fr] gap-4 h-[calc(100vh-120px)]"><aside class="bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col"><h2 class="p-4 text-base font-semibold border-b border-gh-border bg-gh-bg">Projects (${escape_html(nonEmptyProjects.length)})</h2> <ul class="overflow-y-auto flex-1"><!--[-->`);
|
|
16
|
+
const each_array = ensure_array_like(nonEmptyProjects);
|
|
17
|
+
for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {
|
|
18
|
+
let project = each_array[$$index_1];
|
|
19
|
+
$$renderer2.push(`<li class="border-b border-gh-border-subtle"><button${attr_class(`w-full py-3 px-4 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 font-medium hover:bg-gh-border-subtle ${stringify(expandedProjects.has(project.name) ? "bg-gh-accent/10" : "")}`)}><span class="text-xs w-3 text-gh-text-secondary">${escape_html(expandedProjects.has(project.name) ? "▼" : "▶")}</span> <span class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap"${attr("title", project.display_name)}>${escape_html(formatProjectName(project.display_name))}</span> <span class="bg-gh-border px-2 py-0.5 rounded-full text-xs font-normal">${escape_html(project.sessionCount)}</span></button> `);
|
|
20
|
+
if (expandedProjects.has(project.name)) {
|
|
21
|
+
$$renderer2.push("<!--[-->");
|
|
22
|
+
$$renderer2.push(`<ul class="bg-gh-bg">`);
|
|
23
|
+
if (loadingProject === project.name) {
|
|
24
|
+
$$renderer2.push("<!--[-->");
|
|
25
|
+
$$renderer2.push(`<li class="py-2 px-8 text-gh-text-secondary text-sm">Loading...</li>`);
|
|
26
|
+
} else {
|
|
27
|
+
$$renderer2.push("<!--[!-->");
|
|
28
|
+
$$renderer2.push(`<!--[-->`);
|
|
29
|
+
const each_array_1 = ensure_array_like(projectSessions.get(project.name) ?? []);
|
|
30
|
+
for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {
|
|
31
|
+
let session = each_array_1[$$index];
|
|
32
|
+
$$renderer2.push(`<li${attr_class(`flex items-center border-t border-gh-border-subtle group ${stringify(selectedSession?.id === session.id ? "bg-gh-accent/20 border-l-3 border-l-gh-accent" : "")}`)}><button${attr_class(`flex-1 min-w-0 py-2 pr-2 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 text-sm hover:bg-gh-border-subtle ${stringify(selectedSession?.id === session.id ? "pl-[calc(2rem-3px)]" : "pl-8")}`)}><span class="flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap">${escape_html(session.title ?? "Untitled")}</span> <span class="flex-shrink-0 text-xs text-gh-text-secondary bg-gh-border px-1.5 py-px rounded-lg">${escape_html(session.messageCount)}</span></button> <div class="flex gap-0.5 pr-2 opacity-0 group-hover:opacity-100 transition-opacity"><button class="bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-border text-xs" title="Rename">✏️</button> <button class="bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-red/20 text-xs" title="Delete">🗑️</button></div></li>`);
|
|
33
|
+
}
|
|
34
|
+
$$renderer2.push(`<!--]-->`);
|
|
35
|
+
}
|
|
36
|
+
$$renderer2.push(`<!--]--></ul>`);
|
|
37
|
+
} else {
|
|
38
|
+
$$renderer2.push("<!--[!-->");
|
|
39
|
+
}
|
|
40
|
+
$$renderer2.push(`<!--]--></li>`);
|
|
41
|
+
}
|
|
42
|
+
$$renderer2.push(`<!--]--></ul></aside> <section class="bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col"><div class="p-4 border-b border-gh-border bg-gh-bg">`);
|
|
43
|
+
{
|
|
44
|
+
$$renderer2.push("<!--[!-->");
|
|
45
|
+
$$renderer2.push(`<h2 class="text-base font-semibold">Messages</h2>`);
|
|
46
|
+
}
|
|
47
|
+
$$renderer2.push(`<!--]--></div> `);
|
|
48
|
+
{
|
|
49
|
+
$$renderer2.push("<!--[!-->");
|
|
50
|
+
$$renderer2.push(`<p class="p-8 text-center text-gh-text-secondary">Select a session</p>`);
|
|
51
|
+
}
|
|
52
|
+
$$renderer2.push(`<!--]--></section></div> `);
|
|
53
|
+
{
|
|
54
|
+
$$renderer2.push("<!--[!-->");
|
|
55
|
+
}
|
|
56
|
+
$$renderer2.push(`<!--]--> `);
|
|
57
|
+
{
|
|
58
|
+
$$renderer2.push("<!--[!-->");
|
|
59
|
+
}
|
|
60
|
+
$$renderer2.push(`<!--]-->`);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { _page as default };
|
|
65
|
+
//# sourceMappingURL=_page.svelte-BzYm1sb_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_page.svelte-BzYm1sb_.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_page.svelte.js"],"sourcesContent":["import { y as ensure_array_like, z as attr_class, x as attr, F as stringify } from \"../../chunks/index.js\";\nimport { e as escape_html } from \"../../chunks/context.js\";\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let projects = [];\n let projectSessions = /* @__PURE__ */ new Map();\n let expandedProjects = /* @__PURE__ */ new Set();\n let selectedSession = null;\n let loadingProject = null;\n const formatProjectName = (displayName) => {\n return displayName.replace(/^\\/Users\\/[^/]+/, \"~\");\n };\n const nonEmptyProjects = projects.filter((p) => p.sessionCount > 0);\n $$renderer2.push(`<div class=\"grid grid-cols-[350px_1fr] gap-4 h-[calc(100vh-120px)]\"><aside class=\"bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col\"><h2 class=\"p-4 text-base font-semibold border-b border-gh-border bg-gh-bg\">Projects (${escape_html(nonEmptyProjects.length)})</h2> <ul class=\"overflow-y-auto flex-1\"><!--[-->`);\n const each_array = ensure_array_like(nonEmptyProjects);\n for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {\n let project = each_array[$$index_1];\n $$renderer2.push(`<li class=\"border-b border-gh-border-subtle\"><button${attr_class(`w-full py-3 px-4 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 font-medium hover:bg-gh-border-subtle ${stringify(expandedProjects.has(project.name) ? \"bg-gh-accent/10\" : \"\")}`)}><span class=\"text-xs w-3 text-gh-text-secondary\">${escape_html(expandedProjects.has(project.name) ? \"▼\" : \"▶\")}</span> <span class=\"flex-1 overflow-hidden text-ellipsis whitespace-nowrap\"${attr(\"title\", project.display_name)}>${escape_html(formatProjectName(project.display_name))}</span> <span class=\"bg-gh-border px-2 py-0.5 rounded-full text-xs font-normal\">${escape_html(project.sessionCount)}</span></button> `);\n if (expandedProjects.has(project.name)) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<ul class=\"bg-gh-bg\">`);\n if (loadingProject === project.name) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<li class=\"py-2 px-8 text-gh-text-secondary text-sm\">Loading...</li>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<!--[-->`);\n const each_array_1 = ensure_array_like(projectSessions.get(project.name) ?? []);\n for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {\n let session = each_array_1[$$index];\n $$renderer2.push(`<li${attr_class(`flex items-center border-t border-gh-border-subtle group ${stringify(selectedSession?.id === session.id ? \"bg-gh-accent/20 border-l-3 border-l-gh-accent\" : \"\")}`)}><button${attr_class(`flex-1 min-w-0 py-2 pr-2 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 text-sm hover:bg-gh-border-subtle ${stringify(selectedSession?.id === session.id ? \"pl-[calc(2rem-3px)]\" : \"pl-8\")}`)}><span class=\"flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap\">${escape_html(session.title ?? \"Untitled\")}</span> <span class=\"flex-shrink-0 text-xs text-gh-text-secondary bg-gh-border px-1.5 py-px rounded-lg\">${escape_html(session.messageCount)}</span></button> <div class=\"flex gap-0.5 pr-2 opacity-0 group-hover:opacity-100 transition-opacity\"><button class=\"bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-border text-xs\" title=\"Rename\">✏️</button> <button class=\"bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-red/20 text-xs\" title=\"Delete\">🗑️</button></div></li>`);\n }\n $$renderer2.push(`<!--]-->`);\n }\n $$renderer2.push(`<!--]--></ul>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></li>`);\n }\n $$renderer2.push(`<!--]--></ul></aside> <section class=\"bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col\"><div class=\"p-4 border-b border-gh-border bg-gh-bg\">`);\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<h2 class=\"text-base font-semibold\">Messages</h2>`);\n }\n $$renderer2.push(`<!--]--></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<p class=\"p-8 text-center text-gh-text-secondary\">Select a session</p>`);\n }\n $$renderer2.push(`<!--]--></section></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { e as error, j as json } from './index-CoD1IJuy.js';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import { b as deleteSession, r as readSession } from './session-ioLIuaZI.js';
|
|
4
|
+
import 'node:fs/promises';
|
|
5
|
+
import 'node:path';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
|
|
8
|
+
const GET = async ({ url }) => {
|
|
9
|
+
const projectName = url.searchParams.get("project");
|
|
10
|
+
const sessionId = url.searchParams.get("id");
|
|
11
|
+
if (!projectName || !sessionId) {
|
|
12
|
+
throw error(400, "project and id parameters required");
|
|
13
|
+
}
|
|
14
|
+
const messages = await Effect.runPromise(readSession(projectName, sessionId));
|
|
15
|
+
return json(messages);
|
|
16
|
+
};
|
|
17
|
+
const DELETE = async ({ url }) => {
|
|
18
|
+
const projectName = url.searchParams.get("project");
|
|
19
|
+
const sessionId = url.searchParams.get("id");
|
|
20
|
+
if (!projectName || !sessionId) {
|
|
21
|
+
throw error(400, "project and id parameters required");
|
|
22
|
+
}
|
|
23
|
+
const result = await Effect.runPromise(deleteSession(projectName, sessionId));
|
|
24
|
+
return json(result);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { DELETE, GET };
|
|
28
|
+
//# sourceMappingURL=_server.ts-BXCTPhzX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-BXCTPhzX.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/session/_server.ts.js"],"sourcesContent":["import { error, json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { r as readSession, b as deleteSession } from \"../../../../chunks/session.js\";\nconst GET = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\");\n const sessionId = url.searchParams.get(\"id\");\n if (!projectName || !sessionId) {\n throw error(400, \"project and id parameters required\");\n }\n const messages = await Effect.runPromise(readSession(projectName, sessionId));\n return json(messages);\n};\nconst DELETE = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\");\n const sessionId = url.searchParams.get(\"id\");\n if (!projectName || !sessionId) {\n throw error(400, \"project and id parameters required\");\n }\n const result = await Effect.runPromise(deleteSession(projectName, sessionId));\n return json(result);\n};\nexport {\n DELETE,\n GET\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;AACrD,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;AAC9C,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE;AAClC,IAAI,MAAM,KAAK,CAAC,GAAG,EAAE,oCAAoC,CAAC;AAC1D,EAAE;AACF,EAAE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAC/E,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;AACvB;AACK,MAAC,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAClC,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;AACrD,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;AAC9C,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE;AAClC,IAAI,MAAM,KAAK,CAAC,GAAG,EAAE,oCAAoC,CAAC;AAC1D,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAC/E,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { j as json } from './index-CoD1IJuy.js';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import { l as listProjects } from './session-ioLIuaZI.js';
|
|
4
|
+
import 'node:fs/promises';
|
|
5
|
+
import 'node:path';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
|
|
8
|
+
const GET = async () => {
|
|
9
|
+
const projects = await Effect.runPromise(listProjects);
|
|
10
|
+
return json(projects);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { GET };
|
|
14
|
+
//# sourceMappingURL=_server.ts-Bxqo8tYS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-Bxqo8tYS.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/projects/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { l as listProjects } from \"../../../../chunks/session.js\";\nconst GET = async () => {\n const projects = await Effect.runPromise(listProjects);\n return json(projects);\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,YAAY;AACxB,EAAE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC;AACxD,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;AACvB;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as json } from './index-CoD1IJuy.js';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import { p as previewCleanup, c as clearSessions } from './session-ioLIuaZI.js';
|
|
4
|
+
import 'node:fs/promises';
|
|
5
|
+
import 'node:path';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
|
|
8
|
+
const GET = async ({ url }) => {
|
|
9
|
+
const projectName = url.searchParams.get("project") ?? void 0;
|
|
10
|
+
const result = await Effect.runPromise(previewCleanup(projectName));
|
|
11
|
+
return json(result);
|
|
12
|
+
};
|
|
13
|
+
const POST = async ({ request }) => {
|
|
14
|
+
const body = await request.json();
|
|
15
|
+
const result = await Effect.runPromise(
|
|
16
|
+
clearSessions({
|
|
17
|
+
projectName: body.project,
|
|
18
|
+
clearEmpty: body.clearEmpty,
|
|
19
|
+
clearInvalid: body.clearInvalid
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
return json(result);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { GET, POST };
|
|
26
|
+
//# sourceMappingURL=_server.ts-C5Bf6au4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-C5Bf6au4.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/cleanup/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { p as previewCleanup, c as clearSessions } from \"../../../../chunks/session.js\";\nconst GET = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\") ?? void 0;\n const result = await Effect.runPromise(previewCleanup(projectName));\n return json(result);\n};\nconst POST = async ({ request }) => {\n const body = await request.json();\n const result = await Effect.runPromise(\n clearSessions({\n projectName: body.project,\n clearEmpty: body.clearEmpty,\n clearInvalid: body.clearInvalid\n })\n );\n return json(result);\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,MAAM;AAC/D,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AACrE,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;AACK,MAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AACpC,EAAE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;AACnC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU;AACxC,IAAI,aAAa,CAAC;AAClB,MAAM,WAAW,EAAE,IAAI,CAAC,OAAO;AAC/B,MAAM,UAAU,EAAE,IAAI,CAAC,UAAU;AACjC,MAAM,YAAY,EAAE,IAAI,CAAC;AACzB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { j as json } from './index-CoD1IJuy.js';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import path__default from 'node:path';
|
|
5
|
+
|
|
6
|
+
const __dirname$1 = path__default.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const pkgPath = path__default.resolve(__dirname$1, "../../../../../../package.json");
|
|
8
|
+
let version = "0.1.0";
|
|
9
|
+
try {
|
|
10
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
11
|
+
version = pkg.version;
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
const GET = async () => {
|
|
15
|
+
return json({ version });
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { GET };
|
|
19
|
+
//# sourceMappingURL=_server.ts-C88EFL4g.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-C88EFL4g.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/version/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport path__default from \"node:path\";\nconst __dirname$1 = path__default.dirname(fileURLToPath(import.meta.url));\nconst pkgPath = path__default.resolve(__dirname$1, \"../../../../../../package.json\");\nlet version = \"0.1.0\";\ntry {\n const pkg = JSON.parse(readFileSync(pkgPath, \"utf-8\"));\n version = pkg.version;\n} catch {\n}\nconst GET = async () => {\n return json({ version });\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;AAIA,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzE,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,gCAAgC,CAAC;AACpF,IAAI,OAAO,GAAG,OAAO;AACrB,IAAI;AACJ,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxD,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO;AACvB,CAAC,CAAC,MAAM;AACR;AACK,MAAC,GAAG,GAAG,YAAY;AACxB,EAAE,OAAO,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;AAC1B;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { e as error, j as json } from './index-CoD1IJuy.js';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import { e as renameSession } from './session-ioLIuaZI.js';
|
|
4
|
+
import 'node:fs/promises';
|
|
5
|
+
import 'node:path';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
|
|
8
|
+
const POST = async ({ request }) => {
|
|
9
|
+
const body = await request.json();
|
|
10
|
+
if (!body.project || !body.id || !body.title) {
|
|
11
|
+
throw error(400, "project, id, and title required");
|
|
12
|
+
}
|
|
13
|
+
const result = await Effect.runPromise(renameSession(body.project, body.id, body.title));
|
|
14
|
+
return json(result);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { POST };
|
|
18
|
+
//# sourceMappingURL=_server.ts-D8vMV9FN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts-D8vMV9FN.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/session/rename/_server.ts.js"],"sourcesContent":["import { error, json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { e as renameSession } from \"../../../../../chunks/session.js\";\nconst POST = async ({ request }) => {\n const body = await request.json();\n if (!body.project || !body.id || !body.title) {\n throw error(400, \"project, id, and title required\");\n }\n const result = await Effect.runPromise(renameSession(body.project, body.id, body.title));\n return json(result);\n};\nexport {\n POST\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AACpC,EAAE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;AACnC,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AAChD,IAAI,MAAM,KAAK,CAAC,GAAG,EAAE,iCAAiC,CAAC;AACvD,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1F,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;;;;"}
|