chapterhouse 0.8.2 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/korg.js +2 -19
- package/dist/api/route-coverage.test.js +224 -0
- package/dist/api/server.js +238 -14
- package/dist/api/server.test.js +88 -2
- package/dist/shared/api-schemas.js +615 -0
- package/dist/store/db.js +1 -0
- package/dist/wiki/index-manager.js +1 -1
- package/package.json +1 -1
- package/web/dist/assets/{index-BbX9RKf3.js → index-iQrv3lQN.js} +155 -94
- package/web/dist/assets/index-iQrv3lQN.js.map +1 -0
- package/web/dist/index.html +1 -1
- package/dist/api/korg.test.js +0 -42
- package/web/dist/assets/index-BbX9RKf3.js.map +0 -1
package/web/dist/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<link rel="icon" type="image/png" href="/chapterhouse-icon.png" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Chapterhouse</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-iQrv3lQN.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-5kz9aRU9.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/dist/api/korg.test.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import test from "node:test";
|
|
3
|
-
test("routeKorgMessage creates a research session id and delegates to the persistent Korg agent", async (t) => {
|
|
4
|
-
const calls = [];
|
|
5
|
-
t.mock.module("../copilot/orchestrator.js", {
|
|
6
|
-
namedExports: {
|
|
7
|
-
sendToAgentSession: async (slug, prompt) => {
|
|
8
|
-
calls.push({ slug, prompt });
|
|
9
|
-
return "Korg reply";
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
const mod = await import(new URL(`./korg.js?case=${Date.now()}-${Math.random()}`, import.meta.url).href);
|
|
14
|
-
const result = await mod.routeKorgMessage({ message: "Research local-first PKB patterns." });
|
|
15
|
-
assert.equal(result.ok, true);
|
|
16
|
-
assert.match(result.session_id, /^korg-/);
|
|
17
|
-
assert.equal(result.reply, "Korg reply");
|
|
18
|
-
assert.deepEqual(calls, [{
|
|
19
|
-
slug: "korg",
|
|
20
|
-
prompt: calls[0].prompt,
|
|
21
|
-
}]);
|
|
22
|
-
assert.match(calls[0].prompt, /Research session id:/);
|
|
23
|
-
assert.match(calls[0].prompt, /Research local-first PKB patterns\./);
|
|
24
|
-
});
|
|
25
|
-
test("routeKorgMessage preserves an existing research session id in the delegated prompt", async (t) => {
|
|
26
|
-
let prompt = "";
|
|
27
|
-
t.mock.module("../copilot/orchestrator.js", {
|
|
28
|
-
namedExports: {
|
|
29
|
-
sendToAgentSession: async (_slug, incomingPrompt) => {
|
|
30
|
-
prompt = incomingPrompt;
|
|
31
|
-
return "Continuing session";
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
const mod = await import(new URL(`./korg.js?case=${Date.now()}-${Math.random()}`, import.meta.url).href);
|
|
36
|
-
const result = await mod.routeKorgMessage({ message: "Add two more sources.", session_id: "compiler-research" });
|
|
37
|
-
assert.equal(result.session_id, "compiler-research");
|
|
38
|
-
assert.equal(result.reply, "Continuing session");
|
|
39
|
-
assert.match(prompt, /compiler-research/);
|
|
40
|
-
assert.match(prompt, /Add two more sources\./);
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=korg.test.js.map
|