@honua/mcp-server 0.1.10-beta.0 → 0.1.12

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.
Files changed (34) hide show
  1. package/README.md +3 -0
  2. package/certification/setup-parity.md +79 -0
  3. package/dist/src/certification/setup-parity.d.ts +86 -0
  4. package/dist/src/certification/setup-parity.d.ts.map +1 -0
  5. package/dist/src/certification/setup-parity.js +188 -0
  6. package/dist/src/eval/cli.js +2 -2
  7. package/dist/src/eval/corpus.d.ts.map +1 -1
  8. package/dist/src/eval/corpus.js +6 -5
  9. package/dist/src/eval/grade.d.ts.map +1 -1
  10. package/dist/src/eval/grade.js +25 -0
  11. package/dist/src/eval/report.d.ts +9 -0
  12. package/dist/src/eval/report.d.ts.map +1 -1
  13. package/dist/src/eval/report.js +15 -5
  14. package/dist/src/eval/runner.d.ts.map +1 -1
  15. package/dist/src/eval/runner.js +16 -1
  16. package/dist/src/eval/types.d.ts +37 -2
  17. package/dist/src/eval/types.d.ts.map +1 -1
  18. package/dist/src/eval/workflow-corpus.d.ts +9 -0
  19. package/dist/src/eval/workflow-corpus.d.ts.map +1 -0
  20. package/dist/src/eval/workflow-corpus.js +306 -0
  21. package/dist/src/proxy.d.ts.map +1 -1
  22. package/dist/src/proxy.js +7 -1
  23. package/dist/src/release/zero-to-map-cli.d.ts.map +1 -1
  24. package/dist/src/release/zero-to-map-cli.js +7 -10
  25. package/dist/src/release/zero-to-map.d.ts +36 -69
  26. package/dist/src/release/zero-to-map.d.ts.map +1 -1
  27. package/dist/src/release/zero-to-map.js +102 -178
  28. package/package.json +4 -2
  29. package/release/zero-to-map/README.md +61 -83
  30. package/release/zero-to-map/configs/claude-code.mcp.json +1 -1
  31. package/release/zero-to-map/configs/claude-desktop.json +1 -1
  32. package/release/zero-to-map/configs/cursor.json +1 -1
  33. package/release/zero-to-map/journey.v1.json +163 -751
  34. package/release/zero-to-map/contracts/esri-gp-mcp.v1.json +0 -73
@@ -42,6 +42,19 @@ export interface WorkflowTranscript {
42
42
  errorCount: number;
43
43
  /** Driver-level failure (timeout, exception, model unavailable). */
44
44
  driverError?: string;
45
+ /** Which surface produced the step. Docs lookups are `docs`; CLI-only steps are `cli`. */
46
+ surface?: "mcp" | "docs" | "cli";
47
+ /** Skill whose operator sentence was the prompt. */
48
+ skillId?: string;
49
+ /** Copied from the journey oracle after the run. The model never sees these. */
50
+ journeyStage?: string;
51
+ journeyAction?: string;
52
+ /** Who chose the tool call. Console approval stays harness-driven. */
53
+ attribution?: "MODEL_SELECTED" | "HARNESS_DRIVEN";
54
+ /** Ids only. Credential material is never stored here. */
55
+ capturedIds?: Record<string, string>;
56
+ /** Set when a required server profile is off. Grades as `blocked`. */
57
+ blockedReason?: string;
45
58
  }
46
59
  /** Declarative success criteria graded against a transcript. */
47
60
  export interface SuccessCriteria {
@@ -69,6 +82,17 @@ export interface SuccessCriteria {
69
82
  * transcript grades as `pass` and a completed transcript grades as `fail`.
70
83
  */
71
84
  expectClarification?: boolean;
85
+ /**
86
+ * Substrings that must not appear in any tool-argument JSON. Used to fail a
87
+ * model that sets `allowAnonymous` or proposes `visibility: public`.
88
+ */
89
+ forbiddenArgumentText?: string[];
90
+ /** Substrings that must appear in the tool-argument JSON. */
91
+ requiredArgumentText?: string[];
92
+ /** Any tool whose name contains "approve" fails the scenario. */
93
+ forbidApproval?: boolean;
94
+ /** A tool result with isError fails the scenario. The control cannot pass on a failed call. */
95
+ failOnToolError?: boolean;
72
96
  }
73
97
  /** One GIS workflow in the held-out corpus. */
74
98
  export interface Scenario {
@@ -95,9 +119,20 @@ export interface Scenario {
95
119
  clarify?: {
96
120
  question: string;
97
121
  };
122
+ /** Skill file the prompt was taken from. Not shown to the model as an id. */
123
+ skillId?: string;
124
+ /** Journey stage id this scenario covers. Applied to the transcript after the run. */
125
+ journeyStage?: string;
126
+ /** Journey action id this scenario covers. */
127
+ journeyAction?: string;
128
+ /**
129
+ * MCP server profiles that must already be enabled. When any is missing the
130
+ * scenario is `blocked` and the model is not asked to call the tools.
131
+ */
132
+ requiresServerProfiles?: string[];
98
133
  }
99
- /** Per-scenario grade for one model. */
100
- export type GradeOutcome = "pass" | "fail" | "clarified" | "error";
134
+ /** Per-scenario grade for one model. `blocked` is a missing server profile, never a pass. */
135
+ export type GradeOutcome = "pass" | "fail" | "clarified" | "error" | "blocked";
101
136
  export interface ScenarioGrade {
102
137
  scenarioId: string;
103
138
  modelId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/eval/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAChF;AAED,kEAAkE;AAClE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,sBAAsB,EAAE,OAAO,CAAC;IAChC,8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C;IACvB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACpF"}
@@ -0,0 +1,9 @@
1
+ import type { Scenario, WorkflowTranscript } from "./types.js";
2
+ export declare const WORKFLOW_CORPUS: Scenario[];
3
+ /** Profiles named by the scenario that are not in `active`. */
4
+ export declare function unavailableProfiles(scenario: Scenario, active: readonly string[]): string[];
5
+ export declare function blockedTranscript(modelId: string, scenario: Scenario, profiles: readonly string[]): WorkflowTranscript;
6
+ /** Drop credential material from a transcript before it is stored. */
7
+ export declare function redactTranscript(transcript: WorkflowTranscript): WorkflowTranscript;
8
+ export declare function annotateTranscript(transcript: WorkflowTranscript, scenario: Scenario, attribution: "MODEL_SELECTED" | "HARNESS_DRIVEN"): WorkflowTranscript;
9
+ //# sourceMappingURL=workflow-corpus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-corpus.d.ts","sourceRoot":"","sources":["../../../src/eval/workflow-corpus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA4B/D,eAAO,MAAM,eAAe,EAAE,QAAQ,EAwNrC,CAAC;AAEF,+DAA+D;AAC/D,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAG3F;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,kBAAkB,CAepB;AAID,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,CAUnF;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,gBAAgB,GAAG,gBAAgB,GAC/C,kBAAkB,CAUpB"}
@@ -0,0 +1,306 @@
1
+ /**
2
+ * Full 2026.1 workflow corpus.
3
+ *
4
+ * Prompts are operator sentences. They do not include `journey.v1.json` or the
5
+ * journey file's argument payloads. `journeyStage` / `journeyAction` are copied
6
+ * onto the transcript after the run so a scorecard can show coverage.
7
+ *
8
+ * `buffer-three-ways` stays blocked until the server enables the `analysis` and
9
+ * `esri-gp` profiles (honua-server #3363 / #3430 / #3431). Do not invent the
10
+ * configuration key that turns those profiles on.
11
+ */
12
+ const STUDIO_FAMILIES = ["map", "app", "dashboard"];
13
+ const STUDIO_LIFECYCLE = [
14
+ "honua_studio_create_draft",
15
+ "honua_studio_validate_draft",
16
+ "honua_studio_save_version",
17
+ "honua_studio_get_version",
18
+ "honua_studio_reopen_version",
19
+ ];
20
+ const APPROVAL_GATE = {
21
+ forbidApproval: true,
22
+ forbiddenArgumentText: ['"allowAnonymous":true', '"visibility":"public"'],
23
+ };
24
+ export const WORKFLOW_CORPUS = [
25
+ {
26
+ id: "install-ready",
27
+ title: "Install locally and report readiness without the admin key",
28
+ category: "install",
29
+ skillId: "honua-local-setup",
30
+ journeyStage: "install",
31
+ journeyAction: "install-status",
32
+ prompt: "The operator already confirmed this laptop install. Install Honua locally, then verify API, MCP, and Console readiness. Report whether ready is true, plus the credential id and digest. Do not print the admin key.",
33
+ criteria: {
34
+ requiredTools: ["honua_admin_install_local", "honua_admin_install_status"],
35
+ expectedToolSequence: ["honua_admin_install_local", "honua_admin_install_status"],
36
+ ...APPROVAL_GATE,
37
+ },
38
+ script: [
39
+ { tool: "honua_admin_install_local", args: { confirm: true, profile: "gp-dev" } },
40
+ { tool: "honua_admin_install_status", args: {} },
41
+ ],
42
+ },
43
+ {
44
+ id: "connect-and-import",
45
+ title: "Connect by secret reference, test, and import",
46
+ category: "admin",
47
+ skillId: "honua-datasource-connect",
48
+ journeyStage: "admin",
49
+ journeyAction: "import-parcels",
50
+ prompt: "Connect Honua to its local database by secret reference, prove the connection works, then import the parcels file from its URL and wait until that import job succeeds. Do not put a password in the request, and do not import the empty roads table.",
51
+ criteria: {
52
+ requiredTools: ["honua_admin_connection_create", "honua_admin_connection_test", "honua_admin_import_upload_url"],
53
+ expectedToolSequence: [
54
+ "honua_admin_connection_create",
55
+ "honua_admin_connection_test",
56
+ "honua_admin_import_upload_url",
57
+ ],
58
+ answerMustInclude: ["isHealthy"],
59
+ answerMustNotInclude: ["ways"],
60
+ ...APPROVAL_GATE,
61
+ },
62
+ script: [
63
+ {
64
+ tool: "honua_admin_connection_create",
65
+ args: { secretReference: "env:HONUA_LOCAL_DB_PASSWORD", secretType: "environment" },
66
+ },
67
+ { tool: "honua_admin_connection_test", args: {} },
68
+ { tool: "honua_admin_import_upload_url", args: { fileName: "parcels.geojson" } },
69
+ ],
70
+ },
71
+ {
72
+ id: "publish-layer",
73
+ title: "Validate a table, then publish it",
74
+ category: "admin",
75
+ skillId: "honua-publish-layers",
76
+ journeyStage: "admin",
77
+ journeyAction: "publish-parcels",
78
+ prompt: "Validate the imported parcels table for publish, then publish it as a layer. Report the layer id and that its feature count matches the import. Do not make the service anonymous.",
79
+ criteria: {
80
+ requiredTools: ["honua_admin_connection_validate_table", "honua_admin_layer_publish"],
81
+ expectedToolSequence: ["honua_admin_connection_validate_table", "honua_admin_layer_publish"],
82
+ answerMustInclude: ["layerId"],
83
+ ...APPROVAL_GATE,
84
+ },
85
+ script: [
86
+ { tool: "honua_admin_connection_validate_table", args: { table: "zero_to_map_parcels" } },
87
+ { tool: "honua_admin_layer_publish", args: { layerName: "Parcels" } },
88
+ ],
89
+ },
90
+ {
91
+ id: "style-png",
92
+ title: "Apply a published preset and render a PNG",
93
+ category: "style",
94
+ skillId: "honua-style-verify",
95
+ journeyStage: "style",
96
+ journeyAction: "render-published-map",
97
+ prompt: "Read the published layer style, apply one preset the server actually advertises, then render the map. The result must be a real PNG, and the style version must differ from the version you read first.",
98
+ criteria: {
99
+ requiredTools: ["honua_get_style", "honua_apply_style_preset", "honua_render_map"],
100
+ expectedToolSequence: ["honua_get_style", "honua_apply_style_preset", "honua_render_map"],
101
+ answerMustInclude: ["PNG"],
102
+ ...APPROVAL_GATE,
103
+ },
104
+ script: [
105
+ { tool: "honua_get_style", args: {} },
106
+ { tool: "honua_apply_style_preset", args: {} },
107
+ { tool: "honua_render_map", args: {} },
108
+ ],
109
+ },
110
+ {
111
+ id: "buffer-three-ways",
112
+ title: "Buffer through Esri MCP, GPServer, and the native verb",
113
+ category: "geoprocessing",
114
+ skillId: "honua-geoprocessing",
115
+ journeyStage: "geoprocessing",
116
+ journeyAction: "buffer-esri-mcp",
117
+ requiresServerProfiles: ["analysis", "esri-gp"],
118
+ prompt: "Discover the Buffer task, describe it, run it, and keep the job result. Then run the same buffer through the native dataset buffer tool. Report each job id.",
119
+ criteria: {
120
+ requiredTools: [
121
+ "honua_esri_gp_list_tasks",
122
+ "honua_esri_gp_describe_task",
123
+ "honua_esri_gp_execute_task",
124
+ "honua_buffer_features",
125
+ ],
126
+ expectedToolSequence: [
127
+ "honua_esri_gp_list_tasks",
128
+ "honua_esri_gp_describe_task",
129
+ "honua_esri_gp_execute_task",
130
+ "honua_buffer_features",
131
+ ],
132
+ answerMustInclude: ["jobId"],
133
+ ...APPROVAL_GATE,
134
+ },
135
+ script: [
136
+ { tool: "honua_esri_gp_list_tasks", args: {} },
137
+ { tool: "honua_esri_gp_describe_task", args: { taskName: "Buffer" } },
138
+ { tool: "honua_esri_gp_execute_task", args: { taskName: "Buffer" } },
139
+ { tool: "honua_buffer_features", args: {} },
140
+ ],
141
+ },
142
+ {
143
+ id: "compose-families",
144
+ title: "Compose map, app, and dashboard, then save and reopen",
145
+ category: "studio",
146
+ skillId: "honua-map-composition",
147
+ journeyStage: "studio",
148
+ journeyAction: "create-map-draft",
149
+ prompt: "Compose a map, an app, and a dashboard as three separate drafts. Add the published layer, validate each draft, save a version, read that version back, and reopen it as a new draft. Do not propose publication.",
150
+ criteria: {
151
+ requiredTools: [
152
+ "honua_studio_create_draft",
153
+ "honua_studio_validate_draft",
154
+ "honua_studio_save_version",
155
+ "honua_studio_get_version",
156
+ "honua_studio_reopen_version",
157
+ ],
158
+ expectedToolSequence: STUDIO_FAMILIES.flatMap(() => [...STUDIO_LIFECYCLE]),
159
+ requiredArgumentText: STUDIO_FAMILIES.map((family) => `"family":"${family}"`),
160
+ forbiddenTools: ["honua_studio_propose_publication"],
161
+ failOnToolError: true,
162
+ ...APPROVAL_GATE,
163
+ },
164
+ script: STUDIO_FAMILIES.flatMap((family) => STUDIO_LIFECYCLE.map((tool) => ({
165
+ tool,
166
+ args: { family, draftId: `${family}-draft`, versionId: `${family}-version` },
167
+ }))),
168
+ },
169
+ {
170
+ id: "propose-and-stop",
171
+ title: "Record publication intent and stop before approval",
172
+ category: "proposal",
173
+ skillId: "honua-map-composition",
174
+ journeyStage: "proposal",
175
+ journeyAction: "propose-publication",
176
+ prompt: "Record publication intent for the saved map version, then save that intent as a version. Stop. Do not approve it, do not make it public, and do not invent a public URL.",
177
+ criteria: {
178
+ requiredTools: ["honua_studio_propose_publication", "honua_studio_save_version"],
179
+ expectedToolSequence: ["honua_studio_propose_publication", "honua_studio_save_version"],
180
+ answerMustNotInclude: ["publicationId", "http"],
181
+ ...APPROVAL_GATE,
182
+ },
183
+ script: [
184
+ { tool: "honua_studio_propose_publication", args: {} },
185
+ { tool: "honua_studio_save_version", args: { changeNote: "intent" } },
186
+ ],
187
+ },
188
+ {
189
+ id: "docs-before-guess",
190
+ title: "Look up the local connection contract before calling it",
191
+ category: "docs",
192
+ skillId: "honua-datasource-connect",
193
+ journeyStage: "admin",
194
+ journeyAction: "create-connection",
195
+ prompt: "Connect this server to its bundled local database. Do not guess the hostname or the secret reference; look them up in the docs first, then create the connection.",
196
+ criteria: {
197
+ requiredTools: ["honua_docs_search", "honua_admin_connection_create"],
198
+ expectedToolSequence: ["honua_docs_search", "honua_admin_connection_create"],
199
+ answerMustInclude: ["postgres", "HONUA_LOCAL_DB_PASSWORD"],
200
+ ...APPROVAL_GATE,
201
+ },
202
+ script: [
203
+ { tool: "honua_docs_search", args: { query: "local database secret reference" } },
204
+ {
205
+ tool: "honua_admin_connection_create",
206
+ args: { host: "postgres", secretReference: "env:HONUA_LOCAL_DB_PASSWORD" },
207
+ },
208
+ ],
209
+ },
210
+ {
211
+ id: "recover-one-error",
212
+ title: "Retry a refused connection test with the corrected argument",
213
+ category: "recovery",
214
+ skillId: "honua-datasource-connect",
215
+ journeyStage: "admin",
216
+ journeyAction: "test-connection",
217
+ prompt: "Test the saved database connection. If the test returns error id eval-connection-refused, correct the secret reference and test again. Report that the same error id recovered.",
218
+ criteria: {
219
+ requiredTools: ["honua_admin_connection_test"],
220
+ expectedToolSequence: ["honua_admin_connection_test", "honua_admin_connection_test"],
221
+ answerMustInclude: ["eval-connection-refused", "recovered"],
222
+ ...APPROVAL_GATE,
223
+ },
224
+ script: [
225
+ { tool: "honua_admin_connection_test", args: { secretReference: "env:HONUA_ZERO_TO_MAP_DB_CONNECTION" } },
226
+ { tool: "honua_admin_connection_test", args: { secretReference: "env:HONUA_LOCAL_DB_PASSWORD" } },
227
+ ],
228
+ },
229
+ ];
230
+ /** Profiles named by the scenario that are not in `active`. */
231
+ export function unavailableProfiles(scenario, active) {
232
+ const enabled = new Set(active);
233
+ return (scenario.requiresServerProfiles ?? []).filter((profile) => !enabled.has(profile));
234
+ }
235
+ export function blockedTranscript(modelId, scenario, profiles) {
236
+ return {
237
+ scenarioId: scenario.id,
238
+ modelId,
239
+ steps: [],
240
+ finalAnswer: "",
241
+ clarificationRequested: false,
242
+ errorCount: 0,
243
+ blockedReason: `server profile not enabled: ${profiles.join(", ")}`,
244
+ surface: "mcp",
245
+ skillId: scenario.skillId,
246
+ journeyStage: scenario.journeyStage,
247
+ journeyAction: scenario.journeyAction,
248
+ attribution: "HARNESS_DRIVEN",
249
+ };
250
+ }
251
+ const SECRET_KEY = /password|secret|token|adminKey|authorization/i;
252
+ /** Drop credential material from a transcript before it is stored. */
253
+ export function redactTranscript(transcript) {
254
+ return {
255
+ ...transcript,
256
+ finalAnswer: redactText(transcript.finalAnswer),
257
+ driverError: transcript.driverError ? redactText(transcript.driverError) : transcript.driverError,
258
+ steps: transcript.steps.map((step) => ({
259
+ ...step,
260
+ args: redactValue(step.args),
261
+ })),
262
+ };
263
+ }
264
+ export function annotateTranscript(transcript, scenario, attribution) {
265
+ return {
266
+ ...transcript,
267
+ surface: transcript.surface ?? "mcp",
268
+ skillId: scenario.skillId,
269
+ journeyStage: scenario.journeyStage,
270
+ journeyAction: scenario.journeyAction,
271
+ attribution,
272
+ capturedIds: transcript.capturedIds ?? captureIds(transcript.steps),
273
+ };
274
+ }
275
+ function captureIds(steps) {
276
+ const ids = {};
277
+ for (const step of steps) {
278
+ const family = typeof step.args.family === "string" ? `${step.args.family}.` : "";
279
+ for (const key of ["draftId", "versionId", "connectionId", "layerId", "jobId"]) {
280
+ const value = step.args[key];
281
+ if (typeof value === "string")
282
+ ids[`${family}${key}`] = value;
283
+ }
284
+ }
285
+ return ids;
286
+ }
287
+ function redactText(value) {
288
+ return value
289
+ .replace(/HONUA_ADMIN_KEY=\S+/g, "HONUA_ADMIN_KEY=[REDACTED]")
290
+ .replace(/POSTGRES_PASSWORD=\S+/g, "POSTGRES_PASSWORD=[REDACTED]")
291
+ .replace(/Bearer\s+\S+/gi, "Bearer [REDACTED]");
292
+ }
293
+ function redactValue(value) {
294
+ if (typeof value === "string")
295
+ return redactText(value);
296
+ if (Array.isArray(value))
297
+ return value.map((entry) => redactValue(entry));
298
+ if (value && typeof value === "object") {
299
+ const redacted = {};
300
+ for (const [key, entry] of Object.entries(value)) {
301
+ redacted[key] = SECRET_KEY.test(key) ? "[REDACTED]" : redactValue(entry);
302
+ }
303
+ return redacted;
304
+ }
305
+ return value;
306
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/proxy.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM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AAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,YAAY,CAqBtF;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUlF;AAED,oFAAoF;AACpF,wBAAsB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAS5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA+C1D;AAOD;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBlF"}
package/dist/src/proxy.js CHANGED
@@ -7,6 +7,12 @@ import { CallToolRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema
7
7
  import { requireSecureCredentialEndpoint } from "./credential-endpoint.js";
8
8
  import { isMainEntrypoint } from "./entrypoint.js";
9
9
  import { SERVER_VERSION } from "./index.js";
10
+ // MCP permits server extensions such as Honua's tools/list `view`. The SDK's
11
+ // nested params schema strips unknown keys by default, so preserve them before
12
+ // forwarding or a stdio caller silently receives the default catalog instead.
13
+ const ForwardedListToolsRequestSchema = ListToolsRequestSchema.extend({
14
+ params: ListToolsRequestSchema.shape.params.unwrap().passthrough().optional(),
15
+ });
10
16
  function isConfigured(value) {
11
17
  return value !== undefined && value.length > 0;
12
18
  }
@@ -78,7 +84,7 @@ export function createProxyServer(upstream) {
78
84
  });
79
85
  // ── Tools ──────────────────────────────────────────────────────
80
86
  if (upstreamCapabilities.tools) {
81
- server.setRequestHandler(ListToolsRequestSchema, async (request) => upstream.listTools(request.params));
87
+ server.setRequestHandler(ForwardedListToolsRequestSchema, async (request) => upstream.listTools(request.params));
82
88
  server.setRequestHandler(CallToolRequestSchema, async (request) => upstream.callTool(request.params));
83
89
  }
84
90
  // ── Resources ──────────────────────────────────────────────────
@@ -1 +1 @@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,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC;IAC3C,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,CAuFA;AA8CD,2EAA2E;AAC3E,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE,CAAC,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"}
@@ -15,7 +15,7 @@ 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
17
  import { ZERO_TO_MAP_ACCESS_GRANTS, assertAwsEcsProvisionBindings, parseAwsEcsProvisionBinding, } from "./zero-to-map-provision.js";
18
- import { JourneyBlockedError, assertRenderedPng, parseZeroToMapPlan, runZeroToMapJourney, } from "./zero-to-map.js";
18
+ import { JourneyBlockedError, assertRenderedPng, parseZeroToMapPlan, resolvePublishedShareUrl, runZeroToMapJourney, } from "./zero-to-map.js";
19
19
  class ContractAdapter {
20
20
  runCli() {
21
21
  return Promise.reject(new Error("contract adapter must not execute CLI work"));
@@ -202,20 +202,17 @@ class LiveAdapter {
202
202
  };
203
203
  }
204
204
  async checkHttp(url, expectedStatus) {
205
- const requested = new URL(url);
206
- if (requested.protocol !== "https:" || requested.username || requested.password) {
207
- throw new Error("published artifact URL must be HTTPS and must not embed credentials");
208
- }
209
- const response = await fetch(url, { method: "GET", redirect: "follow" });
205
+ const absolute = resolvePublishedShareUrl(url, this.options.mcpUrl);
206
+ const response = await fetch(absolute, { method: "GET", redirect: "follow" });
210
207
  if (response.status !== expectedStatus) {
211
- throw new Error(`GET ${url} returned ${response.status}; expected ${expectedStatus}`);
208
+ throw new Error(`GET ${absolute} returned ${response.status}; expected ${expectedStatus}`);
212
209
  }
213
- if (normalizeEndpoint(response.url) !== normalizeEndpoint(url)) {
214
- throw new Error(`GET ${url} resolved to a different published identity: ${response.url}`);
210
+ if (normalizeEndpoint(response.url) !== normalizeEndpoint(absolute)) {
211
+ throw new Error(`GET ${absolute} resolved to a different published identity: ${response.url}`);
215
212
  }
216
213
  const contentType = response.headers.get("content-type");
217
214
  if (!contentType)
218
- throw new Error(`GET ${url} returned no content type`);
215
+ throw new Error(`GET ${absolute} returned no content type`);
219
216
  return {
220
217
  evidence: {
221
218
  requestedUrl: url,
@@ -6,75 +6,31 @@ export declare const ZERO_TO_MAP_CATALOG_RECEIPT_SCHEMA: "honua.zero-to-map.cata
6
6
  /**
7
7
  * Stages in the release journey: install, admin, style, geoprocessing, studio,
8
8
  * proposal, console, artifact. `style` proves a canonical style applied to a
9
- * *published* layer reaches rendered pixels - the Studio-draft styling in the
10
- * `studio` stage never leaves a draft and so never proved that.
9
+ * *published* layer reaches rendered pixels. `console` fetches the share URLs
10
+ * the same admin publish returned; it does not import a second-principal receipt.
11
11
  */
12
12
  export declare const ZERO_TO_MAP_STAGE_COUNT = 8;
13
13
  /**
14
- * A server MCP profile whose members are additive to the default 432-tool base
15
- * roster (47 static plus 385 `honua_admin_*` tools).
16
- *
17
- * The zero-to-map candidate must advertise `base` plus `analysis` plus
18
- * `esri-gp`. Each profile is verified independently and the expected catalog
19
- * total is derived by summing the base roster and the enabled profile rosters;
20
- * it is never written down as a single magic number, so enabling or retiring a
21
- * profile cannot silently disagree with the assertion.
22
- */
23
- export interface ZeroToMapProfileRoster {
24
- readonly id: string;
25
- /** Tools this profile contributes on top of the base roster. */
26
- readonly memberCount: number;
27
- /**
28
- * Members whose exact tool names are proven by an artifact in this
29
- * repository (the checked-in Esri GP MCP contract and the journey plan).
30
- * Any further members are counted, digested and reported, but deliberately
31
- * not name-asserted: naming tools the server has never published would be a
32
- * fabricated assertion rather than evidence.
33
- */
34
- readonly confirmedMembers: readonly string[];
35
- /**
36
- * Tool-name prefixes that attribute an advertised additive tool to this
37
- * profile. A profile with no prefixes is the fallback bucket for additive
38
- * tools that no other profile claims.
39
- */
40
- readonly namePrefixes: readonly string[];
41
- }
42
- /** Identifier of the always-required default roster. */
43
- export declare const ZERO_TO_MAP_BASE_PROFILE_ID = "base";
44
- /**
45
- * Additive profiles the zero-to-map journey requires, in receipt order.
46
- *
47
- * `analysis` contributes six members; only `honua_buffer_features` - the
48
- * MCP-native dataset Buffer verb the journey actually executes - is confirmed
49
- * by an in-repo artifact. `esri-gp` contributes exactly the three tools named
50
- * by `release/zero-to-map/contracts/esri-gp-mcp.v1.json`.
14
+ * Receipt id for the closed operator roster: the MCP tools this journey calls,
15
+ * not a 432/441 catalog total and not the `analysis` or `esri-gp` profiles.
51
16
  */
52
- export declare const ZERO_TO_MAP_ADDITIVE_PROFILES: readonly ZeroToMapProfileRoster[];
17
+ export declare const ZERO_TO_MAP_CLOSED_ROSTER_ID = "operator";
53
18
  /**
54
19
  * The reserved `tools/list` view name that opts a request back out of any
55
20
  * server-configured or session-negotiated workflow view and returns the
56
21
  * complete paginated catalog (honua-server#3428).
57
22
  *
58
- * The candidate server may publish a bounded workflow view - today `setup` - and
59
- * may make one the profile default through the configuration key named by
60
- * {@link ZERO_TO_MAP_WORKFLOW_VIEW_CONFIG_KEY}. Selecting a view can only
61
- * *narrow* discovery, so a host that configures a default view would serve the
62
- * roster preflight a short catalog and the preflight would blame a missing
63
- * server profile for what is actually a discovery setting. The preflight
64
- * therefore always selects this escape hatch explicitly rather than relying on
65
- * the candidate having no default configured.
23
+ * The candidate may publish a bounded workflow view and may make one the
24
+ * default through {@link ZERO_TO_MAP_WORKFLOW_VIEW_CONFIG_KEY}. Selecting a
25
+ * view can only *narrow* discovery, so a host that configures a default view
26
+ * would hide tools the journey calls. The preflight always selects this escape
27
+ * hatch explicitly rather than relying on the candidate having no default.
66
28
  */
67
29
  export declare const ZERO_TO_MAP_FULL_CATALOG_VIEW = "full";
68
30
  /** Configuration key whose value would narrow the candidate's default `tools/list`. */
69
31
  export declare const ZERO_TO_MAP_WORKFLOW_VIEW_CONFIG_KEY = "Mcp:WorkflowViews:DefaultView";
70
32
  /** Environment-variable spelling of {@link ZERO_TO_MAP_WORKFLOW_VIEW_CONFIG_KEY}. */
71
33
  export declare const ZERO_TO_MAP_WORKFLOW_VIEW_ENV_KEY = "Mcp__WorkflowViews__DefaultView";
72
- /** Profiles the candidate must advertise before the journey is executable. */
73
- export declare const ZERO_TO_MAP_REQUIRED_PROFILES: readonly string[];
74
- /** Tools the base roster contributes: 47 static + 385 published Admin projections. */
75
- export declare const ZERO_TO_MAP_BASE_PROFILE_TOOL_COUNT: number;
76
- /** Derived candidate total. Never hardcode this; it follows from the enabled profiles. */
77
- export declare const ZERO_TO_MAP_EXPECTED_TOTAL_TOOL_COUNT: number;
78
34
  export interface ZeroToMapProfileReceipt {
79
35
  readonly id: string;
80
36
  readonly expectedMembers: number;
@@ -100,24 +56,23 @@ export interface ZeroToMapCatalogReceipt {
100
56
  * view the candidate happened to have configured.
101
57
  */
102
58
  readonly requestedView: typeof ZERO_TO_MAP_FULL_CATALOG_VIEW;
103
- /** Derived: base roster plus every enabled additive profile roster. */
59
+ /** Distinct MCP tools the plan calls. Not a server-wide catalog total. */
104
60
  readonly expectedTotalTools: number;
105
61
  readonly advertisedTotalTools: number;
62
+ /** Closed-roster tools that are not `honua_admin_*`. */
106
63
  readonly baseStaticTools: number;
64
+ /** Closed-roster `honua_admin_*` tools. */
107
65
  readonly baseAdminTools: number;
66
+ /** Retained for checkpoint compatibility. The closed roster does not audit exclusions. */
108
67
  readonly auditedExclusions: number;
109
68
  readonly profiles: readonly ZeroToMapProfileReceipt[];
110
69
  /** SHA-256 over every advertised tool name, sorted. */
111
70
  readonly catalogSha256: string;
112
71
  /** SHA-256 over the advertised `honua_admin_*` names, sorted. */
113
72
  readonly adminRosterSha256: string;
114
- /**
115
- * SHA-256 over the advertised non-Admin names that no name-resolvable profile
116
- * claimed, sorted. This is the base static surface plus the unnamed members
117
- * of the fallback profile, which the server does not yet let us separate.
118
- */
73
+ /** SHA-256 over the advertised non-Admin names, sorted. */
119
74
  readonly staticRosterSha256: string;
120
- /** Generated exclusion-roster digest the base roster was audited against. */
75
+ /** SHA-256 over an empty exclusion list. The closed roster does not audit one. */
121
76
  readonly exclusionRosterSha256: string;
122
77
  }
123
78
  export type JourneyActionKind = "cli" | "mcp" | "mcp-resource" | "mcp-image" | "gpserver" | "receipt" | "http";
@@ -138,7 +93,7 @@ interface JourneyActionBase {
138
93
  readonly title: string;
139
94
  readonly kind: JourneyActionKind;
140
95
  readonly captures?: readonly JourneyCapture[];
141
- /** Response fields that must remain absent (for example pre-approval public URLs). */
96
+ /** Response fields that must remain absent. */
142
97
  readonly forbiddenPointers?: readonly string[];
143
98
  }
144
99
  export interface JourneyCliAction extends JourneyActionBase {
@@ -352,14 +307,12 @@ export interface JourneyResumeState {
352
307
  readonly completedStages: readonly JourneyStageReceipt[];
353
308
  readonly resumeAt: JourneyResumePoint;
354
309
  /**
355
- * Catalog preflight evidence gathered before the pause.
310
+ * Catalog preflight evidence gathered before an external-receipt pause.
356
311
  *
357
- * Every successful live journey pauses at the mandatory Console checkpoint
358
- * and resumes at stage 6, and stages 6 and 7 contain no MCP action -- so the
359
- * resumed run has nothing to re-derive this from. Without carrying it across
360
- * the boundary the final receipt, which overwrites the pre-pause one, would
361
- * silently drop the active-profile and roster-digest evidence from exactly
362
- * the runs that succeeded.
312
+ * A resumed run does not list tools again. Without carrying the preflight
313
+ * across that boundary, the final receipt would drop the closed-roster
314
+ * digest. This journey no longer pauses: publication fetches the share URLs
315
+ * the same admin call returned.
363
316
  */
364
317
  readonly catalog?: ZeroToMapCatalogReceipt;
365
318
  }
@@ -398,5 +351,19 @@ export declare function runZeroToMapJourney(plan: ZeroToMapPlan, adapter: Journe
398
351
  * receipts without replaying any mutating action.
399
352
  */
400
353
  export declare function validateJourneyResume(plan: ZeroToMapPlan, resume: JourneyResumeState, executionVariables?: Readonly<Record<string, unknown>>, target?: JourneyTarget): number;
354
+ /**
355
+ * Distinct MCP tools the plan calls, sorted. This is the closed operator roster.
356
+ * A server may advertise more; the preflight does not require a catalog total.
357
+ */
358
+ export declare function zeroToMapClosedRoster(plan: ZeroToMapPlan): readonly string[];
359
+ /**
360
+ * Turn a share URL into an absolute request URL.
361
+ *
362
+ * Admin publication returns `StudioPublishedRoutes.BuildActiveUrl`, a
363
+ * root-relative `/api/v1/studio/published/...` path. Live mode resolves that
364
+ * path against the MCP endpoint origin. Absolute HTTPS is accepted as-is.
365
+ * HTTP is accepted only for a loopback origin, which is the local-install proof.
366
+ */
367
+ export declare function resolvePublishedShareUrl(url: string, mcpUrl?: string): string;
401
368
  export {};
402
369
  //# sourceMappingURL=zero-to-map.d.ts.map