wave3d-agent-sdk 0.2.4 → 0.2.5
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 +160 -68
- package/dist/sdk/README.md +3 -3
- package/dist/sdk/manifest.json +25 -25
- package/dist/sdk/wave-engine-sdk-2026-06-17.1.n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH.zip +0 -0
- package/package.json +1 -1
- package/dist/sdk/wave-engine-sdk-2026-06-17.1.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3.zip +0 -0
package/README.md
CHANGED
|
@@ -14,24 +14,26 @@ Vocabulary:
|
|
|
14
14
|
- WaveEngine Agent SDK: same-machine live MCP transport from `wave3d-agent-sdk start`.
|
|
15
15
|
- HTTP Gateway: Wave Studio Next/Vercel MCP transport for remote/cloud/sandbox fallback Studio operations.
|
|
16
16
|
- WaveEngine SDK Cache: package-bundled public-safe skill/API/example lookup data.
|
|
17
|
-
- MCP Session: paired Wave Studio browser session and
|
|
17
|
+
- MCP Session: paired Wave Studio browser session and MCP_TOKEN state.
|
|
18
|
+
- Local Pairing Secret: MCP_TOKEN on localhost. It pairs the local SDK process to the current Studio session; it is not account/cloud auth.
|
|
19
|
+
- HTTP Gateway Bearer: MCP_TOKEN on an HTTP Gateway URL. It can be adopted locally, but localhost health remains the source of truth for SDK state.
|
|
18
20
|
- VFS Mirror: HTTP Gateway read/edit snapshot. Local SDK live reads/writes use browser VFS.
|
|
19
21
|
- Project: user workspace content. Reading a project is not opening/replacing live workspace.
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
24
|
+
npx -y wave3d-agent-sdk@0.2.5 start
|
|
23
25
|
```
|
|
24
26
|
|
|
25
|
-
After Copy to Agent, restart stale SDK processes with the
|
|
27
|
+
After Copy to Agent, restart stale SDK processes with MCP_TOKEN preserved as the local pairing secret. Keep it hidden:
|
|
26
28
|
|
|
27
29
|
```bash
|
|
28
|
-
WAVE3D_MCP_TOKEN="$MCP_TOKEN" npx -y wave3d-agent-sdk@0.2.
|
|
30
|
+
WAVE3D_MCP_TOKEN="$MCP_TOKEN" npx -y wave3d-agent-sdk@0.2.5 start
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
Check SDK build before trusting a running SDK process:
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
36
|
+
npx -y wave3d-agent-sdk@0.2.5 --version
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
The package bundles the WaveEngine SDK lookup corpus. No normal session needs a separate protected zip download.
|
|
@@ -41,12 +43,12 @@ The package bundles the WaveEngine SDK lookup corpus. No normal session needs a
|
|
|
41
43
|
Wave Studio Copy to Agent defaults same-machine live MCP transport to this SDK:
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
46
|
+
npx -y wave3d-agent-sdk@0.2.5 start
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
Agents choose topology first:
|
|
48
50
|
|
|
49
|
-
- Same computer as Wave Studio browser: try copied localhost `MCP_URL`, call `self_check_wave_mcp` with copied `expectedVersion` and `expectedBuildHash`, and restart exact SDK command from Copy to Agent if `self_check_wave_mcp` is missing, SDK is stale, tools are missing, or the SDK prints
|
|
51
|
+
- Same computer as Wave Studio browser: try copied localhost `MCP_URL`, call `self_check_wave_mcp` with copied `expectedVersion` and `expectedBuildHash`, and restart exact SDK command from Copy to Agent if `self_check_wave_mcp` is missing, SDK is stale, tools are missing, or the SDK prints secrets before fallback. If restart happens after Copy to Agent, preserve MCP_TOKEN with `WAVE3D_MCP_TOKEN="$MCP_TOKEN"` so the new SDK process can authorize that local pairing secret. HTTP Gateway is degraded fallback only after SDK cannot run, update, or adopt; successful Gateway auth or convenience is not a same-machine fallback reason.
|
|
50
52
|
- Different machine, remote container, cloud agent, sandbox without shell/Node/npm, or localhost points to agent machine instead of user browser machine: use `MCP_HTTP_GATEWAY_FALLBACK_URL` directly. Do not start WaveEngine Agent SDK on wrong machine.
|
|
51
53
|
|
|
52
54
|
Call `get_wave_mcp_health` (aliases: `mcp_health`, `mcp_status`) whenever transport, SDK, or session status is unclear. It reports endpoint kind, SDK version/build, tool catalog hash/count, paired sessions, and WaveEngine SDK Cache state.
|
|
@@ -56,13 +58,13 @@ Use `MCP_HTTP_GATEWAY_FALLBACK_URL` only for topology mismatch, remote/sandboxed
|
|
|
56
58
|
For unfamiliar authoring, use the local SDK tools:
|
|
57
59
|
|
|
58
60
|
```bash
|
|
59
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
61
|
+
npx -y wave3d-agent-sdk@0.2.5 cache search "continuous left rotation"
|
|
60
62
|
```
|
|
61
63
|
|
|
62
64
|
`cache refresh` without MCP arguments reinstalls the bundled SDK into `~/.wave3d/agent-cache`:
|
|
63
65
|
|
|
64
66
|
```bash
|
|
65
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
67
|
+
npx -y wave3d-agent-sdk@0.2.5 cache refresh
|
|
66
68
|
```
|
|
67
69
|
|
|
68
70
|
Old `cache refresh --mcp-url <url> --token <token>` arguments are ignored. Normal users update the npm package; no separate zip download exists.
|
|
@@ -98,4 +100,4 @@ wave3d-agent-sdk cache clear
|
|
|
98
100
|
|
|
99
101
|
## Token Safety
|
|
100
102
|
|
|
101
|
-
Treat Wave Studio
|
|
103
|
+
Treat Wave Studio MCP_TOKEN values as secrets. Prefer passing them through `WAVE3D_MCP_TOKEN` or `WAVESTUDIO_MCP_TOKEN` rather than shell history when possible.
|
package/dist/cli.js
CHANGED
|
@@ -42533,8 +42533,8 @@ function normalizeWaveGenieAssetUploadRequest(request) {
|
|
|
42533
42533
|
|
|
42534
42534
|
// ../../src/lib/waveStudio/aiAssist/bridge/localAgentSdkContract.ts
|
|
42535
42535
|
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-20260617.
|
|
42536
|
+
var WAVE3D_AGENT_SDK_REQUIRED_VERSION = "0.2.5";
|
|
42537
|
+
var WAVE3D_AGENT_SDK_REQUIRED_BUILD = "agent-sdk-20260617.6";
|
|
42538
42538
|
var WAVE3D_AGENT_SDK_PACKAGE_SPEC = `${WAVE3D_AGENT_SDK_PACKAGE_NAME}@${WAVE3D_AGENT_SDK_REQUIRED_VERSION}`;
|
|
42539
42539
|
var WAVE3D_AGENT_SDK_START_COMMAND = `npx -y ${WAVE3D_AGENT_SDK_PACKAGE_SPEC} start`;
|
|
42540
42540
|
var WAVE3D_AGENT_SDK_TOKEN_ENV_VAR = "WAVE3D_MCP_TOKEN";
|
|
@@ -42614,7 +42614,7 @@ var SEMANTIC_GUESS_UNSAFE_PATTERN = /\b(add|append|create|insert|spawn|new line|
|
|
|
42614
42614
|
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
42615
|
var WAVE_MCP_TASK_PHASE_VALUES = ["context", "lookup", "execute", "verify", "general"];
|
|
42616
42616
|
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.";
|
|
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/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
42618
|
var WAVE_MCP_TOOL_ALIAS_CANONICAL_NAMES = {
|
|
42619
42619
|
list_wave_assets_by_category: "find_wave_assets_by_category",
|
|
42620
42620
|
search_wave_assets_by_category: "find_wave_assets_by_category",
|
|
@@ -42649,6 +42649,12 @@ var WAVE_MCP_TOOL_ALIAS_CANONICAL_NAMES = {
|
|
|
42649
42649
|
run_wave_project: "run_wave_preview",
|
|
42650
42650
|
run_project: "run_wave_preview",
|
|
42651
42651
|
run_wave_scene: "run_wave_preview",
|
|
42652
|
+
pause_wave_engine: "pause_wave_preview",
|
|
42653
|
+
pause_engine: "pause_wave_preview",
|
|
42654
|
+
pause_preview: "pause_wave_preview",
|
|
42655
|
+
resume_wave_engine: "resume_wave_preview",
|
|
42656
|
+
resume_engine: "resume_wave_preview",
|
|
42657
|
+
resume_preview: "resume_wave_preview",
|
|
42652
42658
|
read_wave_files: "list_wave_files",
|
|
42653
42659
|
get_wave_files: "list_wave_files",
|
|
42654
42660
|
list_wave_project: "list_wave_projects",
|
|
@@ -42830,7 +42836,9 @@ var WAVE_MCP_TOOL_CONTRACTS = {
|
|
|
42830
42836
|
new_wave_project: { workMode: "operate", domain: "project", safety: "workspaceOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "project.manage", directEditIntent: "modifyProject", destructive: true },
|
|
42831
42837
|
open_wave_project: { workMode: "operate", domain: "project", safety: "workspaceOperation", targetPolicy: "exactProjectIdRequired", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "project.manage", directEditIntent: "modifyProject", destructive: true },
|
|
42832
42838
|
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" }
|
|
42839
|
+
run_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" },
|
|
42840
|
+
pause_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" },
|
|
42841
|
+
resume_wave_preview: { workMode: "operate", domain: "preview", safety: "runtimeOperation", targetPolicy: "none", requiresTaskRoute: false, supportsTaskRoute: true, directIntentKind: "preview.control", directEditIntent: "previewOnly" }
|
|
42834
42842
|
};
|
|
42835
42843
|
var WAVE_MCP_SETUP_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
42836
42844
|
"get_wave_agent_onboarding",
|
|
@@ -42890,7 +42898,9 @@ var WAVE_MCP_TASK_EXECUTE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
42890
42898
|
"new_wave_project",
|
|
42891
42899
|
"open_wave_project",
|
|
42892
42900
|
"hot_reload_wave_preview",
|
|
42893
|
-
"run_wave_preview"
|
|
42901
|
+
"run_wave_preview",
|
|
42902
|
+
"pause_wave_preview",
|
|
42903
|
+
"resume_wave_preview"
|
|
42894
42904
|
]);
|
|
42895
42905
|
var WAVE_MCP_TASK_VERIFY_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
42896
42906
|
"get_wave_command_result",
|
|
@@ -43564,7 +43574,7 @@ function buildWaveMcpTaskRouteRecommendedNextToolCall(route) {
|
|
|
43564
43574
|
}
|
|
43565
43575
|
if (route.editIntent === "previewOnly") {
|
|
43566
43576
|
return {
|
|
43567
|
-
tool: "hot_reload_wave_preview | run_wave_preview",
|
|
43577
|
+
tool: "hot_reload_wave_preview | run_wave_preview | pause_wave_preview | resume_wave_preview",
|
|
43568
43578
|
arguments: {},
|
|
43569
43579
|
note: "Poll get_wave_runtime_diagnostics afterward for real outcome."
|
|
43570
43580
|
};
|
|
@@ -43633,7 +43643,7 @@ function toolIntentAllowed(toolName, route) {
|
|
|
43633
43643
|
if (canonicalToolName === "create_wave_file" || canonicalToolName === "rename_wave_file" || canonicalToolName === "delete_wave_file") {
|
|
43634
43644
|
return routeHasAnyIntent(route, ["vfs.manage", "code.author"]);
|
|
43635
43645
|
}
|
|
43636
|
-
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview") {
|
|
43646
|
+
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview" || canonicalToolName === "pause_wave_preview" || canonicalToolName === "resume_wave_preview") {
|
|
43637
43647
|
return routeHasAnyIntent(route, ["preview.control", "code.direct_edit", "code.semantic_guess_edit", "code.author", "code.debug"]);
|
|
43638
43648
|
}
|
|
43639
43649
|
if (canonicalToolName === "get_wave_runtime_entity_snapshot") {
|
|
@@ -43738,7 +43748,7 @@ function canFastExecuteExactEditTool(input) {
|
|
|
43738
43748
|
}
|
|
43739
43749
|
function isWriteTool(toolName) {
|
|
43740
43750
|
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";
|
|
43751
|
+
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
43752
|
}
|
|
43743
43753
|
function waveMcpToolRequiresTaskRoute(toolName) {
|
|
43744
43754
|
const canonicalToolName = canonicalizeWaveMcpToolName(toolName);
|
|
@@ -44017,7 +44027,7 @@ function validateWaveMcpTaskToolCall(input) {
|
|
|
44017
44027
|
if (!input.route || input.route.taskRouteId !== taskRouteId) {
|
|
44018
44028
|
return {
|
|
44019
44029
|
code: "task_route_not_found",
|
|
44020
|
-
message: "The provided taskRouteId is not the active Wave task route for this
|
|
44030
|
+
message: "The provided taskRouteId is not the active Wave task route for this MCP session.",
|
|
44021
44031
|
details: {
|
|
44022
44032
|
taskRouteId
|
|
44023
44033
|
}
|
|
@@ -44114,7 +44124,7 @@ function recordWaveMcpTaskEvidenceUse(input) {
|
|
|
44114
44124
|
}
|
|
44115
44125
|
if (WAVE_MCP_ASSET_MUTATION_TOOL_NAMES.has(canonicalToolName)) evidence = { ...evidence, assetsMutated: true };
|
|
44116
44126
|
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 };
|
|
44127
|
+
if (canonicalToolName === "hot_reload_wave_preview" || canonicalToolName === "run_wave_preview" || canonicalToolName === "pause_wave_preview" || canonicalToolName === "resume_wave_preview") evidence = { ...evidence, previewControlled: true };
|
|
44118
44128
|
if (canonicalToolName === "get_wave_runtime_diagnostics" || canonicalToolName === "get_wave_runtime_performance_snapshot") {
|
|
44119
44129
|
evidence = { ...evidence, diagnosticsRead: true, runtimeInspected: true };
|
|
44120
44130
|
}
|
|
@@ -44430,9 +44440,9 @@ var WAVE_MCP_AGENT_BRIEF = [
|
|
|
44430
44440
|
'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
44441
|
"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
44442
|
"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
|
|
44443
|
+
`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.`,
|
|
44444
|
+
"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.",
|
|
44445
|
+
`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 exact 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.`,
|
|
44436
44446
|
'0d. Local parity rule: WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway catalog plus SDK 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.',
|
|
44437
44447
|
'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.',
|
|
44438
44448
|
"0f. Diagnose-only tasks use `code.debug`; bug-fix tasks use both `code.debug` and `code.author` so evidence can lead to edits.",
|
|
@@ -44460,7 +44470,7 @@ var WAVE_MCP_AGENT_BRIEF = [
|
|
|
44460
44470
|
"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
44471
|
"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.",
|
|
44462
44472
|
"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; use `requestHotReload: true` for fire-and-poll, or call `hot_reload_wave_preview` for standalone preview refresh. 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.",
|
|
44473
|
+
"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; use `requestHotReload: true` for fire-and-poll, or call `hot_reload_wave_preview` for standalone preview refresh. Standalone `run_wave_preview` / `hot_reload_wave_preview` can use `awaitRuntimeResult: true` for same-call bounded diagnostics. 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
44474
|
"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
44475
|
'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
44476
|
'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.',
|
|
@@ -44522,8 +44532,8 @@ var WAVE_MCP_CODING_GUARDRAIL = [
|
|
|
44522
44532
|
"9. Use `waveStudio.*` only for Studio host services. Check `waveStudio.capabilities.assetSave` before save/bake calls.",
|
|
44523
44533
|
'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 Studio preview. 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
44534
|
"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. Use `requestHotReload: true` for fire-and-poll, or call `hot_reload_wave_preview` as a standalone refresh. 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.",
|
|
44526
|
-
'12. After run/hot reload, use returned `runtimeVerification` when `awaitHotReload: true`; 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`.',
|
|
44535
|
+
"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. Use `requestHotReload: true` for fire-and-poll, or call `hot_reload_wave_preview` as a standalone refresh; pass `awaitRuntimeResult: true` on standalone run/hot reload when you want same-call bounded diagnostics. 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.",
|
|
44536
|
+
'12. After run/hot reload, use returned `runtimeVerification` when `awaitHotReload: true` or `awaitRuntimeResult: true`; 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
44537
|
"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
44538
|
`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
44539
|
"14. Project tools: use `list_wave_project_templates` before `new_wave_project({ templateId? })`; use `list_wave_projects` before `read_wave_project({ projectId })`, `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. 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.",
|
|
@@ -44532,7 +44542,7 @@ var WAVE_MCP_CODING_GUARDRAIL = [
|
|
|
44532
44542
|
"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
44543
|
"18. `delete_wave_asset` is destructive. Use an exact path returned by `list_wave_explorer_assets` and do not guess asset paths.",
|
|
44534
44544
|
'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
|
|
44545
|
+
"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
44546
|
"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
44547
|
].join("\n");
|
|
44538
44548
|
var WAVE_MCP_CODING_GUARDRAIL_SUMMARY = [
|
|
@@ -44555,7 +44565,7 @@ var WAVE_MCP_CODING_GUARDRAIL_SUMMARY = [
|
|
|
44555
44565
|
"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
44566
|
"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
44567
|
"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.
|
|
44568
|
+
"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
44569
|
"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
44570
|
"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
44571
|
"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.",
|
|
@@ -44650,7 +44660,7 @@ var WAVE_MCP_STUDIO_SKILL_MAP_GUIDE = [
|
|
|
44650
44660
|
"- `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
44661
|
"- `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
44662
|
"- `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`.",
|
|
44663
|
+
"- `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
44664
|
"- `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
44665
|
"- `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
44666
|
"",
|
|
@@ -44670,11 +44680,11 @@ var WAVE_MCP_STUDIO_TOOL_GUIDE = [
|
|
|
44670
44680
|
"Wave Studio runtime and MCP tool guide:",
|
|
44671
44681
|
"- 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
44682
|
"- 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.*` skill tools for WaveEngine code-authoring decisions: `list_wave_skill_families`, `query_wave_skills`, and `get_wave_skill`. Use local-SDK `query_wave_api` only for exact API/global/signature lookup after current-code or skill routing; HTTP Gateway hides/retires cloud 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.",
|
|
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.",
|
|
44683
|
+
"- 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
44684
|
"- 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 plus SDK session discovery extras. Direct local live-session tools include VFS edits, assets/uploads, project save/open/new/read/share, preview run/hot reload, 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.',
|
|
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
|
|
44685
|
+
'- Local parity rule: WaveEngine Agent SDK `tools/list` mirrors the HTTP Gateway catalog plus SDK 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.',
|
|
44686
|
+
`- 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.`,
|
|
44687
|
+
`- 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 exact 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
44688
|
"- 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
44689
|
`- 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\`.`,
|
|
44680
44690
|
"- 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.",
|
|
@@ -44702,7 +44712,7 @@ var WAVE_MCP_STUDIO_TOOL_GUIDE = [
|
|
|
44702
44712
|
"- `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
44713
|
"- `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
44714
|
'- 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.
|
|
44715
|
+
"- 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. Patch/runtime-action responses report that work was requested/scheduled, not that execution finished unless the edit tool used `awaitHotReload:true` or standalone run/hot reload used `awaitRuntimeResult:true`. `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` until `runtimeBusy` is false and `lastRuntimeOutcome` is `success` or `error`, require `editorErrorCount === 0`, then choose one relevant proof tool if needed: screenshot, runtime entity snapshot, markers, or performance snapshot."
|
|
44706
44716
|
].join("\n");
|
|
44707
44717
|
|
|
44708
44718
|
// ../../src/lib/waveStudio/aiAssist/bridge/hosted/mcpResources/toolCatalog.ts
|
|
@@ -44716,7 +44726,7 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44716
44726
|
"- `get_wave_coding_guardrails`: call after onboarding acceptance; returns policy, file context, tool catalog, and recipes.",
|
|
44717
44727
|
'- `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
44728
|
"- `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
|
|
44729
|
+
`- 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
44730
|
"- `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
44731
|
'- WaveEngine SDK Cache: normal API/skill 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 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 exact 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
44732
|
"- 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.",
|
|
@@ -44744,8 +44754,9 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44744
44754
|
"- `query_wave_api`: 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
44755
|
"",
|
|
44746
44756
|
"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.",
|
|
44757
|
+
"- `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. Pass `awaitRuntimeResult:true` for one-call request + bounded diagnostics.",
|
|
44758
|
+
"- `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. Pass `awaitRuntimeResult:true` for one-call request + bounded diagnostics.",
|
|
44759
|
+
"- `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
44760
|
"- `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
44761
|
"- `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
44762
|
"",
|
|
@@ -44834,7 +44845,7 @@ var LOCAL_HOSTED_TOKEN_PREFIX = "wgbt.";
|
|
|
44834
44845
|
var CORPUS_CACHE_DIR_ENV = "WAVE3D_AGENT_CACHE_DIR";
|
|
44835
44846
|
var MAX_CORPUS_ZIP_BYTES = 50 * 1024 * 1024;
|
|
44836
44847
|
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
|
|
44848
|
+
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
44849
|
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
44850
|
var LOCAL_BROWSER_COMMAND_PENDING_NOTE = " Local browser-backed commands wait for the Studio browser result directly on this transport.";
|
|
44840
44851
|
|
|
@@ -44844,7 +44855,7 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT_HASH = "local_mcp_onboarding_20260615_4";
|
|
|
44844
44855
|
var LOCAL_MCP_AGENT_READY_SUMMARY = {
|
|
44845
44856
|
role: "You are the Wave Studio authoring agent for this live browser session. Treat onboarding as system-prompt-like rules until session ends.",
|
|
44846
44857
|
mustKeepInActiveContext: [
|
|
44847
|
-
"Keep
|
|
44858
|
+
"Keep MCP_TOKEN secret. On localhost it is a same-machine pairing secret; on HTTP Gateway it is a gateway bearer.",
|
|
44848
44859
|
"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
44860
|
`Keep full intent taxonomy in active LLM context: ${WAVE_MCP_TASK_INTENT_KIND_VALUES.join(", ")}.`,
|
|
44850
44861
|
"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.",
|
|
@@ -44858,7 +44869,7 @@ var LOCAL_MCP_AGENT_READY_SUMMARY = {
|
|
|
44858
44869
|
"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
44870
|
"After final code edit, prefer awaitHotReload:true for one-call edit + hot reload + bounded diagnostics; inspect changedFiles/changedPaths/partial/skippedOperations/hotReloadRequested/hotReloadSkippedReason/runtimeVerification.",
|
|
44860
44871
|
"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
|
|
44872
|
+
"Production/HTTP-Gateway pairing path must have WaveEngine SDK Cache prepared before onboarding accept succeeds; SDK comes bundled in the npm SDK package."
|
|
44862
44873
|
],
|
|
44863
44874
|
nextRequiredCalls: [
|
|
44864
44875
|
"tools/list",
|
|
@@ -44882,12 +44893,12 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT = [
|
|
|
44882
44893
|
`Before accepting onboarding, set all context-cache confirmations true only after these are active-context cached: ${WAVE_MCP_REQUIRED_CONTEXT_CACHE_CONFIRMATIONS.join(", ")}.`,
|
|
44883
44894
|
"",
|
|
44884
44895
|
"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
|
|
44896
|
+
`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
44897
|
"",
|
|
44887
44898
|
"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
|
|
44899
|
+
`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
44900
|
"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;
|
|
44901
|
+
"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
44902
|
"",
|
|
44892
44903
|
"Required workflow:",
|
|
44893
44904
|
'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.',
|
|
@@ -44909,7 +44920,7 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT = [
|
|
|
44909
44920
|
"",
|
|
44910
44921
|
"WaveEngine Agent SDK scope:",
|
|
44911
44922
|
'This endpoint mirrors the HTTP Gateway tool catalog 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.',
|
|
44912
|
-
`Recovery rule: \`recover_wave_connection\` is the first tool after \`agent_onboarding_required\`, \`session_not_found\`, \`command_timeout\`, \`command_lease_expired\`, \`hosted_mcp_proxy_failed\`, 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
|
|
44923
|
+
`Recovery rule: \`recover_wave_connection\` is the first tool after \`agent_onboarding_required\`, \`session_not_found\`, \`command_timeout\`, \`command_lease_expired\`, \`hosted_mcp_proxy_failed\`, 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
44924
|
].join("\n");
|
|
44914
44925
|
|
|
44915
44926
|
// ../../scripts/wavegenie-sdk/mcp/referenceTools.ts
|
|
@@ -45297,12 +45308,12 @@ function localCorpusSource(current) {
|
|
|
45297
45308
|
};
|
|
45298
45309
|
}
|
|
45299
45310
|
async function inspectLocalCorpusCacheForContext(context) {
|
|
45300
|
-
const
|
|
45311
|
+
const productionGatewayPairing = context.agentToken?.startsWith(LOCAL_HOSTED_TOKEN_PREFIX) ?? false;
|
|
45301
45312
|
const current = await readLocalCorpusCurrent();
|
|
45302
45313
|
const cacheRoot = getLocalCorpusCacheRoot();
|
|
45303
45314
|
if (current) {
|
|
45304
45315
|
return {
|
|
45305
|
-
required:
|
|
45316
|
+
required: productionGatewayPairing,
|
|
45306
45317
|
ready: true,
|
|
45307
45318
|
exists: true,
|
|
45308
45319
|
verification: "package_bundled_sdk_cache_verified_on_disk",
|
|
@@ -45311,11 +45322,11 @@ async function inspectLocalCorpusCacheForContext(context) {
|
|
|
45311
45322
|
};
|
|
45312
45323
|
}
|
|
45313
45324
|
return {
|
|
45314
|
-
required:
|
|
45325
|
+
required: productionGatewayPairing,
|
|
45315
45326
|
ready: false,
|
|
45316
45327
|
exists: false,
|
|
45317
|
-
errorCode:
|
|
45318
|
-
message:
|
|
45328
|
+
errorCode: productionGatewayPairing ? "wave_engine_sdk_cache_not_ready" : "wave_engine_sdk_cache_missing",
|
|
45329
|
+
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
45330
|
cacheRoot,
|
|
45320
45331
|
commandTemplate: WAVE_MCP_CORPUS_CACHE_COMMAND_TEMPLATE
|
|
45321
45332
|
};
|
|
@@ -45742,21 +45753,21 @@ async function ensureLocalCorpusCurrent(context) {
|
|
|
45742
45753
|
return await readLocalCorpusCurrent();
|
|
45743
45754
|
}
|
|
45744
45755
|
async function prepareLocalCorpusForOnboarding(context) {
|
|
45745
|
-
const
|
|
45756
|
+
const productionGatewayPairing = context.agentToken?.startsWith(LOCAL_HOSTED_TOKEN_PREFIX) ?? false;
|
|
45746
45757
|
const current = await ensureLocalCorpusCurrent(context);
|
|
45747
45758
|
if (current) {
|
|
45748
45759
|
return {
|
|
45749
|
-
required:
|
|
45760
|
+
required: productionGatewayPairing,
|
|
45750
45761
|
ready: true,
|
|
45751
45762
|
verification: "package_bundled_sdk_cache_verified_on_disk",
|
|
45752
45763
|
...localCorpusSource(current)
|
|
45753
45764
|
};
|
|
45754
45765
|
}
|
|
45755
45766
|
return {
|
|
45756
|
-
required:
|
|
45767
|
+
required: productionGatewayPairing,
|
|
45757
45768
|
ready: false,
|
|
45758
45769
|
errorCode: "wave_engine_sdk_cache_not_ready",
|
|
45759
|
-
message:
|
|
45770
|
+
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
45771
|
cacheRoot: getLocalCorpusCacheRoot(),
|
|
45761
45772
|
commandTemplate: WAVE_MCP_CORPUS_CACHE_COMMAND_TEMPLATE
|
|
45762
45773
|
};
|
|
@@ -47986,7 +47997,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
47986
47997
|
},
|
|
47987
47998
|
{
|
|
47988
47999
|
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
|
|
48000
|
+
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 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
48001
|
inputSchema: {
|
|
47991
48002
|
type: "object",
|
|
47992
48003
|
properties: {
|
|
@@ -48076,7 +48087,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
48076
48087
|
},
|
|
48077
48088
|
{
|
|
48078
48089
|
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
|
|
48090
|
+
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
48091
|
inputSchema: {
|
|
48081
48092
|
type: "object",
|
|
48082
48093
|
properties: {
|
|
@@ -49182,7 +49193,17 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
49182
49193
|
inputSchema: {
|
|
49183
49194
|
type: "object",
|
|
49184
49195
|
properties: {
|
|
49185
|
-
idempotencyKey: { type: "string" }
|
|
49196
|
+
idempotencyKey: { type: "string" },
|
|
49197
|
+
awaitRuntimeResult: {
|
|
49198
|
+
type: "boolean",
|
|
49199
|
+
description: "When true, wait in the same MCP call for bounded runtime diagnostics after the hot-reload request. Response includes runtimeVerification."
|
|
49200
|
+
},
|
|
49201
|
+
awaitDiagnostics: {
|
|
49202
|
+
type: "boolean",
|
|
49203
|
+
description: "Alias of awaitRuntimeResult."
|
|
49204
|
+
},
|
|
49205
|
+
runtimeDiagnosticsTimeoutMs: { type: "number", minimum: 500, maximum: 15e3 },
|
|
49206
|
+
runtimeDiagnosticsLimit: { type: "number", minimum: 1, maximum: 500 }
|
|
49186
49207
|
},
|
|
49187
49208
|
additionalProperties: false
|
|
49188
49209
|
}
|
|
@@ -49190,6 +49211,38 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
49190
49211
|
{
|
|
49191
49212
|
name: "run_wave_preview",
|
|
49192
49213
|
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. This tool confirms the request was accepted, not that runtime execution has finished; use returned requestedAt and poll diagnostics until lastRuntimeOutcomeAt is newer and lastRuntimeOutcome is success or error, then inspect latestError/screenshot/entity snapshots.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`,
|
|
49214
|
+
inputSchema: {
|
|
49215
|
+
type: "object",
|
|
49216
|
+
properties: {
|
|
49217
|
+
idempotencyKey: { type: "string" },
|
|
49218
|
+
awaitRuntimeResult: {
|
|
49219
|
+
type: "boolean",
|
|
49220
|
+
description: "When true, wait in the same MCP call for bounded runtime diagnostics after the run request. Response includes runtimeVerification."
|
|
49221
|
+
},
|
|
49222
|
+
awaitDiagnostics: {
|
|
49223
|
+
type: "boolean",
|
|
49224
|
+
description: "Alias of awaitRuntimeResult."
|
|
49225
|
+
},
|
|
49226
|
+
runtimeDiagnosticsTimeoutMs: { type: "number", minimum: 500, maximum: 15e3 },
|
|
49227
|
+
runtimeDiagnosticsLimit: { type: "number", minimum: 1, maximum: 500 }
|
|
49228
|
+
},
|
|
49229
|
+
additionalProperties: false
|
|
49230
|
+
}
|
|
49231
|
+
},
|
|
49232
|
+
{
|
|
49233
|
+
name: "pause_wave_preview",
|
|
49234
|
+
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}`,
|
|
49235
|
+
inputSchema: {
|
|
49236
|
+
type: "object",
|
|
49237
|
+
properties: {
|
|
49238
|
+
idempotencyKey: { type: "string" }
|
|
49239
|
+
},
|
|
49240
|
+
additionalProperties: false
|
|
49241
|
+
}
|
|
49242
|
+
},
|
|
49243
|
+
{
|
|
49244
|
+
name: "resume_wave_preview",
|
|
49245
|
+
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
49246
|
inputSchema: {
|
|
49194
49247
|
type: "object",
|
|
49195
49248
|
properties: {
|
|
@@ -49247,6 +49300,16 @@ function buildHostedWaveStudioMcpToolDefinitions() {
|
|
|
49247
49300
|
canonicalName: "run_wave_preview",
|
|
49248
49301
|
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
49302
|
}),
|
|
49303
|
+
aliasToolDefinition(definitions, {
|
|
49304
|
+
name: "pause_wave_engine",
|
|
49305
|
+
canonicalName: "pause_wave_preview",
|
|
49306
|
+
description: `[studio.preview] Alias of pause_wave_preview for "pause engine" requests.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`
|
|
49307
|
+
}),
|
|
49308
|
+
aliasToolDefinition(definitions, {
|
|
49309
|
+
name: "resume_wave_engine",
|
|
49310
|
+
canonicalName: "resume_wave_preview",
|
|
49311
|
+
description: `[studio.preview] Alias of resume_wave_preview for "resume engine" requests.${WRITE_PAIRING_REQUIRED_NOTE}${BROWSER_COMMAND_PENDING_NOTE}`
|
|
49312
|
+
}),
|
|
49250
49313
|
aliasToolDefinition(definitions, {
|
|
49251
49314
|
name: "mcp_health",
|
|
49252
49315
|
canonicalName: "get_wave_mcp_health",
|
|
@@ -49330,13 +49393,17 @@ var LOCAL_OPTIONAL_SESSION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
49330
49393
|
"hot_reload_wave_preview",
|
|
49331
49394
|
"hotreload_wave_preview",
|
|
49332
49395
|
"run_wave_preview",
|
|
49333
|
-
"run_project"
|
|
49396
|
+
"run_project",
|
|
49397
|
+
"pause_wave_preview",
|
|
49398
|
+
"pause_wave_engine",
|
|
49399
|
+
"resume_wave_preview",
|
|
49400
|
+
"resume_wave_engine"
|
|
49334
49401
|
]);
|
|
49335
49402
|
function getReadToolDefinitions() {
|
|
49336
49403
|
return [
|
|
49337
49404
|
{
|
|
49338
49405
|
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
|
|
49406
|
+
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
49407
|
inputSchema: {
|
|
49341
49408
|
type: "object",
|
|
49342
49409
|
properties: {
|
|
@@ -49364,7 +49431,7 @@ function getReadToolDefinitions() {
|
|
|
49364
49431
|
},
|
|
49365
49432
|
{
|
|
49366
49433
|
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
|
|
49434
|
+
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
49435
|
inputSchema: {
|
|
49369
49436
|
type: "object",
|
|
49370
49437
|
properties: {
|
|
@@ -49727,24 +49794,24 @@ function localConnectionRecoveryResult(args, context) {
|
|
|
49727
49794
|
let requiresUserAction = false;
|
|
49728
49795
|
if (!onboardingAccepted || lastErrorCode === "agent_onboarding_required") {
|
|
49729
49796
|
state = "needs_onboarding";
|
|
49730
|
-
nextAction = "Re-run onboarding on this same local endpoint
|
|
49797
|
+
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
49798
|
nextTool = "get_wave_agent_onboarding";
|
|
49732
49799
|
steps.push("Do not ask user for new Copy to Agent unless local HTTP auth fails.");
|
|
49733
49800
|
} else if (sessions.length === 0 || lastErrorCode === "session_not_found") {
|
|
49734
49801
|
state = "no_paired_studio_tab";
|
|
49735
|
-
nextAction = "WaveEngine Agent SDK HTTP is alive, but no Wave Studio tab is paired with this
|
|
49802
|
+
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
49803
|
nextTool = "get_wave_session";
|
|
49737
49804
|
requiresUserAction = true;
|
|
49738
49805
|
steps.push("Do not switch to SDK cache or query tools as a transport fix.");
|
|
49739
49806
|
} else if (lastErrorCode === "command_timeout" || lastErrorCode === "command_lease_expired" || symptom.toLowerCase().includes("hang") || symptom.toLowerCase().includes("timeout") || !selectedSessionReady) {
|
|
49740
49807
|
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
|
|
49808
|
+
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
49809
|
nextTool = failedTool || "get_wave_session";
|
|
49743
49810
|
requiresUserAction = true;
|
|
49744
49811
|
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
49812
|
} else if (lastErrorCode === "session_write_not_allowed" || selectedSession?.accessMode !== "readwrite") {
|
|
49746
49813
|
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
|
|
49814
|
+
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
49815
|
nextTool = "get_wave_session";
|
|
49749
49816
|
requiresUserAction = true;
|
|
49750
49817
|
} else if (lastErrorCode === "hosted_mcp_proxy_failed" || lastErrorCode === "wave_engine_sdk_cache_required") {
|
|
@@ -49796,8 +49863,8 @@ function localConnectionRecoveryResult(args, context) {
|
|
|
49796
49863
|
steps,
|
|
49797
49864
|
hardStopRules: [
|
|
49798
49865
|
"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
|
|
49866
|
+
"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.",
|
|
49867
|
+
"No paired session or stale command poll: wake/reopen Wave Studio tab; keep same local endpoint and MCP_TOKEN pairing secret first.",
|
|
49801
49868
|
"WaveEngine SDK Cache failure is not live transport failure."
|
|
49802
49869
|
]
|
|
49803
49870
|
});
|
|
@@ -49845,7 +49912,7 @@ function localAuthoringReminderKindForToolName(toolName) {
|
|
|
49845
49912
|
if (canonicalToolName === "edit_wave_file" || canonicalToolName === "create_wave_file" || canonicalToolName === "rename_wave_file" || canonicalToolName === "delete_wave_file" || canonicalToolName === "apply_wave_patch") {
|
|
49846
49913
|
return "codeEdit";
|
|
49847
49914
|
}
|
|
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";
|
|
49915
|
+
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
49916
|
return "studio";
|
|
49850
49917
|
}
|
|
49851
49918
|
function attachAuthoringReminder(result, kind) {
|
|
@@ -49917,6 +49984,11 @@ function normalizeRuntimeDiagnosticsLimit(value) {
|
|
|
49917
49984
|
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
49918
49985
|
return Math.min(Math.max(1, Math.trunc(value)), 500);
|
|
49919
49986
|
}
|
|
49987
|
+
function normalizeRuntimeDiagnosticsTimeoutMs2(value) {
|
|
49988
|
+
if (typeof value === "undefined") return void 0;
|
|
49989
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
49990
|
+
return Math.min(Math.max(500, Math.trunc(value)), 15e3);
|
|
49991
|
+
}
|
|
49920
49992
|
function resolveAssetCategoryBucket(value) {
|
|
49921
49993
|
if (typeof value !== "string" || !value.trim()) return null;
|
|
49922
49994
|
return getWaveStudioAssetBucketFromCategory(value.trim());
|
|
@@ -50081,7 +50153,7 @@ async function callReadTool(name, args, context) {
|
|
|
50081
50153
|
{ phase: 0, required: false, action: "WaveEngine Agent SDK preflight", fallback: "Already satisfied because this endpoint is local." },
|
|
50082
50154
|
{ phase: 1, required: true, action: "initialize", fallback: null },
|
|
50083
50155
|
{ 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
|
|
50156
|
+
{ 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
50157
|
{ phase: 4, required: true, action: "tools/list", fallback: null },
|
|
50086
50158
|
{ phase: 5, required: true, action: "get_wave_session", fallback: null },
|
|
50087
50159
|
{ phase: 6, required: true, action: "list_wave_files", fallback: null },
|
|
@@ -50159,7 +50231,7 @@ async function callReadTool(name, args, context) {
|
|
|
50159
50231
|
return successToolResult({
|
|
50160
50232
|
ok: true,
|
|
50161
50233
|
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
|
|
50234
|
+
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
50235
|
promptVersion,
|
|
50164
50236
|
promptHash,
|
|
50165
50237
|
localSdk: true,
|
|
@@ -50201,7 +50273,7 @@ async function callReadTool(name, args, context) {
|
|
|
50201
50273
|
const taskRouteId = readWaveMcpTaskRouteId(args);
|
|
50202
50274
|
const route = getLocalActiveTaskRoute(context);
|
|
50203
50275
|
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
|
|
50276
|
+
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
50277
|
taskRouteId: taskRouteId || null
|
|
50206
50278
|
});
|
|
50207
50279
|
}
|
|
@@ -50220,7 +50292,7 @@ async function callReadTool(name, args, context) {
|
|
|
50220
50292
|
const taskRouteId = readWaveMcpTaskRouteId(args);
|
|
50221
50293
|
const route = getLocalActiveTaskRoute(context);
|
|
50222
50294
|
if (!route || taskRouteId && route.taskRouteId !== taskRouteId) {
|
|
50223
|
-
return taskRouteErrorToolResult("task_route_not_found", "No active Wave task route found for this
|
|
50295
|
+
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
50296
|
taskRouteId: taskRouteId || null,
|
|
50225
50297
|
activeTaskRouteId: route?.taskRouteId ?? null,
|
|
50226
50298
|
activeTaskPhase: route?.phase ?? null
|
|
@@ -50257,6 +50329,7 @@ async function callReadTool(name, args, context) {
|
|
|
50257
50329
|
hash: getLocalToolCatalogHash(),
|
|
50258
50330
|
hasEdit: toolDefinitions.some((definition) => definition.name === "edit_wave_file"),
|
|
50259
50331
|
hasHotReload: toolDefinitions.some((definition) => definition.name === "hot_reload_wave_preview"),
|
|
50332
|
+
hasPauseResume: toolDefinitions.some((definition) => definition.name === "pause_wave_preview") && toolDefinitions.some((definition) => definition.name === "resume_wave_preview"),
|
|
50260
50333
|
hasAssetCategorySearch: toolDefinitions.some((definition) => definition.name === "find_wave_assets_by_category"),
|
|
50261
50334
|
hasProjectRename: toolDefinitions.some((definition) => definition.name === "rename_wave_project")
|
|
50262
50335
|
},
|
|
@@ -50268,7 +50341,7 @@ async function callReadTool(name, args, context) {
|
|
|
50268
50341
|
taskRouteId: activeRoute.taskRouteId,
|
|
50269
50342
|
phase: activeRoute.phase
|
|
50270
50343
|
} : 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
|
|
50344
|
+
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
50345
|
hardStop: stale
|
|
50273
50346
|
});
|
|
50274
50347
|
}
|
|
@@ -50301,11 +50374,18 @@ async function callReadTool(name, args, context) {
|
|
|
50301
50374
|
requiredBuildHash: WAVE3D_AGENT_SDK_REQUIRED_BUILD,
|
|
50302
50375
|
startCommand: WAVE3D_AGENT_SDK_START_COMMAND
|
|
50303
50376
|
},
|
|
50377
|
+
authModel: {
|
|
50378
|
+
mcpTokenMeaning: context.agentToken?.startsWith("wgbt.") ? "HTTP Gateway bearer adopted locally as a same-machine SDK pairing secret." : "Same-machine SDK local pairing secret.",
|
|
50379
|
+
localPairingSecret: "Required for localhost MCP. It pairs this SDK process with the live Wave Studio browser tab and is not account login.",
|
|
50380
|
+
httpGatewayBearer: "Only meaningful against MCP_HTTP_GATEWAY_FALLBACK_URL. Same string may be adopted locally, but localhost auth remains a local pairing check.",
|
|
50381
|
+
accountLogin: "Wave Studio login/account state is separate from MCP_TOKEN. Do not fix local SDK auth by changing account login."
|
|
50382
|
+
},
|
|
50304
50383
|
tools: {
|
|
50305
50384
|
count: toolDefinitions.length,
|
|
50306
50385
|
hash: getLocalToolCatalogHash(),
|
|
50307
50386
|
hasEdit: toolDefinitions.some((definition) => definition.name === "edit_wave_file"),
|
|
50308
50387
|
hasHotReload: toolDefinitions.some((definition) => definition.name === "hot_reload_wave_preview"),
|
|
50388
|
+
hasPauseResume: toolDefinitions.some((definition) => definition.name === "pause_wave_preview") && toolDefinitions.some((definition) => definition.name === "resume_wave_preview"),
|
|
50309
50389
|
hasAssetCategorySearch: toolDefinitions.some((definition) => definition.name === "find_wave_assets_by_category"),
|
|
50310
50390
|
hasMcpHealth: toolDefinitions.some((definition) => definition.name === "get_wave_mcp_health"),
|
|
50311
50391
|
hasProjectRename: toolDefinitions.some((definition) => definition.name === "rename_wave_project")
|
|
@@ -50351,7 +50431,7 @@ async function callReadTool(name, args, context) {
|
|
|
50351
50431
|
"studio.vfs: list_wave_files, read_wave_file, edit_wave_file, apply_wave_patch, create_wave_file, rename_wave_file, delete_wave_file",
|
|
50352
50432
|
"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
50433
|
"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)",
|
|
50434
|
+
"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
50435
|
"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
50436
|
"wave.authoring: list_wave_skill_families, query_wave_skills, get_wave_skill, query_wave_api"
|
|
50357
50437
|
],
|
|
@@ -50428,7 +50508,7 @@ async function callReadTool(name, args, context) {
|
|
|
50428
50508
|
ok: true,
|
|
50429
50509
|
bridgeId: context.bridgeId,
|
|
50430
50510
|
selectionBasis: sessionId ? "explicitSessionId" : pinnedSessionIdBeforeResolve ? "agentTokenPinnedSession" : "resolvedTargetPinnedOnce",
|
|
50431
|
-
tokenMode: context.agentToken?.startsWith("wgbt.") ? "hostedGatewayBearerAdopted" : "
|
|
50511
|
+
tokenMode: context.agentToken?.startsWith("wgbt.") ? "hostedGatewayBearerAdopted" : "localPairingSecret",
|
|
50432
50512
|
pinnedSessionId: getLocalPinnedSessionId(context),
|
|
50433
50513
|
session: summarizeSession(session)
|
|
50434
50514
|
});
|
|
@@ -50483,15 +50563,21 @@ async function callReadTool(name, args, context) {
|
|
|
50483
50563
|
return errorToolResult("command_timeout", error instanceof Error ? error.message : "WaveEngine Agent SDK runtime performance snapshot timed out.");
|
|
50484
50564
|
}
|
|
50485
50565
|
}
|
|
50486
|
-
if (name === "hot_reload_wave_preview" || name === "run_wave_preview") {
|
|
50566
|
+
if (name === "hot_reload_wave_preview" || name === "run_wave_preview" || name === "pause_wave_preview" || name === "resume_wave_preview") {
|
|
50487
50567
|
const sessionResult = resolveWritableSession(args, context);
|
|
50488
50568
|
if ("result" in sessionResult) return sessionResult.result;
|
|
50569
|
+
const action = name === "run_wave_preview" ? "run" : name === "pause_wave_preview" ? "pause" : name === "resume_wave_preview" ? "resume" : "hotReload";
|
|
50570
|
+
const runtimeDiagnosticsTimeoutMs = normalizeRuntimeDiagnosticsTimeoutMs2(args?.runtimeDiagnosticsTimeoutMs ?? args?.awaitTimeoutMs);
|
|
50571
|
+
const runtimeDiagnosticsLimit = normalizeRuntimeDiagnosticsLimit(args?.runtimeDiagnosticsLimit);
|
|
50489
50572
|
return await enqueueBrowserCommand({
|
|
50490
50573
|
context,
|
|
50491
50574
|
session: sessionResult.session,
|
|
50492
50575
|
command: {
|
|
50493
50576
|
type: "runtimeAction",
|
|
50494
|
-
action
|
|
50577
|
+
action,
|
|
50578
|
+
awaitRuntimeResult: args?.awaitRuntimeResult === true || args?.awaitDiagnostics === true,
|
|
50579
|
+
...runtimeDiagnosticsTimeoutMs !== void 0 ? { runtimeDiagnosticsTimeoutMs } : {},
|
|
50580
|
+
...runtimeDiagnosticsLimit !== void 0 ? { runtimeDiagnosticsLimit } : {}
|
|
50495
50581
|
}
|
|
50496
50582
|
});
|
|
50497
50583
|
}
|
|
@@ -51731,6 +51817,12 @@ async function startWaveEngineAgentSdkServer(options = {}) {
|
|
|
51731
51817
|
waveEngineSdkCache: "Package-bundled WaveEngine SDK Cache for local docs/API/skills lookup. Not transport and not a fix for live-session connectivity.",
|
|
51732
51818
|
vfsMirror: "HTTP Gateway workspace snapshot for file reads/writes. Separate from WaveEngine Agent SDK live browser VFS."
|
|
51733
51819
|
},
|
|
51820
|
+
authModel: {
|
|
51821
|
+
mcpTokenMeaning: "On this localhost SDK endpoint, MCP_TOKEN is a same-machine local pairing secret for a Studio browser session.",
|
|
51822
|
+
localPairingSecret: "Required for localhost MCP. It is random per SDK/Studio pairing and is not account login or cloud authorization.",
|
|
51823
|
+
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.",
|
|
51824
|
+
accountLogin: "Wave Studio sign-in may create an HTTP Gateway pairing, but it is separate from the local SDK pairing secret."
|
|
51825
|
+
},
|
|
51734
51826
|
requiresAuthForSessions: true,
|
|
51735
51827
|
sessionCount: registry.list().length
|
|
51736
51828
|
};
|
|
@@ -51740,7 +51832,7 @@ async function startWaveEngineAgentSdkServer(options = {}) {
|
|
|
51740
51832
|
if (method === "GET" && url.pathname === "/sessions") {
|
|
51741
51833
|
const authorization = resolveAgentAuthorization(req.headers.authorization);
|
|
51742
51834
|
if (!authorization) {
|
|
51743
|
-
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK
|
|
51835
|
+
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK local pairing secret."), origin);
|
|
51744
51836
|
return;
|
|
51745
51837
|
}
|
|
51746
51838
|
const allowedSessionIds = authorization.authorizedSessionIds;
|
|
@@ -51767,7 +51859,7 @@ async function startWaveEngineAgentSdkServer(options = {}) {
|
|
|
51767
51859
|
if (method === "POST" && url.pathname === "/mcp") {
|
|
51768
51860
|
const authorization = resolveAgentAuthorization(req.headers.authorization);
|
|
51769
51861
|
if (!authorization) {
|
|
51770
|
-
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK
|
|
51862
|
+
writeJson(res, 401, createWaveGenieError("bridge_auth_invalid", "Missing or invalid WaveEngine Agent SDK local pairing secret."), origin);
|
|
51771
51863
|
return;
|
|
51772
51864
|
}
|
|
51773
51865
|
let body;
|
|
@@ -52265,7 +52357,7 @@ async function commandStart(options) {
|
|
|
52265
52357
|
sessionTtlMs: readNumberFlag(options, "session-ttl-ms")
|
|
52266
52358
|
});
|
|
52267
52359
|
console.log(`[WaveEngine Agent SDK] sdkId=${handle.bridgeId}`);
|
|
52268
|
-
console.log("[WaveEngine Agent SDK] admin/MCP
|
|
52360
|
+
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
52361
|
console.log(`[WaveEngine Agent SDK] MCP endpoint: http://${handle.host}:${handle.port}/mcp`);
|
|
52270
52362
|
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
52363
|
console.log(`[WaveEngine Agent SDK] WaveEngine SDK cache root: ${getCacheRoot(options)}`);
|
package/dist/sdk/README.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
Bundled public-safe WaveEngine SDK lookup cache for wave3d-agent-sdk.
|
|
4
4
|
Generated from sanitized public API/skill corpus during package build.
|
|
5
5
|
|
|
6
|
-
cacheKey: 2026-06-17.1.
|
|
7
|
-
bundleHash:
|
|
8
|
-
zip: wave-engine-sdk-2026-06-17.1.
|
|
6
|
+
cacheKey: 2026-06-17.1.n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH
|
|
7
|
+
bundleHash: n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH
|
|
8
|
+
zip: wave-engine-sdk-2026-06-17.1.n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH.zip
|
package/dist/sdk/manifest.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026-06-17.1.
|
|
2
|
+
"version": "2026-06-17.1.n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH",
|
|
3
3
|
"formatVersion": "2026-06-17.1",
|
|
4
|
-
"cacheKey": "2026-06-17.1.
|
|
5
|
-
"bundleFileName": "wave-engine-sdk-2026-06-17.1.
|
|
6
|
-
"bundleHash": "
|
|
4
|
+
"cacheKey": "2026-06-17.1.n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH",
|
|
5
|
+
"bundleFileName": "wave-engine-sdk-2026-06-17.1.n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH.zip",
|
|
6
|
+
"bundleHash": "n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH",
|
|
7
7
|
"generatedAt": "2026-06-06T00:00:00.000Z",
|
|
8
8
|
"sourceVersions": {
|
|
9
9
|
"onboarding": {
|
|
10
10
|
"promptVersion": "2026-06-15.2",
|
|
11
|
-
"promptHash": "
|
|
11
|
+
"promptHash": "3e2iN6MmhnUr6td4i7eUsVRIcIWEgfH-"
|
|
12
12
|
},
|
|
13
13
|
"apiHandbook": {
|
|
14
14
|
"version": "1",
|
|
15
|
-
"contentHash": "
|
|
15
|
+
"contentHash": "ca559d715cfd826c"
|
|
16
16
|
},
|
|
17
|
-
"waveSkillCorpusHash": "
|
|
18
|
-
"sdkLookupCorpusHash": "
|
|
17
|
+
"waveSkillCorpusHash": "uLVgvHheEwNuV8Xhball1Pp_bFcuGBf5",
|
|
18
|
+
"sdkLookupCorpusHash": "JnC3w4jcOYUC7FqGE9mTjN_HQcrLjokO"
|
|
19
19
|
},
|
|
20
20
|
"cacheContract": {
|
|
21
21
|
"llmContextCacheOnly": [
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"searchDocuments"
|
|
35
35
|
],
|
|
36
36
|
"rule": "Priority 1 always-on sections must stay in LLM chat/system context. The WaveEngine SDK local cache is public-safe retrieval data, never the only memory for core policy.",
|
|
37
|
-
"defaultRefreshCommand": "npx -y wave3d-agent-sdk@0.2.
|
|
37
|
+
"defaultRefreshCommand": "npx -y wave3d-agent-sdk@0.2.5 cache refresh",
|
|
38
38
|
"refreshRule": "When using WaveEngine SDK local cache, compare cacheKey, bundleHash, and sourceVersions before trusting local lookup. If any value differs, update the SDK package or reinstall its bundled SDK cache and rebuild local indexes. Do not fetch a remote SDK zip.",
|
|
39
39
|
"onlineFallback": "HTTP Gateway does not provide cloud API lookup. If local Node/npm or cache is refused/unavailable, use only concrete Studio operations and already-known code; repair the local WaveEngine SDK before unfamiliar API authoring."
|
|
40
40
|
},
|
|
41
41
|
"download": {
|
|
42
42
|
"sameOriginPath": "/api/waveStudio/bridge/mcp/corpus",
|
|
43
43
|
"cacheBustingQuery": "",
|
|
44
|
-
"etag": "\"wave-engine-sdk-
|
|
44
|
+
"etag": "\"wave-engine-sdk-n0oOEAqXJRog7nDZSiUwu5FW2XAzeQrH\""
|
|
45
45
|
},
|
|
46
46
|
"corpus": {
|
|
47
|
-
"skillCount":
|
|
48
|
-
"apiEntryCount":
|
|
49
|
-
"apiMethodGroupCount":
|
|
47
|
+
"skillCount": 67,
|
|
48
|
+
"apiEntryCount": 5034,
|
|
49
|
+
"apiMethodGroupCount": 1158
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
{
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"mediaType": "application/json",
|
|
55
55
|
"role": "lookup-guide",
|
|
56
56
|
"bytes": 1288,
|
|
57
|
-
"hash": "
|
|
57
|
+
"hash": "5Y-iLRlUHhoRSqc8RFgt0XW088f6Gg9S"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "skills/wave-skills.jsonl",
|
|
61
61
|
"mediaType": "application/jsonl",
|
|
62
62
|
"role": "skill-corpus",
|
|
63
|
-
"bytes":
|
|
64
|
-
"hash": "
|
|
63
|
+
"bytes": 494480,
|
|
64
|
+
"hash": "il2ZDuomya-dat5c6xGkSHhgu3C4AMBP"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": "skills/foundations.jsonl",
|
|
@@ -74,36 +74,36 @@
|
|
|
74
74
|
"path": "skills/families.json",
|
|
75
75
|
"mediaType": "application/json",
|
|
76
76
|
"role": "skill-corpus",
|
|
77
|
-
"bytes":
|
|
78
|
-
"hash": "
|
|
77
|
+
"bytes": 46799,
|
|
78
|
+
"hash": "hiiiaDgQD_XhiXR6aCkIHBvydCDdqZI8"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"path": "api/entries.jsonl",
|
|
82
82
|
"mediaType": "application/jsonl",
|
|
83
83
|
"role": "api-corpus",
|
|
84
|
-
"bytes":
|
|
85
|
-
"hash": "
|
|
84
|
+
"bytes": 4556756,
|
|
85
|
+
"hash": "pZ2kqFdbKRhRj4RsmYNRVt8qCCzUxmM4"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"path": "api/method-groups.jsonl",
|
|
89
89
|
"mediaType": "application/jsonl",
|
|
90
90
|
"role": "api-corpus",
|
|
91
|
-
"bytes":
|
|
92
|
-
"hash": "
|
|
91
|
+
"bytes": 294894,
|
|
92
|
+
"hash": "jkwCp1pDfP0E7c_o-nF9zGTLwSR07iWk"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"path": "api/index-metadata.json",
|
|
96
96
|
"mediaType": "application/json",
|
|
97
97
|
"role": "api-corpus",
|
|
98
98
|
"bytes": 192,
|
|
99
|
-
"hash": "
|
|
99
|
+
"hash": "lr1v9SUh-f868Ie-mVNJDBG0QxqX-TSC"
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"path": "search/search-documents.jsonl",
|
|
103
103
|
"mediaType": "application/jsonl",
|
|
104
104
|
"role": "search-index",
|
|
105
|
-
"bytes":
|
|
106
|
-
"hash": "
|
|
105
|
+
"bytes": 4078414,
|
|
106
|
+
"hash": "YtRJaRuntvspPUU7AZZg_7vN2yIzliiI"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"path": "README.md",
|
|
Binary file
|
package/package.json
CHANGED