@spikelabs/lobster-shell-plugin 0.3.2 → 0.3.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/dist/{ably-node-D57ZVLAB.js → ably-node-RW2ZYYHZ.js} +3 -2
- package/dist/{chunk-SI5QXQNT.js → chunk-BTGLMYRA.js} +2 -1
- package/dist/{chunk-RNTMVHEF.js → chunk-C55R7CVG.js} +3 -0
- package/dist/{chunk-QGM4M3NI.js → chunk-SUJ4YNP5.js} +1 -0
- package/dist/{client-IG4TDXCA.js → client-VTS5WPGP.js} +2 -1
- package/dist/index.js +14 -7
- package/dist/oauth-flow-WNR6HEYC.js +8 -0
- package/dist/{wrapper-C6JZGQB3.js → wrapper-A4XKEVXU.js} +3 -2
- package/package.json +1 -1
- package/dist/oauth-flow-WIKEYFR7.js +0 -7
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { createRequire as __$$createRequire } from "node:module"; const require = __$$createRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
require_receiver,
|
|
3
4
|
require_sender,
|
|
4
5
|
require_stream,
|
|
5
6
|
require_websocket,
|
|
6
7
|
require_websocket_server
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BTGLMYRA.js";
|
|
8
9
|
import {
|
|
9
10
|
__commonJS,
|
|
10
11
|
__require
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SUJ4YNP5.js";
|
|
12
13
|
|
|
13
14
|
// node_modules/.pnpm/ws@8.19.0/node_modules/ws/index.js
|
|
14
15
|
var require_ws = __commonJS({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { createRequire as __$$createRequire } from "node:module"; const require = __$$createRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
__commonJS,
|
|
3
4
|
__require
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SUJ4YNP5.js";
|
|
5
6
|
|
|
6
7
|
// node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js
|
|
7
8
|
var require_constants = __commonJS({
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createRequire as __$$createRequire } from "node:module"; const require = __$$createRequire(import.meta.url);
|
|
2
|
+
|
|
1
3
|
// src/oauth-flow.ts
|
|
2
4
|
import { randomBytes, createHash } from "crypto";
|
|
3
5
|
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
@@ -155,6 +157,7 @@ var OAuthFlow = class {
|
|
|
155
157
|
expiresAt: Date.now() + (tokens.expires_in ?? 3600) * 1e3,
|
|
156
158
|
gatewayPublicId: registration.gatewayPublicId,
|
|
157
159
|
channelName: registration.channelName,
|
|
160
|
+
avatarId: registration.avatarId,
|
|
158
161
|
tenantToken: registration.tenantToken,
|
|
159
162
|
tenantTokenExpiresAt: registration.tenantTokenExpiresAt
|
|
160
163
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { createRequire as __$$createRequire } from "node:module"; const require = __$$createRequire(import.meta.url);
|
|
2
|
+
import "./chunk-SUJ4YNP5.js";
|
|
2
3
|
|
|
3
4
|
// node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryOptions.js
|
|
4
5
|
function queryOptions(options) {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { createRequire as __$$createRequire } from "node:module"; const require = __$$createRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
OAuthFlow
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-C55R7CVG.js";
|
|
5
|
+
import "./chunk-SUJ4YNP5.js";
|
|
5
6
|
|
|
6
7
|
// src/index.ts
|
|
7
8
|
import { hostname, platform } from "os";
|
|
@@ -124,7 +125,12 @@ function renderSetupPage(opts) {
|
|
|
124
125
|
` : ""}
|
|
125
126
|
|
|
126
127
|
<div style="margin-top: 1rem;">
|
|
127
|
-
${opts.connected ? `<span style="color: #a1a1aa; font-size: 0.85rem;">Gateway is connected to Lobster Shell cloud.</span
|
|
128
|
+
${opts.connected ? `<span style="color: #a1a1aa; font-size: 0.85rem;">Gateway is connected to Lobster Shell cloud.</span>
|
|
129
|
+
<div style="display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap;">
|
|
130
|
+
${opts.avatarId ? `<a href="https://www.lobstershell.ai/app/bots/${opts.gatewayPublicId}" class="btn btn-primary">Open Dashboard</a>` : `<a href="https://www.lobstershell.ai/app/bots/${opts.gatewayPublicId}?wizard=1" class="btn btn-primary">Choose Avatar</a>`}
|
|
131
|
+
<a href="https://www.lobstershell.ai/app/bots/${opts.gatewayPublicId}/chat" class="btn btn-primary" style="background: #4f46e5;">Start Chat</a>
|
|
132
|
+
<a href="https://www.lobstershell.ai/app/bots/${opts.gatewayPublicId}/live" class="btn btn-primary" style="background: #7c3aed;">Go Live</a>
|
|
133
|
+
</div>` : `<a href="/lobster/connect" class="btn btn-primary">Connect to Lobster Shell</a>`}
|
|
128
134
|
</div>
|
|
129
135
|
</div>
|
|
130
136
|
</body>
|
|
@@ -175,7 +181,7 @@ var CloudBridge = class {
|
|
|
175
181
|
this._status = "connecting";
|
|
176
182
|
this.logger.info("[lobster:bridge] Connecting to Ably\u2026");
|
|
177
183
|
try {
|
|
178
|
-
const Ably = await import("./ably-node-
|
|
184
|
+
const Ably = await import("./ably-node-RW2ZYYHZ.js");
|
|
179
185
|
this.ably = new Ably.Realtime({
|
|
180
186
|
authCallback: async (_params, callback) => {
|
|
181
187
|
try {
|
|
@@ -337,7 +343,7 @@ var CloudBridge = class {
|
|
|
337
343
|
});
|
|
338
344
|
if (res.status === 401 && auth.refreshToken) {
|
|
339
345
|
this.logger.info("[lobster:bridge] Access token expired, refreshing\u2026");
|
|
340
|
-
const { OAuthFlow: OAuthFlow2 } = await import("./oauth-flow-
|
|
346
|
+
const { OAuthFlow: OAuthFlow2 } = await import("./oauth-flow-WNR6HEYC.js");
|
|
341
347
|
const oauthFlow2 = new OAuthFlow2({
|
|
342
348
|
stateDir: this.stateDir,
|
|
343
349
|
cloudUrl: this.cloudUrl,
|
|
@@ -404,7 +410,7 @@ var GatewayWsClient = class {
|
|
|
404
410
|
// Connect
|
|
405
411
|
// -------------------------------------------------------------------------
|
|
406
412
|
async connect() {
|
|
407
|
-
const WebSocket = (await import("./wrapper-
|
|
413
|
+
const WebSocket = (await import("./wrapper-A4XKEVXU.js")).default;
|
|
408
414
|
return new Promise((resolve, reject) => {
|
|
409
415
|
const url = `ws://127.0.0.1:${this.port}`;
|
|
410
416
|
this.logger.info(`[lobster:ws] Connecting to gateway at ${url}`);
|
|
@@ -541,7 +547,7 @@ function initApiClient(cloudBridge) {
|
|
|
541
547
|
// src/index.ts
|
|
542
548
|
var PLUGIN_ID = "lobster-shell";
|
|
543
549
|
var CHANNEL_ID = "lobster-shell";
|
|
544
|
-
var PLUGIN_VERSION = "0.3.
|
|
550
|
+
var PLUGIN_VERSION = "0.3.4";
|
|
545
551
|
var DEFAULT_CLOUD_URL = "https://www.lobstershell.ai";
|
|
546
552
|
var gatewayPort;
|
|
547
553
|
var bridge2 = null;
|
|
@@ -679,6 +685,7 @@ var plugin = {
|
|
|
679
685
|
connected: !!auth,
|
|
680
686
|
gatewayPublicId: auth?.gatewayPublicId,
|
|
681
687
|
channelName: auth?.channelName,
|
|
688
|
+
avatarId: auth?.avatarId,
|
|
682
689
|
bridgeStatus: bridge2?.status ?? "not started",
|
|
683
690
|
message: query["success"] ? "Connected to Lobster Shell!" : void 0
|
|
684
691
|
})
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { createRequire as __$$createRequire } from "node:module"; const require = __$$createRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
require_receiver,
|
|
3
4
|
require_sender,
|
|
4
5
|
require_stream,
|
|
5
6
|
require_websocket,
|
|
6
7
|
require_websocket_server
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BTGLMYRA.js";
|
|
8
9
|
import {
|
|
9
10
|
__toESM
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SUJ4YNP5.js";
|
|
11
12
|
|
|
12
13
|
// node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs
|
|
13
14
|
var import_stream = __toESM(require_stream(), 1);
|
package/package.json
CHANGED