teapot-coding-agent 0.35.31 → 0.36.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/agent/agent.js +14 -1
- package/dist/master.js +11 -0
- package/dist/server/api.js +32 -0
- package/package.json +1 -1
- package/public/assets/index-C1_C58W-.js +31 -0
- package/public/assets/index-C1_C58W-.js.map +1 -0
- package/public/assets/index-DvmUFvPp.css +1 -0
- package/public/assets/{shiki-BHrICu1r.js → shiki-BKf80KQD.js} +2 -2
- package/public/assets/{shiki-BHrICu1r.js.map → shiki-BKf80KQD.js.map} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-DqK7j2Mn.js +0 -31
- package/public/assets/index-DqK7j2Mn.js.map +0 -1
- package/public/assets/index-DtBIl-1O.css +0 -1
package/dist/agent/agent.js
CHANGED
|
@@ -1831,7 +1831,20 @@ export class Agent {
|
|
|
1831
1831
|
branch: this.currentBranch,
|
|
1832
1832
|
goal: {
|
|
1833
1833
|
status: this.goal.status,
|
|
1834
|
-
|
|
1834
|
+
/**
|
|
1835
|
+
* The goal is sent WHOLE.
|
|
1836
|
+
*
|
|
1837
|
+
* This used to be `slice(0, 400)`, which reads as a sane payload cap and behaves as a
|
|
1838
|
+
* silent data loss: the right panel's goal card is the only place the operator sees the
|
|
1839
|
+
* text they wrote, so a long goal stopped mid-sentence. Reported as "goalに設定されている
|
|
1840
|
+
* 文字列が長いとフロントエンドのgoal欄で後半が切られる? 全部表示されてほしい".
|
|
1841
|
+
*
|
|
1842
|
+
* MEASURED: a 1500-character goal reached the browser as exactly 400 characters. The
|
|
1843
|
+
* payload argument does not survive the numbers either — this rides one `/api/agents`
|
|
1844
|
+
* response that is already carrying every agent's stats, and a goal is a few KB at worst.
|
|
1845
|
+
* `verify` keeps its own cap below, where the auditor writes it.
|
|
1846
|
+
*/
|
|
1847
|
+
text: this.goal.text,
|
|
1835
1848
|
...(this.goal.verify ? { verify: this.goal.verify.slice(0, 1000) } : {}),
|
|
1836
1849
|
...(this.goal.audit ? { audit: this.goal.audit } : {}),
|
|
1837
1850
|
},
|
package/dist/master.js
CHANGED
|
@@ -497,6 +497,17 @@ export class Master {
|
|
|
497
497
|
// contents in test/mcp-config-roundtrip.test.ts, which was impossible while that test
|
|
498
498
|
// wrote to /dev/null.
|
|
499
499
|
this.raw.mcpServers = this.config.mcpServers;
|
|
500
|
+
/**
|
|
501
|
+
* Custom themes live in the config so they follow the machine, not one browser.
|
|
502
|
+
*
|
|
503
|
+
* This line is the whole persistence: `raw` is the hand-maintained mirror that actually gets
|
|
504
|
+
* written, and a field missing from it exists in memory and in `GET /api/config` while never
|
|
505
|
+
* reaching the file — exactly the #67 failure above, which is why it is called out there.
|
|
506
|
+
*/
|
|
507
|
+
if (this.config.customThemes !== undefined)
|
|
508
|
+
this.raw.customThemes = this.config.customThemes;
|
|
509
|
+
if (this.config.themePrefs !== undefined)
|
|
510
|
+
this.raw.themePrefs = this.config.themePrefs;
|
|
500
511
|
if (this.config.shortContext !== undefined)
|
|
501
512
|
this.raw.shortContext = this.config.shortContext;
|
|
502
513
|
if (this.config.pluginsDir !== undefined)
|
package/dist/server/api.js
CHANGED
|
@@ -1382,6 +1382,38 @@ export function buildApp(master) {
|
|
|
1382
1382
|
app.get("/api/personas", (c) => c.json({
|
|
1383
1383
|
personas: Object.entries(SUB_PERSONAS).map(([key, p]) => ({ key, label: p.label, directive: p.directive })),
|
|
1384
1384
|
}));
|
|
1385
|
+
/**
|
|
1386
|
+
* Custom themes, SERVER-side, so they follow the config instead of one browser.
|
|
1387
|
+
*
|
|
1388
|
+
* They lived in `localStorage`: a theme made on the desktop did not exist on a phone or in a
|
|
1389
|
+
* second browser, and clearing site data lost it. Asked for as "カスタムテーマをlocalStorageじゃ
|
|
1390
|
+
* なくてサーバーで管理するようにしたい".
|
|
1391
|
+
*
|
|
1392
|
+
* Validation is deliberately shallow — `customThemes` is opaque to the server and the frontend
|
|
1393
|
+
* already sanitises on read (`sanitizeTheme`), which is where the palette's required shape is
|
|
1394
|
+
* known. What the server DOES enforce is that it is an array of objects and that the write lands
|
|
1395
|
+
* in the config FILE: a theme that exists only in memory is the #67 failure.
|
|
1396
|
+
*/
|
|
1397
|
+
app.get("/api/themes", (c) => c.json({
|
|
1398
|
+
themes: Array.isArray(master.config.customThemes) ? master.config.customThemes : [],
|
|
1399
|
+
prefs: master.config.themePrefs ?? {},
|
|
1400
|
+
}));
|
|
1401
|
+
app.put("/api/themes", async (c) => {
|
|
1402
|
+
const body = await c.req
|
|
1403
|
+
.json()
|
|
1404
|
+
.catch(() => null);
|
|
1405
|
+
if (!body || !Array.isArray(body.themes))
|
|
1406
|
+
return c.json({ error: "themes[] required" }, 400);
|
|
1407
|
+
for (const t of body.themes) {
|
|
1408
|
+
if (!t || typeof t !== "object" || Array.isArray(t))
|
|
1409
|
+
return c.json({ error: "every theme must be an object" }, 400);
|
|
1410
|
+
}
|
|
1411
|
+
master.config.customThemes = body.themes;
|
|
1412
|
+
if (body.prefs && typeof body.prefs === "object" && !Array.isArray(body.prefs))
|
|
1413
|
+
master.config.themePrefs = body.prefs;
|
|
1414
|
+
master.saveConfig();
|
|
1415
|
+
return c.json({ ok: true, themes: master.config.customThemes });
|
|
1416
|
+
});
|
|
1385
1417
|
// spawn a sub-agent from the UI (@mention flow / manual)
|
|
1386
1418
|
app.post("/api/agents/:id/spawn", async (c) => {
|
|
1387
1419
|
const a = master.agents.get(c.req.param("id"));
|