@mearl/cloud-connector 2.6.1 → 2.7.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/README.md +36 -2
- package/dist/__tests__/endpoint.test.d.ts +1 -0
- package/dist/__tests__/qoder-auth.test.d.ts +1 -0
- package/dist/__tests__/qoder.test.d.ts +1 -0
- package/dist/cli.js +646 -14
- package/dist/endpoint.d.ts +20 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +649 -7
- package/dist/qoder-auth.d.ts +11 -0
- package/dist/qoder.d.ts +106 -0
- package/package.json +7 -6
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ConnectorEndpointScheme = 'ws' | 'wss' | 'qoder';
|
|
2
|
+
export interface WebSocketConnectorEndpoint {
|
|
3
|
+
/** User-facing URL retained for daemon identity and lifecycle commands. */
|
|
4
|
+
serverUrl: string;
|
|
5
|
+
/** WebSocket URL used for the network connection. */
|
|
6
|
+
transportUrl: string;
|
|
7
|
+
scheme: 'ws' | 'wss';
|
|
8
|
+
}
|
|
9
|
+
export interface QoderConnectorEndpoint {
|
|
10
|
+
/** User-facing URL retained for daemon identity and lifecycle commands. */
|
|
11
|
+
serverUrl: string;
|
|
12
|
+
scheme: 'qoder';
|
|
13
|
+
pairingCode: string;
|
|
14
|
+
createdAt?: number;
|
|
15
|
+
}
|
|
16
|
+
export type ConnectorEndpoint = WebSocketConnectorEndpoint | QoderConnectorEndpoint;
|
|
17
|
+
/** Parse a connector endpoint without changing its user-facing daemon identity. */
|
|
18
|
+
export declare function parseConnectorEndpoint(value: string | undefined): ConnectorEndpoint | null;
|
|
19
|
+
export declare function isConnectorEndpoint(value: string | undefined): value is string;
|
|
20
|
+
export declare function requireConnectorEndpoint(value: string): ConnectorEndpoint;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ConnectorIdentity } from './identity.js';
|
|
2
|
+
export { isConnectorEndpoint, parseConnectorEndpoint, requireConnectorEndpoint, type ConnectorEndpoint, type ConnectorEndpointScheme, type QoderConnectorEndpoint, type WebSocketConnectorEndpoint, } from './endpoint.js';
|
|
3
|
+
export { DEFAULT_QODER_API_BASE_URL, QODER_TOOL_NAME, QoderApiClient, QoderApiError, QoderConnector, formatQoderToolResult, parseQoderSse, type QoderContentBlock, type QoderPairingRequest, type QoderPublicEvent, type QoderSseFrame, } from './qoder.js';
|
|
2
4
|
export interface CloudConnectorOptions {
|
|
3
5
|
serverUrl: string;
|
|
4
6
|
heartbeatInterval?: number;
|
|
@@ -9,7 +11,7 @@ export interface CloudConnectorOptions {
|
|
|
9
11
|
connectorName?: string;
|
|
10
12
|
onInitialConnectionFailed?: (message: string) => void;
|
|
11
13
|
/**
|
|
12
|
-
* Fired every time the
|
|
14
|
+
* Fired every time the transport connection is (re)established. Used by the
|
|
13
15
|
* foreground runner to (re)write this connector's registry record once it is
|
|
14
16
|
* actually connected — the signal other managers use to discover/adopt it.
|
|
15
17
|
*/
|
|
@@ -17,7 +19,9 @@ export interface CloudConnectorOptions {
|
|
|
17
19
|
}
|
|
18
20
|
export declare class CloudConnector {
|
|
19
21
|
private options;
|
|
22
|
+
private endpoint;
|
|
20
23
|
private identity;
|
|
24
|
+
private qoderConnector;
|
|
21
25
|
private ws;
|
|
22
26
|
private heartbeatTimer;
|
|
23
27
|
private reconnectTimer;
|