@koinzhang/paseo-plugin-activity 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.
Files changed (52) hide show
  1. package/client/activity-heatmap.tsx +138 -0
  2. package/client/global-surface.tsx +689 -0
  3. package/client/panel.tsx +423 -0
  4. package/client/pending-skill.ts +50 -0
  5. package/client/pill-data-cache.test.ts +68 -0
  6. package/client/pill-data-cache.ts +37 -0
  7. package/client/pill.tsx +211 -0
  8. package/client/provider-filter.test.ts +95 -0
  9. package/client/provider-filter.ts +44 -0
  10. package/client/rank-color.test.ts +35 -0
  11. package/client/rank-color.ts +69 -0
  12. package/client/usage-popover.tsx +383 -0
  13. package/client/usage-query.tsx +54 -0
  14. package/client/usage-stats.tsx +18 -0
  15. package/client/use-app-language.ts +14 -0
  16. package/client/web.ts +28 -0
  17. package/index.client.tsx +62 -0
  18. package/index.server.ts +128 -0
  19. package/package.json +31 -0
  20. package/paseo-plugin.json +6 -0
  21. package/server/agents.test.ts +67 -0
  22. package/server/agents.ts +75 -0
  23. package/server/background-sync.test.ts +143 -0
  24. package/server/background-sync.ts +105 -0
  25. package/server/handlers-query.test.ts +91 -0
  26. package/server/handlers.ts +531 -0
  27. package/server/host-types.ts +14 -0
  28. package/server/ingest.test.ts +233 -0
  29. package/server/ingest.ts +277 -0
  30. package/server/mcp-servers.test.ts +70 -0
  31. package/server/mcp-servers.ts +212 -0
  32. package/server/messages.test.ts +150 -0
  33. package/server/migrate-data.test.ts +65 -0
  34. package/server/migrate-data.ts +54 -0
  35. package/server/resolve-model.test.ts +11 -0
  36. package/server/resolve-model.ts +30 -0
  37. package/server/skill-path.test.ts +56 -0
  38. package/server/skill-path.ts +85 -0
  39. package/server/store.test.ts +221 -0
  40. package/server/store.ts +909 -0
  41. package/server/ttl-cache.ts +34 -0
  42. package/shared/activity.test.ts +86 -0
  43. package/shared/activity.ts +185 -0
  44. package/shared/classify.test.ts +306 -0
  45. package/shared/classify.ts +378 -0
  46. package/shared/format.test.ts +48 -0
  47. package/shared/format.ts +45 -0
  48. package/shared/insights.test.ts +122 -0
  49. package/shared/insights.ts +188 -0
  50. package/shared/plugin-id.ts +7 -0
  51. package/shared/usage.test.ts +668 -0
  52. package/shared/usage.ts +726 -0
@@ -0,0 +1,531 @@
1
+ import type { AgentTimelineItem } from "./host-types.ts";
2
+ import type { RpcInput, RpcOutput } from "@getpaseo/plugin";
3
+ import type { PluginHandlerContext, PluginHookAgent } from "@getpaseo/plugin/server";
4
+ import { homedir } from "node:os";
5
+ import { basename, dirname, resolve, sep } from "node:path";
6
+ import { realpathSync, statSync } from "node:fs";
7
+ import {
8
+ aggregateByProvider,
9
+ aggregateMcpByTool,
10
+ aggregateShellTop,
11
+ aggregateSkillsByName,
12
+ aggregateActivityByDay,
13
+ isFileRead,
14
+ isFileWrite,
15
+ isShellCall,
16
+ usageActivityByDayRpc,
17
+ usageByProviderRpc,
18
+ usageExportRpc,
19
+ usageListRpc,
20
+ usageMcpByToolRpc,
21
+ usageReadSkillRpc,
22
+ usageSkillsByNameRpc,
23
+ usageSummaryRpc,
24
+ } from "../shared/usage.ts";
25
+ import { DEFAULT_SKILL_ROOTS, matchSkillFile } from "../shared/classify.ts";
26
+ import { buildHomeSkillRoots, buildSkillRoots, toolCallToRow, ingestUserMessages } from "./ingest.ts";
27
+ import { normalizeModelId } from "./resolve-model.ts";
28
+ import { resolveMcpServers } from "./mcp-servers.ts";
29
+ import {
30
+ collapseHomePath,
31
+ expandHomePath,
32
+ finalizeSkillPaths,
33
+ } from "./skill-path.ts";
34
+ import type { QueryFilter, ToolCallRow, UserMessageRow, UsageStore } from "./store.ts";
35
+ import { formatLocalDateTime } from "../shared/format.ts";
36
+ import { agentRowFromSnapshot } from "./agents.ts";
37
+ import { readFile } from "node:fs/promises";
38
+
39
+ type PaseoApi = PluginHandlerContext["paseo"];
40
+
41
+ export type UsageSummary = RpcOutput<typeof usageSummaryRpc>;
42
+ export type UsageListResult = RpcOutput<typeof usageListRpc>;
43
+
44
+ export function summarizeRows(rows: readonly ToolCallRow[]): UsageSummary {
45
+ const skillCalls = { exact: 0, inferred: 0, low: 0 };
46
+ const toolCallsByKind: Record<string, number> = {};
47
+ let shellCalls = 0;
48
+ let shellFailures = 0;
49
+ let fileReads = 0;
50
+ let fileWrites = 0;
51
+ let mcpCalls = 0;
52
+ let mcpFailures = 0;
53
+
54
+ for (const row of rows) {
55
+ const kind = row.detailType ?? "unknown";
56
+ toolCallsByKind[kind] = (toolCallsByKind[kind] ?? 0) + 1;
57
+
58
+ if (row.category === "skill") {
59
+ if (row.confidence === "exact") skillCalls.exact += 1;
60
+ else if (row.confidence === "inferred") skillCalls.inferred += 1;
61
+ else if (row.confidence === "low") skillCalls.low += 1;
62
+ else skillCalls.inferred += 1;
63
+ } else if (row.category === "mcp") {
64
+ mcpCalls += 1;
65
+ if (row.status === "failed") mcpFailures += 1;
66
+ }
67
+
68
+ if (isShellCall(row)) {
69
+ shellCalls += 1;
70
+ if (row.status === "failed") shellFailures += 1;
71
+ }
72
+ if (isFileRead(row)) fileReads += 1;
73
+ if (isFileWrite(row)) fileWrites += 1;
74
+ }
75
+
76
+ return {
77
+ shellCalls,
78
+ shellFailures,
79
+ fileReads,
80
+ fileWrites,
81
+ skillCalls,
82
+ mcpCalls,
83
+ mcpFailures,
84
+ toolCallsByKind,
85
+ };
86
+ }
87
+
88
+ export function createSummaryHandler(store: UsageStore) {
89
+ return async (input: RpcInput<typeof usageSummaryRpc>): Promise<UsageSummary> => {
90
+ const filter: QueryFilter = {
91
+ agentId: input.agentId,
92
+ workspaceId: input.workspaceId,
93
+ from: input.from,
94
+ to: input.to,
95
+ };
96
+ return summarizeRows(store.select(filter));
97
+ };
98
+ }
99
+
100
+ export function createListHandler(store: UsageStore) {
101
+ return async (input: RpcInput<typeof usageListRpc>): Promise<UsageListResult> => {
102
+ const filter: QueryFilter = {
103
+ agentId: input.agentId,
104
+ category: input.category,
105
+ confidence: input.confidence,
106
+ skillName: input.skillName,
107
+ mcpServer: input.mcpServer,
108
+ from: input.from,
109
+ to: input.to,
110
+ };
111
+ const matched = store.select(filter).sort((a, b) => {
112
+ const ta = a.ts ?? a.ingestedAt;
113
+ const tb = b.ts ?? b.ingestedAt;
114
+ return tb.localeCompare(ta);
115
+ });
116
+ const offset = input.offset ?? 0;
117
+ const limit = input.limit ?? 200;
118
+ const page = matched.slice(offset, offset + limit);
119
+ return {
120
+ total: matched.length,
121
+ rows: page.map((row) => ({
122
+ agentId: row.agentId,
123
+ callId: row.callId,
124
+ provider: row.provider,
125
+ name: row.name,
126
+ category: row.category,
127
+ confidence: row.confidence,
128
+ skillName: row.skillName,
129
+ mcpServer: row.mcpServer,
130
+ mcpTool: row.mcpTool,
131
+ command: row.command,
132
+ status: row.status,
133
+ ts: row.ts,
134
+ ingestedAt: row.ingestedAt,
135
+ })),
136
+ };
137
+ };
138
+ }
139
+
140
+ function skillRootsForQuery(
141
+ paseo: PaseoApi,
142
+ agentId: string | undefined,
143
+ homeDir: string,
144
+ ): string[] {
145
+ if (!agentId) return buildHomeSkillRoots(homeDir);
146
+ const handle = paseo.agents.ref(agentId);
147
+ const snapshot = handle.current();
148
+ if (snapshot?.cwd) {
149
+ return buildSkillRoots(agentFromSnapshot(snapshot), homeDir);
150
+ }
151
+ return buildHomeSkillRoots(homeDir);
152
+ }
153
+
154
+ export function createSkillsByNameHandler(store: UsageStore) {
155
+ return async (
156
+ input: RpcInput<typeof usageSkillsByNameRpc>,
157
+ context: { paseo: PaseoApi },
158
+ ): Promise<RpcOutput<typeof usageSkillsByNameRpc>> => {
159
+ const homeDir = homedir();
160
+ const rows = store.select({
161
+ agentId: input.agentId,
162
+ workspaceId: input.workspaceId,
163
+ category: "skill",
164
+ from: input.from,
165
+ to: input.to,
166
+ });
167
+ const roots = skillRootsForQuery(context.paseo, input.agentId, homeDir);
168
+ const items = finalizeSkillPaths(aggregateSkillsByName(rows), roots, homeDir);
169
+ return { items };
170
+ };
171
+ }
172
+
173
+ export function createMcpByToolHandler(store: UsageStore) {
174
+ return async (
175
+ input: RpcInput<typeof usageMcpByToolRpc>,
176
+ ): Promise<RpcOutput<typeof usageMcpByToolRpc>> => {
177
+ const rows = store.select({
178
+ agentId: input.agentId,
179
+ workspaceId: input.workspaceId,
180
+ category: "mcp",
181
+ from: input.from,
182
+ to: input.to,
183
+ });
184
+ return { items: aggregateMcpByTool(rows) };
185
+ };
186
+ }
187
+
188
+ export function createByProviderHandler(store: UsageStore) {
189
+ return async (
190
+ input: RpcInput<typeof usageByProviderRpc>,
191
+ ): Promise<RpcOutput<typeof usageByProviderRpc>> => {
192
+ const rows = store.select({
193
+ workspaceId: input.workspaceId,
194
+ from: input.from,
195
+ to: input.to,
196
+ });
197
+ const agents = store.selectAgents({
198
+ workspaceId: input.workspaceId,
199
+ from: input.from,
200
+ to: input.to,
201
+ });
202
+ const homeDir = homedir();
203
+ const result = aggregateByProvider(rows, agents, store.selectUserMessages(input));
204
+ // Global view: home / plugin roots only (no project cwd — avoids cross-workspace hits).
205
+ const roots = buildHomeSkillRoots(homeDir);
206
+ return {
207
+ ...result,
208
+ providers: result.providers.map((provider) => ({
209
+ ...provider,
210
+ skills: finalizeSkillPaths(provider.skills, roots, homeDir),
211
+ })),
212
+ };
213
+ };
214
+ }
215
+
216
+ export function createActivityByDayHandler(store: UsageStore) {
217
+ return async (
218
+ input: RpcInput<typeof usageActivityByDayRpc>,
219
+ ): Promise<RpcOutput<typeof usageActivityByDayRpc>> => {
220
+ const rows = store.select({
221
+ workspaceId: input.workspaceId,
222
+ from: input.from,
223
+ to: input.to,
224
+ });
225
+ const agents = store.selectAgents({
226
+ workspaceId: input.workspaceId,
227
+ from: input.from,
228
+ to: input.to,
229
+ provider: input.provider,
230
+ });
231
+ return {
232
+ days: aggregateActivityByDay(rows, {
233
+ provider: input.provider,
234
+ agents,
235
+ messages: store.selectUserMessages(input),
236
+ }),
237
+ };
238
+ };
239
+ }
240
+
241
+ const MAX_SKILL_BYTES = 512 * 1024;
242
+
243
+ function isPathInside(absolute: string, root: string): boolean {
244
+ const abs = resolve(absolute);
245
+ const base = resolve(root);
246
+ return abs === base || abs.startsWith(base.endsWith(sep) ? base : `${base}${sep}`);
247
+ }
248
+
249
+ function assertAllowedSkillPath(absolute: string, homeDir: string): string {
250
+ const normalized = absolute.replace(/\\/g, "/");
251
+ if (!/\/SKILL\.md$/i.test(normalized)) {
252
+ throw new Error("Skill path must end with SKILL.md");
253
+ }
254
+ let real = absolute;
255
+ try {
256
+ real = realpathSync(absolute);
257
+ } catch {
258
+ throw new Error("Skill file not found");
259
+ }
260
+ const roots = buildHomeSkillRoots(homeDir);
261
+ const underHome =
262
+ roots.some((root) => isPathInside(absolute, root) || isPathInside(real, root));
263
+ const underDefault =
264
+ matchSkillFile(absolute, DEFAULT_SKILL_ROOTS, homeDir) != null &&
265
+ matchSkillFile(real, DEFAULT_SKILL_ROOTS, homeDir) != null;
266
+ if (!underHome && !underDefault) {
267
+ throw new Error("Skill path not allowed");
268
+ }
269
+ let size = 0;
270
+ try {
271
+ size = statSync(real).size;
272
+ } catch {
273
+ throw new Error("Skill file not found");
274
+ }
275
+ if (size > MAX_SKILL_BYTES) {
276
+ throw new Error("Skill file too large");
277
+ }
278
+ return real;
279
+ }
280
+
281
+ export function createReadSkillHandler() {
282
+ return async (
283
+ input: RpcInput<typeof usageReadSkillRpc>,
284
+ ): Promise<RpcOutput<typeof usageReadSkillRpc>> => {
285
+ const raw = input.path.trim();
286
+ if (!raw || raw.includes("\0")) {
287
+ throw new Error("Invalid skill path");
288
+ }
289
+ const homeDir = homedir();
290
+ const absolute = resolve(expandHomePath(raw, homeDir));
291
+ const real = assertAllowedSkillPath(absolute, homeDir);
292
+ const body = await readFile(real, "utf8");
293
+ const skillName =
294
+ /SKILL\.md$/i.test(real) ? basename(dirname(real)) : null;
295
+ return { path: collapseHomePath(absolute, homeDir), skillName, body };
296
+ };
297
+ }
298
+
299
+ export function buildExportMarkdown(
300
+ rows: readonly ToolCallRow[],
301
+ meta: { agentId?: string; from?: string; to?: string },
302
+ ): string {
303
+ const summary = summarizeRows(rows);
304
+ const skills = aggregateSkillsByName(rows);
305
+ const mcp = aggregateMcpByTool(rows);
306
+ const shellTop = aggregateShellTop(rows);
307
+ const lines: string[] = [
308
+ "# Activity report",
309
+ "",
310
+ `- Generated: ${formatLocalDateTime(new Date().toISOString())}`,
311
+ `- Agent: ${meta.agentId ?? "all"}`,
312
+ `- From: ${formatLocalDateTime(meta.from)}`,
313
+ `- To: ${formatLocalDateTime(meta.to)}`,
314
+ "",
315
+ "## Overview",
316
+ "",
317
+ `| Metric | Count |`,
318
+ `| --- | ---: |`,
319
+ `| Shell | ${summary.shellCalls} (${summary.shellFailures} failed) |`,
320
+ `| File reads | ${summary.fileReads} |`,
321
+ `| File writes | ${summary.fileWrites} |`,
322
+ `| Skills (exact) | ${summary.skillCalls.exact} |`,
323
+ `| Skills (inferred) | ${summary.skillCalls.inferred} |`,
324
+ `| Skills (low) | ${summary.skillCalls.low} |`,
325
+ `| MCP | ${summary.mcpCalls} (${summary.mcpFailures} failed) |`,
326
+ "",
327
+ "## Skills by name",
328
+ "",
329
+ `| Skill | Exact | Inferred | Low (ref) | Total (ex. low) | Last used |`,
330
+ `| --- | ---: | ---: | ---: | ---: | --- |`,
331
+ ];
332
+ for (const s of skills) {
333
+ lines.push(
334
+ `| ${s.skillName} | ${s.exact} | ${s.inferred} | ${s.low} | ${s.total} | ${formatLocalDateTime(s.lastUsedAt)} |`,
335
+ );
336
+ }
337
+ if (skills.length === 0) lines.push("| — | 0 | 0 | 0 | 0 | — |");
338
+
339
+ lines.push("", "## MCP by tool", "", `| Server | Tool | Count | Failures |`, `| --- | --- | ---: | ---: |`);
340
+ for (const m of mcp) {
341
+ lines.push(`| ${m.server} | ${m.tool} | ${m.count} | ${m.failures} |`);
342
+ }
343
+ if (mcp.length === 0) lines.push("| — | — | 0 | 0 |");
344
+
345
+ lines.push("", "## Shell top commands", "", `| Command | Count | Failures |`, `| --- | ---: | ---: |`);
346
+ for (const s of shellTop) {
347
+ lines.push(`| \`${s.command}\` | ${s.count} | ${s.failures} |`);
348
+ }
349
+ if (shellTop.length === 0) lines.push("| — | 0 | 0 |");
350
+
351
+ lines.push("");
352
+ return lines.join("\n");
353
+ }
354
+
355
+ export function createExportHandler(store: UsageStore) {
356
+ return async (
357
+ input: RpcInput<typeof usageExportRpc>,
358
+ ): Promise<RpcOutput<typeof usageExportRpc>> => {
359
+ const rows = store.select({
360
+ agentId: input.agentId,
361
+ from: input.from,
362
+ to: input.to,
363
+ });
364
+ return {
365
+ markdown: buildExportMarkdown(rows, {
366
+ agentId: input.agentId,
367
+ from: input.from,
368
+ to: input.to,
369
+ }),
370
+ };
371
+ };
372
+ }
373
+
374
+ function agentFromSnapshot(agent: {
375
+ id: string;
376
+ workspaceId?: string | null;
377
+ parentAgentId?: string | null;
378
+ provider: string;
379
+ cwd: string;
380
+ title?: string | null;
381
+ }): PluginHookAgent {
382
+ return {
383
+ id: agent.id,
384
+ workspaceId: agent.workspaceId ?? null,
385
+ parentAgentId: agent.parentAgentId ?? null,
386
+ provider: agent.provider,
387
+ cwd: agent.cwd,
388
+ title: agent.title ?? null,
389
+ };
390
+ }
391
+
392
+ function ingestCanonicalPage(
393
+ store: UsageStore,
394
+ agent: PluginHookAgent,
395
+ entries: ReadonlyArray<{
396
+ item: AgentTimelineItem;
397
+ turnId?: string;
398
+ timestamp: string;
399
+ seqStart: number;
400
+ }>,
401
+ homeDir: string,
402
+ mcpServers: readonly string[],
403
+ model: string | null = null,
404
+ ): number {
405
+ const skillRoots = buildSkillRoots(agent, homeDir);
406
+ const ingestedAt = new Date().toISOString();
407
+ const rows: ToolCallRow[] = [];
408
+ const messages: UserMessageRow[] = [];
409
+ for (const entry of entries) {
410
+ messages.push(...ingestUserMessages([entry.item], agent, {
411
+ turnId: entry.turnId,
412
+ seq: entry.seqStart,
413
+ ts: entry.timestamp,
414
+ ingestedAt,
415
+ model,
416
+ }));
417
+ if (entry.item.type !== "tool_call") continue;
418
+ rows.push(
419
+ toolCallToRow(entry.item, agent, {
420
+ skillRoots,
421
+ homeDir,
422
+ mcpServers,
423
+ turnId: entry.turnId ?? null,
424
+ seq: entry.seqStart,
425
+ ts: entry.timestamp,
426
+ ingestedAt,
427
+ }),
428
+ );
429
+ }
430
+ store.upsertUserMessages(messages);
431
+ if (rows.length === 0) return 0;
432
+ store.upsertMany(rows);
433
+ return rows.length;
434
+ }
435
+
436
+ export type HistoryScanResult = {
437
+ syncedAgents: number;
438
+ inserted: number;
439
+ errors: Array<{ agentId: string; message: string }>;
440
+ };
441
+
442
+ export async function resyncAgents(
443
+ store: UsageStore,
444
+ paseo: PaseoApi,
445
+ agentIds?: string[],
446
+ signal?: AbortSignal,
447
+ listedEntries?: ReadonlyArray<{ agent: Parameters<typeof agentRowFromSnapshot>[0] & {
448
+ id: string;
449
+ provider: string;
450
+ cwd: string;
451
+ updatedAt?: string;
452
+ lastUserMessageAt?: string | null;
453
+ } }>,
454
+ ): Promise<HistoryScanResult> {
455
+ if (signal?.aborted) throw new Error("History scan canceled");
456
+ const homeDir = homedir();
457
+ const listed = listedEntries
458
+ ? { entries: listedEntries }
459
+ : await paseo.agents.list();
460
+ const targets = listed.entries
461
+ .map((entry) => entry.agent)
462
+ .filter((agent) => !agentIds || agentIds.includes(agent.id));
463
+
464
+ let syncedAgents = 0;
465
+ let inserted = 0;
466
+ const errors: Array<{ agentId: string; message: string }> = [];
467
+
468
+ for (const snapshot of targets) {
469
+ if (signal?.aborted) throw new Error("History scan canceled");
470
+ try {
471
+ store.upsertAgents([agentRowFromSnapshot(snapshot)]);
472
+ const agent = agentFromSnapshot(snapshot);
473
+ const model = normalizeModelId(
474
+ "model" in snapshot ? (snapshot as { model?: unknown }).model : null,
475
+ );
476
+ const timeline = paseo.agents.ref(agent.id).timeline;
477
+ const mcpServers = resolveMcpServers({
478
+ homeDir,
479
+ cwd: agent.cwd,
480
+ agentId: agent.id,
481
+ });
482
+ let pageInserted = 0;
483
+
484
+ // Always full-scan (tail → older). Upserts are idempotent and re-apply
485
+ // classification so OpenCode MCP server-list fixes rewrite prior rows.
486
+ let page = await timeline.refetch({
487
+ projection: "canonical",
488
+ direction: "tail",
489
+ limit: 500,
490
+ });
491
+ if (signal?.aborted) throw new Error("History scan canceled");
492
+ if (page.error) throw new Error(page.error);
493
+ const newest = page.endCursor;
494
+ const previous = store.getSyncState(agent.id);
495
+ if (newest && previous && previous.epoch !== newest.epoch) {
496
+ // Timeline replacement reshuffles seq; drop hash-keyed anonymous messages.
497
+ store.deleteCanonicalUserMessages(agent.id);
498
+ }
499
+ for (;;) {
500
+ if (signal?.aborted) throw new Error("History scan canceled");
501
+ pageInserted += ingestCanonicalPage(
502
+ store,
503
+ agent,
504
+ page.entries,
505
+ homeDir,
506
+ mcpServers,
507
+ model,
508
+ );
509
+ if (!page.hasOlder || !page.startCursor) break;
510
+ page = await timeline.refetch({
511
+ projection: "canonical",
512
+ direction: "before",
513
+ cursor: page.startCursor,
514
+ limit: 500,
515
+ });
516
+ if (page.error) throw new Error(page.error);
517
+ }
518
+ if (newest) store.setSyncState(agent.id, newest.epoch, newest.seq);
519
+
520
+ syncedAgents += 1;
521
+ inserted += pageInserted;
522
+ } catch (error) {
523
+ errors.push({
524
+ agentId: snapshot.id,
525
+ message: error instanceof Error ? error.message : String(error),
526
+ });
527
+ }
528
+ }
529
+
530
+ return { syncedAgents, inserted, errors };
531
+ }
@@ -0,0 +1,14 @@
1
+ import type { PluginHookContext, PluginLifecycleEvents } from "@getpaseo/plugin/server";
2
+
3
+ /**
4
+ * Host types re-derived from the plugin SDK.
5
+ *
6
+ * Plugins must only import host-provided specifiers (`@getpaseo/plugin*`, zod,
7
+ * react, react-native, @tanstack/react-query, node builtins): Paseo compiles
8
+ * plugin sources without installing dependencies, so direct `@getpaseo/protocol`
9
+ * or `@getpaseo/client` imports fail the runtime-boundary build.
10
+ */
11
+ export type AgentTimelineItem =
12
+ PluginLifecycleEvents["agent.turn_ended"]["timeline"][number];
13
+
14
+ export type PaseoApi = PluginHookContext["paseo"];