@honua/mcp-server 0.0.6-alpha.0 → 0.0.8-alpha.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/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAatF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB;AAMD,eAAO,MAAM,cAAc,QAAyB,CAAC;AA2DrD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,cAAc,CAgD5E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,WAAW,CASrF;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,aAqE/C"}
|
package/dist/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import * as layerSchemaResource from "./resources/layer-schema.js";
|
|
|
8
8
|
import * as servicesResource from "./resources/services.js";
|
|
9
9
|
import * as countFeatures from "./tools/count-features.js";
|
|
10
10
|
import * as describeLayer from "./tools/describe-layer.js";
|
|
11
|
+
import * as explainCapabilityGap from "./tools/explain-capability-gap.js";
|
|
11
12
|
import * as getExtent from "./tools/get-extent.js";
|
|
12
13
|
import * as listServices from "./tools/list-services.js";
|
|
13
14
|
import * as queryFeatures from "./tools/query-features.js";
|
|
@@ -124,6 +125,7 @@ export function createServer(client) {
|
|
|
124
125
|
server.tool("honua_count_features", "Count features matching a filter without returning data. Use before querying to check cardinality.", countFeatures.schema.shape, async (args) => countFeatures.execute(client, countFeatures.schema.parse(args)));
|
|
125
126
|
server.tool("honua_get_extent", "Get the spatial bounding box of features matching a filter.", getExtent.schema.shape, async (args) => getExtent.execute(client, getExtent.schema.parse(args)));
|
|
126
127
|
server.tool("honua_statistics", "Compute aggregate statistics (count, sum, avg, min, max, stddev) on a field, optionally grouped.", statistics.schema.shape, async (args) => statistics.execute(client, statistics.schema.parse(args)));
|
|
128
|
+
server.tool("honua_explain_capability_gap", "Explain whether a Honua source/protocol supports a capability and suggest a safe fallback when it does not.", explainCapabilityGap.schema.shape, async (args) => explainCapabilityGap.execute(client, explainCapabilityGap.schema.parse(args)));
|
|
127
129
|
// ── Resources ──────────────────────────────────────────────────
|
|
128
130
|
server.resource("services-catalog", servicesResource.uri, async (uri) => servicesResource.read(client));
|
|
129
131
|
server.resource("layer-schema", new ResourceTemplate(layerSchemaResource.uriTemplate, { list: undefined }), async (uri, params) => layerSchemaResource.read(client, params.encodedServiceId, params.layerId));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Capability, type Protocol } from "@honua/sdk-js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const schema: z.ZodObject<{
|
|
4
|
+
capability: z.ZodEffects<z.ZodString, Capability, string>;
|
|
5
|
+
protocol: z.ZodOptional<z.ZodEffects<z.ZodString, Protocol, string>>;
|
|
6
|
+
sourceId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
declaredCapabilities: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, Capability, string>, "many">>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
capability: Capability;
|
|
10
|
+
protocol?: Protocol | undefined;
|
|
11
|
+
sourceId?: string | undefined;
|
|
12
|
+
declaredCapabilities?: Capability[] | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
capability: string;
|
|
15
|
+
protocol?: string | undefined;
|
|
16
|
+
sourceId?: string | undefined;
|
|
17
|
+
declaredCapabilities?: string[] | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type Input = z.infer<typeof schema>;
|
|
20
|
+
export declare function execute(_client: unknown, input: Input): Promise<{
|
|
21
|
+
content: Array<{
|
|
22
|
+
type: "text";
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=explain-capability-gap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain-capability-gap.d.ts","sourceRoot":"","sources":["../../../src/tools/explain-capability-gap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAa,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;EAKjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,wBAAsB,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK;;;;;GAI3D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CAPABILITIES, PROTOCOLS } from "@honua/sdk-js";
|
|
2
|
+
import { explainHonuaCapabilityGap } from "@honua/sdk-js/agent-tools";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { jsonText } from "../helpers.js";
|
|
5
|
+
const capabilitySchema = z.string().refine((value) => CAPABILITIES.includes(value), {
|
|
6
|
+
message: "Unknown Honua capability",
|
|
7
|
+
});
|
|
8
|
+
const protocolSchema = z
|
|
9
|
+
.string()
|
|
10
|
+
.refine((value) => PROTOCOLS.includes(value), {
|
|
11
|
+
message: "Unknown Honua protocol",
|
|
12
|
+
})
|
|
13
|
+
.optional();
|
|
14
|
+
export const schema = z.object({
|
|
15
|
+
capability: capabilitySchema.describe("Honua capability to check"),
|
|
16
|
+
protocol: protocolSchema.describe("Optional Honua protocol identifier"),
|
|
17
|
+
sourceId: z.string().optional().describe("Optional source id for the explanation"),
|
|
18
|
+
declaredCapabilities: z.array(capabilitySchema).optional().describe("Optional source-declared capabilities"),
|
|
19
|
+
});
|
|
20
|
+
export async function execute(_client, input) {
|
|
21
|
+
return jsonText({
|
|
22
|
+
explanation: explainHonuaCapabilityGap(input),
|
|
23
|
+
});
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@honua/mcp-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8-alpha.0",
|
|
4
4
|
"description": "MCP server for Honua geospatial feature services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"zod": "^3.24.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@honua/sdk-js": "^0.0.
|
|
29
|
+
"@honua/sdk-js": "^0.0.8-alpha.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@honua/sdk-js": "file:..",
|