dev-sessions 0.2.1 → 0.2.3
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 +124 -77
- package/dist/backends/backend.d.ts +42 -0
- package/dist/backends/backend.js +3 -0
- package/dist/backends/backend.js.map +1 -0
- package/dist/backends/claude-backend.d.ts +22 -0
- package/dist/backends/claude-backend.js +161 -0
- package/dist/backends/claude-backend.js.map +1 -0
- package/dist/backends/claude-tmux.d.ts +1 -3
- package/dist/backends/claude-tmux.js +15 -24
- package/dist/backends/claude-tmux.js.map +1 -1
- package/dist/backends/codex-appserver.d.ts +46 -6
- package/dist/backends/codex-appserver.js +299 -130
- package/dist/backends/codex-appserver.js.map +1 -1
- package/dist/backends/codex-backend.d.ts +21 -0
- package/dist/backends/codex-backend.js +224 -0
- package/dist/backends/codex-backend.js.map +1 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +31 -3
- package/dist/cli.js.map +1 -1
- package/dist/gateway/client.d.ts +3 -1
- package/dist/gateway/client.js +24 -2
- package/dist/gateway/client.js.map +1 -1
- package/dist/gateway/server.js +45 -2
- package/dist/gateway/server.js.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/session-manager.d.ts +7 -9
- package/dist/session-manager.js +122 -367
- package/dist/session-manager.js.map +1 -1
- package/dist/session-store.js +16 -4
- package/dist/session-store.js.map +1 -1
- package/dist/transcript/claude-parser.d.ts +1 -0
- package/dist/transcript/claude-parser.js +4 -0
- package/dist/transcript/claude-parser.js.map +1 -1
- package/dist/types.d.ts +6 -1
- package/package.json +1 -1
- package/skills/delegate/SKILL.md +77 -0
- package/skills/dev-sessions/SKILL.md +5 -13
|
@@ -17,17 +17,18 @@ export interface CodexTurnWaitResult {
|
|
|
17
17
|
elapsedMs: number;
|
|
18
18
|
status: TurnCompletionStatus;
|
|
19
19
|
errorMessage?: string;
|
|
20
|
+
assistantText?: string;
|
|
20
21
|
}
|
|
21
22
|
export interface CodexSendMessageOptions {
|
|
22
23
|
workspacePath: string;
|
|
23
24
|
model?: string;
|
|
24
|
-
timeoutMs?: number;
|
|
25
25
|
}
|
|
26
|
-
export interface
|
|
26
|
+
export interface CodexSendResult {
|
|
27
27
|
threadId: string;
|
|
28
|
-
assistantMessage: string;
|
|
29
28
|
appServerPid: number;
|
|
30
29
|
appServerPort: number;
|
|
30
|
+
turnId?: string;
|
|
31
|
+
assistantText?: string;
|
|
31
32
|
}
|
|
32
33
|
export interface CodexRpcClient {
|
|
33
34
|
readonly currentTurnText: string;
|
|
@@ -35,7 +36,7 @@ export interface CodexRpcClient {
|
|
|
35
36
|
readonly lastTurnError?: string;
|
|
36
37
|
connectAndInitialize(): Promise<void>;
|
|
37
38
|
request(method: string, params?: unknown): Promise<unknown>;
|
|
38
|
-
waitForTurnCompletion(timeoutMs: number): Promise<CodexTurnWaitResult>;
|
|
39
|
+
waitForTurnCompletion(timeoutMs: number, expectedThreadId?: string, expectedTurnId?: string): Promise<CodexTurnWaitResult>;
|
|
39
40
|
close(): Promise<void>;
|
|
40
41
|
}
|
|
41
42
|
export interface CodexAppServerDaemonManager {
|
|
@@ -49,17 +50,55 @@ export interface CodexAppServerBackendDependencies {
|
|
|
49
50
|
clientFactory?: (url: string) => CodexRpcClient;
|
|
50
51
|
daemonManager?: CodexAppServerDaemonManager;
|
|
51
52
|
}
|
|
53
|
+
export declare class CodexWebSocketRpcClient implements CodexRpcClient {
|
|
54
|
+
private readonly url;
|
|
55
|
+
private ws?;
|
|
56
|
+
private connectPromise?;
|
|
57
|
+
private nextRequestId;
|
|
58
|
+
private readonly pendingRequests;
|
|
59
|
+
private waiters;
|
|
60
|
+
private currentText;
|
|
61
|
+
private turnStatus?;
|
|
62
|
+
private turnError?;
|
|
63
|
+
private turnThreadId?;
|
|
64
|
+
private turnId?;
|
|
65
|
+
private closed;
|
|
66
|
+
private closing;
|
|
67
|
+
constructor(url: string);
|
|
68
|
+
get currentTurnText(): string;
|
|
69
|
+
get lastTurnStatus(): TurnCompletionStatus | undefined;
|
|
70
|
+
get lastTurnError(): string | undefined;
|
|
71
|
+
connectAndInitialize(): Promise<void>;
|
|
72
|
+
request(method: string, params?: unknown): Promise<unknown>;
|
|
73
|
+
waitForTurnCompletion(timeoutMs: number, expectedThreadId?: string, expectedTurnId?: string): Promise<CodexTurnWaitResult>;
|
|
74
|
+
close(): Promise<void>;
|
|
75
|
+
private connect;
|
|
76
|
+
private attachSocketHandlers;
|
|
77
|
+
private handleMessageFrame;
|
|
78
|
+
private handleMaybeJsonLine;
|
|
79
|
+
private handleRpcMessage;
|
|
80
|
+
private handleRpcResponse;
|
|
81
|
+
private handleNotification;
|
|
82
|
+
private hasMatchingWaiterForTurn;
|
|
83
|
+
private resolveWaiters;
|
|
84
|
+
private failConnection;
|
|
85
|
+
private notify;
|
|
86
|
+
}
|
|
52
87
|
export declare class CodexAppServerBackend {
|
|
53
88
|
private readonly sessionState;
|
|
54
89
|
private readonly daemonManager;
|
|
55
90
|
private readonly clientFactory;
|
|
56
91
|
constructor(dependencies?: CodexAppServerBackendDependencies);
|
|
57
92
|
createSession(championId: string, workspacePath: string, model?: string): Promise<CodexSessionCreateResult>;
|
|
58
|
-
sendMessage(championId: string, threadId: string, message: string, options?: CodexSendMessageOptions): Promise<
|
|
93
|
+
sendMessage(championId: string, threadId: string, message: string, options?: CodexSendMessageOptions): Promise<CodexSendResult>;
|
|
59
94
|
getThreadRuntimeStatus(threadId: string): Promise<'active' | 'idle' | 'notLoaded' | 'systemError' | 'unknown'>;
|
|
60
|
-
waitForThread(championId: string, threadId: string, timeoutMs?: number): Promise<CodexTurnWaitResult>;
|
|
95
|
+
waitForThread(championId: string, threadId: string, timeoutMs?: number, expectedTurnId?: string): Promise<CodexTurnWaitResult>;
|
|
61
96
|
waitForTurn(championId: string, timeoutMs?: number): Promise<CodexTurnWaitResult>;
|
|
62
97
|
getLastAssistantMessages(championId: string, threadId: string, count: number): Promise<string[]>;
|
|
98
|
+
getThreadTurns(threadId: string): Promise<Array<{
|
|
99
|
+
role: 'human' | 'assistant';
|
|
100
|
+
text: string;
|
|
101
|
+
}>>;
|
|
63
102
|
getSessionStatus(championId: string): AgentTurnStatus;
|
|
64
103
|
killSession(championId: string, pid?: number, threadId?: string, port?: number): Promise<void>;
|
|
65
104
|
stopAppServer(): Promise<void>;
|
|
@@ -71,5 +110,6 @@ export declare class CodexAppServerBackend {
|
|
|
71
110
|
private shouldResetDaemonAfterConnectionFailure;
|
|
72
111
|
private isResumeNotFoundError;
|
|
73
112
|
private isThreadReadUnmaterializedError;
|
|
113
|
+
private isThreadReadNotFoundError;
|
|
74
114
|
}
|
|
75
115
|
export {};
|