wave3d-agent-sdk 0.2.2 → 0.2.4
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 -6
- package/dist/cli.js +13 -11
- package/dist/sdk/README.md +3 -3
- package/dist/sdk/manifest.json +22 -22
- package/dist/sdk/wave-engine-sdk-2026-06-17.1.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3.zip +0 -0
- package/package.json +1 -1
- package/dist/sdk/wave-engine-sdk-2026-06-17.1.ahR9MhSr8vzetTBJN7--J7zIJCn0weU3.zip +0 -0
package/README.md
CHANGED
|
@@ -19,13 +19,19 @@ Vocabulary:
|
|
|
19
19
|
- Project: user workspace content. Reading a project is not opening/replacing live workspace.
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
22
|
+
npx -y wave3d-agent-sdk@0.2.4 start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
After Copy to Agent, restart stale SDK processes with the copied bearer preserved. Keep the token hidden:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
WAVE3D_MCP_TOKEN="$MCP_TOKEN" npx -y wave3d-agent-sdk@0.2.4 start
|
|
23
29
|
```
|
|
24
30
|
|
|
25
31
|
Check SDK build before trusting a running SDK process:
|
|
26
32
|
|
|
27
33
|
```bash
|
|
28
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
34
|
+
npx -y wave3d-agent-sdk@0.2.4 --version
|
|
29
35
|
```
|
|
30
36
|
|
|
31
37
|
The package bundles the WaveEngine SDK lookup corpus. No normal session needs a separate protected zip download.
|
|
@@ -35,12 +41,12 @@ The package bundles the WaveEngine SDK lookup corpus. No normal session needs a
|
|
|
35
41
|
Wave Studio Copy to Agent defaults same-machine live MCP transport to this SDK:
|
|
36
42
|
|
|
37
43
|
```bash
|
|
38
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
44
|
+
npx -y wave3d-agent-sdk@0.2.4 start
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
Agents choose topology first:
|
|
42
48
|
|
|
43
|
-
- 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 SDK is stale, missing
|
|
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 bearer tokens before fallback. If restart happens after Copy to Agent, preserve the copied bearer with `WAVE3D_MCP_TOKEN="$MCP_TOKEN"` so the new SDK process can authorize that local bearer.
|
|
44
50
|
- 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.
|
|
45
51
|
|
|
46
52
|
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.
|
|
@@ -50,13 +56,13 @@ Use `MCP_HTTP_GATEWAY_FALLBACK_URL` only for topology mismatch, remote/sandboxed
|
|
|
50
56
|
For unfamiliar authoring, use the local SDK tools:
|
|
51
57
|
|
|
52
58
|
```bash
|
|
53
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
59
|
+
npx -y wave3d-agent-sdk@0.2.4 cache search "continuous left rotation"
|
|
54
60
|
```
|
|
55
61
|
|
|
56
62
|
`cache refresh` without MCP arguments reinstalls the bundled SDK into `~/.wave3d/agent-cache`:
|
|
57
63
|
|
|
58
64
|
```bash
|
|
59
|
-
npx -y wave3d-agent-sdk@0.2.
|
|
65
|
+
npx -y wave3d-agent-sdk@0.2.4 cache refresh
|
|
60
66
|
```
|
|
61
67
|
|
|
62
68
|
Old `cache refresh --mcp-url <url> --token <token>` arguments are ignored. Normal users update the npm package; no separate zip download exists.
|
package/dist/cli.js
CHANGED
|
@@ -42533,10 +42533,12 @@ 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.4";
|
|
42537
|
+
var WAVE3D_AGENT_SDK_REQUIRED_BUILD = "agent-sdk-20260617.5";
|
|
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
|
+
var WAVE3D_AGENT_SDK_TOKEN_ENV_VAR = "WAVE3D_MCP_TOKEN";
|
|
42541
|
+
var WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND = `${WAVE3D_AGENT_SDK_TOKEN_ENV_VAR}="$MCP_TOKEN" ${WAVE3D_AGENT_SDK_START_COMMAND}`;
|
|
42540
42542
|
var WAVE3D_AGENT_SDK_CACHE_REFRESH_COMMAND_TEMPLATE = `npx -y ${WAVE3D_AGENT_SDK_PACKAGE_SPEC} cache refresh`;
|
|
42541
42543
|
var WAVE3D_AGENT_SDK_CACHE_REFRESH_SHELL_COMMAND = `npx -y ${WAVE3D_AGENT_SDK_PACKAGE_SPEC} cache refresh`;
|
|
42542
42544
|
|
|
@@ -44428,7 +44430,7 @@ var WAVE_MCP_AGENT_BRIEF = [
|
|
|
44428
44430
|
'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.',
|
|
44429
44431
|
"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.",
|
|
44430
44432
|
"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.",
|
|
44431
|
-
`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,
|
|
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 bearer tokens, or local 401 follows an SDK restart, stop it and restart while preserving the copied bearer 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. 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. Do not start WaveEngine Agent SDK on the wrong machine.`,
|
|
44432
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 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.",
|
|
44433
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 bearer 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.`,
|
|
44434
44436
|
'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.',
|
|
@@ -44671,7 +44673,7 @@ var WAVE_MCP_STUDIO_TOOL_GUIDE = [
|
|
|
44671
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.",
|
|
44672
44674
|
"- 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.",
|
|
44673
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.',
|
|
44674
|
-
`- 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 bearer tokens; 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. 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.`,
|
|
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 bearer tokens; after restart recheck /health and tools/list. If restart happens after Copy-to-Agent, preserve the bearer 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 token. Same-machine stale/missing tools/401-with-Gateway-success means repair local SDK first, not HTTP Gateway first. 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.`,
|
|
44675
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 bearer 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.`,
|
|
44676
44678
|
"- 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.",
|
|
44677
44679
|
`- Bare authoring globals: common examples include ${WAVE_AUTHORING_COMMON_GLOBAL_EXAMPLES_TEXT}, \`waveMaterial\`, \`waveFx\`, \`waveValueCurve\`, and \`waveParam\`. Use them directly in \`main.ts\`; do not import or namespace-qualify them. If the task is unfamiliar, retrieve the relevant \`wave.*\` skill first; for the full generated exact-global surface, call local-SDK \`query_wave_api\`.`,
|
|
@@ -44714,7 +44716,7 @@ var WAVE_MCP_TOOL_CATALOG_GUIDE = [
|
|
|
44714
44716
|
"- `get_wave_coding_guardrails`: call after onboarding acceptance; returns policy, file context, tool catalog, and recipes.",
|
|
44715
44717
|
'- `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.',
|
|
44716
44718
|
"- `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.",
|
|
44717
|
-
`- 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 bearer tokens; 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. 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.`,
|
|
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 bearer tokens; 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 bearer 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. 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.`,
|
|
44718
44720
|
"- `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.",
|
|
44719
44721
|
'- 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.',
|
|
44720
44722
|
"- 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.",
|
|
@@ -44883,7 +44885,7 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT = [
|
|
|
44883
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 bearers 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.`,
|
|
44884
44886
|
"",
|
|
44885
44887
|
"Mandatory phased handshake:",
|
|
44886
|
-
|
|
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 bearer with \`${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND}\` using the current MCP_TOKEN value hidden; 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.`,
|
|
44887
44889
|
"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.",
|
|
44888
44890
|
"Glossary: WaveEngine Agent SDK = same-machine live MCP transport plus bundled SDK lookup; HTTP Gateway = Next/Vercel MCP transport for remote/sandbox Studio ops; WaveEngine SDK Cache = package-bundled public docs/API/skill retrieval; MCP Session = browser pairing/token state; VFS Mirror = HTTP Gateway read/edit hash snapshot; Project = user workspace content. Do not merge these concepts.",
|
|
44889
44891
|
"",
|
|
@@ -44907,7 +44909,7 @@ var LOCAL_MCP_AGENT_ONBOARDING_PROMPT = [
|
|
|
44907
44909
|
"",
|
|
44908
44910
|
"WaveEngine Agent SDK scope:",
|
|
44909
44911
|
'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.',
|
|
44910
|
-
|
|
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 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 token before a tool result, ask user for fresh Copy to Agent.`
|
|
44911
44913
|
].join("\n");
|
|
44912
44914
|
|
|
44913
44915
|
// ../../scripts/wavegenie-sdk/mcp/referenceTools.ts
|
|
@@ -49334,7 +49336,7 @@ function getReadToolDefinitions() {
|
|
|
49334
49336
|
return [
|
|
49335
49337
|
{
|
|
49336
49338
|
name: "self_check_wave_mcp",
|
|
49337
|
-
description:
|
|
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 bearer preserved via ${WAVE3D_AGENT_SDK_TOKEN_PRESERVING_START_COMMAND} before doing user work.`,
|
|
49338
49340
|
inputSchema: {
|
|
49339
49341
|
type: "object",
|
|
49340
49342
|
properties: {
|
|
@@ -49739,7 +49741,7 @@ function localConnectionRecoveryResult(args, context) {
|
|
|
49739
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/token.";
|
|
49740
49742
|
nextTool = failedTool || "get_wave_session";
|
|
49741
49743
|
requiresUserAction = true;
|
|
49742
|
-
steps.push(`If SDK /health is down
|
|
49744
|
+
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.`);
|
|
49743
49745
|
} else if (lastErrorCode === "session_write_not_allowed" || selectedSession?.accessMode !== "readwrite") {
|
|
49744
49746
|
state = "write_access_not_ready";
|
|
49745
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/token or paste fresh Copy to Agent if token changed.";
|
|
@@ -50266,7 +50268,7 @@ async function callReadTool(name, args, context) {
|
|
|
50266
50268
|
taskRouteId: activeRoute.taskRouteId,
|
|
50267
50269
|
phase: activeRoute.phase
|
|
50268
50270
|
} : null,
|
|
50269
|
-
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
|
|
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 bearer: ${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.",
|
|
50270
50272
|
hardStop: stale
|
|
50271
50273
|
});
|
|
50272
50274
|
}
|
|
@@ -52259,7 +52261,7 @@ async function commandStart(options) {
|
|
|
52259
52261
|
const handle = await startWaveEngineAgentSdkServer({
|
|
52260
52262
|
host,
|
|
52261
52263
|
port: readNumberFlag(options, "port") ?? DEFAULT_PORT2,
|
|
52262
|
-
token: readStringFlag(options, "token"),
|
|
52264
|
+
token: readStringFlag(options, "token") ?? process.env.WAVE3D_MCP_TOKEN ?? process.env.WAVESTUDIO_MCP_TOKEN,
|
|
52263
52265
|
sessionTtlMs: readNumberFlag(options, "session-ttl-ms")
|
|
52264
52266
|
});
|
|
52265
52267
|
console.log(`[WaveEngine Agent SDK] sdkId=${handle.bridgeId}`);
|
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.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3
|
|
7
|
+
bundleHash: WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3
|
|
8
|
+
zip: wave-engine-sdk-2026-06-17.1.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3.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.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3",
|
|
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.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3",
|
|
5
|
+
"bundleFileName": "wave-engine-sdk-2026-06-17.1.WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3.zip",
|
|
6
|
+
"bundleHash": "WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3",
|
|
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": "q5ctGPrUpvUFSjNtoaC-ZEYnwwQtHGP6"
|
|
12
12
|
},
|
|
13
13
|
"apiHandbook": {
|
|
14
14
|
"version": "1",
|
|
15
|
-
"contentHash": "
|
|
15
|
+
"contentHash": "09025648e3d8a784"
|
|
16
16
|
},
|
|
17
|
-
"waveSkillCorpusHash": "
|
|
18
|
-
"sdkLookupCorpusHash": "
|
|
17
|
+
"waveSkillCorpusHash": "t3i8l8f4xNa_2BHAN1XE5MnERgRCFW6y",
|
|
18
|
+
"sdkLookupCorpusHash": "VH-f574z_jXGGSc1tsUiqz3tIKqHQyUy"
|
|
19
19
|
},
|
|
20
20
|
"cacheContract": {
|
|
21
21
|
"llmContextCacheOnly": [
|
|
@@ -34,18 +34,18 @@
|
|
|
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.4 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-WXZSA5Qy4wTqmcbeW86e8xxyaA82djd3\""
|
|
45
45
|
},
|
|
46
46
|
"corpus": {
|
|
47
|
-
"skillCount":
|
|
48
|
-
"apiEntryCount":
|
|
47
|
+
"skillCount": 66,
|
|
48
|
+
"apiEntryCount": 4997,
|
|
49
49
|
"apiMethodGroupCount": 1143
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"mediaType": "application/json",
|
|
55
55
|
"role": "lookup-guide",
|
|
56
56
|
"bytes": 1288,
|
|
57
|
-
"hash": "
|
|
57
|
+
"hash": "k_26htBpNNH8-SmpOF00Gr7WeDK9MNqt"
|
|
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": 483939,
|
|
64
|
+
"hash": "ey9Iqfr75sDt2Mj_6r7zNyMlu-N5a0Vn"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": "skills/foundations.jsonl",
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
"path": "skills/families.json",
|
|
75
75
|
"mediaType": "application/json",
|
|
76
76
|
"role": "skill-corpus",
|
|
77
|
-
"bytes":
|
|
78
|
-
"hash": "
|
|
77
|
+
"bytes": 45433,
|
|
78
|
+
"hash": "-lNpueMu8en-tvaF0aki0of-WAen3oB9"
|
|
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": 4524222,
|
|
85
|
+
"hash": "ppDJKjbnzzxzmvFd-XPS7p8BuHVRrYzU"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"path": "api/method-groups.jsonl",
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
"mediaType": "application/json",
|
|
97
97
|
"role": "api-corpus",
|
|
98
98
|
"bytes": 192,
|
|
99
|
-
"hash": "
|
|
99
|
+
"hash": "F6-eeIySGY2NAltvBD-M1WrTivPfNnYe"
|
|
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": 4044604,
|
|
106
|
+
"hash": "X3mOQI-rYByry0A6lTw5RLjYpcg8y1fJ"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"path": "README.md",
|
|
Binary file
|
package/package.json
CHANGED