@termfleet/core 0.1.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/agent-launch.d.ts +78 -0
- package/dist/agent-launch.js +247 -0
- package/dist/agent-session-id.d.ts +10 -0
- package/dist/agent-session-id.js +36 -0
- package/dist/agent-session-index-client.d.ts +7 -0
- package/dist/agent-session-index-client.js +86 -0
- package/dist/agent-session-index-worker.d.ts +1 -0
- package/dist/agent-session-index-worker.js +20 -0
- package/dist/agent-session-index.d.ts +34 -0
- package/dist/agent-session-index.js +527 -0
- package/dist/agent-session-tail.d.ts +33 -0
- package/dist/agent-session-tail.js +184 -0
- package/dist/agent-session-watcher.d.ts +36 -0
- package/dist/agent-session-watcher.js +194 -0
- package/dist/agent-session.d.ts +380 -0
- package/dist/agent-session.js +1688 -0
- package/dist/background-runner.d.ts +3 -0
- package/dist/background-runner.js +55 -0
- package/dist/boot-queue.d.ts +35 -0
- package/dist/boot-queue.js +66 -0
- package/dist/build-info.d.ts +5 -0
- package/dist/build-info.js +38 -0
- package/dist/collab/canvas-doc.d.ts +47 -0
- package/dist/collab/canvas-doc.js +83 -0
- package/dist/contracts/auth.d.ts +77 -0
- package/dist/contracts/auth.js +1 -0
- package/dist/contracts/canvas.d.ts +34 -0
- package/dist/contracts/canvas.js +76 -0
- package/dist/contracts/console-layout.d.ts +39 -0
- package/dist/contracts/console-layout.js +135 -0
- package/dist/contracts/files.d.ts +38 -0
- package/dist/contracts/files.js +37 -0
- package/dist/contracts/provider-url.d.ts +3 -0
- package/dist/contracts/provider-url.js +49 -0
- package/dist/contracts/registry.d.ts +58 -0
- package/dist/contracts/registry.js +285 -0
- package/dist/launch-trace.d.ts +6 -0
- package/dist/launch-trace.js +33 -0
- package/dist/lib/errors.d.ts +1 -0
- package/dist/lib/errors.js +5 -0
- package/dist/lib/exec.d.ts +13 -0
- package/dist/lib/exec.js +134 -0
- package/dist/local-providers.d.ts +32 -0
- package/dist/local-providers.js +184 -0
- package/dist/local-tunnel.d.ts +6 -0
- package/dist/local-tunnel.js +258 -0
- package/dist/provider-access-token.d.ts +11 -0
- package/dist/provider-access-token.js +77 -0
- package/dist/provider-client.d.ts +152 -0
- package/dist/provider-client.js +666 -0
- package/dist/provider-url-resolver.d.ts +16 -0
- package/dist/provider-url-resolver.js +37 -0
- package/dist/registry-client.d.ts +93 -0
- package/dist/registry-client.js +170 -0
- package/dist/registry.d.ts +56 -0
- package/dist/registry.js +406 -0
- package/dist/session-attention.d.ts +24 -0
- package/dist/session-attention.js +54 -0
- package/dist/session-lifecycle.d.ts +83 -0
- package/dist/session-lifecycle.js +658 -0
- package/dist/session-window.d.ts +3 -0
- package/dist/session-window.js +20 -0
- package/dist/terminal-client.d.ts +49 -0
- package/dist/terminal-client.js +89 -0
- package/dist/types.d.ts +155 -0
- package/dist/types.js +21 -0
- package/package.json +26 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
export type ClaudeSessionMessage = {
|
|
2
|
+
blocks: ClaudeMessageBlock[];
|
|
3
|
+
role: "assistant" | "user";
|
|
4
|
+
text: string;
|
|
5
|
+
stopReason?: string;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
};
|
|
8
|
+
export type AgentSessionMessageSummary = {
|
|
9
|
+
role: "assistant" | "developer" | "user";
|
|
10
|
+
text: string;
|
|
11
|
+
timestamp?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ClaudeMessageBlock = {
|
|
14
|
+
kind: "text";
|
|
15
|
+
text: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "thinking";
|
|
18
|
+
text: string;
|
|
19
|
+
} | {
|
|
20
|
+
input: string;
|
|
21
|
+
kind: "tool_use";
|
|
22
|
+
name: string;
|
|
23
|
+
toolUseId?: string;
|
|
24
|
+
} | {
|
|
25
|
+
isError: boolean;
|
|
26
|
+
kind: "tool_result";
|
|
27
|
+
text: string;
|
|
28
|
+
toolUseId?: string;
|
|
29
|
+
} | {
|
|
30
|
+
blockType: string;
|
|
31
|
+
kind: "unknown";
|
|
32
|
+
text: string;
|
|
33
|
+
};
|
|
34
|
+
export type ClaudeTimelineItem = {
|
|
35
|
+
kind: "claude_user_message";
|
|
36
|
+
text: string;
|
|
37
|
+
timestamp?: string;
|
|
38
|
+
} | {
|
|
39
|
+
blocks: ClaudeMessageBlock[];
|
|
40
|
+
kind: "claude_assistant_message";
|
|
41
|
+
text: string;
|
|
42
|
+
timestamp?: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: "claude_thinking";
|
|
45
|
+
text: string;
|
|
46
|
+
timestamp?: string;
|
|
47
|
+
} | {
|
|
48
|
+
input: string;
|
|
49
|
+
kind: "claude_tool_use";
|
|
50
|
+
name: string;
|
|
51
|
+
toolCategory: AgentToolCategory;
|
|
52
|
+
toolUseId?: string;
|
|
53
|
+
timestamp?: string;
|
|
54
|
+
} | {
|
|
55
|
+
isError: boolean;
|
|
56
|
+
kind: "claude_tool_result";
|
|
57
|
+
name?: string;
|
|
58
|
+
output: string;
|
|
59
|
+
toolCategory: AgentToolCategory;
|
|
60
|
+
toolUseId?: string;
|
|
61
|
+
timestamp?: string;
|
|
62
|
+
} | {
|
|
63
|
+
kind: "claude_tool_exchange";
|
|
64
|
+
result: {
|
|
65
|
+
isError: boolean;
|
|
66
|
+
output: string;
|
|
67
|
+
timestamp?: string;
|
|
68
|
+
};
|
|
69
|
+
toolUse: {
|
|
70
|
+
input: string;
|
|
71
|
+
name: string;
|
|
72
|
+
toolCategory: AgentToolCategory;
|
|
73
|
+
timestamp?: string;
|
|
74
|
+
};
|
|
75
|
+
toolUseId?: string;
|
|
76
|
+
timestamp?: string;
|
|
77
|
+
} | {
|
|
78
|
+
items: ClaudeTodoItem[];
|
|
79
|
+
kind: "claude_todo";
|
|
80
|
+
title: string;
|
|
81
|
+
timestamp?: string;
|
|
82
|
+
} | {
|
|
83
|
+
kind: "claude_queued_message";
|
|
84
|
+
operation: string;
|
|
85
|
+
text: string;
|
|
86
|
+
timestamp?: string;
|
|
87
|
+
} | {
|
|
88
|
+
kind: "claude_system_event";
|
|
89
|
+
label: string;
|
|
90
|
+
text: string;
|
|
91
|
+
tone?: "default" | "success" | "warning";
|
|
92
|
+
timestamp?: string;
|
|
93
|
+
} | {
|
|
94
|
+
kind: "claude_attachment";
|
|
95
|
+
label: string;
|
|
96
|
+
text: string;
|
|
97
|
+
timestamp?: string;
|
|
98
|
+
} | {
|
|
99
|
+
kind: "claude_file_snapshot";
|
|
100
|
+
label: string;
|
|
101
|
+
text: string;
|
|
102
|
+
timestamp?: string;
|
|
103
|
+
} | {
|
|
104
|
+
kind: "claude_pr_link";
|
|
105
|
+
repository?: string;
|
|
106
|
+
title: string;
|
|
107
|
+
url: string;
|
|
108
|
+
timestamp?: string;
|
|
109
|
+
};
|
|
110
|
+
export type ClaudeTodoItem = {
|
|
111
|
+
status?: string;
|
|
112
|
+
text: string;
|
|
113
|
+
};
|
|
114
|
+
export type AgentToolCategory = "browser" | "discovery" | "file_edit" | "file_read" | "generic" | "human" | "mcp" | "monitor" | "planning" | "search" | "scheduler" | "shell" | "structured" | "subagent" | "task" | "workflow" | "web";
|
|
115
|
+
export type ClaudeToolCategory = AgentToolCategory;
|
|
116
|
+
export type AgentSubagentRef = {
|
|
117
|
+
agentId: string;
|
|
118
|
+
updatedAt: string;
|
|
119
|
+
};
|
|
120
|
+
export type ClaudeAgentSessionDetails = {
|
|
121
|
+
agentSessionId: string;
|
|
122
|
+
endOfTurn: boolean;
|
|
123
|
+
firstAssistantMessage?: AgentSessionMessageSummary;
|
|
124
|
+
firstMessage?: AgentSessionMessageSummary;
|
|
125
|
+
lastAssistantMessage?: AgentSessionMessageSummary;
|
|
126
|
+
lastAssistantText: string;
|
|
127
|
+
lastMessage?: AgentSessionMessageSummary;
|
|
128
|
+
messages: ClaudeSessionMessage[];
|
|
129
|
+
provider: "claude";
|
|
130
|
+
sessionId: string;
|
|
131
|
+
subagents?: AgentSubagentRef[];
|
|
132
|
+
timeline: ClaudeTimelineItem[];
|
|
133
|
+
transcriptPath?: string;
|
|
134
|
+
};
|
|
135
|
+
export type CodexTimelineItem = {
|
|
136
|
+
kind: "codex_user_message";
|
|
137
|
+
text: string;
|
|
138
|
+
timestamp?: string;
|
|
139
|
+
} | {
|
|
140
|
+
kind: "codex_assistant_message";
|
|
141
|
+
phase?: string;
|
|
142
|
+
text: string;
|
|
143
|
+
timestamp?: string;
|
|
144
|
+
} | {
|
|
145
|
+
kind: "codex_commentary";
|
|
146
|
+
phase?: string;
|
|
147
|
+
text: string;
|
|
148
|
+
timestamp?: string;
|
|
149
|
+
} | {
|
|
150
|
+
kind: "codex_reasoning";
|
|
151
|
+
summary?: string;
|
|
152
|
+
text: string;
|
|
153
|
+
timestamp?: string;
|
|
154
|
+
} | {
|
|
155
|
+
arguments: string;
|
|
156
|
+
callId?: string;
|
|
157
|
+
kind: "codex_tool_call";
|
|
158
|
+
name: string;
|
|
159
|
+
toolCategory: AgentToolCategory;
|
|
160
|
+
timestamp?: string;
|
|
161
|
+
} | {
|
|
162
|
+
callId?: string;
|
|
163
|
+
kind: "codex_tool_result";
|
|
164
|
+
name?: string;
|
|
165
|
+
output: string;
|
|
166
|
+
status?: string;
|
|
167
|
+
toolCategory: AgentToolCategory;
|
|
168
|
+
timestamp?: string;
|
|
169
|
+
} | {
|
|
170
|
+
callId?: string;
|
|
171
|
+
kind: "codex_tool_exchange";
|
|
172
|
+
result: {
|
|
173
|
+
output: string;
|
|
174
|
+
status?: string;
|
|
175
|
+
timestamp?: string;
|
|
176
|
+
};
|
|
177
|
+
toolUse: {
|
|
178
|
+
arguments: string;
|
|
179
|
+
name: string;
|
|
180
|
+
toolCategory: AgentToolCategory;
|
|
181
|
+
timestamp?: string;
|
|
182
|
+
};
|
|
183
|
+
timestamp?: string;
|
|
184
|
+
} | {
|
|
185
|
+
kind: "codex_patch";
|
|
186
|
+
callId?: string;
|
|
187
|
+
changes: CodexPatchChange[];
|
|
188
|
+
output: string;
|
|
189
|
+
status?: string;
|
|
190
|
+
success: boolean;
|
|
191
|
+
timestamp?: string;
|
|
192
|
+
} | {
|
|
193
|
+
kind: "codex_task_event";
|
|
194
|
+
label: string;
|
|
195
|
+
text: string;
|
|
196
|
+
tone?: "default" | "success" | "warning";
|
|
197
|
+
timestamp?: string;
|
|
198
|
+
} | {
|
|
199
|
+
kind: "codex_context";
|
|
200
|
+
cwd?: string;
|
|
201
|
+
label: string;
|
|
202
|
+
model?: string;
|
|
203
|
+
text: string;
|
|
204
|
+
timestamp?: string;
|
|
205
|
+
} | {
|
|
206
|
+
kind: "codex_compaction";
|
|
207
|
+
text: string;
|
|
208
|
+
timestamp?: string;
|
|
209
|
+
} | {
|
|
210
|
+
kind: "codex_goal";
|
|
211
|
+
status?: string;
|
|
212
|
+
text: string;
|
|
213
|
+
timestamp?: string;
|
|
214
|
+
} | {
|
|
215
|
+
kind: "codex_review";
|
|
216
|
+
text: string;
|
|
217
|
+
timestamp?: string;
|
|
218
|
+
} | {
|
|
219
|
+
kind: "codex_error";
|
|
220
|
+
text: string;
|
|
221
|
+
timestamp?: string;
|
|
222
|
+
} | {
|
|
223
|
+
kind: "codex_web_search";
|
|
224
|
+
callId?: string;
|
|
225
|
+
query: string;
|
|
226
|
+
timestamp?: string;
|
|
227
|
+
};
|
|
228
|
+
export type CodexPatchChange = {
|
|
229
|
+
path: string;
|
|
230
|
+
text?: string;
|
|
231
|
+
type: string;
|
|
232
|
+
};
|
|
233
|
+
export type CodexAgentSessionDetails = {
|
|
234
|
+
agentSessionId: string;
|
|
235
|
+
endOfTurn: boolean;
|
|
236
|
+
firstAssistantMessage?: AgentSessionMessageSummary;
|
|
237
|
+
firstMessage?: AgentSessionMessageSummary;
|
|
238
|
+
lastAssistantMessage?: AgentSessionMessageSummary;
|
|
239
|
+
lastAssistantText: string;
|
|
240
|
+
lastMessage?: AgentSessionMessageSummary;
|
|
241
|
+
messages: Array<{
|
|
242
|
+
role: "assistant" | "developer" | "user";
|
|
243
|
+
text: string;
|
|
244
|
+
timestamp?: string;
|
|
245
|
+
}>;
|
|
246
|
+
provider: "codex";
|
|
247
|
+
sessionId: string;
|
|
248
|
+
timeline: CodexTimelineItem[];
|
|
249
|
+
transcriptPath?: string;
|
|
250
|
+
};
|
|
251
|
+
export type GeminiTimelineItem = {
|
|
252
|
+
kind: "gemini_user_message";
|
|
253
|
+
text: string;
|
|
254
|
+
timestamp?: string;
|
|
255
|
+
} | {
|
|
256
|
+
kind: "gemini_assistant_message";
|
|
257
|
+
text: string;
|
|
258
|
+
timestamp?: string;
|
|
259
|
+
} | {
|
|
260
|
+
kind: "gemini_thinking";
|
|
261
|
+
text: string;
|
|
262
|
+
timestamp?: string;
|
|
263
|
+
};
|
|
264
|
+
export type GeminiAgentSessionDetails = {
|
|
265
|
+
agentSessionId: string;
|
|
266
|
+
endOfTurn: boolean;
|
|
267
|
+
firstAssistantMessage?: AgentSessionMessageSummary;
|
|
268
|
+
firstMessage?: AgentSessionMessageSummary;
|
|
269
|
+
lastAssistantMessage?: AgentSessionMessageSummary;
|
|
270
|
+
lastAssistantText: string;
|
|
271
|
+
lastMessage?: AgentSessionMessageSummary;
|
|
272
|
+
messages: AgentSessionMessageSummary[];
|
|
273
|
+
provider: "gemini";
|
|
274
|
+
sessionId: string;
|
|
275
|
+
timeline: GeminiTimelineItem[];
|
|
276
|
+
transcriptPath?: string;
|
|
277
|
+
};
|
|
278
|
+
export type AgentSessionDetails = ClaudeAgentSessionDetails | CodexAgentSessionDetails | GeminiAgentSessionDetails;
|
|
279
|
+
export declare function agentHome(): string;
|
|
280
|
+
export declare function assertSafeAgentSessionId(bareId: string): string;
|
|
281
|
+
export declare function normalizeClaudeSessionId(sessionId: string): string;
|
|
282
|
+
export declare function encodeClaudeCwd(cwd: string): string;
|
|
283
|
+
export declare function claudeTranscriptPath(options: {
|
|
284
|
+
cwd: string;
|
|
285
|
+
home?: string;
|
|
286
|
+
sessionId: string;
|
|
287
|
+
}): string;
|
|
288
|
+
export declare function normalizeCodexSessionId(sessionId: string): string;
|
|
289
|
+
export declare function isCodexInjectedContext(raw: string): boolean;
|
|
290
|
+
export declare function codexTranscriptPath(options: {
|
|
291
|
+
cwd: string;
|
|
292
|
+
home?: string;
|
|
293
|
+
sessionId: string;
|
|
294
|
+
}): string | undefined;
|
|
295
|
+
export declare function readLocalClaudeSession(options: {
|
|
296
|
+
cwd: string;
|
|
297
|
+
home?: string;
|
|
298
|
+
sessionId: string;
|
|
299
|
+
}): ClaudeAgentSessionDetails;
|
|
300
|
+
export declare function resolveClaudeTranscriptPath(options: {
|
|
301
|
+
cwd: string;
|
|
302
|
+
home?: string;
|
|
303
|
+
sessionId: string;
|
|
304
|
+
}): string | undefined;
|
|
305
|
+
export declare function emptyClaudeSession(options: {
|
|
306
|
+
cwd: string;
|
|
307
|
+
home?: string;
|
|
308
|
+
sessionId: string;
|
|
309
|
+
}): ClaudeAgentSessionDetails;
|
|
310
|
+
export declare function readLocalAgentSession(options: {
|
|
311
|
+
cwd: string;
|
|
312
|
+
home?: string;
|
|
313
|
+
sessionId: string;
|
|
314
|
+
}): AgentSessionDetails;
|
|
315
|
+
export declare function normalizeGeminiSessionId(sessionId: string): string;
|
|
316
|
+
export declare function resolveGeminiTranscriptPath(options: {
|
|
317
|
+
cwd?: string;
|
|
318
|
+
home?: string;
|
|
319
|
+
sessionId: string;
|
|
320
|
+
}): string | undefined;
|
|
321
|
+
export declare function readLocalGeminiSession(options: {
|
|
322
|
+
cwd?: string;
|
|
323
|
+
home?: string;
|
|
324
|
+
sessionId: string;
|
|
325
|
+
}): GeminiAgentSessionDetails;
|
|
326
|
+
export declare function geminiContentText(content: unknown): string;
|
|
327
|
+
export declare function parseGeminiSessionJsonl(options: {
|
|
328
|
+
jsonl: string;
|
|
329
|
+
sessionId: string;
|
|
330
|
+
transcriptPath?: string;
|
|
331
|
+
}): GeminiAgentSessionDetails;
|
|
332
|
+
export declare function readLocalAgentSessionAsync(options: {
|
|
333
|
+
cwd: string;
|
|
334
|
+
home?: string;
|
|
335
|
+
sessionId: string;
|
|
336
|
+
}): Promise<AgentSessionDetails>;
|
|
337
|
+
export declare function makeSubagentSessionId(parentSessionId: string, agentId: string): string;
|
|
338
|
+
export declare function parseSubagentSessionId(sessionId: string): {
|
|
339
|
+
agentId: string;
|
|
340
|
+
parentSessionId: string;
|
|
341
|
+
} | undefined;
|
|
342
|
+
export declare function resolveClaudeSubagentTranscriptPath(options: {
|
|
343
|
+
agentId: string;
|
|
344
|
+
home?: string;
|
|
345
|
+
parentSessionId?: string;
|
|
346
|
+
sessionId?: string;
|
|
347
|
+
}): string;
|
|
348
|
+
export declare function listLocalAgentSubagents(options: {
|
|
349
|
+
home?: string;
|
|
350
|
+
sessionId: string;
|
|
351
|
+
transcriptPath?: string;
|
|
352
|
+
}): AgentSubagentRef[];
|
|
353
|
+
export declare function readLocalAgentSubagentSessionAsync(options: {
|
|
354
|
+
agentId: string;
|
|
355
|
+
home?: string;
|
|
356
|
+
sessionId: string;
|
|
357
|
+
}): Promise<ClaudeAgentSessionDetails>;
|
|
358
|
+
export declare function readLocalCodexSession(options: {
|
|
359
|
+
cwd: string;
|
|
360
|
+
home?: string;
|
|
361
|
+
sessionId: string;
|
|
362
|
+
}): CodexAgentSessionDetails;
|
|
363
|
+
export type ClaudeSessionParser = {
|
|
364
|
+
feedLine(line: string): void;
|
|
365
|
+
finalize(): ClaudeAgentSessionDetails;
|
|
366
|
+
};
|
|
367
|
+
export declare function createClaudeSessionParser(options: {
|
|
368
|
+
sessionId: string;
|
|
369
|
+
transcriptPath?: string;
|
|
370
|
+
}): ClaudeSessionParser;
|
|
371
|
+
export declare function parseClaudeSessionJsonl(options: {
|
|
372
|
+
jsonl: string;
|
|
373
|
+
sessionId: string;
|
|
374
|
+
transcriptPath?: string;
|
|
375
|
+
}): ClaudeAgentSessionDetails;
|
|
376
|
+
export declare function parseCodexSessionJsonl(options: {
|
|
377
|
+
jsonl: string;
|
|
378
|
+
sessionId: string;
|
|
379
|
+
transcriptPath?: string;
|
|
380
|
+
}): CodexAgentSessionDetails;
|