eversince 0.2.14 → 0.2.15
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/bridge.js +8 -0
- package/dist/client.js +1 -1
- package/dist/source.sha256 +1 -1
- package/package.json +1 -1
package/dist/bridge.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { DoorBlocked, cacheFile as cacheFileFor, isBlocked, isRefused, probe, reachApp, unreachedMessage, readJson, readState, sandboxedWithoutNetwork, stateFile as defaultStateFile, } from './door.js';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { isConnectFailure } from './retry.js';
|
|
4
|
+
const EMPTY_LISTS = {
|
|
5
|
+
'resources/list': { resources: [] },
|
|
6
|
+
'resources/templates/list': { resourceTemplates: [] },
|
|
7
|
+
'prompts/list': { prompts: [] },
|
|
8
|
+
};
|
|
4
9
|
function write(message) {
|
|
5
10
|
process.stdout.write(`${typeof message === 'string' ? message : JSON.stringify(message)}\n`);
|
|
6
11
|
}
|
|
@@ -68,6 +73,9 @@ export function runBridge(options) {
|
|
|
68
73
|
return {};
|
|
69
74
|
if (message.method === 'ping')
|
|
70
75
|
return { reply: { jsonrpc: '2.0', id, result: {} } };
|
|
76
|
+
const empty = EMPTY_LISTS[message.method];
|
|
77
|
+
if (empty)
|
|
78
|
+
return { reply: { jsonrpc: '2.0', id, result: empty } };
|
|
71
79
|
const cache = readJson(cacheFile);
|
|
72
80
|
if (!cache)
|
|
73
81
|
return null;
|
package/dist/client.js
CHANGED
|
@@ -113,7 +113,7 @@ export class Client {
|
|
|
113
113
|
}
|
|
114
114
|
async ensureFreshToken() {
|
|
115
115
|
const { kind, expiresAt, refreshToken, clientId } = this.credentials;
|
|
116
|
-
if (kind !== 'oauth' ||
|
|
116
|
+
if (kind !== 'oauth' || expiresAt === undefined || Date.now() < expiresAt)
|
|
117
117
|
return;
|
|
118
118
|
if (!refreshToken || !clientId) {
|
|
119
119
|
throw new ApiError(401, {
|
package/dist/source.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d0a7b9d8353f8d72ab5f3d9cbc94d4ea0ec872d5fe7831cac380fb5a6bb44f31
|
package/package.json
CHANGED