45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import apply_layer_style from "../tools/apply_layer_style.js";
|
|
import geocode from "../tools/geocode.js";
|
|
import locate_features from "../tools/locate_features.js";
|
|
import memory_manager from "../tools/memory_manager.js";
|
|
import render_junctions from "../tools/render_junctions.js";
|
|
import session_search from "../tools/session_search.js";
|
|
import show_chart from "../tools/show_chart.js";
|
|
import skill_manager from "../tools/skill_manager.js";
|
|
import store_render_ref from "../tools/store_render_ref.js";
|
|
import tjwater_cli from "../tools/tjwater_cli.js";
|
|
import view_history from "../tools/view_history.js";
|
|
import view_scada from "../tools/view_scada.js";
|
|
import web_search from "../tools/web_search.js";
|
|
import zoom_to_map from "../tools/zoom_to_map.js";
|
|
import { Plugin } from "@opencode-ai/plugin";
|
|
|
|
const definitions = {
|
|
apply_layer_style,
|
|
geocode,
|
|
locate_features,
|
|
memory_manager,
|
|
render_junctions,
|
|
session_search,
|
|
show_chart,
|
|
skill_manager,
|
|
store_render_ref,
|
|
tjwater_cli,
|
|
view_history,
|
|
view_scada,
|
|
web_search,
|
|
zoom_to_map,
|
|
};
|
|
|
|
export default Plugin.define({
|
|
id: "tjwater-tools",
|
|
async setup(context) {
|
|
const registration = await context.tool.transform((tools) => {
|
|
for (const [name, definition] of Object.entries(definitions)) {
|
|
tools.add({ name, ...definition });
|
|
}
|
|
});
|
|
return () => registration.dispose();
|
|
},
|
|
});
|