@tooluminati/router 0.1.0
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/LICENSE +21 -0
- package/dist/index.cjs +218 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +185 -0
- package/dist/next-client.d.ts +18 -0
- package/dist/next-client.d.ts.map +1 -0
- package/dist/next-client.js +23 -0
- package/dist/react-router.d.ts +36 -0
- package/dist/react-router.d.ts.map +1 -0
- package/dist/react-router.js +48 -0
- package/dist/tanstack-router.d.ts +27 -0
- package/dist/tanstack-router.d.ts.map +1 -0
- package/dist/tanstack-router.js +32 -0
- package/dist/tools.d.ts +6 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +60 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jitterbox
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
WebMcpReactRouterScope: () => WebMcpReactRouterScope,
|
|
24
|
+
createCurrentRouteTool: () => createCurrentRouteTool,
|
|
25
|
+
createNavigationStateTool: () => createNavigationStateTool,
|
|
26
|
+
createNextClientRouterDiagnosticsProvider: () => createNextClientRouterDiagnosticsProvider,
|
|
27
|
+
createReactRouterDiagnosticsProvider: () => createReactRouterDiagnosticsProvider,
|
|
28
|
+
createRouteContextTool: () => createRouteContextTool,
|
|
29
|
+
createTanStackRouterDiagnosticsProvider: () => createTanStackRouterDiagnosticsProvider
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
|
+
|
|
33
|
+
// src/next-client.tsx
|
|
34
|
+
function createNextClientRouterDiagnosticsProvider(input, options = {}) {
|
|
35
|
+
return {
|
|
36
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
37
|
+
getCurrentRoute() {
|
|
38
|
+
const value = input();
|
|
39
|
+
return {
|
|
40
|
+
pathname: value.pathname,
|
|
41
|
+
search: value.search,
|
|
42
|
+
hash: value.hash,
|
|
43
|
+
params: value.params
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
getNavigationState() {
|
|
47
|
+
return { state: "idle" };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/react-router.tsx
|
|
53
|
+
var import_react = require("react");
|
|
54
|
+
var import_react2 = require("@tooluminati/react");
|
|
55
|
+
|
|
56
|
+
// src/tools.ts
|
|
57
|
+
function createCurrentRouteTool(provider, name = "get_current_route") {
|
|
58
|
+
return {
|
|
59
|
+
name,
|
|
60
|
+
description: "Returns the current router-derived route, params, search, hash, and safe match summary.",
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {},
|
|
64
|
+
additionalProperties: false
|
|
65
|
+
},
|
|
66
|
+
annotations: { readOnlyHint: true },
|
|
67
|
+
execute: () => provider.getCurrentRoute()
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function createNavigationStateTool(provider, name = "get_navigation_state") {
|
|
71
|
+
return {
|
|
72
|
+
name,
|
|
73
|
+
description: "Returns router navigation state, pending path, blockers, and safe blocker reasons.",
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {},
|
|
77
|
+
additionalProperties: false
|
|
78
|
+
},
|
|
79
|
+
annotations: { readOnlyHint: true },
|
|
80
|
+
execute: () => provider.getNavigationState?.() ?? {
|
|
81
|
+
state: "idle"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function pickAllowlistedLoaderData(data, allowlist) {
|
|
86
|
+
if (!data || typeof data !== "object" || !allowlist?.length) {
|
|
87
|
+
return void 0;
|
|
88
|
+
}
|
|
89
|
+
const record = data;
|
|
90
|
+
return Object.fromEntries(
|
|
91
|
+
allowlist.filter((key) => key in record).map((key) => [key, record[key]])
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function createRouteContextTool(provider, name = "get_route_context") {
|
|
95
|
+
return {
|
|
96
|
+
name,
|
|
97
|
+
description: "Returns a redacted summary of current route loader/context state before any raw data.",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {},
|
|
101
|
+
additionalProperties: false
|
|
102
|
+
},
|
|
103
|
+
annotations: { readOnlyHint: true },
|
|
104
|
+
execute: () => {
|
|
105
|
+
const context = provider.getRouteContext?.() ?? {};
|
|
106
|
+
const loaderData = pickAllowlistedLoaderData(
|
|
107
|
+
context.loaderData,
|
|
108
|
+
provider.loaderAllowlist
|
|
109
|
+
);
|
|
110
|
+
return {
|
|
111
|
+
routeId: context.routeId,
|
|
112
|
+
loaderStatus: context.loaderStatus,
|
|
113
|
+
dataShape: context.dataShape,
|
|
114
|
+
safeLabels: context.safeLabels,
|
|
115
|
+
...loaderData !== void 0 ? { loaderData } : {}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// src/react-router.tsx
|
|
122
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
123
|
+
function createReactRouterDiagnosticsProvider(input, options = {}) {
|
|
124
|
+
return {
|
|
125
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
126
|
+
getCurrentRoute() {
|
|
127
|
+
const value = input();
|
|
128
|
+
return {
|
|
129
|
+
pathname: value.location.pathname,
|
|
130
|
+
search: value.location.search,
|
|
131
|
+
hash: value.location.hash,
|
|
132
|
+
params: value.params,
|
|
133
|
+
matches: value.matches?.map((match) => ({
|
|
134
|
+
id: match.id,
|
|
135
|
+
path: match.pathname
|
|
136
|
+
}))
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
getNavigationState() {
|
|
140
|
+
const navigation = input().navigation;
|
|
141
|
+
return {
|
|
142
|
+
state: navigation?.state ?? "idle",
|
|
143
|
+
pendingPathname: navigation?.location?.pathname
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
getRouteContext() {
|
|
147
|
+
const value = input();
|
|
148
|
+
return {
|
|
149
|
+
loaderData: value.loaderData
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function WebMcpReactRouterScope({
|
|
155
|
+
children,
|
|
156
|
+
useRouterState,
|
|
157
|
+
loaderAllowlist,
|
|
158
|
+
namespaceSegment
|
|
159
|
+
}) {
|
|
160
|
+
const provider = (0, import_react.useMemo)(
|
|
161
|
+
() => createReactRouterDiagnosticsProvider(useRouterState, {
|
|
162
|
+
loaderAllowlist
|
|
163
|
+
}),
|
|
164
|
+
[useRouterState, loaderAllowlist]
|
|
165
|
+
);
|
|
166
|
+
const tools = (0, import_react.useMemo)(
|
|
167
|
+
() => [
|
|
168
|
+
createCurrentRouteTool(provider),
|
|
169
|
+
createNavigationStateTool(provider),
|
|
170
|
+
createRouteContextTool(provider)
|
|
171
|
+
],
|
|
172
|
+
[provider]
|
|
173
|
+
);
|
|
174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.WebMcpScope, { tools, source: "route", namespaceSegment, children });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/tanstack-router.tsx
|
|
178
|
+
function createTanStackRouterDiagnosticsProvider(input, options = {}) {
|
|
179
|
+
return {
|
|
180
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
181
|
+
getCurrentRoute() {
|
|
182
|
+
const value = input();
|
|
183
|
+
return {
|
|
184
|
+
pathname: value.location.pathname,
|
|
185
|
+
search: value.location.search,
|
|
186
|
+
hash: value.location.hash,
|
|
187
|
+
params: value.params,
|
|
188
|
+
matches: value.matches?.map((match) => ({
|
|
189
|
+
id: match.id,
|
|
190
|
+
path: match.pathname,
|
|
191
|
+
status: match.status
|
|
192
|
+
}))
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
getNavigationState() {
|
|
196
|
+
const navigation = input().navigation;
|
|
197
|
+
return {
|
|
198
|
+
state: navigation?.state ?? "idle",
|
|
199
|
+
pendingPathname: navigation?.location?.pathname
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
getRouteContext() {
|
|
203
|
+
return {
|
|
204
|
+
loaderData: input().loaderData
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
210
|
+
0 && (module.exports = {
|
|
211
|
+
WebMcpReactRouterScope,
|
|
212
|
+
createCurrentRouteTool,
|
|
213
|
+
createNavigationStateTool,
|
|
214
|
+
createNextClientRouterDiagnosticsProvider,
|
|
215
|
+
createReactRouterDiagnosticsProvider,
|
|
216
|
+
createRouteContextTool,
|
|
217
|
+
createTanStackRouterDiagnosticsProvider
|
|
218
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
// src/next-client.tsx
|
|
2
|
+
function createNextClientRouterDiagnosticsProvider(input, options = {}) {
|
|
3
|
+
return {
|
|
4
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
5
|
+
getCurrentRoute() {
|
|
6
|
+
const value = input();
|
|
7
|
+
return {
|
|
8
|
+
pathname: value.pathname,
|
|
9
|
+
search: value.search,
|
|
10
|
+
hash: value.hash,
|
|
11
|
+
params: value.params
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
getNavigationState() {
|
|
15
|
+
return { state: "idle" };
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// src/react-router.tsx
|
|
21
|
+
import { useMemo } from "react";
|
|
22
|
+
import { WebMcpScope } from "@tooluminati/react";
|
|
23
|
+
|
|
24
|
+
// src/tools.ts
|
|
25
|
+
function createCurrentRouteTool(provider, name = "get_current_route") {
|
|
26
|
+
return {
|
|
27
|
+
name,
|
|
28
|
+
description: "Returns the current router-derived route, params, search, hash, and safe match summary.",
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {},
|
|
32
|
+
additionalProperties: false
|
|
33
|
+
},
|
|
34
|
+
annotations: { readOnlyHint: true },
|
|
35
|
+
execute: () => provider.getCurrentRoute()
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function createNavigationStateTool(provider, name = "get_navigation_state") {
|
|
39
|
+
return {
|
|
40
|
+
name,
|
|
41
|
+
description: "Returns router navigation state, pending path, blockers, and safe blocker reasons.",
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {},
|
|
45
|
+
additionalProperties: false
|
|
46
|
+
},
|
|
47
|
+
annotations: { readOnlyHint: true },
|
|
48
|
+
execute: () => provider.getNavigationState?.() ?? {
|
|
49
|
+
state: "idle"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function pickAllowlistedLoaderData(data, allowlist) {
|
|
54
|
+
if (!data || typeof data !== "object" || !allowlist?.length) {
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
57
|
+
const record = data;
|
|
58
|
+
return Object.fromEntries(
|
|
59
|
+
allowlist.filter((key) => key in record).map((key) => [key, record[key]])
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function createRouteContextTool(provider, name = "get_route_context") {
|
|
63
|
+
return {
|
|
64
|
+
name,
|
|
65
|
+
description: "Returns a redacted summary of current route loader/context state before any raw data.",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {},
|
|
69
|
+
additionalProperties: false
|
|
70
|
+
},
|
|
71
|
+
annotations: { readOnlyHint: true },
|
|
72
|
+
execute: () => {
|
|
73
|
+
const context = provider.getRouteContext?.() ?? {};
|
|
74
|
+
const loaderData = pickAllowlistedLoaderData(
|
|
75
|
+
context.loaderData,
|
|
76
|
+
provider.loaderAllowlist
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
routeId: context.routeId,
|
|
80
|
+
loaderStatus: context.loaderStatus,
|
|
81
|
+
dataShape: context.dataShape,
|
|
82
|
+
safeLabels: context.safeLabels,
|
|
83
|
+
...loaderData !== void 0 ? { loaderData } : {}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// src/react-router.tsx
|
|
90
|
+
import { jsx } from "react/jsx-runtime";
|
|
91
|
+
function createReactRouterDiagnosticsProvider(input, options = {}) {
|
|
92
|
+
return {
|
|
93
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
94
|
+
getCurrentRoute() {
|
|
95
|
+
const value = input();
|
|
96
|
+
return {
|
|
97
|
+
pathname: value.location.pathname,
|
|
98
|
+
search: value.location.search,
|
|
99
|
+
hash: value.location.hash,
|
|
100
|
+
params: value.params,
|
|
101
|
+
matches: value.matches?.map((match) => ({
|
|
102
|
+
id: match.id,
|
|
103
|
+
path: match.pathname
|
|
104
|
+
}))
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
getNavigationState() {
|
|
108
|
+
const navigation = input().navigation;
|
|
109
|
+
return {
|
|
110
|
+
state: navigation?.state ?? "idle",
|
|
111
|
+
pendingPathname: navigation?.location?.pathname
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
getRouteContext() {
|
|
115
|
+
const value = input();
|
|
116
|
+
return {
|
|
117
|
+
loaderData: value.loaderData
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function WebMcpReactRouterScope({
|
|
123
|
+
children,
|
|
124
|
+
useRouterState,
|
|
125
|
+
loaderAllowlist,
|
|
126
|
+
namespaceSegment
|
|
127
|
+
}) {
|
|
128
|
+
const provider = useMemo(
|
|
129
|
+
() => createReactRouterDiagnosticsProvider(useRouterState, {
|
|
130
|
+
loaderAllowlist
|
|
131
|
+
}),
|
|
132
|
+
[useRouterState, loaderAllowlist]
|
|
133
|
+
);
|
|
134
|
+
const tools = useMemo(
|
|
135
|
+
() => [
|
|
136
|
+
createCurrentRouteTool(provider),
|
|
137
|
+
createNavigationStateTool(provider),
|
|
138
|
+
createRouteContextTool(provider)
|
|
139
|
+
],
|
|
140
|
+
[provider]
|
|
141
|
+
);
|
|
142
|
+
return /* @__PURE__ */ jsx(WebMcpScope, { tools, source: "route", namespaceSegment, children });
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/tanstack-router.tsx
|
|
146
|
+
function createTanStackRouterDiagnosticsProvider(input, options = {}) {
|
|
147
|
+
return {
|
|
148
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
149
|
+
getCurrentRoute() {
|
|
150
|
+
const value = input();
|
|
151
|
+
return {
|
|
152
|
+
pathname: value.location.pathname,
|
|
153
|
+
search: value.location.search,
|
|
154
|
+
hash: value.location.hash,
|
|
155
|
+
params: value.params,
|
|
156
|
+
matches: value.matches?.map((match) => ({
|
|
157
|
+
id: match.id,
|
|
158
|
+
path: match.pathname,
|
|
159
|
+
status: match.status
|
|
160
|
+
}))
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
getNavigationState() {
|
|
164
|
+
const navigation = input().navigation;
|
|
165
|
+
return {
|
|
166
|
+
state: navigation?.state ?? "idle",
|
|
167
|
+
pendingPathname: navigation?.location?.pathname
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
getRouteContext() {
|
|
171
|
+
return {
|
|
172
|
+
loaderData: input().loaderData
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
WebMcpReactRouterScope,
|
|
179
|
+
createCurrentRouteTool,
|
|
180
|
+
createNavigationStateTool,
|
|
181
|
+
createNextClientRouterDiagnosticsProvider,
|
|
182
|
+
createReactRouterDiagnosticsProvider,
|
|
183
|
+
createRouteContextTool,
|
|
184
|
+
createTanStackRouterDiagnosticsProvider
|
|
185
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RouteDiagnosticsProvider } from './types';
|
|
2
|
+
export interface NextClientRouterLikeInput {
|
|
3
|
+
pathname: string;
|
|
4
|
+
search?: string;
|
|
5
|
+
hash?: string;
|
|
6
|
+
params?: Record<string, string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export interface NextClientRouterDiagnosticsOptions {
|
|
9
|
+
loaderAllowlist?: string[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Client-only pathname/search adapter for Next.js App Router pages.
|
|
13
|
+
* Server Components are not observable from the browser runtime.
|
|
14
|
+
*
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
export declare function createNextClientRouterDiagnosticsProvider(input: () => NextClientRouterLikeInput, options?: NextClientRouterDiagnosticsOptions): RouteDiagnosticsProvider;
|
|
18
|
+
//# sourceMappingURL=next-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-client.d.ts","sourceRoot":"","sources":["../src/next-client.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,kCAAkC;IACjD,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,MAAM,yBAAyB,EACtC,OAAO,GAAE,kCAAuC,GAC/C,wBAAwB,CAgB1B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-only pathname/search adapter for Next.js App Router pages.
|
|
3
|
+
* Server Components are not observable from the browser runtime.
|
|
4
|
+
*
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export function createNextClientRouterDiagnosticsProvider(input, options = {}) {
|
|
8
|
+
return {
|
|
9
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
10
|
+
getCurrentRoute() {
|
|
11
|
+
const value = input();
|
|
12
|
+
return {
|
|
13
|
+
pathname: value.pathname,
|
|
14
|
+
search: value.search,
|
|
15
|
+
hash: value.hash,
|
|
16
|
+
params: value.params,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
getNavigationState() {
|
|
20
|
+
return { state: 'idle' };
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { RouteDiagnosticsProvider } from './types';
|
|
3
|
+
export interface ReactRouterLikeInput {
|
|
4
|
+
location: {
|
|
5
|
+
pathname: string;
|
|
6
|
+
search?: string;
|
|
7
|
+
hash?: string;
|
|
8
|
+
};
|
|
9
|
+
params?: Record<string, string | undefined>;
|
|
10
|
+
matches?: Array<{
|
|
11
|
+
id?: string;
|
|
12
|
+
pathname?: string;
|
|
13
|
+
handle?: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
navigation?: {
|
|
16
|
+
state: string;
|
|
17
|
+
location?: {
|
|
18
|
+
pathname?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
loaderData?: unknown;
|
|
22
|
+
}
|
|
23
|
+
export interface ReactRouterDiagnosticsOptions {
|
|
24
|
+
loaderAllowlist?: string[] | undefined;
|
|
25
|
+
}
|
|
26
|
+
/** @experimental */
|
|
27
|
+
export declare function createReactRouterDiagnosticsProvider(input: () => ReactRouterLikeInput, options?: ReactRouterDiagnosticsOptions): RouteDiagnosticsProvider;
|
|
28
|
+
export interface WebMcpReactRouterScopeProps {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
useRouterState: () => ReactRouterLikeInput;
|
|
31
|
+
loaderAllowlist?: string[] | undefined;
|
|
32
|
+
namespaceSegment?: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** @experimental */
|
|
35
|
+
export declare function WebMcpReactRouterScope({ children, useRouterState, loaderAllowlist, namespaceSegment, }: WebMcpReactRouterScopeProps): import("react").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=react-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-router.d.ts","sourceRoot":"","sources":["../src/react-router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B;IAC5C,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACxC;AAED,oBAAoB;AACpB,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,MAAM,oBAAoB,EACjC,OAAO,GAAE,6BAAkC,GAC1C,wBAAwB,CA8B1B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,EAAE,MAAM,oBAAoB,CAAC;IAC3C,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,oBAAoB;AACpB,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,EAAE,2BAA2B,+BAuB7B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { WebMcpScope } from '@tooluminati/react';
|
|
4
|
+
import { createCurrentRouteTool, createNavigationStateTool, createRouteContextTool, } from './tools';
|
|
5
|
+
/** @experimental */
|
|
6
|
+
export function createReactRouterDiagnosticsProvider(input, options = {}) {
|
|
7
|
+
return {
|
|
8
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
9
|
+
getCurrentRoute() {
|
|
10
|
+
const value = input();
|
|
11
|
+
return {
|
|
12
|
+
pathname: value.location.pathname,
|
|
13
|
+
search: value.location.search,
|
|
14
|
+
hash: value.location.hash,
|
|
15
|
+
params: value.params,
|
|
16
|
+
matches: value.matches?.map((match) => ({
|
|
17
|
+
id: match.id,
|
|
18
|
+
path: match.pathname,
|
|
19
|
+
})),
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
getNavigationState() {
|
|
23
|
+
const navigation = input().navigation;
|
|
24
|
+
return {
|
|
25
|
+
state: navigation?.state ?? 'idle',
|
|
26
|
+
pendingPathname: navigation?.location?.pathname,
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
getRouteContext() {
|
|
30
|
+
const value = input();
|
|
31
|
+
return {
|
|
32
|
+
loaderData: value.loaderData,
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** @experimental */
|
|
38
|
+
export function WebMcpReactRouterScope({ children, useRouterState, loaderAllowlist, namespaceSegment, }) {
|
|
39
|
+
const provider = useMemo(() => createReactRouterDiagnosticsProvider(useRouterState, {
|
|
40
|
+
loaderAllowlist,
|
|
41
|
+
}), [useRouterState, loaderAllowlist]);
|
|
42
|
+
const tools = useMemo(() => [
|
|
43
|
+
createCurrentRouteTool(provider),
|
|
44
|
+
createNavigationStateTool(provider),
|
|
45
|
+
createRouteContextTool(provider),
|
|
46
|
+
], [provider]);
|
|
47
|
+
return (_jsx(WebMcpScope, { tools: tools, source: "route", namespaceSegment: namespaceSegment, children: children }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RouteDiagnosticsProvider } from './types';
|
|
2
|
+
export interface TanStackRouterLikeInput {
|
|
3
|
+
location: {
|
|
4
|
+
pathname: string;
|
|
5
|
+
search?: string;
|
|
6
|
+
hash?: string;
|
|
7
|
+
};
|
|
8
|
+
params?: Record<string, string | undefined>;
|
|
9
|
+
matches?: Array<{
|
|
10
|
+
id?: string;
|
|
11
|
+
pathname?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
}>;
|
|
14
|
+
navigation?: {
|
|
15
|
+
state: string;
|
|
16
|
+
location?: {
|
|
17
|
+
pathname?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
loaderData?: unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface TanStackRouterDiagnosticsOptions {
|
|
23
|
+
loaderAllowlist?: string[] | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** @experimental */
|
|
26
|
+
export declare function createTanStackRouterDiagnosticsProvider(input: () => TanStackRouterLikeInput, options?: TanStackRouterDiagnosticsOptions): RouteDiagnosticsProvider;
|
|
27
|
+
//# sourceMappingURL=tanstack-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack-router.d.ts","sourceRoot":"","sources":["../src/tanstack-router.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACxC;AAED,oBAAoB;AACpB,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,MAAM,uBAAuB,EACpC,OAAO,GAAE,gCAAqC,GAC7C,wBAAwB,CA8B1B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @experimental */
|
|
2
|
+
export function createTanStackRouterDiagnosticsProvider(input, options = {}) {
|
|
3
|
+
return {
|
|
4
|
+
loaderAllowlist: options.loaderAllowlist,
|
|
5
|
+
getCurrentRoute() {
|
|
6
|
+
const value = input();
|
|
7
|
+
return {
|
|
8
|
+
pathname: value.location.pathname,
|
|
9
|
+
search: value.location.search,
|
|
10
|
+
hash: value.location.hash,
|
|
11
|
+
params: value.params,
|
|
12
|
+
matches: value.matches?.map((match) => ({
|
|
13
|
+
id: match.id,
|
|
14
|
+
path: match.pathname,
|
|
15
|
+
status: match.status,
|
|
16
|
+
})),
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
getNavigationState() {
|
|
20
|
+
const navigation = input().navigation;
|
|
21
|
+
return {
|
|
22
|
+
state: navigation?.state ?? 'idle',
|
|
23
|
+
pendingPathname: navigation?.location?.pathname,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
getRouteContext() {
|
|
27
|
+
return {
|
|
28
|
+
loaderData: input().loaderData,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WebMcpToolDescriptor } from '@tooluminati/core';
|
|
2
|
+
import type { NavigationSummary, RouteContextSummary, RouteDiagnosticsProvider, RouteSummary } from './types';
|
|
3
|
+
export declare function createCurrentRouteTool(provider: RouteDiagnosticsProvider, name?: string): WebMcpToolDescriptor<Record<string, never>, RouteSummary>;
|
|
4
|
+
export declare function createNavigationStateTool(provider: RouteDiagnosticsProvider, name?: string): WebMcpToolDescriptor<Record<string, never>, NavigationSummary>;
|
|
5
|
+
export declare function createRouteContextTool(provider: RouteDiagnosticsProvider, name?: string): WebMcpToolDescriptor<Record<string, never>, RouteContextSummary>;
|
|
6
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,SAAsB,GACzB,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAa3D;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,SAAyB,GAC5B,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,iBAAiB,CAAC,CAgBhE;AAkBD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,SAAsB,GACzB,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,CAAC,CA2BlE"}
|
package/dist/tools.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export function createCurrentRouteTool(provider, name = 'get_current_route') {
|
|
2
|
+
return {
|
|
3
|
+
name,
|
|
4
|
+
description: 'Returns the current router-derived route, params, search, hash, and safe match summary.',
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: 'object',
|
|
7
|
+
properties: {},
|
|
8
|
+
additionalProperties: false,
|
|
9
|
+
},
|
|
10
|
+
annotations: { readOnlyHint: true },
|
|
11
|
+
execute: () => provider.getCurrentRoute(),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export function createNavigationStateTool(provider, name = 'get_navigation_state') {
|
|
15
|
+
return {
|
|
16
|
+
name,
|
|
17
|
+
description: 'Returns router navigation state, pending path, blockers, and safe blocker reasons.',
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {},
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
},
|
|
23
|
+
annotations: { readOnlyHint: true },
|
|
24
|
+
execute: () => provider.getNavigationState?.() ?? {
|
|
25
|
+
state: 'idle',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function pickAllowlistedLoaderData(data, allowlist) {
|
|
30
|
+
if (!data || typeof data !== 'object' || !allowlist?.length) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const record = data;
|
|
34
|
+
return Object.fromEntries(allowlist
|
|
35
|
+
.filter((key) => key in record)
|
|
36
|
+
.map((key) => [key, record[key]]));
|
|
37
|
+
}
|
|
38
|
+
export function createRouteContextTool(provider, name = 'get_route_context') {
|
|
39
|
+
return {
|
|
40
|
+
name,
|
|
41
|
+
description: 'Returns a redacted summary of current route loader/context state before any raw data.',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {},
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
},
|
|
47
|
+
annotations: { readOnlyHint: true },
|
|
48
|
+
execute: () => {
|
|
49
|
+
const context = provider.getRouteContext?.() ?? {};
|
|
50
|
+
const loaderData = pickAllowlistedLoaderData(context.loaderData, provider.loaderAllowlist);
|
|
51
|
+
return {
|
|
52
|
+
routeId: context.routeId,
|
|
53
|
+
loaderStatus: context.loaderStatus,
|
|
54
|
+
dataShape: context.dataShape,
|
|
55
|
+
safeLabels: context.safeLabels,
|
|
56
|
+
...(loaderData !== undefined ? { loaderData } : {}),
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface RouteSummary {
|
|
2
|
+
pathname: string;
|
|
3
|
+
search?: string | undefined;
|
|
4
|
+
hash?: string | undefined;
|
|
5
|
+
params?: Record<string, string | undefined> | undefined;
|
|
6
|
+
matches?: Array<{
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
path?: string | undefined;
|
|
9
|
+
status?: string | undefined;
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface NavigationSummary {
|
|
14
|
+
state: 'idle' | 'loading' | 'submitting' | string;
|
|
15
|
+
pendingPathname?: string | undefined;
|
|
16
|
+
blocked?: boolean | undefined;
|
|
17
|
+
blockerReasons?: string[] | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface RouteContextSummary {
|
|
20
|
+
routeId?: string | undefined;
|
|
21
|
+
loaderStatus?: string | undefined;
|
|
22
|
+
dataShape?: unknown;
|
|
23
|
+
safeLabels?: string[] | undefined;
|
|
24
|
+
loaderData?: unknown;
|
|
25
|
+
}
|
|
26
|
+
export interface RouteDiagnosticsProvider {
|
|
27
|
+
getCurrentRoute(): RouteSummary;
|
|
28
|
+
getNavigationState?: () => NavigationSummary;
|
|
29
|
+
getRouteContext?: () => RouteContextSummary;
|
|
30
|
+
loaderAllowlist?: string[] | undefined;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IACxD,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC5B,CAAC,GAAG,SAAS,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;IAClD,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,eAAe,IAAI,YAAY,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,iBAAiB,CAAC;IAC7C,eAAe,CAAC,EAAE,MAAM,mBAAmB,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACxC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tooluminati/router",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Route and navigation diagnostics for Tooluminati.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@tooluminati/react": "0.1.0",
|
|
19
|
+
"@tooluminati/core": "0.1.0"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": ">=18.0.0"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/jitterbox/Tooluminati.git",
|
|
34
|
+
"directory": "packages/router"
|
|
35
|
+
},
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/jitterbox/Tooluminati/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/jitterbox/Tooluminati#readme",
|
|
40
|
+
"keywords": [
|
|
41
|
+
"tooluminati",
|
|
42
|
+
"webmcp",
|
|
43
|
+
"react",
|
|
44
|
+
"router",
|
|
45
|
+
"react-router"
|
|
46
|
+
],
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=18"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup src/index.ts --format esm,cjs && tsc -p tsconfig.json --emitDeclarationOnly",
|
|
52
|
+
"typecheck": "tsc --noEmit"
|
|
53
|
+
}
|
|
54
|
+
}
|