@voicethere/agent 0.7.13 → 0.8.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.
- package/README.md +14 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +11 -2
- package/dist/runtime.js.map +1 -1
- package/dist/templates/echo/agent.js +1 -1
- package/dist/templates/echo-dc/agent.js +1 -1
- package/dist/templates/game-sync/agent.js +162 -125
- package/dist/templates/registry.d.ts +1 -1
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +42 -26
- package/dist/templates/registry.js.map +1 -1
- package/dist/templates/voice-starter/agent.js +1 -1
- package/dist/templates/webhooks/agent.js +2 -2
- package/dist/templates/webhooks-redis/agent.js +11 -4
- package/dist/templates/world-sync/agent.js +829 -0
- package/dist/templates/world-sync-binary/agent.js +1031 -0
- package/package.json +3 -2
- package/templates/README.md +41 -69
- package/templates/crash/README.md +13 -0
- package/templates/echo/README.md +13 -0
- package/templates/{echo.ts → echo/agent.ts} +1 -1
- package/templates/echo-dc/README.md +13 -0
- package/templates/{echo-dc.ts → echo-dc/agent.ts} +1 -1
- package/templates/echo-smoke/README.md +13 -0
- package/templates/game-sync/README.md +21 -0
- package/templates/{game-sync.ts → game-sync/agent.ts} +126 -94
- package/templates/{game-sync-redis.ts → game-sync/redis.ts} +4 -13
- package/templates/{game-sync-sim.ts → game-sync/sim.ts} +14 -7
- package/templates/{game-sync-world-layout.ts → game-sync/world-layout.ts} +72 -30
- package/templates/game-sync-smoke/README.md +13 -0
- package/templates/mix-smoke/README.md +13 -0
- package/templates/positional-tts/README.md +13 -0
- package/templates/recording-consent/README.md +13 -0
- package/templates/redis-sync/README.md +23 -0
- package/templates/redis-sync/agent.ts +72 -95
- package/templates/redis-sync/world-layout.ts +103 -26
- package/templates/spatial-showcase/README.md +13 -0
- package/templates/voice-showcase/README.md +13 -0
- package/templates/voice-starter/README.md +13 -0
- package/templates/webhooks/README.md +13 -0
- package/templates/{webhooks.ts → webhooks/agent.ts} +1 -1
- package/templates/webhooks-redis/README.md +13 -0
- package/templates/{webhooks-redis.ts → webhooks-redis/agent.ts} +9 -9
- package/templates/world-sync/README.md +20 -0
- package/templates/world-sync/agent.ts +62 -0
- package/templates/world-sync-binary/README.md +21 -0
- package/templates/world-sync-binary/agent.ts +107 -0
- package/templates/world-sync-binary/protocol.ts +281 -0
- /package/templates/{crash.ts → crash/agent.ts} +0 -0
- /package/templates/{echo-smoke.ts → echo-smoke/agent.ts} +0 -0
- /package/templates/{game-sync-protocol.ts → game-sync/protocol.ts} +0 -0
- /package/templates/{game-sync-smoke.ts → game-sync-smoke/agent.ts} +0 -0
- /package/templates/{mix-smoke.ts → mix-smoke/agent.ts} +0 -0
- /package/templates/{agent.ts → voice-starter/agent.ts} +0 -0
|
@@ -10753,7 +10753,7 @@ var require_built3 = __commonJS({
|
|
|
10753
10753
|
}
|
|
10754
10754
|
});
|
|
10755
10755
|
|
|
10756
|
-
// templates/webhooks-redis.ts
|
|
10756
|
+
// templates/webhooks-redis/agent.ts
|
|
10757
10757
|
var import_ioredis = __toESM(require_built3(), 1);
|
|
10758
10758
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
10759
10759
|
|
|
@@ -11539,7 +11539,7 @@ function agentLog(level, message, fieldsOrSessionId, sessionId) {
|
|
|
11539
11539
|
sendParentMessage(buildAgentLogPayload(level, message, fields, resolvedSessionId));
|
|
11540
11540
|
}
|
|
11541
11541
|
|
|
11542
|
-
// templates/webhooks-redis.ts
|
|
11542
|
+
// templates/webhooks-redis/agent.ts
|
|
11543
11543
|
var WEBHOOK_SIGNATURE_HEADER = "x-agent-webhook-signature";
|
|
11544
11544
|
var REDIS_COUNTER_KEY = "agent:webhook:event_count";
|
|
11545
11545
|
var LUA_INCREMENT_COUNTER = `
|
|
@@ -11582,7 +11582,7 @@ defineAgent({
|
|
|
11582
11582
|
);
|
|
11583
11583
|
return;
|
|
11584
11584
|
}
|
|
11585
|
-
redis = new import_ioredis.
|
|
11585
|
+
redis = new import_ioredis.Redis(redisUrl, {
|
|
11586
11586
|
maxRetriesPerRequest: 3,
|
|
11587
11587
|
lazyConnect: true
|
|
11588
11588
|
});
|
|
@@ -11614,7 +11614,11 @@ defineAgent({
|
|
|
11614
11614
|
}
|
|
11615
11615
|
let eventCount = null;
|
|
11616
11616
|
if (redis) {
|
|
11617
|
-
const result = await redis.eval(
|
|
11617
|
+
const result = await redis.eval(
|
|
11618
|
+
LUA_INCREMENT_COUNTER,
|
|
11619
|
+
1,
|
|
11620
|
+
REDIS_COUNTER_KEY
|
|
11621
|
+
);
|
|
11618
11622
|
eventCount = typeof result === "number" ? result : Number(result);
|
|
11619
11623
|
}
|
|
11620
11624
|
const sessionIds = ctx.sessionIds.length > 0 ? ctx.sessionIds : [...connectedSessions];
|
|
@@ -11641,3 +11645,6 @@ defineAgent({
|
|
|
11641
11645
|
);
|
|
11642
11646
|
}
|
|
11643
11647
|
});
|
|
11648
|
+
export {
|
|
11649
|
+
LUA_INCREMENT_COUNTER
|
|
11650
|
+
};
|