refactor(mapillary): remove the plain-English query feature

Street Level is imagery only from here on: coverage, sequences and the
embedded viewer. The Claude planner, map-feature and traffic-sign tiles,
the NDJSON feature stream, sprites, detection outlines and analyst records
go, along with @anthropic-ai/sdk, zod and the Anthropic key entry.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Said TurkseverandClaude Fable 5.1 committed 2026-09-25 18:08:43 +01:00
1 parent 9ba6f96d87
commit 547b706f67
44 files changed
+143 -5318

No files matched your search

-13
View File
@@ -852,14 +852,9 @@
"src/layers/mapillary/policy.js",
"src/layers/mapillary/coverage.js",
"src/layers/mapillary/sequences.js",
"src/layers/mapillary/features.js",
"src/layers/mapillary/glyphs.js",
"src/layers/mapillary/decode.js",
"src/layers/mapillary/tileMath.js",
"src/layers/mapillary/values.js",
"src/layers/mapillary/taxonomy.js",
"src/layers/mapillary/ndjson.js",
"src/layers/mapillary/query.js",
"src/layers/mapillary/selection.js",
"src/layers/mapillary/viewerBridge.js",
"src/layers/mapillary/source.js",
@@ -868,15 +863,7 @@
"server/providers/mapillary/constants.js",
"server/providers/mapillary/tiles.js",
"server/providers/mapillary/trim.js",
"server/providers/mapillary/decode.js",
"server/providers/mapillary/features.js",
"server/providers/mapillary/planner.js",
"server/providers/mapillary/sprites.js",
"src/layers/mapillary/decode.test.mjs",
"src/layers/mapillary/ndjson.test.mjs",
"src/layers/mapillary/query.test.mjs",
"src/layers/mapillary/tileMath.test.mjs",
"src/layers/mapillary/values.test.mjs",
"scripts/qa-mapillary.mjs",
"src/tooling/mapillaryQa.test.mjs"
]
+1 -22
View File
@@ -182,18 +182,12 @@
"server/providers/mapillary/constants.js",
"server/providers/mapillary/tiles.js",
"server/providers/mapillary/trim.js",
"server/providers/mapillary/decode.js",
"server/providers/mapillary/features.js",
"server/providers/mapillary/planner.js",
"server/providers/mapillary/sprites.js",
"src/layers/mapillary/tileMath.js",
"src/layers/mapillary/values.js",
"src/layers/mapillary/taxonomy.js",
"server/providers/common/request.js",
"src/sources/rateLimit.js",
"server/providers/common/rate-limit.js"
],
"external": ["@anthropic-ai/sdk", "zod", "pbf", "@mapbox/vector-tile"]
"external": ["pbf"]
},
"radio-provider": {
"runtime": "node",
@@ -1128,14 +1122,9 @@
"src/layers/mapillary/policy.js",
"src/layers/mapillary/coverage.js",
"src/layers/mapillary/sequences.js",
"src/layers/mapillary/features.js",
"src/layers/mapillary/glyphs.js",
"src/layers/mapillary/decode.js",
"src/layers/mapillary/tileMath.js",
"src/layers/mapillary/values.js",
"src/layers/mapillary/taxonomy.js",
"src/layers/mapillary/ndjson.js",
"src/layers/mapillary/query.js",
"src/layers/mapillary/selection.js",
"src/layers/mapillary/viewerBridge.js",
"src/layers/mapillary/source.js",
@@ -2010,14 +1999,9 @@
"src/layers/mapillary/policy.js",
"src/layers/mapillary/coverage.js",
"src/layers/mapillary/sequences.js",
"src/layers/mapillary/features.js",
"src/layers/mapillary/glyphs.js",
"src/layers/mapillary/decode.js",
"src/layers/mapillary/tileMath.js",
"src/layers/mapillary/values.js",
"src/layers/mapillary/taxonomy.js",
"src/layers/mapillary/ndjson.js",
"src/layers/mapillary/query.js",
"src/layers/mapillary/selection.js",
"src/layers/mapillary/viewerBridge.js",
"src/layers/mapillary/source.js",
@@ -2488,14 +2472,9 @@
"src/layers/mapillary/policy.js",
"src/layers/mapillary/coverage.js",
"src/layers/mapillary/sequences.js",
"src/layers/mapillary/features.js",
"src/layers/mapillary/glyphs.js",
"src/layers/mapillary/decode.js",
"src/layers/mapillary/tileMath.js",
"src/layers/mapillary/values.js",
"src/layers/mapillary/taxonomy.js",
"src/layers/mapillary/ndjson.js",
"src/layers/mapillary/query.js",
"src/layers/mapillary/selection.js",
"src/layers/mapillary/viewerBridge.js",
"src/layers/mapillary/source.js",
+1 -53
View File
@@ -2,8 +2,7 @@
/**
* Browser QA for the Street Level (Mapillary) layer against a running dev
* server: the panel's place in the right rail, the keyless gate, coverage,
* a ready-made feature plan (no LLM), the embedded viewer and its expanded
* dialog. Run with `npm run qa:mapillary -- --url http://localhost:4173`.
* the embedded viewer and its expanded dialog. Run with `npm run qa:mapillary -- --url http://localhost:4173`.
* Without MAPILLARY_CLIENT_TOKEN on the server only the keyless steps run.
*/
import assert from 'node:assert/strict';
@@ -15,23 +14,6 @@ export const VIEWPORTS = Object.freeze([
{ width: 1280, height: 800 },
]);
/** A feature plan the executor can run without the planner. */
export function hydrantPlan() {
return {
intent: 'map_features',
layer: 'points',
place: null,
use_current_view: true,
values: ['object--fire-hydrant'],
seen_after: null,
seen_before: null,
prefer_pano: false,
visualise: 'icons',
title: 'Fire hydrants · current view',
answer: 'Showing fire hydrants in the current view.',
};
}
/** Expected right-rail order once the layout controller has run. */
export const RAIL_ORDER = Object.freeze([
'pp-toggles',
@@ -219,40 +201,6 @@ async function main() {
);
},
);
await step(
'a ready-made plan streams results and fills the chips',
async () => {
// Fire and forget: the fan-out can outlive a CDP call, so poll instead.
await page.evaluate((plan) => {
void window.__godsEyeView.dataManager.layers
.get('mapillary')
.module.runPlan(plan, { prompt: 'fire hydrants here' });
}, hydrantPlan());
await sleep(500);
await page.waitForFunction(
() =>
!window.__godsEyeView.dataManager.layers
.get('mapillary')
.module.getUIState().query.busy,
{ timeout: 120_000 },
);
const state = await page.evaluate(() => {
const u = window.__godsEyeView.dataManager.layers
.get('mapillary')
.module.getUIState();
return {
total: u.features.total,
answer: u.query.answer,
chips: document.querySelectorAll(
'#mly-result-chips .mly-value-chip',
).length,
};
});
assert.ok(state.total > 0, 'hydrants found in view');
assert.match(state.answer, /fire hydrants?/i);
assert.ok(state.chips >= 1);
},
);
await step(
'opening the nearest image shows the viewer with a caption',
async () => {
-1
View File
@@ -35,7 +35,6 @@ export const CREDENTIALS = Object.freeze([
},
{ name: 'LL2_API_TOKEN', label: 'Launch Library 2', keychain: [] },
{ name: 'MAPILLARY_CLIENT_TOKEN', label: 'Mapillary street level', keychain: [['mapillary', 'client-token'], ['mapillary', 'token']] },
{ name: 'ANTHROPIC_API_KEY', label: 'Anthropic (street-level planner)', keychain: [['anthropic', 'api-key']] },
]);
export function isConfiguredValue(value) {