toolcraft 0.0.352 → 0.0.354
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/composition.json +3 -3
- package/dist/composition.json +3 -3
- package/node_modules/tiny-http-mcp-server/dist/composition.json +1 -1
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/README.md +5 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/default-oauth-client-provider.js +7 -19
- package/node_modules/tiny-http-mcp-server/package.json +1 -1
- package/node_modules/tiny-mcp-client/dist/index.js +7 -17
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +2 -2
package/composition.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"name": "tiny-http-mcp-server",
|
|
101
|
-
"version": "0.1.
|
|
101
|
+
"version": "0.1.85",
|
|
102
102
|
"license": "MIT"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.354",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.354",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
package/dist/composition.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"name": "tiny-http-mcp-server",
|
|
101
|
-
"version": "0.1.
|
|
101
|
+
"version": "0.1.85",
|
|
102
102
|
"license": "MIT"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.354",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.354",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -47,6 +47,7 @@ alone do not establish either native error type.
|
|
|
47
47
|
|
|
48
48
|
- `client`
|
|
49
49
|
- `mode: "dynamic"` with optional `metadata`
|
|
50
|
+
and optional existing `clientId`/`clientSecret`
|
|
50
51
|
- `mode: "static"` with `clientId`, optional `clientSecret`, optional `metadata`
|
|
51
52
|
- `allowInteractive: false` prevents interactive login while retaining cached tokens and silent refresh
|
|
52
53
|
- `sessionLockTimeoutMs` limits acquisition waits for a session transaction lock (default 30,000 ms; integer from 1 to 2147483647)
|
|
@@ -266,6 +267,10 @@ Static clients and dynamic initial-grant imports require cached grants to match
|
|
|
266
267
|
the original normalized client ID and secret. A different client configuration
|
|
267
268
|
fails before attaching or refreshing credentials and retains the stored record;
|
|
268
269
|
select separate persistence or explicitly reset the session to change apps.
|
|
270
|
+
An explicitly supplied client ID is used for consent in either mode, including
|
|
271
|
+
when discovery advertises a registrar. Dynamic registration creates a client
|
|
272
|
+
only when no existing app identity is supplied; URL client IDs stay opaque and
|
|
273
|
+
do not trigger client-metadata fetching or registration fallback.
|
|
269
274
|
Use `persistenceNamespace: "personal"` or `"work"` to keep separate native
|
|
270
275
|
profiles for the same resource/issuer. `createAuthStoreSessionStore(options,
|
|
271
276
|
namespace)` addresses the same profile when seeding or inspecting credentials.
|
|
@@ -396,7 +396,7 @@ export function createDefaultOAuthClientProvider(options) {
|
|
|
396
396
|
}
|
|
397
397
|
async function resolveClient(existingSession, discovery, redirectUri, fetch, parentSignal) {
|
|
398
398
|
parentSignal?.throwIfAborted();
|
|
399
|
-
if (clientMode === "static" || configuredClient
|
|
399
|
+
if (clientMode === "static" || configuredClient !== null) {
|
|
400
400
|
if (configuredClient === null) {
|
|
401
401
|
throw new Error("OAuth client_id must not be blank");
|
|
402
402
|
}
|
|
@@ -410,13 +410,6 @@ export function createDefaultOAuthClientProvider(options) {
|
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
const registrationEndpoint = getOwnString(discovery.authorizationServerMetadata, "registration_endpoint");
|
|
413
|
-
if (registrationEndpoint === undefined && configuredClient !== null) {
|
|
414
|
-
return {
|
|
415
|
-
kind: "static",
|
|
416
|
-
fromStoredRegistration: false,
|
|
417
|
-
client: configuredClient
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
413
|
let storedClient = await loadRegisteredClient(discovery.authorizationServer);
|
|
421
414
|
const importedClient = existingSession?.client.registrationOwnership === "caller" ? existingSession.client :
|
|
422
415
|
storedClient?.registrationOwnership === "caller" ? storedClient : undefined;
|
|
@@ -453,17 +446,12 @@ export function createDefaultOAuthClientProvider(options) {
|
|
|
453
446
|
throw new Error("Authorization server metadata is missing registration_endpoint");
|
|
454
447
|
}
|
|
455
448
|
if (existingSession !== null && existingSession.client.clientId.length > 0 && !hasExpiredClientSecret(existingSession.client, now) && registrationMatchesRedirect(existingSession.client, redirectUri)) {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
kind: "dynamic",
|
|
463
|
-
fromStoredRegistration: true,
|
|
464
|
-
client: existingSession.client
|
|
465
|
-
};
|
|
466
|
-
}
|
|
449
|
+
await saveRegisteredClient(discovery.authorizationServer, existingSession.client);
|
|
450
|
+
return {
|
|
451
|
+
kind: "dynamic",
|
|
452
|
+
fromStoredRegistration: true,
|
|
453
|
+
client: existingSession.client
|
|
454
|
+
};
|
|
467
455
|
}
|
|
468
456
|
const supported = getSupportedTokenAuthMethods(discovery.authorizationServerMetadata);
|
|
469
457
|
const registrationMethod = requestedTokenMethod ?? (supported === undefined ? "none" :
|
|
@@ -5691,7 +5691,7 @@ function createDefaultOAuthClientProvider(options) {
|
|
|
5691
5691
|
}
|
|
5692
5692
|
async function resolveClient(existingSession, discovery, redirectUri, fetch2, parentSignal) {
|
|
5693
5693
|
parentSignal?.throwIfAborted();
|
|
5694
|
-
if (clientMode === "static" || configuredClient
|
|
5694
|
+
if (clientMode === "static" || configuredClient !== null) {
|
|
5695
5695
|
if (configuredClient === null) {
|
|
5696
5696
|
throw new Error("OAuth client_id must not be blank");
|
|
5697
5697
|
}
|
|
@@ -5705,13 +5705,6 @@ function createDefaultOAuthClientProvider(options) {
|
|
|
5705
5705
|
};
|
|
5706
5706
|
}
|
|
5707
5707
|
const registrationEndpoint = getOwnString2(discovery.authorizationServerMetadata, "registration_endpoint");
|
|
5708
|
-
if (registrationEndpoint === void 0 && configuredClient !== null) {
|
|
5709
|
-
return {
|
|
5710
|
-
kind: "static",
|
|
5711
|
-
fromStoredRegistration: false,
|
|
5712
|
-
client: configuredClient
|
|
5713
|
-
};
|
|
5714
|
-
}
|
|
5715
5708
|
let storedClient = await loadRegisteredClient(discovery.authorizationServer);
|
|
5716
5709
|
const importedClient = existingSession?.client.registrationOwnership === "caller" ? existingSession.client : storedClient?.registrationOwnership === "caller" ? storedClient : void 0;
|
|
5717
5710
|
if (importedClient !== void 0) {
|
|
@@ -5747,15 +5740,12 @@ function createDefaultOAuthClientProvider(options) {
|
|
|
5747
5740
|
throw new Error("Authorization server metadata is missing registration_endpoint");
|
|
5748
5741
|
}
|
|
5749
5742
|
if (existingSession !== null && existingSession.client.clientId.length > 0 && !hasExpiredClientSecret(existingSession.client, now) && registrationMatchesRedirect(existingSession.client, redirectUri)) {
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
client: existingSession.client
|
|
5757
|
-
};
|
|
5758
|
-
}
|
|
5743
|
+
await saveRegisteredClient(discovery.authorizationServer, existingSession.client);
|
|
5744
|
+
return {
|
|
5745
|
+
kind: "dynamic",
|
|
5746
|
+
fromStoredRegistration: true,
|
|
5747
|
+
client: existingSession.client
|
|
5748
|
+
};
|
|
5759
5749
|
}
|
|
5760
5750
|
const supported = getSupportedTokenAuthMethods(discovery.authorizationServerMetadata);
|
|
5761
5751
|
const registrationMethod = requestedTokenMethod ?? (supported === void 0 ? "none" : ["none", "client_secret_basic", "client_secret_post"].find((method) => supported.includes(method)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.354",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"yaml"
|
|
159
159
|
],
|
|
160
160
|
"optionalDependencies": {
|
|
161
|
-
"toolcraft-schema": "0.0.
|
|
161
|
+
"toolcraft-schema": "0.0.354",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|