@lensmcp/protocol-types 1.26.22 → 1.26.23

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/lib/canvas.d.ts CHANGED
@@ -702,9 +702,9 @@ export declare const CANVAS_FRAME_PARAMS: {
702
702
  readonly 'canvas/open-ref': z.ZodObject<{
703
703
  kind: z.ZodEnum<{
704
704
  file: "file";
705
+ canvas: "canvas";
705
706
  goal: "goal";
706
707
  task: "task";
707
- canvas: "canvas";
708
708
  }>;
709
709
  id: z.ZodString;
710
710
  line: z.ZodOptional<z.ZodNumber>;
@@ -111,7 +111,27 @@ export interface DashDesignVersion {
111
111
  decision?: DashDesignDecision;
112
112
  /** Who wrote it. Absent on a version stored before it was recorded: {@link designWriter} reads what `by` alone says. */
113
113
  writer?: DashDesignWriter;
114
+ /**
115
+ * How its document is written: `mdx` — LensMCP's canvas components may stand in it (planning/team/20 DF-D2, as
116
+ * canvases changed it). Absent: Markdown, drawn as a canvas with what MDX would read as code escaped.
117
+ */
118
+ format?: 'mdx';
119
+ /** The canvas this version is drawn as (its questions are the canvas's decisions). Absent: not drawn as one yet. */
120
+ canvas?: DashDesignCanvasRef;
114
121
  }
122
+ /**
123
+ * One version of a design as a canvas: the canvas (`cv-…`, one per design, linked to its goal) and its version. Its
124
+ * decisions are the design's questions — `qid` `q1`…, each option `o1`… the design's option 1… — answered in the
125
+ * canvas; the person's verdict (Approve, Ask for changes, Decline) stays the design's.
126
+ */
127
+ export interface DashDesignCanvasRef {
128
+ id: string;
129
+ version: number;
130
+ }
131
+ /** The canvas decision a design question is: its `qid` is the question's id (`q1`); an option `o<n>` is option n. */
132
+ export declare const designOptionId: (n: number) => string;
133
+ /** The design option an answer in its canvas picked (`o2` → 2), or undefined. */
134
+ export declare function designOptionOf(value: unknown): number | undefined;
115
135
  /**
116
136
  * Who wrote a version: what its hand-in recorded, else what `by` alone says — the person (`user`) and LensMCP's own run
117
137
  * (`lensmcp`) were always told apart. Undefined: handed in as the overseer before the hand-in recorded who it was.
@@ -176,6 +196,8 @@ export interface DashGoalDesign {
176
196
  };
177
197
  /** Where the approved design is committed by the goal's branch (DF-D13), repository-relative. */
178
198
  file?: string;
199
+ /** The canvas its versions are drawn as (`cv-…`): one per design, a canvas version per design version. */
200
+ canvas?: string;
179
201
  }
180
202
  /** A design on the Inbox › Designs list. */
181
203
  export interface DashDesignBrief {
@@ -196,6 +218,8 @@ export interface DashDesignBrief {
196
218
  updatedAt: number;
197
219
  /** What the person decides on in the newest version: its budget, and its Summary's «Risk:» and «Not proved here:». */
198
220
  decision?: DashDesignDecision;
221
+ /** The newest version as a canvas: the canvas's own pages (Canvases, a canvas opened anywhere) answer it too. */
222
+ canvas?: DashDesignCanvasRef;
199
223
  }
200
224
  export interface DashDesignsAnswer {
201
225
  designs: DashDesignBrief[];
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var a=(n,e)=>i(n,"name",{value:e,configurable:!0});var o=Object.defineProperty,r=a((n,e)=>o(n,"name",{value:e,configurable:!0}),"a");export const DESIGN_TYPES=["bug","investigation","performance","reliability","feature","architecture","maintenance"],DESIGN_CONCERNS=["security","data","api","ui","integration","operations"],DESIGN_TYPE_INFO={bug:{label:"Bug",when:"Something works wrong, and the cause is known or can be found by reading the code."},investigation:{label:"Investigation",when:"Symptoms without a known cause: research first, and the goal ends in a decision or a fix."},performance:{label:"Performance",when:"Something is measurably slow, heavy or costly: a baseline the lens measured and a target."},reliability:{label:"Reliability",when:"Crashes, stalls, flaky tests, lost work, CI or the machine: how it fails and how often."},feature:{label:"Feature",when:"Someone can do something they cannot do now."},architecture:{label:"Architecture",when:"Boundaries, contracts or structure change, in steps that each ship."},maintenance:{label:"Maintenance",when:"Upgrades, moves, tooling and cleanup: no new behaviour, and nothing breaks."}},DESIGN_CONCERN_INFO={security:{label:"Security",when:"Auth, permissions, secrets, input from outside, or anything an attacker would read."},data:{label:"Data",when:"Schema, migrations, backfills, or data already stored."},api:{label:"API",when:"A request or response other code or other people depend on."},ui:{label:"UI",when:"Screens, flows or what a person sees."},integration:{label:"Integration",when:"A service outside the repository: its API, keys, limits and failures."},operations:{label:"Operations",when:"How it deploys, runs, is watched and is rolled back."}},DESIGN_STAGES=["proposed","requested","drafting","waiting","changes","approved","declined"];export function designWriter(n){if(n.writer)return n.writer;if(n.by==="user")return{kind:"person"};if(n.by==="lensmcp")return{kind:"lensmcp",...n.byName?{name:n.byName}:{}}}a(designWriter,"designWriter"),r(designWriter,"designWriter");const s={claude:"Claude Code",codex:"Codex"};export function designWriterText(n){const e=designWriter(n);if(!e)return"who handed it in was not recorded";const t=e.client?s[e.client]:void 0;switch(e.kind){case"person":return"written by the person";case"lensmcp":return"written by LensMCP's own run";case"terminal":return"handed in from a terminal, as the overseer";case"session":return`handed in by ${t?`a ${t}`:"an agent's"} session${e.role?`, the team's ${e.role}`:" with no role on this team"}`;case"launch":return e.purpose==="design"?`written by a design launch${t?` on ${t}`:""}`:`handed in by the overseer's ${e.purpose==="inbox"?"inbox launch":e.purpose==="round"?"round":"launch"}${t?` on ${t}`:""}`}}a(designWriterText,"designWriterText"),r(designWriterText,"designWriterText");
1
+ "use strict";var i=Object.defineProperty;var r=(e,n)=>i(e,"name",{value:n,configurable:!0});var o=Object.defineProperty,a=r((e,n)=>o(e,"name",{value:n,configurable:!0}),"r");export const DESIGN_TYPES=["bug","investigation","performance","reliability","feature","architecture","maintenance"],DESIGN_CONCERNS=["security","data","api","ui","integration","operations"],DESIGN_TYPE_INFO={bug:{label:"Bug",when:"Something works wrong, and the cause is known or can be found by reading the code."},investigation:{label:"Investigation",when:"Symptoms without a known cause: research first, and the goal ends in a decision or a fix."},performance:{label:"Performance",when:"Something is measurably slow, heavy or costly: a baseline the lens measured and a target."},reliability:{label:"Reliability",when:"Crashes, stalls, flaky tests, lost work, CI or the machine: how it fails and how often."},feature:{label:"Feature",when:"Someone can do something they cannot do now."},architecture:{label:"Architecture",when:"Boundaries, contracts or structure change, in steps that each ship."},maintenance:{label:"Maintenance",when:"Upgrades, moves, tooling and cleanup: no new behaviour, and nothing breaks."}},DESIGN_CONCERN_INFO={security:{label:"Security",when:"Auth, permissions, secrets, input from outside, or anything an attacker would read."},data:{label:"Data",when:"Schema, migrations, backfills, or data already stored."},api:{label:"API",when:"A request or response other code or other people depend on."},ui:{label:"UI",when:"Screens, flows or what a person sees."},integration:{label:"Integration",when:"A service outside the repository: its API, keys, limits and failures."},operations:{label:"Operations",when:"How it deploys, runs, is watched and is rolled back."}},DESIGN_STAGES=["proposed","requested","drafting","waiting","changes","approved","declined"],designOptionId=a(e=>`o${e}`,"designOptionId");export function designOptionOf(e){const n=typeof e=="string"?/^o([1-9])$/.exec(e):null;return n?Number(n[1]):void 0}r(designOptionOf,"designOptionOf"),a(designOptionOf,"designOptionOf");export function designWriter(e){if(e.writer)return e.writer;if(e.by==="user")return{kind:"person"};if(e.by==="lensmcp")return{kind:"lensmcp",...e.byName?{name:e.byName}:{}}}r(designWriter,"designWriter"),a(designWriter,"designWriter");const s={claude:"Claude Code",codex:"Codex"};export function designWriterText(e){const n=designWriter(e);if(!n)return"who handed it in was not recorded";const t=n.client?s[n.client]:void 0;switch(n.kind){case"person":return"written by the person";case"lensmcp":return"written by LensMCP's own run";case"terminal":return"handed in from a terminal, as the overseer";case"session":return`handed in by ${t?`a ${t}`:"an agent's"} session${n.role?`, the team's ${n.role}`:" with no role on this team"}`;case"launch":return n.purpose==="design"?`written by a design launch${t?` on ${t}`:""}`:`handed in by the overseer's ${n.purpose==="inbox"?"inbox launch":n.purpose==="round"?"round":"launch"}${t?` on ${t}`:""}`}}r(designWriterText,"designWriterText"),a(designWriterText,"designWriterText");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/protocol-types",
3
- "version": "1.26.22",
3
+ "version": "1.26.23",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",