@inspectr/mcplab 1.14.0 → 1.14.1
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/app/assets/{index-B3_k1eZO.js → index-P8sMM8bG.js} +48 -48
- package/dist/app/index.html +1 -1
- package/dist/app-server/app-context.d.ts +141 -90
- package/dist/app-server/http.d.ts +1 -1
- package/dist/app-server/oauth-debugger-domain.d.ts +203 -182
- package/dist/app-server/oauth-debugger.d.ts +17 -10
- package/dist/app-server/scenario-assistant-domain.js +1 -1
- package/dist/app-server/scenario-assistant-domain.js.map +1 -1
- package/dist/app-server/tool-analysis-domain.d.ts +178 -163
- package/package.json +1 -1
package/dist/app/index.html
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<meta name="twitter:card" content="summary_large_image" />
|
|
17
17
|
<meta name="twitter:site" content="@Inspectr" />
|
|
18
18
|
<meta name="twitter:image" content="" />
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
19
|
+
<script type="module" crossorigin src="/assets/index-P8sMM8bG.js"></script>
|
|
20
20
|
<link rel="stylesheet" crossorigin href="/assets/index-C3E9mFQO.css">
|
|
21
21
|
</head>
|
|
22
22
|
|
|
@@ -3,128 +3,179 @@ import type { AppSettings } from './types.js';
|
|
|
3
3
|
import type { parseBody, asHtml, asJson, asText } from './http.js';
|
|
4
4
|
import type { addJobEvent, sendSseEvent } from './jobs.js';
|
|
5
5
|
import type { readLibraries } from './libraries-store.js';
|
|
6
|
-
import type {
|
|
7
|
-
|
|
6
|
+
import type {
|
|
7
|
+
discoverMcpToolsForServers,
|
|
8
|
+
runToolAnalysisJob,
|
|
9
|
+
ToolAnalysisJob
|
|
10
|
+
} from './tool-analysis-domain.js';
|
|
11
|
+
import type {
|
|
12
|
+
cleanupOAuthDebuggerSessions,
|
|
13
|
+
oauthDebuggerSessionView,
|
|
14
|
+
createOAuthDebuggerSession,
|
|
15
|
+
startOrResumeOAuthDebuggerSession,
|
|
16
|
+
submitManualCallbackToSession,
|
|
17
|
+
submitBrowserCallbackToSession,
|
|
18
|
+
stopOAuthDebuggerSession,
|
|
19
|
+
oauthDebuggerExportMarkdown,
|
|
20
|
+
oauthDebuggerExportRawTrace,
|
|
21
|
+
OAuthDebuggerSession
|
|
22
|
+
} from './oauth-debugger-domain.js';
|
|
8
23
|
import type { OAuthRuntimeSession } from './oauth-runtime-domain.js';
|
|
9
|
-
import type {
|
|
10
|
-
|
|
11
|
-
|
|
24
|
+
import type {
|
|
25
|
+
cleanupAssistantSessions,
|
|
26
|
+
touchAssistantSession,
|
|
27
|
+
assistantSessionView,
|
|
28
|
+
pickDefaultAssistantAgentName,
|
|
29
|
+
resolveAssistantAgentFromConfig,
|
|
30
|
+
resolveAssistantAgentFromLibraries,
|
|
31
|
+
ScenarioAssistantSession
|
|
32
|
+
} from './scenario-assistant-domain.js';
|
|
33
|
+
import type {
|
|
34
|
+
listSnapshots,
|
|
35
|
+
buildSnapshotFromRun,
|
|
36
|
+
saveSnapshot,
|
|
37
|
+
loadSnapshot,
|
|
38
|
+
compareRunToSnapshot,
|
|
39
|
+
applySnapshotPolicyToRunResult
|
|
40
|
+
} from '../snapshot.js';
|
|
41
|
+
import type {
|
|
42
|
+
getRunResults,
|
|
43
|
+
listRuns,
|
|
44
|
+
getScenarioRunTraceRecords,
|
|
45
|
+
selectScenarioIds
|
|
46
|
+
} from './runs-store.js';
|
|
12
47
|
import type { decodeEvalId, ensureInsideRoot, safeFileName } from './store-utils.js';
|
|
13
48
|
import type { readConfigRecord, readConfigRecordOrInvalid, listConfigs } from './config-store.js';
|
|
14
49
|
import type { RunSummary } from './runs-store.js';
|
|
15
50
|
import type { ConfigRecord } from './config-store.js';
|
|
16
|
-
import type {
|
|
51
|
+
import type {
|
|
52
|
+
ResultsJson,
|
|
53
|
+
EvalConfig,
|
|
54
|
+
ExecutableEvalConfig,
|
|
55
|
+
chatWithAgent
|
|
56
|
+
} from '@inspectr/mcplab-core';
|
|
17
57
|
export interface AppRouteRequestContext {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
58
|
+
req: IncomingMessage;
|
|
59
|
+
res: ServerResponse;
|
|
60
|
+
pathname: string;
|
|
61
|
+
method: string;
|
|
62
|
+
settings: AppSettings;
|
|
23
63
|
}
|
|
24
64
|
export interface ActiveJobState {
|
|
25
|
-
|
|
26
|
-
|
|
65
|
+
get(): string | null;
|
|
66
|
+
set(value: string | null): void;
|
|
27
67
|
}
|
|
28
68
|
export interface RunQueueState {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
69
|
+
activeJobId: string | null;
|
|
70
|
+
queue: string[];
|
|
71
|
+
isAdvancingQueue: boolean;
|
|
32
72
|
}
|
|
33
73
|
export interface HttpDeps {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
74
|
+
parseBody: typeof parseBody;
|
|
75
|
+
asHtml: typeof asHtml;
|
|
76
|
+
asJson: typeof asJson;
|
|
77
|
+
asText: typeof asText;
|
|
38
78
|
}
|
|
39
79
|
export interface JobStreamDeps {
|
|
40
|
-
|
|
41
|
-
|
|
80
|
+
addJobEvent: typeof addJobEvent;
|
|
81
|
+
sendSseEvent: typeof sendSseEvent;
|
|
42
82
|
}
|
|
43
83
|
export interface LibraryDeps {
|
|
44
|
-
|
|
84
|
+
readLibraries: typeof readLibraries;
|
|
45
85
|
}
|
|
46
86
|
export interface ToolAnalysisDeps extends LibraryDeps {
|
|
47
|
-
|
|
48
|
-
|
|
87
|
+
discoverMcpToolsForServers: typeof discoverMcpToolsForServers;
|
|
88
|
+
runToolAnalysisJob: typeof runToolAnalysisJob;
|
|
49
89
|
}
|
|
50
90
|
export interface AssistantDeps extends LibraryDeps {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
91
|
+
cleanupAssistantSessions: typeof cleanupAssistantSessions;
|
|
92
|
+
touchAssistantSession: typeof touchAssistantSession;
|
|
93
|
+
assistantSessionView: typeof assistantSessionView;
|
|
94
|
+
ensureInsideRoot: typeof ensureInsideRoot;
|
|
95
|
+
pickDefaultAssistantAgentName: typeof pickDefaultAssistantAgentName;
|
|
96
|
+
resolveAssistantAgentFromConfig: typeof resolveAssistantAgentFromConfig;
|
|
97
|
+
resolveAssistantAgentFromLibraries: typeof resolveAssistantAgentFromLibraries;
|
|
58
98
|
}
|
|
59
99
|
export interface ResultAssistantDeps extends LibraryDeps {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
100
|
+
pickDefaultAssistantAgentName: typeof pickDefaultAssistantAgentName;
|
|
101
|
+
resolveAssistantAgentFromLibraries: typeof resolveAssistantAgentFromLibraries;
|
|
102
|
+
preloadResultAssistantTools: typeof import('./result-assistant-domain.js').preloadResultAssistantTools;
|
|
103
|
+
continueResultAssistantTurn: typeof import('./result-assistant-domain.js').continueResultAssistantTurn;
|
|
104
|
+
executeResultAssistantToolCall: typeof import('./result-assistant-domain.js').executeResultAssistantToolCall;
|
|
105
|
+
summarizeToolResultForResultAssistant: typeof import('./result-assistant-domain.js').summarizeToolResultForResultAssistant;
|
|
66
106
|
}
|
|
67
107
|
export interface ScenarioAssistantDeps extends LibraryDeps {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
108
|
+
cleanupAssistantSessions: typeof cleanupAssistantSessions;
|
|
109
|
+
touchAssistantSession: typeof touchAssistantSession;
|
|
110
|
+
assistantSessionView: typeof assistantSessionView;
|
|
111
|
+
ensureInsideRoot: typeof ensureInsideRoot;
|
|
112
|
+
pickDefaultAssistantAgentName: typeof pickDefaultAssistantAgentName;
|
|
113
|
+
resolveAssistantAgentFromConfig: typeof resolveAssistantAgentFromConfig;
|
|
114
|
+
resolveAssistantAgentFromLibraries: typeof resolveAssistantAgentFromLibraries;
|
|
115
|
+
preloadAssistantTools: typeof import('./scenario-assistant-domain.js').preloadAssistantTools;
|
|
116
|
+
continueAssistantTurn: typeof import('./scenario-assistant-domain.js').continueAssistantTurn;
|
|
117
|
+
executeAssistantToolCall: typeof import('./scenario-assistant-domain.js').executeAssistantToolCall;
|
|
118
|
+
summarizeToolResultForAssistant: typeof import('./scenario-assistant-domain.js').summarizeToolResultForAssistant;
|
|
79
119
|
}
|
|
80
120
|
export interface OAuthDebuggerDeps extends LibraryDeps {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
121
|
+
cleanupOAuthDebuggerSessions: typeof cleanupOAuthDebuggerSessions;
|
|
122
|
+
oauthDebuggerSessionView: typeof oauthDebuggerSessionView;
|
|
123
|
+
createOAuthDebuggerSession: typeof createOAuthDebuggerSession;
|
|
124
|
+
startOrResumeOAuthDebuggerSession: typeof startOrResumeOAuthDebuggerSession;
|
|
125
|
+
submitManualCallbackToSession: typeof submitManualCallbackToSession;
|
|
126
|
+
submitBrowserCallbackToSession: typeof submitBrowserCallbackToSession;
|
|
127
|
+
stopOAuthDebuggerSession: typeof stopOAuthDebuggerSession;
|
|
128
|
+
oauthDebuggerExportMarkdown: typeof oauthDebuggerExportMarkdown;
|
|
129
|
+
oauthDebuggerExportRawTrace: typeof oauthDebuggerExportRawTrace;
|
|
90
130
|
}
|
|
91
131
|
export interface SnapshotDeps {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
132
|
+
listSnapshots: typeof listSnapshots;
|
|
133
|
+
buildSnapshotFromRun: typeof buildSnapshotFromRun;
|
|
134
|
+
saveSnapshot: typeof saveSnapshot;
|
|
135
|
+
loadSnapshot: typeof loadSnapshot;
|
|
136
|
+
compareRunToSnapshot: typeof compareRunToSnapshot;
|
|
137
|
+
getRunResults: typeof getRunResults;
|
|
138
|
+
decodeEvalId: typeof decodeEvalId;
|
|
139
|
+
readConfigRecord: typeof readConfigRecord;
|
|
100
140
|
}
|
|
101
141
|
export interface ConfigDeps {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
142
|
+
listConfigs: typeof listConfigs;
|
|
143
|
+
safeFileName: typeof safeFileName;
|
|
144
|
+
ensureInsideRoot: typeof ensureInsideRoot;
|
|
145
|
+
decodeEvalId: typeof decodeEvalId;
|
|
146
|
+
readConfigRecord: typeof readConfigRecord;
|
|
147
|
+
readConfigRecordOrInvalid: typeof readConfigRecordOrInvalid;
|
|
108
148
|
}
|
|
109
149
|
export interface RunDeps {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
150
|
+
ensureInsideRoot: typeof ensureInsideRoot;
|
|
151
|
+
listRuns: typeof listRuns;
|
|
152
|
+
getRunResults: typeof getRunResults;
|
|
153
|
+
getScenarioRunTraceRecords: typeof getScenarioRunTraceRecords;
|
|
154
|
+
selectScenarioIds: typeof selectScenarioIds;
|
|
155
|
+
expandConfigForAgents: (config: EvalConfig, requestedAgents?: string[]) => ExecutableEvalConfig;
|
|
156
|
+
resolveRunSelectedAgents: (
|
|
157
|
+
config: EvalConfig,
|
|
158
|
+
requestedAgents?: string[]
|
|
159
|
+
) => string[] | undefined;
|
|
160
|
+
loadSnapshot: typeof loadSnapshot;
|
|
161
|
+
compareRunToSnapshot: typeof compareRunToSnapshot;
|
|
162
|
+
applySnapshotPolicyToRunResult: typeof applySnapshotPolicyToRunResult;
|
|
163
|
+
readLibraries: typeof readLibraries;
|
|
164
|
+
pickDefaultAssistantAgentName: typeof pickDefaultAssistantAgentName;
|
|
165
|
+
resolveAssistantAgentFromLibraries: typeof resolveAssistantAgentFromLibraries;
|
|
166
|
+
chatWithAgent: typeof chatWithAgent;
|
|
167
|
+
pkgVersion: string;
|
|
127
168
|
}
|
|
169
|
+
export interface AppRouteDeps
|
|
170
|
+
extends HttpDeps,
|
|
171
|
+
JobStreamDeps,
|
|
172
|
+
ToolAnalysisDeps,
|
|
173
|
+
OAuthDebuggerDeps,
|
|
174
|
+
ResultAssistantDeps,
|
|
175
|
+
ScenarioAssistantDeps,
|
|
176
|
+
SnapshotDeps,
|
|
177
|
+
ConfigDeps,
|
|
178
|
+
RunDeps {}
|
|
128
179
|
export type ToolAnalysisJobsMap = Map<string, ToolAnalysisJob>;
|
|
129
180
|
export type OAuthDebuggerSessionsMap = Map<string, OAuthDebuggerSession>;
|
|
130
181
|
export type OAuthRuntimeSessionsMap = Map<string, OAuthRuntimeSession>;
|
|
@@ -132,4 +183,4 @@ export type AssistantSessionsMap = Map<string, ScenarioAssistantSession>;
|
|
|
132
183
|
export type RunsResults = ResultsJson;
|
|
133
184
|
export type RunsList = RunSummary[];
|
|
134
185
|
export type ConfigRecords = ConfigRecord[];
|
|
135
|
-
//# sourceMappingURL=app-context.d.ts.map
|
|
186
|
+
//# sourceMappingURL=app-context.d.ts.map
|
|
@@ -3,4 +3,4 @@ export declare function asJson(res: ServerResponse, code: number, body: unknown)
|
|
|
3
3
|
export declare function asHtml(res: ServerResponse, code: number, body: string): void;
|
|
4
4
|
export declare function asText(res: ServerResponse, code: number, body: string): void;
|
|
5
5
|
export declare function parseBody(req: IncomingMessage): Promise<any>;
|
|
6
|
-
//# sourceMappingURL=http.d.ts.map
|
|
6
|
+
//# sourceMappingURL=http.d.ts.map
|