toolcraft 0.0.339 → 0.0.340
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 +6 -2
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/default-oauth-client-provider.js +2 -1
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/token-grant.js +1 -0
- package/node_modules/tiny-http-mcp-server/package.json +1 -1
- package/node_modules/tiny-mcp-client/dist/index.js +2 -1
- 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.62",
|
|
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.340",
|
|
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.340",
|
|
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.62",
|
|
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.340",
|
|
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.340",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -157,9 +157,13 @@ used only for its resource.
|
|
|
157
157
|
Discovery binds an expired or explicitly rejected grant before silent refresh,
|
|
158
158
|
using the original configured client. Persisted sessions take precedence,
|
|
159
159
|
including sessions whose tokens have been cleared; an import cannot revive them.
|
|
160
|
-
Input tokens are copied
|
|
160
|
+
Input tokens are copied before any host clock anchors a relative lifetime;
|
|
161
|
+
clock mutation cannot replace the selected access/refresh/scope values. Invalid
|
|
162
|
+
expiry values fail before authorization.
|
|
161
163
|
For a raw OAuth response, `parseOAuthTokenGrant(response, { issuedAt, expiresAt })`
|
|
162
|
-
returns normalized `StoredOAuthTokens`.
|
|
164
|
+
returns normalized `StoredOAuthTokens`. Timing options are captured before the
|
|
165
|
+
host clock runs, so it cannot bypass their earlier validation. The parser accepts
|
|
166
|
+
`access_token`, `refresh_token`,
|
|
163
167
|
`token_type`, `scope`, `expires_in` (seconds), `expires_at` (epoch seconds), and
|
|
164
168
|
`expiresAt` (epoch milliseconds). Numeric absolute expiry wins over relative
|
|
165
169
|
lifetime; the options timestamp wins over response timestamps. The optional
|
|
@@ -603,6 +603,7 @@ function normalizeImportedTokens(value, now) {
|
|
|
603
603
|
const absolute = getOwnEntry(value, "expiresAt");
|
|
604
604
|
const lifetime = getOwnEntry(value, "expiresIn");
|
|
605
605
|
const issuedAt = getOwnEntry(value, "issuedAt");
|
|
606
|
+
const snapshot = { ...value };
|
|
606
607
|
if (lifetime !== undefined && (typeof lifetime !== "number" || !Number.isSafeInteger(lifetime) || lifetime < 0))
|
|
607
608
|
throw new Error("OAuth initial grant has invalid relative expiry");
|
|
608
609
|
if (issuedAt !== undefined && (typeof issuedAt !== "number" || !Number.isSafeInteger(issuedAt) ||
|
|
@@ -610,7 +611,7 @@ function normalizeImportedTokens(value, now) {
|
|
|
610
611
|
throw new Error("OAuth initial grant has invalid issuance time");
|
|
611
612
|
const expiresAt = absolute !== undefined && absolute !== null ? absolute :
|
|
612
613
|
lifetime === undefined ? null : (issuedAt === undefined ? now() : issuedAt) + lifetime * 1000;
|
|
613
|
-
return normalizeStoredTokens({ ...
|
|
614
|
+
return normalizeStoredTokens({ ...snapshot, expiresAt });
|
|
614
615
|
}
|
|
615
616
|
function normalizeStoredTokens(value) {
|
|
616
617
|
if (value === undefined || !isObjectRecord(value)) {
|
|
@@ -2,6 +2,7 @@ import { copyBoundedOAuthJson } from "./bounded-json.js";
|
|
|
2
2
|
import { normalizeOAuthScope } from "./scope.js";
|
|
3
3
|
/** Validate a raw RFC token response and anchor its lifetime once for persistence. */
|
|
4
4
|
export function parseOAuthTokenGrant(value, options = {}) {
|
|
5
|
+
options = { ...options };
|
|
5
6
|
const invalid = () => new Error("Invalid OAuth token grant");
|
|
6
7
|
const result = copyBoundedOAuthJson(value, "Invalid OAuth token grant");
|
|
7
8
|
if (typeof result !== "object" || result === null || Array.isArray(result))
|
|
@@ -5834,12 +5834,13 @@ function normalizeImportedTokens(value, now) {
|
|
|
5834
5834
|
const absolute = getOwnEntry6(value, "expiresAt");
|
|
5835
5835
|
const lifetime = getOwnEntry6(value, "expiresIn");
|
|
5836
5836
|
const issuedAt = getOwnEntry6(value, "issuedAt");
|
|
5837
|
+
const snapshot = { ...value };
|
|
5837
5838
|
if (lifetime !== void 0 && (typeof lifetime !== "number" || !Number.isSafeInteger(lifetime) || lifetime < 0))
|
|
5838
5839
|
throw new Error("OAuth initial grant has invalid relative expiry");
|
|
5839
5840
|
if (issuedAt !== void 0 && (typeof issuedAt !== "number" || !Number.isSafeInteger(issuedAt) || Math.abs(issuedAt) > MAX_JS_DATE_MS3))
|
|
5840
5841
|
throw new Error("OAuth initial grant has invalid issuance time");
|
|
5841
5842
|
const expiresAt = absolute !== void 0 && absolute !== null ? absolute : lifetime === void 0 ? null : (issuedAt === void 0 ? now() : issuedAt) + lifetime * 1e3;
|
|
5842
|
-
return normalizeStoredTokens({ ...
|
|
5843
|
+
return normalizeStoredTokens({ ...snapshot, expiresAt });
|
|
5843
5844
|
}
|
|
5844
5845
|
function normalizeStoredTokens(value) {
|
|
5845
5846
|
if (value === void 0 || !isObjectRecord3(value)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.340",
|
|
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.340",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|