failproofai 1.0.2-beta.4 → 1.0.2-beta.6
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js +4 -4
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js +2 -2
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03r-lqq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12021ot._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1le9jqc._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0clqfab._.js → [root-of-the-server]__1tg4pu6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +1 -1
- package/.next/standalone/.next/server/chunks/{_1lbh81u._.js → _19uwam-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +7 -7
- package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1m84s36._.js → [root-of-the-server]__00-s7h8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07gm3zl._.js +6 -6
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__14muoc4._.js → [root-of-the-server]__128se8m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0jzbk4_._.js → [root-of-the-server]__190won8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ctpynv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rsd3ll._.js → [root-of-the-server]__1sc84bb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0ovx4lz._.js → _0no96tu._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1dkh76z._.js → _11fc-hb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_1ddpc5g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1db3-8n._.js → _1if9ixi._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_1cf5ya2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_opencode-projects_ts_15bjxkm._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +19 -19
- package/.next/standalone/.next/static/chunks/{0lshnlpy1m6bc.js → 0931avh-06lj5.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0k_yvjc1yz0pq.js → 0h-3zffoy-_ji.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ds64uculrze8.js → 0p84npzxdgpc5.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0d_re32wscs0b.js → 0sdgnflvw8kta.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2dbi_x0c8n8fi.js → 0z7au3njlak0j.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1o0ahew9568ls.js → 1id7o44jjegf0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{00_t-xvc59tkb.js → 276n-edifojbd.js} +2 -2
- package/.next/standalone/.next/static/chunks/{07j2u70_3qsx8.js → 2jfskwd2u8o5r.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2817_8e94ah9z.js → 2pxr7nr1nyotn.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1oz0svxwt9574.js → 3i8rg2fv9nd6e.js} +2 -2
- package/.next/standalone/.next/static/chunks/{1q76jk_1_wgjq.js → 3vu_7_eor1m-k.js} +1 -1
- package/.next/standalone/.next/static/chunks/{turbopack-17utl_jw0wj11.js → turbopack-2x-o099q64i8h.js} +1 -1
- package/.next/standalone/lib/opencode-db.ts +77 -0
- package/.next/standalone/lib/opencode-projects.ts +37 -41
- package/.next/standalone/lib/opencode-sessions.ts +59 -36
- package/.next/standalone/package.json +9 -9
- package/.next/standalone/server.js +1 -1
- package/bin/failproofai.mjs +116 -34
- package/dist/cli.mjs +1732 -1177
- package/dist/worker.mjs +180 -165
- package/lib/opencode-db.ts +77 -0
- package/lib/opencode-projects.ts +37 -41
- package/lib/opencode-sessions.ts +59 -36
- package/package.json +9 -9
- package/src/audit/cache.ts +167 -11
- package/src/audit/cli-adapters/claude.ts +111 -1
- package/src/audit/cli-adapters/index.ts +31 -1
- package/src/audit/cli.ts +12 -0
- package/src/audit/index.ts +164 -13
- package/src/hooks/configure-wizard.ts +112 -18
- package/src/hooks/fp-reset.ts +1 -1
- package/src/hooks/handler.ts +13 -1
- package/src/hooks/manager.ts +69 -4
- package/src/hooks/onboarding-attempt.ts +4 -4
- package/src/hooks/pack-cli.ts +399 -32
- package/src/hooks/pack-store.ts +21 -8
- package/src/hooks/read-stdin.ts +78 -8
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1l-khtb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1mhmdzs._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qxztj-._.js +0 -3
- /package/.next/standalone/.next/static/{0iNzkTsP6rh14Rj5WL17o → mAYN9BOxWVFREnVp3yCHp}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{0iNzkTsP6rh14Rj5WL17o → mAYN9BOxWVFREnVp3yCHp}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{0iNzkTsP6rh14Rj5WL17o → mAYN9BOxWVFREnVp3yCHp}/_ssgManifest.js +0 -0
package/src/hooks/read-stdin.ts
CHANGED
|
@@ -15,34 +15,104 @@ export interface StdinRead {
|
|
|
15
15
|
oversized: boolean;
|
|
16
16
|
/** `process.stdin` emitted an `error` event before `end`. */
|
|
17
17
|
readError: boolean;
|
|
18
|
+
/** No `end` arrived within the budget; the payload is `""`. */
|
|
19
|
+
timedOut: boolean;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
/**
|
|
23
|
+
* How long to wait for the agent to finish writing the payload.
|
|
24
|
+
*
|
|
25
|
+
* Deliberately generous: the parent has the payload in hand before it spawns
|
|
26
|
+
* the hook, so a real read is milliseconds and this can only fire on a
|
|
27
|
+
* misconfiguration. It exists to bound that misconfiguration, not to police a
|
|
28
|
+
* slow write — a false timeout here would drop a real policy decision.
|
|
29
|
+
*/
|
|
30
|
+
const STDIN_TIMEOUT_MS = 10_000;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Read the hook payload, and NEVER wait forever for it.
|
|
34
|
+
*
|
|
35
|
+
* This runs on the enforcement path — every tool call, on all eleven agent
|
|
36
|
+
* CLIs — and it used to have no bound at all. The only early exit was
|
|
37
|
+
* `readableEnded`, which helps only when stdin is ALREADY closed, so a parent
|
|
38
|
+
* that spawned the hook with a pipe it had not yet closed, or with an inherited
|
|
39
|
+
* terminal, left this promise unsettled forever. A hung hook is worse than
|
|
40
|
+
* either verdict: it does not fail open or closed, it freezes the agent's tool
|
|
41
|
+
* call, and nothing on our side ever gives up.
|
|
42
|
+
*
|
|
43
|
+
* Two bounds, because there are two ways in:
|
|
44
|
+
*
|
|
45
|
+
* - A TTY on stdin means no payload is coming, ever. Nobody types a hook
|
|
46
|
+
* payload at a keyboard, so waiting for EOF on a terminal is waiting for a
|
|
47
|
+
* person to press ctrl-D — which is exactly what a hand-run
|
|
48
|
+
* `failproofai --hook PreToolUse` looked like.
|
|
49
|
+
* - An open pipe might still deliver, so it gets a clock rather than a
|
|
50
|
+
* refusal.
|
|
51
|
+
*
|
|
52
|
+
* Both resolve empty and flag what happened. That matches how a read error has
|
|
53
|
+
* always been treated — warn, report, evaluate an empty payload — rather than
|
|
54
|
+
* inventing a third verdict for a case that is a malformed invocation, not a
|
|
55
|
+
* policy decision.
|
|
56
|
+
*/
|
|
57
|
+
export async function readStdinPayload(
|
|
58
|
+
maxBytes = 1_048_576,
|
|
59
|
+
timeoutMs = STDIN_TIMEOUT_MS,
|
|
60
|
+
// Injectable so a test can hand in a stream that never ends — which is the
|
|
61
|
+
// whole condition under test — WITHOUT reassigning `process.stdin`. Doing
|
|
62
|
+
// that globally takes the test runner's own stdin away and kills it.
|
|
63
|
+
stream: NodeJS.ReadableStream & {
|
|
64
|
+
isTTY?: boolean;
|
|
65
|
+
readableEnded?: boolean;
|
|
66
|
+
destroy?: () => void;
|
|
67
|
+
} = process.stdin,
|
|
68
|
+
): Promise<StdinRead> {
|
|
21
69
|
let payload = "";
|
|
22
70
|
let oversized = false;
|
|
23
71
|
let readError = false;
|
|
72
|
+
let timedOut = false;
|
|
73
|
+
|
|
74
|
+
// A terminal never ends on its own. Checked before any listener is attached,
|
|
75
|
+
// so the hand-run case costs nothing and returns immediately.
|
|
76
|
+
if (stream.isTTY) {
|
|
77
|
+
return { payload: "", oversized: false, readError: false, timedOut: false };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
24
81
|
try {
|
|
25
82
|
payload = await new Promise<string>((resolve, reject) => {
|
|
26
83
|
const chunks: string[] = [];
|
|
27
84
|
let totalBytes = 0;
|
|
28
|
-
|
|
29
|
-
|
|
85
|
+
stream.setEncoding("utf8");
|
|
86
|
+
stream.on("data", (chunk: string) => {
|
|
30
87
|
totalBytes += Buffer.byteLength(chunk);
|
|
31
88
|
if (totalBytes > maxBytes) {
|
|
32
89
|
oversized = true;
|
|
33
|
-
|
|
90
|
+
stream.destroy?.();
|
|
34
91
|
resolve("");
|
|
35
92
|
return;
|
|
36
93
|
}
|
|
37
94
|
chunks.push(chunk);
|
|
38
95
|
});
|
|
39
|
-
|
|
40
|
-
|
|
96
|
+
stream.on("end", () => resolve(chunks.join("")));
|
|
97
|
+
stream.on("error", reject);
|
|
41
98
|
// If stdin is already closed or not piped, resolve immediately
|
|
42
|
-
if (
|
|
99
|
+
if (stream.readableEnded) resolve("");
|
|
100
|
+
|
|
101
|
+
timer = setTimeout(() => {
|
|
102
|
+
timedOut = true;
|
|
103
|
+
// Whatever arrived before the clock ran out is NOT used: a partial
|
|
104
|
+
// payload is not valid JSON, and half a tool call is not a thing any
|
|
105
|
+
// policy should be asked to judge.
|
|
106
|
+
stream.destroy?.();
|
|
107
|
+
resolve("");
|
|
108
|
+
}, timeoutMs);
|
|
109
|
+
// Nothing else keeps this process alive on account of the timer.
|
|
110
|
+
timer.unref?.();
|
|
43
111
|
});
|
|
44
112
|
} catch {
|
|
45
113
|
readError = true;
|
|
114
|
+
} finally {
|
|
115
|
+
if (timer) clearTimeout(timer);
|
|
46
116
|
}
|
|
47
|
-
return { payload, oversized, readError };
|
|
117
|
+
return { payload, oversized, readError, timedOut };
|
|
48
118
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},24868,(e,r,t)=>{r.exports=e.x("fs/promises",()=>require("fs/promises"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(e,r,t)=>{r.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},91301,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1qb590j._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(30441)))},16341,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1shcqgr._.js"].map(r=>e.l(r))).then(()=>r(93114)))},37352,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1jm9fw6._.js"].map(r=>e.l(r))).then(()=>r(36203)))},18944,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__17g9wh7._.js","server/chunks/src_hooks_fp-home_ts_09kv0bn._.js"].map(r=>e.l(r))).then(()=>r(57232)))},71809,e=>{"use strict";async function r(e,r){let t=Array(e.length),s=0;async function o(){for(;s<e.length;){let r=s++;try{t[r]={status:"fulfilled",value:await e[r]()}}catch(e){t[r]={status:"rejected",reason:e}}}}let a=Array.from({length:Math.min(r,e.length)},()=>o());return await Promise.all(a),t}e.s(["batchAll",0,r])},5807,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1w9zl9-._.js"].map(r=>e.l(r))).then(()=>r(55851)))},21476,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1legmza._.js"].map(r=>e.l(r))).then(()=>r(78166)))},97452,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1ou2ehh._.js"].map(r=>e.l(r))).then(()=>r(46413)))},23414,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0rv7m0k._.js"].map(r=>e.l(r))).then(()=>r(72094)))},52400,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0g6bbuw._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(79364)))},53229,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1ffkmds._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(40375)))},62998,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0q0qzx1._.js"].map(r=>e.l(r))).then(()=>r(69391)))},95231,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0--lkk6._.js"].map(r=>e.l(r))).then(()=>r(28246)))},28557,e=>{"use strict";e.s(["formatDate",0,function(e){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(e)}])},31854,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__08w4wmd._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(69164)))},49081,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1xuedea._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(36618)))},67347,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__06cuf1y._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(64828)))},32359,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0jnjf2t._.js","server/chunks/_1vslkoe._.js"].map(r=>e.l(r))).then(()=>r(3605)))},40911,e=>{"use strict";let r={info:0,warn:1,error:2};function t(e){return r[e]>=r.warn}function s(e){return`[failproofai${new Date().toISOString()}] ${e}`}e.s(["logActivity",0,function(e,r,o){if(!t("info"))return;let a=[`user=${e}`,`action=${r}`];o&&a.push(o),console.log(s("ACTIVITY"),a.join(" "))},"logError",0,function(e,r){void 0!==r?console.error(s("ERROR"),e,r):console.error(s("ERROR"),e)},"logWarn",0,function(e,r){t("warn")&&(void 0!==r?console.warn(s("WARN"),e,r):console.warn(s("WARN"),e))}])},38978,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__04_h-a5._.js"].map(r=>e.l(r))).then(()=>r(90624)))},26435,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0-219ec._.js"].map(r=>e.l(r))).then(()=>r(64199)))},82978,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1mhmdzs._.js"].map(r=>e.l(r))).then(()=>r(35435)))},82859,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__1qxztj-._.js"].map(r=>e.l(r))).then(()=>r(99440)))},81580,e=>{"use strict";var r=e.i(46786),t=e.i(14747);e.s(["decodeFolderName",0,function(e){return/^[A-Za-z]--/.test(e)?e[0]+":/"+e.slice(3).replace(/-/g,"/"):e.replace(/-/g,"/")},"encodeFolderName",0,function(e){let r=/^([A-Za-z]):[\\/](.*)$/.exec(e);return r?r[1]+"--"+r[2].replace(/[\\/]/g,"-"):e.replace(/[\\/]/g,"-")},"getClaudeProjectsPath",0,function(){let e=process.env.CLAUDE_PROJECTS_PATH;return e||(0,t.join)((0,r.homedir)(),".claude","projects")}])},45093,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0f7mikp._.js"].map(r=>e.l(r))).then(()=>r(19791)))},41330,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0q-v9z2._.js"].map(r=>e.l(r))).then(()=>r(85116)))},56936,e=>{"use strict";var r=e.i(12714),t=e.i(50227),s=e.i(81580),o=e.i(83534),a=e.i(71809),n=e.i(40911),i=e.i(28557);let l=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;async function c(e,t){try{return(await (0,r.stat)(e)).mtime}catch(e){return(0,n.logWarn)(`Failed to stat ${t}:`,e),new Date(0)}}async function u(e){try{if(!(await (0,r.stat)(e)).isDirectory())return null;return await (0,r.readdir)(e,{withFileTypes:!0})}catch{return null}}async function h(){try{let e=(0,s.getClaudeProjectsPath)(),r=await u(e);if(!r)return[];let o=(await (0,a.batchAll)(r.filter(e=>e.isDirectory()).map(r=>async()=>{let s=(0,t.join)(e,r.name),o=await c(s,r.name);return{name:r.name,path:s,isDirectory:!0,lastModified:o,lastModifiedFormatted:(0,i.formatDate)(o),cli:["claude"]}}),16)).filter(e=>"fulfilled"===e.status).map(e=>e.value);return o.sort((e,r)=>r.lastModified.getTime()-e.lastModified.getTime()),o}catch(e){return(0,n.logError)("Error reading Claude project folders:",e),[]}}async function d(){let[{getCodexProjects:r},{getCopilotProjects:t},{getCursorProjects:s},{getOpenCodeProjects:o},{getPiProjects:a},{getHermesProjects:i},{getOpenClawProjects:l},{getFactoryProjects:c},{getDevinProjects:u},{getAntigravityProjects:d},{getGooseProjects:m}]=await Promise.all([e.A(37352),e.A(5807),e.A(97452),e.A(82978),e.A(45093),e.A(67347),e.A(38978),e.A(62998),e.A(52400),e.A(91301),e.A(31854)]),[f,p,v,_,j,g,x,k,w,y,P,E]=await Promise.all([h(),r().catch(e=>((0,n.logError)("Error reading Codex projects:",e),[])),t().catch(e=>((0,n.logError)("Error reading Copilot projects:",e),[])),s().catch(e=>((0,n.logError)("Error reading Cursor projects:",e),[])),o().catch(e=>((0,n.logError)("Error reading OpenCode projects:",e),[])),a().catch(e=>((0,n.logError)("Error reading Pi projects:",e),[])),i().catch(e=>((0,n.logError)("Error reading Hermes projects:",e),[])),l().catch(e=>((0,n.logError)("Error reading OpenClaw projects:",e),[])),c().catch(e=>((0,n.logError)("Error reading Factory projects:",e),[])),u().catch(e=>((0,n.logError)("Error reading Devin projects:",e),[])),d().catch(e=>((0,n.logError)("Error reading Antigravity projects:",e),[])),m().catch(e=>((0,n.logError)("Error reading Goose projects:",e),[]))]);return function(...e){let r=new Map;for(let t of e)for(let e of t){let t=r.get(e.name);if(!t){r.set(e.name,{...e,cli:[...e.cli]});continue}let s=[...t.cli];for(let r of e.cli)s.includes(r)||s.push(r);let o=e.lastModified.getTime()>t.lastModified.getTime()?e:t;r.set(e.name,{...t,cli:s,lastModified:o.lastModified,lastModifiedFormatted:o.lastModifiedFormatted,sessionCount:void 0===t.sessionCount&&void 0===e.sessionCount?void 0:(t.sessionCount??0)+(e.sessionCount??0)})}let t=Array.from(r.values());return t.sort((e,r)=>r.lastModified.getTime()-e.lastModified.getTime()),t}(f,p,v,_,j,g,x,k,w,y,P,E)}function m(e){if(!e)throw RangeError("Empty project name");if(/^[/\\]/.test(e))throw RangeError("Absolute project name");let r=(0,t.resolve)((0,s.getClaudeProjectsPath)()),o=(0,t.resolve)((0,t.join)(r,e));if(!o.startsWith(r+t.sep))throw RangeError("Project path escapes root");return o}function f(e){let r=e.match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i);return r?r[0]:void 0}async function p(e){try{let r=await u(e);if(!r)return[];let s=r.filter(e=>e.isFile()&&e.name.endsWith(".jsonl")&&f(e.name)),o=(await (0,a.batchAll)(s.map(r=>async()=>{let s=(0,t.join)(e,r.name),o=await c(s,r.name);return{name:r.name,path:s,lastModified:o,lastModifiedFormatted:(0,i.formatDate)(o),sessionId:f(r.name),cli:"claude"}}),16)).filter(e=>"fulfilled"===e.status).map(e=>e.value);return o.sort((e,r)=>r.lastModified.getTime()-e.lastModified.getTime()),o}catch(e){return(0,n.logError)("Error reading session files:",e),[]}}(0,o.runtimeCache)(d,30),(0,o.runtimeCache)(e=>p(e),30),e.s(["UUID_RE",0,l,"resolveProjectPath",0,m,"resolveSessionFilePath",0,function(e,r){if(!l.test(r))throw RangeError("Invalid session ID");let s=m(e);return(0,t.join)(s,`${r}.jsonl`)}])},83534,e=>{"use strict";e.s(["runtimeCache",0,function(e,r,t){let s=new Map,o=new Map,a=t?.maxSize;return async(...t)=>{let n=JSON.stringify(t),i=s.get(n);if(i&&Date.now()<i.expiry)return i.data;let l=o.get(n);if(l)return l;let c=e(...t).then(e=>{if(o.delete(n),a&&s.size>=a){let e=s.keys().next().value;s.delete(e)}return s.set(n,{data:e,expiry:Date.now()+1e3*r}),e},e=>{throw o.delete(n),e});return o.set(n,c),c}}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__1l-khtb._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},35435,e=>{"use strict";var t=e.i(74533),r=e.i(81580),o=e.i(83534),i=e.i(28557),d=e.i(40911);function n(e){try{let r=(0,t.execFileSync)("opencode",["db","--format","json",e],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]});if(!r.trim())return[];let o=JSON.parse(r);if(!Array.isArray(o))return null;return o}catch{return null}}function s(){return n("SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session ORDER BY time_updated DESC LIMIT 1000")}function a(){return n("SELECT id, worktree, vcs, name, time_created, time_updated FROM project")}async function l(){let e=s(),t=a();if(null===e&&null===t)return[];let o=new Map;for(let e of t??[])o.set(e.id,e);let d=new Map;for(let t of e??[]){if(!t.project_id)continue;let e=d.get(t.project_id);e||(e={rows:[],latest:0},d.set(t.project_id,e)),e.rows.push(t),t.time_updated>e.latest&&(e.latest=t.time_updated)}let n=new Set,l=[];for(let[e,t]of d){n.add(e);let d=o.get(e),s=d?.worktree??t.rows[0]?.directory??null,a=s?(0,r.encodeFolderName)(s):e,c=s??"",u=new Date(Math.max(t.latest,d?.time_updated??0));l.push({name:a,path:c,isDirectory:!0,lastModified:u,lastModifiedFormatted:(0,i.formatDate)(u),cli:["opencode"]})}for(let e of t??[]){if(n.has(e.id))continue;let t=e.worktree??"",o=t?(0,r.encodeFolderName)(t):e.id,d=new Date(e.time_updated);l.push({name:o,path:t,isDirectory:!0,lastModified:d,lastModifiedFormatted:(0,i.formatDate)(d),cli:["opencode"]})}return l.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime()),l}async function c(e){let t=s();return t?t.filter(t=>t.directory===e).map(e=>{let t=new Date(e.time_updated);return{name:e.title??e.slug??e.id,path:`opencode://${e.id}`,lastModified:t,lastModifiedFormatted:(0,i.formatDate)(t),sessionId:e.id,cli:"opencode"}}):[]}async function u(e){let t,o;try{t=a(),o=s()}catch(e){return(0,d.logWarn)("Failed to read OpenCode DB:",e),{cwd:null,sessions:[]}}if(!t||!o)return{cwd:null,sessions:[]};let n=t.find(t=>t.worktree&&(0,r.encodeFolderName)(t.worktree)===e);if(!n||!n.worktree)return{cwd:null,sessions:[]};let l=o.filter(e=>e.project_id===n.id);return{cwd:n.worktree,sessions:l.map(e=>{let t=new Date(e.time_updated);return{name:e.title??e.slug??e.id,path:`opencode://${e.id}`,lastModified:t,lastModifiedFormatted:(0,i.formatDate)(t),sessionId:e.id,cli:"opencode"}})}}let p=(0,o.runtimeCache)(l,30),m=(0,o.runtimeCache)(e=>c(e),30,{maxSize:50}),f=(0,o.runtimeCache)(e=>u(e),30,{maxSize:50});e.s(["getCachedOpenCodeProjects",0,p,"getCachedOpenCodeSessionsByEncodedName",0,f,"getCachedOpenCodeSessionsForCwd",0,m,"getOpenCodeProjects",0,l,"getOpenCodeSessionsByEncodedName",0,u,"getOpenCodeSessionsForCwd",0,c])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__1mhmdzs._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[74533,(t,e,i)=>{e.exports=t.x("node:child_process",()=>require("node:child_process"))},54214,67405,t=>{"use strict";var e=t.i(24868),i=t.i(14747),n=t.i(81580),s=t.i(56936);async function r(t,n,s,r){let a=`agent-${r}.jsonl`;for(let r of[(0,i.join)(t,n,a),(0,i.join)(t,n,s,a),(0,i.join)(t,n,s,"subagents",a)])if(!(0,i.relative)(t,r).startsWith(".."))try{return await (0,e.access)(r),r}catch(t){if("ENOENT"===t.code)continue;break}return null}var a=t.i(83534),o=t.i(71809),u=t.i(28557);function l(t){if(t<1e3)return`${t}ms`;let e=Math.round(t/100);if(e<600)return`${(e/10).toFixed(1)}s`;let i=Math.round(t/1e3);if(i<3600){let t=Math.floor(i/60);return`${t}m ${i%60}s`}let n=Math.round(t/6e4),s=Math.floor(n/60);return`${s}h ${n%60}m`}function d(t){let e=(0,u.formatDate)(t),i=t.getMilliseconds().toString().padStart(3,"0");return`${e}.${i}`}function m(t,e,i,n){return{_source:n,uuid:t.uuid||"",parentUuid:t.parentUuid??null,timestamp:e,timestampMs:i.getTime(),timestampFormatted:d(i)}}async function p(t,e){let i=t.split("\n").filter(t=>""!==t.trim()),n=new Map,s=[],r=[],a=new Set,o=!1;for(let t=0;t<i.length;t++){let u;t>0&&t%200==0&&await new Promise(t=>setImmediate(t));let l=i[t];try{u=JSON.parse(l)}catch{continue}let d={...u,_source:e};r.push(d);let p=u.type,c=u.timestamp;if(!c)continue;let f=new Date(c),g=f.getTime();if("user"===p){let t=u.message;if(Array.isArray(t?.content)){let e=t.content;if(e.some(t=>"tool_result"===t.type)){let t=u.toolUseResult,i="string"==typeof t?.agentId?t.agentId:void 0;for(let t of(i&&/^[a-f0-9]+$/.test(i)&&a.add(i),e)){if("tool_result"!==t.type)continue;let e=t.tool_use_id;if(!e)continue;let{text:s,images:r}=function(t){let e=t.content;if("string"==typeof e)return{text:e};if(Array.isArray(e)){let t=e.filter(t=>"text"===t.type).map(t=>t.text),i=e.filter(t=>"image"===t.type).map(t=>{let e=t.source;return{base64:e.data,mediaType:e.media_type}}).filter(t=>t.base64&&t.mediaType);return{text:t.length>0?t.join("\n"):void 0,images:i.length>0?i:void 0}}return{}}(t);n.set(e,{timestamp:c,timestampMs:g,content:s,images:r,agentId:i})}continue}}let i="string"==typeof t?.content?t.content:"";s.push({type:"user",...m(u,c,f,e),message:{role:"user",content:i}});continue}if("assistant"===p){let t=u.message,i=[];if(Array.isArray(t?.content)&&(i=t.content.filter(t=>["text","tool_use","thinking"].includes(t.type)).map(t=>{if("text"===t.type)return{type:"text",text:t.text};if("tool_use"===t.type){let e=t.input;return{type:"tool_use",id:t.id,name:t.name,input:t.input??{},..."Task"===t.name&&e?{subagentType:e.subagent_type,subagentDescription:e.description}:{}}}return{type:"thinking",thinking:t.thinking,signature:t.signature}})),0===i.length)continue;s.push({type:"assistant",...m(u,c,f,e),message:{role:"assistant",content:i,model:t?.model}});continue}if("file-history-snapshot"===p||"progress"===p||"system"===p){s.push({type:p,...m(u,c,f,e),raw:{...u}});continue}if("queue-operation"===p){let t=o?"Session Resumed":"Session Started";o=!0,s.push({type:"queue-operation",...m(u,c,f,e),label:t});continue}}let u=0;for(let t of s)if("assistant"===t.type)for(let e of(++u%200==0&&await new Promise(t=>setImmediate(t)),t.message.content)){if("tool_use"!==e.type)continue;let i=n.get(e.id);if(!i)continue;let s=new Date(i.timestamp),r=Math.max(0,i.timestampMs-t.timestampMs);e.result={timestamp:i.timestamp,timestampFormatted:d(s),content:i.content,images:i.images,durationMs:r,durationFormatted:l(r)},i.agentId&&(e.subagentId=i.agentId)}return s.length>500&&await new Promise(t=>setImmediate(t)),s.sort((t,e)=>t.timestampMs-e.timestampMs),{entries:s,rawLines:r,subagentIds:Array.from(a)}}async function c(t,e="session"){return(await p(t,e)).entries}async function f(t,a){let u=(0,s.resolveProjectPath)(t),l=(0,n.getClaudeProjectsPath)(),d=(0,i.join)(u,`${a}.jsonl`),m=await (0,e.readFile)(d,"utf-8"),{entries:c,rawLines:f,subagentIds:g}=await p(m,"session");if(0===g.length)return{entries:c,rawLines:f,subagentIds:[]};let y=await (0,o.batchAll)(g.map(i=>async()=>{let n=`agent-${i}`,s=await r(l,t,a,i);if(!s)return null;let o=await (0,e.readFile)(s,"utf-8"),{entries:u,rawLines:d}=await p(o,n);return{entries:u,rawLines:d}}),4),_=[...c],h=[...f];for(let t of y)"fulfilled"===t.status&&t.value&&(_.push(...t.value.entries),h.push(...t.value.rawLines));return _.length>500&&await new Promise(t=>setImmediate(t)),_.sort((t,e)=>t.timestampMs-e.timestampMs),{entries:_,rawLines:h,subagentIds:g}}t.s(["formatDuration",0,l],67405),(0,a.runtimeCache)((t,e)=>f(t,e),60,{maxSize:50}),t.s(["baseEntry",0,m,"formatTimestamp",0,d,"parseLogContent",0,c,"parseRawLines",0,function(t,e){return t.split("\n").filter(t=>""!==t.trim()).flatMap(t=>{try{let i=JSON.parse(t);return void 0!==e&&(i._source=e),[i]}catch{return[]}})}],54214)},99440,t=>{"use strict";var e=t.i(74533),i=t.i(83534),n=t.i(54214),s=t.i(67405);function r(t){try{let i=(0,e.execFileSync)("opencode",["db","--format","json",t],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]});if(!i.trim())return[];let n=JSON.parse(i);if(!Array.isArray(n))return null;return n}catch{return null}}function a(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function o(t){if("string"!=typeof t||0===t.length)return null;try{let e=JSON.parse(t);return a(e)?e:null}catch{return null}}async function u(t){if(!t||!/^[A-Za-z0-9_-]+$/.test(t))return null;let e=r(`SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session WHERE id = '${t}'`);if(!e||0===e.length)return null;let i=e[0],u=r(`SELECT id, session_id, time_created, time_updated, data FROM message WHERE session_id = '${t}' ORDER BY time_created ASC`),l=r(`SELECT id, message_id, session_id, time_created, time_updated, data FROM part WHERE session_id = '${t}' ORDER BY time_created ASC`);if(!u)return{entries:[],rawLines:[],cwd:i.directory??void 0,filePath:`opencode://${t}`};let d=new Map;for(let t of l??[]){let e=d.get(t.message_id);e||(e=[],d.set(t.message_id,e)),e.push(t)}let m=[],p=[];for(let t of u){let e=d.get(t.id)??[];m.push(function(t,e,i){let r=o(t.data)??{},u="string"==typeof r.role?r.role:"system",l=new Date(t.time_created),d=l.toISOString(),m={uuid:t.id,parentUuid:null},p=(0,n.baseEntry)(m,d,l,i),c=[],f="";for(let t of e){let e=o(t.data);if(!e)continue;let i="string"==typeof e.type?e.type:"unknown";if("text"===i){let t="string"==typeof e.text?e.text:"string"==typeof e.content?e.content:"";t&&(c.push({type:"text",text:t}),f+=(f?"\n":"")+t);continue}if("tool"===i){let i="string"==typeof e.tool?e.tool:"string"==typeof e.name?e.name:"tool",r=a(e.state)?e.state:null,o=r&&a(r.input)?r.input:a(e.input)?e.input:a(e.args)?e.args:{},u={type:"tool_use",id:t.id,name:i,input:o},l=r&&"string"==typeof r.status?r.status:"";if(r&&("completed"===l||"error"===l)){let e=("error"===l&&"string"==typeof r.error?r.error:null)??r.output,i="string"==typeof e?e:null!=e?JSON.stringify(e):"",o=a(r.time)?r.time:{},d="number"==typeof o.start?o.start:t.time_created,m="number"==typeof o.end?o.end:t.time_updated,p=Math.max(0,m-d),c=new Date(m);u.result={timestamp:c.toISOString(),timestampFormatted:(0,n.formatTimestamp)(c),content:i,durationMs:p,durationFormatted:(0,s.formatDuration)(p)}}c.push(u);continue}c.push({type:"text",text:`[opencode ${i}]`})}if("user"===u)return{...p,type:"user",message:{role:"user",content:f}};if("assistant"===u){let t=a(r.model)?r.model:null,e=t&&"string"==typeof t.modelID?t.modelID:void 0;return{...p,type:"assistant",message:{role:"assistant",content:c,model:e}}}return{...p,type:"system",raw:{id:t.id,role:u,parts:c}}}(t,e,"session"));let i=o(t.data);p.push({id:t.id,session_id:t.session_id,time_created:t.time_created,data:i??t.data})}return{entries:m,rawLines:p,cwd:i.directory??void 0,filePath:`opencode://${t}`}}async function l(t){if(!t||!/^[A-Za-z0-9_-]+$/.test(t))return null;let e=r(`SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session WHERE id = '${t}'`);if(!e||0===e.length)return null;let i=r(`SELECT id, session_id, time_created, time_updated, data FROM message WHERE session_id = '${t}' ORDER BY time_created ASC`),n=r(`SELECT id, message_id, session_id, time_created, time_updated, data FROM part WHERE session_id = '${t}' ORDER BY time_created ASC`);return null===i||null===n?null:{session:e[0],messages:i.map(t=>({...t,data:o(t.data)??t.data})),parts:n.map(t=>({...t,data:o(t.data)??t.data}))}}(0,i.runtimeCache)(t=>u(t),30,{maxSize:50}),t.s(["getOpenCodeSessionExport",0,l,"getOpenCodeSessionLog",0,u])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__1qxztj-._.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|