@honua/mcp-server 0.1.13 → 0.1.15
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/README.md +18 -2
- package/certification/geospatial-mcp-schemas/PROVENANCE.md +14 -8
- package/certification/geospatial-mcp-schemas/common/controls.schema.json +81 -0
- package/certification/geospatial-mcp-schemas/common/exploration.schema.json +165 -0
- package/certification/geospatial-mcp-schemas/common/interactions.schema.json +263 -0
- package/certification/geospatial-mcp-schemas/index.json +155 -4
- package/certification/geospatial-mcp-schemas/resources/app-package.schema.json +17 -1
- package/certification/geospatial-mcp-schemas/resources/map-package.schema.json +17 -1
- package/certification/geospatial-mcp-schemas/resources/ops-findings.schema.json +61 -0
- package/certification/geospatial-mcp-schemas/resources/ops-health.schema.json +138 -0
- package/certification/geospatial-mcp-schemas/tools/add_control.schema.json +107 -0
- package/certification/geospatial-mcp-schemas/tools/alert_events.result.schema.json +49 -0
- package/certification/geospatial-mcp-schemas/tools/alert_events.schema.json +49 -0
- package/certification/geospatial-mcp-schemas/tools/bind_component_context.schema.json +60 -0
- package/certification/geospatial-mcp-schemas/tools/bind_interaction.schema.json +97 -0
- package/certification/geospatial-mcp-schemas/tools/create_exploration_context.schema.json +35 -0
- package/certification/geospatial-mcp-schemas/tools/deploy_operations.result.schema.json +109 -0
- package/certification/geospatial-mcp-schemas/tools/deploy_operations.schema.json +49 -0
- package/certification/geospatial-mcp-schemas/tools/operate_events.result.schema.json +67 -0
- package/certification/geospatial-mcp-schemas/tools/operate_events.schema.json +46 -0
- package/certification/geospatial-mcp-schemas/tools/ops_findings.schema.json +25 -0
- package/certification/geospatial-mcp-schemas/tools/ops_health.schema.json +10 -0
- package/certification/geospatial-mcp-schemas/tools/platform_release_status.result.schema.json +53 -0
- package/certification/geospatial-mcp-schemas/tools/platform_release_status.schema.json +10 -0
- package/certification/geospatial-mcp-schemas/tools/propose_operation.schema.json +7 -2
- package/certification/geospatial-mcp-schemas/tools/propose_rollback.schema.json +29 -0
- package/certification/geospatial-mcp-schemas/tools/remove_control.schema.json +114 -0
- package/certification/geospatial-mcp-schemas/tools/remove_exploration_context.schema.json +42 -0
- package/certification/geospatial-mcp-schemas/tools/remove_interaction.schema.json +99 -0
- package/dist/src/certification/certifier.d.ts +17 -2
- package/dist/src/certification/certifier.d.ts.map +1 -1
- package/dist/src/certification/certifier.js +69 -11
- package/dist/src/certification/cli.js +4 -1
- package/dist/src/certification/lifecycle.d.ts +2 -0
- package/dist/src/certification/lifecycle.d.ts.map +1 -1
- package/dist/src/certification/lifecycle.js +3 -0
- package/dist/src/certification/operator-catalog.d.ts.map +1 -1
- package/dist/src/certification/operator-catalog.js +0 -12
- package/dist/src/certification/report.d.ts.map +1 -1
- package/dist/src/certification/report.js +2 -1
- package/dist/src/certification/roster.d.ts +99 -0
- package/dist/src/certification/roster.d.ts.map +1 -0
- package/dist/src/certification/roster.js +233 -0
- package/dist/src/certification/round-trip-target.d.ts +45 -0
- package/dist/src/certification/round-trip-target.d.ts.map +1 -0
- package/dist/src/certification/round-trip-target.js +122 -0
- package/dist/src/certification/run.d.ts.map +1 -1
- package/dist/src/certification/run.js +7 -0
- package/dist/src/eval/northstar-corpus.d.ts.map +1 -1
- package/dist/src/eval/northstar-corpus.js +12 -10
- package/dist/src/eval/operator-corpus.d.ts.map +1 -1
- package/dist/src/eval/operator-corpus.js +11 -6
- package/dist/src/eval/proposal-tools.d.ts +14 -0
- package/dist/src/eval/proposal-tools.d.ts.map +1 -0
- package/dist/src/eval/proposal-tools.js +20 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +15 -6
- package/dist/src/neutral/query.js +1 -1
- package/dist/src/neutral/result.d.ts +2 -2
- package/dist/src/neutral/result.d.ts.map +1 -1
- package/dist/src/neutral/result.js +11 -4
- package/dist/src/release/zero-to-map-cli.d.ts.map +1 -1
- package/dist/src/release/zero-to-map-cli.js +8 -2
- package/dist/src/release/zero-to-map-provision.d.ts +6 -0
- package/dist/src/release/zero-to-map-provision.d.ts.map +1 -1
- package/dist/src/release/zero-to-map-provision.js +6 -0
- package/dist/src/tools/apply-style-preset.d.ts +1 -1
- package/dist/src/tools/apply-style-preset.d.ts.map +1 -1
- package/dist/src/tools/apply-style-preset.js +4 -2
- package/dist/src/tools/control-plane-command.d.ts +1 -1
- package/dist/src/tools/control-plane-command.d.ts.map +1 -1
- package/dist/src/tools/control-plane-command.js +3 -2
- package/dist/src/tools/count-features.d.ts +1 -1
- package/dist/src/tools/count-features.d.ts.map +1 -1
- package/dist/src/tools/count-features.js +2 -1
- package/dist/src/tools/docs-search.d.ts +2 -2
- package/dist/src/tools/docs-search.d.ts.map +1 -1
- package/dist/src/tools/docs-search.js +15 -4
- package/dist/src/tools/get-extent.d.ts +1 -1
- package/dist/src/tools/get-extent.d.ts.map +1 -1
- package/dist/src/tools/get-extent.js +2 -1
- package/dist/src/tools/query-features.d.ts +11 -2
- package/dist/src/tools/query-features.d.ts.map +1 -1
- package/dist/src/tools/query-features.js +18 -5
- package/dist/src/tools/statistics.d.ts +1 -1
- package/dist/src/tools/statistics.d.ts.map +1 -1
- package/dist/src/tools/statistics.js +2 -1
- package/package.json +2 -2
- package/release/zero-to-map/configs/claude-code.mcp.json +1 -1
- package/release/zero-to-map/configs/claude-desktop.json +1 -1
- package/release/zero-to-map/configs/cursor.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TYPED_PROPOSAL_TOOLS } from "./proposal-tools.js";
|
|
1
2
|
/**
|
|
2
3
|
* Operator-surface corpus for the cross-model eval (honua-server #1956).
|
|
3
4
|
*
|
|
@@ -16,11 +17,15 @@
|
|
|
16
17
|
* criteria over the identical live catalog.
|
|
17
18
|
*
|
|
18
19
|
* SAFETY: these scenarios are READ-MOSTLY and reversible. The end-to-end planning
|
|
19
|
-
* scenarios stop at validate / dry-run and FORBID the mutating lifecycle tools
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* scenarios stop at validate / dry-run and FORBID the mutating lifecycle tools:
|
|
21
|
+
* `honua_execute_plan` and the typed governed-proposal roster
|
|
22
|
+
* (`honua_propose_finding`, `honua_propose_deploy_plan`,
|
|
23
|
+
* `honua_propose_deploy_operation`, `honua_propose_rollback`,
|
|
24
|
+
* `honua_propose_platform_release_convergence`, `honua_propose_metadata_release`)
|
|
25
|
+
* that replaced the retired `honua_propose_operation`. Each proposal files a
|
|
26
|
+
* control-plane change for approval, so a correct agent must NOT call one for a
|
|
27
|
+
* read-only analysis task. Forbidding those tools turns "did the agent stay
|
|
28
|
+
* read-only?" into a graded criterion.
|
|
24
29
|
*
|
|
25
30
|
* Grading is deliberately tool-centric: required-tool selection, ordered
|
|
26
31
|
* subsequence, and forbidden-tool avoidance — the verifiable signals of "the
|
|
@@ -37,7 +42,7 @@
|
|
|
37
42
|
const MAUI_BUILDINGS_SERVICE = "svc-publish-maui-buildings";
|
|
38
43
|
const MAUI_BUILDINGS_LAYER = 13;
|
|
39
44
|
/** Mutating lifecycle tools a read-only analysis agent must never call. */
|
|
40
|
-
const MUTATING_TOOLS = ["honua_execute_plan",
|
|
45
|
+
const MUTATING_TOOLS = ["honua_execute_plan", ...TYPED_PROPOSAL_TOOLS];
|
|
41
46
|
/** A small, static, well-formed analysis plan reused by validate/dry-run. */
|
|
42
47
|
const SAMPLE_PLAN = {
|
|
43
48
|
planId: "eval-operator-plan-1",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The honua-server governed-proposal roster.
|
|
3
|
+
*
|
|
4
|
+
* The server retired the opaque `honua_propose_operation` escape hatch
|
|
5
|
+
* (honua-server #3474/#3735) and replaced it with one typed tool per proposal
|
|
6
|
+
* kind. Each one files a control-plane proposal for human approval; none of them
|
|
7
|
+
* belongs in a read-only analysis or a north-star authoring workflow, so the
|
|
8
|
+
* corpora forbid the whole roster where they used to forbid the single retired
|
|
9
|
+
* name.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TYPED_PROPOSAL_TOOLS: readonly ["honua_propose_finding", "honua_propose_deploy_plan", "honua_propose_deploy_operation", "honua_propose_rollback", "honua_propose_platform_release_convergence", "honua_propose_metadata_release"];
|
|
12
|
+
/** The retired generic proposal tool. No catalog or corpus may name it. */
|
|
13
|
+
export declare const RETIRED_PROPOSAL_TOOL = "honua_propose_operation";
|
|
14
|
+
//# sourceMappingURL=proposal-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal-tools.d.ts","sourceRoot":"","sources":["../../../src/eval/proposal-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,6MAOvB,CAAC;AAEX,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The honua-server governed-proposal roster.
|
|
3
|
+
*
|
|
4
|
+
* The server retired the opaque `honua_propose_operation` escape hatch
|
|
5
|
+
* (honua-server #3474/#3735) and replaced it with one typed tool per proposal
|
|
6
|
+
* kind. Each one files a control-plane proposal for human approval; none of them
|
|
7
|
+
* belongs in a read-only analysis or a north-star authoring workflow, so the
|
|
8
|
+
* corpora forbid the whole roster where they used to forbid the single retired
|
|
9
|
+
* name.
|
|
10
|
+
*/
|
|
11
|
+
export const TYPED_PROPOSAL_TOOLS = [
|
|
12
|
+
"honua_propose_finding",
|
|
13
|
+
"honua_propose_deploy_plan",
|
|
14
|
+
"honua_propose_deploy_operation",
|
|
15
|
+
"honua_propose_rollback",
|
|
16
|
+
"honua_propose_platform_release_convergence",
|
|
17
|
+
"honua_propose_metadata_release",
|
|
18
|
+
];
|
|
19
|
+
/** The retired generic proposal tool. No catalog or corpus may name it. */
|
|
20
|
+
export const RETIRED_PROPOSAL_TOOL = "honua_propose_operation";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";
|
|
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;AAItF,OAAO,EAAE,KAAK,mBAAmB,EAAgC,MAAM,qBAAqB,CAAC;AAM7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAanF,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACnF,YAAY,EACV,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAE7B,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;AAED,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,QAAQ,CAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAC5C;;;;;OAKG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;CAC5D;AAMD,eAAO,MAAM,cAAc,QAAyB,CAAC;AA6DrD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,cAAc,CAgD5E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,WAAW,CASrF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,GAAE,mBAAwB,aA0HlF;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,IAAI,SAAS,CAIjD;AAgBD;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvF"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import { HonuaClient } from "@honua/sdk-js";
|
|
4
5
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -29,7 +30,9 @@ const DEFAULT_SERVER_VERSION = "0.0.3-alpha.0";
|
|
|
29
30
|
export const SERVER_VERSION = resolveServerVersion();
|
|
30
31
|
function resolveServerVersion() {
|
|
31
32
|
try {
|
|
32
|
-
|
|
33
|
+
// Self-reference resolves this package in both src/ and dist/src/. A
|
|
34
|
+
// relative ../../ path reads the SDK's manifest when Vitest loads src/.
|
|
35
|
+
const packageJsonPath = createRequire(import.meta.url).resolve("@honua/mcp-server/package.json");
|
|
33
36
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
34
37
|
if (typeof packageJson.version === "string" && packageJson.version.length > 0) {
|
|
35
38
|
return packageJson.version;
|
|
@@ -172,13 +175,19 @@ export function createServer(client, options = {}) {
|
|
|
172
175
|
registerNlMapControlMcpTools(server, options.nlMapControl);
|
|
173
176
|
}
|
|
174
177
|
server.tool("honua_describe_layer", "Describe a source: its protocol, the capabilities it actually supports, field schema, geometry type, and extent. Address it with `source` (from honua_list_sources); the serviceId/layerId pair is deprecated but still accepted.", describeLayer.schema.shape, async (args) => describeLayer.execute(client, describeLayer.schema.parse(args)));
|
|
175
|
-
server.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
server.registerTool("honua_query_features", {
|
|
179
|
+
description: "Query features from any supported protocol. Address the source with source; use the typed filter, GeoJSON geometry or bbox, and temporal. returnGeometry defaults to true. resultOffset/outSrid alias offset/outSr; use honua_count_features for count-only requests. Unsupported inputs fail explicitly.",
|
|
180
|
+
inputSchema: queryFeatures.schema,
|
|
181
|
+
}, async (args, extra) => queryFeatures.execute(client, queryFeatures.schema.parse(args), extra?.signal));
|
|
182
|
+
server.tool("honua_count_features", "Count features matching a filter without returning data. Use before querying to check cardinality.", countFeatures.schema.shape, async (args, extra) => countFeatures.execute(client, countFeatures.schema.parse(args), extra?.signal));
|
|
183
|
+
server.tool("honua_get_extent", "Get the spatial bounding box of features matching a filter.", getExtent.schema.shape, async (args, extra) => getExtent.execute(client, getExtent.schema.parse(args), extra?.signal));
|
|
184
|
+
server.tool("honua_statistics", "Compute aggregate statistics (count, sum, avg, min, max, stddev, var) on a field, optionally grouped. Protocols without server-side aggregation answer client-side and report the degradation.", statistics.schema.shape, async (args, extra) => statistics.execute(client, statistics.schema.parse(args), extra?.signal));
|
|
179
185
|
server.tool("honua_explain_capability_gap", "Explain whether a 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)));
|
|
180
186
|
server.tool("honua_get_style", "Resolve a style from a server's OGC API – Styles surface. Pass styleId for the canonical StyleRef (style_id, title, encodings incl. inlined MapLibre); omit it to list available styles. On a plain FeatureServer with no styling surface, reports a structured 'not available on this target' result.", getStyle.schema.shape, async (args) => getStyle.execute(client, getStyle.schema.parse(args)));
|
|
181
|
-
server.
|
|
187
|
+
server.registerTool("honua_apply_style_preset", {
|
|
188
|
+
description: "Resolve a style preset for client-side application. Returns its stylesheet without persisting a layer binding; serviceId/layerId targets are unsupported.",
|
|
189
|
+
inputSchema: applyStylePreset.schema,
|
|
190
|
+
}, async (args) => applyStylePreset.execute(client, applyStylePreset.schema.parse(args)));
|
|
182
191
|
if (options.controlPlaneCommands) {
|
|
183
192
|
// Thin adapters generated from the shared command catalog. Registered last
|
|
184
193
|
// so the platform-free read-only surface keeps its stable tool order.
|
|
@@ -53,7 +53,7 @@ export const queryShapeFields = {
|
|
|
53
53
|
.describe('Sort order as [{"field":"NAME","direction":"desc"}], or the legacy string form "NAME DESC,VALUE ASC".'),
|
|
54
54
|
limit: z.number().int().positive().optional().describe("Max features to return (default 100, max 2000)."),
|
|
55
55
|
offset: z.number().int().nonnegative().optional().describe("Number of features to skip (for pagination)."),
|
|
56
|
-
returnGeometry: z.boolean().optional().default(
|
|
56
|
+
returnGeometry: z.boolean().optional().default(true).describe("Include geometry in results (default: true)."),
|
|
57
57
|
geometryFormat: z
|
|
58
58
|
.enum(["geojson", "esri-json"])
|
|
59
59
|
.optional()
|
|
@@ -16,9 +16,9 @@ export type GeometryFormat = "geojson" | "esri-json";
|
|
|
16
16
|
export declare function projectGeometry(geometry: Record<string, unknown> | null | undefined, format: GeometryFormat): Record<string, unknown> | null;
|
|
17
17
|
/** Normalize `Result.degraded` for tool output; `undefined` when nothing degraded. */
|
|
18
18
|
export declare function projectDegraded(degraded: readonly DegradedReason[] | undefined): {
|
|
19
|
-
capability: import("@honua/sdk-js
|
|
19
|
+
capability: import("@honua/sdk-js").Capability;
|
|
20
20
|
reason: string;
|
|
21
|
-
protocol: import("@honua/sdk-js
|
|
21
|
+
protocol: import("@honua/sdk-js").Protocol | null;
|
|
22
22
|
sourceId: string | null;
|
|
23
23
|
}[] | undefined;
|
|
24
24
|
export interface ProjectFeaturesOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/neutral/result.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/neutral/result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGrE;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC;AAMrD,gEAAgE;AAChE,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EACpD,MAAM,EAAE,cAAc,GACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAWhC;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS;;;;;gBAQ9E;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB;;;IAU9E"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HonuaCapabilityNotSupportedError } from "@honua/sdk-js";
|
|
2
|
+
import { esriToGeoJson, geoJsonToEsri } from "@honua/sdk-js/geometry";
|
|
2
3
|
function looksGeoJson(geometry) {
|
|
3
|
-
return typeof geometry.type === "string" && "coordinates" in geometry;
|
|
4
|
+
return typeof geometry.type === "string" && ("coordinates" in geometry || geometry.type === "GeometryCollection");
|
|
4
5
|
}
|
|
5
6
|
/** Re-encode one feature geometry into the requested format. */
|
|
6
7
|
export function projectGeometry(geometry, format) {
|
|
7
8
|
if (!geometry)
|
|
8
9
|
return null;
|
|
9
|
-
if (format === "esri-json")
|
|
10
|
-
|
|
10
|
+
if (format === "esri-json") {
|
|
11
|
+
if (!looksGeoJson(geometry))
|
|
12
|
+
return geometry;
|
|
13
|
+
const converted = geoJsonToEsri(geometry);
|
|
14
|
+
if (!converted)
|
|
15
|
+
throw new HonuaCapabilityNotSupportedError("geometryFormat.esri-json", "geometry-projection");
|
|
16
|
+
return converted;
|
|
17
|
+
}
|
|
11
18
|
if (looksGeoJson(geometry))
|
|
12
19
|
return geometry;
|
|
13
20
|
const converted = esriToGeoJson(geometry);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zero-to-map-cli.d.ts","sourceRoot":"","sources":["../../../src/release/zero-to-map-cli.ts"],"names":[],"mappings":";AAyBA,OAAO,EACL,KAAK,sBAAsB,EAI5B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAIL,KAAK,sBAAsB,EAE3B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAK9B,MAAM,kBAAkB,CAAC;AAE1B,KAAK,aAAa,GAAG,cAAc,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,gBAAg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AAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GACtC,OAAO,CAAC,sBAAsB,CAAC,CAsBjC;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GACtC,OAAO,CAAC,sBAAsB,CAAC,CAKjC;AAqDD,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GAEZ;IACE,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GACD,SAAS,CAcZ"}
|
|
@@ -14,7 +14,7 @@ import { requireSecureCredentialEndpoint } from "../credential-endpoint.js";
|
|
|
14
14
|
import { isMainEntrypoint } from "../entrypoint.js";
|
|
15
15
|
import { resolveProxyOptions } from "../proxy.js";
|
|
16
16
|
import { assertZeroToMapCheckpointBindings, assertZeroToMapCheckpointDigest, assertZeroToMapCheckpointFresh, consumeZeroToMapCheckpoint, createZeroToMapCheckpoint, parseZeroToMapCheckpoint, } from "./zero-to-map-checkpoint.js";
|
|
17
|
-
import {
|
|
17
|
+
import { ZERO_TO_MAP_LOCAL_ACCESS_GRANTS, assertAwsEcsProvisionBindings, parseAwsEcsProvisionBinding, } from "./zero-to-map-provision.js";
|
|
18
18
|
import { JourneyBlockedError, assertRenderedPng, parseZeroToMapPlan, resolvePublishedShareUrl, runZeroToMapJourney, } from "./zero-to-map.js";
|
|
19
19
|
class ContractAdapter {
|
|
20
20
|
runCli() {
|
|
@@ -642,6 +642,7 @@ export function parseInstallAccessCredential(stdout) {
|
|
|
642
642
|
"baseUrl",
|
|
643
643
|
"claudeDesktopConfigFile",
|
|
644
644
|
"composeFile",
|
|
645
|
+
"credentialReissued",
|
|
645
646
|
"directory",
|
|
646
647
|
"envFile",
|
|
647
648
|
"mcpConfigFile",
|
|
@@ -650,7 +651,12 @@ export function parseInstallAccessCredential(stdout) {
|
|
|
650
651
|
"reused",
|
|
651
652
|
"serverImage",
|
|
652
653
|
"status",
|
|
654
|
+
...(root.reason === undefined ? [] : ["reason"]),
|
|
653
655
|
], "local installer receipt");
|
|
656
|
+
if (typeof root.credentialReissued !== "boolean" ||
|
|
657
|
+
(root.credentialReissued ? root.reason !== "legacy-grants" : root.reason !== undefined)) {
|
|
658
|
+
throw new Error("local installer receipt credential re-issue fields are inconsistent");
|
|
659
|
+
}
|
|
654
660
|
const credential = releaseRecord(root.accessCredential, "local installer access credential");
|
|
655
661
|
releaseExactKeys(credential, [
|
|
656
662
|
"canAuthenticate",
|
|
@@ -672,7 +678,7 @@ export function parseInstallAccessCredential(stdout) {
|
|
|
672
678
|
if (stableStringSet(requestedGrants) !== stableStringSet(effectiveGrants)) {
|
|
673
679
|
throw new Error("local installer requested and effective access grants do not match");
|
|
674
680
|
}
|
|
675
|
-
if (stableStringSet(requestedGrants) !== stableStringSet(
|
|
681
|
+
if (stableStringSet(requestedGrants) !== stableStringSet(ZERO_TO_MAP_LOCAL_ACCESS_GRANTS)) {
|
|
676
682
|
throw new Error("local installer access credential is not scoped to the required release grants");
|
|
677
683
|
}
|
|
678
684
|
if (credential.status !== "active" ||
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export declare const AWS_ECS_PROVISION_BINDING_SCHEMA: "honua.aws-ecs.provision-binding/v1";
|
|
2
2
|
export declare const ZERO_TO_MAP_ACCESS_GRANTS: readonly ["admin:read", "admin:write"];
|
|
3
|
+
/**
|
|
4
|
+
* Grants the local installer mints on `honua-local-agent` (`LOCAL_AGENT_GRANTS` in
|
|
5
|
+
* `@honua/sdk-js/local-install`). `read:*` is required since honua-server #5643:
|
|
6
|
+
* administrative grants alone no longer read layer data.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ZERO_TO_MAP_LOCAL_ACCESS_GRANTS: readonly ["admin:read", "admin:write", "read:*"];
|
|
3
9
|
export interface ProvisionedAccessCredentialReceipt {
|
|
4
10
|
readonly id: string;
|
|
5
11
|
readonly requestedGrants: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zero-to-map-provision.d.ts","sourceRoot":"","sources":["../../../src/release/zero-to-map-provision.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gCAAgC,EAAG,oCAA6C,CAAC;AAC9F,eAAO,MAAM,yBAAyB,wCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"zero-to-map-provision.d.ts","sourceRoot":"","sources":["../../../src/release/zero-to-map-provision.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gCAAgC,EAAG,oCAA6C,CAAC;AAC9F,eAAO,MAAM,yBAAyB,wCAAyC,CAAC;AAChF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,kDAAmD,CAAC;AAEhG,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,gCAAgC,CAAC;IAChE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QA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read", "admin:write"];
|
|
4
|
+
/**
|
|
5
|
+
* Grants the local installer mints on `honua-local-agent` (`LOCAL_AGENT_GRANTS` in
|
|
6
|
+
* `@honua/sdk-js/local-install`). `read:*` is required since honua-server #5643:
|
|
7
|
+
* administrative grants alone no longer read layer data.
|
|
8
|
+
*/
|
|
9
|
+
export const ZERO_TO_MAP_LOCAL_ACCESS_GRANTS = ["admin:read", "admin:write", "read:*"];
|
|
4
10
|
/** Strictly parse the producer-owned pre-teardown binding without importing a second provisioner. */
|
|
5
11
|
export function parseAwsEcsProvisionBinding(value) {
|
|
6
12
|
const binding = object(value, "AWS ECS provision binding");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-style-preset.d.ts","sourceRoot":"","sources":["../../../src/tools/apply-style-preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,MAAM;;;;;;
|
|
1
|
+
{"version":3,"file":"apply-style-preset.d.ts","sourceRoot":"","sources":["../../../src/tools/apply-style-preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,MAAM;;;;;;EAIR,CAAC;AAEZ,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C;;;;;;;;;GASG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;;;;;GAqB9D"}
|
|
@@ -4,9 +4,11 @@ import { jsonText } from "../helpers.js";
|
|
|
4
4
|
import { STYLE_SURFACE, resolveStyleRef } from "../styles.js";
|
|
5
5
|
const STYLE_GUIDANCE = "This target is a plain FeatureServer/OGC endpoint with no style presets. " +
|
|
6
6
|
"Build a MapLibre style client-side from the layer's fields, or use a Honua deployment for managed presets.";
|
|
7
|
-
export const schema = z
|
|
7
|
+
export const schema = z
|
|
8
|
+
.object({
|
|
8
9
|
styleId: z.string().describe("Stable style identifier of the preset to resolve."),
|
|
9
|
-
})
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
10
12
|
/**
|
|
11
13
|
* Resolve a style preset for client-side application. Returns the canonical
|
|
12
14
|
* `StyleRef` plus the MapLibre/Mapbox stylesheet body so an agent or downstream
|
|
@@ -86,7 +86,7 @@ type ControlPlaneCommandToolArgs = z.infer<ReturnType<typeof controlPlaneCommand
|
|
|
86
86
|
* serialized taxonomy, not rethrown as an opaque MCP failure: an agent has to
|
|
87
87
|
* be able to tell a `validation` refusal from a `conflict` it should retry.
|
|
88
88
|
*/
|
|
89
|
-
export declare function execute(host: ControlPlaneCommandMcpHost, command: HonuaAnyCommand, args: ControlPlaneCommandToolArgs): Promise<CallToolResult>;
|
|
89
|
+
export declare function execute(host: ControlPlaneCommandMcpHost, command: HonuaAnyCommand, args: ControlPlaneCommandToolArgs, signal?: AbortSignal): Promise<CallToolResult>;
|
|
90
90
|
/**
|
|
91
91
|
* Register one MCP tool per catalog command.
|
|
92
92
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-plane-command.d.ts","sourceRoot":"","sources":["../../../src/tools/control-plane-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,oBAAoB,EAGzB,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mDAAmD;AACnD,eAAO,MAAM,iCAAiC,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CAC1C;AAED,mEAAmE;AACnE,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,eAAe;;;;;;;;;;;;;;;GAgBrE;AAED,KAAK,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC;AAE7F;;;;;;GAMG;AACH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,0BAA0B,EAChC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"control-plane-command.d.ts","sourceRoot":"","sources":["../../../src/tools/control-plane-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,oBAAoB,EAGzB,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mDAAmD;AACnD,eAAO,MAAM,iCAAiC,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CAC1C;AAED,mEAAmE;AACnE,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,eAAe;;;;;;;;;;;;;;;GAgBrE;AAED,KAAK,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC;AAE7F;;;;;;GAMG;AACH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,0BAA0B,EAChC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,2BAA2B,EACjC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CAuBzB;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,0BAA0B,GAAG,IAAI,CAkB1G"}
|
|
@@ -74,9 +74,10 @@ export function controlPlaneCommandToolSchema(command) {
|
|
|
74
74
|
* serialized taxonomy, not rethrown as an opaque MCP failure: an agent has to
|
|
75
75
|
* be able to tell a `validation` refusal from a `conflict` it should retry.
|
|
76
76
|
*/
|
|
77
|
-
export async function execute(host, command, args) {
|
|
77
|
+
export async function execute(host, command, args, signal) {
|
|
78
78
|
const invocation = {
|
|
79
79
|
transport: "mcp",
|
|
80
|
+
...(signal ? { signal } : {}),
|
|
80
81
|
...(host.identity ? { identity: host.identity } : {}),
|
|
81
82
|
...(args.idempotencyKey ? { idempotencyKey: args.idempotencyKey } : {}),
|
|
82
83
|
...(args.ifMatch ? { ifMatch: args.ifMatch } : {}),
|
|
@@ -117,7 +118,7 @@ export function registerControlPlaneCommandTools(server, host) {
|
|
|
117
118
|
idempotentHint: true,
|
|
118
119
|
openWorldHint: true,
|
|
119
120
|
},
|
|
120
|
-
}, async (args) => execute(host, command, args));
|
|
121
|
+
}, async (args, extra) => execute(host, command, args, extra.signal));
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
// ---------------------------------------------------------------------------
|
|
@@ -89,7 +89,7 @@ interface CountOutcome {
|
|
|
89
89
|
}
|
|
90
90
|
/** Resolve a feature count through the canonical `Source` surface. */
|
|
91
91
|
export declare function countThroughSource(source: CapabilityAwareSource, query: Query, protocol: string, sourceId: string): Promise<CountOutcome>;
|
|
92
|
-
export declare function execute(client: HonuaClient, input: Input): Promise<{
|
|
92
|
+
export declare function execute(client: HonuaClient, input: Input, signal?: AbortSignal): Promise<{
|
|
93
93
|
content: Array<{
|
|
94
94
|
type: "text";
|
|
95
95
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count-features.d.ts","sourceRoot":"","sources":["../../../src/tools/count-features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,GAAG,YAAY,CAAC;IACvC,QAAQ,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;CAC9C;AAED,sEAAsE;AACtE,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,CAAC,CAevB;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"count-features.d.ts","sourceRoot":"","sources":["../../../src/tools/count-features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,GAAG,YAAY,CAAC;IACvC,QAAQ,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;CAC9C;AAED,sEAAsE;AACtE,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,CAAC,CAevB;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;GAoBpF"}
|
|
@@ -38,10 +38,11 @@ export async function countThroughSource(source, query, protocol, sourceId) {
|
|
|
38
38
|
}
|
|
39
39
|
throw new HonuaCapabilityNotSupportedError("count", protocol, sourceId);
|
|
40
40
|
}
|
|
41
|
-
export async function execute(client, input) {
|
|
41
|
+
export async function execute(client, input, signal) {
|
|
42
42
|
return withCapabilityHonesty(async () => {
|
|
43
43
|
const resolved = resolveSource(client, input);
|
|
44
44
|
const query = toQuery(input, { protocol: resolved.descriptor.protocol, paginate: false });
|
|
45
|
+
query.signal = signal;
|
|
45
46
|
const outcome = await countThroughSource(resolved.source, query, resolved.descriptor.protocol, resolved.descriptor.id);
|
|
46
47
|
return jsonText({
|
|
47
48
|
source: resolved.ref.ref,
|
|
@@ -53,8 +53,8 @@ export interface DocsCorpusLocation {
|
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Locate the corpus: an explicit `HONUA_DOCS_CORPUS_PATH` (the corpus file
|
|
56
|
-
* itself, or a directory holding one), otherwise the
|
|
57
|
-
* holding `llms-full.txt
|
|
56
|
+
* itself, or a directory holding one), otherwise the recognized Honua package root
|
|
57
|
+
* holding `llms-full.txt`, or the SDK root beside mcp/ in a source checkout.
|
|
58
58
|
*
|
|
59
59
|
* The override names the file to read, so it is read — its basename is not
|
|
60
60
|
* assumed to be `llms-full.txt`. Discarding it and reading `<parent>/llms-full.txt`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search.d.ts","sourceRoot":"","sources":["../../../src/tools/docs-search.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmHxB,eAAO,MAAM,MAAM;;;;;;;;;;;;EAUjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,0DAA0D;AAC1D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,oBAAoB,EAAE,aAAa,CAAC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O,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK;;;;;GA4D3D"}
|
|
@@ -204,8 +204,8 @@ export function excerptFor(document, queryTerms) {
|
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* Locate the corpus: an explicit `HONUA_DOCS_CORPUS_PATH` (the corpus file
|
|
207
|
-
* itself, or a directory holding one), otherwise the
|
|
208
|
-
* holding `llms-full.txt
|
|
207
|
+
* itself, or a directory holding one), otherwise the recognized Honua package root
|
|
208
|
+
* holding `llms-full.txt`, or the SDK root beside mcp/ in a source checkout.
|
|
209
209
|
*
|
|
210
210
|
* The override names the file to read, so it is read — its basename is not
|
|
211
211
|
* assumed to be `llms-full.txt`. Discarding it and reading `<parent>/llms-full.txt`
|
|
@@ -226,8 +226,19 @@ export function resolveDocsCorpus(env = process.env, from) {
|
|
|
226
226
|
let dir = from ?? path.dirname(fileURLToPath(import.meta.url));
|
|
227
227
|
for (let depth = 0; depth < 10; depth += 1) {
|
|
228
228
|
const corpusPath = path.join(dir, CORPUS_FILE);
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
const pkg = readJson(path.join(dir, "package.json"));
|
|
230
|
+
if (pkg?.name === "@honua/mcp-server" || pkg?.name === "@honua/sdk-js") {
|
|
231
|
+
if (fs.existsSync(corpusPath))
|
|
232
|
+
return { corpusPath, root: dir };
|
|
233
|
+
// In a source checkout, mcp/ shares the SDK's corpus one level up.
|
|
234
|
+
const sdkRoot = path.dirname(dir);
|
|
235
|
+
if (pkg.name === "@honua/mcp-server" && readJson(path.join(sdkRoot, "package.json"))?.name === "@honua/sdk-js") {
|
|
236
|
+
const sdkCorpus = path.join(sdkRoot, CORPUS_FILE);
|
|
237
|
+
if (fs.existsSync(sdkCorpus))
|
|
238
|
+
return { corpusPath: sdkCorpus, root: sdkRoot };
|
|
239
|
+
}
|
|
240
|
+
return undefined;
|
|
241
|
+
}
|
|
231
242
|
const parent = path.dirname(dir);
|
|
232
243
|
if (parent === dir)
|
|
233
244
|
break;
|
|
@@ -74,7 +74,7 @@ export declare const schema: z.ZodObject<{
|
|
|
74
74
|
spatialRel?: "intersects" | "contains" | "within" | "crosses" | "touches" | "overlaps" | "bbox-intersects" | undefined;
|
|
75
75
|
}>;
|
|
76
76
|
export type Input = z.infer<typeof schema>;
|
|
77
|
-
export declare function execute(client: HonuaClient, input: Input): Promise<{
|
|
77
|
+
export declare function execute(client: HonuaClient, input: Input, signal?: AbortSignal): Promise<{
|
|
78
78
|
content: Array<{
|
|
79
79
|
type: "text";
|
|
80
80
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extent.d.ts","sourceRoot":"","sources":["../../../src/tools/get-extent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-extent.d.ts","sourceRoot":"","sources":["../../../src/tools/get-extent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;GAiBpF"}
|
|
@@ -15,10 +15,11 @@ export const schema = z.object({
|
|
|
15
15
|
...sourceRefFields,
|
|
16
16
|
...queryFilterFields,
|
|
17
17
|
});
|
|
18
|
-
export async function execute(client, input) {
|
|
18
|
+
export async function execute(client, input, signal) {
|
|
19
19
|
return withCapabilityHonesty(async () => {
|
|
20
20
|
const resolved = resolveSource(client, input);
|
|
21
21
|
const query = toQuery(input, { protocol: resolved.descriptor.protocol, paginate: false });
|
|
22
|
+
query.signal = signal;
|
|
22
23
|
const { extent, count } = await resolved.source.queryExtent(query);
|
|
23
24
|
return jsonText({
|
|
24
25
|
source: resolved.ref.ref,
|
|
@@ -10,6 +10,9 @@ import { z } from "zod";
|
|
|
10
10
|
* WFS, and OData. The deprecated `serviceId` + `layerId` pair is still accepted.
|
|
11
11
|
*/
|
|
12
12
|
export declare const schema: z.ZodObject<{
|
|
13
|
+
returnCountOnly: z.ZodOptional<z.ZodLiteral<false>>;
|
|
14
|
+
resultOffset: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
outSrid: z.ZodOptional<z.ZodNumber>;
|
|
13
16
|
outFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
17
|
orderBy: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
15
18
|
field: z.ZodString;
|
|
@@ -53,7 +56,7 @@ export declare const schema: z.ZodObject<{
|
|
|
53
56
|
layout: z.ZodOptional<z.ZodEnum<["honua-facade", "ogc-api", "auto", "stac-api", "stac-static"]>>;
|
|
54
57
|
serviceId: z.ZodOptional<z.ZodString>;
|
|
55
58
|
layerId: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
}, "
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
60
|
returnGeometry: boolean;
|
|
58
61
|
filter?: import("../neutral/filter.js").FilterNode | undefined;
|
|
59
62
|
serviceId?: string | undefined;
|
|
@@ -77,6 +80,9 @@ export declare const schema: z.ZodObject<{
|
|
|
77
80
|
bboxSrid?: number | undefined;
|
|
78
81
|
spatialRel?: "intersects" | "contains" | "within" | "crosses" | "touches" | "overlaps" | "bbox-intersects" | undefined;
|
|
79
82
|
limit?: number | undefined;
|
|
83
|
+
returnCountOnly?: false | undefined;
|
|
84
|
+
resultOffset?: number | undefined;
|
|
85
|
+
outSrid?: number | undefined;
|
|
80
86
|
outFields?: string[] | undefined;
|
|
81
87
|
offset?: number | undefined;
|
|
82
88
|
geometryFormat?: "geojson" | "esri-json" | undefined;
|
|
@@ -104,6 +110,9 @@ export declare const schema: z.ZodObject<{
|
|
|
104
110
|
bboxSrid?: number | undefined;
|
|
105
111
|
spatialRel?: "intersects" | "contains" | "within" | "crosses" | "touches" | "overlaps" | "bbox-intersects" | undefined;
|
|
106
112
|
limit?: number | undefined;
|
|
113
|
+
returnCountOnly?: false | undefined;
|
|
114
|
+
resultOffset?: number | undefined;
|
|
115
|
+
outSrid?: number | undefined;
|
|
107
116
|
outFields?: string[] | undefined;
|
|
108
117
|
offset?: number | undefined;
|
|
109
118
|
returnGeometry?: boolean | undefined;
|
|
@@ -111,7 +120,7 @@ export declare const schema: z.ZodObject<{
|
|
|
111
120
|
outSr?: string | number | undefined;
|
|
112
121
|
}>;
|
|
113
122
|
export type Input = z.infer<typeof schema>;
|
|
114
|
-
export declare function execute(client: HonuaClient, input: Input): Promise<{
|
|
123
|
+
export declare function execute(client: HonuaClient, input: Input, signal?: AbortSignal): Promise<{
|
|
115
124
|
content: Array<{
|
|
116
125
|
type: "text";
|
|
117
126
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-features.d.ts","sourceRoot":"","sources":["../../../src/tools/query-features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"query-features.d.ts","sourceRoot":"","sources":["../../../src/tools/query-features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYR,CAAC;AAEZ,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;GAiCpF"}
|
|
@@ -13,21 +13,34 @@ import { resolveSource, sourceRefFields } from "../neutral/source-ref.js";
|
|
|
13
13
|
* same call means the same thing against GeoServices, OGC API Features, STAC,
|
|
14
14
|
* WFS, and OData. The deprecated `serviceId` + `layerId` pair is still accepted.
|
|
15
15
|
*/
|
|
16
|
-
export const schema = z
|
|
16
|
+
export const schema = z
|
|
17
|
+
.object({
|
|
17
18
|
...sourceRefFields,
|
|
18
19
|
...queryFilterFields,
|
|
19
20
|
...queryShapeFields,
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
returnCountOnly: z
|
|
22
|
+
.literal(false)
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Only false is supported here; use honua_count_features for count-only requests."),
|
|
25
|
+
resultOffset: z.number().int().nonnegative().optional().describe("Standard alias for offset; pass only one."),
|
|
26
|
+
outSrid: z.number().int().optional().describe("Standard alias for outSr; pass only one."),
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
export async function execute(client, input, signal) {
|
|
22
30
|
return withCapabilityHonesty(async () => {
|
|
31
|
+
if (input.offset !== undefined && input.resultOffset !== undefined)
|
|
32
|
+
throw new Error("Pass either offset or resultOffset, not both.");
|
|
33
|
+
if (input.outSr !== undefined && input.outSrid !== undefined)
|
|
34
|
+
throw new Error("Pass either outSr or outSrid, not both.");
|
|
23
35
|
const resolved = resolveSource(client, input);
|
|
24
|
-
const query = toQuery(input, { protocol: resolved.descriptor.protocol });
|
|
36
|
+
const query = toQuery({ ...input, offset: input.resultOffset ?? input.offset, outSr: input.outSrid ?? input.outSr }, { protocol: resolved.descriptor.protocol });
|
|
37
|
+
query.signal = signal;
|
|
25
38
|
const result = await resolved.source.query(query);
|
|
26
39
|
// Legacy addressing keeps legacy output: a client that still sends
|
|
27
40
|
// serviceId/layerId also still expects Esri-JSON geometry. Neutral
|
|
28
41
|
// addressing gets the neutral encoding.
|
|
29
42
|
const geometryFormat = input.geometryFormat ?? (resolved.legacyAddressing ? "esri-json" : "geojson");
|
|
30
|
-
const returnGeometry = input.returnGeometry ??
|
|
43
|
+
const returnGeometry = input.returnGeometry ?? true;
|
|
31
44
|
const degraded = projectDegraded(result.degraded);
|
|
32
45
|
return jsonText({
|
|
33
46
|
source: resolved.ref.ref,
|
|
@@ -84,7 +84,7 @@ export declare const schema: z.ZodObject<{
|
|
|
84
84
|
groupBy?: string | string[] | undefined;
|
|
85
85
|
}>;
|
|
86
86
|
export type Input = z.infer<typeof schema>;
|
|
87
|
-
export declare function execute(client: HonuaClient, input: Input): Promise<{
|
|
87
|
+
export declare function execute(client: HonuaClient, input: Input, signal?: AbortSignal): Promise<{
|
|
88
88
|
content: Array<{
|
|
89
89
|
type: "text";
|
|
90
90
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../src/tools/statistics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAQ3C,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../src/tools/statistics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWjB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAQ3C,wBAAsB,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;GAiCpF"}
|
|
@@ -31,10 +31,11 @@ function normalizeGroupBy(groupBy) {
|
|
|
31
31
|
const fields = (Array.isArray(groupBy) ? groupBy : groupBy.split(",")).map((f) => f.trim()).filter(Boolean);
|
|
32
32
|
return fields.length > 0 ? fields : undefined;
|
|
33
33
|
}
|
|
34
|
-
export async function execute(client, input) {
|
|
34
|
+
export async function execute(client, input, signal) {
|
|
35
35
|
return withCapabilityHonesty(async () => {
|
|
36
36
|
const resolved = resolveSource(client, input);
|
|
37
37
|
const base = toQuery(input, { protocol: resolved.descriptor.protocol, paginate: false });
|
|
38
|
+
base.signal = signal;
|
|
38
39
|
// GeoServices rejects an `outStatistics` query that carries no `where`;
|
|
39
40
|
// every other protocol treats "no filter" as "all records". Supplying the
|
|
40
41
|
// tautology keeps the neutral "omit the filter ⇒ aggregate everything"
|