ctxpool 0.1.0 → 0.4.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/README.md +95 -105
- package/dist/cli.js +328 -184
- package/dist/cli.js.map +1 -1
- package/dist/clipboard.js +8 -10
- package/dist/clipboard.js.map +1 -1
- package/dist/format.d.ts +32 -0
- package/dist/format.js +110 -0
- package/dist/format.js.map +1 -0
- package/dist/handoff.d.ts +16 -13
- package/dist/handoff.js +441 -706
- package/dist/handoff.js.map +1 -1
- package/dist/mcp.js +99 -221
- package/dist/mcp.js.map +1 -1
- package/dist/pack.d.ts +14 -0
- package/dist/pack.js +121 -0
- package/dist/pack.js.map +1 -0
- package/dist/paths.d.ts +15 -0
- package/dist/paths.js +35 -5
- package/dist/paths.js.map +1 -1
- package/dist/redact.d.ts +6 -0
- package/dist/redact.js +85 -0
- package/dist/redact.js.map +1 -0
- package/dist/repo.d.ts +6 -1
- package/dist/repo.js +109 -123
- package/dist/repo.js.map +1 -1
- package/dist/session.d.ts +40 -1
- package/dist/session.js +1295 -302
- package/dist/session.js.map +1 -1
- package/dist/store.d.ts +13 -6
- package/dist/store.js +88 -115
- package/dist/store.js.map +1 -1
- package/dist/text.d.ts +6 -0
- package/dist/text.js +25 -0
- package/dist/text.js.map +1 -0
- package/dist/types.d.ts +44 -7
- package/dist/ui.d.ts +10 -1
- package/dist/ui.js +329 -383
- package/dist/ui.js.map +1 -1
- package/dist/util.d.ts +10 -1
- package/dist/util.js +40 -10
- package/dist/util.js.map +1 -1
- package/dist/verify.d.ts +16 -0
- package/dist/verify.js +74 -0
- package/dist/verify.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/dist-web/assets/contextpool-mark-4vSRiUeZ.svg +1 -0
- package/dist-web/assets/index-BBjy_S2c.css +2 -0
- package/dist-web/assets/index-QwGbBEu2.js +17 -0
- package/dist-web/index.html +4 -3
- package/package.json +19 -18
- package/dist/logs.d.ts +0 -9
- package/dist/logs.js +0 -82
- package/dist/logs.js.map +0 -1
- package/dist-web/assets/contextpool-mark-Bu_00i5t.svg +0 -16
- package/dist-web/assets/index-BfHRocKl.js +0 -14
- package/dist-web/assets/index-l1QjYqDb.css +0 -2
package/dist-web/index.html
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<
|
|
6
|
+
<meta name="color-scheme" content="light dark" />
|
|
7
|
+
<link rel="icon" type="image/svg+xml" href="/assets/contextpool-mark-4vSRiUeZ.svg" />
|
|
7
8
|
<title>ContextPool</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-QwGbBEu2.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BBjy_S2c.css">
|
|
10
11
|
</head>
|
|
11
12
|
<body>
|
|
12
13
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ctxpool",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Hand off AI coding sessions between Codex, Claude, Gemini, Antigravity, and any MCP-capable agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"ctxpool": "
|
|
7
|
+
"ctxpool": "dist/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
@@ -23,38 +23,39 @@
|
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"ai",
|
|
26
|
+
"agents",
|
|
26
27
|
"mcp",
|
|
27
28
|
"handoff",
|
|
28
29
|
"codex",
|
|
29
|
-
"claude"
|
|
30
|
+
"claude",
|
|
31
|
+
"gemini",
|
|
32
|
+
"antigravity",
|
|
33
|
+
"context"
|
|
30
34
|
],
|
|
31
35
|
"license": "MIT",
|
|
32
36
|
"engines": {
|
|
33
|
-
"node": ">=22.
|
|
37
|
+
"node": ">=22.13.0"
|
|
34
38
|
},
|
|
35
39
|
"dependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@dnd-kit/sortable": "^10.0.0",
|
|
38
|
-
"@dnd-kit/utilities": "^3.2.2",
|
|
39
|
-
"@modelcontextprotocol/sdk": "^1.24.0",
|
|
40
|
-
"class-variance-authority": "^0.7.1",
|
|
41
|
-
"clsx": "^2.1.1",
|
|
40
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
42
41
|
"commander": "^14.0.2",
|
|
43
|
-
"lucide-react": "^1.16.0",
|
|
44
|
-
"radix-ui": "^1.4.3",
|
|
45
|
-
"react": "^19.2.6",
|
|
46
|
-
"react-dom": "^19.2.6",
|
|
47
|
-
"sql.js": "^1.14.1",
|
|
48
|
-
"tailwind-merge": "^3.6.0",
|
|
49
42
|
"zod": "^4.1.13"
|
|
50
43
|
},
|
|
51
44
|
"devDependencies": {
|
|
45
|
+
"@dnd-kit/core": "^6.3.1",
|
|
46
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
47
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
52
48
|
"@tailwindcss/vite": "^4.3.0",
|
|
53
49
|
"@types/node": "^24.10.1",
|
|
54
50
|
"@types/react": "^19.2.15",
|
|
55
51
|
"@types/react-dom": "^19.2.3",
|
|
56
|
-
"@types/sql.js": "^1.4.11",
|
|
57
52
|
"@vitejs/plugin-react": "^6.0.2",
|
|
53
|
+
"class-variance-authority": "^0.7.1",
|
|
54
|
+
"clsx": "^2.1.1",
|
|
55
|
+
"lucide-react": "^1.16.0",
|
|
56
|
+
"react": "^19.2.6",
|
|
57
|
+
"react-dom": "^19.2.6",
|
|
58
|
+
"tailwind-merge": "^3.6.0",
|
|
58
59
|
"tailwindcss": "^4.3.0",
|
|
59
60
|
"tsx": "^4.21.0",
|
|
60
61
|
"typescript": "^5.9.3",
|
package/dist/logs.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AgentSignal } from "./types.js";
|
|
2
|
-
export declare function discoverAgentSignals(options?: {
|
|
3
|
-
latest?: boolean;
|
|
4
|
-
codexPath?: string;
|
|
5
|
-
claudePath?: string;
|
|
6
|
-
maxAgeDays?: number;
|
|
7
|
-
}): AgentSignal[];
|
|
8
|
-
export declare function readAgentSignal(source: AgentSignal["source"], path: string): AgentSignal;
|
|
9
|
-
export declare function extractInterestingSnippets(raw: string): string[];
|
package/dist/logs.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { findRecentFiles, limit } from "./util.js";
|
|
5
|
-
const interestingLine = /(todo|plan|next|done|completed|block|blocked|error|failed|failure|fix|changed|created|updated|decision|decided|do not|don't|command|npm |pnpm |yarn |git |test)/i;
|
|
6
|
-
export function discoverAgentSignals(options = {}) {
|
|
7
|
-
const roots = [
|
|
8
|
-
{ source: "codex", path: options.codexPath || join(homedir(), ".codex", "sessions") },
|
|
9
|
-
{ source: "claude", path: options.claudePath || join(homedir(), ".claude", "projects") }
|
|
10
|
-
];
|
|
11
|
-
const signals = [];
|
|
12
|
-
for (const root of roots) {
|
|
13
|
-
if (!existsSync(root.path))
|
|
14
|
-
continue;
|
|
15
|
-
const files = findRecentFiles(root.path, options.latest ? 3 : 8);
|
|
16
|
-
for (const path of files) {
|
|
17
|
-
if (isTooOld(path, options.maxAgeDays ?? 14))
|
|
18
|
-
continue;
|
|
19
|
-
const signal = readAgentSignal(root.source, path);
|
|
20
|
-
if (signal.snippets.length > 0)
|
|
21
|
-
signals.push(signal);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return signals.sort((a, b) => Date.parse(b.modifiedAt) - Date.parse(a.modifiedAt)).slice(0, options.latest ? 4 : 12);
|
|
25
|
-
}
|
|
26
|
-
export function readAgentSignal(source, path) {
|
|
27
|
-
const stats = statSync(path);
|
|
28
|
-
const raw = readFileSync(path, "utf8").slice(-180_000);
|
|
29
|
-
const snippets = limit(extractInterestingSnippets(raw), 80);
|
|
30
|
-
return {
|
|
31
|
-
source,
|
|
32
|
-
path,
|
|
33
|
-
modifiedAt: stats.mtime.toISOString(),
|
|
34
|
-
snippets
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export function extractInterestingSnippets(raw) {
|
|
38
|
-
const lines = raw
|
|
39
|
-
.split(/\r?\n/)
|
|
40
|
-
.flatMap((line) => splitJsonLine(line))
|
|
41
|
-
.map(cleanLine)
|
|
42
|
-
.filter((line) => line.length > 8 && line.length < 900)
|
|
43
|
-
.filter((line) => !line.includes("<local-command-caveat>"));
|
|
44
|
-
return lines.filter((line) => interestingLine.test(line));
|
|
45
|
-
}
|
|
46
|
-
function isTooOld(path, maxAgeDays) {
|
|
47
|
-
if (maxAgeDays <= 0)
|
|
48
|
-
return false;
|
|
49
|
-
const ageMs = Date.now() - statSync(path).mtimeMs;
|
|
50
|
-
return ageMs > maxAgeDays * 24 * 60 * 60 * 1000;
|
|
51
|
-
}
|
|
52
|
-
function splitJsonLine(line) {
|
|
53
|
-
const trimmed = line.trim();
|
|
54
|
-
if (!trimmed.startsWith("{"))
|
|
55
|
-
return [trimmed];
|
|
56
|
-
try {
|
|
57
|
-
const parsed = JSON.parse(trimmed);
|
|
58
|
-
return collectStrings(parsed);
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
return [trimmed];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function collectStrings(value) {
|
|
65
|
-
if (typeof value === "string")
|
|
66
|
-
return [value];
|
|
67
|
-
if (Array.isArray(value))
|
|
68
|
-
return value.flatMap(collectStrings);
|
|
69
|
-
if (!value || typeof value !== "object")
|
|
70
|
-
return [];
|
|
71
|
-
const record = value;
|
|
72
|
-
const preferred = ["content", "text", "message", "summary", "command", "output", "error", "body"];
|
|
73
|
-
return preferred.flatMap((key) => collectStrings(record[key]));
|
|
74
|
-
}
|
|
75
|
-
function cleanLine(line) {
|
|
76
|
-
return line
|
|
77
|
-
.replace(/\u001b\[[0-9;]*m/g, "")
|
|
78
|
-
.replace(/^[-*]\s+/, "")
|
|
79
|
-
.replace(/\s+/g, " ")
|
|
80
|
-
.trim();
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=logs.js.map
|
package/dist/logs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,eAAe,GAAG,kKAAkK,CAAC;AAE3L,MAAM,UAAU,oBAAoB,CAAC,UAA8F,EAAE;IACnI,MAAM,KAAK,GAAsD;QAC/D,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE;QACrF,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE;KACzF,CAAC;IAEF,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,UAAU,C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B,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEnD,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAClG,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI;SACR,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;SAChC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
2
|
-
<defs>
|
|
3
|
-
<linearGradient id="ctxpool-mark" x1="7" y1="6" x2="25" y2="26" gradientUnits="userSpaceOnUse">
|
|
4
|
-
<stop stop-color="#67e8f9"/>
|
|
5
|
-
<stop offset="1" stop-color="#22c55e"/>
|
|
6
|
-
</linearGradient>
|
|
7
|
-
</defs>
|
|
8
|
-
<rect x="2" y="2" width="28" height="28" rx="8" fill="#09090b"/>
|
|
9
|
-
<path d="M10 11.5h5.3c2.8 0 4.9 2.3 4.9 5.1v1.2" fill="none" stroke="url(#ctxpool-mark)" stroke-width="1.9" stroke-linecap="round"/>
|
|
10
|
-
<path d="M10 20.5h4.3c1.6 0 3-.7 4-1.9l2.1-2.7" fill="none" stroke="#f8fafc" stroke-width="1.9" stroke-linecap="round"/>
|
|
11
|
-
<path d="M12.8 16h8.4" fill="none" stroke="#94a3b8" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="1 3"/>
|
|
12
|
-
<circle cx="9" cy="11.5" r="2.5" fill="#09090b" stroke="#f8fafc" stroke-width="1.6"/>
|
|
13
|
-
<circle cx="9" cy="20.5" r="2.5" fill="#09090b" stroke="url(#ctxpool-mark)" stroke-width="1.6"/>
|
|
14
|
-
<circle cx="22.5" cy="16" r="4" fill="#09090b" stroke="url(#ctxpool-mark)" stroke-width="1.8"/>
|
|
15
|
-
<circle cx="22.5" cy="16" r="1.45" fill="#f8fafc"/>
|
|
16
|
-
</svg>
|