wave3d-agent-sdk 0.2.16 → 0.2.17

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/dist/cli.js CHANGED
@@ -42532,8 +42532,8 @@ function normalizeWaveGenieAssetUploadRequest(request) {
42532
42532
 
42533
42533
  // ../../src/lib/waveStudio/aiAssist/bridge/localAgentSdkContract.ts
42534
42534
  var WAVE3D_AGENT_SDK_PACKAGE_NAME = "wave3d-agent-sdk";
42535
- var WAVE3D_AGENT_SDK_REQUIRED_VERSION = "0.2.16";
42536
- var WAVE3D_AGENT_SDK_REQUIRED_BUILD = "agent-sdk-20260627.2";
42535
+ var WAVE3D_AGENT_SDK_REQUIRED_VERSION = "0.2.17";
42536
+ var WAVE3D_AGENT_SDK_REQUIRED_BUILD = "agent-sdk-20260627.3";
42537
42537
  var WAVE3D_AGENT_SDK_PACKAGE_SPEC = `${WAVE3D_AGENT_SDK_PACKAGE_NAME}@${WAVE3D_AGENT_SDK_REQUIRED_VERSION}`;
42538
42538
  var WAVE3D_AGENT_SDK_START_COMMAND = `npx -y ${WAVE3D_AGENT_SDK_PACKAGE_SPEC} start`;
42539
42539
  var WAVE3D_AGENT_SDK_TOKEN_ENV_VAR = "WAVE3D_MCP_TOKEN";
@@ -48260,7 +48260,7 @@ function buildHostedWaveStudioMcpToolDefinitions() {
48260
48260
  },
48261
48261
  {
48262
48262
  name: "recover_wave_connection",
48263
- description: "[studio.mcp] Direct Observe recovery tool. Call this after disconnect, timeout, command_timeout, command_lease_expired, session_not_found, agent_onboarding_required, workspace_mirror_not_ready, hosted_mcp_proxy_failed, local SDK confusion, or any unclear MCP state. It returns one explicit next action: re-onboard, call get_wave_session/list_wave_files, wake/reopen Wave Studio tab, update/restart WaveEngine Agent SDK, wait for VFS mirror, use HTTP Gateway fallback, retry command, or ask user for fresh Copy to Agent. No start_wave_task needed. If local HTTP returns 401 but HTTP Gateway accepts the same token, treat WaveEngine Agent SDK as stale/not adopted: update/restart SDK first. If every endpoint returns 401/bridge_auth_invalid before this tool can run, token is dead: ask user for fresh Copy to Agent.",
48263
+ description: "[studio.mcp] Direct Observe recovery tool. Call this after disconnect, timeout, command_timeout, command_lease_expired, session_not_found, agent_onboarding_required, workspace_mirror_not_ready, hosted_mcp_proxy_failed, local SDK confusion, or any unclear MCP state. It returns one explicit next action: re-onboard, call get_wave_session/list_wave_files, keep/focus Wave Studio while it silently re-registers local tokens, update/restart WaveEngine Agent SDK, wait for VFS mirror, use HTTP Gateway fallback, retry command, or ask user for fresh Copy to Agent. No start_wave_task needed. If local HTTP returns 401 but HTTP Gateway accepts the same token, treat WaveEngine Agent SDK as stale/not adopted: update/restart SDK first. If every endpoint returns 401/bridge_auth_invalid before this tool can run, token is dead: ask user for fresh Copy to Agent.",
48264
48264
  inputSchema: {
48265
48265
  type: "object",
48266
48266
  properties: {
@@ -50459,7 +50459,7 @@ function localConnectionRecoveryResult(args, context) {
50459
50459
  steps.push("Do not ask user for new Copy to Agent unless local HTTP auth fails.");
50460
50460
  } else if (sessions.length === 0 || lastErrorCode === "session_not_found") {
50461
50461
  state = "no_paired_studio_tab";
50462
- 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.";
50462
+ nextAction = "WaveEngine Agent SDK HTTP is alive, but no Wave Studio tab is paired with this MCP_TOKEN local secret yet. Keep Wave Studio open and focused briefly; Studio silently re-registers copied local tokens after SDK restart. Then call get_wave_session again. Ask user to reopen/start MCP only if the Studio tab is closed, sleeping, or MCP is disabled.";
50463
50463
  nextTool = "get_wave_session";
50464
50464
  requiresUserAction = true;
50465
50465
  steps.push("Do not switch to SDK cache or query tools as a transport fix.");
@@ -50529,7 +50529,7 @@ function localConnectionRecoveryResult(args, context) {
50529
50529
  hardStopRules: [
50530
50530
  "Local HTTP refused/unreachable before MCP response: start WaveEngine Agent SDK, retry localhost for up to 10 seconds.",
50531
50531
  "Local HTTP 401/bridge_auth_invalid: if HTTP Gateway accepts the same MCP_TOKEN, SDK is stale/not adopted: run the exact token-preserving WaveEngine Agent SDK command 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.",
50532
- "No paired session or stale command poll: wake/reopen Wave Studio tab; keep same local endpoint and MCP_TOKEN pairing secret first.",
50532
+ "No paired session or stale command poll: keep Wave Studio tab open/focused and retry; Studio silently re-registers copied local tokens after SDK restart. Reopen/start MCP only if disabled or tab is gone.",
50533
50533
  "WaveEngine SDK Cache failure is not live transport failure."
50534
50534
  ]
50535
50535
  });
@@ -52921,7 +52921,8 @@ function readLocalSdkPeerHealth(value) {
52921
52921
  protocolVersion,
52922
52922
  buildHash: readStringProperty(data, "buildHash"),
52923
52923
  processId: readNumberProperty(data, "processId"),
52924
- tokenFingerprint: readStringProperty(data, "tokenFingerprint")
52924
+ tokenFingerprint: readStringProperty(data, "tokenFingerprint"),
52925
+ sessionCount: readNumberProperty(data, "sessionCount") ?? 0
52925
52926
  };
52926
52927
  }
52927
52928
  function parseProcessIds(output) {
@@ -53088,7 +53089,8 @@ function shouldReplaceCurrentSdkPeer(health, token) {
53088
53089
  if (!isCurrentSdkPeer(health)) return true;
53089
53090
  if (!token) return false;
53090
53091
  const expectedFingerprint = createWaveGenieBridgeTokenFingerprint(token);
53091
- return health.tokenFingerprint !== expectedFingerprint;
53092
+ if (health.tokenFingerprint === expectedFingerprint) return false;
53093
+ return (health.sessionCount ?? 0) === 0;
53092
53094
  }
53093
53095
  async function waitForSdkPeerExit(pids, deadlineMs) {
53094
53096
  const deadline = Date.now() + deadlineMs;
@@ -53157,7 +53159,7 @@ async function prepareLocalSdkPeerForStart(input) {
53157
53159
  }
53158
53160
  if (!shouldReplaceCurrentSdkPeer(probe.health, input.token)) {
53159
53161
  console.log(`[WaveEngine Agent SDK] Existing SDK on ${formatLoopbackHttpUrl(input.host, input.port, "")} is current; reusing it.`);
53160
- console.log("[WaveEngine Agent SDK] If a new Copy-to-Agent token fails later, restart with WAVE3D_MCP_TOKEN from that copy.");
53162
+ console.log("[WaveEngine Agent SDK] If a copied token is not accepted yet, keep Wave Studio open; Studio will silently re-adopt it into this live SDK.");
53161
53163
  return true;
53162
53164
  }
53163
53165
  const reason = isCurrentSdkPeer(probe.health) ? "local pairing secret does not match this start request" : `stale version/build (${probe.health.packageVersion ?? "unknown"} ${probe.health.buildHash ?? "unknown"})`;
@@ -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-24.4.63mahXl1wJFsVypHTa3YZmbYXIrToIkG
7
- bundleHash: 63mahXl1wJFsVypHTa3YZmbYXIrToIkG
8
- zip: wave-engine-sdk-2026-06-24.4.63mahXl1wJFsVypHTa3YZmbYXIrToIkG.zip
6
+ cacheKey: 2026-06-24.4.Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D
7
+ bundleHash: Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D
8
+ zip: wave-engine-sdk-2026-06-24.4.Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D.zip
@@ -1,21 +1,21 @@
1
1
  {
2
- "version": "2026-06-24.4.63mahXl1wJFsVypHTa3YZmbYXIrToIkG",
2
+ "version": "2026-06-24.4.Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D",
3
3
  "formatVersion": "2026-06-24.4",
4
- "cacheKey": "2026-06-24.4.63mahXl1wJFsVypHTa3YZmbYXIrToIkG",
5
- "bundleFileName": "wave-engine-sdk-2026-06-24.4.63mahXl1wJFsVypHTa3YZmbYXIrToIkG.zip",
6
- "bundleHash": "63mahXl1wJFsVypHTa3YZmbYXIrToIkG",
4
+ "cacheKey": "2026-06-24.4.Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D",
5
+ "bundleFileName": "wave-engine-sdk-2026-06-24.4.Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D.zip",
6
+ "bundleHash": "Caxh_cF-78aBZP6RFsiBS_gQxZlDGO0D",
7
7
  "generatedAt": "2026-06-06T00:00:00.000Z",
8
8
  "sourceVersions": {
9
9
  "onboarding": {
10
10
  "promptVersion": "2026-06-22.1",
11
- "promptHash": "jvKiC2UCRvVbpVc7IGen5RvQk3V9vRA-"
11
+ "promptHash": "0DLryCmrd1QIYP-32CEyNd5Heiev6_Lr"
12
12
  },
13
13
  "apiHandbook": {
14
14
  "version": "1",
15
15
  "contentHash": "58fdedcd747f52b9"
16
16
  },
17
17
  "waveSkillCorpusHash": "ol6UwQmeF1EZGOW3uz8NWVzESWOrkc7P",
18
- "sdkLookupCorpusHash": "ZJvWnfNdCRcoLSwB6tz3ehkJzGGYeTVd"
18
+ "sdkLookupCorpusHash": "OFDTR_fo2zM-8iXgejSBgj0rQK12V5to"
19
19
  },
20
20
  "cacheContract": {
21
21
  "llmContextCacheOnly": [
@@ -35,7 +35,7 @@
35
35
  "searchDocuments"
36
36
  ],
37
37
  "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.",
38
- "defaultRefreshCommand": "npx -y wave3d-agent-sdk@0.2.16 cache refresh",
38
+ "defaultRefreshCommand": "npx -y wave3d-agent-sdk@0.2.17 cache refresh",
39
39
  "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.",
40
40
  "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."
41
41
  },
@@ -51,7 +51,7 @@
51
51
  "mediaType": "application/json",
52
52
  "role": "lookup-guide",
53
53
  "bytes": 1311,
54
- "hash": "YeAaiCkYLuKoMCDXE2XQneoonBtuzAjQ"
54
+ "hash": "FDpb8-vDxfyK6mu1ke6-auN2h64806k1"
55
55
  },
56
56
  {
57
57
  "path": "skills/wave-skills.jsonl",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave3d-agent-sdk",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "WaveEngine Agent SDK for same-machine Wave Studio MCP plus bundled WaveEngine lookup.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",