@principal-ai/control-tower-core 0.2.1 → 0.3.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/dist/client/BaseClient.d.ts +23 -0
- package/dist/client/BaseClient.d.ts.map +1 -1
- package/dist/client/BaseClient.js +60 -0
- package/dist/client/PresenceClient.d.ts +43 -8
- package/dist/client/PresenceClient.d.ts.map +1 -1
- package/dist/client/PresenceClient.js +72 -18
- package/dist/generated/client-connection-auth.types.d.ts +312 -0
- package/dist/generated/client-connection-auth.types.d.ts.map +1 -0
- package/dist/generated/client-connection-auth.types.js +11 -0
- package/dist/generated/control-tower-execution.types.d.ts +445 -0
- package/dist/generated/control-tower-execution.types.d.ts.map +1 -0
- package/dist/generated/control-tower-execution.types.js +11 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +6 -6
- package/dist/index.mjs +94 -7
- package/dist/index.mjs.map +6 -6
- package/dist/server/BaseServer.d.ts +18 -1
- package/dist/server/BaseServer.d.ts.map +1 -1
- package/dist/server/BaseServer.js +15 -1
- package/dist/server/ServerBuilder.d.ts +22 -1
- package/dist/server/ServerBuilder.d.ts.map +1 -1
- package/dist/server/ServerBuilder.js +24 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/telemetry/EventValidationIntegration.d.ts +135 -0
- package/dist/telemetry/EventValidationIntegration.d.ts.map +1 -0
- package/dist/telemetry/EventValidationIntegration.js +253 -0
- package/dist/telemetry/EventValidationIntegration.test.d.ts +7 -0
- package/dist/telemetry/EventValidationIntegration.test.d.ts.map +1 -0
- package/dist/telemetry/EventValidationIntegration.test.js +322 -0
- package/dist/telemetry/TelemetryCapture.d.ts +268 -0
- package/dist/telemetry/TelemetryCapture.d.ts.map +1 -0
- package/dist/telemetry/TelemetryCapture.js +263 -0
- package/dist/telemetry/TelemetryCapture.test.d.ts +7 -0
- package/dist/telemetry/TelemetryCapture.test.d.ts.map +1 -0
- package/dist/telemetry/TelemetryCapture.test.js +396 -0
- package/dist/telemetry-example.d.ts +33 -0
- package/dist/telemetry-example.d.ts.map +1 -0
- package/dist/telemetry-example.js +124 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/presence.d.ts +69 -0
- package/dist/types/presence.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -78,6 +78,7 @@ export declare class BaseClient extends TypedEventEmitter<ClientEvents> {
|
|
|
78
78
|
private reconnectTimer;
|
|
79
79
|
private lastConnectionUrl;
|
|
80
80
|
private lastToken;
|
|
81
|
+
private pendingRequests;
|
|
81
82
|
constructor(config: ClientConfig);
|
|
82
83
|
/**
|
|
83
84
|
* Connect to the server with an optional authentication token.
|
|
@@ -105,6 +106,28 @@ export declare class BaseClient extends TypedEventEmitter<ClientEvents> {
|
|
|
105
106
|
broadcast(event: Event): Promise<void>;
|
|
106
107
|
requestLock(request: LockRequest): Promise<void>;
|
|
107
108
|
releaseLock(lockId: string): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Send a request message and wait for a response.
|
|
111
|
+
*
|
|
112
|
+
* This enables request/response patterns over WebSocket by correlating
|
|
113
|
+
* the response message with the request via the message ID.
|
|
114
|
+
*
|
|
115
|
+
* @param type The message type to send
|
|
116
|
+
* @param payload The message payload
|
|
117
|
+
* @param timeoutMs Timeout in milliseconds (default: 5000)
|
|
118
|
+
* @returns Promise that resolves with the response payload
|
|
119
|
+
* @throws Error if the request times out or the client is not connected
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const response = await client.request<PresenceGetUsersResponse>(
|
|
124
|
+
* 'presence:get_users',
|
|
125
|
+
* {}
|
|
126
|
+
* );
|
|
127
|
+
* console.log(response.users);
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
request<T>(type: string, payload: unknown, timeoutMs?: number): Promise<T>;
|
|
108
131
|
getConnectionState(): ConnectionState;
|
|
109
132
|
getRoomState(): RoomState | null;
|
|
110
133
|
getPresence(): RoomUser[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../src/client/BaseClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,EACX,mBAAmB,EAGnB,eAAe,EACf,KAAK,EACL,IAAI,EACJ,WAAW,EAEX,SAAS,EACT,QAAQ,EACR,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,YAAY,CAAC,EAAE;QACd,OAAO,EAAE,OAAO,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;KACtB,CAAC;CACF;AAED,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,aAAa,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,qBAAqB,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,YAAY,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CA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request/response tracking for request() method
|
|
20
|
+
this.pendingRequests = new Map();
|
|
19
21
|
this.config = config;
|
|
20
22
|
this.transport = config.transport;
|
|
21
23
|
this.auth = config.auth;
|
|
@@ -222,6 +224,56 @@ class BaseClient extends EventEmitter_js_1.TypedEventEmitter {
|
|
|
222
224
|
};
|
|
223
225
|
await this.transport.send(message);
|
|
224
226
|
}
|
|
227
|
+
// Request/Response Pattern
|
|
228
|
+
/**
|
|
229
|
+
* Send a request message and wait for a response.
|
|
230
|
+
*
|
|
231
|
+
* This enables request/response patterns over WebSocket by correlating
|
|
232
|
+
* the response message with the request via the message ID.
|
|
233
|
+
*
|
|
234
|
+
* @param type The message type to send
|
|
235
|
+
* @param payload The message payload
|
|
236
|
+
* @param timeoutMs Timeout in milliseconds (default: 5000)
|
|
237
|
+
* @returns Promise that resolves with the response payload
|
|
238
|
+
* @throws Error if the request times out or the client is not connected
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```typescript
|
|
242
|
+
* const response = await client.request<PresenceGetUsersResponse>(
|
|
243
|
+
* 'presence:get_users',
|
|
244
|
+
* {}
|
|
245
|
+
* );
|
|
246
|
+
* console.log(response.users);
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
async request(type, payload, timeoutMs = 5000) {
|
|
250
|
+
if (this.connectionState !== "connected") {
|
|
251
|
+
throw new Error("Client must be connected to send requests");
|
|
252
|
+
}
|
|
253
|
+
const id = this.generateId();
|
|
254
|
+
const message = {
|
|
255
|
+
id,
|
|
256
|
+
type,
|
|
257
|
+
payload,
|
|
258
|
+
timestamp: Date.now(),
|
|
259
|
+
};
|
|
260
|
+
return new Promise((resolve, reject) => {
|
|
261
|
+
const timeout = setTimeout(() => {
|
|
262
|
+
this.pendingRequests.delete(id);
|
|
263
|
+
reject(new Error(`Request '${type}' timed out after ${timeoutMs}ms`));
|
|
264
|
+
}, timeoutMs);
|
|
265
|
+
this.pendingRequests.set(id, {
|
|
266
|
+
resolve: resolve,
|
|
267
|
+
reject,
|
|
268
|
+
timeout,
|
|
269
|
+
});
|
|
270
|
+
this.transport.send(message).catch((error) => {
|
|
271
|
+
this.pendingRequests.delete(id);
|
|
272
|
+
clearTimeout(timeout);
|
|
273
|
+
reject(error);
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
}
|
|
225
277
|
// State Getters
|
|
226
278
|
getConnectionState() {
|
|
227
279
|
return this.connectionState;
|
|
@@ -242,6 +294,14 @@ class BaseClient extends EventEmitter_js_1.TypedEventEmitter {
|
|
|
242
294
|
}
|
|
243
295
|
// Private Methods
|
|
244
296
|
async handleMessage(message) {
|
|
297
|
+
// Check for pending request response (matched by message id)
|
|
298
|
+
if (message.id && this.pendingRequests.has(message.id)) {
|
|
299
|
+
const pending = this.pendingRequests.get(message.id);
|
|
300
|
+
clearTimeout(pending.timeout);
|
|
301
|
+
this.pendingRequests.delete(message.id);
|
|
302
|
+
pending.resolve(message.payload);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
245
305
|
try {
|
|
246
306
|
switch (message.type) {
|
|
247
307
|
case "auth_result":
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Automatically handles connection, authentication, and presence event forwarding.
|
|
6
6
|
*/
|
|
7
7
|
import { TypedEventEmitter } from "../abstractions/EventEmitter.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { SerializableUserPresence } from "../types/presence.js";
|
|
9
9
|
import { BaseClient, type ClientConfig } from "./BaseClient.js";
|
|
10
10
|
export interface PresenceClientConfig {
|
|
11
11
|
/**
|
|
@@ -118,23 +118,58 @@ export declare class PresenceClient extends TypedEventEmitter<PresenceClientEven
|
|
|
118
118
|
*/
|
|
119
119
|
disconnect(): Promise<void>;
|
|
120
120
|
/**
|
|
121
|
-
* Get all online users
|
|
121
|
+
* Get all online users with their presence data
|
|
122
122
|
*
|
|
123
|
-
*
|
|
123
|
+
* @returns Array of user presence objects
|
|
124
124
|
*/
|
|
125
|
-
getOnlineUsers(): Promise<
|
|
125
|
+
getOnlineUsers(): Promise<SerializableUserPresence[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Get presence information for a specific user
|
|
128
|
+
*
|
|
129
|
+
* @param userId The user ID to look up
|
|
130
|
+
* @returns User presence or null if not found
|
|
131
|
+
*/
|
|
132
|
+
getUserPresence(userId: string): Promise<SerializableUserPresence | null>;
|
|
133
|
+
/**
|
|
134
|
+
* Get all users in a specific repository
|
|
135
|
+
*
|
|
136
|
+
* @param owner Repository owner
|
|
137
|
+
* @param repo Repository name
|
|
138
|
+
* @returns Array of user presence objects
|
|
139
|
+
*/
|
|
140
|
+
getRepoUsers(owner: string, repo: string): Promise<SerializableUserPresence[]>;
|
|
126
141
|
/**
|
|
127
142
|
* Set user status
|
|
128
143
|
*
|
|
129
|
-
*
|
|
144
|
+
* @param status The status to set ('online' or 'away')
|
|
145
|
+
* @param statusMessage Optional status message
|
|
130
146
|
*/
|
|
131
|
-
setStatus(status: "online" | "away",
|
|
147
|
+
setStatus(status: "online" | "away", statusMessage?: string): Promise<void>;
|
|
132
148
|
/**
|
|
133
|
-
* Set visibility
|
|
149
|
+
* Set visibility (invisible/lurker mode)
|
|
134
150
|
*
|
|
135
|
-
*
|
|
151
|
+
* @param visible Whether the user should be visible to others
|
|
136
152
|
*/
|
|
137
153
|
setVisibility(visible: boolean): Promise<void>;
|
|
154
|
+
/**
|
|
155
|
+
* Report that a repository was opened
|
|
156
|
+
*
|
|
157
|
+
* @param repoId Repository ID (format: "owner/repo")
|
|
158
|
+
* @param branch Branch name
|
|
159
|
+
*/
|
|
160
|
+
reportRepoOpened(repoId: string, branch: string): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Report that a repository was closed
|
|
163
|
+
*
|
|
164
|
+
* @param repoId Repository ID (format: "owner/repo")
|
|
165
|
+
*/
|
|
166
|
+
reportRepoClosed(repoId: string): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Report that a repository is now focused/active
|
|
169
|
+
*
|
|
170
|
+
* @param repoId Repository ID (format: "owner/repo")
|
|
171
|
+
*/
|
|
172
|
+
reportRepoFocused(repoId: string): Promise<void>;
|
|
138
173
|
/**
|
|
139
174
|
* Get the underlying BaseClient
|
|
140
175
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresenceClient.d.ts","sourceRoot":"","sources":["../../src/client/PresenceClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PresenceClient.d.ts","sourceRoot":"","sources":["../../src/client/PresenceClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAKX,wBAAwB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,WAAW,oBAAoB;IACpC;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IAEnD;;OAEG;IACH,WAAW,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAEhC;;OAEG;IACH,aAAa,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CA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;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrD;;;;OAIG;IACG,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUtD;;OAEG;IACH,SAAS,IAAI,UAAU;IAIvB;;OAEG;IACH,WAAW,IAAI,OAAO;IAMtB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;CAwD5B"}
|
|
@@ -92,37 +92,91 @@ class PresenceClient extends EventEmitter_js_1.TypedEventEmitter {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
* Get all online users
|
|
95
|
+
* Get all online users with their presence data
|
|
96
96
|
*
|
|
97
|
-
*
|
|
97
|
+
* @returns Array of user presence objects
|
|
98
98
|
*/
|
|
99
99
|
async getOnlineUsers() {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
const response = await this.client.request("presence:get_users", {});
|
|
101
|
+
return response.users;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get presence information for a specific user
|
|
105
|
+
*
|
|
106
|
+
* @param userId The user ID to look up
|
|
107
|
+
* @returns User presence or null if not found
|
|
108
|
+
*/
|
|
109
|
+
async getUserPresence(userId) {
|
|
110
|
+
const response = await this.client.request("presence:get_user", { userId });
|
|
111
|
+
return response.user;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Get all users in a specific repository
|
|
115
|
+
*
|
|
116
|
+
* @param owner Repository owner
|
|
117
|
+
* @param repo Repository name
|
|
118
|
+
* @returns Array of user presence objects
|
|
119
|
+
*/
|
|
120
|
+
async getRepoUsers(owner, repo) {
|
|
121
|
+
const response = await this.client.request("presence:get_repo_users", { owner, repo });
|
|
122
|
+
return response.users;
|
|
104
123
|
}
|
|
105
124
|
/**
|
|
106
125
|
* Set user status
|
|
107
126
|
*
|
|
108
|
-
*
|
|
127
|
+
* @param status The status to set ('online' or 'away')
|
|
128
|
+
* @param statusMessage Optional status message
|
|
109
129
|
*/
|
|
110
|
-
async setStatus(status,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
130
|
+
async setStatus(status, statusMessage) {
|
|
131
|
+
const response = await this.client.request("presence:set_status", { status, statusMessage });
|
|
132
|
+
if (!response.success) {
|
|
133
|
+
throw new Error(response.error || "Failed to set status");
|
|
134
|
+
}
|
|
115
135
|
}
|
|
116
136
|
/**
|
|
117
|
-
* Set visibility
|
|
137
|
+
* Set visibility (invisible/lurker mode)
|
|
118
138
|
*
|
|
119
|
-
*
|
|
139
|
+
* @param visible Whether the user should be visible to others
|
|
120
140
|
*/
|
|
121
141
|
async setVisibility(visible) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
142
|
+
const response = await this.client.request("presence:set_visibility", { visible });
|
|
143
|
+
if (!response.success) {
|
|
144
|
+
throw new Error(response.error || "Failed to set visibility");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Report that a repository was opened
|
|
149
|
+
*
|
|
150
|
+
* @param repoId Repository ID (format: "owner/repo")
|
|
151
|
+
* @param branch Branch name
|
|
152
|
+
*/
|
|
153
|
+
async reportRepoOpened(repoId, branch) {
|
|
154
|
+
const response = await this.client.request("presence:repo_open", { repoId, branch });
|
|
155
|
+
if (!response.success) {
|
|
156
|
+
throw new Error(response.error || "Failed to report repo opened");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Report that a repository was closed
|
|
161
|
+
*
|
|
162
|
+
* @param repoId Repository ID (format: "owner/repo")
|
|
163
|
+
*/
|
|
164
|
+
async reportRepoClosed(repoId) {
|
|
165
|
+
const response = await this.client.request("presence:repo_close", { repoId });
|
|
166
|
+
if (!response.success) {
|
|
167
|
+
throw new Error(response.error || "Failed to report repo closed");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Report that a repository is now focused/active
|
|
172
|
+
*
|
|
173
|
+
* @param repoId Repository ID (format: "owner/repo")
|
|
174
|
+
*/
|
|
175
|
+
async reportRepoFocused(repoId) {
|
|
176
|
+
const response = await this.client.request("presence:repo_focus", { repoId });
|
|
177
|
+
if (!response.success) {
|
|
178
|
+
throw new Error(response.error || "Failed to report repo focused");
|
|
179
|
+
}
|
|
126
180
|
}
|
|
127
181
|
/**
|
|
128
182
|
* Get the underlying BaseClient
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated types from canvas: Client Connection and Authentication Flow
|
|
3
|
+
*
|
|
4
|
+
* DO NOT EDIT MANUALLY - This file is auto-generated
|
|
5
|
+
* Generated by @principal-ai/principal-view-core
|
|
6
|
+
*
|
|
7
|
+
* Canvas: Telemetry instrumentation for client WebSocket connection, message validation, and authentication flow through Control Tower
|
|
8
|
+
* Version: 1.0.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Event types for node: websocket-adapter
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace WebsocketAdapter {
|
|
14
|
+
/**
|
|
15
|
+
* New WebSocket connection received
|
|
16
|
+
*/
|
|
17
|
+
interface ConnectionReceived {
|
|
18
|
+
name: 'connection.received';
|
|
19
|
+
attributes: {
|
|
20
|
+
/** Unique connection identifier */
|
|
21
|
+
'connection.id': string;
|
|
22
|
+
/** Origin header from connection */
|
|
23
|
+
'connection.origin'?: string;
|
|
24
|
+
/** WebSocket protocol version */
|
|
25
|
+
'connection.protocol'?: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* WebSocket connection successfully established
|
|
30
|
+
*/
|
|
31
|
+
interface ConnectionEstablished {
|
|
32
|
+
name: 'connection.established';
|
|
33
|
+
attributes: {
|
|
34
|
+
'connection.id': string;
|
|
35
|
+
/** Transport type (websocket, mock) */
|
|
36
|
+
'transport.type': string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* WebSocket connection rejected
|
|
41
|
+
*/
|
|
42
|
+
interface ConnectionRejected {
|
|
43
|
+
name: 'connection.rejected';
|
|
44
|
+
attributes: {
|
|
45
|
+
'connection.id': string;
|
|
46
|
+
/** Reason for rejection */
|
|
47
|
+
'rejection.reason': string;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Union of all event types for websocket-adapter
|
|
52
|
+
*/
|
|
53
|
+
type Event = ConnectionReceived | ConnectionEstablished | ConnectionRejected;
|
|
54
|
+
/**
|
|
55
|
+
* Literal union of event names for websocket-adapter
|
|
56
|
+
*/
|
|
57
|
+
type EventName = 'connection.received' | 'connection.established' | 'connection.rejected';
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Event types for node: server
|
|
61
|
+
*/
|
|
62
|
+
export declare namespace Server {
|
|
63
|
+
/**
|
|
64
|
+
* Client connection registered with server
|
|
65
|
+
*/
|
|
66
|
+
interface ClientConnected {
|
|
67
|
+
name: 'client.connected';
|
|
68
|
+
attributes: {
|
|
69
|
+
/** Unique client identifier */
|
|
70
|
+
'client.id': string;
|
|
71
|
+
/** Transport adapter type */
|
|
72
|
+
'transport.type': string;
|
|
73
|
+
/** Unix timestamp of connection */
|
|
74
|
+
'connection.timestamp': number;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Client connected but not yet authenticated
|
|
79
|
+
*/
|
|
80
|
+
interface ClientAwaiting_auth {
|
|
81
|
+
name: 'client.awaiting_auth';
|
|
82
|
+
attributes: {
|
|
83
|
+
'client.id': string;
|
|
84
|
+
/** Authentication timeout period */
|
|
85
|
+
'auth.timeout_ms'?: number;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Union of all event types for server
|
|
90
|
+
*/
|
|
91
|
+
type Event = ClientConnected | ClientAwaiting_auth;
|
|
92
|
+
/**
|
|
93
|
+
* Literal union of event names for server
|
|
94
|
+
*/
|
|
95
|
+
type EventName = 'client.connected' | 'client.awaiting_auth';
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Event types for node: message-handler
|
|
99
|
+
*/
|
|
100
|
+
export declare namespace MessageHandler {
|
|
101
|
+
/**
|
|
102
|
+
* Message received from client
|
|
103
|
+
*/
|
|
104
|
+
interface MessageReceived {
|
|
105
|
+
name: 'message.received';
|
|
106
|
+
attributes: {
|
|
107
|
+
'client.id': string;
|
|
108
|
+
/** Message type (authenticate, join_room, etc.) */
|
|
109
|
+
'message.type': string;
|
|
110
|
+
/** Message payload size in bytes */
|
|
111
|
+
'message.size_bytes'?: number;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Message passed schema validation
|
|
116
|
+
*/
|
|
117
|
+
interface MessageValidated {
|
|
118
|
+
name: 'message.validated';
|
|
119
|
+
attributes: {
|
|
120
|
+
'client.id': string;
|
|
121
|
+
'message.type': string;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Message failed schema validation
|
|
126
|
+
*/
|
|
127
|
+
interface MessageValidation_failed {
|
|
128
|
+
name: 'message.validation_failed';
|
|
129
|
+
attributes: {
|
|
130
|
+
'client.id': string;
|
|
131
|
+
'message.type': string;
|
|
132
|
+
/** Validation error message */
|
|
133
|
+
'validation.error': string;
|
|
134
|
+
/** Field that failed validation */
|
|
135
|
+
'validation.field'?: string;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Union of all event types for message-handler
|
|
140
|
+
*/
|
|
141
|
+
type Event = MessageReceived | MessageValidated | MessageValidation_failed;
|
|
142
|
+
/**
|
|
143
|
+
* Literal union of event names for message-handler
|
|
144
|
+
*/
|
|
145
|
+
type EventName = 'message.received' | 'message.validated' | 'message.validation_failed';
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Event types for node: auth-adapter
|
|
149
|
+
*/
|
|
150
|
+
export declare namespace AuthAdapter {
|
|
151
|
+
/**
|
|
152
|
+
* Authentication validation begins
|
|
153
|
+
*/
|
|
154
|
+
interface AuthValidation_started {
|
|
155
|
+
name: 'auth.validation_started';
|
|
156
|
+
attributes: {
|
|
157
|
+
'client.id': string;
|
|
158
|
+
/** Authentication method (token, password, etc.) */
|
|
159
|
+
'auth.method'?: string;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Authentication validation succeeded
|
|
164
|
+
*/
|
|
165
|
+
interface AuthValidation_success {
|
|
166
|
+
name: 'auth.validation_success';
|
|
167
|
+
attributes: {
|
|
168
|
+
'client.id': string;
|
|
169
|
+
/** Authenticated user identifier */
|
|
170
|
+
'user.id': string;
|
|
171
|
+
'auth.method'?: string;
|
|
172
|
+
/** Time taken to validate */
|
|
173
|
+
'validation.duration_ms'?: number;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Authentication validation failed
|
|
178
|
+
*/
|
|
179
|
+
interface AuthValidation_failed {
|
|
180
|
+
name: 'auth.validation_failed';
|
|
181
|
+
attributes: {
|
|
182
|
+
'client.id': string;
|
|
183
|
+
/** Error code (invalid_token, expired, etc.) */
|
|
184
|
+
'auth.error_code': string;
|
|
185
|
+
/** Human-readable error message */
|
|
186
|
+
'auth.error_message': string;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Union of all event types for auth-adapter
|
|
191
|
+
*/
|
|
192
|
+
type Event = AuthValidation_started | AuthValidation_success | AuthValidation_failed;
|
|
193
|
+
/**
|
|
194
|
+
* Literal union of event names for auth-adapter
|
|
195
|
+
*/
|
|
196
|
+
type EventName = 'auth.validation_started' | 'auth.validation_success' | 'auth.validation_failed';
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Event types for node: client-lifecycle
|
|
200
|
+
*/
|
|
201
|
+
export declare namespace ClientLifecycle {
|
|
202
|
+
/**
|
|
203
|
+
* Client state transition occurred
|
|
204
|
+
*/
|
|
205
|
+
interface ClientState_changed {
|
|
206
|
+
name: 'client.state_changed';
|
|
207
|
+
attributes: {
|
|
208
|
+
'client.id': string;
|
|
209
|
+
/** Previous state (connected, authenticating, authenticated) */
|
|
210
|
+
'state.from': string;
|
|
211
|
+
/** New state */
|
|
212
|
+
'state.to': string;
|
|
213
|
+
/** Time spent in previous state */
|
|
214
|
+
'state.duration_ms'?: number;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Client successfully authenticated and ready
|
|
219
|
+
*/
|
|
220
|
+
interface ClientAuthenticated {
|
|
221
|
+
name: 'client.authenticated';
|
|
222
|
+
attributes: {
|
|
223
|
+
'client.id': string;
|
|
224
|
+
'user.id': string;
|
|
225
|
+
/** Total time from connection to authentication */
|
|
226
|
+
'connection.total_duration_ms'?: number;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Client failed to authenticate within timeout period
|
|
231
|
+
*/
|
|
232
|
+
interface ClientAuth_timeout {
|
|
233
|
+
name: 'client.auth_timeout';
|
|
234
|
+
attributes: {
|
|
235
|
+
'client.id': string;
|
|
236
|
+
/** Configured timeout duration */
|
|
237
|
+
'timeout.duration_ms': number;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Client connection terminated
|
|
242
|
+
*/
|
|
243
|
+
interface ClientDisconnected {
|
|
244
|
+
name: 'client.disconnected';
|
|
245
|
+
attributes: {
|
|
246
|
+
'client.id': string;
|
|
247
|
+
/** Reason for disconnection */
|
|
248
|
+
'disconnect.reason'?: string;
|
|
249
|
+
/** Total session duration */
|
|
250
|
+
'session.total_duration_ms'?: number;
|
|
251
|
+
/** Whether client had completed authentication */
|
|
252
|
+
'client.was_authenticated': boolean;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Union of all event types for client-lifecycle
|
|
257
|
+
*/
|
|
258
|
+
type Event = ClientState_changed | ClientAuthenticated | ClientAuth_timeout | ClientDisconnected;
|
|
259
|
+
/**
|
|
260
|
+
* Literal union of event names for client-lifecycle
|
|
261
|
+
*/
|
|
262
|
+
type EventName = 'client.state_changed' | 'client.authenticated' | 'client.auth_timeout' | 'client.disconnected';
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Event types for node: client-response
|
|
266
|
+
*/
|
|
267
|
+
export declare namespace ClientResponse {
|
|
268
|
+
/**
|
|
269
|
+
* Response message sent to client
|
|
270
|
+
*/
|
|
271
|
+
interface ResponseSent {
|
|
272
|
+
name: 'response.sent';
|
|
273
|
+
attributes: {
|
|
274
|
+
'client.id': string;
|
|
275
|
+
/** Response message type (authenticated, error) */
|
|
276
|
+
'response.type': string;
|
|
277
|
+
/** Response payload size */
|
|
278
|
+
'response.size_bytes'?: number;
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Failed to send response to client
|
|
283
|
+
*/
|
|
284
|
+
interface ResponseSend_failed {
|
|
285
|
+
name: 'response.send_failed';
|
|
286
|
+
attributes: {
|
|
287
|
+
'client.id': string;
|
|
288
|
+
/** Error that occurred during send */
|
|
289
|
+
'error.message': string;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Union of all event types for client-response
|
|
294
|
+
*/
|
|
295
|
+
type Event = ResponseSent | ResponseSend_failed;
|
|
296
|
+
/**
|
|
297
|
+
* Literal union of event names for client-response
|
|
298
|
+
*/
|
|
299
|
+
type EventName = 'response.sent' | 'response.send_failed';
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Helper type for creating event emitters by name
|
|
303
|
+
*/
|
|
304
|
+
export type NodeEmitterByName<T extends {
|
|
305
|
+
name: string;
|
|
306
|
+
attributes: any;
|
|
307
|
+
}> = {
|
|
308
|
+
[K in T['name']]: (eventName: K, attributes: Extract<T, {
|
|
309
|
+
name: K;
|
|
310
|
+
}>['attributes']) => void;
|
|
311
|
+
}[T['name']];
|
|
312
|
+
//# sourceMappingURL=client-connection-auth.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-connection-auth.types.d.ts","sourceRoot":"","sources":["../../src/generated/client-connection-auth.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,yBAAiB,gBAAgB,CAAC;IAChC;;OAEG;IACH,UAAiB,kBAAkB;QACjC,IAAI,EAAE,qBAAqB,CAAC;QAC5B,UAAU,EAAE;YACV,mCAAmC;YACnC,eAAe,EAAE,MAAM,CAAC;YACxB,oCAAoC;YACpC,mBAAmB,CAAC,EAAE,MAAM,CAAC;YAC7B,iCAAiC;YACjC,qBAAqB,CAAC,EAAE,MAAM,CAAC;SAChC,CAAC;KACH;IAED;;OAEG;IACH,UAAiB,qBAAqB;QACpC,IAAI,EAAE,wBAAwB,CAAC;QAC/B,UAAU,EAAE;YACV,eAAe,EAAE,MAAM,CAAC;YACxB,uCAAuC;YACvC,gBAAgB,EAAE,MAAM,CAAC;SAC1B,CAAC;KACH;IAED;;OAEG;IACH,UAAiB,kBAAkB;QACjC,IAAI,EAAE,qBAAqB,CAAC;QAC5B,UAAU,EAAE;YACV,eAAe,EAAE,MAAM,CAAC;YACxB,2BAA2B;YAC3B,kBAAkB,EAAE,MAAM,CAAC;SAC5B,CAAC;KACH;IAED;;OAEG;IACH,KAAY,KAAK,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,kBAAkB,CAAC;IAEpF;;OAEG;IACH,KAAY,SAAS,GAAG,qBAAqB,GAAG,wBAAwB,GAAG,qBAAqB,CAAC;CAClG;AAED;;GAEG;AACH,yBAAiB,MAAM,CAAC;IACtB;;OAEG;IACH,UAAiB,eAAe;QAC9B,IAAI,EAAE,kBAAkB,CAAC;QACzB,UAAU,EAAE;YACV,+BAA+B;YAC/B,WAAW,EAAE,MAAM,CAAC;YACpB,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MAAM,CAAC;YACpB,sCAAsC;YACtC,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;KACH;IAED;;OAEG;IACH,KAAY,KAAK,GAAG,YAAY,GAAG,mBAAmB,CAAC;IAEvD;;OAEG;IACH,KAAY,SAAS,GAAG,eAAe,GAAG,sBAAsB,CAAC;CAClE;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,GAAG,CAAA;CAAE,IAAI;KAC1E,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC,YAAY,CAAC,KAAK,IAAI;CAC5F,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generated types from canvas: Client Connection and Authentication Flow
|
|
4
|
+
*
|
|
5
|
+
* DO NOT EDIT MANUALLY - This file is auto-generated
|
|
6
|
+
* Generated by @principal-ai/principal-view-core
|
|
7
|
+
*
|
|
8
|
+
* Canvas: Telemetry instrumentation for client WebSocket connection, message validation, and authentication flow through Control Tower
|
|
9
|
+
* Version: 1.0.0
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|