@agentconnect/host 0.2.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/host.d.ts +36 -0
- package/dist/host.js +920 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/observed.d.ts +7 -0
- package/dist/observed.js +69 -0
- package/dist/providers/claude.d.ts +12 -0
- package/dist/providers/claude.js +1188 -0
- package/dist/providers/codex.d.ts +11 -0
- package/dist/providers/codex.js +908 -0
- package/dist/providers/cursor.d.ts +11 -0
- package/dist/providers/cursor.js +866 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.js +111 -0
- package/dist/providers/local.d.ts +9 -0
- package/dist/providers/local.js +114 -0
- package/dist/providers/utils.d.ts +33 -0
- package/dist/providers/utils.js +284 -0
- package/dist/types.d.ts +252 -0
- package/dist/types.js +1 -0
- package/package.json +43 -0
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AppManifest, ProviderId, ProviderLoginOptions } from './types.js';
|
|
2
|
+
type RpcNotification = {
|
|
3
|
+
jsonrpc: '2.0';
|
|
4
|
+
method: string;
|
|
5
|
+
params?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export type HostMode = 'embedded' | 'dev';
|
|
8
|
+
export type HostLogger = {
|
|
9
|
+
debug?: (message: string, meta?: Record<string, unknown>) => void;
|
|
10
|
+
info?: (message: string, meta?: Record<string, unknown>) => void;
|
|
11
|
+
warn?: (message: string, meta?: Record<string, unknown>) => void;
|
|
12
|
+
error?: (message: string, meta?: Record<string, unknown>) => void;
|
|
13
|
+
};
|
|
14
|
+
export interface HostOptions {
|
|
15
|
+
mode?: HostMode;
|
|
16
|
+
basePath?: string;
|
|
17
|
+
appManifest?: AppManifest | null;
|
|
18
|
+
providerConfig?: Partial<Record<ProviderId, ProviderLoginOptions>>;
|
|
19
|
+
hostId?: string;
|
|
20
|
+
hostName?: string;
|
|
21
|
+
hostVersion?: string;
|
|
22
|
+
log?: HostLogger;
|
|
23
|
+
}
|
|
24
|
+
export interface DevHostOptions extends HostOptions {
|
|
25
|
+
host?: string;
|
|
26
|
+
port?: number;
|
|
27
|
+
appPath?: string;
|
|
28
|
+
uiUrl?: string;
|
|
29
|
+
}
|
|
30
|
+
export type AgentConnectBridge = {
|
|
31
|
+
request: (method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
32
|
+
onEvent?: (handler: (event: RpcNotification) => void) => () => void;
|
|
33
|
+
};
|
|
34
|
+
export declare function startDevHost({ host, port, appPath, uiUrl, ...options }?: DevHostOptions): void;
|
|
35
|
+
export declare function createHostBridge(options?: HostOptions): AgentConnectBridge;
|
|
36
|
+
export {};
|