@a5c-ai/tasks-adapter 5.1.1-staging.52898ebfc24f
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/README.md +125 -0
- package/dist/auth/forge-interface.d.ts +67 -0
- package/dist/auth/forge-interface.d.ts.map +1 -0
- package/dist/auth/forge-interface.js +69 -0
- package/dist/auth/github-app.d.ts +64 -0
- package/dist/auth/github-app.d.ts.map +1 -0
- package/dist/auth/github-app.js +141 -0
- package/dist/auth/github-oauth.d.ts +27 -0
- package/dist/auth/github-oauth.d.ts.map +1 -0
- package/dist/auth/github-oauth.js +89 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +14 -0
- package/dist/auth/jwt.d.ts +24 -0
- package/dist/auth/jwt.d.ts.map +1 -0
- package/dist/auth/jwt.js +43 -0
- package/dist/auth/middleware.d.ts +22 -0
- package/dist/auth/middleware.d.ts.map +1 -0
- package/dist/auth/middleware.js +36 -0
- package/dist/auth/ssh-keys.d.ts +21 -0
- package/dist/auth/ssh-keys.d.ts.map +1 -0
- package/dist/auth/ssh-keys.js +59 -0
- package/dist/auth/types.d.ts +165 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +53 -0
- package/dist/backend.d.ts +248 -0
- package/dist/backend.d.ts.map +1 -0
- package/dist/backend.js +40 -0
- package/dist/backends/adapters.d.ts +99 -0
- package/dist/backends/adapters.d.ts.map +1 -0
- package/dist/backends/adapters.js +308 -0
- package/dist/backends/external-tracker.d.ts +133 -0
- package/dist/backends/external-tracker.d.ts.map +1 -0
- package/dist/backends/external-tracker.js +731 -0
- package/dist/backends/git-native.d.ts +69 -0
- package/dist/backends/git-native.d.ts.map +1 -0
- package/dist/backends/git-native.js +797 -0
- package/dist/backends/github-issues.d.ts +78 -0
- package/dist/backends/github-issues.d.ts.map +1 -0
- package/dist/backends/github-issues.js +806 -0
- package/dist/backends/index.d.ts +52 -0
- package/dist/backends/index.d.ts.map +1 -0
- package/dist/backends/index.js +151 -0
- package/dist/backends/server.d.ts +42 -0
- package/dist/backends/server.d.ts.map +1 -0
- package/dist/backends/server.js +305 -0
- package/dist/cli/auth-store.d.ts +49 -0
- package/dist/cli/auth-store.d.ts.map +1 -0
- package/dist/cli/auth-store.js +150 -0
- package/dist/cli/client-config.d.ts +10 -0
- package/dist/cli/client-config.d.ts.map +1 -0
- package/dist/cli/client-config.js +87 -0
- package/dist/cli/commands/ask.d.ts +3 -0
- package/dist/cli/commands/ask.d.ts.map +1 -0
- package/dist/cli/commands/ask.js +171 -0
- package/dist/cli/commands/auth.d.ts +3 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +510 -0
- package/dist/cli/commands/breakpoints.d.ts +3 -0
- package/dist/cli/commands/breakpoints.d.ts.map +1 -0
- package/dist/cli/commands/breakpoints.js +311 -0
- package/dist/cli/commands/responder-loop.d.ts +3 -0
- package/dist/cli/commands/responder-loop.d.ts.map +1 -0
- package/dist/cli/commands/responder-loop.js +78 -0
- package/dist/cli/commands/responders.d.ts +3 -0
- package/dist/cli/commands/responders.d.ts.map +1 -0
- package/dist/cli/commands/responders.js +157 -0
- package/dist/cli/commands/rules.d.ts +3 -0
- package/dist/cli/commands/rules.d.ts.map +1 -0
- package/dist/cli/commands/rules.js +105 -0
- package/dist/cli/commands/server.d.ts +3 -0
- package/dist/cli/commands/server.d.ts.map +1 -0
- package/dist/cli/commands/server.js +34 -0
- package/dist/cli/commands/tasks.d.ts +3 -0
- package/dist/cli/commands/tasks.d.ts.map +1 -0
- package/dist/cli/commands/tasks.js +281 -0
- package/dist/cli/commands/templates.d.ts +3 -0
- package/dist/cli/commands/templates.d.ts.map +1 -0
- package/dist/cli/commands/templates.js +100 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +9 -0
- package/dist/cli/output.d.ts +26 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +143 -0
- package/dist/cli/program.d.ts +6 -0
- package/dist/cli/program.d.ts.map +1 -0
- package/dist/cli/program.js +38 -0
- package/dist/cli/tasks-adapter.d.ts +3 -0
- package/dist/cli/tasks-adapter.d.ts.map +1 -0
- package/dist/cli/tasks-adapter.js +4 -0
- package/dist/client/answer-poller.d.ts +52 -0
- package/dist/client/answer-poller.d.ts.map +1 -0
- package/dist/client/answer-poller.js +200 -0
- package/dist/client/auth-client.d.ts +200 -0
- package/dist/client/auth-client.d.ts.map +1 -0
- package/dist/client/auth-client.js +309 -0
- package/dist/client/breakpoint-router.d.ts +45 -0
- package/dist/client/breakpoint-router.d.ts.map +1 -0
- package/dist/client/breakpoint-router.js +45 -0
- package/dist/client/index.d.ts +17 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +16 -0
- package/dist/client/profile-validator.d.ts +34 -0
- package/dist/client/profile-validator.d.ts.map +1 -0
- package/dist/client/profile-validator.js +89 -0
- package/dist/client/responder-client.d.ts +39 -0
- package/dist/client/responder-client.d.ts.map +1 -0
- package/dist/client/responder-client.js +72 -0
- package/dist/client/responder-matcher.d.ts +49 -0
- package/dist/client/responder-matcher.d.ts.map +1 -0
- package/dist/client/responder-matcher.js +226 -0
- package/dist/client/server-client.d.ts +124 -0
- package/dist/client/server-client.d.ts.map +1 -0
- package/dist/client/server-client.js +266 -0
- package/dist/client/timeout-manager.d.ts +47 -0
- package/dist/client/timeout-manager.d.ts.map +1 -0
- package/dist/client/timeout-manager.js +77 -0
- package/dist/config.d.ts +20 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +93 -0
- package/dist/harness/index.d.ts +4 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +2 -0
- package/dist/harness/interaction-provider.d.ts +71 -0
- package/dist/harness/interaction-provider.d.ts.map +1 -0
- package/dist/harness/interaction-provider.js +124 -0
- package/dist/harness/routing-rules.d.ts +7 -0
- package/dist/harness/routing-rules.d.ts.map +1 -0
- package/dist/harness/routing-rules.js +37 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/mcp/backend-resolver.d.ts +43 -0
- package/dist/mcp/backend-resolver.d.ts.map +1 -0
- package/dist/mcp/backend-resolver.js +111 -0
- package/dist/mcp/http-transport.d.ts +37 -0
- package/dist/mcp/http-transport.d.ts.map +1 -0
- package/dist/mcp/http-transport.js +103 -0
- package/dist/mcp/index.d.ts +16 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +12 -0
- package/dist/mcp/server.d.ts +20 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +259 -0
- package/dist/mcp/tools/answer-breakpoint.d.ts +32 -0
- package/dist/mcp/tools/answer-breakpoint.d.ts.map +1 -0
- package/dist/mcp/tools/answer-breakpoint.js +45 -0
- package/dist/mcp/tools/ask-breakpoint.d.ts +58 -0
- package/dist/mcp/tools/ask-breakpoint.d.ts.map +1 -0
- package/dist/mcp/tools/ask-breakpoint.js +78 -0
- package/dist/mcp/tools/check-status.d.ts +16 -0
- package/dist/mcp/tools/check-status.d.ts.map +1 -0
- package/dist/mcp/tools/check-status.js +18 -0
- package/dist/mcp/tools/claim-breakpoint.d.ts +18 -0
- package/dist/mcp/tools/claim-breakpoint.d.ts.map +1 -0
- package/dist/mcp/tools/claim-breakpoint.js +28 -0
- package/dist/mcp/tools/list-breakpoints.d.ts +16 -0
- package/dist/mcp/tools/list-breakpoints.d.ts.map +1 -0
- package/dist/mcp/tools/list-breakpoints.js +14 -0
- package/dist/mcp/tools/list-responders.d.ts +18 -0
- package/dist/mcp/tools/list-responders.d.ts.map +1 -0
- package/dist/mcp/tools/list-responders.js +37 -0
- package/dist/mcp/tools/native-tasks.d.ts +270 -0
- package/dist/mcp/tools/native-tasks.d.ts.map +1 -0
- package/dist/mcp/tools/native-tasks.js +481 -0
- package/dist/mcp/tools/poll-breakpoints.d.ts +18 -0
- package/dist/mcp/tools/poll-breakpoints.d.ts.map +1 -0
- package/dist/mcp/tools/poll-breakpoints.js +36 -0
- package/dist/mcp/tools/verify-answer.d.ts +16 -0
- package/dist/mcp/tools/verify-answer.d.ts.map +1 -0
- package/dist/mcp/tools/verify-answer.js +38 -0
- package/dist/proven/index.d.ts +5 -0
- package/dist/proven/index.d.ts.map +1 -0
- package/dist/proven/index.js +3 -0
- package/dist/proven/keys.d.ts +33 -0
- package/dist/proven/keys.d.ts.map +1 -0
- package/dist/proven/keys.js +117 -0
- package/dist/proven/sign.d.ts +16 -0
- package/dist/proven/sign.d.ts.map +1 -0
- package/dist/proven/sign.js +60 -0
- package/dist/proven/types.d.ts +26 -0
- package/dist/proven/types.d.ts.map +1 -0
- package/dist/proven/types.js +5 -0
- package/dist/proven/verify.d.ts +6 -0
- package/dist/proven/verify.d.ts.map +1 -0
- package/dist/proven/verify.js +58 -0
- package/dist/responders/types.d.ts +38 -0
- package/dist/responders/types.d.ts.map +1 -0
- package/dist/responders/types.js +1 -0
- package/dist/router.d.ts +51 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +200 -0
- package/dist/types.d.ts +7711 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +479 -0
- package/package.json +96 -0
- package/responder/README.md +42 -0
- package/responder/backend-responder.json +9 -0
- package/responder/devops-responder.json +9 -0
- package/responder/frontend-responder.json +9 -0
- package/responder/schema.json +89 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { ServerClient, ServerError } from "./server-client.js";
|
|
2
|
+
// -- AuthClient ---------------------------------------------------------------
|
|
3
|
+
/**
|
|
4
|
+
* Authenticated client that wraps ServerClient, automatically injecting
|
|
5
|
+
* Authorization headers and handling token refresh on 401 responses.
|
|
6
|
+
*/
|
|
7
|
+
export class AuthClient {
|
|
8
|
+
serverClient;
|
|
9
|
+
token;
|
|
10
|
+
refreshTokenValue;
|
|
11
|
+
tokenProvider;
|
|
12
|
+
onTokenRefresh;
|
|
13
|
+
constructor(options) {
|
|
14
|
+
this.serverClient = new ServerClient(options.serverUrl);
|
|
15
|
+
this.token = options.token ?? null;
|
|
16
|
+
this.refreshTokenValue = options.refreshToken ?? null;
|
|
17
|
+
this.tokenProvider = options.tokenProvider ?? null;
|
|
18
|
+
this.onTokenRefresh = options.onTokenRefresh ?? null;
|
|
19
|
+
}
|
|
20
|
+
// -- Auth state -------------------------------------------------------------
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if a token or token provider is available.
|
|
23
|
+
*/
|
|
24
|
+
isAuthenticated() {
|
|
25
|
+
return this.token !== null || this.tokenProvider !== null;
|
|
26
|
+
}
|
|
27
|
+
// -- Auth methods -----------------------------------------------------------
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the authenticated user's profile.
|
|
30
|
+
*/
|
|
31
|
+
async getUser() {
|
|
32
|
+
return this.authenticatedGet("/auth/me");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Exchange an OAuth authorization code for auth tokens.
|
|
36
|
+
*/
|
|
37
|
+
async login(code, codeVerifier) {
|
|
38
|
+
const body = { code };
|
|
39
|
+
if (codeVerifier) {
|
|
40
|
+
body.codeVerifier = codeVerifier;
|
|
41
|
+
}
|
|
42
|
+
const result = await this.serverClient.post("/auth/login", body);
|
|
43
|
+
this.token = result.accessToken;
|
|
44
|
+
this.refreshTokenValue = result.refreshToken;
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Log out, clearing local token state.
|
|
49
|
+
*/
|
|
50
|
+
async logout() {
|
|
51
|
+
try {
|
|
52
|
+
await this.authenticatedPost("/auth/logout", {});
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
this.token = null;
|
|
56
|
+
this.refreshTokenValue = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// -- Delegated breakpoint methods -------------------------------------------
|
|
60
|
+
/**
|
|
61
|
+
* List breakpoints with optional filters, authenticated.
|
|
62
|
+
*/
|
|
63
|
+
async listBreakpoints(filters) {
|
|
64
|
+
const qs = filters ? "?" + new URLSearchParams(filters).toString() : "";
|
|
65
|
+
return this.authenticatedGet(`/breakpoints${qs}`);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get a single breakpoint by ID, authenticated.
|
|
69
|
+
*/
|
|
70
|
+
async getBreakpoint(id) {
|
|
71
|
+
return this.authenticatedGet(`/breakpoints/${id}`);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Submit a new breakpoint, authenticated.
|
|
75
|
+
*/
|
|
76
|
+
async submitBreakpoint(text, context, routing, options) {
|
|
77
|
+
return this.authenticatedPost("/breakpoints", {
|
|
78
|
+
text,
|
|
79
|
+
context,
|
|
80
|
+
routing,
|
|
81
|
+
projectId: options.projectId,
|
|
82
|
+
repoId: options.repoId,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Submit an answer to a breakpoint, authenticated.
|
|
87
|
+
*/
|
|
88
|
+
async submitAnswer(breakpointId, answer) {
|
|
89
|
+
return this.authenticatedPost(`/breakpoints/${breakpointId}/answers`, answer);
|
|
90
|
+
}
|
|
91
|
+
async createBrowserSession(breakpointId, options) {
|
|
92
|
+
return this.authenticatedPost(`/breakpoints/${breakpointId}/browser-session`, {
|
|
93
|
+
mode: options?.mode ?? "same-user",
|
|
94
|
+
responderId: options?.responderId,
|
|
95
|
+
responderName: options?.responderName,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async getBreakpointSession(authToken) {
|
|
99
|
+
return this.serverClient.get(`/breakpoints/session/${authToken}`);
|
|
100
|
+
}
|
|
101
|
+
async submitSessionAnswer(authToken, answer) {
|
|
102
|
+
return this.serverClient.post(`/breakpoints/session/${authToken}/answer`, answer);
|
|
103
|
+
}
|
|
104
|
+
// -- SSH key methods --------------------------------------------------------
|
|
105
|
+
/**
|
|
106
|
+
* Generate a new SSH key pair on the server.
|
|
107
|
+
*/
|
|
108
|
+
async generateKey() {
|
|
109
|
+
return this.authenticatedPost("/keys/generate", {});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* List SSH keys associated with the authenticated user.
|
|
113
|
+
*/
|
|
114
|
+
async listKeys() {
|
|
115
|
+
return this.authenticatedGet("/keys");
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Push an SSH public key to a repository via pull request.
|
|
119
|
+
*/
|
|
120
|
+
async pushKey(keyId, owner, repo) {
|
|
121
|
+
return this.authenticatedPost(`/keys/${keyId}/push`, { owner, repo });
|
|
122
|
+
}
|
|
123
|
+
// -- Projects ---------------------------------------------------------------
|
|
124
|
+
/**
|
|
125
|
+
* List all projects the authenticated user has access to.
|
|
126
|
+
*/
|
|
127
|
+
async listProjects() {
|
|
128
|
+
return this.authenticatedGet("/projects");
|
|
129
|
+
}
|
|
130
|
+
async listTeams() {
|
|
131
|
+
return this.authenticatedGet("/teams");
|
|
132
|
+
}
|
|
133
|
+
async getTeam(id) {
|
|
134
|
+
return this.authenticatedGet(`/teams/${id}`);
|
|
135
|
+
}
|
|
136
|
+
async createTeam(name, description) {
|
|
137
|
+
return this.authenticatedPost("/teams", { name, description });
|
|
138
|
+
}
|
|
139
|
+
async listTeamProjects(teamId) {
|
|
140
|
+
return this.authenticatedGet(`/teams/${teamId}/projects`);
|
|
141
|
+
}
|
|
142
|
+
async inviteTeamMember(teamId, login) {
|
|
143
|
+
return this.authenticatedPost(`/teams/${teamId}/invitations`, { login });
|
|
144
|
+
}
|
|
145
|
+
async acceptTeamInvitation(token) {
|
|
146
|
+
return this.authenticatedPost(`/teams/invitations/${token}/accept`, {});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Find known users for project membership and sharing flows.
|
|
150
|
+
*/
|
|
151
|
+
async searchUsers(query, limit) {
|
|
152
|
+
const params = new URLSearchParams();
|
|
153
|
+
if (query)
|
|
154
|
+
params.set("q", query);
|
|
155
|
+
if (typeof limit === "number")
|
|
156
|
+
params.set("limit", String(limit));
|
|
157
|
+
const qs = params.toString();
|
|
158
|
+
return this.authenticatedGet(`/auth/users${qs ? `?${qs}` : ""}`);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Get a single project by ID.
|
|
162
|
+
*/
|
|
163
|
+
async getProject(id) {
|
|
164
|
+
return this.authenticatedGet(`/projects/${id}`);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Create a new project.
|
|
168
|
+
*/
|
|
169
|
+
async createProject(name, description, options) {
|
|
170
|
+
return this.authenticatedPost("/projects", {
|
|
171
|
+
name,
|
|
172
|
+
description,
|
|
173
|
+
teamId: options?.teamId,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Update an existing project.
|
|
178
|
+
*/
|
|
179
|
+
async updateProject(id, updates) {
|
|
180
|
+
return this.authenticatedPut(`/projects/${id}`, updates);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Delete a project by ID.
|
|
184
|
+
*/
|
|
185
|
+
async deleteProject(id) {
|
|
186
|
+
return this.authenticatedDelete(`/projects/${id}`);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Add a GitHub repository to a project.
|
|
190
|
+
*/
|
|
191
|
+
async addRepoToProject(projectId, repo) {
|
|
192
|
+
return this.authenticatedPost(`/projects/${projectId}/repos`, repo);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Remove a repository from a project.
|
|
196
|
+
*/
|
|
197
|
+
async removeRepoFromProject(projectId, repoId) {
|
|
198
|
+
return this.authenticatedDelete(`/projects/${projectId}/repos/${repoId}`);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* List breakpoints associated with a project.
|
|
202
|
+
*/
|
|
203
|
+
async listProjectBreakpoints(projectId) {
|
|
204
|
+
return this.authenticatedGet(`/projects/${projectId}/breakpoints`);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* List GitHub repositories available to the authenticated user.
|
|
208
|
+
*/
|
|
209
|
+
async listGitHubRepos() {
|
|
210
|
+
return this.authenticatedGet("/auth/github/repos");
|
|
211
|
+
}
|
|
212
|
+
// -- Internal helpers -------------------------------------------------------
|
|
213
|
+
/**
|
|
214
|
+
* Build the Authorization header from the current token or provider.
|
|
215
|
+
*/
|
|
216
|
+
async getAuthHeaders() {
|
|
217
|
+
let accessToken = this.token;
|
|
218
|
+
if (this.tokenProvider) {
|
|
219
|
+
accessToken = await this.tokenProvider();
|
|
220
|
+
this.token = accessToken;
|
|
221
|
+
}
|
|
222
|
+
if (!accessToken) {
|
|
223
|
+
return {};
|
|
224
|
+
}
|
|
225
|
+
return { Authorization: `Bearer ${accessToken}` };
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Attempt to refresh the access token using the stored refresh token.
|
|
229
|
+
*/
|
|
230
|
+
async refreshAccessToken() {
|
|
231
|
+
if (!this.refreshTokenValue) {
|
|
232
|
+
throw new ServerError(401, "Unauthorized", "No refresh token available");
|
|
233
|
+
}
|
|
234
|
+
const result = await this.serverClient.post("/auth/refresh", { refreshToken: this.refreshTokenValue });
|
|
235
|
+
this.token = result.accessToken;
|
|
236
|
+
this.refreshTokenValue = result.refreshToken;
|
|
237
|
+
if (this.onTokenRefresh) {
|
|
238
|
+
this.onTokenRefresh(result);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Perform an authenticated GET request with automatic 401 retry.
|
|
243
|
+
*/
|
|
244
|
+
async authenticatedGet(path) {
|
|
245
|
+
const headers = await this.getAuthHeaders();
|
|
246
|
+
try {
|
|
247
|
+
return await this.serverClient.get(path, headers);
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
if (err instanceof ServerError && err.status === 401 && this.refreshTokenValue) {
|
|
251
|
+
await this.refreshAccessToken();
|
|
252
|
+
const newHeaders = await this.getAuthHeaders();
|
|
253
|
+
return this.serverClient.get(path, newHeaders);
|
|
254
|
+
}
|
|
255
|
+
throw err;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Perform an authenticated POST request with automatic 401 retry.
|
|
260
|
+
*/
|
|
261
|
+
async authenticatedPost(path, body) {
|
|
262
|
+
const headers = await this.getAuthHeaders();
|
|
263
|
+
try {
|
|
264
|
+
return await this.serverClient.post(path, body, headers);
|
|
265
|
+
}
|
|
266
|
+
catch (err) {
|
|
267
|
+
if (err instanceof ServerError && err.status === 401 && this.refreshTokenValue) {
|
|
268
|
+
await this.refreshAccessToken();
|
|
269
|
+
const newHeaders = await this.getAuthHeaders();
|
|
270
|
+
return this.serverClient.post(path, body, newHeaders);
|
|
271
|
+
}
|
|
272
|
+
throw err;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Perform an authenticated PUT request with automatic 401 retry.
|
|
277
|
+
*/
|
|
278
|
+
async authenticatedPut(path, body) {
|
|
279
|
+
const headers = await this.getAuthHeaders();
|
|
280
|
+
try {
|
|
281
|
+
return await this.serverClient.put(path, body, headers);
|
|
282
|
+
}
|
|
283
|
+
catch (err) {
|
|
284
|
+
if (err instanceof ServerError && err.status === 401 && this.refreshTokenValue) {
|
|
285
|
+
await this.refreshAccessToken();
|
|
286
|
+
const newHeaders = await this.getAuthHeaders();
|
|
287
|
+
return this.serverClient.put(path, body, newHeaders);
|
|
288
|
+
}
|
|
289
|
+
throw err;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Perform an authenticated DELETE request with automatic 401 retry.
|
|
294
|
+
*/
|
|
295
|
+
async authenticatedDelete(path) {
|
|
296
|
+
const headers = await this.getAuthHeaders();
|
|
297
|
+
try {
|
|
298
|
+
return await this.serverClient.delete(path, headers);
|
|
299
|
+
}
|
|
300
|
+
catch (err) {
|
|
301
|
+
if (err instanceof ServerError && err.status === 401 && this.refreshTokenValue) {
|
|
302
|
+
await this.refreshAccessToken();
|
|
303
|
+
const newHeaders = await this.getAuthHeaders();
|
|
304
|
+
return this.serverClient.delete(path, newHeaders);
|
|
305
|
+
}
|
|
306
|
+
throw err;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Breakpoint, BreakpointContext, BreakpointRouting, BreakpointStrategy } from "../types.js";
|
|
2
|
+
import type { BreakpointBackend } from "../backend.js";
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating and submitting a breakpoint.
|
|
5
|
+
*/
|
|
6
|
+
export interface SubmitBreakpointOptions {
|
|
7
|
+
text: string;
|
|
8
|
+
context: BreakpointContext;
|
|
9
|
+
routing: BreakpointRouting;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
repoId?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Options for routing a breakpoint to responders.
|
|
15
|
+
*/
|
|
16
|
+
export interface RouteToRespondersOptions {
|
|
17
|
+
strategy: BreakpointStrategy;
|
|
18
|
+
timeoutMs: number;
|
|
19
|
+
presentToUser?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Orchestrates breakpoint creation and routing through a backend.
|
|
23
|
+
*/
|
|
24
|
+
export declare class BreakpointRouter {
|
|
25
|
+
private readonly backend;
|
|
26
|
+
constructor(backend: BreakpointBackend);
|
|
27
|
+
/**
|
|
28
|
+
* Create and submit a new breakpoint to the backend.
|
|
29
|
+
* Returns the created Breakpoint with its backend-assigned ID.
|
|
30
|
+
*/
|
|
31
|
+
submitBreakpoint(text: string, context: BreakpointContext, routing: BreakpointRouting, projectId?: string, repoId?: string): Promise<Breakpoint>;
|
|
32
|
+
/**
|
|
33
|
+
* Set up routing for a breakpoint, targeting specific responders.
|
|
34
|
+
*
|
|
35
|
+
* This is a convenience method that submits a breakpoint with
|
|
36
|
+
* the given responders pre-filled in the routing configuration.
|
|
37
|
+
*/
|
|
38
|
+
routeToResponders(breakpointText: string, context: BreakpointContext, responderIds: string[], options: RouteToRespondersOptions, projectId?: string, repoId?: string): Promise<Breakpoint>;
|
|
39
|
+
/**
|
|
40
|
+
* Generate a new unique breakpoint ID (client-side).
|
|
41
|
+
* Useful for pre-generating IDs before submission.
|
|
42
|
+
*/
|
|
43
|
+
generateBreakpointId(): string;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=breakpoint-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoint-router.d.ts","sourceRoot":"","sources":["../../src/client/breakpoint-router.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;gBAEhC,OAAO,EAAE,iBAAiB;IAItC;;;OAGG;IACG,gBAAgB,CACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,iBAAiB,EAC1B,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC;IAItB;;;;;OAKG;IACG,iBAAiB,CACrB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,iBAAiB,EAC1B,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,wBAAwB,EACjC,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC;IAiBtB;;;OAGG;IACH,oBAAoB,IAAI,MAAM;CAG/B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { generateBreakpointId } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Orchestrates breakpoint creation and routing through a backend.
|
|
4
|
+
*/
|
|
5
|
+
export class BreakpointRouter {
|
|
6
|
+
backend;
|
|
7
|
+
constructor(backend) {
|
|
8
|
+
this.backend = backend;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Create and submit a new breakpoint to the backend.
|
|
12
|
+
* Returns the created Breakpoint with its backend-assigned ID.
|
|
13
|
+
*/
|
|
14
|
+
async submitBreakpoint(text, context, routing, projectId, repoId) {
|
|
15
|
+
return this.backend.submitBreakpoint({ text, context, routing, projectId, repoId });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Set up routing for a breakpoint, targeting specific responders.
|
|
19
|
+
*
|
|
20
|
+
* This is a convenience method that submits a breakpoint with
|
|
21
|
+
* the given responders pre-filled in the routing configuration.
|
|
22
|
+
*/
|
|
23
|
+
async routeToResponders(breakpointText, context, responderIds, options, projectId, repoId) {
|
|
24
|
+
const routing = {
|
|
25
|
+
strategy: options.strategy,
|
|
26
|
+
targetResponders: responderIds,
|
|
27
|
+
timeoutMs: options.timeoutMs,
|
|
28
|
+
presentToUser: options.presentToUser ?? false,
|
|
29
|
+
};
|
|
30
|
+
return this.backend.submitBreakpoint({
|
|
31
|
+
text: breakpointText,
|
|
32
|
+
context,
|
|
33
|
+
routing,
|
|
34
|
+
projectId,
|
|
35
|
+
repoId,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generate a new unique breakpoint ID (client-side).
|
|
40
|
+
* Useful for pre-generating IDs before submission.
|
|
41
|
+
*/
|
|
42
|
+
generateBreakpointId() {
|
|
43
|
+
return generateBreakpointId();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { ServerClient, ServerError, DEFAULT_BMUX_SERVER_URL } from "./server-client.js";
|
|
2
|
+
export type { SSEStream, ServerClientOptions } from "./server-client.js";
|
|
3
|
+
export { AnswerPoller } from "./answer-poller.js";
|
|
4
|
+
export type { PollerWaitForAnswerOptions } from "./answer-poller.js";
|
|
5
|
+
export { ResponderMatcher } from "./responder-matcher.js";
|
|
6
|
+
export type { ScoredResponder, ResponderMatcherOptions } from "./responder-matcher.js";
|
|
7
|
+
export { BreakpointRouter } from "./breakpoint-router.js";
|
|
8
|
+
export type { SubmitBreakpointOptions, RouteToRespondersOptions } from "./breakpoint-router.js";
|
|
9
|
+
export { ResponderClient } from "./responder-client.js";
|
|
10
|
+
export type { BreakpointCallback } from "./responder-client.js";
|
|
11
|
+
export { AuthClient } from "./auth-client.js";
|
|
12
|
+
export type { AuthClientOptions, SSHKeyInfo } from "./auth-client.js";
|
|
13
|
+
export { TimeoutManager } from "./timeout-manager.js";
|
|
14
|
+
export type { TimeoutStatus, TimeoutCallback } from "./timeout-manager.js";
|
|
15
|
+
export { validateProfile, validateProfileFile, validateAllProfiles, } from "./profile-validator.js";
|
|
16
|
+
export type { ProfileValidationResult, DirectoryValidationResult, } from "./profile-validator.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACxF,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGhG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// -- Server Client ------------------------------------------------------------
|
|
2
|
+
export { ServerClient, ServerError, DEFAULT_BMUX_SERVER_URL } from "./server-client.js";
|
|
3
|
+
// -- Answer Poller ------------------------------------------------------------
|
|
4
|
+
export { AnswerPoller } from "./answer-poller.js";
|
|
5
|
+
// -- Responder Matcher --------------------------------------------------------
|
|
6
|
+
export { ResponderMatcher } from "./responder-matcher.js";
|
|
7
|
+
// -- Breakpoint Router --------------------------------------------------------
|
|
8
|
+
export { BreakpointRouter } from "./breakpoint-router.js";
|
|
9
|
+
// -- Responder Client ---------------------------------------------------------
|
|
10
|
+
export { ResponderClient } from "./responder-client.js";
|
|
11
|
+
// -- Auth Client --------------------------------------------------------------
|
|
12
|
+
export { AuthClient } from "./auth-client.js";
|
|
13
|
+
// -- Timeout Manager ----------------------------------------------------------
|
|
14
|
+
export { TimeoutManager } from "./timeout-manager.js";
|
|
15
|
+
// -- Profile Validator --------------------------------------------------------
|
|
16
|
+
export { validateProfile, validateProfileFile, validateAllProfiles, } from "./profile-validator.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ResponderProfile } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Result of validating a single profile.
|
|
4
|
+
*/
|
|
5
|
+
export interface ProfileValidationResult {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
filePath?: string;
|
|
8
|
+
profile?: ResponderProfile;
|
|
9
|
+
errors: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Result of validating all profiles in a directory.
|
|
13
|
+
*/
|
|
14
|
+
export interface DirectoryValidationResult {
|
|
15
|
+
valid: boolean;
|
|
16
|
+
results: ProfileValidationResult[];
|
|
17
|
+
totalProfiles: number;
|
|
18
|
+
validProfiles: number;
|
|
19
|
+
invalidProfiles: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Validate a profile object against the ResponderProfile Zod schema.
|
|
23
|
+
*/
|
|
24
|
+
export declare function validateProfile(profile: unknown): ProfileValidationResult;
|
|
25
|
+
/**
|
|
26
|
+
* Read a JSON profile file from disk and validate it against the ResponderProfile schema.
|
|
27
|
+
*/
|
|
28
|
+
export declare function validateProfileFile(filePath: string): Promise<ProfileValidationResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Validate all JSON profile files in a directory.
|
|
31
|
+
* Non-JSON files are ignored.
|
|
32
|
+
*/
|
|
33
|
+
export declare function validateAllProfiles(dir: string): Promise<DirectoryValidationResult>;
|
|
34
|
+
//# sourceMappingURL=profile-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-validator.d.ts","sourceRoot":"","sources":["../../src/client/profile-validator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,uBAAuB,CAazE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,uBAAuB,CAAC,CAuBlC;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,yBAAyB,CAAC,CAyCpC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
2
|
+
import { join, extname } from "node:path";
|
|
3
|
+
import { ResponderProfileSchema } from "../types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Validate a profile object against the ResponderProfile Zod schema.
|
|
6
|
+
*/
|
|
7
|
+
export function validateProfile(profile) {
|
|
8
|
+
const result = ResponderProfileSchema.safeParse(profile);
|
|
9
|
+
if (result.success) {
|
|
10
|
+
return {
|
|
11
|
+
valid: true,
|
|
12
|
+
profile: result.data,
|
|
13
|
+
errors: [],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
valid: false,
|
|
18
|
+
errors: result.error.message.split("; "),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Read a JSON profile file from disk and validate it against the ResponderProfile schema.
|
|
23
|
+
*/
|
|
24
|
+
export async function validateProfileFile(filePath) {
|
|
25
|
+
try {
|
|
26
|
+
const raw = await readFile(filePath, "utf-8");
|
|
27
|
+
let parsed;
|
|
28
|
+
try {
|
|
29
|
+
parsed = JSON.parse(raw);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return {
|
|
33
|
+
valid: false,
|
|
34
|
+
filePath,
|
|
35
|
+
errors: [`Failed to parse JSON in ${filePath}`],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const result = validateProfile(parsed);
|
|
39
|
+
result.filePath = filePath;
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return {
|
|
44
|
+
valid: false,
|
|
45
|
+
filePath,
|
|
46
|
+
errors: [`Failed to read file ${filePath}: ${err.message}`],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Validate all JSON profile files in a directory.
|
|
52
|
+
* Non-JSON files are ignored.
|
|
53
|
+
*/
|
|
54
|
+
export async function validateAllProfiles(dir) {
|
|
55
|
+
const results = [];
|
|
56
|
+
let entries;
|
|
57
|
+
try {
|
|
58
|
+
entries = await readdir(dir);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return {
|
|
62
|
+
valid: false,
|
|
63
|
+
results: [
|
|
64
|
+
{
|
|
65
|
+
valid: false,
|
|
66
|
+
errors: [`Directory not found or not readable: ${dir}`],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
totalProfiles: 0,
|
|
70
|
+
validProfiles: 0,
|
|
71
|
+
invalidProfiles: 0,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const jsonFiles = entries.filter((e) => extname(e).toLowerCase() === ".json" && e !== "schema.json");
|
|
75
|
+
for (const file of jsonFiles) {
|
|
76
|
+
const filePath = join(dir, file);
|
|
77
|
+
const result = await validateProfileFile(filePath);
|
|
78
|
+
results.push(result);
|
|
79
|
+
}
|
|
80
|
+
const validCount = results.filter((r) => r.valid).length;
|
|
81
|
+
const invalidCount = results.filter((r) => !r.valid).length;
|
|
82
|
+
return {
|
|
83
|
+
valid: invalidCount === 0 && results.length > 0,
|
|
84
|
+
results,
|
|
85
|
+
totalProfiles: results.length,
|
|
86
|
+
validProfiles: validCount,
|
|
87
|
+
invalidProfiles: invalidCount,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Breakpoint, BreakpointAnswer } from "../types.js";
|
|
2
|
+
import { ServerClient } from "./server-client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Callback invoked when new pending breakpoints are found.
|
|
5
|
+
*/
|
|
6
|
+
export type BreakpointCallback = (breakpoints: Breakpoint[]) => void | Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Client used by responders to receive, claim, and answer breakpoints.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ResponderClient {
|
|
11
|
+
private readonly client;
|
|
12
|
+
readonly responderId: string;
|
|
13
|
+
private pollingTimer;
|
|
14
|
+
constructor(client: ServerClient, responderId: string);
|
|
15
|
+
/**
|
|
16
|
+
* Fetch all pending breakpoints routed to this responder.
|
|
17
|
+
*/
|
|
18
|
+
fetchPendingBreakpoints(): Promise<Breakpoint[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Claim a breakpoint so no other responder can answer it.
|
|
21
|
+
*/
|
|
22
|
+
claimBreakpoint(breakpointId: string): Promise<Breakpoint>;
|
|
23
|
+
/**
|
|
24
|
+
* Submit an answer to a claimed breakpoint.
|
|
25
|
+
*/
|
|
26
|
+
submitAnswer(breakpointId: string, text: string, confidence?: number, references?: string[]): Promise<BreakpointAnswer>;
|
|
27
|
+
/**
|
|
28
|
+
* Start a polling loop that periodically checks for new pending breakpoints
|
|
29
|
+
* and invokes the callback when breakpoints are found.
|
|
30
|
+
*
|
|
31
|
+
* Returns a function to stop the loop.
|
|
32
|
+
*/
|
|
33
|
+
startPollingLoop(callback: BreakpointCallback, intervalMs?: number): () => void;
|
|
34
|
+
/**
|
|
35
|
+
* Stop the current polling loop if running.
|
|
36
|
+
*/
|
|
37
|
+
stopPollingLoop(): void;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=responder-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responder-client.d.ts","sourceRoot":"","sources":["../../src/client/responder-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAErF;;GAEG;AACH,qBAAa,eAAe;IAIxB,OAAO,CAAC,QAAQ,CAAC,MAAM;aACP,WAAW,EAAE,MAAM;IAJrC,OAAO,CAAC,YAAY,CAA+C;gBAGhD,MAAM,EAAE,YAAY,EACrB,WAAW,EAAE,MAAM;IAGrC;;OAEG;IACG,uBAAuB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAItD;;OAEG;IACG,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAIhE;;OAEG;IACG,YAAY,CAChB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,EACZ,UAAU,SAAK,EACf,UAAU,GAAE,MAAM,EAAO,GACxB,OAAO,CAAC,gBAAgB,CAAC;IAU5B;;;;;OAKG;IACH,gBAAgB,CACd,QAAQ,EAAE,kBAAkB,EAC5B,UAAU,GAAE,MAAiC,GAC5C,MAAM,IAAI;IAuBb;;OAEG;IACH,eAAe,IAAI,IAAI;CAMxB"}
|