@clawchatsai/connector 0.0.16 → 0.0.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/auth-handler.js +5 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/package.json +1 -1
package/dist/auth-handler.js
CHANGED
|
@@ -145,10 +145,11 @@ export async function handleAuthMessage(dc, connectionId, msg, config) {
|
|
|
145
145
|
if (msgNonce !== session.nonce) {
|
|
146
146
|
return sendFailure(dc, connectionId, 'nonce_mismatch');
|
|
147
147
|
}
|
|
148
|
-
// Verify Google ID token (skipped in dev mode)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
// Verify Google ID token (skipped when not configured or in dev mode)
|
|
149
|
+
const skipGoogle = !config.google.clientId || config.google.clientId === 'dev-placeholder'
|
|
150
|
+
|| (config.devMode && idToken === 'dev-mode-no-google');
|
|
151
|
+
if (skipGoogle) {
|
|
152
|
+
console.log('[Auth] Skipping Google ID token verification (not configured)');
|
|
152
153
|
}
|
|
153
154
|
else {
|
|
154
155
|
try {
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Spec: specs/multitenant-p2p.md sections 6.1-6.2
|
|
11
11
|
*/
|
|
12
12
|
export declare const PLUGIN_ID = "connector";
|
|
13
|
-
export declare const PLUGIN_VERSION = "0.0.
|
|
13
|
+
export declare const PLUGIN_VERSION = "0.0.17";
|
|
14
14
|
interface PluginServiceContext {
|
|
15
15
|
stateDir: string;
|
|
16
16
|
logger: {
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { generateSessionSecret } from './session-token.js';
|
|
|
22
22
|
// Inline from shared/api-version.ts to avoid rootDir conflict
|
|
23
23
|
const CURRENT_API_VERSION = 1;
|
|
24
24
|
export const PLUGIN_ID = 'connector';
|
|
25
|
-
export const PLUGIN_VERSION = '0.0.
|
|
25
|
+
export const PLUGIN_VERSION = '0.0.17';
|
|
26
26
|
/** Max DataChannel message size (~256KB, leave room for envelope) */
|
|
27
27
|
const MAX_DC_MESSAGE_SIZE = 256 * 1024;
|
|
28
28
|
/** Active DataChannel connections: connectionId → send function */
|
|
@@ -278,8 +278,7 @@ function setupDataChannelHandler(dc, connectionId, ctx) {
|
|
|
278
278
|
const config = loadConfig();
|
|
279
279
|
const isDevMode = process.env.CLAWCHATS_DEV === 'true';
|
|
280
280
|
const hasGoogle = !!config?.google;
|
|
281
|
-
const authEnabled = config?.schemaVersion === 2 && config?.totp && config?.sessionSecret
|
|
282
|
-
&& (hasGoogle || isDevMode);
|
|
281
|
+
const authEnabled = config?.schemaVersion === 2 && config?.totp && config?.sessionSecret;
|
|
283
282
|
if (authEnabled) {
|
|
284
283
|
// In dev mode without Google identity, use placeholder
|
|
285
284
|
const google = config.google ?? {
|