feat: upgrade investigation and presentation runtime
Generic Container CI/CD / test-build-publish (push) Successful in 1m6s
Agent CI/CD / build-test-publish-and-deploy (push) Successful in 1m7s

This commit is contained in:
2026-10-30 17:30:19 +08:00
parent 3b52a0ddab
commit 6336157ff4
104 changed files with 6541 additions and 961 deletions
+5 -4
View File
@@ -8,17 +8,18 @@ const disabledServerTools = [
];
describe("disabled opencode tools", () => {
it("keeps removed generic server tools disabled while retaining SCADA frontend actions", () => {
it("keeps removed generic server tools disabled while using one typed presentation tool", () => {
for (const toolName of disabledServerTools) {
expect(existsSync(`.opencode/tools/${toolName}.ts`)).toBeFalse();
}
expect(existsSync(".opencode/tools/server_api_shared.ts")).toBeFalse();
expect(existsSync(".opencode/tools/web_search.ts")).toBeFalse();
expect(existsSync(".opencode/tools/geocode.ts")).toBeFalse();
expect(existsSync(".opencode/tools/zoom_to_map.ts")).toBeTrue();
expect(existsSync(".opencode/tools/present_view.ts")).toBeTrue();
for (const name of ["locate_features", "zoom_to_map", "show_chart", "view_history", "render_scada_analysis", "clear_scada_analysis"]) {
expect(existsSync(`.opencode/tools/${name}.ts`)).toBeFalse();
}
expect(existsSync(".opencode/tools/frontend_action.ts")).toBeTrue();
expect(existsSync(".opencode/tools/render_scada_analysis.ts")).toBeTrue();
expect(existsSync(".opencode/tools/clear_scada_analysis.ts")).toBeTrue();
expect(existsSync(".opencode/plugins/tjwater-tools.ts")).toBeTrue();
});
});
+3 -2
View File
@@ -17,11 +17,12 @@ it("configures a pinned native MCP connection using the host-owned endpoint and
const root = mkdtempSync(join(tmpdir(), "query-connection-")); roots.push(root);
process.env.AGENT_INTERNAL_TOKEN = "MCP_TEST_ONLY";
writeQueryMcpConnection(join(root, "sessions"), "http://127.0.0.1:12345/mcp");
expect(queryMcpConnection()?.timeout?.execution).toBe(300_000);
expect(queryMcpConnection()).toMatchObject({ type: "remote", protocol: "2026-07-28", oauth: false, codemode: false, headers: { "x-agent-internal-token": "MCP_TEST_ONLY" } });
writeQueryMcpConnection(join(root, "sessions"), "http://127.0.0.1:12345/mcp", 3_665_000);
expect(() => queryMcpConnection()).toThrow("timeout");
writeQueryMcpConnection(join(root, "sessions"), "http://127.0.0.1:12345/mcp", 35_000);
expect(queryMcpConnection()?.timeout?.execution).toBe(35_000);
writeQueryMcpConnection(join(root, "sessions"), "http://127.0.0.1:12345/mcp", 300_000);
expect(queryMcpConnection()?.timeout?.execution).toBe(300_000);
writeQueryMcpConnection(join(root, "sessions"), "http://127.0.0.1:12345/mcp", Infinity);
expect(() => queryMcpConnection()).toThrow("timeout");
writeQueryMcpConnection(join(root, "sessions"), "https://foreign.test/mcp");