@buildify-cli/cursor-agent 0.1.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 +188 -0
- package/bin/buildify-cursor-agent +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +266 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.js +161 -0
- package/dist/config.js.map +1 -0
- package/dist/runner.d.ts +63 -0
- package/dist/runner.js +714 -0
- package/dist/runner.js.map +1 -0
- package/dist/service/macos.d.ts +8 -0
- package/dist/service/macos.js +118 -0
- package/dist/service/macos.js.map +1 -0
- package/dist/types.d.ts +62 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -0
package/dist/runner.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type AgentConfig, type RunnerStatus } from "./types.js";
|
|
2
|
+
export declare class AgentRunner {
|
|
3
|
+
private readonly config;
|
|
4
|
+
private sessionId;
|
|
5
|
+
private heartbeatIntervalSec;
|
|
6
|
+
private heartbeatTimer;
|
|
7
|
+
private pollTimer;
|
|
8
|
+
private eventSource;
|
|
9
|
+
private reconnectTimer;
|
|
10
|
+
private stopped;
|
|
11
|
+
private connected;
|
|
12
|
+
private reconnecting;
|
|
13
|
+
private pulling;
|
|
14
|
+
private reconnectAttempts;
|
|
15
|
+
private heartbeatFailures;
|
|
16
|
+
private readonly activeTasks;
|
|
17
|
+
private availableModels;
|
|
18
|
+
constructor(config: AgentConfig);
|
|
19
|
+
start(): Promise<void>;
|
|
20
|
+
stop(): Promise<void>;
|
|
21
|
+
getStatus(): RunnerStatus;
|
|
22
|
+
private setupSignalHandlers;
|
|
23
|
+
private clearTimers;
|
|
24
|
+
private clearConnectionTimers;
|
|
25
|
+
private baseUrl;
|
|
26
|
+
private sessionHeaders;
|
|
27
|
+
private connectWithRetry;
|
|
28
|
+
private connect;
|
|
29
|
+
private disconnect;
|
|
30
|
+
private startHeartbeat;
|
|
31
|
+
private sendHeartbeat;
|
|
32
|
+
private openSse;
|
|
33
|
+
private closeSse;
|
|
34
|
+
private startTaskPoller;
|
|
35
|
+
private scheduleReconnect;
|
|
36
|
+
private reconnect;
|
|
37
|
+
private nextReconnectDelay;
|
|
38
|
+
private tryPullAndRunTasks;
|
|
39
|
+
private pullNextTask;
|
|
40
|
+
private executeTask;
|
|
41
|
+
private consumeRunStream;
|
|
42
|
+
private handleCancelledEvent;
|
|
43
|
+
private cancelRun;
|
|
44
|
+
private reportCancelled;
|
|
45
|
+
private reportExecutionError;
|
|
46
|
+
private refreshAvailableModels;
|
|
47
|
+
private modelId;
|
|
48
|
+
private disposeAgent;
|
|
49
|
+
private ensureCwd;
|
|
50
|
+
private reportTaskReceived;
|
|
51
|
+
private reportTaskEvent;
|
|
52
|
+
private fetchWithTimeout;
|
|
53
|
+
private nextShortRetryDelay;
|
|
54
|
+
private parseCancelEvent;
|
|
55
|
+
private formatSdkMessage;
|
|
56
|
+
private shouldLog;
|
|
57
|
+
private log;
|
|
58
|
+
private error;
|
|
59
|
+
private warn;
|
|
60
|
+
private info;
|
|
61
|
+
private debug;
|
|
62
|
+
}
|
|
63
|
+
export declare function runAgent(config: AgentConfig): Promise<AgentRunner>;
|