chitin-openclaw-plugin 0.4.4 → 0.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { privateKeyToAccount } from "viem/accounts";
12
12
  import { baseSepolia } from "viem/chains";
13
13
  import WebSocket from "ws";
14
14
  import { execFile } from "child_process";
15
- import { trace, context, SpanStatusCode } from "@opentelemetry/api";
15
+ import { trace, context, propagation, SpanStatusCode } from "@opentelemetry/api";
16
16
  import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
17
17
  import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";
18
18
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
@@ -79,7 +79,8 @@ function connectToTable(gameServerUrl, roomCode, playerId, name, walletAddress,
79
79
  latestState.set(roomCode2, msg);
80
80
  logger2.info(`[chitin] game_state: players=${msg.players?.length || 0} hand=${msg.isHandInProgress ? "yes" : "no"}`);
81
81
  } else if (msg.type === "your_turn") {
82
- const span = moduleTracer.startSpan("plugin.ws.your_turn", { attributes: { "ws.room": roomCode2, "ws.actions": msg.legalActions?.join(",") || "" } });
82
+ const parentCtx = msg.traceparent ? propagation.extract(context.active(), { traceparent: msg.traceparent }) : void 0;
83
+ const span = moduleTracer.startSpan("plugin.ws.your_turn", { attributes: { "ws.room": roomCode2, "ws.actions": msg.legalActions?.join(",") || "" } }, parentCtx);
83
84
  const state = latestState.get(roomCode2);
84
85
  const legalActions = msg.legalActions?.join(", ") || "";
85
86
  const chipRange = msg.chipRange ? `${msg.chipRange.min}-${msg.chipRange.max}` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chitin-openclaw-plugin",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "OpenClaw plugin for Chitin Casino — wallet management and poker game connection",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",