wave3d-agent-sdk 0.2.4 → 0.2.6
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 +12 -10
- package/dist/cli.js +506 -245
- package/dist/sdk/README.md +3 -3
- package/dist/sdk/manifest.json +44 -37
- package/dist/sdk/wave-engine-sdk-2026-06-17.1.kI2raEAL7AhgtcsCcMivfqFC1RQgmR7J.zip +0 -0
- package/package.json +1 -1
- package/dist/sdk/wave-engine-sdk-2026-06-17.1.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3.zip +0 -0
package/dist/cli.js
CHANGED
|
@@ -662,8 +662,8 @@ PerformanceConfigurator.MatrixTrackedMatrices = [];
|
|
|
662
662
|
|
|
663
663
|
// ../../node_modules/@babylonjs/core/Misc/devTools.js
|
|
664
664
|
var WarnedMap = {};
|
|
665
|
-
function _WarnImport(name,
|
|
666
|
-
if (
|
|
665
|
+
function _WarnImport(name, warnOnce = false) {
|
|
666
|
+
if (warnOnce && WarnedMap[name]) {
|
|
667
667
|
return;
|
|
668
668
|
}
|
|
669
669
|
WarnedMap[name] = true;
|
|
@@ -11907,6 +11907,11 @@ var WavePlane;
|
|
|
11907
11907
|
// ../../wave-engine/dist/src/core/coreAbstractions/objectModel/waveModelRigPose.js
|
|
11908
11908
|
var DEFAULT_REVOLUTE_RANGE = Math.PI / 3;
|
|
11909
11909
|
|
|
11910
|
+
// ../../wave-engine/dist/src/core/coreAbstractions/geometryKernel/pathMath.js
|
|
11911
|
+
var PATH_FORWARD = new Vector3(0, 0, 1);
|
|
11912
|
+
var PATH_UP = new Vector3(0, 1, 0);
|
|
11913
|
+
var PATH_RIGHT = new Vector3(1, 0, 0);
|
|
11914
|
+
|
|
11910
11915
|
// ../../node_modules/@babylonjs/core/tslib.es6.js
|
|
11911
11916
|
function __decorate(decorators, target, key, desc) {
|
|
11912
11917
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -40697,63 +40702,6 @@ var Ticks = createWaveTimeUnit("tick");
|
|
|
40697
40702
|
var Seconds = createWaveTimeUnit("second");
|
|
40698
40703
|
var UnitsPerSecond = createWaveRateUnit("unitsPerSecond");
|
|
40699
40704
|
var DegreesPerSecond = createWaveRateUnit("degreesPerSecond");
|
|
40700
|
-
var LogOnceManager = class {
|
|
40701
|
-
loggedMessages = /* @__PURE__ */ new Map();
|
|
40702
|
-
cooldownMs = 6e4;
|
|
40703
|
-
maxCacheSize = 500;
|
|
40704
|
-
callsSinceCleanup = 0;
|
|
40705
|
-
_logWithLevel(level, message) {
|
|
40706
|
-
const now = Date.now();
|
|
40707
|
-
const cacheKey = `${level}:${message}`;
|
|
40708
|
-
const lastLoggedAt = this.loggedMessages.get(cacheKey);
|
|
40709
|
-
const shouldLog = lastLoggedAt === void 0 || now - lastLoggedAt >= this.cooldownMs;
|
|
40710
|
-
if (shouldLog) {
|
|
40711
|
-
console[level](message);
|
|
40712
|
-
this.loggedMessages.set(cacheKey, now);
|
|
40713
|
-
}
|
|
40714
|
-
this.callsSinceCleanup += 1;
|
|
40715
|
-
if (this.callsSinceCleanup >= 100) {
|
|
40716
|
-
this._cleanup(now);
|
|
40717
|
-
this.callsSinceCleanup = 0;
|
|
40718
|
-
}
|
|
40719
|
-
}
|
|
40720
|
-
_cleanup(now) {
|
|
40721
|
-
const cutoff = now - this.cooldownMs;
|
|
40722
|
-
for (const [key, timestamp] of this.loggedMessages.entries()) {
|
|
40723
|
-
if (timestamp < cutoff) {
|
|
40724
|
-
this.loggedMessages.delete(key);
|
|
40725
|
-
}
|
|
40726
|
-
}
|
|
40727
|
-
if (this.loggedMessages.size > this.maxCacheSize) {
|
|
40728
|
-
const entries = Array.from(this.loggedMessages.entries()).sort((a, b) => a[1] - b[1]);
|
|
40729
|
-
const toRemove = entries.slice(0, entries.length - this.maxCacheSize);
|
|
40730
|
-
for (const [key] of toRemove) {
|
|
40731
|
-
this.loggedMessages.delete(key);
|
|
40732
|
-
}
|
|
40733
|
-
}
|
|
40734
|
-
}
|
|
40735
|
-
/** Log once at `console.log` level. */
|
|
40736
|
-
logOnce(message) {
|
|
40737
|
-
this._logWithLevel("log", message);
|
|
40738
|
-
}
|
|
40739
|
-
/** Log once at `console.info` level. */
|
|
40740
|
-
infoOnce(message) {
|
|
40741
|
-
this._logWithLevel("info", message);
|
|
40742
|
-
}
|
|
40743
|
-
/** Log once at `console.warn` level. */
|
|
40744
|
-
warnOnce(message) {
|
|
40745
|
-
this._logWithLevel("warn", message);
|
|
40746
|
-
}
|
|
40747
|
-
/** Log once at `console.error` level. */
|
|
40748
|
-
errorOnce(message) {
|
|
40749
|
-
this._logWithLevel("error", message);
|
|
40750
|
-
}
|
|
40751
|
-
/** Clear retained suppression state. */
|
|
40752
|
-
clear() {
|
|
40753
|
-
this.loggedMessages.clear();
|
|
40754
|
-
}
|
|
40755
|
-
};
|
|
40756
|
-
var globalLogOnce = new LogOnceManager();
|
|
40757
40705
|
function validateNonZeroFinite(label, value) {
|
|
40758
40706
|
if (!Number.isFinite(value) || Math.abs(value) <= Number.EPSILON) {
|
|
40759
40707
|
throw new Error(`[WaveTime] ${label} requires a finite value whose magnitude is greater than 0.`);
|
|
@@ -41467,6 +41415,7 @@ var WorldElementKind;
|
|
|
41467
41415
|
WorldElementKind2["Entity"] = "entity";
|
|
41468
41416
|
WorldElementKind2["Water"] = "water";
|
|
41469
41417
|
WorldElementKind2["Surface"] = "surface";
|
|
41418
|
+
WorldElementKind2["GrassCarpet"] = "grassCarpet";
|
|
41470
41419
|
WorldElementKind2["Custom"] = "custom";
|
|
41471
41420
|
WorldElementKind2["POI"] = "poi";
|
|
41472
41421
|
WorldElementKind2["Trigger"] = "trigger";
|
|
@@ -41493,6 +41442,7 @@ var SUPPORTED_WORLD_ELEMENT_KINDS = [
|
|
|
41493
41442
|
WorldElementKind.Entity,
|
|
41494
41443
|
WorldElementKind.Water,
|
|
41495
41444
|
WorldElementKind.Surface,
|
|
41445
|
+
WorldElementKind.GrassCarpet,
|
|
41496
41446
|
WorldElementKind.Custom,
|
|
41497
41447
|
WorldElementKind.POI
|
|
41498
41448
|
];
|
|
@@ -42533,8 +42483,8 @@ function normalizeWaveGenieAssetUploadRequest(request) {
|
|
|
42533
42483
|
|
|
42534
42484
|
// ../../src/lib/waveStudio/aiAssist/bridge/localAgentSdkContract.ts
|
|
42535
42485
|
var WAVE3D_AGENT_SDK_PACKAGE_NAME = "wave3d-agent-sdk";
|
|
42536
|
-
var WAVE3D_AGENT_SDK_REQUIRED_VERSION = "0.2.
|
|
42537
|
-
var WAVE3D_AGENT_SDK_REQUIRED_BUILD = "agent-sdk-
|
|
42486
|
+
var WAVE3D_AGENT_SDK_REQUIRED_VERSION = "0.2.6";
|
|
42487
|
+
var WAVE3D_AGENT_SDK_REQUIRED_BUILD = "agent-sdk-20260620.1";
|
|
42538
42488
|
var WAVE3D_AGENT_SDK_PACKAGE_SPEC = `${WAVE3D_AGENT_SDK_PACKAGE_NAME}@${WAVE3D_AGENT_SDK_REQUIRED_VERSION}`;
|
|
42539
42489
|
var WAVE3D_AGENT_SDK_START_COMMAND = `npx -y ${WAVE3D_AGENT_SDK_PACKAGE_SPEC} start`;
|
|
42540
42490
|
var WAVE3D_AGENT_SDK_TOKEN_ENV_VAR = "WAVE3D_MCP_TOKEN";
|
|
@@ -42614,7 +42564,7 @@ var SEMANTIC_GUESS_UNSAFE_PATTERN = /\b(add|append|create|insert|spawn|new line|
|
|
|
42614
42564
|
var SEMANTIC_GUESS_NEGATED_UNSAFE_PHRASE_PATTERN = /\b(?:no|not|without|avoid|avoids|don't|do not|doesn't|does not|isn't|is not|won't|will not|shouldn't|should not|needless|unneeded)\s+(?:(?:need|use|write|make|make a|create|add|insert|switch|choose)\s+)?(?:new\s+(?:line|object|api|code|pattern|builder)|another\s+api|different\s+api|api\s+switch|switch\s+api|builder|layout|placement|place\s+in|place\s+around|place\s+inline|line\s+of|row\s+of|grid\s+of|clone|multiple|many|several|loop|for\s+each)\b/giu;
|
|
42615
42565
|
var WAVE_MCP_TASK_PHASE_VALUES = ["context", "lookup", "execute", "verify", "general"];
|
|
42616
42566
|
var WAVE_MCP_TASK_EDIT_INTENT_VALUES = ["none", "readOnly", "modifyCode", "modifyVfs", "modifyAssets", "modifyProject", "debugOnly", "previewOnly"];
|
|
42617
|
-
var WAVE_MCP_BEHAVIOR_HARNESS_RULE = "Choose work mode before tool calls. Observe tools read directly. Operate tools run direct Studio commands without start_wave_task when the target is exact. Author/Diagnose tools are route-bound and phase/intent-gated with start_wave_task. query_wave_api, edit_wave_file, apply_wave_patch, code.direct_edit, code.semantic_guess_edit, and code.author are routed work. Direct Operate examples: run/hot reload/save/share/rename/open/new project/exact VFS create/rename/delete/asset upload/rename/delete. Direct Observe examples: session/files/assets/diagnostics/performance/screenshot/entity snapshots/markers.";
|
|
42567
|
+
var WAVE_MCP_BEHAVIOR_HARNESS_RULE = "Choose work mode before tool calls. Observe tools read directly. Operate tools run direct Studio commands without start_wave_task when the target is exact. Author/Diagnose tools are route-bound and phase/intent-gated with start_wave_task. query_wave_api, edit_wave_file, apply_wave_patch, code.direct_edit, code.semantic_guess_edit, and code.author are routed work. Direct Operate examples: run/hot reload/pause/resume/save/share/rename/open/new project/exact VFS create/rename/delete/asset upload/rename/delete. Direct Observe examples: session/files/assets/diagnostics/performance/screenshot/entity snapshots/markers.";
|
|
42618
42568
|
var WAVE_MCP_TOOL_ALIAS_CANONICAL_NAMES = {
|
|
42619
42569
|
list_wave_assets_by_category: "find_wave_assets_by_category",
|
|
42620
42570
|
search_wave_assets_by_category: "find_wave_assets_by_category",
|
|
@@ -42649,6 +42599,12 @@ var WAVE_MCP_TOOL_ALIAS_CANONICAL_NAMES = {
|
|
|
42649
42599
|
run_wave_project: "run_wave_preview",
|
|
42650
42600
|
run_project: "run_wave_preview",
|
|
42651
42601
|
run_wave_scene: "run_wave_preview",
|
|
42602
|
+
pause_wave_engine: "pause_wave_preview",
|
|
42603
|
+
pause_engine: "pause_wave_preview",
|
|
42604
|
+
pause_preview: "pause_wave_preview",
|
|
42605
|
+
resume_wave_engine: "resume_wave_preview",
|
|
42606
|
+
resume_engine: "resume_wave_preview",
|
|
42607
|
+
resume_preview: "resume_wave_preview",
|
|
42652
42608
|
read_wave_files: "list_wave_files",
|
|
42653
42609
|
get_wave_files: "list_wave_files",
|
|
42654
42610
|
list_wave_project: "list_wave_projects",
|
|
@@ -42802,7 +42758,7 @@ var WAVE_MCP_TOOL_CONTRACTS = {
|
|
|
42802
42758
|
query_wave_skills: { workMode: "author", domain: "code", safety: "readOnly", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
42803
42759
|
get_wave_skill: { workMode: "author", domain: "code", safety: "readOnly", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
42804
42760
|
list_wave_projects: { workMode: "observe", domain: "project", safety: "readOnly", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
42805
|
-
read_wave_project: { workMode: "observe", domain: "project", safety: "readOnly", targetPolicy: "
|
|
42761
|
+
read_wave_project: { workMode: "observe", domain: "project", safety: "readOnly", targetPolicy: "projectIdOrUrlRequired", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
42806
42762
|
list_wave_project_templates: { workMode: "observe", domain: "project", safety: "readOnly", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
42807
42763
|
get_wave_runtime_diagnostics: { workMode: "observe", domain: "runtime", safety: "readOnly", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
42808
42764
|
get_wave_runtime_performance_snapshot: { workMode: "observe", domain: "runtime", safety: "readOnly", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true },
|
|
@@ -42830,7 +42786,9 @@ var WAVE_MCP_TOOL_CONTRACTS = {
|
|
|
42830
42786
|
new_wave_project: { workMode: "operate", domain: "project", safety: "workspaceOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "project.manage", directEditIntent: "modifyProject", destructive: true },
|
|
42831
42787
|
open_wave_project: { workMode: "operate", domain: "project", safety: "workspaceOperation", targetPolicy: "exactProjectIdRequired", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "project.manage", directEditIntent: "modifyProject", destructive: true },
|
|
42832
42788
|
hot_reload_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" },
|
|
42833
|
-
run_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" }
|
|
42789
|
+
run_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" },
|
|
42790
|
+
pause_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" },
|
|
42791
|
+
resume_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" }
|
|
42834
42792
|
};
|
|
42835
42793
|
var WAVE_MCP_SETUP_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
42836
42794
|
"get_wave_agent_onboarding",
|
|
@@ -42890,7 +42848,9 @@ var WAVE_MCP_TASK_EXECUTE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
42890
42848
|
"new_wave_project",
|
|
42891
42849
|
"open_wave_project",
|
|
42892
42850
|
"hot_reload_wave_preview",
|
|
42893
|
-
"run_wave_preview"
|
|
42851
|
+
"run_wave_preview",
|
|
42852
|
+
"pause_wave_preview",
|
|
42853
|
+
"resume_wave_preview"
|
|
42894
42854
|
]);
|
|
42895
42855
|
var WAVE_MCP_TASK_VERIFY_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
42896
42856
|
"get_wave_command_result",
|
|
@@ -43564,7 +43524,7 @@ function buildWaveMcpTaskRouteRecommendedNextToolCall(route) {
|
|
|
43564
43524
|
}
|
|
43565
43525
|
if (route.editIntent === "previewOnly") {
|
|
43566
43526
|
return {
|
|
43567
|
-
tool: "hot_reload_wave_preview | run_wave_preview",
|
|
43527
|
+
tool: "hot_reload_wave_preview | run_wave_preview | pause_wave_preview | resume_wave_preview",
|
|
43568
43528
|
arguments: {},
|
|
43569
43529
|
note: "Poll get_wave_runtime_diagnostics afterward for real outcome."
|
|
43570
43530
|
};
|
|
@@ -43633,7 +43593,7 @@ function toolIntentAllowed(toolName, route) {
|
|
|
43633
43593
|
if (canonicalToolName === "create_wave_file" || canonicalToolName === "rename_wave_file" || canonicalToolName === "delete_wave_file") {
|
|
43634
43594
|
return routeHasAnyIntent(route, ["vfs.manage", "code.author"]);
|
|
43635
43595
|
}
|
|
43636
|
-
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview") {
|
|
43596
|
+
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview" || canonicalToolName === "pause_wave_preview" || canonicalToolName === "resume_wave_preview") {
|
|
43637
43597
|
return routeHasAnyIntent(route, ["preview.control", "code.direct_edit", "code.semantic_guess_edit", "code.author", "code.debug"]);
|
|
43638
43598
|
}
|
|
43639
43599
|
if (canonicalToolName === "get_wave_runtime_entity_snapshot") {
|
|
@@ -43738,7 +43698,7 @@ function canFastExecuteExactEditTool(input) {
|
|
|
43738
43698
|
}
|
|
43739
43699
|
function isWriteTool(toolName) {
|
|
43740
43700
|
const canonicalToolName = canonicalizeWaveMcpToolName(toolName);
|
|
43741
|
-
return WAVE_MCP_TASK_EXECUTE_TOOL_NAMES.has(canonicalToolName) && canonicalToolName !== "get_wave_asset_upload_status" && canonicalToolName !== "hot_reload_wave_preview" && canonicalToolName !== "run_wave_preview";
|
|
43701
|
+
return WAVE_MCP_TASK_EXECUTE_TOOL_NAMES.has(canonicalToolName) && canonicalToolName !== "get_wave_asset_upload_status" && canonicalToolName !== "hot_reload_wave_preview" && canonicalToolName !== "run_wave_preview" && canonicalToolName !== "pause_wave_preview" && canonicalToolName !== "resume_wave_preview";
|
|
43742
43702
|
}
|
|
43743
43703
|
function waveMcpToolRequiresTaskRoute(toolName) {
|
|
43744
43704
|
const canonicalToolName = canonicalizeWaveMcpToolName(toolName);
|
|
@@ -44017,7 +43977,7 @@ function validateWaveMcpTaskToolCall(input) {
|
|
|
44017
43977
|
if (!input.route || input.route.taskRouteId !== taskRouteId) {
|
|
44018
43978
|
return {
|
|
44019
43979
|
code: "task_route_not_found",
|
|
44020
|
-
message: "The provided taskRouteId is not the active Wave task route for this
|
|
43980
|
+
message: "The provided taskRouteId is not the active Wave task route for this MCP session.",
|
|
44021
43981
|
details: {
|
|
44022
43982
|
taskRouteId
|
|
44023
43983
|
}
|
|
@@ -44114,7 +44074,7 @@ function recordWaveMcpTaskEvidenceUse(input) {
|
|
|
44114
44074
|
}
|
|
44115
44075
|
if (WAVE_MCP_ASSET_MUTATION_TOOL_NAMES.has(canonicalToolName)) evidence = { ...evidence, assetsMutated: true };
|
|
44116
44076
|
if (WAVE_MCP_PROJECT_MUTATION_TOOL_NAMES.has(canonicalToolName)) evidence = { ...evidence, projectMutated: true };
|
|
44117
|
-
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview") evidence = { ...evidence, previewControlled: true };
|
|
44077
|
+
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview" || canonicalToolName === "pause_wave_preview" || canonicalToolName === "resume_wave_preview") evidence = { ...evidence, previewControlled: true };
|
|
44118
44078
|
if (canonicalToolName === "get_wave_runtime_diagnostics" || canonicalToolName === "get_wave_runtime_performance_snapshot") {
|
|
44119
44079
|
evidence = { ...evidence, diagnosticsRead: true, runtimeInspected: true };
|
|
44120
44080
|
}
|
|
@@ -44430,37 +44390,37 @@ var WAVE_MCP_AGENT_BRIEF = [
|
|
|
44430
44390
|
'0-role. Roleplay lock: you are the Wave Studio authoring agent for this session. Stay in that role, follow Wave authoring strategy, use concrete MCP tools, and briefly confirm "Wave Studio authoring role accepted" after onboarding acceptance.',
|
|
44431
44391
|
"0. Think in skills, act with tools. `studio.*` names are routing families, not callable tool names; call the real MCP tools listed under each family.",
|
|
44432
44392
|
"0a. Do not invent MCP tool names. After onboarding, call `tools/list` (or read the returned tool catalog) and use concrete names. Common aliases and safe high-confidence typos are tolerated; destructive/write fuzzy matches require an exact follow-up call. There is no `get_wave_current_project`; use `get_wave_session` for current project/session/active-file context.",
|
|
44433
|
-
`0b. Transport rule: choose topology first. Same-machine agent + same Wave Studio browser computer -> use copied \`MCP_URL\` WaveEngine Agent SDK (\`http://127.0.0.1:47231/mcp\`). If localhost is refused/unreachable, start exact SDK \`${WAVE3D_AGENT_SDK_START_COMMAND}\` when your runtime allows shell/Node/npm. If SDK is stale, missing tools, printing
|
|
44434
|
-
"0b-recovery. If connection/session/onboarding/cache/mirror/timeout state is unclear, call `get_wave_mcp_health` (aliases `mcp_health`, `mcp_status`) first for status, then call `recover_wave_connection({ lastErrorCode?, failedTool?, symptom? })` and follow its `nextAction` exactly. Use recovery after `agent_onboarding_required`, `session_not_found`, `command_timeout`, `command_lease_expired`, `workspace_mirror_not_ready`, `hosted_mcp_proxy_failed`, local/HTTP Gateway fallback confusion, or sleeping-tab symptoms. If local HTTP returns 401 but HTTP Gateway accepts the same
|
|
44435
|
-
`0c. Cache priorities: Priority 1 is active role/context cache. Keep the role, coding guardrails, authoring workflow, full intent taxonomy (${WAVE_MCP_TASK_INTENT_KIND_VALUES.join(", ")}), Studio tool policy, assets/VFS/hot-reload rules, prompt version, and prompt hash in active LLM context as system-prompt-like rules. Priority 2 is WaveEngine SDK Cache. Production HTTP Gateway/local-SDK
|
|
44436
|
-
'0d. Local parity rule: WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway catalog
|
|
44437
|
-
'0e. Agent behavior harness: choose MECE work mode first. Observe = read/inspect/answer only; call read tools directly. Operate = direct Studio command with no code/design choice; call concrete tools directly without `start_wave_task` for run preview, hot reload, save/share, exact VFS create/rename/delete, asset upload/rename/delete, new project, project rename, and open project by exact projectId. Author = create/change behavior/content through code/API; call `start_wave_task`, gather evidence, optionally fast-start with `nextPhase:"execute"` and editPlan, then edit. Diagnose = find root cause first; observe/read first, then transition to Operate or Author. General = not concrete Wave work; use `agent.general`. `query_wave_api`, `edit_wave_file`, `apply_wave_patch`, and code authoring fast lanes remain route-bound. Exact target rule: never invent paths, asset paths, or project ids; list/read/ask first.',
|
|
44393
|
+
`0b. Transport rule: choose topology first. Same-machine agent + same Wave Studio browser computer -> use copied \`MCP_URL\` WaveEngine Agent SDK (\`http://127.0.0.1:47231/mcp\`). On localhost, MCP_TOKEN is a local pairing secret, not account/cloud auth. If localhost is refused/unreachable, start exact SDK \`${WAVE3D_AGENT_SDK_START_COMMAND}\` when your runtime allows shell/Node/npm. If SDK is stale, missing tools, printing secrets, or local 401 follows an SDK restart, stop it and restart while preserving MCP_TOKEN as the local pairing secret with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\`; use the current MCP_TOKEN value without printing it. Then recheck /health and tools/list. Same-machine stale/missing tools/401-with-Gateway-success means repair local SDK first, do not use HTTP Gateway first. Same-machine HTTP Gateway is degraded fallback only after SDK cannot run, update, or adopt; convenience, habit, or successful Gateway auth is not a valid fallback reason. Different machine, remote container, cloud agent, sandbox without shell/Node/npm, or localhost points to the agent machine -> use \`MCP_HTTP_GATEWAY_FALLBACK_URL\` directly, where MCP_TOKEN is an HTTP Gateway bearer. Do not start WaveEngine Agent SDK on the wrong machine.`,
|
|
44394
|
+
"0b-recovery. If connection/session/onboarding/cache/mirror/timeout state is unclear, call `get_wave_mcp_health` (aliases `mcp_health`, `mcp_status`) first for status, then call `recover_wave_connection({ lastErrorCode?, failedTool?, symptom? })` and follow its `nextAction` exactly. Use recovery after `agent_onboarding_required`, `session_not_found`, `command_timeout`, `command_lease_expired`, `workspace_mirror_not_ready`, `hosted_mcp_proxy_failed`, local/HTTP Gateway fallback confusion, or sleeping-tab symptoms. If local HTTP returns 401 but HTTP Gateway accepts the same MCP_TOKEN, update/restart WaveEngine Agent SDK first. If every endpoint returns 401/bridge_auth_invalid before any tool result, ask user for fresh Copy to Agent.",
|
|
44395
|
+
`0c. Cache priorities: Priority 1 is active role/context cache. Keep the role, coding guardrails, authoring workflow, full intent taxonomy (${WAVE_MCP_TASK_INTENT_KIND_VALUES.join(", ")}), Studio tool policy, assets/VFS/hot-reload rules, prompt version, and prompt hash in active LLM context as system-prompt-like rules. Priority 2 is WaveEngine SDK Cache. Production HTTP Gateway/local-SDK onboarding must not claim normal cached success until SDK cache is prepared or explicit accept proof passes. If cache cannot work because sandbox/no filesystem/no Node/npm/user refusal/refresh failure, accept degraded fallback explicitly with \`waveEngineSdkFallbackMode:"studio_ops_only"\` plus \`waveEngineSdkUnavailableReason\` plus \`studioOpsOnlyFallbackAccepted:true\`, and warn user HTTP Gateway is Studio-ops-only and skill/API lookup requires local SDK/cache repair. Keep live transport and retrieval cache separate: \`wave3d-agent-sdk start\` is long-running MCP transport; \`wave3d-agent-sdk cache refresh\` reinstalls the package-bundled SDK locally. Never use cache refresh to switch MCP transport, and never treat cache failure as local transport failure. Use SDK Cache for unfamiliar authoring skill/API lookup when Node/npm/local cache are allowed.`,
|
|
44396
|
+
'0d. Local parity rule: WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway Studio-operation catalog, then adds local SDK lookup/session-discovery extras. Live-session tools run through the paired browser. Local calls wait directly for browser results. Only call `get_wave_command_result` when a tool response actually includes `status:"pending"` and `requestId`; on local it is normally catalog parity only.',
|
|
44397
|
+
'0e. Agent behavior harness: choose MECE work mode first. Observe = read/inspect/answer only; call read tools directly. Operate = direct Studio command with no code/design choice; call concrete tools directly without `start_wave_task` for run preview, hot reload, save/share, exact VFS create/rename/delete, asset upload/rename/delete, new project, project rename, and open project by exact projectId. Author = create/change behavior/content through code/API; call `start_wave_task`, gather evidence, optionally fast-start with `nextPhase:"execute"` and editPlan, then edit. Diagnose = find root cause first; observe/read first, then transition to Operate or Author. General = not concrete Wave work; use `agent.general`. Local-SDK `query_wave_api`, `edit_wave_file`, `apply_wave_patch`, and code authoring fast lanes remain route-bound. Exact target rule: never invent paths, asset paths, or project ids; list/read/ask first.',
|
|
44438
44398
|
"0f. Diagnose-only tasks use `code.debug`; bug-fix tasks use both `code.debug` and `code.author` so evidence can lead to edits.",
|
|
44439
|
-
"0g. Skill onion rule: for normal Author work, do not use raw user prose as a skill/API query.
|
|
44399
|
+
"0g. Skill onion rule: for normal Author work, do not use raw user prose as a skill/API query. On the local SDK endpoint, triage intent -> choose skill family with `list_wave_skill_families` -> call `query_wave_skills` with selected `families`/`familyId` and a small within-family phrase -> call `get_wave_skill` -> call `query_wave_api` only for exact signature/global/value uncertainty. HTTP Gateway hides/retires cloud skill/API lookup. Example: \u201Cturn continuously left\u201D routes to `wave.transform` plus possibly `wave.animate`, then skill query \u201Ccontinuous rotation semantic left\u201D.",
|
|
44440
44400
|
"Shared authoring workflow:",
|
|
44441
44401
|
...buildWaveMcpAuthoringWorkflowLines(),
|
|
44442
|
-
"First MCP calls after transport selection: initialize the chosen endpoint, read onboarding, accept it, read the tiny ready summary, then call `tools/list`, `get_wave_session`, and `list_wave_files`; call `get_wave_tool_map` only when the tool menu is unclear. Use the package-bundled WaveEngine SDK Cache for unfamiliar authoring lookup. For each user request, choose Observe/Operate/Author/Diagnose/General. Do not route direct Operate commands just to run/save/hot-reload/create/delete exact targets. Always route before exact API lookup or code edits. Use fast-lane route kinds when the code-authoring request is already exact or visibly pattern-preserving.",
|
|
44443
|
-
'Code-edit loop: assess with `read_wave_file`/skills/assets as needed -> `start_wave_task`; if enough context is already read, include `nextPhase:"execute"` plus editPlan to skip a separate `advance_wave_task` call. For exact one-file line/text edits, start the route and call `edit_wave_file` directly with exact `path` plus `startLine`/`endLine`/`text`, `edits:[{startLine,endLine,text}]`, or `oldText`/`newText`; no advance call needed. Use `advance_wave_task({ nextPhase:"lookup" })` only if exact API facts are missing. On final simple edit, prefer `edit_wave_file({ ..., awaitHotReload: true })` to combine edit + hot reload + bounded diagnostics in one call;
|
|
44402
|
+
"First MCP calls after transport selection: initialize the chosen endpoint, read onboarding, accept it, read the tiny ready summary, then call `tools/list`, `get_wave_session`, and `list_wave_files`; call `get_wave_tool_map` only when the tool menu is unclear. Use the package-bundled WaveEngine SDK Cache for unfamiliar authoring lookup. For each user request, choose Observe/Operate/Author/Diagnose/General. Do not route direct Operate commands just to run/save/hot-reload/create/delete exact targets. Always route before local SDK exact API lookup or code edits. Use fast-lane route kinds when the code-authoring request is already exact or visibly pattern-preserving.",
|
|
44403
|
+
'Code-edit loop: assess with `read_wave_file`/local-SDK skills/assets as needed -> `start_wave_task`; if enough context is already read, include `nextPhase:"execute"` plus editPlan to skip a separate `advance_wave_task` call. For exact one-file line/text edits, start the route and call `edit_wave_file` directly with exact `path` plus `startLine`/`endLine`/`text`, `edits:[{startLine,endLine,text}]`, or `oldText`/`newText`; no advance call needed. Use `advance_wave_task({ nextPhase:"lookup" })` only if exact API facts are missing. On final simple edit, prefer `edit_wave_file({ ..., awaitHotReload: true })` to combine edit + hot reload + bounded diagnostics in one call; `requestHotReload:true` also waits by default unless paired with `awaitHotReload:false`. Use `apply_wave_patch` only for grouped/multi-file work. Fast lane examples: \u201Ccall showDirection on Amy\u201D -> `code.direct_edit`; `cube.setColor(COLOR.RED)` plus \u201Cmake cube blue\u201D -> `code.semantic_guess_edit` with no local-SDK `query_wave_api` unless uncertain/failing. \u201CPlace cubes in a line\u201D writes new layout code, so it is `code.author`, and should prefer WaveEngine-native APIs such as `myScene.placeInline(...)` over manual coordinates.',
|
|
44444
44404
|
"Code-edit hotreload safety: avoid raw unmanaged callback roots in authored .ts/.js files: no timers, RAF, listeners, Promise chains, observers, workers, sockets, channels, eventBus/myScene raw subscriptions, or raw event-handler property assignments. Use Wave-owned callbacks/Animate/tick/state/Director APIs. Edit tools preflight this rule and runtime bundling blocks violations before authored code runs.",
|
|
44445
44405
|
"Asset-upload Operate loop: `create_wave_asset_upload` -> raw PUT with every returned header -> `get_wave_asset_upload_status` until receivedBytes matches -> `commit_wave_asset_upload` -> if the commit response is pending, poll `get_wave_command_result` -> category-first asset discovery (`find_wave_assets_by_category` or alias `list_wave_assets_by_category`) with the returned asset category before writing the ref into code. If upload is part of Author work, keep the route id; otherwise direct Operate is fine.",
|
|
44446
|
-
"Project Operate loops: save with `save_wave_project`; share with `share_wave_project` and send returned `url`; list/read examples with `list_wave_projects` -> `read_wave_project`; rename saved project metadata with `list_wave_projects` -> `rename_wave_project`; open only when user wants workspace replacement and you have exact projectId from `list_wave_projects`; new project with `list_wave_project_templates` -> `new_wave_project`.",
|
|
44406
|
+
"Project Operate loops: save with `save_wave_project`; share with `share_wave_project` and send returned `url`; silently read shared/published links with `read_wave_project({ url })` without opening; list/read saved examples with `list_wave_projects` -> `read_wave_project({ projectId })`; rename saved project metadata with `list_wave_projects` -> `rename_wave_project`; open only when user wants workspace replacement and you have exact projectId from `list_wave_projects`; new project with `list_wave_project_templates` -> `new_wave_project`.",
|
|
44447
44407
|
"Studio families: `studio.vfs` for files, `studio.assets` for uploads/library refs, `studio.project` for save/rename/open/new/share, `studio.preview` for hot reload/run/diagnostics, `studio.capture` for screenshot/snapshot, `studio.mcp` for session/pending commands/policy, `studio.export` for output workflows.",
|
|
44448
44408
|
"Geometry skill routes: for soft custom forms such as a rounded bun, cushion, puffy/squishy toy, or organic rounded prop, route to `wave.geometry.sdf-surface`: create an SDF surface asset, compose recipe primitives, call `.apply()`, then bind the generated asset with `useModel(...)`.",
|
|
44449
44409
|
"Surface skill routes: for roads, trails, highways, walkways, lanes, bridge decks, waterfalls, or other path-bound surfaces, route to `wave.geometry.surface-ribbons`: author a `wavePathSurface` with `.along(...)` or `.between(...)`, then compose material, collider, terrain attachment, center samples, and navigation on that surface as needed.",
|
|
44450
44410
|
"World population route: for forests, grass, rocks, water, streamed entities, or environmental scatter tied to terrain/streaming surfaces, route to `wave.world.world-elements`: prefer `scene.world.scatter(...)` or bootstrap `world.scatter(...).renderAs(...).density(...).randomScale(...).apply()` before local placement, spawn loops, or instancing/batching.",
|
|
44451
44411
|
"Obby/platform route: controlled humanoid/vehicle/flight players use `wave.physics.kinematic-controller-authoring`; static and moving platforms, sliding gates, sweepers, ferries, and hazards use `wave.physics.rigid-body-authoring` on geometry/props with static or kinematic rigid bodies, then transform/animate/current-code motion. Do not use `waveKinematicActor` for a platform unless it is itself player/controller-driven.",
|
|
44452
44412
|
"Multiplicity skill route: for many local repeated model-backed objects, route to `wave.group.instancing-and-batching`: classify per-instance needs first. Use `waveThinBatch` only for visual-only mass, `waveInstanceMesh`/`InstanceMeshGroup`/`waveInstanceGroup` for selectable/interactive repeated instances, and real `Prop`/`Actor` entities for physics, AI, audio, damage state, or rich lifecycle. Count alone never chooses thin batch; terrain/world population is the world-elements route.",
|
|
44453
|
-
"Model voxelization route: for voxelize/voxelized/volexize model requests, route to `wave.model.voxelization`. Use `source.model.voxelizing().relativeSize(0.05).surfaceOnly().onWorkerThread().usingCubes().asThinBatch().applyAsync()` only when async/worker authored code is explicitly acceptable. If code must stay synchronous, use `onMainThread().apply()` only for tiny local voxel work. Never use `.apply().then(...)` or Promise callback chains. Use `voxelBatch.detectNear(explorer).within(5)` for local proximity, `voxelBatch.batchTransform.getColorAt(index)` before highlight/restore, and `voxelBatch.whenIndexClicked(index => voxelBatch.
|
|
44413
|
+
"Model voxelization route: for voxelize/voxelized/volexize model requests, route to `wave.model.voxelization`. Use `source.model.voxelizing().relativeSize(0.05).surfaceOnly().onWorkerThread().usingCubes().asThinBatch().applyAsync()` only when async/worker authored code is explicitly acceptable. If code must stay synchronous, use `onMainThread().apply()` only for tiny local voxel work. Never use `.apply().then(...)` or Promise callback chains. Use `voxelBatch.detectNear(explorer).within(5)` for local proximity, `voxelBatch.batchTransform.getColorAt(index)` before highlight/restore, and `voxelBatch.whenIndexClicked(index => voxelBatch.at(index).enlargeBy(1.2).done().commitBuffers())` for per-index clicks. Do not use `voxelizeHeavy`, `voxelize({ voxelSize })`, `withVoxelSize`, `sharedBox`, or stale `atIndex`.",
|
|
44454
44414
|
"VFS edits: primary tool is forgiving `edit_wave_file`; it infers exact-text, line-range, one-file `edits:[...]`, or whole-file replacement from arguments and tolerates common field aliases. Use `apply_wave_patch({ operations: [...] })` only for grouped/multi-file/strict diff work.",
|
|
44455
44415
|
"VFS managed files: project.assetrefs.ts, project.scene.ts, project.scenes.ts, and project.execution.ts are Studio-managed read-only. bootstrap.ts is normally Studio-managed too; edit it only when you can confidently pass managedFileEditReason as one of: world_streaming_or_terrain_provider, render_profile_or_runtime_backend, media_consent_or_capture_plan, external_ai_or_tts_backend, scene_envelope_or_template_baseline, baseline_setup_before_user_main, stale_api_update_to_latest. Never edit bootstrap for asset_manifest_or_loader, instrument_registry, scene_registry, or execution_manifest; Studio owns those paths.",
|
|
44456
44416
|
"VFS hashes: simple edit tools auto-resolve the latest mirror `contentHash`; pass `baseHash` only when you already have it or when using advanced `apply_wave_patch`. Always inspect `changedFiles`, `changedPaths`, `partial`, and `skippedOperations` after edits.",
|
|
44457
44417
|
"VFS modules: scene-root modules and their owned helpers run inside the Studio authoring context, but helpers should stay pure or parameterized. Put live object ownership in scene-root/feature files, not shared helpers.",
|
|
44458
|
-
'VFS HTML sketches: for diagram/chart/doc-sketch requests, create or edit an exact `.html` file with Studio VFS tools. Mermaid renders from `<div class="mermaid">flowchart TD ...</div>` when that HTML file is active in
|
|
44418
|
+
'VFS HTML sketches: for diagram/chart/doc-sketch requests, create or edit an exact `.html` file with Studio VFS tools. Mermaid renders from `<div class="mermaid">flowchart TD ...</div>` when that HTML file is active in the editor/coding pane; HTML sketches must never replace the live engine preview iframe. Do not put Mermaid in markdown fences unless user specifically wants markdown text.',
|
|
44459
44419
|
'VFS hot reload ownership: Studio hot reload targets the active/open edited file when safe. Editing `/main.ts` reloads the main graph; editing a scene-root module reloads that root; bootstrap/scene registry/assets/network/ambiguous helper surfaces escalate. In multi-file projects, standalone `hot_reload_wave_preview` follows the active Studio editor file, so do not expect it to reload an arbitrary unopened module by path. Put heavy world loading in bootstrap or a coarse world module. For intentional cross-module live entities, the owner module calls `waveStudio.exportEntity("Name", entity)` and importer modules call `waveStudio.importEntity<T>("Name")`; Studio restores the exported baseline and replays active importer overlays during source hot reload. Source execution order is dependency-driven: exporter roots run before importer roots; an exporter root runs before `main.ts` when main imports it; importer overlays run after exporter/main baseline. Entity names must be static string literals, unique, and acyclic or run/hot reload stops before execution. Keep shared helpers pure or parameterized.',
|
|
44460
44420
|
"Assets: when quoting or passing an existing asset, use typed bare refs in main files: `models.X`, `textures.X`, `materials.X`, `audios.X`, `hdr.X`, `cubeMaps.X`, `animations.X`, etc. Do not paste raw paths or edit Studio-managed generated files just to register assets. If the exact ref is not already visible, call category-first asset discovery (`find_wave_assets_by_category`, alias `list_wave_assets_by_category`, alias `search_wave_assets_by_category`, or tolerant `list_wave_assets`) with required `category` from user intent, semantic `query`, and small `limit` before editing code; category-filtered results can still be capped/truncated, so refine query before concluding absence. Use `list_wave_explorer_assets` only for uploaded library metadata, rename/delete, URL, path, size, or display/ref-name management.",
|
|
44461
|
-
"Asset authoring facade split: typed refs quote existing assets; `waveMaterial` authors material handles; `assetManager` is only for exact asset-pipeline/generated-asset APIs that a skill or API lookup names, such as SDF surfaces or surface ribbons. Do not treat `assetManager` as the default creative facade for materials or normal asset arguments.",
|
|
44421
|
+
"Asset authoring facade split: typed refs quote existing assets; `waveMaterial` authors material handles; `assetManager` is only for exact asset-pipeline/generated-asset APIs that a local SDK skill or API lookup names, such as SDF surfaces or surface ribbons. Do not treat `assetManager` as the default creative facade for materials or normal asset arguments.",
|
|
44462
44422
|
"Material authoring: when creating, configuring, forking, or intentionally editing material handles, route to `wave.material.authoring` and start from `waveMaterial` (`createWater`, `createGrid`, `createSplatMaterial`, `createFromAsset`, `editAsset`). If a material handle later needs runtime sync, `assetManager` may be passed as the sync target; it is still not the authoring root.",
|
|
44463
|
-
"Preview: default to hot reload after code changes. On the final edit use `awaitHotReload: true` when you want edit + hot reload + diagnostics in one response;
|
|
44423
|
+
"Preview: default to hot reload after code changes. On the final edit use `awaitHotReload: true` when you want edit + hot reload + diagnostics in one response; `requestHotReload:true` now also waits for diagnostics by default unless paired with `awaitHotReload:false`. Standalone `run_wave_preview` / `hot_reload_wave_preview` wait by default and return same-call bounded diagnostics in `runtimeVerification`; set `awaitRuntimeResult:false` only for intentional fire-and-poll. Wave Studio may upgrade the hot-reload tier internally for asset/bootstrap/runtime-surface changes, including a full scene rebuild only when required. Caveat: standalone `hot_reload_wave_preview` mirrors the toolbar button and reloads the currently open/active TypeScript file in multi-file projects; it does not take a target path or reload every user-created .ts module. Use `pause_wave_preview` / `resume_wave_preview` for toolbar-equivalent engine pause/resume.",
|
|
44464
44424
|
"Preview fallback: if an edit result says `hotReloadRequested: false`, the preview did not refresh; inspect `hotReloadSkippedReason`/skips, then call `hot_reload_wave_preview` or `run_wave_preview` only as appropriate. Use `run_wave_preview` only when diagnostics show no successful preview yet (`hasRunSucceeded: false`), to honor an explicit full-restart request, or as the last resort after hot reload/polling fails or gets stuck.",
|
|
44465
44425
|
'Verification: never report completion immediately after edit, run, or hot reload. If a tool returns `status:"pending"` plus `requestId`, poll `get_wave_command_result`; otherwise continue to diagnostics. Poll diagnostics until `runtimeBusy` is false and `lastRuntimeOutcome` is `success` or `error`; ignore terminal outcomes older than the edit/runtime `requestedAt` or `runtimeActionRequestedAt`. `editorErrorCount > 0` means Monaco/linter/compile errors still block the code; read `editorDiagnostics` and do not report success.',
|
|
44466
44426
|
'Observation: logs are history. If outcome is success, choose one relevant proof tool when needed: `capture_wave_screenshot({ resolution: "L" })` for visual changes (WaveEngine Agent SDK returns `localPath`; HTTP Gateway returns exact `dataBase64`, not `imageBase64`), `get_wave_runtime_entity_snapshot` for live transform/state, or `list_wave_runtime_markers` for clicked marker positions/rotations.',
|
|
@@ -44474,9 +44434,9 @@ var WAVE_MCP_AGENT_BRIEF = [
|
|
|
44474
44434
|
// ../../src/lib/waveStudio/aiAssist/bridge/hosted/mcpResources/authoringGlobals.ts
|
|
44475
44435
|
var WAVE_MCP_AUTHORING_GLOBALS_GUIDE = [
|
|
44476
44436
|
"Wave Studio bare authoring globals, common examples only:",
|
|
44477
|
-
"- This guide is a compact memory aid, not an exhaustive list. Engine authoring globals come from the generated `waveStudio-globals.d.ts` surface indexed by `query_wave_api`; Studio wrapper conveniences such as `waveStudio`, `waveEngine`, and live asset overlays are documented by MCP guardrails/tools and the current session asset/file tools.",
|
|
44437
|
+
"- This guide is a compact memory aid, not an exhaustive list. Engine authoring globals come from the generated `waveStudio-globals.d.ts` surface indexed by local-SDK `query_wave_api`; Studio wrapper conveniences such as `waveStudio`, `waveEngine`, and live asset overlays are documented by MCP guardrails/tools and the current session asset/file tools.",
|
|
44478
44438
|
"- Runtime values injected into Studio-authored `main.ts` files should be used bare. Do not import them and do not qualify them with guessed namespaces. Query when unsure.",
|
|
44479
|
-
"- Intent/loop/time values: `
|
|
44439
|
+
"- Intent/loop/time values: `Animate`, `Snapshot`, `Repeat`, `ToTrue`, `ToFalse`, `Flips`, `FirstTime`, `EveryTime`, `PerSecond`, `PerTick`, `Ticks`, `Seconds`, `UnitsPerSecond`, `DegreesPerSecond`. For immediate transform/property changes, omit the mode argument; `Apply` is internal transform plumbing, not a public authoring token.",
|
|
44480
44440
|
"- Direction and input enum-style globals: `Direction.X/Y/Z`, `Direction.Left/Right/Up/Down/Forward/Backward`, `Keyboard`, `MouseButton`, `GamepadButton`, `InputPhase`, `MovementMode`, `RotationMode`.",
|
|
44481
44441
|
"- Colors/materials/fx helpers: `COLOR`, `PALETTE`, `waveCOLOR`, `waveMaterial`, `shaderUniform`, `waveFx`, `waveFxPresets`, `FxAnchor`, `FxCondition`.",
|
|
44482
44442
|
"- Controller movement helpers: `waveKinematicActor`, `netKinematicActor`, `KinematicHumanoidMovementState`, `KinematicVehicleMovementState`, and `KinematicFlightMovementState`. Use actor-level `.asHumanoid(...)`, `.asVehicle(...)`, or `.asFlight(...)` for player/controller movement.",
|
|
@@ -44484,8 +44444,8 @@ var WAVE_MCP_AUTHORING_GLOBALS_GUIDE = [
|
|
|
44484
44444
|
"- Scene/runtime handles: prefer `myScene` for scene composition and `waveStudio` for Studio operations. `assetManager` is available, but use it only when an exact skill/API names an asset-pipeline or generated-asset factory; do not use it as the default facade for existing asset refs or material authoring. Use lower-level `ctx`, `engine`, or `scene` only when existing code or an exact API requires them.",
|
|
44485
44445
|
"- Authoring systems/presets: `waveEventBus`, `waveRig`, `waveValueCurve`, `waveValueCurvePresets`, `waveMotionSignal`, `waveParam`, `WaveParam`, `WaveChoice`, `prefabModels`, `effectPrefabs`, and prefab helpers such as `rocketPrefab`.",
|
|
44486
44446
|
"- Lowercase constructors: `prop`, `marker`, `sphere`, `point`, `cube`, `box`, `cylinder`, `capsule`, `cone`, `torus`, `plane`, `ground`, `line`, `arc`, `path`, and related shape helpers.",
|
|
44487
|
-
"- Type names are not import paths. If the handbook shows a type like `TransformVerbMode` or `WaveRateUnit`, look for the matching bare runtime value such as `Animate` or `DegreesPerSecond` before writing code.",
|
|
44488
|
-
'- If you are unsure whether an engine global exists, query it first, for example `query_wave_api({ query: "DegreesPerSecond" })`, `query_wave_api({ query: "waveMaterial createWater" })`, or `query_wave_api({ query: "Keyboard enum" })`. For asset refs, use `find_wave_assets_by_category` instead of guessing property names.',
|
|
44447
|
+
"- Type names are not import paths. If the handbook shows a type like `TransformVerbMode` or `WaveRateUnit`, look for the matching bare runtime value such as `Animate` or `DegreesPerSecond` before writing code. Transform `Snapshot` calls return a snapshot builder; call `.take()` before passing the pose to `transitionTo(...)`.",
|
|
44448
|
+
'- If you are unsure whether an engine global exists, query it first on the local SDK endpoint, for example `query_wave_api({ query: "DegreesPerSecond" })`, `query_wave_api({ query: "waveMaterial createWater" })`, or `query_wave_api({ query: "Keyboard enum" })`. HTTP Gateway hides/retires skill/API lookup. For asset refs, use `find_wave_assets_by_category` instead of guessing property names.',
|
|
44489
44449
|
"- Good pattern: `cube.keepRotatingAround(Direction.Right).atRateOf(70, DegreesPerSecond).for(50, Seconds).play()`."
|
|
44490
44450
|
].join("\n");
|
|
44491
44451
|
|
|
@@ -44495,7 +44455,7 @@ var WAVE_MCP_CODING_GUARDRAIL = [
|
|
|
44495
44455
|
"1. Author user code for Wave Studio runtime, not engine internals. Do not use sys_*, BaseEngine internals, private fields, underscored members, worker/adapter/debug/store/cache APIs, or generated implementation details.",
|
|
44496
44456
|
"2. Prefer public natural names. Use `Prop`, `Actor`, `Cube`, `Sphere`, etc. instead of `waveProp`, `waveActor`, `waveCube`, `waveSphere` when aliases exist. Drop the `wave` prefix in authored examples.",
|
|
44497
44457
|
"2a. MCP access policy is set by the user in chat. If the user says read-only, inspect only and avoid mutating tools. If no write intent is given, inspect first. If the user says read-write or asks you to edit, run, upload, save, open, create, rename, or delete, use the write tools needed for that task.",
|
|
44498
|
-
'2b. MCP is an agent behavior harness with MECE work modes. Observe = read/inspect/answer only; call read tools directly (session, files, assets, diagnostics, performance, screenshot, snapshots, markers). Operate = direct Studio command with no code/design choice; call concrete tools directly without `start_wave_task` for run preview, hot reload, save/share, exact VFS create/rename/delete, asset upload/rename/delete, new project, project rename, and open project by exact projectId. Author = create/change behavior/content through code/API; call `start_wave_task`, gather evidence, optionally fast-start execute with `nextPhase:"execute"` plus editPlan, then edit. Exact one-file line/text edits can call `edit_wave_file` immediately after route start when exact path and replacement args are present, including `edits:[{startLine,endLine,text}]`; no advance call needed. Diagnose = find root cause first; observe/read first, then transition to Operate or Author when cause and action are clear. General = not concrete Wave work; classify `agent.general`. `query_wave_api`, `edit_wave_file`, `apply_wave_patch`, code.direct_edit, code.semantic_guess_edit, and code.author are route-bound Author/Diagnose work. Direct Operate still keeps safety: exact path/id/path target required for delete/rename/open; resolve project names with `list_wave_projects`, resolve vague file/asset names with list/read tools or ask. If an edit adds code, creates objects, switches API, or chooses a WaveEngine pattern such as placement/layout/material/animation, it is `code.author`, not semantic guess. Fast lanes skip broad lookup, not file safety/verification, and usually skip `query_wave_api` unless exact spelling/signature/value uncertainty remains or an edit failed.',
|
|
44458
|
+
'2b. MCP is an agent behavior harness with MECE work modes. Observe = read/inspect/answer only; call read tools directly (session, files, assets, diagnostics, performance, screenshot, snapshots, markers). Operate = direct Studio command with no code/design choice; call concrete tools directly without `start_wave_task` for run preview, hot reload, save/share, exact VFS create/rename/delete, asset upload/rename/delete, new project, project rename, and open project by exact projectId. Author = create/change Wave behavior/content through code/API; call `start_wave_task`, gather evidence, optionally fast-start execute with `nextPhase:"execute"` plus editPlan, then edit. Exact one-file line/text edits can call `edit_wave_file` immediately after route start when exact path and replacement args are present, including `edits:[{startLine,endLine,text}]`; no advance call needed. Diagnose = find root cause first; observe/read first, then transition to Operate or Author when cause and action are clear. General = not concrete Wave work; classify `agent.general`. Local-SDK `query_wave_api`, `edit_wave_file`, `apply_wave_patch`, code.direct_edit, code.semantic_guess_edit, and code.author are route-bound Author/Diagnose work. Direct Operate still keeps safety: exact path/id/path target required for delete/rename/open; resolve project names with `list_wave_projects`, resolve vague file/asset names with list/read tools or ask. If an edit adds code, creates objects, switches API, or chooses a WaveEngine pattern such as placement/layout/material/animation, it is `code.author`, not semantic guess. Fast lanes skip broad lookup, not file safety/verification, and usually skip local-SDK `query_wave_api` unless exact spelling/signature/value uncertainty remains or an edit failed.',
|
|
44499
44459
|
'2c. Use `code.debug` alone only for diagnose/report-only tasks. For "fix this" or "make the error go away", include both `code.debug` and `code.author` so the same route can diagnose root cause and then edit code.',
|
|
44500
44460
|
`2d. ${WAVE_AUTHORING_CORE_RULES.hotReloadCallbackSafety} The MCP edit tools preflight this rule and the runtime bundler blocks violations before authored code runs. Rewrite to Wave-owned callbacks instead of attempting to bypass the guard.`,
|
|
44501
44461
|
"3. Wave Studio also injects lowercase call-style helpers such as `prop(...)`, `cube(...)`, `sphere(...)`, `ground(...)`. These are Studio-only authoring conveniences, not wave-engine package exports.",
|
|
@@ -44505,7 +44465,7 @@ var WAVE_MCP_CODING_GUARDRAIL = [
|
|
|
44505
44465
|
'4c. For roads, trails, highways, walkways, lanes, bridge decks, waterfalls, or cloth/path strips, route to `wave.geometry.surface-ribbons`: author a live visible `wavePathSurface` with `.along(...)` for centerline+width or `.between(...)` for two rails, then use its methods such as `.snapTo(...)`, `.heightAboveSurface(...)`, `.withDistanceUvs(...)`, and `.withSampleSpacing(...)`. For streaming terrain elements, author a pure spec with `new WavePathSurfaceDefinition("name").along(...)` or `.between(...)` and pass it to `world.surface(name).from(surface)` or `world.water(name).course(surface).depth(...)`; streamed water courses require `.depth(...)`. Do not fake continuous roads by scattering planes/cubes or generating raw mesh buffers when `wavePathSurface` fits.',
|
|
44506
44466
|
"4d. For terrain/world population such as forests, grass, rocks, water, streamed entities, or environmental scatter tied to terrain/streaming surfaces, route to `wave.world.world-elements`: use `scene.world.scatter(...)`/`myScene.world.scatter(...)` for live scene code or `world.scatter(...)` inside `scene.withWorldStreaming(...)` for bootstrap streaming declarations. Prefer fluent verbs like `.renderAs(...)`, `.density(...)`, `.randomScale(...)`, `.colors(...)`, `.linkedTo(...)`, `.usePartitionedLOD(...)`, `.distanceBands(...)`, `.lodModels(...)`, then `.apply()`. Do not hand-roll spawn loops or use local instancing/batching when declarative world scatter fits.",
|
|
44507
44467
|
'4e. For many local repeated model-backed objects such as a fleet, crowd, stars, decorations, or "1000 spaceships", route to `wave.group.instancing-and-batching` and classify per-instance needs before constructors. Use `waveThinBatch` only for visual-only mass sharing one mesh with per-instance transform/color/GPU animation. Use `waveInstanceMesh`, `InstanceMeshGroup`, or scene `waveInstanceGroup` when each copy needs picking, click/hover interaction, labels/tool overlays, visibility toggles, selection, or individual identity. Use real `Prop`/`Actor` entities when each copy needs rigid bodies, gravity, audio, AI, weapons, damage state, independent lifecycle, or rich behavior. Count alone never chooses thin batch; mixed hero/background intent should use a hybrid.',
|
|
44508
|
-
'4e1. For visual-model voxelization, route to `wave.model.voxelization`. Prefer `source.model.voxelizing().relativeSize(0.05).surfaceOnly().onWorkerThread().usingCubes().asThinBatch().applyAsync()` only when async/worker authored code is explicitly acceptable; otherwise use synchronous `onMainThread().apply()` only for tiny local voxel work where blocking is acceptable. Never use Promise chains such as `.apply().then(...)` in authored Studio code because hot-reload safety rejects `.then/.catch/.finally`. Use `relativeSize(ratio)` for model-scale-independent voxel size, `size(value)` only for absolute world units, `usingCubes()`/`usingSpheres()`/`usingCylinders()`/`usingCapsules()` for shape, and the one-shot `voxelize({ size: { mode: "relative", ratio: 0.05, basis: "longestAabbEdge" }, execution: "workerThread", shape: "cube", surfaceOnly: true })` only for serializable recipe code. For thin-batch voxel interactions, use `detectNear(target).within(radius)`, `batchTransform.getColorAt(index)` before color restore, `whenIndexClicked(index => voxelBatch.
|
|
44468
|
+
'4e1. For visual-model voxelization, route to `wave.model.voxelization`. Prefer `source.model.voxelizing().relativeSize(0.05).surfaceOnly().onWorkerThread().usingCubes().asThinBatch().applyAsync()` only when async/worker authored code is explicitly acceptable; otherwise use synchronous `onMainThread().apply()` only for tiny local voxel work where blocking is acceptable. Never use Promise chains such as `.apply().then(...)` in authored Studio code because hot-reload safety rejects `.then/.catch/.finally`. Use `relativeSize(ratio)` for model-scale-independent voxel size, `size(value)` only for absolute world units, `usingCubes()`/`usingSpheres()`/`usingCylinders()`/`usingCapsules()` for shape, and the one-shot `voxelize({ size: { mode: "relative", ratio: 0.05, basis: "longestAabbEdge" }, execution: "workerThread", shape: "cube", surfaceOnly: true })` only for serializable recipe code. For thin-batch voxel interactions, use `detectNear(target).within(radius)`, `batchTransform.getColorAt(index)` before color restore, `whenIndexClicked(index => voxelBatch.at(index).enlargeBy(1.2).done().commitBuffers())`, and `castToProp(index); prop.enablePhysics()` only when a full prop is needed. Do not use removed `voxelizeHeavy`, `voxelize({ voxelSize })`, `withVoxelSize`, `sharedBox`, `atIndex`, or low-level worker/adapter internals in authored scene code.',
|
|
44509
44469
|
"4f. For player/controller movement, route to `wave.physics.kinematic-controller-authoring`: use `waveKinematicActor<TState>` or `netKinematicActor` and actor-level `.asHumanoid(...)`, `.asVehicle(...)`, or `.asFlight(...)` builders. Do not start from `Actor`/`waveActor`, raw input polling, rigid-body forces, per-tick movement loops, or direct `movementController.useFlightScheme(...)` unless the user explicitly asks for low-level component tuning or nearby working code already uses that component-level pattern.",
|
|
44510
44470
|
"4f1. For basic public humanoid locomotion animation, follow the kinematic-obby pattern: `new waveKinematicActor<KinematicHumanoidMovementState>().useModel(models.wave3dFemale)`, then `.asHumanoid({ baseSpeed, jumpForce }).useIdleAnimation(animations.Idle).useWalkingAnimation(animations.Walking).useJumpAnimation(animations.Jump).apply()`. Do not use `animator.addLocalAnimations()`, `getClipNames()`, or `resolveClipName(...)` as the first-choice setup when public `animations.*` refs fit.",
|
|
44511
44471
|
"4g. For obbies/course obstacles, split the intent: the controlled player uses `wave.physics.kinematic-controller-authoring`; static platforms, moving platforms, sliding gates, sweepers, ferries, and hazards use `wave.physics.rigid-body-authoring` on geometry/props with static or kinematic rigid bodies, then transform/animate/current-code motion. Do not use `waveKinematicActor` for a platform unless it is itself player/controller-driven.",
|
|
@@ -44514,36 +44474,36 @@ var WAVE_MCP_CODING_GUARDRAIL = [
|
|
|
44514
44474
|
`4j. ${WAVE_AUTHORING_CORE_RULES.terrainGroundRouting}`,
|
|
44515
44475
|
"5. Use `get_wave_session` and `list_wave_files` to know active file context. `/main.ts` and scene `*/main.ts` get convenience globals: write against `myScene`, not a hand-created scene.",
|
|
44516
44476
|
`6. ${WAVE_AUTHORING_CORE_RULES.assetResolution} In main files, use bare asset maps like \`models.Foo\`, \`gaussianSplats.Room\`, \`textures.Grass\`, \`materials.Wood\`, \`animations.Idle\`, \`audios.Click\`, \`hdr.daylight\`, \`cubeMaps.studio\`, \`fonts.Poppins_Regular\`, \`serializedData.SomeJson\`. Do not add \`ASSET_WAREHOUSE.\` unless raw warehouse access is explicitly needed.`,
|
|
44517
|
-
`6a. For authoring constants, prefer bare runtime globals declared by the Studio authoring environment. Common examples: ${WAVE_AUTHORING_COMMON_GLOBAL_EXAMPLES_TEXT}. The generated globals surface has many more values; use \`query_wave_api\` before inventing namespace-qualified paths such as \`TransformVerbMode.Animate\` in authored code.`,
|
|
44518
|
-
"6b. Asset facade split: passing an existing asset uses typed refs such as `models.X`, `textures.X`, `materials.X`, or `audios.X`; material authoring starts from `waveMaterial`; `assetManager` is reserved for exact low-level generated-asset/asset-pipeline APIs named by a skill or API lookup. Do not use `assetManager` as the default material, asset-ref, or path-surface authoring root.",
|
|
44477
|
+
`6a. For authoring constants, prefer bare runtime globals declared by the Studio authoring environment. Common examples: ${WAVE_AUTHORING_COMMON_GLOBAL_EXAMPLES_TEXT}. The generated globals surface has many more values; use local-SDK \`query_wave_api\` before inventing namespace-qualified paths such as \`TransformVerbMode.Animate\` in authored code. HTTP Gateway hides/retires skill/API lookup.`,
|
|
44478
|
+
"6b. Asset facade split: passing an existing asset uses typed refs such as `models.X`, `textures.X`, `materials.X`, or `audios.X`; material authoring starts from `waveMaterial`; `assetManager` is reserved for exact low-level generated-asset/asset-pipeline APIs named by a local SDK skill or API lookup. Do not use `assetManager` as the default material, asset-ref, or path-surface authoring root.",
|
|
44519
44479
|
'7. Use category-first asset discovery before referencing uploaded user assets, project aliases, or ambiguous built-in assets. Preferred tool: `find_wave_assets_by_category`; aliases: `list_wave_assets_by_category`, `search_wave_assets_by_category`, tolerant `list_wave_assets`. Choose category from user intent first, then query: `list_wave_assets_by_category({ category:"materials", query:"grass", limit:50 })`. For sound use `audios`, for 3D objects use `models`, for sky/HDR use `hdr`, for cube-map sky/environment use `cubeMaps`, for images use `textures`. Category-filtered responses can still be capped/truncated; absence there is not absence in the library. Only use asset refs returned by this tool. If the current code already contains the exact ref and the user asks for a small pattern-preserving edit, you may reuse that visible ref.',
|
|
44520
44480
|
"7a. Use `list_wave_explorer_assets` when you need uploaded asset explorer metadata such as path, URL, size, or display/ref name for rename/delete/library work. It is not a fallback for built-in/public code refs and may be empty while `find_wave_assets_by_category` has many usable refs.",
|
|
44521
44481
|
"8. Wave Studio automations: `project.assetrefs.ts`, `project.scene.ts`, `project.scenes.ts`, and `project.execution.ts` are automatically managed by Wave Studio and are MCP read-only for agents. `bootstrap.ts` / scene `*/bootstrap.ts` is normally managed too. Edit bootstrap only when you can confidently pass `managedFileEditReason` as one of: `world_streaming_or_terrain_provider` (including Google Maps 3D tiles), `render_profile_or_runtime_backend`, `media_consent_or_capture_plan`, `external_ai_or_tts_backend`, `scene_envelope_or_template_baseline`, `baseline_setup_before_user_main`, or `stale_api_update_to_latest`. Never edit bootstrap for `asset_manifest_or_loader`, `instrument_registry`, `scene_registry`, or `execution_manifest`; Studio owns those. Do not edit managed files to register/preload assets, wire scenes, execution order, or force bootstrap sync; write user-authored scene code in `main.ts` or feature modules with bare refs like `models.Robot` or `textures.Grass`, then let Studio sync bootstrap/asset/scene/execution wiring. Hot reload is the normal way to see code changes. If the hot-reload path discovers new asset/bootstrap/scene-surface needs, Studio automatically upgrades the reload tier internally (`patchMain`, `preserveScene`, or hard `rebuildScene`). Only the hard rebuild tier performs a full bundled scene run.",
|
|
44522
44482
|
"9. Use `waveStudio.*` only for Studio host services. Check `waveStudio.capabilities.assetSave` before save/bake calls.",
|
|
44523
|
-
'10. Make deterministic file edits through the simplest fitting tool. Default to forgiving `edit_wave_file`: oldText infers exact replace, startLine/endLine infers line replace, `edits:[{startLine,endLine,text}]` or `edits:[{rangeOffset,rangeLength,text}]` performs one-file multi-edit, and path+text/content with no oldText infers whole-file replace. It is the primary simple edit tool and can omit `baseHash`; Studio resolves the latest hosted VFS mirror contentHash and still applies browser-side stale-write checks. Prefer canonical fields: `path` for file path, `text` for line/whole-file content, and `newText` for text replacement; `filePath`, `replacement`, and `content` are accepted as aliases where useful. Use `apply_wave_patch({ operations: [...] })` for multi-file edits, grouped cross-file edits, unified diffs, or full rewrites; a single bare operation is tolerated for mistake recovery but operations:[...] is preferred. Use `create_wave_file`, `rename_wave_file`, and `delete_wave_file` to split projects into `.ts` modules such as `/actors/player.ts`, `/systems/obstacles.ts`, and `/levels/obby.ts` instead of growing one giant `main.ts`; newly created `.ts/.tsx` files are standalone runnable source roots by default, so top-level scene code in them runs on Run/hot reload. Pass `runnable:false` only for pure helper modules that should not execute on their own. These same VFS tools also create `.html` sketch files for diagrams/charts/docs, with Mermaid rendered from `<div class="mermaid">...</div>` when the HTML file is active in
|
|
44483
|
+
'10. Make deterministic file edits through the simplest fitting tool. Default to forgiving `edit_wave_file`: oldText infers exact replace, startLine/endLine infers line replace, `edits:[{startLine,endLine,text}]` or `edits:[{rangeOffset,rangeLength,text}]` performs one-file multi-edit, and path+text/content with no oldText infers whole-file replace. It is the primary simple edit tool and can omit `baseHash`; Studio resolves the latest hosted VFS mirror contentHash and still applies browser-side stale-write checks. Prefer canonical fields: `path` for file path, `text` for line/whole-file content, and `newText` for text replacement; `filePath`, `replacement`, and `content` are accepted as aliases where useful. Use `apply_wave_patch({ operations: [...] })` for multi-file edits, grouped cross-file edits, unified diffs, or full rewrites; a single bare operation is tolerated for mistake recovery but operations:[...] is preferred. Use `create_wave_file`, `rename_wave_file`, and `delete_wave_file` to split projects into `.ts` modules such as `/actors/player.ts`, `/systems/obstacles.ts`, and `/levels/obby.ts` instead of growing one giant `main.ts`; newly created `.ts/.tsx` files are standalone runnable source roots by default, so top-level scene code in them runs on Run/hot reload. Pass `runnable:false` only for pure helper modules that should not execute on their own. These same VFS tools also create `.html` sketch files for diagrams/charts/docs, with Mermaid rendered from `<div class="mermaid">...</div>` when the HTML file is active in the editor/coding pane; HTML sketches must never replace the live engine preview iframe. Scene-root modules and their owned helpers run inside the Studio authoring context, but helpers should stay pure or parameterized. Studio hot reload targets the active/open edited file when safe: `/main.ts` reloads the whole main graph, scene-root modules reload that root, and bootstrap/scene registry/assets/network/ambiguous helper surfaces escalate. Standalone `hot_reload_wave_preview` has no target path and follows the currently open/active Studio editor file in multi-file projects. A feature file should own the objects, callbacks, promoted GLB parts, and appearance mutations it wants to iterate on. For intentional live entity reuse across modules, the owner calls `waveStudio.exportEntity("Name", entity)` and importers call `waveStudio.importEntity<T>("Name")`; do not pass live entities through shared helper exports. Use exact VFS paths from `list_wave_files`; read target file before writing. `contentHash` is a cooperative stale-write fingerprint, not a security boundary. For advanced compact `apply_wave_patch` operations, pass the latest full-file `contentHash` as `baseHash`: one `lineEdits`, one `textEdits`, one strict `searchReplace`, or one `unifiedDiff`. Do not send multiple compact ops for the same file with the same baseHash; the first edit changes the file hash and later compact ops skip as stale. Scoped `read_wave_file` line ranges do not change the `textEdits` offset base; they do pair naturally with line-based edits. Existing-file `writeFile` requires `baseHash` unless `forceOverwrite: true`; force overwrite is only for intentional stale overwrites.',
|
|
44524
44484
|
"10a. Always inspect `changedFiles`, `changedPaths`, `partial`, `skippedOperations`, `hotReloadRequested`, `hotReloadSkippedReason`, and `runtimeVerification`; treat skipped operations, no-content-change skips, unscheduled hot reloads, runtime verification errors, and `runtimeVerification.diagnostics.editorErrorCount > 0` as work still needing attention.",
|
|
44525
|
-
"11. After the final code edit, default to hot reload. Prefer `awaitHotReload: true` on the edit tool when you want one MCP response with edit result + hot reload + bounded diagnostics.
|
|
44526
|
-
'12. After run/hot reload, use returned `runtimeVerification` when
|
|
44485
|
+
"11. After the final code edit, default to hot reload. Prefer `awaitHotReload: true` on the edit tool when you want one MCP response with edit result + hot reload + bounded diagnostics. `requestHotReload:true` also waits for diagnostics by default unless paired with `awaitHotReload:false`. Standalone `run_wave_preview` / `hot_reload_wave_preview` also wait by default and return `runtimeVerification`; set `awaitRuntimeResult:false` only for intentional fire-and-poll. Caveat: standalone `hot_reload_wave_preview` mirrors the toolbar button and reloads the currently open/active TypeScript file in multi-file projects; it does not take a target path or reload every user-created .ts module. That hot-reload request may internally upgrade from `patchMain` to `preserveScene` or hard `rebuildScene` when assets/bootstrap/scene surface changed; do not manually force bootstrap sync. Use `run_wave_preview` only when diagnostics show no successful preview yet (`hasRunSucceeded: false`), the user explicitly asks for a full run/restart, or hot reload/polling fails and a full restart is the last resort. `pause_wave_preview` and `resume_wave_preview` are direct preview controls mirroring the toolbar pause/resume buttons.",
|
|
44486
|
+
'12. After run/hot reload, use returned `runtimeVerification` when present; otherwise call `get_wave_runtime_diagnostics` repeatedly until `runtimeBusy` is false and `lastRuntimeOutcome` is `success` or `error`. Use `previewExecutionPhase` to distinguish Studio preparing work from the preview iframe executing it. `isRunning` is only the Studio scheduling flag, not the final runtime completion gate. If the edit/runtime tool returned `requestedAt` or `runtimeActionRequestedAt`, ignore diagnostics whose `lastRuntimeOutcomeAt` is older than that timestamp. Treat `latestError` as current only when `lastRuntimeOutcome` is `error`; older error lines can remain in returned logs as history. Treat `editorErrorCount > 0` as blocking Monaco/linter/compile failure and read `editorDiagnostics` before claiming success, even when `lastRuntimeOutcome` is `success`. If `lastRuntimeOutcome` is `success` and `editorErrorCount` is 0, verify visually with `capture_wave_screenshot({ resolution: "L" })` or structurally with `get_wave_runtime_entity_snapshot({ variableName, filePath? })` instead of declaring failure from old log text. Same-machine screenshots usually return `localPath`; hosted screenshots return exact field `dataBase64`, not `imageBase64`.',
|
|
44527
44487
|
"12a. Marker waypoint workflow: when the human asks to use preview marking tools such as `clickToMark()`, route with `marker.use` plus the code/project intent, then call `list_wave_runtime_markers`. Treat marker records as runtime observation data, write marker `worldPosition`/`worldRotation` into the appropriate path/waypoint/placement code, hot reload, and verify with screenshot or marker re-read. One marker read may happen before routing only when needed to decide the code intent. Use path/placement skills only when current code does not reveal the marker-to-code pattern.",
|
|
44528
44488
|
`13. To use locally generated assets in code, prefer \`create_wave_asset_upload\` for local files when available: pass assetKind from the Wave Studio upload policy SSOT (${getWaveStudioBridgeAssetUploadKindHelpText()}), stat the file first, pass exact byte size, get \`uploadUrl\` + \`uploadHeaders\`, upload raw bytes with plain HTTP PUT using every returned header exactly, keep \`clientToken\`/\`uploadHeaders.Authorization\` out of logs, call \`get_wave_asset_upload_status\` until \`receivedBytes === sizeBytes\`, then call \`commit_wave_asset_upload\` with the same uploadId, assetKind, filename, contentType, and sizeBytes from the create response. No local Python, Vercel package, or Blob SDK is required. On hosted MCP this uses hosted temporary object storage; on same-machine local MCP it uses the local SDK as temporary staging. If direct upload is unavailable, use \`stage_wave_asset_upload_chunk\` plus \`commit_wave_asset_chunk_upload\`: omit uploadId only for chunkIndex 0, then reuse the returned uploadId for every later chunk and for commit. Use \`upload_wave_asset\` with exactly one of \`dataBase64\` or \`dataUrl\` only for small inline assets. If staging is abandoned before commit, call \`abort_wave_asset_upload\` with the uploadId. Do not abort after commit returns pending or completed; the Studio browser cleans committed staging after execution. Hosted MCP cannot read local filesystem paths through inline upload. All flows stage bytes outside the command queue, cap staged bytes at 300 MB, and return \`asset.bareRef\`, for example \`textures.Albedo\`, \`cubeMaps.Studio\`, \`materials.Wood\`, \`audios.Click\`, \`models.Robot\`, \`animations.Run\`, \`fonts.Title\`, or \`serializedData.Config\`. If the name already exists, the upload result returns \`skipped: true\` and the existing asset. Staged chunks/blobs are also swept lazily after about 24 hours. Model-family uploads enable meshoptimizer by default unless \`useMeshoptimizer\` is false.`,
|
|
44529
|
-
"14. Project tools: use `list_wave_project_templates` before `new_wave_project({ templateId? })`; use `list_wave_projects` before `
|
|
44489
|
+
"14. Project tools: use `list_wave_project_templates` before `new_wave_project({ templateId? })`; use `list_wave_projects` before `rename_wave_project({ projectId, name })` or `open_wave_project({ projectId })`. Use `read_wave_project` to learn from example packs without replacing the current editor workspace: pass exact `projectId` from `list_wave_projects` for listed/saved projects, or pass a shared/published project `url` directly for silent URL reads. Shared URL reads support old `/waveStudio?share=<uuid>` links and new shared alias links; published URL reads support old/new `/p/<user>/<id>` links. Rename updates saved project display metadata only. New/open replace the live workspace. If there are unsaved changes they return `unsaved_changes` unless you save first or explicitly pass `discardUnsavedChanges: true`; only use exact ids returned by list tools for open/rename.",
|
|
44530
44490
|
"15. `save_wave_project` quick-saves an existing saved project and ignores name/description. For a new unsaved project, pass name/description when available; otherwise Studio generates defaults and returns whether each field was defaulted.",
|
|
44531
44491
|
"16. `share_wave_project` runs the same Share Project menu pipeline, returns a 30-day share `url`, and requires write pairing plus the signed-in share policy. Always send the returned `url` back to the user.",
|
|
44532
44492
|
"17. `rename_wave_asset` changes the uploaded asset display/ref name only; it does not move the stored blob path. Re-list assets before writing code with the new ref.",
|
|
44533
44493
|
"18. `delete_wave_asset` is destructive. Use an exact path returned by `list_wave_explorer_assets` and do not guess asset paths.",
|
|
44534
44494
|
'19. Only poll `get_wave_command_result` when the previous tool response actually contains `{ status: "pending", requestId }`. HTTP Gateway browser-backed tools may return pending and must be polled until final result, failure, or cancellation. WaveEngine Agent SDK browser-backed tools normally wait directly and return final results; its `get_wave_command_result` is catalog parity unless a pending result was explicitly returned. If Wave Studio sleeps, a stale leased hosted command can be requeued and remain pending; keep polling instead of declaring it lost.',
|
|
44535
|
-
"20. HTTP Gateway
|
|
44495
|
+
"20. HTTP Gateway MCP_TOKEN values use a 12-hour idle timeout. Each successful HTTP Gateway MCP/HTTP request extends the gateway bearer and paired MCP Session lifetime. WaveEngine Agent SDK live tools can keep working after handoff, but HTTP Gateway operations still need a non-expired gateway bearer. Hidden-tab sleep, browser hibernation, or memory-saver reload should resume the same MCP Session when possible; only the explicit Stop Session control intentionally closes it.",
|
|
44536
44496
|
"21. Proactively recommend at most one relevant Studio capability when it helps the user continue or verify: screenshot for visual changes, runtime entity snapshot for live transform/state, runtime markers for clicked waypoints, performance snapshot for FPS/heap/scene weight, asset tools for asset tasks, or project share/save/open for project workflow. Keep it contextual and do not dump a menu."
|
|
44537
44497
|
].join("\n");
|
|
44538
44498
|
var WAVE_MCP_CODING_GUARDRAIL_SUMMARY = [
|
|
44539
44499
|
"Wave Studio MCP compact guardrails:",
|
|
44540
44500
|
"1. Author WaveStudio user code only; avoid engine internals, private fields, generated implementation details, and low-level sys_/worker/store APIs.",
|
|
44541
44501
|
"2. Use exact listed MCP tool names only. `studio.*` names are families, not tools. There is no `get_wave_current_project`; use `get_wave_session` for current project/session/active-file context.",
|
|
44542
|
-
"3. Choose MECE work mode before tools: Observe reads directly; Operate direct Studio commands directly; Author/Diagnose route with `start_wave_task`; General avoids Wave tools. Operate examples: run project -> `run_wave_preview`, hot reload/refresh preview -> `hot_reload_wave_preview`, save/persist -> `save_wave_project`, rename saved project -> `rename_wave_project`, exact file create/delete/rename -> VFS operation, marker/FPS/screenshot reads -> Observe tools. Author examples: make/change/fix behavior, choose APIs, add scene objects, or edit existing code -> route, read context, skill/API lookup only as needed, advance, edit, verify. Diagnose-only uses `code.debug`; bug-fix uses `code.debug` plus `code.author`. Direct Operate exact-target rule: never invent paths, asset paths, or project ids; list/read/ask first.",
|
|
44502
|
+
"3. Choose MECE work mode before tools: Observe reads directly; Operate direct Studio commands directly; Author/Diagnose route with `start_wave_task`; General avoids Wave tools. Operate examples: run project -> `run_wave_preview`, hot reload/refresh preview -> `hot_reload_wave_preview`, save/persist -> `save_wave_project`, rename saved project -> `rename_wave_project`, exact file create/delete/rename -> VFS operation, marker/FPS/screenshot reads -> Observe tools. Author examples: make/change/fix behavior, choose APIs, add scene objects, or edit existing code -> route, read context, local SDK skill/API lookup only as needed, advance, edit, verify. Diagnose-only uses `code.debug`; bug-fix uses `code.debug` plus `code.author`. Direct Operate exact-target rule: never invent paths, asset paths, or project ids; list/read/ask first.",
|
|
44543
44503
|
"3a. If the request is irrelevant or too broad for one concrete Wave milestone, classify `agent.general`, do not force Wave tools, and politely guide the user back to a scoped project/code/asset/debug/runtime/visual task.",
|
|
44544
44504
|
"4. Prefer natural, intent-preserving public APIs and aliases such as Actor, Prop, Cube, Sphere, waveMaterial, semantic directions, Animate/Seconds/DegreesPerSecond, and fluent WaveEngine DSLs.",
|
|
44545
44505
|
`4a. ${WAVE_AUTHORING_CORE_RULES.hotReloadCallbackSafety} edit_wave_file/apply_wave_patch/create_wave_file preflight this rule and runtime bundling blocks violations before authored code runs.`,
|
|
44546
|
-
"4b. For model voxelization, route to `wave.model.voxelization`; use `model.voxelizing().relativeSize(0.05).surfaceOnly().onWorkerThread().usingCubes().asThinBatch().applyAsync()` only when async/worker authored code is explicitly acceptable, or `onMainThread().apply()` only for tiny local synchronous voxel work. Never use `.apply().then(...)` or Promise callback chains. Use `detectNear`, `getColorAt`, and `whenIndexClicked(
|
|
44506
|
+
"4b. For model voxelization, route to `wave.model.voxelization`; use `model.voxelizing().relativeSize(0.05).surfaceOnly().onWorkerThread().usingCubes().asThinBatch().applyAsync()` only when async/worker authored code is explicitly acceptable, or `onMainThread().apply()` only for tiny local synchronous voxel work. Never use `.apply().then(...)` or Promise callback chains. Use `detectNear`, `getColorAt`, and `whenIndexClicked(index => voxelBatch.at(index).enlargeBy(1.2).done().commitBuffers())` for thin-batch voxel interaction. Do not use `voxelizeHeavy`, `voxelize({ voxelSize })`, `withVoxelSize`, `sharedBox`, or stale `atIndex`.",
|
|
44547
44507
|
"5. Resolve assets explicitly. Use category-first bare refs returned by `find_wave_assets_by_category` or alias `list_wave_assets_by_category`: models.X, textures.X, materials.X, audios.X, hdr.X, animations.X. Do not guess refs, raw paths, or infer absence from a capped list.",
|
|
44548
44508
|
"6. `project.assetrefs.ts`, `project.scene.ts`, `project.scenes.ts`, and `project.execution.ts` are Studio-managed read-only. `bootstrap.ts` is normally managed too; edit it only with a confident `managedFileEditReason` for world streaming/terrain provider, render/runtime backend, media consent/capture, external AI/TTS backend, scene/template baseline, pre-main baseline setup, or stale bootstrap API update to latest. Never edit bootstrap for asset loaders/manifests, instruments, scene registry, or execution manifest.",
|
|
44549
44509
|
"7. Use safest VFS tool: read first, default to edit_wave_file for small one-file edits, let it auto-resolve baseHash, use apply_wave_patch({ operations }) with explicit baseHash for grouped/advanced work, and inspect skips/partials.",
|
|
@@ -44555,7 +44515,7 @@ var WAVE_MCP_CODING_GUARDRAIL_SUMMARY = [
|
|
|
44555
44515
|
"13. Poll `get_wave_command_result` only after a tool returns pending/requestId, then poll runtime diagnostics until runtimeBusy is false and the latest outcome is success or error; require `editorErrorCount === 0` before reporting clean code, then verify with screenshot or runtime snapshot.",
|
|
44556
44516
|
"14. For uploads, prefer create_wave_asset_upload -> direct PUT with all returned headers -> status -> commit. Use chunk staging only as fallback and abort abandoned staging.",
|
|
44557
44517
|
"15. Project open/new replace the workspace; save first or pass explicit discard for unsaved changes. Asset delete is permanent and requires exact explorer path.",
|
|
44558
|
-
"16.
|
|
44518
|
+
"16. HTTP Gateway MCP_TOKEN values have a 12-hour idle timeout extended by successful agent requests; closed/killed browser tabs can end the session.",
|
|
44559
44519
|
"17. Escalate to full guidance before acting when the task is unfamiliar, cross-family, destructive, persistent, asset/upload/project/export related, bootstrap/config related, runtime-verification sensitive, or when current code has no obvious pattern.",
|
|
44560
44520
|
"18. Escalate after tool friction: skipped/partial edits, stale hashes, ambiguous replacements, pending/expired commands, diagnostics errors, unclear asset refs, API uncertainty, or repeated query loops.",
|
|
44561
44521
|
"19. Suggest at most one relevant Studio tool when useful: screenshot, runtime snapshot, markers, performance, assets, or project share/save/open. No tool menu spam.",
|
|
@@ -44585,7 +44545,7 @@ var WAVE_MCP_EDIT_RECIPES = [
|
|
|
44585
44545
|
"Large rewrite or generated module:",
|
|
44586
44546
|
'- Existing file: `apply_wave_patch({ operations: [{ type: "writeFile", path, baseHash, content }] })` if you have the latest hash; use `forceOverwrite: true` only for intentional stale overwrite.',
|
|
44587
44547
|
'- New runnable scene file: `create_wave_file({ path: "/systems/name.ts", content, awaitHotReload: true })`. New `.ts/.tsx` files are standalone runnable source roots by default, so top-level scene code in them runs on Run/hot reload without editing `project.execution.ts`. Pass `runnable:false` only for pure helper modules; then import helper functions normally from a runnable scene file.',
|
|
44588
|
-
'- HTML sketch file: `create_wave_file({ path: "/docs/diagram.html", content })` for diagrams/charts/lightweight docs. For Mermaid, put source in `<div class="mermaid">...</div>`;
|
|
44548
|
+
'- HTML sketch file: `create_wave_file({ path: "/docs/diagram.html", content })` for diagrams/charts/lightweight docs. For Mermaid, put source in `<div class="mermaid">...</div>`; the editor/coding pane renders active `.html` files and auto-loads Mermaid when `class="mermaid"` is present. HTML sketches must never replace the live engine preview iframe.',
|
|
44589
44549
|
"",
|
|
44590
44550
|
"Preview verification:",
|
|
44591
44551
|
"- Default after code changes: hot reload. Let Studio choose the internal reload tier. Use `run_wave_preview` only for first start/full restart or as last resort when hot reload does not complete correctly.",
|
|
@@ -44616,17 +44576,17 @@ var WAVE_MCP_FILE_CONTEXT_GUIDE = [
|
|
|
44616
44576
|
"- Normal scene edit path: use the active `*/main.ts`, write against `myScene`, use bare asset refs, and do not edit Studio-managed generated files.",
|
|
44617
44577
|
"- Studio-managed generated files are MCP read-only for agents: `project.assetrefs.ts`, `project.scene.ts`, `project.scenes.ts`, and `project.execution.ts`. `bootstrap.ts` / scene `*/bootstrap.ts` is normally Studio-managed too; edit it only when you can confidently pass `managedFileEditReason` as one of: `world_streaming_or_terrain_provider`, `render_profile_or_runtime_backend`, `media_consent_or_capture_plan`, `external_ai_or_tts_backend`, `scene_envelope_or_template_baseline`, `baseline_setup_before_user_main`, `stale_api_update_to_latest`. Never edit bootstrap for assets/loaders, instruments, scene registry, or execution manifest; Studio owns those.",
|
|
44618
44578
|
"- `main.ts` / scene `*/main.ts`: user scene authoring code. Prefer `myScene` for the active scene. Also available: `assetManager`, `waveEngine`, `waveStudio`, `models`, `gaussianSplats`, `fbxModels`, `animations`, `materials`, `guis`, `textures`, `audios`, `instruments`, `videos`, `hdr`, `cubeMaps`, `generatedModels`, `fonts`, `serializedData`, `terrains`, `fx`, `particles`.",
|
|
44619
|
-
`- Studio also injects many authoring constants/functions as bare globals. ${WAVE_AUTHORING_BARE_GLOBALS_RULE} Do not add imports or guessed namespaces. Treat listed globals as examples and use \`query_wave_api\` for the complete generated authoring surface.`,
|
|
44579
|
+
`- Studio also injects many authoring constants/functions as bare globals. ${WAVE_AUTHORING_BARE_GLOBALS_RULE} Do not add imports or guessed namespaces. Treat listed globals as examples and use local-SDK \`query_wave_api\` for the complete generated authoring surface. HTTP Gateway hides/retires skill/API lookup.`,
|
|
44620
44580
|
"- Project code does not need to live in one monolith. Use `create_wave_file`, `rename_wave_file`, and `delete_wave_file` for VFS `.ts` modules and folders, for example `/actors/player.ts` or `/systems/movingPlatforms.ts`. New `.ts/.tsx` files are runnable source roots by default, so top-level scene code in them runs on Run/hot reload; pass `runnable:false` only for pure helper modules that should not execute on their own.",
|
|
44621
|
-
'- Studio VFS also supports non-code `.html` sketch files. Use `create_wave_file({ path: "/docs/diagram.html", content })` for Mermaid diagrams, charts, and lightweight docs; put Mermaid source inside `<div class="mermaid">...</div>`, not markdown fences. When that `.html` file is active,
|
|
44581
|
+
'- Studio VFS also supports non-code `.html` sketch files. Use `create_wave_file({ path: "/docs/diagram.html", content })` for Mermaid diagrams, charts, and lightweight docs; put Mermaid source inside `<div class="mermaid">...</div>`, not markdown fences. When that `.html` file is active, the editor/coding pane renders it as an HTML sketch and auto-loads Mermaid if `class="mermaid"` is present. HTML sketches must never replace the live engine preview iframe.',
|
|
44622
44582
|
"- `list_wave_files` and `read_wave_file` return a full-file `contentHash`. Primary simple edit tool `edit_wave_file` can omit `baseHash`; Studio resolves the latest mirror hash and still performs browser-side stale-write checks. It accepts `edits:[{startLine,endLine,text}]` or `edits:[{rangeOffset,rangeLength,text}]` for one-file multi-edits. Use explicit `baseHash` for advanced `apply_wave_patch({ operations: [...] })` compact operations (`lineEdits`, `textEdits`, strict `searchReplace`, or `unifiedDiff`) and existing-file `writeFile` unless `forceOverwrite: true`. This hash is a cooperative stale-write check, not a security boundary. Prefer forgiving `edit_wave_file` over full-file `writeFile` when only a small span changes. Stale hashes and ambiguous replacements are skipped instead of guessed. `textEdits` offsets are zero-based UTF-16 offsets in the full file, even if you used a scoped line read; line edits use 1-based full-file line numbers. Scoped reads and line edits clamp oversized endLine to lineCount but still reject startLine beyond the file. If you need multiple compact changes in one file, use `edit_wave_file({ path, edits:[...] })` or combine them into one advanced patch operation; re-read between separate operations.",
|
|
44623
44583
|
"- Main-file asset refs should be bare: `models.Car`, `gaussianSplats.Room`, `textures.Grass`, `materials.Metal`, `animations.Idle`. Omit `ASSET_WAREHOUSE.` for authored code.",
|
|
44624
|
-
"- Asset facade split: existing asset inputs use typed refs; material authoring starts from `waveMaterial`; `assetManager` is for explicit generated-asset/asset-pipeline APIs named by a skill or API lookup, not the default place to invent new material or asset code.",
|
|
44584
|
+
"- Asset facade split: existing asset inputs use typed refs; material authoring starts from `waveMaterial`; `assetManager` is for explicit generated-asset/asset-pipeline APIs named by a local SDK skill or API lookup, not the default place to invent new material or asset code.",
|
|
44625
44585
|
"- Use `find_wave_assets_by_category({ category, query?, limit? })` to inspect the current live asset surface. Fill category from user intent first. It includes public assets, uploaded user assets, and project aliases, with `source` telling where each ref came from.",
|
|
44626
44586
|
"- Wave Studio auto-maintains bootstrap/project asset/scene wiring for normal `main.ts` edits. Do not write or modify bootstrap or generated project registry files just to make an asset ref or scene entry available; use the returned bare refs in main code and let Studio sync boot/assets/scenes. Hot reload is the default preview path after code edits and can automatically upgrade its internal tier when new assets or bootstrap-surface changes require it.",
|
|
44627
44587
|
'- Wave Studio auto-binds top-level VFS entity variables to runtime refs during run/hot reload. Use `get_wave_runtime_entity_snapshot({ variableName: "amy", filePath?: "/main.ts" })` to query live transform data; if ambiguous, retry with a returned `runtimeRef`.',
|
|
44628
44588
|
"- Use `create_wave_asset_upload` for generated local asset files when available, upload bytes with plain HTTP PUT to the returned `uploadUrl` using every `uploadHeaders` entry exactly, keep `clientToken`/`Authorization` out of logs, verify `receivedBytes` with `get_wave_asset_upload_status`, then `commit_wave_asset_upload` with the create response metadata and use the returned bare ref like `textures.Albedo`, `cubeMaps.Studio`, `materials.Wood`, `audios.Click`, or `models.Robot` in code. If direct upload is unavailable, use `stage_wave_asset_upload_chunk` plus `commit_wave_asset_chunk_upload`: omit uploadId only on chunkIndex 0, then reuse the returned uploadId for all later chunks and commit. Use `upload_wave_asset` only for small inline base64/data URL assets. Call `abort_wave_asset_upload` only if a staged upload will not be committed. Existing names are idempotent and return `skipped: true`.",
|
|
44629
|
-
"- Use `list_wave_project_templates()` then `new_wave_project({ templateId?, discardUnsavedChanges? })` to start a new unsaved workspace from a template. Use `list_wave_projects()` then `read_wave_project({ projectId })` to inspect
|
|
44589
|
+
"- Use `list_wave_project_templates()` then `new_wave_project({ templateId?, discardUnsavedChanges? })` to start a new unsaved workspace from a template. Use `read_wave_project({ url })` to silently inspect shared/published links without opening them; this supports old/new shared links and old/new published links. Use `list_wave_projects()` then `read_wave_project({ projectId })` to inspect listed project code without opening it, `rename_wave_project({ projectId, name })` to update saved project display metadata, or `open_wave_project({ projectId, discardUnsavedChanges? })` to replace the live workspace. If the user gives a project name, resolve the exact projectId with `list_wave_projects`; do not pass guessed names as ids. New/open replace the live workspace; save first when needed. If dirty, these tools fail with `unsaved_changes` unless discard is explicit.",
|
|
44630
44590
|
"- Use `save_wave_project({ name?, description? })` to persist the live project. Existing saved projects quick-save with current metadata. New projects use provided metadata or generated defaults.",
|
|
44631
44591
|
"- Use `share_wave_project()` to create a 30-day share link for the current live project through the same Share Project menu pipeline, then return the `url` to the user.",
|
|
44632
44592
|
"- Use `list_wave_explorer_assets` to inspect the uploaded asset explorer library with paths, URLs, display names, and ref keys. `rename_wave_asset` changes the display/ref name only; it does not move the stored blob path.",
|
|
@@ -44641,7 +44601,7 @@ var WAVE_MCP_STUDIO_SKILL_MAP_GUIDE = [
|
|
|
44641
44601
|
"Core rule: skills are the map; MCP tools are the buttons. `studio.vfs`, `studio.assets`, and friends are not callable tool names. Choose a `studio.*` family to narrow intent, then call the concrete MCP tool listed under it.",
|
|
44642
44602
|
"",
|
|
44643
44603
|
"Namespace split:",
|
|
44644
|
-
"- `wave.*`: WaveEngine code-authoring knowledge: families, skill cards, public authoring objects, one-shot calls, fluent builders, callbacks, globals, and scene APIs. Use `code.direct_edit` for exact power-user code commands, `code.semantic_guess_edit` only for changing an existing visible API call/argument/literal/value, and `list_wave_skill_families` -> selected family ids -> `query_wave_skills({ families/familyId, query })` -> `get_wave_skill` for normal uncertain authoring direction; use local-SDK `query_wave_api` for exact symbols/signatures/globals after direction is known. HTTP Gateway hides/retires cloud API lookup.",
|
|
44604
|
+
"- `wave.*`: WaveEngine code-authoring knowledge: families, skill cards, public authoring objects, one-shot calls, fluent builders, callbacks, globals, and scene APIs. Use `code.direct_edit` for exact power-user code commands, `code.semantic_guess_edit` only for changing an existing visible API call/argument/literal/value, and local-SDK `list_wave_skill_families` -> selected family ids -> `query_wave_skills({ families/familyId, query })` -> `get_wave_skill` for normal uncertain authoring direction; use local-SDK `query_wave_api` for exact symbols/signatures/globals after direction is known. HTTP Gateway hides/retires cloud skill/API lookup.",
|
|
44645
44605
|
"- `studio.*`: WaveStudio product operations around that code: sessions, VFS, assets, project state, preview, capture, export, and MCP policy.",
|
|
44646
44606
|
"- Work modes: Observe reads directly, Operate calls concrete Studio commands directly, Author/Diagnose routes through `start_wave_task`, General avoids Wave tools. Direct Operate still requires exact paths/asset paths/project ids for destructive or replacing actions.",
|
|
44647
44607
|
"",
|
|
@@ -44650,14 +44610,14 @@ var WAVE_MCP_STUDIO_SKILL_MAP_GUIDE = [
|
|
|
44650
44610
|
"- `studio.vfs`: live project files, including `.ts` modules and `.html` sketches/Mermaid diagrams. Tools: `list_wave_files`, `read_wave_file`, primary edit `edit_wave_file`, advanced grouped edit `apply_wave_patch`, and file management `create_wave_file`, `rename_wave_file`, `delete_wave_file`.",
|
|
44651
44611
|
"- `studio.assets`: asset resolution, code-safe refs, uploads, and uploaded asset library management. Tools: `find_wave_assets_by_category` (aliases: `list_wave_assets_by_category`, `search_wave_assets_by_category`, `list_wave_assets`), `list_wave_explorer_assets`, `upload_wave_asset`, `create_wave_asset_upload`, `get_wave_asset_upload_status`, `commit_wave_asset_upload`, `stage_wave_asset_upload_chunk`, `commit_wave_asset_chunk_upload`, `abort_wave_asset_upload`, `rename_wave_asset`, `delete_wave_asset`.",
|
|
44652
44612
|
"- `studio.project`: workspace/project lifecycle. Tools: `list_wave_project_templates`, `new_wave_project`, `list_wave_projects`, `read_wave_project`, `rename_wave_project`, `open_wave_project`, `save_wave_project`, `share_wave_project`.",
|
|
44653
|
-
"- `studio.preview`: execution control and structured runtime state/performance. Tools: `hot_reload_wave_preview` (alias `hotreload_wave_preview`), `run_wave_preview` (alias `run_project`), `get_wave_runtime_diagnostics` (alias `get_wave_errors`), `get_wave_runtime_performance_snapshot` (alias `get_wave_runtime_performance`), `get_wave_command_result`.",
|
|
44613
|
+
"- `studio.preview`: execution control and structured runtime state/performance. Tools: `hot_reload_wave_preview` (alias `hotreload_wave_preview`), `run_wave_preview` (alias `run_project`), `pause_wave_preview` (alias `pause_wave_engine`), `resume_wave_preview` (alias `resume_wave_engine`), `get_wave_runtime_diagnostics` (alias `get_wave_errors`), `get_wave_runtime_performance_snapshot` (alias `get_wave_runtime_performance`), `get_wave_command_result`.",
|
|
44654
44614
|
"- `studio.capture`: visual and entity/marker observation. Tools: `capture_wave_screenshot` (alias `get_wave_screenshot`), `get_wave_runtime_entity_snapshot` (alias `get_wave_entity_snapshot`), `list_wave_runtime_markers` (alias `list_wave_markers`).",
|
|
44655
44615
|
"- `studio.export`: publish/package/model/3D-print output workflows. Project sharing lives in `studio.project` through `share_wave_project`. There is no callable `studio.export` MCP tool today; current export work is partly authored through concrete `waveStudio.save*` runtime APIs, and future concrete MCP export tools should live here.",
|
|
44656
44616
|
"",
|
|
44657
44617
|
"Common mixed workflow:",
|
|
44658
44618
|
"1. Use `studio.vfs` tools to read/edit code.",
|
|
44659
|
-
"2. For exact receiver/method/action commands, use `code.direct_edit`. For changing an existing visible call/value only, use `code.semantic_guess_edit`. For unseen, ambiguous, new-code, API-switching, layout/placement/material/animation, or cross-family work, use `code.author` plus `list_wave_skill_families` -> choose families -> `query_wave_skills({ families/familyId, query })` -> `get_wave_skill`. Never raw-query the skill corpus with the full user request.",
|
|
44660
|
-
"3. Use local-SDK `query_wave_api` only after current-code or skill routing when exact method/global/API facts are uncertain. HTTP Gateway is not
|
|
44619
|
+
"2. For exact receiver/method/action commands, use `code.direct_edit`. For changing an existing visible call/value only, use `code.semantic_guess_edit`. For unseen, ambiguous, new-code, API-switching, layout/placement/material/animation, or cross-family work, use `code.author` plus local-SDK `list_wave_skill_families` -> choose families -> `query_wave_skills({ families/familyId, query })` -> `get_wave_skill`. Never raw-query the skill corpus with the full user request.",
|
|
44620
|
+
"3. Use local-SDK `query_wave_api` only after current-code or skill routing when exact method/global/API facts are uncertain. HTTP Gateway is not a skill/API lookup path.",
|
|
44661
44621
|
"4. Use `studio.assets` to resolve exact refs before writing `models.X`, `textures.X`, `materials.X`, `audios.X`, or other asset-map inputs that are not already visible in current code.",
|
|
44662
44622
|
"5. Use `studio.preview` to hot reload by default.",
|
|
44663
44623
|
"6. Use `studio.capture` to prove the result with one relevant tool: an `L` screenshot for visual changes, runtime entity snapshot for live transform/state, or `list_wave_runtime_markers` for clickToMark/world marker poses.",
|
|
@@ -44669,23 +44629,23 @@ var WAVE_MCP_STUDIO_SKILL_MAP_GUIDE = [
|
|
|
44669
44629
|
var WAVE_MCP_STUDIO_TOOL_GUIDE = [
|
|
44670
44630
|
"Wave Studio runtime and MCP tool guide:",
|
|
44671
44631
|
"- First choose a `studio.*` family for product operations, then call the concrete MCP tool. See `wave://studio-skill-map` for the concise family-to-tool router.",
|
|
44672
|
-
"- Use MECE work modes before tools: Observe reads directly; Operate direct Studio commands directly; Author/Diagnose route with `start_wave_task`; General avoids Wave tools. Direct Operate includes run/hot reload, save/share, exact VFS create/rename/delete, asset upload/rename/delete, new project, project rename, and open project by exact projectId. Use `wave.*`
|
|
44673
|
-
"- MCP names: HTTP Gateway = Next/Vercel endpoint for remote/sandbox Studio operations; WaveEngine Agent SDK = same-machine live MCP transport from long-running `wave3d-agent-sdk start`; WaveEngine SDK Cache = package-bundled local skill/API docs retrieval; VFS Mirror = HTTP Gateway workspace snapshot. Do not confuse these modules.",
|
|
44632
|
+
"- Use MECE work modes before tools: Observe reads directly; Operate direct Studio commands directly; Author/Diagnose route with `start_wave_task`; General avoids Wave tools. Direct Operate includes run/hot reload, save/share, exact VFS create/rename/delete, asset upload/rename/delete, new project, project rename, and open project by exact projectId. Use local-SDK `wave.*` lookup tools for WaveEngine code-authoring decisions: `list_wave_skill_families`, `query_wave_skills`, `get_wave_skill`, and `query_wave_api`. HTTP Gateway hides/retires cloud skill/API lookup. For exact power-user edits use `code.direct_edit`; for changing an existing API call/argument/literal/value use `code.semantic_guess_edit`; for new code, API switching, or WaveEngine pattern choice use `code.author`. Fast lanes skip broad lookup, not edit/hot-reload/verification. Use `studio.*` labels for operating WaveStudio around that code; those labels are categories, not callable MCP tool names.",
|
|
44633
|
+
"- MCP names: HTTP Gateway = Next/Vercel endpoint for remote/sandbox Studio operations; WaveEngine Agent SDK = same-machine live MCP transport from long-running `wave3d-agent-sdk start`; WaveEngine SDK Cache = package-bundled local skill/API docs retrieval; VFS Mirror = HTTP Gateway workspace snapshot. Do not confuse these modules. On same machine, HTTP Gateway is degraded fallback only after SDK cannot run/update/adopt; do not choose it because it is already reachable or easier.",
|
|
44674
44634
|
"- MCP recovery: when connection/session/onboarding/cache/mirror/timeout state is unclear, call `recover_wave_connection({ lastErrorCode?, failedTool?, symptom? })` first and follow its returned `nextAction`. This is the explicit recovery path for sleeping tabs, local/HTTP Gateway confusion, mirror-not-ready, onboarding-required, command timeout/lease expiry, and hosted proxy/cache failures.",
|
|
44675
|
-
'- Local parity rule: WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway catalog
|
|
44676
|
-
`- MCP topology: same-machine agents should run \`${WAVE3D_AGENT_SDK_START_COMMAND}\`, check /health, and update/restart SDK if version is stale, tools are missing, or SDK prints
|
|
44677
|
-
`- MCP cache priorities: Priority 1 is active role/context cache: keep role, guardrails, authoring workflow, asset/VFS/hot-reload rules, prompt version, and prompt hash in active LLM context. Priority 2 is WaveEngine SDK Cache: production HTTP Gateway/local-SDK
|
|
44635
|
+
'- Local parity rule: WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway Studio-operation catalog, then adds local SDK lookup/session-discovery extras. Direct local live-session tools include VFS edits, assets/uploads, project save/open/new/read/share, preview run/hot reload/pause/resume, diagnostics, performance, screenshots, entity snapshots, and runtime markers. Local browser-backed calls wait directly for browser results. Only call `get_wave_command_result` if a tool returns `status:"pending"` plus `requestId`; on local it normally exists only for catalog parity and reports no local pending-command queue.',
|
|
44636
|
+
`- MCP topology: same-machine agents should run \`${WAVE3D_AGENT_SDK_START_COMMAND}\`, check /health, and update/restart SDK if version is stale, tools are missing, or SDK prints secrets; after restart recheck /health and tools/list. If restart happens after Copy-to-Agent, preserve MCP_TOKEN with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\` using the current MCP_TOKEN value without printing it, otherwise the new SDK may be healthy but unable to authorize the copied local pairing secret. Same-machine stale/missing tools/401-with-Gateway-success means repair local SDK first, not HTTP Gateway first. Same-machine HTTP Gateway is degraded fallback only after SDK cannot run, update, or adopt. Different-machine/cloud/sandbox agents should use \`MCP_HTTP_GATEWAY_FALLBACK_URL\` directly; starting WaveEngine Agent SDK there binds localhost beside the agent, not beside the user browser. Stale SDK/cache are not reasons to use HTTP Gateway fallback; wrong-machine localhost is a topology mismatch.`,
|
|
44637
|
+
`- MCP cache priorities: Priority 1 is active role/context cache: keep role, guardrails, authoring workflow, asset/VFS/hot-reload rules, prompt version, and prompt hash in active LLM context. Priority 2 is WaveEngine SDK Cache: production HTTP Gateway/local-SDK onboarding must not claim normal cached success until SDK cache is prepared or accept proof passes. If accept returns \`wave_engine_sdk_cache_not_ready\`, update/restart \`wave3d-agent-sdk\` or run \`${WAVE_MCP_CORPUS_CACHE_COMMAND_TEMPLATE}\`, then retry accept. If local cache cannot work because sandbox/no filesystem/no Node/npm/user refusal/refresh failure, explicitly accept degraded fallback with \`waveEngineSdkFallbackMode:"studio_ops_only"\`, a valid \`waveEngineSdkUnavailableReason\`, and \`studioOpsOnlyFallbackAccepted:true\`; warn user HTTP Gateway is Studio-ops-only and skill/API lookup requires local SDK/cache repair. This cache command reinstalls the package-bundled SDK locally; it is not WaveEngine Agent SDK transport. Never run it to switch MCP transport; never treat cache failure as local transport failure.`,
|
|
44678
44638
|
"- Main-file globals include `myScene`, `assetManager`, `waveEngine`, `waveStudio`, and direct asset maps such as `models`, `gaussianSplats`, `textures`, `materials`, `animations`, `audios`, `hdr`, `cubeMaps`, `fonts`, `serializedData`, `terrains`, `fx`, `particles`. Availability is not endorsement: choose the intent-owned facade/skill before using a global.",
|
|
44679
|
-
`- Bare authoring globals: common examples include ${WAVE_AUTHORING_COMMON_GLOBAL_EXAMPLES_TEXT}, \`waveMaterial\`, \`waveFx\`, \`waveValueCurve\`, and \`waveParam\`. Use them directly in \`main.ts\`; do not import or namespace-qualify them. If the task is unfamiliar, retrieve the relevant \`wave.*\` skill first; for the full generated exact-global surface, call local-SDK \`query_wave_api\`.`,
|
|
44639
|
+
`- Bare authoring globals: common examples include ${WAVE_AUTHORING_COMMON_GLOBAL_EXAMPLES_TEXT}, \`waveMaterial\`, \`waveFx\`, \`waveValueCurve\`, and \`waveParam\`. Use them directly in \`main.ts\`; do not import or namespace-qualify them. If the task is unfamiliar, retrieve the relevant local-SDK \`wave.*\` skill first; for the full generated exact-global surface, call local-SDK \`query_wave_api\`.`,
|
|
44680
44640
|
"- MCP VFS edit tools: primary tool is forgiving `edit_wave_file({ path, ... })`; it infers replaceLines from startLine/endLine, multi-edit from edits:[...], replaceText from oldText, and whole-file replace from text/content. It handles line-based edits, exact string changes, one-file edit arrays, whole-file replacement, omitted baseHash, common aliases, and oversized endLine clamping. Use `apply_wave_patch({ operations: [...] })` only for grouped/multi-file edits and advanced operations; a single operation is tolerated but operations:[...] is preferred. Simple edit tools can omit baseHash; advanced patch operations should pass it.",
|
|
44681
44641
|
`- MCP hot-reload safety rule: ${WAVE_AUTHORING_CORE_RULES.hotReloadCallbackSafety} edit_wave_file, create_wave_file, and apply_wave_patch preflight this rule before writing.`,
|
|
44682
44642
|
"- MCP generated-file rule: `project.assetrefs.ts`, `project.scene.ts`, `project.scenes.ts`, and `project.execution.ts` are Studio-managed read-only. `bootstrap.ts` / scene `*/bootstrap.ts` is normally managed too; edit it only when you can confidently pass `managedFileEditReason` as `world_streaming_or_terrain_provider` (Google Maps 3D tiles included), `render_profile_or_runtime_backend`, `media_consent_or_capture_plan`, `external_ai_or_tts_backend`, `scene_envelope_or_template_baseline`, `baseline_setup_before_user_main`, or `stale_api_update_to_latest`. Never edit bootstrap for asset manifests/loaders, instruments, scene registry, or execution manifest; Studio owns those.",
|
|
44683
|
-
'- MCP VFS file tools: `create_wave_file({ path, content, requestHotReload? })`, `rename_wave_file({ fromPath, toPath, requestHotReload? })`, and `delete_wave_file({ path, requestHotReload? })` are direct Operate tools for exact live VFS paths, including project `.ts` modules and `.html` sketch files. New `.ts/.tsx` files are standalone runnable source roots by default, so top-level scene code runs on Run/hot reload; pass `runnable:false` only for pure helper modules that should not execute on their own. For Mermaid/diagram/chart requests, create a `.html` file containing a block like `<div class="mermaid">flowchart TD\\n A --> B</div>`; active `.html` files render in
|
|
44643
|
+
'- MCP VFS file tools: `create_wave_file({ path, content, requestHotReload? })`, `rename_wave_file({ fromPath, toPath, requestHotReload? })`, and `delete_wave_file({ path, requestHotReload? })` are direct Operate tools for exact live VFS paths, including project `.ts` modules and `.html` sketch files. New `.ts/.tsx` files are standalone runnable source roots by default, so top-level scene code runs on Run/hot reload; pass `runnable:false` only for pure helper modules that should not execute on their own. For Mermaid/diagram/chart requests, create a `.html` file containing a block like `<div class="mermaid">flowchart TD\\n A --> B</div>`; active `.html` files render in the editor/coding pane as HTML sketches and auto-load Mermaid when `class="mermaid"` is present. HTML sketches must never replace the live engine preview iframe. On the final code edit, `awaitHotReload:true` implies hot reload and returns bounded runtime diagnostics in the same response. These tools manage VFS files, not uploaded asset-library blobs. If the user gives a vague target, call `list_wave_files`/`read_wave_file` or ask before mutating. Scene-root modules and owned helpers run in the Studio authoring context; keep shared helpers pure or parameterized, and keep live object ownership in feature files. Rename/move rewrites relative imports; delete is permanent unless you rewrite the file and refuses files still imported by other VFS code.',
|
|
44684
44644
|
"- MCP asset resolution rule: if code needs an existing asset argument, reuse an exact visible typed ref or call category-first asset discovery before editing: `find_wave_assets_by_category({ category, query?, sources?, limit? })`, alias `list_wave_assets_by_category`, alias `search_wave_assets_by_category`, or tolerant `list_wave_assets`. Fill `category` from user intent first: sound/audio -> `audios`, 3D object/character/prop -> `models`, material -> `materials`, image/texture -> `textures`, sky/HDR -> `hdr`, cube-map sky/environment -> `cubeMaps`, animation -> `animations`, JSON/CSV/YAML/XML/ROS data -> `serializedData`. It returns refs safe to use in authored code, ordered projectAlias -> user -> public. In `main.ts`, pass typed bare refs such as `models.X`, `textures.X`, `materials.X`, `audios.X`, `hdr.X`, `cubeMaps.X`, `animations.X`, `videos.X`, `fonts.X`, `serializedData.X`, or `terrains.X`; do not paste raw paths.",
|
|
44685
|
-
"- MCP asset-authoring facade rule: quoting or passing existing assets uses typed refs such as `models.X`, `textures.X`, `materials.X`, and `audios.X`; creating/configuring/forking/editing material handles starts from `waveMaterial` and `wave.material.authoring`; path-bound surfaces start from `wavePathSurface`; `assetManager` is reserved for exact low-level asset-pipeline/generated-asset APIs named by a skill or API lookup.",
|
|
44645
|
+
"- MCP asset-authoring facade rule: quoting or passing existing assets uses typed refs such as `models.X`, `textures.X`, `materials.X`, and `audios.X`; creating/configuring/forking/editing material handles starts from `waveMaterial` and `wave.material.authoring`; path-bound surfaces start from `wavePathSurface`; `assetManager` is reserved for exact low-level asset-pipeline/generated-asset APIs named by a local SDK skill or API lookup.",
|
|
44686
44646
|
"- MCP material authoring rule: quoting an existing material uses `materials.X`; authoring a material handle uses `waveMaterial`. Do not call internal procedural material lifecycle methods such as `_sync(...)`, `_bindAutoSync(...)`, or `_release(...)` in authored code; apply procedural handles through `entity.useMaterial(...)`, geometry, terrain paint, or shader `.useTexture(...)`. `WaveMaterialAssetEditHandle.sync(assetManager)` remains the explicit commit step for intentional loaded-material asset edits.",
|
|
44687
|
-
`- MCP explorer asset tools: \`list_wave_explorer_assets({ query?, assetTypes?, limit? })\`, \`create_wave_asset_upload({ assetKind, filename, contentType?, sizeBytes })\`, \`commit_wave_asset_upload({ assetKind, uploadId, filename, contentType?, sizeBytes, useMeshoptimizer?, useKtx2Compression? })\`, \`get_wave_asset_upload_status({ uploadId, totalChunks? })\`, \`upload_wave_asset({ assetKind, filename, dataBase64? | dataUrl?, contentType?, useMeshoptimizer?, useKtx2Compression? })\`, \`stage_wave_asset_upload_chunk({ uploadId?, chunkIndex, totalChunks, dataBase64 })\`, \`commit_wave_asset_chunk_upload({ assetKind, uploadId, filename, contentType?, totalChunks, totalSizeBytes, useMeshoptimizer?, useKtx2Compression? })\`, \`abort_wave_asset_upload({ uploadId })\`, \`rename_wave_asset({ path, name })\`, and \`delete_wave_asset({ path })\` operate on uploaded user assets shown by the asset explorer. \`assetKind\` values come from the Wave Studio upload policy SSOT: ${getWaveStudioBridgeAssetUploadKindHelpText()}. Status and abort require the same write token, but can still run after the active Studio write grant expires.`,
|
|
44688
|
-
"- MCP project tools: `list_wave_project_templates()`, `new_wave_project({ templateId?, discardUnsavedChanges? })`, `list_wave_projects()`, `read_wave_project({ projectId })`, `rename_wave_project({ projectId, name })`, `open_wave_project({ projectId, discardUnsavedChanges? })`, `save_wave_project({ name?, description? })`, and `share_wave_project()`. Save/share/rename/new/open are direct Operate tools. Use read for example packs because it does not open or replace the editor workspace. Rename updates saved project display metadata without rewriting VFS/code. New/open replace the current live workspace and require write pairing; dirty workspaces require save first or explicit discard. If the user gives a project name, resolve exact projectId with `list_wave_projects` before renaming or opening. Share returns a 30-day `url`; send that URL back to the user.",
|
|
44647
|
+
`- MCP explorer asset tools: \`list_wave_explorer_assets({ query?, assetTypes?, limit? })\`, \`create_wave_asset_upload({ assetKind, filename, contentType?, sizeBytes })\`, \`commit_wave_asset_upload({ assetKind, uploadId, filename, contentType?, sizeBytes, useMeshoptimizer?, useKtx2Compression? })\`, \`get_wave_asset_upload_status({ uploadId, totalChunks? })\`, \`upload_wave_asset({ assetKind, filename, dataBase64? | dataUrl?, contentType?, useMeshoptimizer?, useKtx2Compression? })\`, \`stage_wave_asset_upload_chunk({ uploadId?, chunkIndex, totalChunks, dataBase64 })\`, \`commit_wave_asset_chunk_upload({ assetKind, uploadId, filename, contentType?, totalChunks, totalSizeBytes, useMeshoptimizer?, useKtx2Compression? })\`, \`abort_wave_asset_upload({ uploadId })\`, \`rename_wave_asset({ path, name })\`, and \`delete_wave_asset({ path })\` operate on uploaded user assets shown by the asset explorer. \`assetKind\` values come from the Wave Studio upload policy SSOT: ${getWaveStudioBridgeAssetUploadKindHelpText()}. Status and abort require the same write token, but can still run after the active Studio write grant expires. Read \`resultSummary\` first: asset tools report ASSET ... OK, ASSET ... FAILED, or ASSET ... PENDING in the same response.`,
|
|
44648
|
+
"- MCP project tools: `list_wave_project_templates()`, `new_wave_project({ templateId?, discardUnsavedChanges? })`, `list_wave_projects()`, `read_wave_project({ projectId | url })`, `rename_wave_project({ projectId, name })`, `open_wave_project({ projectId, discardUnsavedChanges? })`, `save_wave_project({ name?, description? })`, and `share_wave_project()`. Save/share/rename/new/open are direct Operate tools. Use read for example packs because it does not open or replace the editor workspace. For listed/saved projects pass exact projectId from `list_wave_projects`; for shared/published links pass `url` directly. Silent URL read supports old `/waveStudio?share=<uuid>` links, new shared alias links, old/new `/p/<user>/<id>` published links, and `/waveStudio?source=published&user=<user>&id=<id>`. Rename updates saved project display metadata without rewriting VFS/code. New/open replace the current live workspace and require write pairing; dirty workspaces require save first or explicit discard. If the user gives a project name, resolve exact projectId with `list_wave_projects` before renaming or opening. Share returns a 30-day `url`; send that URL back to the user. Read `resultSummary` first: project tools report PROJECT ... OK, PROJECT ... FAILED, or PROJECT ... PENDING in the same response.",
|
|
44689
44649
|
"- MCP diagnostics tool: `get_wave_runtime_diagnostics({ limit? })` reads the same embedded Wave Studio console visible in the coding IDE, structured runtime state, and Monaco/editor diagnostics. Use `runtimeBusy`, `previewExecutionPhase`, `lastRuntimeOutcome`, `editorErrorCount`, and `editorDiagnostics`; logs are history and may include old errors. `editorErrorCount > 0` blocks clean success even when runtime outcome says success.",
|
|
44690
44650
|
"- MCP performance tool: direct Observe `get_wave_runtime_performance_snapshot()` (alias `get_wave_runtime_performance`) reads live FPS/performance stats, memory/RAM/heap, tick rate, tab visibility, Babylon scene counts, Wave entity/component counts, and JS heap when Chromium exposes it. It does not enable or show the debug overlay.",
|
|
44691
44651
|
'- MCP runtime entity tool: direct Observe `get_wave_runtime_entity_snapshot({ runtimeRef? , variableName?, filePath?, sceneId? })` (alias `get_wave_entity_snapshot`) answers "where is Amy?" and reads the live world transform for VFS-created source variables. Prefer exact `runtimeRef` when known; otherwise pass `variableName` and add `filePath` if candidates are ambiguous.',
|
|
@@ -44702,7 +44662,7 @@ var WAVE_MCP_STUDIO_TOOL_GUIDE = [
|
|
|
44702
44662
|
"- `waveStudio.exportEntity(name, entity)`: declare a live entity owned by the current source module for intentional modular reuse. `name` must be a static string literal and unique across runnable roots.",
|
|
44703
44663
|
"- `waveStudio.importEntity<T>(name)`: import an exported live entity into the current source module; Studio restores the exporter baseline and prunes/replays importer callbacks/overlays during source hot reload. Studio orders source roots by export/import dependencies: exporter before importer; exporter before `main.ts` if main imports it; overlay importers after exporter/main baseline. Missing, duplicate, dynamic, or cyclic entity names stop run/hot reload before execution.",
|
|
44704
44664
|
'- MCP command result rule: poll `get_wave_command_result({ requestId })` only when the previous tool response includes `status:"pending"` plus `requestId`. HTTP Gateway browser-backed tools may return pending and need that poll. WaveEngine Agent SDK browser-backed tools wait directly and return final results; its `get_wave_command_result` is a catalog-parity no-op unless a pending result was explicitly returned.',
|
|
44705
|
-
"- MCP preview tools: `hot_reload_wave_preview` (alias `hotreload_wave_preview`) is the default standalone way to view code changes in an already-running preview; `run_wave_preview` (alias `run_project`) is for first start when diagnostics show `hasRunSucceeded: false`, explicit full restart requests, or last-resort recovery after hot reload/polling fails.
|
|
44665
|
+
"- MCP preview tools: `hot_reload_wave_preview` (alias `hotreload_wave_preview`) is the default standalone way to view code changes in an already-running preview; `run_wave_preview` (alias `run_project`) is for first start when diagnostics show `hasRunSucceeded: false`, explicit full restart requests, or last-resort recovery after hot reload/polling fails; `pause_wave_preview` / `resume_wave_preview` mirror the toolbar pause/resume buttons. All require write pairing because they mutate live Studio runtime state. Runtime-triggering tools wait by default and return same-call `runtimeVerification`; set `awaitRuntimeResult:false` only when intentionally fire-and-polling. `hot_reload_wave_preview` mirrors the Wave Studio toolbar button and has no path argument: in multi-file VFS projects it reloads the currently open/active TypeScript file when safe, not every user-created .ts module. For a specific module, make that file active in Studio before calling the standalone hot-reload tool, or use the edit tool `awaitHotReload:true` immediately after the final edit. Main entries reload the main graph, source-root modules reload that root, and bootstrap/scene registry/assets/network/ambiguous helper surfaces escalate. Agents should organize feature-owned objects, callbacks, promoted parts, and appearance mutations into the file they expect to hot reload; use `waveStudio.exportEntity`/`waveStudio.importEntity` only when a live entity intentionally crosses module boundaries. Hot reload may internally choose `patchSource`, `patchMain`, `preserveScene`, or hard `rebuildScene`; agents should inspect returned `runtimeVerification` or poll diagnostics instead of manually guessing the tier. Poll `get_wave_runtime_diagnostics` only when `runtimeVerification` is absent, timed out, or ambiguous; require `editorErrorCount === 0`, then choose one relevant proof tool if needed: screenshot, runtime entity snapshot, markers, or performance snapshot."
|
|
44706
44666
|
].join("\n");
|
|
44707
44667
|
|
|
44708
44668
|
// ../../src/lib/waveStudio/aiAssist/bridge/hosted/mcpResources/toolCatalog.ts
|
|
@@ -44710,19 +44670,19 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44710
44670
|
"Wave Studio MCP tool catalog:",
|
|
44711
44671
|
"",
|
|
44712
44672
|
"Read this as skill families first, concrete MCP tools second. The `studio.*` family names are not callable tools; they are the routing map that tells you which concrete `*_wave_*` tool to use.",
|
|
44713
|
-
'WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway catalog
|
|
44673
|
+
'WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway Studio-operation catalog, then adds local SDK lookup/session-discovery extras. Its live-session tools run through the paired browser and wait directly for browser results. Use `get_wave_command_result` only after a response with `status:"pending"` and `requestId`; locally it normally exists only for catalog parity.',
|
|
44714
44674
|
"",
|
|
44715
44675
|
"studio.mcp - session, policy, pending commands:",
|
|
44716
44676
|
"- `get_wave_coding_guardrails`: call after onboarding acceptance; returns policy, file context, tool catalog, and recipes.",
|
|
44717
44677
|
'- `get_wave_mcp_health` (aliases `mcp_health`, `mcp_status`): read-only self diagnostic for endpoint kind, SDK version/build, tool catalog hash/count, onboarding, session/VFS, and WaveEngine SDK Cache state. Use when the agent asks "am I local/cloud/current/cached?" or any MCP state is unclear.',
|
|
44718
44678
|
"- `get_wave_tool_map`: stable complete concrete MCP tool menu grouped by family plus policy flags. Use only when `tools/list` feels truncated or unclear.",
|
|
44719
|
-
`- Transport topology rule: same-machine agents should run \`${WAVE3D_AGENT_SDK_START_COMMAND}\`, check /health, and update/restart SDK if version is stale, tools are missing, or SDK prints
|
|
44679
|
+
`- Transport topology rule: same-machine agents should run \`${WAVE3D_AGENT_SDK_START_COMMAND}\`, check /health, and update/restart SDK if version is stale, tools are missing, or SDK prints secrets; after Copy-to-Agent, restart with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\` using the current MCP_TOKEN value without printing it so the copied local pairing secret still works. After restart recheck /health and tools/list. Same-machine stale/missing tools/401-with-Gateway-success means repair local SDK first, not HTTP Gateway first. Same-machine HTTP Gateway is degraded fallback only after SDK cannot run, update, or adopt; never use it because it is familiar, already authenticated, or avoids SDK repair. Different-machine/cloud/sandbox agents should use \`MCP_HTTP_GATEWAY_FALLBACK_URL\` directly. Stale SDK/cache are local setup issues, not fallback triggers; wrong-machine localhost is a topology mismatch.`,
|
|
44720
44680
|
"- `recover_wave_connection`: direct Observe recovery tool. Call after onboarding required, session missing, command timeout/lease expired, mirror not ready, hosted proxy/cache failure, local/HTTP Gateway confusion, or sleeping-tab symptoms. It returns exact next action: re-onboard, get session, wake tab, update/restart SDK, wait mirror, retry, use HTTP Gateway fallback, or ask fresh Copy to Agent.",
|
|
44721
|
-
'- WaveEngine SDK Cache: normal API
|
|
44681
|
+
'- WaveEngine SDK Cache: normal skill/API lookup lives inside the local `wave3d-agent-sdk` SDK package. Update/restart SDK when SDK is stale or missing. HTTP Gateway is Studio-ops-only and does not provide cloud skill/API lookup. If local SDK cannot work because sandbox/no filesystem/no Node/npm/user refusal/refresh failure, explicitly accept degraded fallback with `waveEngineSdkFallbackMode:"studio_ops_only"`, a valid `waveEngineSdkUnavailableReason`, and `studioOpsOnlyFallbackAccepted:true`; warn user skill/API lookup requires local SDK repair. This is retrieval cache, not WaveEngine Agent SDK transport. Never treat SDK cache failure as local transport failure. Keep Priority 1 role, guardrails, workflow, assets/VFS/hot-reload rules, prompt version, and prompt hash in active LLM context.',
|
|
44722
44682
|
"- Work-mode rule: Observe reads directly; Operate direct Studio commands directly; Author/Diagnose routes through `start_wave_task`; General avoids Wave tools. Operate tools include run/hot reload, save/share, VFS create/rename/delete exact files, asset upload/rename/delete exact assets, new project, project rename, and open project by exact projectId.",
|
|
44723
|
-
"- `start_wave_task`: begin one Author/Diagnose route for code behavior/content changes, debugging,
|
|
44683
|
+
"- `start_wave_task`: begin one Author/Diagnose route for code behavior/content changes, debugging, local SDK skill/API lookup, semantic/direct code edits, and multi-step investigations. Use `code.direct_edit` for exact power-user receiver/method/action commands; use `code.semantic_guess_edit` only when changing an existing API call/argument/literal/value already visible in code; use `code.author` for normal/uncertain authoring and any new code/API/pattern choice. If the user request is irrelevant/too broad, use `agent.general` and guide the user toward one concrete Wave milestone.",
|
|
44724
44684
|
"- Diagnose taxonomy: `code.debug` alone means diagnose/report only. For bug-fix requests, include both `code.debug` and `code.author`; otherwise the route may correctly stay read-only/debug-only.",
|
|
44725
|
-
'- `advance_wave_task`: move an Author/Diagnose route to lookup, execute, or verify after evidence is gathered. Required before `query_wave_api`, broad `edit_wave_file`, `apply_wave_patch`, and final route verification unless `start_wave_task` already fast-started with `nextPhase:"execute"` and editPlan. Not required for exact `edit_wave_file` line/text edits that already provide path plus startLine/endLine/text, edits:[...], or oldText/newText. Do not advance merely to run a direct Operate tool.',
|
|
44685
|
+
'- `advance_wave_task`: move an Author/Diagnose route to lookup, execute, or verify after evidence is gathered. Required before local-SDK `query_wave_api`, broad `edit_wave_file`, `apply_wave_patch`, and final route verification unless `start_wave_task` already fast-started with `nextPhase:"execute"` and editPlan. Not required for exact `edit_wave_file` line/text edits that already provide path plus startLine/endLine/text, edits:[...], or oldText/newText. Do not advance merely to run a direct Operate tool.',
|
|
44726
44686
|
"- `get_wave_task_route`: inspect current route, phase, and evidence when you are unsure why a tool is blocked.",
|
|
44727
44687
|
"- `get_wave_session`: current paired Studio tab, active file, token/session status, visible agent clients.",
|
|
44728
44688
|
'- `get_wave_command_result`: use only after a tool response contains `status:"pending"` and `requestId`. On HTTP Gateway, this polls pending browser-backed command results until final. On WaveEngine Agent SDK, this is normally catalog parity because local browser-backed calls wait directly.',
|
|
@@ -44735,17 +44695,19 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44735
44695
|
"- `apply_wave_patch`: advanced tool for grouped edits, multi-file changes, `lineEdits`, `textEdits`, `searchReplace`, `unifiedDiff`, full rewrites, create/rename/delete in one command. Prefer an `operations` array; a single `operation` or bare operation object is tolerated for recovery. Compact edit operations should include explicit `baseHash`.",
|
|
44736
44696
|
"- Bootstrap exception: `bootstrap.ts` is not a normal authoring file. `edit_wave_file`/`apply_wave_patch` require `managedFileEditReason` for bootstrap writes. Allowed reasons are world streaming/terrain provider (including Google Maps 3D tiles), render/runtime backend, media consent/capture, external AI/TTS backend, scene/template baseline, pre-main baseline setup, or stale bootstrap API update to latest. Asset manifests/loaders, instruments, scene registry, and execution manifest are blocked because Studio manages those automatically.",
|
|
44737
44697
|
"- Hot-reload safety preflight: edit_wave_file/create_wave_file/apply_wave_patch reject raw unmanaged callback roots before writing, including timers, RAF, listeners, Promise chains, observers, workers, sockets, channels, eventBus/myScene raw subscriptions, and raw event-handler assignments. Use Wave-owned callbacks/Animate/tick/state/Director APIs.",
|
|
44738
|
-
'- `create_wave_file`, `rename_wave_file`, `delete_wave_file`: direct Operate VFS file management for exact `.ts` module paths and `.html` sketch files. Prefer these for project structure changes, diagrams, Mermaid charts, and lightweight docs. For Mermaid, create `.html` with `<div class="mermaid">...</div>`; active HTML files preview in
|
|
44698
|
+
'- `create_wave_file`, `rename_wave_file`, `delete_wave_file`: direct Operate VFS file management for exact `.ts` module paths and `.html` sketch files. Prefer these for project structure changes, diagrams, Mermaid charts, and lightweight docs. For Mermaid, create `.html` with `<div class="mermaid">...</div>`; active HTML files preview in the editor/coding pane and auto-load Mermaid when `class="mermaid"` is present. HTML sketches must never replace the live engine preview iframe. Scene-root modules and owned helpers run in the Studio authoring context; keep shared helpers pure or parameterized and keep live object ownership in feature files. If target is vague, call `list_wave_files` or ask before mutating.',
|
|
44739
44699
|
"",
|
|
44740
|
-
"wave.*
|
|
44741
|
-
"-
|
|
44742
|
-
"- `
|
|
44743
|
-
"- `
|
|
44744
|
-
"- `
|
|
44700
|
+
"local-SDK wave.* lookup - code-authoring facts:",
|
|
44701
|
+
"- HTTP Gateway tools/list hides/retires `list_wave_skill_families`, `query_wave_skills`, `get_wave_skill`, and `query_wave_api`. Use these only on the local WaveEngine Agent SDK endpoint.",
|
|
44702
|
+
"- `list_wave_skill_families`: local SDK complete family router for WaveEngine authoring direction after intent chunking/Core Intent Pass. Call this before skill/API lookup when current code does not already show the pattern.",
|
|
44703
|
+
"- `query_wave_skills`: local SDK compact generated skill-card search only after family selection. Do not pass raw user prose. Call with `families`/`familyId` from `list_wave_skill_families` plus a small within-family query, or exact `skillIds`.",
|
|
44704
|
+
"- `get_wave_skill`: local SDK compact skill-card read with routing hints, preferred APIs, supporting skills, examples, and anti-patterns.",
|
|
44705
|
+
"- `query_wave_api`: local SDK gated exact lookup, not assessment. Search public authoring APIs for exact methods, options, enums, bare runtime globals, aliases, members, and return chains after current-code or skill routing. Fast-lane routes call this only when spelling/signature/value uncertainty remains or an edit failed.",
|
|
44745
44706
|
"",
|
|
44746
44707
|
"studio.preview - run loop and diagnostics:",
|
|
44747
|
-
"- `hot_reload_wave_preview` (alias `hotreload_wave_preview`): direct Operate tool for hot reload, reload preview, or refresh preview after edit. It is also the default way to view code changes in an already-running preview. It mirrors the Wave Studio toolbar button and has no path argument: in multi-file VFS projects it reloads the currently open/active TypeScript file when safe, not every user-created .ts module. Studio may upgrade the internal reload tier automatically when assets/bootstrap/runtime surface changed.",
|
|
44748
|
-
"- `run_wave_preview` (alias `run_project`): direct Operate tool for run project, start preview, or full restart. Use when diagnostics show `hasRunSucceeded: false`, the user asks for a full run/restart, or hot reload is stuck/failing and you need a last-resort restart.",
|
|
44708
|
+
"- `hot_reload_wave_preview` (alias `hotreload_wave_preview`): direct Operate tool for hot reload, reload preview, or refresh preview after edit. It is also the default way to view code changes in an already-running preview. It mirrors the Wave Studio toolbar button and has no path argument: in multi-file VFS projects it reloads the currently open/active TypeScript file when safe, not every user-created .ts module. Studio may upgrade the internal reload tier automatically when assets/bootstrap/runtime surface changed. It waits by default and returns one-call bounded diagnostics in `runtimeVerification`; set `awaitRuntimeResult:false` only for intentional fire-and-poll.",
|
|
44709
|
+
"- `run_wave_preview` (alias `run_project`): direct Operate tool for run project, start preview, or full restart. Use when diagnostics show `hasRunSucceeded: false`, the user asks for a full run/restart, or hot reload is stuck/failing and you need a last-resort restart. It waits by default and returns one-call bounded diagnostics in `runtimeVerification`; set `awaitRuntimeResult:false` only for intentional fire-and-poll.",
|
|
44710
|
+
"- `pause_wave_preview` / `resume_wave_preview` (aliases `pause_wave_engine`, `resume_wave_engine`): direct Operate tools for the Wave Studio toolbar pause/resume engine controls. No task route needed; preview must already be running.",
|
|
44749
44711
|
"- `get_wave_runtime_diagnostics`: poll until `runtimeBusy` is false and `lastRuntimeOutcome` is `success` or `error`. If your edit/run tool returned `requestedAt` or `runtimeActionRequestedAt`, ignore older `lastRuntimeOutcomeAt`. Logs are history; use structured outcome first. Also inspect `editorErrorCount`/`editorDiagnostics`; editor errors mean linter/compile failure even if runtime outcome says success.",
|
|
44750
44712
|
"- `get_wave_runtime_performance_snapshot` (alias `get_wave_runtime_performance`): direct Observe tool for live FPS/performance stats, memory/RAM/heap, hidden-tab throttling, scene weight, mesh/material/texture counts, Wave entity/component counts, and JS heap. No `start_wave_task` needed.",
|
|
44751
44713
|
"",
|
|
@@ -44758,7 +44720,7 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44758
44720
|
"studio.assets - refs, uploads, and asset library:",
|
|
44759
44721
|
"- Asset resolution rule: before writing an asset-map input, reuse an exact ref already visible in code or call category-first asset discovery (`find_wave_assets_by_category`, alias `list_wave_assets_by_category`) with required `category`, semantic `query`, and small `limit`; do not invent `models.<asset>`, `textures.<asset>`, `materials.<asset>`, `audios.<asset>`, `hdr.<asset>`, `cubeMaps.<asset>`, or `animations.<asset>` keys from memory. Do not infer absence from a capped category list.",
|
|
44760
44722
|
"- Existing asset arguments should be typed bare refs in main files, such as `models.Robot`, `textures.Grass`, `materials.Wood`, `audios.Click`, `hdr.StudioSky`, `cubeMaps.studio`, `animations.Run`, `videos.Intro`, `fonts.Title`, `serializedData.UnitreePose`, or `terrains.Alpine`.",
|
|
44761
|
-
"- Asset authoring facade split: quote existing assets as typed refs (`models.X`, `textures.X`, `materials.X`, `audios.X`, etc.); author material handles through `waveMaterial` and `wave.material.authoring`; use `assetManager` only for exact generated-asset/asset-pipeline APIs named by a Wave skill or API lookup.",
|
|
44723
|
+
"- Asset authoring facade split: quote existing assets as typed refs (`models.X`, `textures.X`, `materials.X`, `audios.X`, etc.); author material handles through `waveMaterial` and `wave.material.authoring`; use `assetManager` only for exact generated-asset/asset-pipeline APIs named by a local SDK Wave skill or API lookup.",
|
|
44762
44724
|
'- `find_wave_assets_by_category`: category-first refs safe to write in code, such as `models.Robot`, `textures.Grass`, `materials.Wood`, `audios.Click`. Aliases: `list_wave_assets_by_category`, `search_wave_assets_by_category`, tolerant `list_wave_assets`. Examples: `{ category:"models", query:"sparrow", limit:50 }`, `{ category:"audios", query:"footstep", limit:50 }`, `{ category:"materials", query:"grass", limit:50 }`.',
|
|
44763
44725
|
"- `list_wave_explorer_assets`: uploaded asset library metadata for management: path, URL, display/ref name, type, size. May be empty; not a fallback for built-in/public refs.",
|
|
44764
44726
|
"- `create_wave_asset_upload` -> raw HTTP PUT -> `get_wave_asset_upload_status` -> `commit_wave_asset_upload`: best path for local files; no local npm package required.",
|
|
@@ -44769,7 +44731,8 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44769
44731
|
"",
|
|
44770
44732
|
"studio.project - workspace lifecycle:",
|
|
44771
44733
|
"- `list_wave_project_templates` -> `new_wave_project`: start a new workspace. Save first or pass explicit discard.",
|
|
44772
|
-
"- `
|
|
44734
|
+
"- `read_wave_project({ url })`: silently read shared/published project links without opening them. Supports old `/waveStudio?share=<uuid>` and new shared alias links, old/new `/p/<user>/<id>` published links, and `/waveStudio?source=published&user=<user>&id=<id>`.",
|
|
44735
|
+
"- `list_wave_projects` -> `read_wave_project({ projectId })`: read a listed/saved bridge-readable project VFS/code payload without opening it. Use for example packs, style learning, and pattern comparison.",
|
|
44773
44736
|
"- `list_wave_projects` -> `rename_wave_project`: rename a saved project by exact projectId without opening it or rewriting VFS/code.",
|
|
44774
44737
|
"- `list_wave_projects` -> `open_wave_project`: open a bridge-readable project by exact projectId and replace the live workspace. If user gives a name, resolve it through `list_wave_projects`; never pass a guessed name as projectId. Save first or pass explicit discard.",
|
|
44775
44738
|
"- `save_wave_project`: quick-save existing saved projects; for new projects, pass name/description or let Studio generate defaults.",
|
|
@@ -44780,7 +44743,7 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44780
44743
|
"",
|
|
44781
44744
|
"Cross-family rules:",
|
|
44782
44745
|
"- Hosted browser-backed tools can return pending with `requestId`; poll `studio.mcp` tool `get_wave_command_result` only in that case. WaveEngine Agent SDK waits directly and normally does not use a pending-command queue.",
|
|
44783
|
-
"- Fast-lane code routes: exact user command naming a receiver/method/action -> `code.direct_edit`; changing an existing visible API call/argument/literal/value only -> `code.semantic_guess_edit`. New lines, new objects, API switching, or WaveEngine pattern choice -> `code.author`. Fast lanes skip broad skill/API lookup, not deterministic edit tools, hot reload, or verification. They usually skip `query_wave_api` too; use exact lookup only for uncertainty/failure. For unfamiliar work, retrieve `wave.*` skills before exact API facts.",
|
|
44746
|
+
"- Fast-lane code routes: exact user command naming a receiver/method/action -> `code.direct_edit`; changing an existing visible API call/argument/literal/value only -> `code.semantic_guess_edit`. New lines, new objects, API switching, or WaveEngine pattern choice -> `code.author`. Fast lanes skip broad skill/API lookup, not deterministic edit tools, hot reload, or verification. They usually skip local-SDK `query_wave_api` too; use exact lookup only for uncertainty/failure. For unfamiliar work, retrieve local SDK `wave.*` skills before exact API facts.",
|
|
44784
44747
|
"- After `studio.vfs` edits, inspect `changedFiles`, `changedPaths`, `partial`, `skippedOperations`, `hotReloadRequested`, and `hotReloadSkippedReason`.",
|
|
44785
44748
|
"- After code changes, use `studio.preview` hot reload by default, then `studio.capture` to prove the result.",
|
|
44786
44749
|
"- Proactive help rule: after meaningful progress, suggest at most one relevant Studio capability if it helps: screenshot, entity snapshot, markers, performance snapshot, asset tools, or project share/save/open. Do not dump tool menus."
|
|
@@ -44834,7 +44797,7 @@ var LOCAL_HOSTED_TOKEN_PREFIX = "wgbt.";
|
|
|
44834
44797
|
var CORPUS_CACHE_DIR_ENV = "WAVE3D_AGENT_CACHE_DIR";
|
|
44835
44798
|
var MAX_CORPUS_ZIP_BYTES = 50 * 1024 * 1024;
|
|
44836
44799
|
var MAX_CORPUS_EXTRACTED_BYTES = 100 * 1024 * 1024;
|
|
44837
|
-
var LOCAL_SESSION_NOT_FOUND_MESSAGE = "WaveEngine Agent SDK HTTP is alive, but no Wave Studio browser tab is paired with this
|
|
44800
|
+
var LOCAL_SESSION_NOT_FOUND_MESSAGE = "WaveEngine Agent SDK HTTP is alive, but no Wave Studio browser tab is paired with this MCP_TOKEN local secret. Live Studio tools need the Wave Studio tab open with Room -> MCP started/adopted. Refresh/reopen Wave Studio or restart MCP in the tab, then retry this same local endpoint and pairing secret. Do not treat this as WaveEngine SDK Cache failure.";
|
|
44838
44801
|
var HOSTED_BROWSER_COMMAND_PENDING_NOTE = ' If this browser-backed command returns `status: "pending"` with `requestId`, poll `get_wave_command_result`; otherwise do not poll command results.';
|
|
44839
44802
|
var LOCAL_BROWSER_COMMAND_PENDING_NOTE = " Local browser-backed commands wait for the Studio browser result directly on this transport.";
|
|
44840
44803
|
|
|
@@ -44844,7 +44807,7 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT_HASH = "local_mcp_onboarding_20260615_4";
|
|
|
44844
44807
|
var LOCAL_MCP_AGENT_READY_SUMMARY = {
|
|
44845
44808
|
role: "You are the Wave Studio authoring agent for this live browser session. Treat onboarding as system-prompt-like rules until session ends.",
|
|
44846
44809
|
mustKeepInActiveContext: [
|
|
44847
|
-
"Keep
|
|
44810
|
+
"Keep MCP_TOKEN secret. On localhost it is a same-machine pairing secret; on HTTP Gateway it is a gateway bearer.",
|
|
44848
44811
|
"Use concrete MCP tool names; studio.* and wave.* are category labels only. Common aliases and safe high-confidence typos are tolerated, but destructive/write fuzzy matches require exact confirmation.",
|
|
44849
44812
|
`Keep full intent taxonomy in active LLM context: ${WAVE_MCP_TASK_INTENT_KIND_VALUES.join(", ")}.`,
|
|
44850
44813
|
"If connection/session/onboarding/cache/timeout state is unclear, call get_wave_mcp_health first for status, then recover_wave_connection when you need the next repair action.",
|
|
@@ -44856,9 +44819,9 @@ var LOCAL_MCP_AGENT_READY_SUMMARY = {
|
|
|
44856
44819
|
"Primary code edit tool is edit_wave_file. Use apply_wave_patch only for grouped/multi-file/strict diff work.",
|
|
44857
44820
|
'VFS supports non-code files too: create `.html` sketches for diagrams/charts/docs; active HTML files preview in Studio, and Mermaid renders from `<div class="mermaid">...</div>` blocks.',
|
|
44858
44821
|
"Hot-reload safety: avoid raw unmanaged callback roots such as timers/RAF/listeners/Promise chains/observers/workers/sockets/channels/event-handler assignments. Edit tools and runtime bundling block violations before authored code runs; use Wave-owned callbacks/Animate/tick/state/Director APIs.",
|
|
44859
|
-
"After final code edit, prefer awaitHotReload:true for one-call edit + hot reload + bounded diagnostics; inspect changedFiles/changedPaths/partial/skippedOperations/hotReloadRequested/hotReloadSkippedReason/runtimeVerification.",
|
|
44822
|
+
"After final code edit, prefer awaitHotReload:true for one-call edit + hot reload + bounded diagnostics; requestHotReload:true also waits unless awaitHotReload:false; inspect changedFiles/changedPaths/partial/skippedOperations/hotReloadRequested/hotReloadSkippedReason/runtimeVerification.",
|
|
44860
44823
|
"Studio-managed generated files are read-only; bootstrap.ts needs a confident managedFileEditReason and is never for assets/loaders/instruments/scene registry/execution manifest.",
|
|
44861
|
-
"Production/HTTP-Gateway
|
|
44824
|
+
"Production/HTTP-Gateway pairing path must have WaveEngine SDK Cache prepared before onboarding accept succeeds; SDK comes bundled in the npm SDK package."
|
|
44862
44825
|
],
|
|
44863
44826
|
nextRequiredCalls: [
|
|
44864
44827
|
"tools/list",
|
|
@@ -44882,12 +44845,12 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT = [
|
|
|
44882
44845
|
`Before accepting onboarding, set all context-cache confirmations true only after these are active-context cached: ${WAVE_MCP_REQUIRED_CONTEXT_CACHE_CONFIRMATIONS.join(", ")}.`,
|
|
44883
44846
|
"",
|
|
44884
44847
|
"Priority 2 - WaveEngine SDK Cache:",
|
|
44885
|
-
`The WaveEngine Agent SDK answers skill/API/guardrail tools from the bundled WaveEngine SDK Cache. The SDK ships inside \`wave3d-agent-sdk\`; \`start\`, \`cache status\`, and \`cache search\` auto-prepare it locally. During \`accept_wave_agent_onboarding\`, production/HTTP-Gateway
|
|
44848
|
+
`The WaveEngine Agent SDK answers skill/API/guardrail tools from the bundled WaveEngine SDK Cache. The SDK ships inside \`wave3d-agent-sdk\`; \`start\`, \`cache status\`, and \`cache search\` auto-prepare it locally. During \`accept_wave_agent_onboarding\`, production/HTTP-Gateway pairings must verify this local SDK cache before normal success. If missing, stale, or unverified, accept returns \`wave_engine_sdk_cache_not_ready\`; update/restart the exact SDK package or run the local bundled repair command \`${WAVE_MCP_CORPUS_CACHE_COMMAND_TEMPLATE}\`, then retry accept. If the agent is sandboxed, has no filesystem/Node/npm, or user refuses local SDK/cache, explicitly accept degraded Studio-ops-only fallback with \`waveEngineSdkFallbackMode:"studio_ops_only"\`, a valid \`waveEngineSdkUnavailableReason\`, and \`studioOpsOnlyFallbackAccepted:true\`; warn user HTTP Gateway can still do VFS/assets/project/preview/capture, but exact API lookup is unavailable until local SDK works. Keep the exact SDK command in active context as \`waveEngineSdkCacheCommandCached\`. Use local skill onion retrieval: \`list_wave_skill_families\` -> choose family ids -> \`query_wave_skills\` with \`families\`/\`familyId\` -> \`get_wave_skill\` -> \`query_wave_api\` only for exact signature/global/value uncertainty. HTTP Gateway is not an API lookup fallback.`,
|
|
44886
44849
|
"",
|
|
44887
44850
|
"Mandatory phased handshake:",
|
|
44888
|
-
`Phase 0 WaveEngine Agent SDK preflight is not optional. Do these phases in order before user work: 1 initialize endpoint; 2 call \`self_check_wave_mcp\` with the exact \`expectedVersion\` and \`expectedBuildHash\` from Copy-to-Agent; hard-stop if stale/hardStop is true or tool count/hash looks missing, then restart SDK while preserving the copied
|
|
44851
|
+
`Phase 0 WaveEngine Agent SDK preflight is not optional. Do these phases in order before user work: 1 initialize endpoint; 2 call \`self_check_wave_mcp\` with the exact \`expectedVersion\` and \`expectedBuildHash\` from Copy-to-Agent; hard-stop if stale/hardStop is true or tool count/hash looks missing, then restart SDK while preserving the copied MCP_TOKEN/local pairing secret with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\` using the current MCP_TOKEN value hidden; same-machine HTTP Gateway is degraded fallback only after SDK cannot run, update, or adopt, never because Gateway is familiar/easier; 2a when status is unclear, call \`get_wave_mcp_health\`/\`mcp_status\` to read endpoint/SDK/tool/SDK/session state; 3 call \`get_wave_agent_onboarding\` and cache Priority 1 rules in active context; 4 call \`accept_wave_agent_onboarding\` with acceptedRole true, current promptVersion/promptHash, all required cachedSections, full intentKindsCached list, exact waveEngineSdkCacheCommandCached template, and every context-cache confirmation true; if it returns \`wave_engine_sdk_cache_not_ready\`, update/restart SDK or run the bundled SDK repair command and retry accept; if local SDK cannot work, explicitly accept Studio-ops-only fallback and do not do unfamiliar API authoring; 5 call \`tools/list\` and prefer concrete tool names from the returned catalog; 6 call \`get_wave_session\`; 7 call \`list_wave_files\`; 8 if the tool menu is unclear, call \`get_wave_tool_map\`. Observe tools such as file reads, assets, diagnostics, screenshots, snapshots, performance, and markers stay open. Operate tools such as run preview, hot reload, save/share/rename/open/new project, VFS create/rename/delete, and asset upload/rename/delete are direct Studio commands when the user asks for that operation. Author/Diagnose tools such as \`query_wave_api\`, \`edit_wave_file\`, \`apply_wave_patch\`, and code behavior changes use \`start_wave_task\`. After startup, report phase status briefly. If a required phase fails or any later MCP state is unclear, call \`get_wave_mcp_health\` for state and \`recover_wave_connection({ lastErrorCode?, failedTool?, symptom? })\` for nextAction before asking user for a fresh copy; do not skip ahead.`,
|
|
44889
44852
|
"Tool-name tolerance: concrete names from tools/list remain preferred. Common aliases and safe high-confidence typos are tolerated. Destructive/write fuzzy matches return did-you-mean instead of executing.",
|
|
44890
|
-
"Glossary: WaveEngine Agent SDK = same-machine live MCP transport plus bundled SDK lookup;
|
|
44853
|
+
"Glossary: WaveEngine Agent SDK = same-machine live MCP transport plus bundled SDK lookup; Local Pairing Secret = MCP_TOKEN on localhost, not account/cloud auth; HTTP Gateway Bearer = MCP_TOKEN on HTTP Gateway; WaveEngine SDK Cache = package-bundled public docs/API/skill retrieval; MCP Session = browser pairing state; VFS Mirror = HTTP Gateway read/edit hash snapshot; Project = user workspace content. Do not merge these concepts.",
|
|
44891
44854
|
"",
|
|
44892
44855
|
"Required workflow:",
|
|
44893
44856
|
'1. Use the MECE work-mode split before choosing tools. Observe = read/inspect/answer only, so call open read tools directly. Operate = direct Studio command with no code/design choice, so call the concrete Studio tool directly without `start_wave_task`: run preview, hot reload, save/share, create/delete/rename exact files/assets, upload assets, new project, project rename, or open project by exact projectId. Author = create/change Wave behavior/content through code/API, so call `start_wave_task`, gather evidence, optionally fast-start execute with `nextPhase:"execute"` plus editPlan, then edit. For exact one-file line/text edits, `edit_wave_file` can run immediately after `start_wave_task` when it has exact path plus `startLine`/`endLine`/`text`, `edits:[{startLine,endLine,text}]`, or `oldText`/`newText`; use this for trivial deletes/renames instead of a separate advance call. Diagnose = find root cause first, observe/read first, then transition to Operate or Author only when cause and action are clear. General = not concrete Wave work; use `agent.general`. `query_wave_api`, `edit_wave_file`, `apply_wave_patch`, and semantic/direct code edits are Author/Diagnose tools and remain route-bound. For direct Operate delete/rename/open, exact target is required: project names must be resolved with `list_wave_projects` before `rename_wave_project` or `open_wave_project`; vague file/asset targets require list/read or asking.',
|
|
@@ -44902,14 +44865,14 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT = [
|
|
|
44902
44865
|
"6. For code edits, use `edit_wave_file` as the primary forgiving one-file edit tool. It accepts one exact text edit, one line range, whole-file replacement, or one-file `edits:[...]` arrays. Use `apply_wave_patch` only for grouped/multi-file/strict diff work.",
|
|
44903
44866
|
"7. Studio-managed generated files are MCP read-only for agents: `project.assetrefs.ts`, `project.scene.ts`, `project.scenes.ts`, and `project.execution.ts`. `bootstrap.ts` is normally Studio-managed too; edit it only with a confident `managedFileEditReason`: `world_streaming_or_terrain_provider` (including Google Maps 3D tiles), `render_profile_or_runtime_backend`, `media_consent_or_capture_plan`, `external_ai_or_tts_backend`, `scene_envelope_or_template_baseline`, `baseline_setup_before_user_main`, or `stale_api_update_to_latest`. Never edit bootstrap for assets/loaders, instruments, scene registry, or execution manifest; Studio owns those.",
|
|
44904
44867
|
'7a. VFS non-code note: `.html` files are supported HTML sketches. For Mermaid diagrams/charts, create or edit an exact `.html` file containing `<div class="mermaid">...</div>`. Active HTML files preview in Studio and auto-load Mermaid when `class="mermaid"` is present.',
|
|
44905
|
-
"8. After the final code edit, prefer `awaitHotReload:true` when the preview already ran so the edit response includes hot reload plus bounded diagnostics.
|
|
44868
|
+
"8. After the final code edit, prefer `awaitHotReload:true` when the preview already ran so the edit response includes hot reload plus bounded diagnostics. `requestHotReload:true` also waits for diagnostics by default unless paired with `awaitHotReload:false`. Standalone `run_wave_preview` / `hot_reload_wave_preview` wait by default and return `runtimeVerification`; set `awaitRuntimeResult:false` only for intentional fire-and-poll.",
|
|
44906
44869
|
"9. Always inspect mutation results: changedFiles, changedPaths, partial, skippedOperations, hotReloadRequested, and hotReloadSkippedReason.",
|
|
44907
44870
|
"10. Marker waypoint workflow: when the human asks to use preview marking tools such as `clickToMark()`, route with `marker.use` plus code/project intent, then call `list_wave_runtime_markers` and write marker worldPosition/worldRotation into waypoint/path/placement code. One marker read may happen before routing only when needed to decide intent.",
|
|
44908
44871
|
"11. After meaningful progress, suggest at most one relevant Studio capability when helpful: screenshot, runtime entity snapshot, runtime markers, performance snapshot, asset tools, or project save/share/open. Do not dump a menu.",
|
|
44909
44872
|
"",
|
|
44910
44873
|
"WaveEngine Agent SDK scope:",
|
|
44911
|
-
'This endpoint
|
|
44912
|
-
`Recovery rule: \`recover_wave_connection\` is the first tool after \`agent_onboarding_required\`, \`session_not_found\`, \`command_timeout\`, \`command_lease_expired\`, \`
|
|
44874
|
+
'This endpoint publishes canonical Wave MCP tools only when this Agent SDK build has a real local handler, plus local SDK session-discovery extras. Live-session Studio tools for VFS, preview, capture, runtime probes, assets, uploads, project save/share/open/new/read, and file operations run through the connected browser. Local browser-backed calls wait for the browser result directly. Only call `get_wave_command_result` when a tool result actually contains `status:"pending"` plus `requestId`; otherwise local `get_wave_command_result` exists only for catalog parity and reports that no local pending-command queue is used. Skill/API/guardrail tools read the bundled WaveEngine SDK Cache prepared by the SDK package. Do not treat SDK cache miss as local transport failure.',
|
|
44875
|
+
`Recovery rule: \`recover_wave_connection\` is the first tool after \`agent_onboarding_required\`, \`session_not_found\`, \`command_timeout\`, \`command_lease_expired\`, \`local_sdk_tool_not_implemented\`, \`wave_engine_sdk_cache_required\`, unclear local/HTTP Gateway fallback, or sleeping-tab symptoms. If local HTTP refuses, start/restart WaveEngine Agent SDK and retry 10 seconds. If local HTTP returns 401 but HTTP Gateway accepts the same MCP_TOKEN, SDK is stale/not adopted: restart with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\` using the current MCP_TOKEN value hidden, then retry local. If every endpoint rejects MCP_TOKEN before a tool result, ask user for fresh Copy to Agent.`
|
|
44913
44876
|
].join("\n");
|
|
44914
44877
|
|
|
44915
44878
|
// ../../scripts/wavegenie-sdk/mcp/referenceTools.ts
|
|
@@ -44955,6 +44918,100 @@ function summarizePaths(paths) {
|
|
|
44955
44918
|
function readNumber(value) {
|
|
44956
44919
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
44957
44920
|
}
|
|
44921
|
+
function readString(value) {
|
|
44922
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
44923
|
+
}
|
|
44924
|
+
function readBoolean2(value) {
|
|
44925
|
+
return typeof value === "boolean" ? value : null;
|
|
44926
|
+
}
|
|
44927
|
+
function summarizeCount(count, singular, plural = `${singular}s`) {
|
|
44928
|
+
return `${count} ${count === 1 ? singular : plural}`;
|
|
44929
|
+
}
|
|
44930
|
+
function summarizeActionLabel(value) {
|
|
44931
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toUpperCase();
|
|
44932
|
+
}
|
|
44933
|
+
function summarizeToolFailure(value) {
|
|
44934
|
+
const error = readRecord(value.error);
|
|
44935
|
+
const message = readString(value.message) ?? readString(error?.message) ?? readString(value.error);
|
|
44936
|
+
return message ? `OPERATION FAILED: ${message}` : "OPERATION FAILED";
|
|
44937
|
+
}
|
|
44938
|
+
function summarizePendingToolResult(value) {
|
|
44939
|
+
const status = readString(value.status);
|
|
44940
|
+
if (!status) return null;
|
|
44941
|
+
const requestId = readString(value.requestId) ?? readString(value.commandId);
|
|
44942
|
+
const action = readString(value.action);
|
|
44943
|
+
const label = action ? summarizeActionLabel(action) : "OPERATION";
|
|
44944
|
+
if (status === "pending") {
|
|
44945
|
+
return `${label} PENDING${requestId ? `: requestId ${requestId}` : ""}; NEXT: poll get_wave_command_result`;
|
|
44946
|
+
}
|
|
44947
|
+
return `${label} ${status.toUpperCase()}${requestId ? `: requestId ${requestId}` : ""}`;
|
|
44948
|
+
}
|
|
44949
|
+
function summarizeProjectOrAssetOperation(value) {
|
|
44950
|
+
const ok = readBoolean2(value.ok);
|
|
44951
|
+
if (ok === false) return summarizeToolFailure(value);
|
|
44952
|
+
const pending = summarizePendingToolResult(value);
|
|
44953
|
+
if (pending) return pending;
|
|
44954
|
+
if (ok !== true) return null;
|
|
44955
|
+
const templates = Array.isArray(value.templates) ? value.templates : null;
|
|
44956
|
+
if (templates) return `PROJECT TEMPLATES OK: ${summarizeCount(templates.length, "template")}`;
|
|
44957
|
+
const projects = Array.isArray(value.projects) ? value.projects : null;
|
|
44958
|
+
if (projects) {
|
|
44959
|
+
const total = readNumber(value.total) ?? projects.length;
|
|
44960
|
+
return `PROJECT LIST OK: ${summarizeCount(total, "project")}`;
|
|
44961
|
+
}
|
|
44962
|
+
const assets = Array.isArray(value.assets) ? value.assets : null;
|
|
44963
|
+
if (assets) return `ASSET LIST OK: ${summarizeCount(assets.length, "asset")}`;
|
|
44964
|
+
const uploadId = readString(value.uploadId);
|
|
44965
|
+
if (uploadId) {
|
|
44966
|
+
const chunkIndex = readNumber(value.chunkIndex);
|
|
44967
|
+
const totalChunks = readNumber(value.totalChunks);
|
|
44968
|
+
if (chunkIndex !== null && totalChunks !== null) {
|
|
44969
|
+
return `ASSET UPLOAD CHUNK OK: chunk ${chunkIndex + 1}/${totalChunks}; uploadId ${uploadId}`;
|
|
44970
|
+
}
|
|
44971
|
+
const receivedBytes = readNumber(value.receivedBytes);
|
|
44972
|
+
if (receivedBytes !== null) {
|
|
44973
|
+
return `ASSET UPLOAD STATUS OK: ${summarizeCount(receivedBytes, "byte")} received; uploadId ${uploadId}`;
|
|
44974
|
+
}
|
|
44975
|
+
if (readNumber(value.deletedCount) !== null) {
|
|
44976
|
+
return `ASSET UPLOAD ABORT OK: staging cleaned for uploadId ${uploadId}`;
|
|
44977
|
+
}
|
|
44978
|
+
if (readString(value.uploadUrl)) {
|
|
44979
|
+
return `ASSET UPLOAD URL OK: uploadId ${uploadId}; NEXT: upload bytes, check status, then commit_wave_asset_upload`;
|
|
44980
|
+
}
|
|
44981
|
+
return `ASSET UPLOAD STEP OK: uploadId ${uploadId}`;
|
|
44982
|
+
}
|
|
44983
|
+
const action = readString(value.action);
|
|
44984
|
+
if (action === "shareProject" || readString(value.shareUrl) || readString(value.url)) {
|
|
44985
|
+
const url = readString(value.shareUrl) ?? readString(value.url);
|
|
44986
|
+
return url ? `PROJECT SHARE OK: ${url}` : "PROJECT SHARE OK";
|
|
44987
|
+
}
|
|
44988
|
+
if (action) {
|
|
44989
|
+
const label = summarizeActionLabel(action);
|
|
44990
|
+
const project2 = readRecord(value.project);
|
|
44991
|
+
const asset2 = readRecord(value.asset);
|
|
44992
|
+
const projectName = readString(project2?.name) ?? readString(value.name);
|
|
44993
|
+
const assetPath = readString(value.path);
|
|
44994
|
+
if (action.toLowerCase().includes("project") || project2) {
|
|
44995
|
+
return `${label} OK${projectName ? `: ${projectName}` : ""}`;
|
|
44996
|
+
}
|
|
44997
|
+
if (action === "rename" || action === "delete" || action === "uploadAsset" || asset2 || assetPath) {
|
|
44998
|
+
if (value.skipped === true) {
|
|
44999
|
+
const message = readString(value.message);
|
|
45000
|
+
return `ASSET ${label} SKIPPED${message ? `: ${message}` : ""}`;
|
|
45001
|
+
}
|
|
45002
|
+
return `ASSET ${label} OK${assetPath ? `: ${assetPath}` : ""}`;
|
|
45003
|
+
}
|
|
45004
|
+
return `${label} OK`;
|
|
45005
|
+
}
|
|
45006
|
+
const project = readRecord(value.project);
|
|
45007
|
+
if (project) {
|
|
45008
|
+
const projectName = readString(project.name);
|
|
45009
|
+
return `PROJECT OK${projectName ? `: ${projectName}` : ""}`;
|
|
45010
|
+
}
|
|
45011
|
+
const asset = readRecord(value.asset);
|
|
45012
|
+
if (asset || readString(value.assetKind)) return "ASSET OK";
|
|
45013
|
+
return null;
|
|
45014
|
+
}
|
|
44958
45015
|
function readRuntimeVerificationEditorErrorCount(value) {
|
|
44959
45016
|
const verification = readRecord(value.runtimeVerification);
|
|
44960
45017
|
const directCount = readNumber(verification?.editorErrorCount);
|
|
@@ -44999,12 +45056,46 @@ function summarizeHotReloadVerification(value) {
|
|
|
44999
45056
|
if (verificationOutcome === "error") return "; HOT RELOAD ERROR: read runtimeVerification.diagnostics";
|
|
45000
45057
|
return null;
|
|
45001
45058
|
}
|
|
45059
|
+
function summarizeRuntimeActionVerification(value, action) {
|
|
45060
|
+
const verification = readRecord(value.runtimeVerification);
|
|
45061
|
+
if (!verification) return null;
|
|
45062
|
+
const editorErrorCount = readRuntimeVerificationEditorErrorCount(value);
|
|
45063
|
+
if (editorErrorCount > 0) {
|
|
45064
|
+
return `${action} BLOCKED: ${editorErrorCount} editor/linter error${editorErrorCount === 1 ? "" : "s"}; NEXT: read runtimeVerification.diagnostics.editorDiagnostics before reporting success`;
|
|
45065
|
+
}
|
|
45066
|
+
if (verification.timedOut === true) {
|
|
45067
|
+
return `${action} PENDING: diagnostics timed out; poll get_wave_runtime_diagnostics`;
|
|
45068
|
+
}
|
|
45069
|
+
const verificationOutcome = verification.verificationOutcome;
|
|
45070
|
+
if (verificationOutcome === "success") return `${action} OK`;
|
|
45071
|
+
if (verificationOutcome === "error") return `${action} ERROR: read runtimeVerification.diagnostics`;
|
|
45072
|
+
return null;
|
|
45073
|
+
}
|
|
45002
45074
|
function buildWaveMcpToolResultNextAction(value) {
|
|
45003
45075
|
const changedPaths = readStringArray2(value.changedPaths);
|
|
45004
45076
|
const changedFiles = readPathArray(value.changedFiles);
|
|
45005
45077
|
const editedPaths = changedPaths.length > 0 ? changedPaths : changedFiles;
|
|
45006
45078
|
const skippedReasons = readSkippedReasons(value.skippedOperations);
|
|
45007
45079
|
const directEditorErrorCount = readDirectEditorErrorCount(value);
|
|
45080
|
+
if (value.ok === false) {
|
|
45081
|
+
return "Operation failed. Read the returned error/message, fix the input or session state, then retry.";
|
|
45082
|
+
}
|
|
45083
|
+
if (readString(value.status) === "pending") {
|
|
45084
|
+
return "Browser command is still pending. Poll get_wave_command_result with the returned requestId before reporting completion.";
|
|
45085
|
+
}
|
|
45086
|
+
if (value.action === "hotReload" || value.action === "run") {
|
|
45087
|
+
const editorErrorCount = readRuntimeVerificationEditorErrorCount(value);
|
|
45088
|
+
if (editorErrorCount > 0) {
|
|
45089
|
+
return "Editor/linter errors block this preview action. Read runtimeVerification.diagnostics.editorDiagnostics, fix those errors, then re-run hot reload or preview.";
|
|
45090
|
+
}
|
|
45091
|
+
const verification = readRecord(value.runtimeVerification);
|
|
45092
|
+
if (verification?.timedOut === true) {
|
|
45093
|
+
return "Runtime verification timed out. Poll get_wave_runtime_diagnostics until runtimeBusy is false and lastRuntimeOutcome is success or error.";
|
|
45094
|
+
}
|
|
45095
|
+
if (verification?.verificationOutcome === "error") {
|
|
45096
|
+
return "Runtime action failed. Read runtimeVerification.diagnostics.latestError and editorDiagnostics before retrying.";
|
|
45097
|
+
}
|
|
45098
|
+
}
|
|
45008
45099
|
if (directEditorErrorCount !== null && directEditorErrorCount > 0) {
|
|
45009
45100
|
return "Editor/linter errors block this code. Read editorDiagnostics, fix those errors, then re-run hot reload or preview.";
|
|
45010
45101
|
}
|
|
@@ -45029,6 +45120,8 @@ function buildWaveMcpToolResultNextAction(value) {
|
|
|
45029
45120
|
}
|
|
45030
45121
|
function waveMcpToolResultNeedsAttention(value, nextAction) {
|
|
45031
45122
|
if (nextAction) return true;
|
|
45123
|
+
if (value.ok === false) return true;
|
|
45124
|
+
if (readString(value.status) === "pending") return true;
|
|
45032
45125
|
const verificationOk = readRuntimeVerificationOk(value);
|
|
45033
45126
|
if (verificationOk === false) return true;
|
|
45034
45127
|
const directEditorErrorCount = readDirectEditorErrorCount(value);
|
|
@@ -45060,8 +45153,10 @@ function buildWaveMcpToolResultSummary(value) {
|
|
|
45060
45153
|
if (value.action === "hotReload" || value.action === "run") {
|
|
45061
45154
|
const action = value.action === "run" ? "RUN" : "HOT RELOAD";
|
|
45062
45155
|
if (value.requested === false || value.ok === false) return `${action} NOT REQUESTED`;
|
|
45063
|
-
return `${action} REQUESTED: not proof of runtime success; poll get_wave_runtime_diagnostics until runtimeBusy is false and lastRuntimeOutcome is success or error`;
|
|
45156
|
+
return summarizeRuntimeActionVerification(value, action) ?? `${action} REQUESTED: not proof of runtime success; poll get_wave_runtime_diagnostics until runtimeBusy is false and lastRuntimeOutcome is success or error`;
|
|
45064
45157
|
}
|
|
45158
|
+
const operationSummary = summarizeProjectOrAssetOperation(value);
|
|
45159
|
+
if (operationSummary) return operationSummary;
|
|
45065
45160
|
if (changedFiles.length > 0) {
|
|
45066
45161
|
return `EDIT APPLIED: ${summarizePaths(changedFiles)} changed`;
|
|
45067
45162
|
}
|
|
@@ -45154,11 +45249,6 @@ function errorToolResult(code, message, details) {
|
|
|
45154
45249
|
isError: true
|
|
45155
45250
|
};
|
|
45156
45251
|
}
|
|
45157
|
-
function readToolResultErrorCode(result) {
|
|
45158
|
-
const error = result.structuredContent?.error;
|
|
45159
|
-
if (!isRecord2(error)) return null;
|
|
45160
|
-
return typeof error.code === "string" ? error.code : null;
|
|
45161
|
-
}
|
|
45162
45252
|
|
|
45163
45253
|
// ../../scripts/wavegenie-sdk/mcp/referenceTools.ts
|
|
45164
45254
|
function getLocalCorpusCacheRoot() {
|
|
@@ -45297,12 +45387,12 @@ function localCorpusSource(current) {
|
|
|
45297
45387
|
};
|
|
45298
45388
|
}
|
|
45299
45389
|
async function inspectLocalCorpusCacheForContext(context) {
|
|
45300
|
-
const
|
|
45390
|
+
const productionGatewayPairing = context.agentToken?.startsWith(LOCAL_HOSTED_TOKEN_PREFIX) ?? false;
|
|
45301
45391
|
const current = await readLocalCorpusCurrent();
|
|
45302
45392
|
const cacheRoot = getLocalCorpusCacheRoot();
|
|
45303
45393
|
if (current) {
|
|
45304
45394
|
return {
|
|
45305
|
-
required:
|
|
45395
|
+
required: productionGatewayPairing,
|
|
45306
45396
|
ready: true,
|
|
45307
45397
|
exists: true,
|
|
45308
45398
|
verification: "package_bundled_sdk_cache_verified_on_disk",
|
|
@@ -45311,11 +45401,11 @@ async function inspectLocalCorpusCacheForContext(context) {
|
|
|
45311
45401
|
};
|
|
45312
45402
|
}
|
|
45313
45403
|
return {
|
|
45314
|
-
required:
|
|
45404
|
+
required: productionGatewayPairing,
|
|
45315
45405
|
ready: false,
|
|
45316
45406
|
exists: false,
|
|
45317
|
-
errorCode:
|
|
45318
|
-
message:
|
|
45407
|
+
errorCode: productionGatewayPairing ? "wave_engine_sdk_cache_not_ready" : "wave_engine_sdk_cache_missing",
|
|
45408
|
+
message: productionGatewayPairing ? "No verified local WaveEngine SDK Cache exists. Update/restart SDK or run bundled SDK repair before normal production onboarding success, or explicitly accept degraded Studio-ops-only fallback if local SDK cannot work." : "No local WaveEngine SDK Cache exists. Live Studio tools can still work; run bundled SDK repair before unfamiliar skill/API lookup.",
|
|
45319
45409
|
cacheRoot,
|
|
45320
45410
|
commandTemplate: WAVE_MCP_CORPUS_CACHE_COMMAND_TEMPLATE
|
|
45321
45411
|
};
|
|
@@ -45742,26 +45832,26 @@ async function ensureLocalCorpusCurrent(context) {
|
|
|
45742
45832
|
return await readLocalCorpusCurrent();
|
|
45743
45833
|
}
|
|
45744
45834
|
async function prepareLocalCorpusForOnboarding(context) {
|
|
45745
|
-
const
|
|
45835
|
+
const productionGatewayPairing = context.agentToken?.startsWith(LOCAL_HOSTED_TOKEN_PREFIX) ?? false;
|
|
45746
45836
|
const current = await ensureLocalCorpusCurrent(context);
|
|
45747
45837
|
if (current) {
|
|
45748
45838
|
return {
|
|
45749
|
-
required:
|
|
45839
|
+
required: productionGatewayPairing,
|
|
45750
45840
|
ready: true,
|
|
45751
45841
|
verification: "package_bundled_sdk_cache_verified_on_disk",
|
|
45752
45842
|
...localCorpusSource(current)
|
|
45753
45843
|
};
|
|
45754
45844
|
}
|
|
45755
45845
|
return {
|
|
45756
|
-
required:
|
|
45846
|
+
required: productionGatewayPairing,
|
|
45757
45847
|
ready: false,
|
|
45758
45848
|
errorCode: "wave_engine_sdk_cache_not_ready",
|
|
45759
|
-
message:
|
|
45849
|
+
message: productionGatewayPairing ? "Production HTTP Gateway pairing requires local WaveEngine SDK Cache before onboarding can be accepted." : "Local-only/dev pairing has no current WaveEngine SDK Cache; live Studio tools can work, but unfamiliar skill/API lookup needs bundled SDK repair.",
|
|
45760
45850
|
cacheRoot: getLocalCorpusCacheRoot(),
|
|
45761
45851
|
commandTemplate: WAVE_MCP_CORPUS_CACHE_COMMAND_TEMPLATE
|
|
45762
45852
|
};
|
|
45763
45853
|
}
|
|
45764
|
-
async function
|
|
45854
|
+
async function localSdkLookupTool(input) {
|
|
45765
45855
|
if (input.name === "list_wave_skill_families") return await localListWaveSkillFamilies(input.args, input.context);
|
|
45766
45856
|
if (input.name === "query_wave_skills") return await localQueryWaveSkills(input.args, input.context);
|
|
45767
45857
|
if (input.name === "get_wave_skill") return await localGetWaveSkill(input.args, input.context);
|
|
@@ -45769,19 +45859,16 @@ async function localReferenceTool(input) {
|
|
|
45769
45859
|
if (input.name === "get_wave_coding_guardrails") return await localGetWaveCodingGuardrails();
|
|
45770
45860
|
return null;
|
|
45771
45861
|
}
|
|
45772
|
-
async function
|
|
45773
|
-
const localResult = await
|
|
45862
|
+
async function runLocalSdkLookupTool(input) {
|
|
45863
|
+
const localResult = await localSdkLookupTool({
|
|
45774
45864
|
name: input.name,
|
|
45775
45865
|
args: input.args,
|
|
45776
45866
|
context: input.context
|
|
45777
45867
|
});
|
|
45778
|
-
|
|
45779
|
-
|
|
45780
|
-
|
|
45781
|
-
|
|
45782
|
-
return localResult ?? errorToolResult(
|
|
45783
|
-
"wave_engine_sdk_cache_required",
|
|
45784
|
-
`${input.name} needs the bundled WaveEngine SDK Cache from the local wave3d-agent-sdk package. Update/restart SDK or run the bundled SDK repair command. HTTP Gateway is not an API/skill lookup fallback.`
|
|
45868
|
+
if (localResult) return localResult;
|
|
45869
|
+
return errorToolResult(
|
|
45870
|
+
"local_sdk_lookup_handler_missing",
|
|
45871
|
+
`${input.name} is listed as a local SDK lookup tool but has no local handler. Update wave3d-agent-sdk; HTTP Gateway is not an API/skill lookup fallback.`
|
|
45785
45872
|
);
|
|
45786
45873
|
}
|
|
45787
45874
|
|
|
@@ -46506,7 +46593,10 @@ function normalizeEditWaveFileMode(value) {
|
|
|
46506
46593
|
return void 0;
|
|
46507
46594
|
}
|
|
46508
46595
|
function shouldAwaitHotReloadDiagnostics(args) {
|
|
46509
|
-
|
|
46596
|
+
if (args?.awaitHotReload === false || args?.awaitRuntimeDiagnostics === false || args?.returnRuntimeDiagnostics === false || args?.awaitDiagnostics === false) {
|
|
46597
|
+
return false;
|
|
46598
|
+
}
|
|
46599
|
+
return args?.awaitHotReload === true || args?.awaitRuntimeDiagnostics === true || args?.returnRuntimeDiagnostics === true || args?.awaitDiagnostics === true || args?.requestHotReload === true;
|
|
46510
46600
|
}
|
|
46511
46601
|
function runtimeVerificationArgs(args) {
|
|
46512
46602
|
const awaitHotReload = shouldAwaitHotReloadDiagnostics(args);
|
|
@@ -47470,7 +47560,7 @@ var HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES = {
|
|
|
47470
47560
|
awaitHotReload: {
|
|
47471
47561
|
type: "boolean",
|
|
47472
47562
|
default: false,
|
|
47473
|
-
description: "Set true on the final edit to combine edit + hot reload + bounded runtime diagnostics in one MCP call. Implies requestHotReload.
|
|
47563
|
+
description: "Set true on the final edit to combine edit + hot reload + bounded runtime diagnostics in one MCP call. Implies requestHotReload. requestHotReload:true uses this wait behavior by default; set awaitHotReload:false only for intentional fire-and-poll."
|
|
47474
47564
|
},
|
|
47475
47565
|
awaitRuntimeDiagnostics: {
|
|
47476
47566
|
type: "boolean",
|
|
@@ -47485,7 +47575,7 @@ var HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES = {
|
|
|
47485
47575
|
minimum: 500,
|
|
47486
47576
|
maximum: 15e3,
|
|
47487
47577
|
default: 6e3,
|
|
47488
|
-
description: "
|
|
47578
|
+
description: "Maximum wait for fresh runtime success/error diagnostics when awaitHotReload is true or requestHotReload triggers the default wait behavior."
|
|
47489
47579
|
},
|
|
47490
47580
|
awaitTimeoutMs: {
|
|
47491
47581
|
type: "integer",
|
|
@@ -47498,7 +47588,7 @@ var HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES = {
|
|
|
47498
47588
|
minimum: 1,
|
|
47499
47589
|
maximum: 200,
|
|
47500
47590
|
default: 80,
|
|
47501
|
-
description: "
|
|
47591
|
+
description: "Console/runtime log limit returned with runtime diagnostics when awaitHotReload is true or requestHotReload triggers the default wait behavior."
|
|
47502
47592
|
}
|
|
47503
47593
|
};
|
|
47504
47594
|
var ASSET_CODE_REF_DISCOVERY_INPUT_SCHEMA = {
|
|
@@ -47510,12 +47600,12 @@ var ASSET_CODE_REF_DISCOVERY_INPUT_SCHEMA = {
|
|
|
47510
47600
|
},
|
|
47511
47601
|
bucket: {
|
|
47512
47602
|
type: "string",
|
|
47513
|
-
description: "
|
|
47603
|
+
description: "Accepted synonym for category. Prefer category in new calls."
|
|
47514
47604
|
},
|
|
47515
47605
|
buckets: {
|
|
47516
47606
|
type: "array",
|
|
47517
47607
|
items: { type: "string" },
|
|
47518
|
-
description: "
|
|
47608
|
+
description: "Accepted synonym for category; first recognized item is used. Prefer category in new calls."
|
|
47519
47609
|
},
|
|
47520
47610
|
query: {
|
|
47521
47611
|
type: "string",
|
|
@@ -47599,7 +47689,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
47599
47689
|
},
|
|
47600
47690
|
{
|
|
47601
47691
|
name: "accept_wave_agent_onboarding",
|
|
47602
|
-
description: '[studio.mcp] Required acknowledgement after reading `get_wave_agent_onboarding`. Call only after keeping the role, coding guardrails, intent taxonomy, authoring workflow, and Studio tool policy in active LLM context. Requires exact promptVersion/promptHash, acceptedRole true, required cachedSections, full intentKindsCached, exact waveEngineSdkCacheCommandCached, and all context-cache booleans true. Production HTTP Gateway may also require local WaveEngine SDK cache proof before normal cached success. If SDK cache cannot work because sandbox/no filesystem/no Node/npm/user refusal/refresh failure, explicitly pass waveEngineSdkFallbackMode:"studio_ops_only", a valid waveEngineSdkUnavailableReason, and studioOpsOnlyFallbackAccepted:true, then warn user HTTP Gateway is Studio-ops-only and
|
|
47692
|
+
description: '[studio.mcp] Required acknowledgement after reading `get_wave_agent_onboarding`. Call only after keeping the role, coding guardrails, intent taxonomy, authoring workflow, and Studio tool policy in active LLM context. Requires exact promptVersion/promptHash, acceptedRole true, required cachedSections, full intentKindsCached, exact waveEngineSdkCacheCommandCached, and all context-cache booleans true. Production HTTP Gateway may also require local WaveEngine SDK cache proof before normal cached success. If SDK cache cannot work because sandbox/no filesystem/no Node/npm/user refusal/refresh failure, explicitly pass waveEngineSdkFallbackMode:"studio_ops_only", a valid waveEngineSdkUnavailableReason, and studioOpsOnlyFallbackAccepted:true, then warn user HTTP Gateway is Studio-ops-only and skill/API lookup requires local SDK/cache repair. After success, stay in Wave Studio authoring-agent role and briefly confirm role accepted.',
|
|
47603
47693
|
inputSchema: {
|
|
47604
47694
|
type: "object",
|
|
47605
47695
|
properties: {
|
|
@@ -47666,7 +47756,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
47666
47756
|
},
|
|
47667
47757
|
studioOpsOnlyFallbackAccepted: {
|
|
47668
47758
|
type: "boolean",
|
|
47669
|
-
description: "Required true with waveEngineSdkFallbackMode. Agent must warn user that HTTP Gateway is Studio-ops-only without local SDK cache;
|
|
47759
|
+
description: "Required true with waveEngineSdkFallbackMode. Agent must warn user that HTTP Gateway is Studio-ops-only without local SDK cache; skill/API lookup requires local SDK/cache repair."
|
|
47670
47760
|
},
|
|
47671
47761
|
agentName: { type: "string" },
|
|
47672
47762
|
agentProvider: { type: "string" }
|
|
@@ -47735,7 +47825,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
47735
47825
|
},
|
|
47736
47826
|
{
|
|
47737
47827
|
name: "start_wave_task",
|
|
47738
|
-
description: '[studio.mcp] Start the Wave Agent Behavior Harness for Author or Diagnose work: code authoring, debugging,
|
|
47828
|
+
description: '[studio.mcp] Start the Wave Agent Behavior Harness for Author or Diagnose work: code authoring, debugging, local SDK skill/API lookup, semantic edits, and multi-step investigations. Do not use this for Observe requests (read/inspect) or Operate requests (direct Studio commands such as run preview, hot reload, save, share, open project by resolved projectId, create/delete/rename exact files/assets). Classify routed intent chunks across project/code/direct-edit/semantic-guess/debug/VFS/asset/runtime/visual/marker/preview/general, then use returned taskRouteId in route-bound authoring tools. Canonical examples: run project -> preview.control direct Operate, no route; delete exact /foo.ts -> vfs.manage direct Operate, no route; call showDirection on cube -> code.direct_edit route; change existing cube color red to blue -> code.semantic_guess_edit route; add mountain or place objects in line -> code.author route; investigate runtime error -> code.debug route. Common casing/punctuation variants are normalized, but canonical kind values are preferred. Use code.direct_edit for exact power-user commands such as \u201Ccall showDirection on Amy\u201D. Use code.semantic_guess_edit only to change an existing API call/argument/literal/value such as COLOR.RED -> COLOR.BLUE; if the edit adds lines, creates objects, switches API, or chooses a WaveEngine pattern such as placement/layout, use code.author. If request is irrelevant or too broad, use agent.general and guide user toward a concrete Wave milestone instead of forcing Wave tools. Use code.debug alone for diagnose/report-only; for bug-fix requests include both code.debug and code.author. Fast start: when you already read enough context and know the edit, include nextPhase:"execute" plus editPlan/verificationPlan in this same call. Even faster: for exact line/text edits, start the route then call edit_wave_file directly with path plus exact startLine/endLine/text, edits:[...], or oldText/newText; no separate advance_wave_task needed.',
|
|
47739
47829
|
inputSchema: {
|
|
47740
47830
|
type: "object",
|
|
47741
47831
|
properties: {
|
|
@@ -47986,7 +48076,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
47986
48076
|
},
|
|
47987
48077
|
{
|
|
47988
48078
|
name: "advance_wave_task",
|
|
47989
|
-
description: "[studio.mcp] Advance an Author/Diagnose task route after evidence is gathered. taskRouteId is recommended, but if omitted Studio uses this
|
|
48079
|
+
description: "[studio.mcp] Advance an Author/Diagnose task route after evidence is gathered. taskRouteId is recommended, but if omitted Studio uses this MCP session\u2019s active route and still enforces phase/intent checks; routeId and nested route.taskRouteId/id are accepted. Phase aliases targetPhase and phase are accepted. Use before local-SDK query_wave_api (lookup), broad authoring edits/apply_patch (execute), and final route verification. Do not advance just to run direct Operate tools such as run_wave_preview, hot_reload_wave_preview, save_wave_project, or create_wave_file when the user asked for that operation directly. Fast-lane direct/semantic code routes can skip lookup and advance straight to execute when exact user wording or current code is enough. This is the checkpoint that prevents jump-to-API/jump-to-edit behavior.",
|
|
47990
48080
|
inputSchema: {
|
|
47991
48081
|
type: "object",
|
|
47992
48082
|
properties: {
|
|
@@ -48076,7 +48166,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48076
48166
|
},
|
|
48077
48167
|
{
|
|
48078
48168
|
name: "get_wave_task_route",
|
|
48079
|
-
description: "[studio.mcp] Return the current Wave Agent Behavior Harness route, phase, evidence, and currently unlocked tool families for this
|
|
48169
|
+
description: "[studio.mcp] Return the current Wave Agent Behavior Harness route, phase, evidence, and currently unlocked tool families for this MCP session. taskRouteId is optional; routeId aliases are accepted by routed tools.",
|
|
48080
48170
|
inputSchema: {
|
|
48081
48171
|
type: "object",
|
|
48082
48172
|
properties: {
|
|
@@ -48105,7 +48195,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48105
48195
|
},
|
|
48106
48196
|
{
|
|
48107
48197
|
name: "list_wave_skill_families",
|
|
48108
|
-
description: "[wave.*]
|
|
48198
|
+
description: "[wave.*] Local WaveEngine SDK family router for code-authoring. HTTP Gateway hides/retires this lookup. Use after intent chunking/Core Intent Pass and before query_wave_skills/query_wave_api. Pick one or more families from this list first, e.g. continuous left turning -> wave.transform plus possibly wave.animate. This selects authoring direction; it does not inspect exact signatures.",
|
|
48109
48199
|
inputSchema: {
|
|
48110
48200
|
type: "object",
|
|
48111
48201
|
properties: {
|
|
@@ -48119,7 +48209,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48119
48209
|
},
|
|
48120
48210
|
{
|
|
48121
48211
|
name: "query_wave_skills",
|
|
48122
|
-
description: '[wave.*] Search compact WaveEngine skill cards only after skill-family selection. Do not pass the raw user request as a broad query. First call list_wave_skill_families, choose families from intent chunks/Core Intent Pass, then call this with families/familyId plus a small within-family query such as "continuous rotation" or "semantic direction". Use skillIds only for exact known skill ids.',
|
|
48212
|
+
description: '[wave.*] Local WaveEngine SDK skill-card lookup. HTTP Gateway hides/retires this lookup. Search compact WaveEngine skill cards only after skill-family selection. Do not pass the raw user request as a broad query. First call list_wave_skill_families, choose families from intent chunks/Core Intent Pass, then call this with families/familyId plus a small within-family query such as "continuous rotation" or "semantic direction". Use skillIds only for exact known skill ids.',
|
|
48123
48213
|
inputSchema: {
|
|
48124
48214
|
type: "object",
|
|
48125
48215
|
properties: {
|
|
@@ -48170,7 +48260,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48170
48260
|
},
|
|
48171
48261
|
{
|
|
48172
48262
|
name: "get_wave_skill",
|
|
48173
|
-
description: "[wave.*] Read one generated WaveEngine skill card by skillId, id, or name. Use after list_wave_skill_families/query_wave_skills to inspect routing, examples, supporting skills, and anti-patterns.",
|
|
48263
|
+
description: "[wave.*] Local WaveEngine SDK skill-card read. HTTP Gateway hides/retires this lookup. Read one generated WaveEngine skill card by skillId, id, or name. Use after list_wave_skill_families/query_wave_skills to inspect routing, examples, supporting skills, and anti-patterns.",
|
|
48174
48264
|
inputSchema: {
|
|
48175
48265
|
type: "object",
|
|
48176
48266
|
properties: {
|
|
@@ -48534,19 +48624,27 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48534
48624
|
},
|
|
48535
48625
|
{
|
|
48536
48626
|
name: "read_wave_project",
|
|
48537
|
-
description: `[studio.project] Read a
|
|
48627
|
+
description: `[studio.project] Read a Wave Studio project's VFS/code content without opening it in the paired editor. Use this to learn from example packs or compare patterns before editing the live project. It does not replace the current workspace, does not change dirty state, and does not run preview. For saved/listed projects, pass exact projectId/id/project from list_wave_projects, not a fuzzy project name. For shared or published links, pass url/projectUrl/shareUrl/publishedUrl directly; silent URL reading supports old shared URLs like /waveStudio?share=<uuid>, new shared alias URLs, old/new published /p/<user>/<id> URLs, and /waveStudio?source=published&user=<user>&id=<id>. Prefer url for links and projectId for listed ids.${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
48538
48628
|
inputSchema: {
|
|
48539
48629
|
type: "object",
|
|
48540
48630
|
properties: {
|
|
48541
48631
|
projectId: { type: "string" },
|
|
48542
48632
|
id: { type: "string" },
|
|
48543
48633
|
project: { type: "string" },
|
|
48634
|
+
url: { type: "string" },
|
|
48635
|
+
projectUrl: { type: "string" },
|
|
48636
|
+
shareUrl: { type: "string" },
|
|
48637
|
+
publishedUrl: { type: "string" },
|
|
48544
48638
|
idempotencyKey: { type: "string" }
|
|
48545
48639
|
},
|
|
48546
48640
|
anyOf: [
|
|
48547
48641
|
{ required: ["projectId"] },
|
|
48548
48642
|
{ required: ["id"] },
|
|
48549
|
-
{ required: ["project"] }
|
|
48643
|
+
{ required: ["project"] },
|
|
48644
|
+
{ required: ["url"] },
|
|
48645
|
+
{ required: ["projectUrl"] },
|
|
48646
|
+
{ required: ["shareUrl"] },
|
|
48647
|
+
{ required: ["publishedUrl"] }
|
|
48550
48648
|
],
|
|
48551
48649
|
additionalProperties: false
|
|
48552
48650
|
}
|
|
@@ -48712,7 +48810,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48712
48810
|
},
|
|
48713
48811
|
includeDataUrl: {
|
|
48714
48812
|
type: "boolean",
|
|
48715
|
-
description: '
|
|
48813
|
+
description: 'Accepted synonym for returnMode:"dataUrl". When true, also return dataUrl. Default false avoids duplicating large base64 output.'
|
|
48716
48814
|
},
|
|
48717
48815
|
saveToLocalFile: {
|
|
48718
48816
|
type: "boolean",
|
|
@@ -48759,7 +48857,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48759
48857
|
},
|
|
48760
48858
|
{
|
|
48761
48859
|
name: "edit_wave_file",
|
|
48762
|
-
description: `[studio.vfs] PRIMARY forgiving one-file edit tool. Use this first for simple code edits: replace exact text, replace/delete a 1-based inclusive full-file line range, apply several one-file line/text edits through edits:[...], replace/delete a statement/fluent block by containing text, replace an inclusive fromText/toText range, or replace a whole file. For exact code.direct_edit/code.semantic_guess_edit/vfs.manage edits, this can run right after start_wave_task in context phase when args include exact path plus startLine/endLine/text, edits:[...], oldText/newText, deleteStatementContaining, replaceBlockContaining, blockContaining, or replaceBetween; no separate advance_wave_task is needed. mode is optional: oldText infers replaceText, edits:[{startLine,endLine,text}] infers multiLineEdits, edits:[{rangeOffset,rangeLength,text}] infers multiTextEdits, startLine/endLine infers replaceLines, block/between fields infer block line replacement, and path+text/content with no oldText infers whole-file replacement. Do not pass baseHash for simple edits; Studio resolves the latest file contentHash and still applies stale-write checks. Empty replacement text deletes. Prefer blockContaining/deleteStatementContaining over fragile line numbers when editing fluent Wave chains. Use ensureBlankLineAfter:true when replacing a line block that should keep one blank separator before the following code. Prefer text/newText; replacement/content are accepted aliases. Response begins with resultSummary: EDIT APPLIED or EDIT NOT APPLIED, and includes editMode/editTarget plus changedPaths/changedFiles. After the final code edit, prefer awaitHotReload:true so preview refresh and bounded diagnostics return in the same response;
|
|
48860
|
+
description: `[studio.vfs] PRIMARY forgiving one-file edit tool. Use this first for simple code edits: replace exact text, replace/delete a 1-based inclusive full-file line range, apply several one-file line/text edits through edits:[...], replace/delete a statement/fluent block by containing text, replace an inclusive fromText/toText range, or replace a whole file. For exact code.direct_edit/code.semantic_guess_edit/vfs.manage edits, this can run right after start_wave_task in context phase when args include exact path plus startLine/endLine/text, edits:[...], oldText/newText, deleteStatementContaining, replaceBlockContaining, blockContaining, or replaceBetween; no separate advance_wave_task is needed. mode is optional: oldText infers replaceText, edits:[{startLine,endLine,text}] infers multiLineEdits, edits:[{rangeOffset,rangeLength,text}] infers multiTextEdits, startLine/endLine infers replaceLines, block/between fields infer block line replacement, and path+text/content with no oldText infers whole-file replacement. Do not pass baseHash for simple edits; Studio resolves the latest file contentHash and still applies stale-write checks. Empty replacement text deletes. Prefer blockContaining/deleteStatementContaining over fragile line numbers when editing fluent Wave chains. Use ensureBlankLineAfter:true when replacing a line block that should keep one blank separator before the following code. Prefer text/newText; replacement/content are accepted aliases. Response begins with resultSummary: EDIT APPLIED or EDIT NOT APPLIED, and includes editMode/editTarget plus changedPaths/changedFiles. After the final code edit, prefer awaitHotReload:true so preview refresh and bounded diagnostics return in the same response; requestHotReload:true also waits by default unless awaitHotReload:false is passed intentionally. Inspect changedPaths/changedFiles/partial/skippedOperations/hotReloadRequested/hotReloadSkippedReason/runtimeVerification; ok:true can still mean no content changed.${HOT_RELOAD_UNSAFE_CALLBACK_NOTE}${MANAGED_STUDIO_FILE_READONLY_NOTE}${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
48763
48861
|
inputSchema: {
|
|
48764
48862
|
type: "object",
|
|
48765
48863
|
properties: {
|
|
@@ -48856,7 +48954,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48856
48954
|
requestHotReload: {
|
|
48857
48955
|
type: "boolean",
|
|
48858
48956
|
default: false,
|
|
48859
|
-
description: "Default false. Set true on the final code edit when preview should update through hot reload.
|
|
48957
|
+
description: "Default false. Set true on the final code edit when preview should update through hot reload. Also waits for bounded diagnostics unless awaitHotReload:false is passed intentionally. If hotReloadRequested is false, no preview refresh was scheduled."
|
|
48860
48958
|
},
|
|
48861
48959
|
...HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES,
|
|
48862
48960
|
idempotencyKey: { type: "string" }
|
|
@@ -48868,7 +48966,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48868
48966
|
},
|
|
48869
48967
|
{
|
|
48870
48968
|
name: "create_wave_file",
|
|
48871
|
-
description: `[studio.vfs] Create/add one exact file path in the paired live Wave Studio browser VFS, including new TypeScript modules such as /actors/player.ts and HTML sketches such as /docs/diagram.html. Natural-language aliases: add file, create ts file, create html file, make module, make diagram, make chart. Requires exact path and full initial content; if either is missing, ask or read context instead of inventing. New .ts/.tsx files are standalone runnable source roots by default, so top-level scene code in a new file runs on Run/hot reload; set runnable:false only for pure helper modules that must not execute on their own. For Mermaid chart requests, create a .html file containing a \`<div class="mermaid">...</div>\` block; active HTML files preview in
|
|
48969
|
+
description: `[studio.vfs] Create/add one exact file path in the paired live Wave Studio browser VFS, including new TypeScript modules such as /actors/player.ts and HTML sketches such as /docs/diagram.html. Natural-language aliases: add file, create ts file, create html file, make module, make diagram, make chart. Requires exact path and full initial content; if either is missing, ask or read context instead of inventing. New .ts/.tsx files are standalone runnable source roots by default, so top-level scene code in a new file runs on Run/hot reload; set runnable:false only for pure helper modules that must not execute on their own. For Mermaid chart requests, create a .html file containing a \`<div class="mermaid">...</div>\` block; active HTML files preview in the editor/coding pane and auto-load Mermaid when \`class="mermaid"\` is present. They must never replace the live engine preview iframe. Helper modules imported by main files may not receive Studio wrapper globals; export functions that accept myScene, asset refs, or entities from main unless current code proves otherwise. Creates missing folders, refuses existing file/folder paths unless overwrite:true is explicitly supplied, and requires a write-capable pairing. Prefer awaitHotReload:true so create + hot reload + bounded diagnostics return in one response; requestHotReload:true also waits by default unless awaitHotReload:false is passed intentionally.${HOT_RELOAD_UNSAFE_CALLBACK_NOTE}${MANAGED_STUDIO_FILE_READONLY_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
48872
48970
|
inputSchema: {
|
|
48873
48971
|
type: "object",
|
|
48874
48972
|
properties: {
|
|
@@ -48902,7 +49000,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48902
49000
|
},
|
|
48903
49001
|
requestHotReload: {
|
|
48904
49002
|
type: "boolean",
|
|
48905
|
-
description: "
|
|
49003
|
+
description: "Set true when the created file affects the running scene and preview should refresh through hot reload. Also waits for bounded diagnostics unless awaitHotReload:false is passed intentionally."
|
|
48906
49004
|
},
|
|
48907
49005
|
...HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES,
|
|
48908
49006
|
idempotencyKey: { type: "string" }
|
|
@@ -48933,7 +49031,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48933
49031
|
to: { type: "string" },
|
|
48934
49032
|
requestHotReload: {
|
|
48935
49033
|
type: "boolean",
|
|
48936
|
-
description: "Set true when the moved/renamed module affects the running scene and
|
|
49034
|
+
description: "Set true when the moved/renamed module affects the running scene and preview should refresh through hot reload. Also waits for bounded diagnostics unless awaitHotReload:false is passed intentionally."
|
|
48937
49035
|
},
|
|
48938
49036
|
...HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES,
|
|
48939
49037
|
idempotencyKey: { type: "string" }
|
|
@@ -48959,7 +49057,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48959
49057
|
},
|
|
48960
49058
|
requestHotReload: {
|
|
48961
49059
|
type: "boolean",
|
|
48962
|
-
description: "Set true when the deleted module affects the running scene after imports have been updated and
|
|
49060
|
+
description: "Set true when the deleted module affects the running scene after imports have been updated and preview should refresh through hot reload. Also waits for bounded diagnostics unless awaitHotReload:false is passed intentionally."
|
|
48963
49061
|
},
|
|
48964
49062
|
...HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES,
|
|
48965
49063
|
idempotencyKey: { type: "string" }
|
|
@@ -48970,7 +49068,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48970
49068
|
},
|
|
48971
49069
|
{
|
|
48972
49070
|
name: "apply_wave_patch",
|
|
48973
|
-
description: `[studio.vfs] ADVANCED grouped edit tool. Use only for grouped/multi-file operations, strict searchReplace, unifiedDiff, or complex stale-checked edits. For simple one-file edits use edit_wave_file. Prefer operations:[...], but a single operation object is accepted via operation or as a bare call for agent mistake recovery. Existing-file writeFile requires baseHash unless forceOverwrite is true. Do not send multiple compact ops for the same file with the same baseHash; the first edit changes the file hash and later compact ops will skip as stale. ok:true can still be a no-op or partial result; always inspect changedFiles, changedPaths, partial, skippedOperations, hotReloadRequested, hotReloadSkippedReason, and runtimeVerification. After the final grouped code edit, prefer awaitHotReload:true when preview already ran;
|
|
49071
|
+
description: `[studio.vfs] ADVANCED grouped edit tool. Use only for grouped/multi-file operations, strict searchReplace, unifiedDiff, or complex stale-checked edits. For simple one-file edits use edit_wave_file. Prefer operations:[...], but a single operation object is accepted via operation or as a bare call for agent mistake recovery. Existing-file writeFile requires baseHash unless forceOverwrite is true. Do not send multiple compact ops for the same file with the same baseHash; the first edit changes the file hash and later compact ops will skip as stale. ok:true can still be a no-op or partial result; always inspect changedFiles, changedPaths, partial, skippedOperations, hotReloadRequested, hotReloadSkippedReason, and runtimeVerification. After the final grouped code edit, prefer awaitHotReload:true when preview already ran; requestHotReload:true also waits by default unless awaitHotReload:false is passed intentionally. Studio may upgrade that hot-reload request internally to patchMain, preserveScene, or hard rebuildScene; do not edit bootstrap manually just to register assets. Use run_wave_preview only if diagnostics show hasRunSucceeded false, the user explicitly asked for a full restart, or hot reload is stuck/failing.${HOT_RELOAD_UNSAFE_CALLBACK_NOTE}${MANAGED_STUDIO_FILE_READONLY_NOTE}${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
48974
49072
|
inputSchema: {
|
|
48975
49073
|
type: "object",
|
|
48976
49074
|
properties: {
|
|
@@ -48978,7 +49076,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48978
49076
|
requestHotReload: {
|
|
48979
49077
|
type: "boolean",
|
|
48980
49078
|
default: false,
|
|
48981
|
-
description: "Default false. Set true after the final code edit when preview should update through hot reload.
|
|
49079
|
+
description: "Default false. Set true after the final code edit when preview should update through hot reload. Also waits for bounded diagnostics unless awaitHotReload:false is passed intentionally. If hotReloadRequested is false, inspect hotReloadSkippedReason/skippedOperations."
|
|
48982
49080
|
},
|
|
48983
49081
|
...HOT_RELOAD_RUNTIME_DIAGNOSTIC_SCHEMA_PROPERTIES,
|
|
48984
49082
|
idempotencyKey: { type: "string" },
|
|
@@ -49178,18 +49276,60 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
49178
49276
|
},
|
|
49179
49277
|
{
|
|
49180
49278
|
name: "hot_reload_wave_preview",
|
|
49181
|
-
description: `[studio.preview] Default standalone tool for seeing code-change results in an already-running Wave Studio preview when no edit tool is being called. Natural-language aliases: hot reload, reload preview, refresh preview after edit, refresh scene. Trigger the same hot-reload path as Wave Studio's toolbar button through the paired browser session. In multi-file VFS projects, this tool has no file path argument and reloads the currently open/active TypeScript file when safe, not every user-created .ts module. Before calling it for a specific module, make sure that module is the active Studio editor file. For code edits, prefer the edit tool's awaitHotReload:true on the final edit to pair the change, hot reload, and bounded diagnostics in one MCP response
|
|
49279
|
+
description: `[studio.preview] Default standalone tool for seeing code-change results in an already-running Wave Studio preview when no edit tool is being called. Natural-language aliases: hot reload, reload preview, refresh preview after edit, refresh scene. Trigger the same hot-reload path as Wave Studio's toolbar button through the paired browser session. In multi-file VFS projects, this tool has no file path argument and reloads the currently open/active TypeScript file when safe, not every user-created .ts module. Before calling it for a specific module, make sure that module is the active Studio editor file. For code edits, prefer the edit tool's awaitHotReload:true on the final edit to pair the change, hot reload, and bounded diagnostics in one MCP response. Studio may upgrade this same request internally to patchMain, preserveScene, or hard rebuildScene when asset/bootstrap/runtime-surface changes require it; agents should not manually guess the tier. By default this tool waits for bounded runtime diagnostics and returns runtimeVerification; set awaitRuntimeResult:false only for intentional fire-and-poll. If hot reload gets stuck or fails, run_wave_preview is the last-resort full restart.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
49182
49280
|
inputSchema: {
|
|
49183
49281
|
type: "object",
|
|
49184
49282
|
properties: {
|
|
49185
|
-
idempotencyKey: { type: "string" }
|
|
49283
|
+
idempotencyKey: { type: "string" },
|
|
49284
|
+
awaitRuntimeResult: {
|
|
49285
|
+
type: "boolean",
|
|
49286
|
+
description: "Default true. Wait in the same MCP call for bounded runtime diagnostics after the hot-reload request. Set false only for intentional fire-and-poll."
|
|
49287
|
+
},
|
|
49288
|
+
awaitDiagnostics: {
|
|
49289
|
+
type: "boolean",
|
|
49290
|
+
description: "Alias of awaitRuntimeResult."
|
|
49291
|
+
},
|
|
49292
|
+
runtimeDiagnosticsTimeoutMs: { type: "number", minimum: 500, maximum: 15e3 },
|
|
49293
|
+
runtimeDiagnosticsLimit: { type: "number", minimum: 1, maximum: 500 }
|
|
49186
49294
|
},
|
|
49187
49295
|
additionalProperties: false
|
|
49188
49296
|
}
|
|
49189
49297
|
},
|
|
49190
49298
|
{
|
|
49191
49299
|
name: "run_wave_preview",
|
|
49192
|
-
description: `[studio.preview] Trigger a full Wave Studio preview run/start through the paired browser session. Natural-language aliases: run project, start preview, start project, full restart, restart scene, kick the scene again. Do not use this as the normal post-edit path; use edit-tool awaitHotReload:true after edits or standalone hot_reload_wave_preview for preview refresh first. Use run only when diagnostics show hasRunSucceeded false, the user explicitly asks for a full restart, or hot reload/polling fails and a full restart is the last resort.
|
|
49300
|
+
description: `[studio.preview] Trigger a full Wave Studio preview run/start through the paired browser session. Natural-language aliases: run project, start preview, start project, full restart, restart scene, kick the scene again. Do not use this as the normal post-edit path; use edit-tool awaitHotReload:true after edits or standalone hot_reload_wave_preview for preview refresh first. Use run only when diagnostics show hasRunSucceeded false, the user explicitly asks for a full run/restart, or hot reload/polling fails and a full restart is the last resort. By default this tool waits for bounded runtime diagnostics and returns runtimeVerification; set awaitRuntimeResult:false only for intentional fire-and-poll.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
49301
|
+
inputSchema: {
|
|
49302
|
+
type: "object",
|
|
49303
|
+
properties: {
|
|
49304
|
+
idempotencyKey: { type: "string" },
|
|
49305
|
+
awaitRuntimeResult: {
|
|
49306
|
+
type: "boolean",
|
|
49307
|
+
description: "Default true. Wait in the same MCP call for bounded runtime diagnostics after the run request. Set false only for intentional fire-and-poll."
|
|
49308
|
+
},
|
|
49309
|
+
awaitDiagnostics: {
|
|
49310
|
+
type: "boolean",
|
|
49311
|
+
description: "Alias of awaitRuntimeResult."
|
|
49312
|
+
},
|
|
49313
|
+
runtimeDiagnosticsTimeoutMs: { type: "number", minimum: 500, maximum: 15e3 },
|
|
49314
|
+
runtimeDiagnosticsLimit: { type: "number", minimum: 1, maximum: 500 }
|
|
49315
|
+
},
|
|
49316
|
+
additionalProperties: false
|
|
49317
|
+
}
|
|
49318
|
+
},
|
|
49319
|
+
{
|
|
49320
|
+
name: "pause_wave_preview",
|
|
49321
|
+
description: `[studio.preview] Pause the running Wave Studio preview/engine through the paired browser session. Natural-language aliases: pause engine, pause preview, freeze preview. Direct Operate tool; no start_wave_task needed. Requires a running preview.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
49322
|
+
inputSchema: {
|
|
49323
|
+
type: "object",
|
|
49324
|
+
properties: {
|
|
49325
|
+
idempotencyKey: { type: "string" }
|
|
49326
|
+
},
|
|
49327
|
+
additionalProperties: false
|
|
49328
|
+
}
|
|
49329
|
+
},
|
|
49330
|
+
{
|
|
49331
|
+
name: "resume_wave_preview",
|
|
49332
|
+
description: `[studio.preview] Resume the paused Wave Studio preview/engine through the paired browser session. Natural-language aliases: resume engine, resume preview, unpause preview. Direct Operate tool; no start_wave_task needed. Requires a running preview.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
49193
49333
|
inputSchema: {
|
|
49194
49334
|
type: "object",
|
|
49195
49335
|
properties: {
|
|
@@ -49247,6 +49387,16 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
49247
49387
|
canonicalName: "run_wave_preview",
|
|
49248
49388
|
description: `[studio.preview] Alias of run_wave_preview for natural "run project" requests. Use for first start, explicit full restart, or last-resort recovery after hot reload fails/stalls.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`
|
|
49249
49389
|
}),
|
|
49390
|
+
aliasToolDefinition(definitions, {
|
|
49391
|
+
name: "pause_wave_engine",
|
|
49392
|
+
canonicalName: "pause_wave_preview",
|
|
49393
|
+
description: `[studio.preview] Alias of pause_wave_preview for "pause engine" requests.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`
|
|
49394
|
+
}),
|
|
49395
|
+
aliasToolDefinition(definitions, {
|
|
49396
|
+
name: "resume_wave_engine",
|
|
49397
|
+
canonicalName: "resume_wave_preview",
|
|
49398
|
+
description: `[studio.preview] Alias of resume_wave_preview for "resume engine" requests.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`
|
|
49399
|
+
}),
|
|
49250
49400
|
aliasToolDefinition(definitions, {
|
|
49251
49401
|
name: "mcp_health",
|
|
49252
49402
|
canonicalName: "get_wave_mcp_health",
|
|
@@ -49267,10 +49417,10 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
49267
49417
|
}
|
|
49268
49418
|
|
|
49269
49419
|
// ../../scripts/wavegenie-sdk/mcp/toolDefinitions.ts
|
|
49270
|
-
var
|
|
49420
|
+
var CANONICAL_WAVE_MCP_TOOL_NAMES = new Set(
|
|
49271
49421
|
buildHostedWaveStudioMcpToolDefinitions().map((definition) => definition.name)
|
|
49272
49422
|
);
|
|
49273
|
-
var
|
|
49423
|
+
var LOCAL_SDK_LOOKUP_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
49274
49424
|
"get_wave_coding_guardrails",
|
|
49275
49425
|
"list_wave_skill_families",
|
|
49276
49426
|
"query_wave_skills",
|
|
@@ -49330,13 +49480,39 @@ var LOCAL_OPTIONAL_SESSION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
49330
49480
|
"hot_reload_wave_preview",
|
|
49331
49481
|
"hotreload_wave_preview",
|
|
49332
49482
|
"run_wave_preview",
|
|
49333
|
-
"run_project"
|
|
49483
|
+
"run_project",
|
|
49484
|
+
"pause_wave_preview",
|
|
49485
|
+
"pause_wave_engine",
|
|
49486
|
+
"resume_wave_preview",
|
|
49487
|
+
"resume_wave_engine"
|
|
49334
49488
|
]);
|
|
49489
|
+
var LOCAL_SDK_CONTROL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
49490
|
+
"get_wave_agent_onboarding",
|
|
49491
|
+
"accept_wave_agent_onboarding",
|
|
49492
|
+
"self_check_wave_mcp",
|
|
49493
|
+
"list_wave_sessions",
|
|
49494
|
+
"get_active_wave_session",
|
|
49495
|
+
"recover_wave_connection",
|
|
49496
|
+
"start_wave_task",
|
|
49497
|
+
"advance_wave_task",
|
|
49498
|
+
"get_wave_task_route",
|
|
49499
|
+
"get_wave_tool_map",
|
|
49500
|
+
"get_wave_mcp_health",
|
|
49501
|
+
"get_wave_command_result"
|
|
49502
|
+
]);
|
|
49503
|
+
var LOCAL_SDK_IMPLEMENTED_CANONICAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
49504
|
+
...LOCAL_SDK_CONTROL_TOOL_NAMES,
|
|
49505
|
+
...LOCAL_SDK_LOOKUP_TOOL_NAMES,
|
|
49506
|
+
...[...LOCAL_OPTIONAL_SESSION_TOOL_NAMES].map((name) => canonicalizeWaveMcpToolName(name))
|
|
49507
|
+
]);
|
|
49508
|
+
function isLocalMcpToolImplemented(name) {
|
|
49509
|
+
return LOCAL_SDK_IMPLEMENTED_CANONICAL_TOOL_NAMES.has(canonicalizeWaveMcpToolName(name));
|
|
49510
|
+
}
|
|
49335
49511
|
function getReadToolDefinitions() {
|
|
49336
49512
|
return [
|
|
49337
49513
|
{
|
|
49338
49514
|
name: "self_check_wave_mcp",
|
|
49339
|
-
description: `Run first local-SDK self-check. Pass expectedVersion and expectedBuildHash exactly from the Copy-to-Agent message; without external expected values a stale SDK can only compare against itself. Verifies SDK version/build, tool catalog hash/count, paired session count, and route-evidence health. If stale/hardStop is true, restart SDK with copied
|
|
49515
|
+
description: `Run first local-SDK self-check. Pass expectedVersion and expectedBuildHash exactly from the Copy-to-Agent message; without external expected values a stale SDK can only compare against itself. Verifies SDK version/build, tool catalog hash/count, paired session count, and route-evidence health. If stale/hardStop is true, restart SDK with the copied MCP_TOKEN/local pairing secret preserved via ${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND} before doing user work.`,
|
|
49340
49516
|
inputSchema: {
|
|
49341
49517
|
type: "object",
|
|
49342
49518
|
properties: {
|
|
@@ -49364,7 +49540,7 @@ function getReadToolDefinitions() {
|
|
|
49364
49540
|
},
|
|
49365
49541
|
{
|
|
49366
49542
|
name: "accept_wave_agent_onboarding",
|
|
49367
|
-
description: "Acknowledge that the agent has read and cached the current Wave Studio local MCP onboarding prompt before using normal tools. Call only after keeping coding guardrails, full intent taxonomy, authoring workflow, and Studio tool policy in active LLM context. Production
|
|
49543
|
+
description: "Acknowledge that the agent has read and cached the current Wave Studio local MCP onboarding prompt before using normal tools. Call only after keeping coding guardrails, full intent taxonomy, authoring workflow, and Studio tool policy in active LLM context. Production HTTP Gateway pairing requires bundled WaveEngine SDK Cache proof/preparation before normal cached success; if SDK cache cannot work, explicitly pass degraded Studio-ops-only fallback fields and warn user exact API lookup needs local SDK repair.",
|
|
49368
49544
|
inputSchema: {
|
|
49369
49545
|
type: "object",
|
|
49370
49546
|
properties: {
|
|
@@ -49487,13 +49663,13 @@ function localizeHostedToolDefinition(definition, localOverrides) {
|
|
|
49487
49663
|
if (definition.name === "get_wave_session") {
|
|
49488
49664
|
description = "[studio.mcp] Return the Wave Studio browser session paired through the WaveEngine Agent SDK.";
|
|
49489
49665
|
} else if (definition.name === "recover_wave_connection") {
|
|
49490
|
-
description = "[studio.mcp] Direct Observe recovery tool for WaveEngine Agent SDK. Call after session_not_found, command_timeout, command_lease_expired, agent_onboarding_required,
|
|
49666
|
+
description = "[studio.mcp] Direct Observe recovery tool for WaveEngine Agent SDK. Call after session_not_found, command_timeout, command_lease_expired, agent_onboarding_required, local_sdk_tool_not_implemented, wave_engine_sdk_cache_required, or local/HTTP Gateway/cache confusion. Returns exact next action: re-onboard, get session, wake Wave Studio tab, update/restart SDK, retry same tool, use HTTP Gateway fallback, or ask fresh Copy to Agent only if token is rejected everywhere.";
|
|
49491
49667
|
} else if (definition.name === "get_wave_command_result") {
|
|
49492
49668
|
description = '[studio.mcp] Use only when a prior tool response includes status:"pending" plus requestId. Catalog-parity tool for agents trained on the HTTP Gateway. WaveEngine Agent SDK browser-backed tools normally wait for the Studio browser result directly, so this usually reports that no local pending-command queue is used.';
|
|
49493
49669
|
} else if (definition.name === "get_wave_coding_guardrails") {
|
|
49494
49670
|
description = "[studio.mcp] Return compact Wave Studio coding guardrails. WaveEngine Agent SDK answers from bundled SDK/onboarding. HTTP Gateway remains Studio-ops-only and has no cloud API lookup.";
|
|
49495
49671
|
} else if (definition.name === "get_wave_tool_map") {
|
|
49496
|
-
description = "[studio.mcp] Stable local MCP tool map.
|
|
49672
|
+
description = "[studio.mcp] Stable local MCP tool map. Returns the concrete local SDK catalog grouped by family plus handler-parity and policy flags.";
|
|
49497
49673
|
} else if (definition.name === "get_wave_mcp_health") {
|
|
49498
49674
|
description = "[studio.mcp] Read-only WaveEngine Agent SDK health/status. Reports actual local SDK version/build, tool catalog hash/count, current transport, paired browser sessions, onboarding state, active route, and WaveEngine SDK Cache existence/version/staleness. Aliases: mcp_health, mcp_status, get_wave_mcp_status.";
|
|
49499
49675
|
} else if (definition.name === "list_wave_skill_families") {
|
|
@@ -49527,25 +49703,35 @@ function localizeHostedToolDefinition(definition, localOverrides) {
|
|
|
49527
49703
|
}
|
|
49528
49704
|
function mergeLocalToolDefinitions(canonicalDefinitions) {
|
|
49529
49705
|
const localOverrides = getLocalOverrideToolDefinitions();
|
|
49530
|
-
const localizedDefinitions = canonicalDefinitions.map((definition) => localizeHostedToolDefinition(definition, localOverrides));
|
|
49706
|
+
const localizedDefinitions = canonicalDefinitions.filter((definition) => isLocalMcpToolImplemented(definition.name)).map((definition) => localizeHostedToolDefinition(definition, localOverrides));
|
|
49531
49707
|
const byName = new Map(localizedDefinitions.map((definition) => [definition.name, definition]));
|
|
49532
49708
|
for (const definition of localOverrides.values()) {
|
|
49533
49709
|
byName.set(definition.name, definition);
|
|
49534
49710
|
}
|
|
49535
49711
|
const definitions = [...byName.values()];
|
|
49536
|
-
|
|
49712
|
+
assertLocalToolDefinitionHandlerParity(definitions);
|
|
49537
49713
|
return definitions;
|
|
49538
49714
|
}
|
|
49539
|
-
function
|
|
49540
|
-
const
|
|
49541
|
-
|
|
49542
|
-
|
|
49543
|
-
throw new Error(`Local MCP tool catalog missing canonical Hosted MCP tools: ${missingNames.join(", ")}`);
|
|
49715
|
+
function assertLocalToolDefinitionHandlerParity(localDefinitions) {
|
|
49716
|
+
const unimplementedNames = localDefinitions.map((definition) => definition.name).filter((name) => !isLocalMcpToolImplemented(name));
|
|
49717
|
+
if (unimplementedNames.length > 0) {
|
|
49718
|
+
throw new Error(`Local MCP tool catalog includes tools without local handlers: ${unimplementedNames.join(", ")}`);
|
|
49544
49719
|
}
|
|
49545
49720
|
}
|
|
49546
49721
|
function getLocalToolDefinitions() {
|
|
49547
49722
|
return mergeLocalToolDefinitions(buildHostedWaveStudioMcpToolDefinitions());
|
|
49548
49723
|
}
|
|
49724
|
+
function getLocalToolImplementationSummary() {
|
|
49725
|
+
const canonicalToolNames = [...CANONICAL_WAVE_MCP_TOOL_NAMES].sort();
|
|
49726
|
+
const implementedCanonicalToolNames = canonicalToolNames.filter((name) => isLocalMcpToolImplemented(name));
|
|
49727
|
+
return {
|
|
49728
|
+
canonicalToolCount: canonicalToolNames.length,
|
|
49729
|
+
implementedCanonicalToolCount: implementedCanonicalToolNames.length,
|
|
49730
|
+
localExtraToolNames: [...LOCAL_EXTRA_TOOL_DEFINITION_NAMES].sort(),
|
|
49731
|
+
localLookupToolNames: [...LOCAL_SDK_LOOKUP_TOOL_NAMES].sort(),
|
|
49732
|
+
omittedCanonicalToolNames: canonicalToolNames.filter((name) => !isLocalMcpToolImplemented(name))
|
|
49733
|
+
};
|
|
49734
|
+
}
|
|
49549
49735
|
function getLocalToolCatalogHash() {
|
|
49550
49736
|
const tools = getLocalToolDefinitions().map((definition) => ({
|
|
49551
49737
|
name: definition.name,
|
|
@@ -49559,6 +49745,16 @@ function getLocalToolCatalogHash() {
|
|
|
49559
49745
|
function nowIso() {
|
|
49560
49746
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
49561
49747
|
}
|
|
49748
|
+
function localSdkLookupStatus(waveEngineSdkCache) {
|
|
49749
|
+
const corpusCacheReady = waveEngineSdkCache.ready === true;
|
|
49750
|
+
return {
|
|
49751
|
+
source: "package_bundled_wave_engine_sdk_cache",
|
|
49752
|
+
corpusCacheReady,
|
|
49753
|
+
apiAndSkillQueryAvailable: corpusCacheReady,
|
|
49754
|
+
cacheMissAffectsLiveStudioTransport: false,
|
|
49755
|
+
lookupToolNames: [...LOCAL_SDK_LOOKUP_TOOL_NAMES].sort()
|
|
49756
|
+
};
|
|
49757
|
+
}
|
|
49562
49758
|
function jsonRpcToolIdempotencyKey(toolName, requestId) {
|
|
49563
49759
|
if (typeof requestId !== "string" && typeof requestId !== "number") return null;
|
|
49564
49760
|
return `jsonrpc:${toolName}:${String(requestId)}`;
|
|
@@ -49727,27 +49923,32 @@ function localConnectionRecoveryResult(args, context) {
|
|
|
49727
49923
|
let requiresUserAction = false;
|
|
49728
49924
|
if (!onboardingAccepted || lastErrorCode === "agent_onboarding_required") {
|
|
49729
49925
|
state = "needs_onboarding";
|
|
49730
|
-
nextAction = "Re-run onboarding on this same local endpoint
|
|
49926
|
+
nextAction = "Re-run onboarding on this same local endpoint and MCP_TOKEN pairing secret: get_wave_agent_onboarding, accept_wave_agent_onboarding, tools/list, get_wave_session.";
|
|
49731
49927
|
nextTool = "get_wave_agent_onboarding";
|
|
49732
49928
|
steps.push("Do not ask user for new Copy to Agent unless local HTTP auth fails.");
|
|
49733
49929
|
} else if (sessions.length === 0 || lastErrorCode === "session_not_found") {
|
|
49734
49930
|
state = "no_paired_studio_tab";
|
|
49735
|
-
nextAction = "WaveEngine Agent SDK HTTP is alive, but no Wave Studio tab is paired with this
|
|
49931
|
+
nextAction = "WaveEngine Agent SDK HTTP is alive, but no Wave Studio tab is paired with this MCP_TOKEN local secret. Ask user to wake/reopen Wave Studio, open Room -> MCP, and let it adopt this same local session secret; then call get_wave_session again.";
|
|
49736
49932
|
nextTool = "get_wave_session";
|
|
49737
49933
|
requiresUserAction = true;
|
|
49738
49934
|
steps.push("Do not switch to SDK cache or query tools as a transport fix.");
|
|
49739
49935
|
} else if (lastErrorCode === "command_timeout" || lastErrorCode === "command_lease_expired" || symptom.toLowerCase().includes("hang") || symptom.toLowerCase().includes("timeout") || !selectedSessionReady) {
|
|
49740
49936
|
state = "browser_tab_not_polling";
|
|
49741
|
-
nextAction = "Wave Studio tab is paired but not actively polling commands, or browser-backed command timed out. Ask user to focus/wake the tab and verify MCP is live; retry the same tool once on the same local endpoint
|
|
49937
|
+
nextAction = "Wave Studio tab is paired but not actively polling commands, or browser-backed command timed out. Ask user to focus/wake the tab and verify MCP is live; retry the same tool once on the same local endpoint and MCP_TOKEN pairing secret.";
|
|
49742
49938
|
nextTool = failedTool || "get_wave_session";
|
|
49743
49939
|
requiresUserAction = true;
|
|
49744
49940
|
steps.push(`If SDK /health is down before pairing, start \`${WAVE3D_AGENT_SDK_START_COMMAND}\`; after Copy-to-Agent, restart stale SDK with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\` using the current MCP_TOKEN value hidden. If /health is OK and version matches Copy to Agent, do not restart SDK first.`);
|
|
49745
49941
|
} else if (lastErrorCode === "session_write_not_allowed" || selectedSession?.accessMode !== "readwrite") {
|
|
49746
49942
|
state = "write_access_not_ready";
|
|
49747
|
-
nextAction = "Read tools can continue. For write/run/hot reload, user must make the Studio MCP session read-write/adopt WaveEngine Agent SDK, then retry same local endpoint
|
|
49943
|
+
nextAction = "Read tools can continue. For write/run/hot reload, user must make the Studio MCP session read-write/adopt WaveEngine Agent SDK, then retry same local endpoint and MCP_TOKEN pairing secret or paste fresh Copy to Agent if the secret changed.";
|
|
49748
49944
|
nextTool = "get_wave_session";
|
|
49749
49945
|
requiresUserAction = true;
|
|
49750
|
-
} else if (lastErrorCode === "
|
|
49946
|
+
} else if (lastErrorCode === "local_sdk_tool_not_implemented" || lastErrorCode === "local_sdk_lookup_handler_missing") {
|
|
49947
|
+
state = "local_sdk_handler_missing";
|
|
49948
|
+
nextAction = "This SDK build lacks a local handler for the requested canonical tool. Call tools/list and use a listed tool, or update/restart the exact SDK package.";
|
|
49949
|
+
nextTool = "tools/list";
|
|
49950
|
+
steps.push("Do not treat missing local handler as WaveEngine SDK Cache failure.");
|
|
49951
|
+
} else if (lastErrorCode === "wave_engine_sdk_cache_required") {
|
|
49751
49952
|
state = "wave_engine_sdk_cache_unavailable";
|
|
49752
49953
|
nextAction = "Live Studio tools can continue. Skill/API lookup cache failed; update/restart the exact SDK package or run the bundled SDK repair command. HTTP Gateway is Studio-ops-only.";
|
|
49753
49954
|
nextTool = "get_wave_session";
|
|
@@ -49796,12 +49997,30 @@ function localConnectionRecoveryResult(args, context) {
|
|
|
49796
49997
|
steps,
|
|
49797
49998
|
hardStopRules: [
|
|
49798
49999
|
"Local HTTP refused/unreachable before MCP response: start WaveEngine Agent SDK, retry localhost for up to 10 seconds.",
|
|
49799
|
-
"Local HTTP 401/bridge_auth_invalid: if HTTP Gateway accepts the same
|
|
49800
|
-
"No paired session or stale command poll: wake/reopen Wave Studio tab; keep same local endpoint
|
|
50000
|
+
"Local HTTP 401/bridge_auth_invalid: if HTTP Gateway accepts the same MCP_TOKEN, SDK is stale/not adopted: restart exact WaveEngine Agent SDK so it adopts MCP_TOKEN as the local pairing secret, then retry local. If every endpoint rejects MCP_TOKEN, ask user for fresh Copy to Agent.",
|
|
50001
|
+
"No paired session or stale command poll: wake/reopen Wave Studio tab; keep same local endpoint and MCP_TOKEN pairing secret first.",
|
|
49801
50002
|
"WaveEngine SDK Cache failure is not live transport failure."
|
|
49802
50003
|
]
|
|
49803
50004
|
});
|
|
49804
50005
|
}
|
|
50006
|
+
function localSdkToolNotImplementedResult(name) {
|
|
50007
|
+
return errorToolResult(
|
|
50008
|
+
"local_sdk_tool_not_implemented",
|
|
50009
|
+
`${name} is a canonical Wave MCP tool, but this WaveEngine Agent SDK build has no local handler for it. It is intentionally omitted from tools/list until implemented; update wave3d-agent-sdk or use a listed tool.`,
|
|
50010
|
+
{
|
|
50011
|
+
toolName: name,
|
|
50012
|
+
localSdk: true,
|
|
50013
|
+
missingLocalHandler: true,
|
|
50014
|
+
affectsLiveStudioTransport: false,
|
|
50015
|
+
affectsWaveEngineSdkCache: false,
|
|
50016
|
+
recovery: [
|
|
50017
|
+
"Call tools/list and choose one of the listed local tools.",
|
|
50018
|
+
"Update/restart the exact wave3d-agent-sdk package when you need this canonical tool locally.",
|
|
50019
|
+
"Do not treat this as wave_engine_sdk_cache_required; SDK cache repair cannot add a missing live-tool handler."
|
|
50020
|
+
]
|
|
50021
|
+
}
|
|
50022
|
+
);
|
|
50023
|
+
}
|
|
49805
50024
|
function taskRouteToolResult(route) {
|
|
49806
50025
|
return successToolResult({
|
|
49807
50026
|
ok: true,
|
|
@@ -49845,7 +50064,7 @@ function localAuthoringReminderKindForToolName(toolName) {
|
|
|
49845
50064
|
if (canonicalToolName === "edit_wave_file" || canonicalToolName === "create_wave_file" || canonicalToolName === "rename_wave_file" || canonicalToolName === "delete_wave_file" || canonicalToolName === "apply_wave_patch") {
|
|
49846
50065
|
return "codeEdit";
|
|
49847
50066
|
}
|
|
49848
|
-
if (canonicalToolName === "get_wave_runtime_diagnostics" || canonicalToolName === "get_wave_runtime_performance_snapshot" || canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview" || canonicalToolName === "capture_wave_screenshot" || canonicalToolName === "get_wave_runtime_entity_snapshot" || canonicalToolName === "list_wave_runtime_markers") return "preview";
|
|
50067
|
+
if (canonicalToolName === "get_wave_runtime_diagnostics" || canonicalToolName === "get_wave_runtime_performance_snapshot" || canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview" || canonicalToolName === "pause_wave_preview" || canonicalToolName === "resume_wave_preview" || canonicalToolName === "capture_wave_screenshot" || canonicalToolName === "get_wave_runtime_entity_snapshot" || canonicalToolName === "list_wave_runtime_markers") return "preview";
|
|
49849
50068
|
return "studio";
|
|
49850
50069
|
}
|
|
49851
50070
|
function attachAuthoringReminder(result, kind) {
|
|
@@ -49917,6 +50136,14 @@ function normalizeRuntimeDiagnosticsLimit(value) {
|
|
|
49917
50136
|
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
49918
50137
|
return Math.min(Math.max(1, Math.trunc(value)), 500);
|
|
49919
50138
|
}
|
|
50139
|
+
function normalizeRuntimeDiagnosticsTimeoutMs2(value) {
|
|
50140
|
+
if (typeof value === "undefined") return void 0;
|
|
50141
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
50142
|
+
return Math.min(Math.max(500, Math.trunc(value)), 15e3);
|
|
50143
|
+
}
|
|
50144
|
+
function shouldAwaitRuntimeActionDiagnostics(args) {
|
|
50145
|
+
return args?.awaitRuntimeResult !== false && args?.awaitDiagnostics !== false && args?.returnRuntimeDiagnostics !== false;
|
|
50146
|
+
}
|
|
49920
50147
|
function resolveAssetCategoryBucket(value) {
|
|
49921
50148
|
if (typeof value !== "string" || !value.trim()) return null;
|
|
49922
50149
|
return getWaveStudioAssetBucketFromCategory(value.trim());
|
|
@@ -50070,18 +50297,21 @@ async function enqueueLocalAssetUploadCommand(input) {
|
|
|
50070
50297
|
}
|
|
50071
50298
|
async function callReadTool(name, args, context) {
|
|
50072
50299
|
if (name === "get_wave_agent_onboarding") {
|
|
50300
|
+
const waveEngineSdkCache = await inspectLocalCorpusCacheForContext(context);
|
|
50073
50301
|
return successToolResult({
|
|
50074
50302
|
ok: true,
|
|
50075
50303
|
promptVersion: LOCAL_MCP_AGENT_ONBOARDING_VERSION,
|
|
50076
50304
|
promptHash: LOCAL_MCP_AGENT_ONBOARDING_PROMPT_HASH,
|
|
50077
50305
|
prompt: LOCAL_MCP_AGENT_ONBOARDING_PROMPT,
|
|
50078
50306
|
localSdk: true,
|
|
50307
|
+
waveEngineSdkCache,
|
|
50308
|
+
waveEngineSdkLookup: localSdkLookupStatus(waveEngineSdkCache),
|
|
50079
50309
|
onboardingPhases: [
|
|
50080
50310
|
{ phase: -1, required: true, action: "Treat Copy-to-Agent as bootstrap only", fallback: "Use this MCP response as the current source of truth for phased setup, recovery, routing, cache, and tool policy. If clipboard text and MCP response differ, prefer MCP response." },
|
|
50081
50311
|
{ phase: 0, required: false, action: "WaveEngine Agent SDK preflight", fallback: "Already satisfied because this endpoint is local." },
|
|
50082
50312
|
{ phase: 1, required: true, action: "initialize", fallback: null },
|
|
50083
50313
|
{ phase: 2, required: true, action: "get_wave_agent_onboarding", fallback: null },
|
|
50084
|
-
{ phase: 3, required: true, action: "accept_wave_agent_onboarding; this verifies bundled WaveEngine SDK Cache before success when using production HTTP
|
|
50314
|
+
{ phase: 3, required: true, action: "accept_wave_agent_onboarding; this verifies bundled WaveEngine SDK Cache before success when using production HTTP Gateway pairing", fallback: "If SDK cache cannot prepare, accept returns wave_engine_sdk_cache_not_ready; update/restart SDK or explicitly accept degraded Studio-ops-only fallback only when local SDK cannot work." },
|
|
50085
50315
|
{ phase: 4, required: true, action: "tools/list", fallback: null },
|
|
50086
50316
|
{ phase: 5, required: true, action: "get_wave_session", fallback: null },
|
|
50087
50317
|
{ phase: 6, required: true, action: "list_wave_files", fallback: null },
|
|
@@ -50159,7 +50389,7 @@ async function callReadTool(name, args, context) {
|
|
|
50159
50389
|
return successToolResult({
|
|
50160
50390
|
ok: true,
|
|
50161
50391
|
accepted: true,
|
|
50162
|
-
statusMessage: waveEngineSdkCache.ready === true ? "Wave Studio authoring role accepted and bundled WaveEngine SDK Cache verified. Copy-to-Agent was bootstrap only; this ready summary is now the source of truth. Next: tools/list, get_wave_session, and list_wave_files." : sdkFallbackAccepted ? "Wave Studio authoring role accepted in degraded Studio-ops-only mode. WaveEngine SDK Cache is unavailable; warn user that exact API lookup needs local SDK repair." : "Wave Studio authoring role accepted for local-only/dev
|
|
50392
|
+
statusMessage: waveEngineSdkCache.ready === true ? "Wave Studio authoring role accepted and bundled WaveEngine SDK Cache verified. Copy-to-Agent was bootstrap only; this ready summary is now the source of truth. Next: tools/list, get_wave_session, and list_wave_files." : sdkFallbackAccepted ? "Wave Studio authoring role accepted in degraded Studio-ops-only mode. WaveEngine SDK Cache is unavailable; warn user that exact API lookup needs local SDK repair." : "Wave Studio authoring role accepted for local-only/dev pairing secret. WaveEngine SDK Cache is not ready; live Studio tools can work, but unfamiliar skill/API lookup needs SDK repair.",
|
|
50163
50393
|
promptVersion,
|
|
50164
50394
|
promptHash,
|
|
50165
50395
|
localSdk: true,
|
|
@@ -50201,7 +50431,7 @@ async function callReadTool(name, args, context) {
|
|
|
50201
50431
|
const taskRouteId = readWaveMcpTaskRouteId(args);
|
|
50202
50432
|
const route = getLocalActiveTaskRoute(context);
|
|
50203
50433
|
if (!route || taskRouteId && route.taskRouteId !== taskRouteId) {
|
|
50204
|
-
return taskRouteErrorToolResult("task_route_not_found", "Call start_wave_task first. taskRouteId may be omitted when the active route belongs to this local
|
|
50434
|
+
return taskRouteErrorToolResult("task_route_not_found", "Call start_wave_task first. taskRouteId may be omitted when the active route belongs to this local MCP_TOKEN pairing secret.", {
|
|
50205
50435
|
taskRouteId: taskRouteId || null
|
|
50206
50436
|
});
|
|
50207
50437
|
}
|
|
@@ -50220,7 +50450,7 @@ async function callReadTool(name, args, context) {
|
|
|
50220
50450
|
const taskRouteId = readWaveMcpTaskRouteId(args);
|
|
50221
50451
|
const route = getLocalActiveTaskRoute(context);
|
|
50222
50452
|
if (!route || taskRouteId && route.taskRouteId !== taskRouteId) {
|
|
50223
|
-
return taskRouteErrorToolResult("task_route_not_found", "No active Wave task route found for this
|
|
50453
|
+
return taskRouteErrorToolResult("task_route_not_found", "No active Wave task route found for this MCP session. Call start_wave_task for the user request.", {
|
|
50224
50454
|
taskRouteId: taskRouteId || null,
|
|
50225
50455
|
activeTaskRouteId: route?.taskRouteId ?? null,
|
|
50226
50456
|
activeTaskPhase: route?.phase ?? null
|
|
@@ -50230,6 +50460,8 @@ async function callReadTool(name, args, context) {
|
|
|
50230
50460
|
}
|
|
50231
50461
|
if (name === "self_check_wave_mcp") {
|
|
50232
50462
|
const toolDefinitions = getLocalToolDefinitions();
|
|
50463
|
+
const toolImplementation = getLocalToolImplementationSummary();
|
|
50464
|
+
const waveEngineSdkCache = await inspectLocalCorpusCacheForContext(context);
|
|
50233
50465
|
const sessions = getAuthorizedSessions(context);
|
|
50234
50466
|
const activeRoute = getLocalActiveTaskRoute(context);
|
|
50235
50467
|
const expectedVersion = normalizeOptionalString(args?.expectedVersion);
|
|
@@ -50257,9 +50489,14 @@ async function callReadTool(name, args, context) {
|
|
|
50257
50489
|
hash: getLocalToolCatalogHash(),
|
|
50258
50490
|
hasEdit: toolDefinitions.some((definition) => definition.name === "edit_wave_file"),
|
|
50259
50491
|
hasHotReload: toolDefinitions.some((definition) => definition.name === "hot_reload_wave_preview"),
|
|
50492
|
+
hasPauseResume: toolDefinitions.some((definition) => definition.name === "pause_wave_preview") && toolDefinitions.some((definition) => definition.name === "resume_wave_preview"),
|
|
50260
50493
|
hasAssetCategorySearch: toolDefinitions.some((definition) => definition.name === "find_wave_assets_by_category"),
|
|
50261
|
-
hasProjectRename: toolDefinitions.some((definition) => definition.name === "rename_wave_project")
|
|
50494
|
+
hasProjectRename: toolDefinitions.some((definition) => definition.name === "rename_wave_project"),
|
|
50495
|
+
listedToolsHaveLocalHandlers: true,
|
|
50496
|
+
implementation: toolImplementation
|
|
50262
50497
|
},
|
|
50498
|
+
waveEngineSdkCache,
|
|
50499
|
+
waveEngineSdkLookup: localSdkLookupStatus(waveEngineSdkCache),
|
|
50263
50500
|
sessions: {
|
|
50264
50501
|
pairedStudioSessionCount: sessions.length,
|
|
50265
50502
|
readwriteSessionCount: sessions.filter((session) => session.accessMode === "readwrite").length
|
|
@@ -50268,12 +50505,13 @@ async function callReadTool(name, args, context) {
|
|
|
50268
50505
|
taskRouteId: activeRoute.taskRouteId,
|
|
50269
50506
|
phase: activeRoute.phase
|
|
50270
50507
|
} : null,
|
|
50271
|
-
nextAction: !stale ? "Agent SDK version/build/tool catalog look current. Continue with get_wave_session and list_wave_files." : externalExpectedProvided ? `Agent SDK is stale. Stop it and restart while preserving the copied
|
|
50508
|
+
nextAction: !stale ? "Agent SDK version/build/tool catalog look current. Continue with get_wave_session and list_wave_files." : externalExpectedProvided ? `Agent SDK is stale. Stop it and restart while preserving the copied MCP_TOKEN/local pairing secret: ${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}` : "Self-check needs expectedVersion and expectedBuildHash from the Copy-to-Agent message; rerun self_check_wave_mcp with those exact values before user work.",
|
|
50272
50509
|
hardStop: stale
|
|
50273
50510
|
});
|
|
50274
50511
|
}
|
|
50275
50512
|
if (name === "get_wave_mcp_health") {
|
|
50276
50513
|
const toolDefinitions = getLocalToolDefinitions();
|
|
50514
|
+
const toolImplementation = getLocalToolImplementationSummary();
|
|
50277
50515
|
const sessions = getAuthorizedSessions(context);
|
|
50278
50516
|
const activeRoute = getLocalActiveTaskRoute(context);
|
|
50279
50517
|
const waveEngineSdkCache = await inspectLocalCorpusCacheForContext(context);
|
|
@@ -50301,14 +50539,23 @@ async function callReadTool(name, args, context) {
|
|
|
50301
50539
|
requiredBuildHash: WAVE3D_AGENT_SDK_REQUIRED_BUILD,
|
|
50302
50540
|
startCommand: WAVE3D_AGENT_SDK_START_COMMAND
|
|
50303
50541
|
},
|
|
50542
|
+
authModel: {
|
|
50543
|
+
mcpTokenMeaning: context.agentToken?.startsWith("wgbt.") ? "HTTP Gateway bearer adopted locally as a same-machine SDK pairing secret." : "Same-machine SDK local pairing secret.",
|
|
50544
|
+
localPairingSecret: "Required for localhost MCP. It pairs this SDK process with the live Wave Studio browser tab and is not account login.",
|
|
50545
|
+
httpGatewayBearer: "Only meaningful against MCP_HTTP_GATEWAY_FALLBACK_URL. Same string may be adopted locally, but localhost auth remains a local pairing check.",
|
|
50546
|
+
accountLogin: "Wave Studio login/account state is separate from MCP_TOKEN. Do not fix local SDK auth by changing account login."
|
|
50547
|
+
},
|
|
50304
50548
|
tools: {
|
|
50305
50549
|
count: toolDefinitions.length,
|
|
50306
50550
|
hash: getLocalToolCatalogHash(),
|
|
50307
50551
|
hasEdit: toolDefinitions.some((definition) => definition.name === "edit_wave_file"),
|
|
50308
50552
|
hasHotReload: toolDefinitions.some((definition) => definition.name === "hot_reload_wave_preview"),
|
|
50553
|
+
hasPauseResume: toolDefinitions.some((definition) => definition.name === "pause_wave_preview") && toolDefinitions.some((definition) => definition.name === "resume_wave_preview"),
|
|
50309
50554
|
hasAssetCategorySearch: toolDefinitions.some((definition) => definition.name === "find_wave_assets_by_category"),
|
|
50310
50555
|
hasMcpHealth: toolDefinitions.some((definition) => definition.name === "get_wave_mcp_health"),
|
|
50311
|
-
hasProjectRename: toolDefinitions.some((definition) => definition.name === "rename_wave_project")
|
|
50556
|
+
hasProjectRename: toolDefinitions.some((definition) => definition.name === "rename_wave_project"),
|
|
50557
|
+
listedToolsHaveLocalHandlers: true,
|
|
50558
|
+
implementation: toolImplementation
|
|
50312
50559
|
},
|
|
50313
50560
|
onboarding: {
|
|
50314
50561
|
accepted: onboardingAccepted,
|
|
@@ -50316,6 +50563,7 @@ async function callReadTool(name, args, context) {
|
|
|
50316
50563
|
promptHash: LOCAL_MCP_AGENT_ONBOARDING_PROMPT_HASH
|
|
50317
50564
|
},
|
|
50318
50565
|
waveEngineSdkCache,
|
|
50566
|
+
waveEngineSdkLookup: localSdkLookupStatus(waveEngineSdkCache),
|
|
50319
50567
|
sessions: {
|
|
50320
50568
|
pairedStudioSessionCount: sessions.length,
|
|
50321
50569
|
readwriteSessionCount: sessions.filter((session) => session.accessMode === "readwrite").length,
|
|
@@ -50345,13 +50593,14 @@ async function callReadTool(name, args, context) {
|
|
|
50345
50593
|
stableToolMap: true,
|
|
50346
50594
|
toolCatalogHash: getLocalToolCatalogHash(),
|
|
50347
50595
|
toolCount: toolDefinitions.length,
|
|
50596
|
+
toolImplementation: getLocalToolImplementationSummary(),
|
|
50348
50597
|
toolCatalogSummary: buildWaveMcpToolCatalogSummary(toolDefinitions),
|
|
50349
50598
|
studioSkillMap: [
|
|
50350
50599
|
"studio.mcp: get_wave_mcp_health (aliases: mcp_health, mcp_status), get_wave_session, recover_wave_connection, get_wave_command_result, get_wave_coding_guardrails, get_wave_tool_map",
|
|
50351
50600
|
"studio.vfs: list_wave_files, read_wave_file, edit_wave_file, apply_wave_patch, create_wave_file, rename_wave_file, delete_wave_file",
|
|
50352
50601
|
"studio.assets: find_wave_assets_by_category (aliases: list_wave_assets_by_category, search_wave_assets_by_category, list_wave_assets), list_wave_explorer_assets, upload/stage/commit/abort asset tools, rename_wave_asset, delete_wave_asset",
|
|
50353
50602
|
"studio.project: list_wave_project_templates, new_wave_project, list_wave_projects, read_wave_project, rename_wave_project, open_wave_project, save_wave_project, share_wave_project",
|
|
50354
|
-
"studio.preview: hot_reload_wave_preview (alias: hotreload_wave_preview), run_wave_preview (alias: run_project), get_wave_runtime_diagnostics (alias: get_wave_errors), get_wave_runtime_performance_snapshot (alias: get_wave_runtime_performance)",
|
|
50603
|
+
"studio.preview: hot_reload_wave_preview (alias: hotreload_wave_preview), run_wave_preview (alias: run_project), pause_wave_preview (alias: pause_wave_engine), resume_wave_preview (alias: resume_wave_engine), get_wave_runtime_diagnostics (alias: get_wave_errors), get_wave_runtime_performance_snapshot (alias: get_wave_runtime_performance)",
|
|
50355
50604
|
"studio.capture: capture_wave_screenshot (alias: get_wave_screenshot), get_wave_runtime_entity_snapshot (alias: get_wave_entity_snapshot), list_wave_runtime_markers (alias: list_wave_markers)",
|
|
50356
50605
|
"wave.authoring: list_wave_skill_families, query_wave_skills, get_wave_skill, query_wave_api"
|
|
50357
50606
|
],
|
|
@@ -50367,8 +50616,8 @@ async function callReadTool(name, args, context) {
|
|
|
50367
50616
|
if (name === "recover_wave_connection") {
|
|
50368
50617
|
return localConnectionRecoveryResult(args, context);
|
|
50369
50618
|
}
|
|
50370
|
-
if (
|
|
50371
|
-
return await
|
|
50619
|
+
if (LOCAL_SDK_LOOKUP_TOOL_NAMES.has(name)) {
|
|
50620
|
+
return await runLocalSdkLookupTool({
|
|
50372
50621
|
context,
|
|
50373
50622
|
name,
|
|
50374
50623
|
args
|
|
@@ -50428,7 +50677,7 @@ async function callReadTool(name, args, context) {
|
|
|
50428
50677
|
ok: true,
|
|
50429
50678
|
bridgeId: context.bridgeId,
|
|
50430
50679
|
selectionBasis: sessionId ? "explicitSessionId" : pinnedSessionIdBeforeResolve ? "agentTokenPinnedSession" : "resolvedTargetPinnedOnce",
|
|
50431
|
-
tokenMode: context.agentToken?.startsWith("wgbt.") ? "hostedGatewayBearerAdopted" : "
|
|
50680
|
+
tokenMode: context.agentToken?.startsWith("wgbt.") ? "hostedGatewayBearerAdopted" : "localPairingSecret",
|
|
50432
50681
|
pinnedSessionId: getLocalPinnedSessionId(context),
|
|
50433
50682
|
session: summarizeSession(session)
|
|
50434
50683
|
});
|
|
@@ -50483,15 +50732,21 @@ async function callReadTool(name, args, context) {
|
|
|
50483
50732
|
return errorToolResult("command_timeout", error instanceof Error ? error.message : "WaveEngine Agent SDK runtime performance snapshot timed out.");
|
|
50484
50733
|
}
|
|
50485
50734
|
}
|
|
50486
|
-
if (name === "hot_reload_wave_preview" || name === "run_wave_preview") {
|
|
50735
|
+
if (name === "hot_reload_wave_preview" || name === "run_wave_preview" || name === "pause_wave_preview" || name === "resume_wave_preview") {
|
|
50487
50736
|
const sessionResult = resolveWritableSession(args, context);
|
|
50488
50737
|
if ("result" in sessionResult) return sessionResult.result;
|
|
50738
|
+
const action = name === "run_wave_preview" ? "run" : name === "pause_wave_preview" ? "pause" : name === "resume_wave_preview" ? "resume" : "hotReload";
|
|
50739
|
+
const runtimeDiagnosticsTimeoutMs = normalizeRuntimeDiagnosticsTimeoutMs2(args?.runtimeDiagnosticsTimeoutMs ?? args?.awaitTimeoutMs);
|
|
50740
|
+
const runtimeDiagnosticsLimit = normalizeRuntimeDiagnosticsLimit(args?.runtimeDiagnosticsLimit);
|
|
50489
50741
|
return await enqueueBrowserCommand({
|
|
50490
50742
|
context,
|
|
50491
50743
|
session: sessionResult.session,
|
|
50492
50744
|
command: {
|
|
50493
50745
|
type: "runtimeAction",
|
|
50494
|
-
action
|
|
50746
|
+
action,
|
|
50747
|
+
awaitRuntimeResult: shouldAwaitRuntimeActionDiagnostics(args),
|
|
50748
|
+
...runtimeDiagnosticsTimeoutMs !== void 0 ? { runtimeDiagnosticsTimeoutMs } : {},
|
|
50749
|
+
...runtimeDiagnosticsLimit !== void 0 ? { runtimeDiagnosticsLimit } : {}
|
|
50495
50750
|
}
|
|
50496
50751
|
});
|
|
50497
50752
|
}
|
|
@@ -50896,8 +51151,8 @@ async function callReadTool(name, args, context) {
|
|
|
50896
51151
|
if (!session) {
|
|
50897
51152
|
return errorToolResult("session_not_found", LOCAL_SESSION_NOT_FOUND_MESSAGE);
|
|
50898
51153
|
}
|
|
50899
|
-
const projectId = requireNonEmptyString(stringAliasArg(args, ["projectId", "id", "project"]));
|
|
50900
|
-
if (!projectId) return errorToolResult("invalid_arguments", "`read_wave_project` requires a non-empty `projectId
|
|
51154
|
+
const projectId = requireNonEmptyString(stringAliasArg(args, ["projectId", "id", "project", "url", "projectUrl", "shareUrl", "publishedUrl"]));
|
|
51155
|
+
if (!projectId) return errorToolResult("invalid_arguments", "`read_wave_project` requires a non-empty `projectId` or shared/published project URL.");
|
|
50901
51156
|
return await enqueueBrowserCommand({
|
|
50902
51157
|
context,
|
|
50903
51158
|
session,
|
|
@@ -50942,12 +51197,8 @@ async function callReadTool(name, args, context) {
|
|
|
50942
51197
|
timeoutMs: 3e4
|
|
50943
51198
|
});
|
|
50944
51199
|
}
|
|
50945
|
-
if (
|
|
50946
|
-
return
|
|
50947
|
-
context,
|
|
50948
|
-
name,
|
|
50949
|
-
args
|
|
50950
|
-
});
|
|
51200
|
+
if (CANONICAL_WAVE_MCP_TOOL_NAMES.has(name)) {
|
|
51201
|
+
return localSdkToolNotImplementedResult(name);
|
|
50951
51202
|
}
|
|
50952
51203
|
return errorToolResult("tool_not_found", `Unknown WaveEngine Agent SDK tool: ${name}.`);
|
|
50953
51204
|
}
|
|
@@ -50989,7 +51240,7 @@ async function handleWaveGenieMcpRequest(request, context) {
|
|
|
50989
51240
|
});
|
|
50990
51241
|
return createJsonRpcResult(request.id ?? null, {
|
|
50991
51242
|
nextRecommendedTool: onboardingAccepted ? !hasPairedStudioSession ? "recover_wave_connection" : activeRoute ? activeRoute.phase === "lookup" ? "query_wave_api" : activeRoute.phase === "execute" ? "edit_wave_file" : "get_wave_task_route" : "get_wave_session" : "get_wave_agent_onboarding",
|
|
50992
|
-
nextRecommendedAction: onboardingAccepted ? !hasPairedStudioSession ? "Call recover_wave_connection, then follow its nextAction to pair/wake the Wave Studio tab.
|
|
51243
|
+
nextRecommendedAction: onboardingAccepted ? !hasPairedStudioSession ? "Call recover_wave_connection, then follow its nextAction to pair/wake the Wave Studio tab. SDK lookup/cache tools can still run without a tab." : activeRoute ? activeRoute.phase === "lookup" ? "Lookup is unlocked; call query_wave_api only for exact symbol/signature/global uncertainty." : activeRoute.phase === "execute" ? "Execute is unlocked; call the specific edit/operate tool now." : "Inspect get_wave_task_route, then advance when enough evidence is collected." : "Call get_wave_session, then use observe tools or start_wave_task for authoring work." : "Call get_wave_agent_onboarding, accept the returned role/guardrails, then call tools/list again.",
|
|
50993
51244
|
requiresOnboarding: !onboardingAccepted,
|
|
50994
51245
|
requiresStudioSessionForLiveTools: true,
|
|
50995
51246
|
hasPairedStudioSession,
|
|
@@ -51002,6 +51253,10 @@ async function handleWaveGenieMcpRequest(request, context) {
|
|
|
51002
51253
|
preTaskEvidence: activeRoute ? null : getLocalPreTaskEvidence(context),
|
|
51003
51254
|
rule: WAVE_MCP_BEHAVIOR_HARNESS_RULE
|
|
51004
51255
|
},
|
|
51256
|
+
toolImplementation: {
|
|
51257
|
+
listedToolsHaveLocalHandlers: true,
|
|
51258
|
+
...getLocalToolImplementationSummary()
|
|
51259
|
+
},
|
|
51005
51260
|
toolCatalogSummary: buildWaveMcpToolCatalogSummary(tools),
|
|
51006
51261
|
tools
|
|
51007
51262
|
});
|
|
@@ -51731,6 +51986,12 @@ async function startWaveEngineAgentSdkServer(options = {}) {
|
|
|
51731
51986
|
waveEngineSdkCache: "Package-bundled WaveEngine SDK Cache for local docs/API/skills lookup. Not transport and not a fix for live-session connectivity.",
|
|
51732
51987
|
vfsMirror: "HTTP Gateway workspace snapshot for file reads/writes. Separate from WaveEngine Agent SDK live browser VFS."
|
|
51733
51988
|
},
|
|
51989
|
+
authModel: {
|
|
51990
|
+
mcpTokenMeaning: "On this localhost SDK endpoint, MCP_TOKEN is a same-machine local pairing secret for a Studio browser session.",
|
|
51991
|
+
localPairingSecret: "Required for localhost MCP. It is random per SDK/Studio pairing and is not account login or cloud authorization.",
|
|
51992
|
+
httpGatewayBearer: "Only meaningful when calling an HTTP Gateway URL. A gateway bearer can be adopted by the SDK as a localhost pairing secret, but localhost auth remains local.",
|
|
51993
|
+
accountLogin: "Wave Studio sign-in may create an HTTP Gateway pairing, but it is separate from the local SDK pairing secret."
|
|
51994
|
+
},
|
|
51734
51995
|
requiresAuthForSessions: true,
|
|
51735
51996
|
sessionCount: registry.list().length
|
|
51736
51997
|
};
|
|
@@ -51740,7 +52001,7 @@ async function startWaveEngineAgentSdkServer(options = {}) {
|
|
|
51740
52001
|
if (method === "GET" && url.pathname === "/sessions") {
|
|
51741
52002
|
const authorization = resolveAgentAuthorization(req.headers.authorization);
|
|
51742
52003
|
if (!authorization) {
|
|
51743
|
-
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK
|
|
52004
|
+
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK local pairing secret."), origin);
|
|
51744
52005
|
return;
|
|
51745
52006
|
}
|
|
51746
52007
|
const allowedSessionIds = authorization.authorizedSessionIds;
|
|
@@ -51767,7 +52028,7 @@ async function startWaveEngineAgentSdkServer(options = {}) {
|
|
|
51767
52028
|
if (method === "POST" && url.pathname === "/mcp") {
|
|
51768
52029
|
const authorization = resolveAgentAuthorization(req.headers.authorization);
|
|
51769
52030
|
if (!authorization) {
|
|
51770
|
-
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK
|
|
52031
|
+
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK local pairing secret."), origin);
|
|
51771
52032
|
return;
|
|
51772
52033
|
}
|
|
51773
52034
|
let body;
|
|
@@ -52265,7 +52526,7 @@ async function commandStart(options) {
|
|
|
52265
52526
|
sessionTtlMs: readNumberFlag(options, "session-ttl-ms")
|
|
52266
52527
|
});
|
|
52267
52528
|
console.log(`[WaveEngine Agent SDK] sdkId=${handle.bridgeId}`);
|
|
52268
|
-
console.log("[WaveEngine Agent SDK] admin/MCP
|
|
52529
|
+
console.log("[WaveEngine Agent SDK] admin/local MCP pairing secret: hidden. Use Wave Studio Copy to Agent or WAVE3D_MCP_TOKEN; do not print MCP_TOKEN values.");
|
|
52269
52530
|
console.log(`[WaveEngine Agent SDK] MCP endpoint: http://${handle.host}:${handle.port}/mcp`);
|
|
52270
52531
|
console.log("[WaveEngine Agent SDK] Live Studio tools also require a paired Wave Studio browser tab. Start/copy from the MCP orb, then call get_wave_session.");
|
|
52271
52532
|
console.log(`[WaveEngine Agent SDK] WaveEngine SDK cache root: ${getCacheRoot(options)}`);
|