@lensmcp/protocol-types 1.26.15 → 1.26.16

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.
@@ -80,6 +80,18 @@ export interface DashConversationTurn {
80
80
  /** Files it changed (a tool call's edits). */
81
81
  files?: string[];
82
82
  }
83
+ /** How much an action item matters (an older item, made before summaries ranked them, reads as `normal`). */
84
+ export type DashConversationPriority = 'high' | 'normal' | 'low';
85
+ /** How bad a risk would be (an older summary's risks read as `medium`). */
86
+ export type DashConversationSeverity = 'high' | 'medium' | 'low';
87
+ /** Who an action item is for: the person, an agent (its role in `owner`), or whoever takes it (an older item: `anyone`). */
88
+ export type DashConversationOwnerKind = 'person' | 'agent' | 'anyone';
89
+ /** One beat of a summary's story: what happened over turns `fromSeq`–`toSeq`, in a sentence. */
90
+ export interface DashConversationStoryBeat {
91
+ text: string;
92
+ fromSeq: number;
93
+ toSeq: number;
94
+ }
83
95
  /** A rolling summary: it covers turns 1..`throughSeq`; the next one reads it and the turns after. */
84
96
  export interface DashConversationSummary {
85
97
  at: number;
@@ -95,6 +107,10 @@ export interface DashConversationSummary {
95
107
  model: string;
96
108
  costUsd?: number;
97
109
  trigger: DashAiTrigger;
110
+ /** 3–6 beats of what happened over turns 1..`throughSeq`, in order. An older summary has none: the tab splits its prose. */
111
+ story?: DashConversationStoryBeat[];
112
+ /** How bad each of `risks` would be, by index. An older summary has none: each of its risks reads as `medium`. */
113
+ riskSeverity?: DashConversationSeverity[];
98
114
  }
99
115
  export type DashConversationItemKind = 'action' | 'memory' | 'decision';
100
116
  export type DashConversationItemState = 'proposed' | 'kept' | 'dropped' | 'done';
@@ -105,7 +121,11 @@ export interface DashConversationItem {
105
121
  kind: DashConversationItemKind;
106
122
  text: string;
107
123
  why?: string;
124
+ /** An action item's owner as the summary named it: the person's name, an agent's role — absent for anyone. */
108
125
  owner?: string;
126
+ /** An action item's: who it is for (absent on an older item: `anyone`) and how much it matters (absent: `normal`). */
127
+ ownerKind?: DashConversationOwnerKind;
128
+ priority?: DashConversationPriority;
109
129
  state: DashConversationItemState;
110
130
  /**
111
131
  * The repository files it is about, as the conversation named them: the files a kept memory's lesson rests on (cites)
@@ -183,7 +203,86 @@ export interface DashConversationSummarizeAnswer {
183
203
  /** Why the passes stopped before the newest turn, when one failed after others held (their summary is kept). */
184
204
  stopped?: string;
185
205
  allowance?: DashConversationAllowance;
206
+ /** How long it took, from the click to the summary kept. */
207
+ madeInMs?: number;
208
+ }
209
+ /**
210
+ * A summary being made, as the dashboard tracks it — one at a time per conversation (a second «Summarize» waits for it):
211
+ * `GET /api/conversations/summarize/progress?id=` answers the running one, or the last one for two minutes after it
212
+ * ended, so a reload mid-run or right after shows it. Stages in order: `reading` the turns, then per pass `asking` the
213
+ * model and `checking` its answer, then `saving` — and `done` or `failed`.
214
+ */
215
+ export type DashSummaryJobStage = 'reading' | 'asking' | 'checking' | 'saving' | 'done' | 'failed';
216
+ export interface DashSummaryJob {
217
+ /** `sj-` + hex: this run's own id. */
218
+ id: string;
219
+ conversation: ConversationId;
220
+ trigger: DashAiTrigger;
221
+ model: string;
222
+ provider: 'anthropic' | 'openai';
223
+ /** The provider streams its answer (Anthropic): output counts up as it is written. Else (OpenAI) it answers whole — only the time waited shows. */
224
+ streams: boolean;
225
+ startedAt: number;
226
+ endedAt?: number;
227
+ stage: DashSummaryJobStage;
228
+ /** The pass being made, from 1 (0 while reading), and how many it will make — from the turns left and a pass's input budget; fewer when one fails or it is stopped. */
229
+ pass: number;
230
+ passes: number;
231
+ /**
232
+ * Turns: `from`–`to` this pass reads; `through` the newest summary covers so far (this run's finished passes in);
233
+ * `start` the summary it began from covered (0: none); `end` the last turn this run will read; `total` the conversation's.
234
+ */
235
+ turns: {
236
+ from: number;
237
+ to: number;
238
+ through: number;
239
+ total: number;
240
+ start: number;
241
+ end: number;
242
+ };
243
+ /**
244
+ * Tokens: `input` this pass sent (the provider's count once it says, an estimate until then), `output` this pass wrote
245
+ * so far (counted from the stream as it comes — `estimated` until the pass ends with the provider's usage), and every
246
+ * pass's together.
247
+ */
248
+ tokens: {
249
+ input: number;
250
+ output: number;
251
+ inputTotal: number;
252
+ outputTotal: number;
253
+ estimated: boolean;
254
+ };
255
+ /** Spent so far (estimated USD): the finished passes' usage, and the pass being written priced from its tokens so far. */
256
+ costUsd: number;
257
+ elapsedMs: number;
258
+ /** What is left today of the allowance it spends from (UTC). */
259
+ allowanceLeftUsd?: number;
260
+ /** The person asked it to stop: no pass starts after the one being written — that pass is still paid, and kept. */
261
+ stopping?: boolean;
262
+ /**
263
+ * Why it failed — the allowance's words, the model's refusal, an answer that did not hold — what it spent all the
264
+ * same, the AI calls page's run of the call that failed, and the stage it failed at.
265
+ */
266
+ error?: {
267
+ message: string;
268
+ reason: string;
269
+ costUsd?: number;
270
+ runId?: string;
271
+ at?: Exclude<DashSummaryJobStage, 'done' | 'failed'>;
272
+ };
273
+ /** What it made, once done: what «Summarize» answers. */
274
+ answer?: DashConversationSummarizeAnswer;
275
+ }
276
+ /** `GET /api/conversations/summarize/progress?id=`: the conversation's running summary, or the last one for two minutes after; none: `{}`. */
277
+ export interface DashSummaryProgressAnswer {
278
+ job?: DashSummaryJob;
279
+ }
280
+ /** `POST /api/conversations/summarize/stop` `{ id }`: no pass starts after the one being written. Answers the job as it is. */
281
+ export interface DashSummaryStopRequest {
282
+ id: ConversationId;
186
283
  }
284
+ /** A finished summary run stays readable on the progress route this long after it ended. */
285
+ export declare const SUMMARY_JOB_KEEP_MS = 120000;
187
286
  /**
188
287
  * `GET /api/conversations/summarizer?client=` — what a summary of a conversation of that client runs on: its model and
189
288
  * provider (Settings › Features › AI — Codex conversations their own choice, CV-D4), whether LensMCP summarizes by
@@ -1 +1 @@
1
- "use strict";export const CONVERSATION_ID=/^cv-[0-9a-f]{16}$/,CONVERSATION_HANDOFF_SUMMARY_TURNS=30,CONVERSATION_LIST_LIMIT=20,CONVERSATION_LIST_MAX=100,CONVERSATION_HANDOFF_TOKENS=12e3,CONVERSATION_TURN_CHARS=16384,CONVERSATION_TOOL_OUTPUT_CHARS=2048,CONVERSATION_KEEP_DAYS=180;
1
+ "use strict";export const CONVERSATION_ID=/^cv-[0-9a-f]{16}$/,SUMMARY_JOB_KEEP_MS=12e4,CONVERSATION_HANDOFF_SUMMARY_TURNS=30,CONVERSATION_LIST_LIMIT=20,CONVERSATION_LIST_MAX=100,CONVERSATION_HANDOFF_TOKENS=12e3,CONVERSATION_TURN_CHARS=16384,CONVERSATION_TOOL_OUTPUT_CHARS=2048,CONVERSATION_KEEP_DAYS=180;
package/lib/peers.d.ts CHANGED
@@ -1204,8 +1204,8 @@ export declare const MAIN_MIRROR_SCHEMAS: {
1204
1204
  sent: z.ZodBoolean;
1205
1205
  }, z.core.$strict>>;
1206
1206
  follow: z.ZodEnum<{
1207
- waiting: "waiting";
1208
1207
  "in-step": "in-step";
1208
+ waiting: "waiting";
1209
1209
  "fast-forward": "fast-forward";
1210
1210
  ahead: "ahead";
1211
1211
  "to-update": "to-update";
@@ -1265,8 +1265,8 @@ export declare const MAIN_MIRROR_ANSWER_SCHEMAS: {
1265
1265
  needWhole: z.ZodOptional<z.ZodBoolean>;
1266
1266
  why: z.ZodOptional<z.ZodString>;
1267
1267
  follow: z.ZodOptional<z.ZodEnum<{
1268
- waiting: "waiting";
1269
1268
  "in-step": "in-step";
1269
+ waiting: "waiting";
1270
1270
  "fast-forward": "fast-forward";
1271
1271
  ahead: "ahead";
1272
1272
  "to-update": "to-update";
@@ -1316,8 +1316,8 @@ export declare const PEER_WORK_SCHEMAS: {
1316
1316
  at: z.ZodNumber;
1317
1317
  started: z.ZodOptional<z.ZodLiteral<true>>;
1318
1318
  state: z.ZodOptional<z.ZodEnum<{
1319
- queued: "queued";
1320
1319
  running: "running";
1320
+ queued: "queued";
1321
1321
  }>>;
1322
1322
  note: z.ZodOptional<z.ZodString>;
1323
1323
  queue: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1333,8 +1333,8 @@ export declare const PEER_WORK_SCHEMAS: {
1333
1333
  runId: z.ZodString;
1334
1334
  at: z.ZodNumber;
1335
1335
  state: z.ZodEnum<{
1336
- passed: "passed";
1337
1336
  failed: "failed";
1337
+ passed: "passed";
1338
1338
  errored: "errored";
1339
1339
  cancelled: "cancelled";
1340
1340
  timeout: "timeout";
@@ -1819,8 +1819,8 @@ export declare const GOAL_PEER_SCHEMAS: {
1819
1819
  readonly 'goal.changes': z.ZodObject<{
1820
1820
  goal: z.ZodString;
1821
1821
  what: z.ZodEnum<{
1822
- files: "files";
1823
1822
  commit: "commit";
1823
+ files: "files";
1824
1824
  row: "row";
1825
1825
  diff: "diff";
1826
1826
  commits: "commits";
@@ -2084,8 +2084,8 @@ export declare const CONVERSATION_PEER_SCHEMAS: {
2084
2084
  name: z.ZodString;
2085
2085
  target: z.ZodOptional<z.ZodString>;
2086
2086
  outcome: z.ZodOptional<z.ZodEnum<{
2087
- error: "error";
2088
2087
  ok: "ok";
2088
+ error: "error";
2089
2089
  }>>;
2090
2090
  output: z.ZodOptional<z.ZodString>;
2091
2091
  }, z.core.$strict>>;
@@ -2094,8 +2094,8 @@ export declare const CONVERSATION_PEER_SCHEMAS: {
2094
2094
  settles: z.ZodOptional<z.ZodArray<z.ZodObject<{
2095
2095
  seq: z.ZodNumber;
2096
2096
  outcome: z.ZodEnum<{
2097
- error: "error";
2098
2097
  ok: "ok";
2098
+ error: "error";
2099
2099
  }>;
2100
2100
  output: z.ZodOptional<z.ZodString>;
2101
2101
  }, z.core.$strict>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/protocol-types",
3
- "version": "1.26.15",
3
+ "version": "1.26.16",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",