@lensmcp/protocol-types 1.26.12 → 1.26.13
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/index.d.ts +1 -0
- package/index.js +1 -1
- package/lib/accounts.d.ts +60 -0
- package/lib/accounts.js +1 -0
- package/lib/ai-cache-facts.js +1 -1
- package/lib/ai-cache-verdict.js +1 -1
- package/lib/ai-cache.js +3 -3
- package/lib/ai-call-groups.js +2 -2
- package/lib/ai-call-row.js +3 -3
- package/lib/ai-call.js +9 -9
- package/lib/ai-compare.js +3 -3
- package/lib/ai-context.js +6 -6
- package/lib/ai-origins.js +9 -9
- package/lib/ai-together.js +5 -5
- package/lib/bounded-clone.js +1 -1
- package/lib/bounded-map.js +1 -1
- package/lib/bounded-writer.js +1 -1
- package/lib/capture-demand.js +1 -1
- package/lib/dashboard-path.js +1 -1
- package/lib/docker-errors.js +1 -1
- package/lib/docker-jobs.js +1 -1
- package/lib/docker-report.js +2 -2
- package/lib/docker-runs.js +3 -3
- package/lib/error-cause.js +6 -6
- package/lib/error-dismissal.js +1 -1
- package/lib/error-verdict.js +3 -3
- package/lib/event-loop.js +1 -1
- package/lib/expected-failure.js +2 -2
- package/lib/finding-proof.js +1 -1
- package/lib/flood-guard.js +1 -1
- package/lib/goal-design.js +1 -1
- package/lib/host-agents.js +1 -1
- package/lib/lint-coverage.js +1 -1
- package/lib/log-query.js +1 -1
- package/lib/metrics-reset.js +1 -1
- package/lib/overseer-findings.js +1 -1
- package/lib/peers.d.ts +1 -1
- package/lib/peers.js +1 -1
- package/lib/perf-rules.js +1 -1
- package/lib/pod-memory.js +1 -1
- package/lib/producer-health.js +1 -1
- package/lib/remote-instances.js +1 -1
- package/lib/sessions.d.ts +17 -1
- package/lib/sources.js +1 -1
- package/lib/static-checks.js +1 -1
- package/lib/system-report.js +1 -1
- package/lib/team-design.d.ts +113 -3
- package/lib/team.js +1 -1
- package/package.json +1 -1
package/lib/sources.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var U=Object.defineProperty;var u=(e,r)=>U(e,"name",{value:r,configurable:!0});var v=Object.defineProperty,c=u((e,r)=>v(e,"name",{value:r,configurable:!0}),"a"),I=Object.defineProperty,n=c((e,r)=>I(e,"name",{value:r,configurable:!0}),"r");export const SOURCE_KINDS=["queue","loop","store","traffic"],SOURCE_KINDS_READ=["queue","loop","store","traffic"],sourceWireSchema=n(e=>`lensmcp.${e}/v1`,"sourceWireSchema"),QUEUE_WIRE_SCHEMA="lensmcp.queue/v1",LOOP_WIRE_SCHEMA="lensmcp.loop/v1",STORE_WIRE_SCHEMA="lensmcp.store/v1",TRAFFIC_WIRE_SCHEMA="lensmcp.traffic/v1",SOURCE_SNAPSHOT_FIELD={queue:"snapshot",loop:"loop",store:"store",traffic:"traffic"},URI_SOURCES="process://sources",SOURCE_PROVENANCE="reported",QUEUE_OLDEST_WAIT_RULE="queue/oldest-wait",QUEUE_STALLED_RULE="queue/stalled",LOOP_OVERDUE_RULE="loop/overdue",LOOP_FAILING_RULE="loop/failing",LOOP_IDLE_RULE="loop/idle-while-fed",STORE_QUOTA_RULE="store/near-quota",STORE_ERRORS_RULE="store/errors",STORE_ORPHANS_RULE="store/orphans",TRAFFIC_FAILURES_RULE="traffic/failures",TRAFFIC_LATENCY_RULE="traffic/latency",TRAFFIC_RATE_LIMITED_RULE="traffic/rate-limited",SOURCE_RULES=[QUEUE_OLDEST_WAIT_RULE,QUEUE_STALLED_RULE,LOOP_OVERDUE_RULE,LOOP_FAILING_RULE,LOOP_IDLE_RULE,STORE_QUOTA_RULE,STORE_ERRORS_RULE,STORE_ORPHANS_RULE,TRAFFIC_FAILURES_RULE,TRAFFIC_LATENCY_RULE,TRAFFIC_RATE_LIMITED_RULE],SOURCE_EVENT_KINDS=["source-poll","source-declaration","source-event"],CUSTOM_EVENT_SOURCE="custom",QUEUE_EVENTS=["enqueued","admitted","completed","failed","parked"],LOOP_EVENTS=["run-start","run-end"],LOOP_OUTCOMES=["ok","failed","skipped"],STORE_EVENTS=["write","delete","error"],TRAFFIC_EVENTS=["inbound","outbound"],TRAFFIC_OUTCOMES=["ok","failed","rate-limited"],SOURCE_PUSH_EVENTS={queue:QUEUE_EVENTS,loop:LOOP_EVENTS,store:STORE_EVENTS,traffic:TRAFFIC_EVENTS},SOURCE_PUSH_OUTCOMES={queue:[],loop:LOOP_OUTCOMES,store:[],traffic:TRAFFIC_OUTCOMES},SOURCE_POLL_STATES=["current","unreachable","refused","malformed","not-running"],SOURCE_STATES=[...SOURCE_POLL_STATES,"stale","never-polled"],SOURCE_DEFAULT_INTERVAL_SEC=10,SOURCE_MIN_INTERVAL_SEC=2,QUEUE_DEFAULT_OLDEST_WAIT_MIN=10,QUEUE_DEFAULT_STALLED_MIN=15,LOOP_DEFAULT_IDLE_MIN=10,LOOP_OVERDUE_INTERVALS=2,LOOP_FAILING_RUNS=3,SOURCE_FULL_REPORT_MS=6e4,SOURCE_HISTORY_POINTS=60,SOURCE_RUNS_KEPT=30,SOURCE_PUSHED_KEPT=20,STORE_DEFAULT_QUOTA_PCT=90,STORE_DEFAULT_ERROR_RATE_PCT=5,STORE_DEFAULT_ORPHAN_MIN=60,TRAFFIC_DEFAULT_FAILURE_PCT=5,TRAFFIC_DEFAULT_P95_MS=2e3,TRAFFIC_DEFAULT_RATE_LIMITED=1,TRAFFIC_MIN_MESSAGES=10,TRAFFIC_PUSH_WINDOW_MS=10*6e4,TRAFFIC_PUSH_CHANNELS=50,TRAFFIC_PUSH_EVENTS_PER_CHANNEL=1e3,SOURCE_MAX_GROUPS=500,SOURCE_MAX_BYTES=256*1024,SOURCE_STALE_PERIODS=3,SOURCE_STALE_MIN_MS=3e4;export function sourceStaleAfterMs(e){return Math.max(SOURCE_STALE_MIN_MS,SOURCE_STALE_PERIODS*Math.max(0,e))}u(sourceStaleAfterMs,"sourceStaleAfterMs"),c(sourceStaleAfterMs,"sourceStaleAfterMs"),n(sourceStaleAfterMs,"sourceStaleAfterMs");const i=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),t=n(e=>typeof e=="number"&&Number.isInteger(e)&&e>=0,"isCount"),E=n(e=>typeof e=="number"&&Number.isFinite(e)&&e>0,"isTime"),a=n((e,r)=>typeof e=="string"&&e.length>0&&e.length<=r,"isStr"),L=n(e=>e===void 0||typeof e=="number"&&e>0,"isMin");function _(e){if(!SOURCE_KINDS_READ.includes(e.sourceKind)||typeof e.path!="string"&&!(e.path===void 0&&(e.sourceKind==="traffic"||e.sourceKind==="loop"))||!a(e.name,200)||typeof e.intervalSec!="number"||e.feeds!==void 0&&!a(e.feeds,200))return!1;const r=e.thresholds;if(!i(r))return!1;for(const o of["stalledMin","idleMin","oldestWaitMin","quotaPct","errorRatePct","orphanMin","failurePct","p95Ms","rateLimited"])if(!L(r[o]))return!1;return e.sourceKind!=="queue"||typeof r.oldestWaitMin=="number"}u(_,"_"),c(_,"l"),n(_,"asDecl");const d=n(e=>e===null||typeof e=="string","isIsoOrNull"),l=n(e=>e===void 0||t(e),"isOptCount");function f(e){if(!i(e)||typeof e.at!="string"||!E(e.receivedAt)||!E(e.intervalSec)||!d(e.lastRunAt)||e.nextRunAt!==void 0&&!d(e.nextRunAt))return!1;for(const r of["lastDurationMs","lastItems","runsInWindow","itemsInWindow","failuresInWindow","windowSec"])if(!l(e[r]))return!1;return e.lastOutcome!==void 0&&!LOOP_OUTCOMES.includes(e.lastOutcome)?!1:e.lastError===void 0||typeof e.lastError=="string"}u(f,"d"),c(f,"_"),n(f,"asLoopSnapshot");const T=n(e=>e===void 0||i(e)&&Object.values(e).every(r=>typeof r=="string"),"isLabels");function S(e){if(!i(e)||typeof e.at!="string"||!E(e.receivedAt)||!t(e.objects)||!t(e.bytes)||e.quotaBytes!==void 0&&e.quotaBytes!==null&&!t(e.quotaBytes))return!1;for(const s of["opsInWindow","writesInWindow","deletesInWindow","errorsInWindow","windowSec"])if(!l(e[s]))return!1;if(e.lastWriteAt!==void 0&&!d(e.lastWriteAt)||e.lastError!==void 0&&typeof e.lastError!="string")return!1;const r=e.truncated;if(r!==void 0&&!(i(r)&&t(r.groups)))return!1;const o=e.groups;return o===void 0?!0:Array.isArray(o)&&o.length<=SOURCE_MAX_GROUPS&&o.every(s=>i(s)&&a(s.group,1e3)&&t(s.objects)&&t(s.bytes)&&T(s.labels))}u(S,"S"),c(S,"S"),n(S,"asStoreSnapshot");function R(e){if(!i(e)||typeof e.at!="string"||!E(e.receivedAt)||!Array.isArray(e.channels)||!l(e.windowSec))return!1;const r=e.truncated;return r!==void 0&&!(i(r)&&t(r.channels))?!1:e.channels.length<=SOURCE_MAX_GROUPS&&e.channels.every(o=>{if(!i(o)||!a(o.channel,1e3)||!T(o.labels)||o.direction!==void 0&&o.direction!=="inbound"&&o.direction!=="outbound"||o.counterpart!==void 0&&!a(o.counterpart,200))return!1;for(const s of["messagesInWindow","failuresInWindow","rateLimitedInWindow"])if(!l(o[s]))return!1;return o.p95Ms!==void 0&&!(typeof o.p95Ms=="number"&&Number.isFinite(o.p95Ms)&&o.p95Ms>=0)||o.lastAt!==void 0&&!d(o.lastAt)?!1:o.lastError===void 0||typeof o.lastError=="string"})}u(R,"p"),c(R,"R"),n(R,"asTrafficSnapshot");function p(e){return i(e)&&a(e.digest,100)&&typeof e.at=="string"&&E(e.receivedAt)}u(p,"R"),c(p,"A"),n(p,"asSame");function A(e){if(!i(e)||!a(e.group,1e3)||!t(e.pending))return!1;for(const s of["inFlight","failed","completedInWindow"])if(e[s]!==void 0&&!t(e[s]))return!1;const r=e.oldestPendingAt;if(r!=null&&typeof r!="string")return!1;const o=e.labels;return o===void 0||i(o)&&Object.values(o).every(s=>typeof s=="string")}u(A,"A"),c(A,"O"),n(A,"asGroup");function O(e){if(!i(e)||typeof e.at!="string"||!E(e.receivedAt)||!Array.isArray(e.groups))return!1;const r=e.totals;if(!i(r)||!t(r.groups)||!t(r.pending)||!t(r.inFlight)||!t(r.failed))return!1;const o=e.truncated;return o!==void 0&&!(i(o)&&t(o.groups))?!1:e.groups.length<=SOURCE_MAX_GROUPS&&e.groups.every(A)}u(O,"O"),c(O,"T"),n(O,"asSnapshot");export function asSourcePollRaw(e){if(!i(e)||e.kind!=="source-poll"||!a(e.project,200)||!_(e)||!SOURCE_POLL_STATES.includes(e.state)||!E(e.polledAt)||!E(e.reportEveryMs)||e.path===void 0)return;const r=SOURCE_SNAPSHOT_FIELD[e.sourceKind];for(const s of Object.values(SOURCE_SNAPSHOT_FIELD))if(s!==r&&e[s]!==void 0)return;const o={snapshot:O,loop:f,store:S,traffic:R}[r];if(!(e[r]!==void 0&&!o(e[r]))&&!(e.same!==void 0&&(!p(e.same)||e[r]!==void 0))&&!(e.state==="current"&&e[r]===void 0&&e.same===void 0))return e}u(asSourcePollRaw,"asSourcePollRaw"),c(asSourcePollRaw,"asSourcePollRaw"),n(asSourcePollRaw,"asSourcePollRaw");export function asSourceEventRaw(e){if(!i(e)||e.kind!=="source-event"||!a(e.project,200)||!a(e.name,200))return;const r=e.sourceKind;if(SOURCE_KINDS_READ.includes(r)&&SOURCE_PUSH_EVENTS[r].includes(e.event)&&!(e.item!==void 0&&!a(e.item,200)||e.group!==void 0&&!a(e.group,200))&&!(!l(e.items)||!l(e.durationMs)||!l(e.bytes))&&!(e.outcome!==void 0&&!SOURCE_PUSH_OUTCOMES[r].includes(e.outcome))){for(const o of["object","channel","counterpart","correlation"])if(e[o]!==void 0&&!a(e[o],200))return;if(!(e.error!==void 0&&typeof e.error!="string"))return e}}u(asSourceEventRaw,"asSourceEventRaw"),c(asSourceEventRaw,"asSourceEventRaw"),n(asSourceEventRaw,"asSourceEventRaw");export function asSourceDeclarationRaw(e){if(!(!i(e)||e.kind!=="source-declaration"||!a(e.project,200))&&!(!Array.isArray(e.sources)||!e.sources.every(r=>i(r)&&_(r)))&&!(!Array.isArray(e.problems)||!e.problems.every(r=>typeof r=="string")))return e}u(asSourceDeclarationRaw,"asSourceDeclarationRaw"),c(asSourceDeclarationRaw,"asSourceDeclarationRaw"),n(asSourceDeclarationRaw,"asSourceDeclarationRaw");
|
package/lib/static-checks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var g=Object.defineProperty;var c=(e,n)=>g(e,"name",{value:n,configurable:!0});var y=Object.defineProperty,u=c((e,n)=>y(e,"name",{value:n,configurable:!0}),"c"),v=Object.defineProperty,l=u((e,n)=>v(e,"name",{value:n,configurable:!0}),"c");export const OWNER_WORKSPACE="(workspace)",OWNER_EXTERNAL="(external)",UNCOVERED_REASONS=["no-route","needs-build","tsgo-refused","parity-unproven","parity-differs","held-for-memory","not-in-census"],TOOL_ERROR_KINDS=["config-refused","program-error","timeout","signal","exit-without-diagnostics","spawn-failed","unparseable-output"];export function typecheckFindingKey(e){return`${e.file}:${e.line}:${e.col}:${e.code}`}c(typecheckFindingKey,"typecheckFindingKey"),u(typecheckFindingKey,"typecheckFindingKey"),l(typecheckFindingKey,"typecheckFindingKey");export function lintFindingKey(e){return`${e.file}:${e.line}:${e.col}:${e.ruleId??""}`}c(lintFindingKey,"lintFindingKey"),u(lintFindingKey,"lintFindingKey"),l(lintFindingKey,"lintFindingKey");const p=l((e,n)=>e.file<n.file?-1:e.file>n.file?1:e.line-n.line||e.col-n.col,"byPosition");export function dedupeTypecheckFindings(e,n){const i=new Map;for(const{program:t,diagnostics:r}of e)for(const o of r){const s=typecheckFindingKey(o),d=i.get(s);if(!d){i.set(s,{file:o.file,line:o.line,col:o.col,code:o.code,severity:o.severity,message:o.message,project:n(o.file),programs:[t]});continue}d.programs.includes(t)||d.programs.push(t),o.severity==="error"&&(d.severity="error")}const f=[...i.values()];for(const t of f)t.programs.sort();return f.sort((t,r)=>p(t,r)||(t.code<r.code?-1:t.code>r.code?1:0))}c(dedupeTypecheckFindings,"dedupeTypecheckFindings"),u(dedupeTypecheckFindings,"dedupeTypecheckFindings"),l(dedupeTypecheckFindings,"dedupeTypecheckFindings");export function dedupeLintFindings(e,n){const i=new Map;for(const{unit:r,messages:o}of e)for(const s of o){const d=lintFindingKey(s),a=i.get(d);if(!a){i.set(d,{file:s.file,line:s.line,col:s.col,ruleId:s.ruleId,severity:s.severity,message:s.message,project:n(s.file),units:[r],...s.fixable?{fixable:!0}:{}});continue}a.units.includes(r)||a.units.push(r),s.severity==="error"&&(a.severity="error")}const f=[...i.values()];for(const r of f)r.units.sort();const t=l(r=>r.ruleId??"","rule");return f.sort((r,o)=>p(r,o)||(t(r)<t(o)?-1:t(r)>t(o)?1:0))}c(dedupeLintFindings,"dedupeLintFindings"),u(dedupeLintFindings,"dedupeLintFindings"),l(dedupeLintFindings,"dedupeLintFindings");export function verdictOf(e){const{errors:n,coverage:i}=e;return n>0?"errors":i.toolErrors.length>0||i.inScope<=0||i.checked.count<=0?"no-verdict":i.stale.length>0||i.notCovered.length>0||i.checked.count<i.inScope?"partial":"clean"}c(verdictOf,"verdictOf"),u(verdictOf,"verdictOf"),l(verdictOf,"verdictOf");export function exitCodeOf(e,n={}){return e==="errors"?1:e==="clean"||e==="partial"&&n.allowPartial?0:2}c(exitCodeOf,"exitCodeOf"),u(exitCodeOf,"exitCodeOf"),l(exitCodeOf,"exitCodeOf");
|
package/lib/system-report.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=(e,t)=>o(e,"name",{value:t,configurable:!0});var u=Object.defineProperty,n=s((e,t)=>u(e,"name",{value:t,configurable:!0}),"r"),c=Object.defineProperty,r=n((e,t)=>c(e,"name",{value:t,configurable:!0}),"n");export function systemScopeId(e){return e.kind==="machine"?"machine":e.kind==="repository"?`repo:${e.repoId}`:`ws:${e.key}`}s(systemScopeId,"systemScopeId"),n(systemScopeId,"systemScopeId"),r(systemScopeId,"systemScopeId");export function systemItemKey(e,t){return`${systemScopeId(e)}/${t}`}s(systemItemKey,"systemItemKey"),n(systemItemKey,"systemItemKey"),r(systemItemKey,"systemItemKey");export function systemValue(e,t){switch(t){case"bytes":{const a=e/1073741824;return a>=1?`${a.toFixed(a>=100?0:1)} GB`:`${Math.round(e/1024**2)} MB`}case"ms":return e>=1e3?`${(e/1e3).toFixed(1)} s`:`${Math.round(e)} ms`;case"percent":return`${Math.round(e)} %`;case"usd":return`$${e.toFixed(2)}`;case"load":return`load ${e.toFixed(1)}`;case"minutes":return`${Math.round(e)} min`;default:return String(e)}}s(systemValue,"systemValue"),n(systemValue,"systemValue"),r(systemValue,"systemValue");export function systemScopeLabel(e){return e.kind==="machine"?"machine":e.kind==="repository"?e.name:`${e.name} lens`}s(systemScopeLabel,"systemScopeLabel"),n(systemScopeLabel,"systemScopeLabel"),r(systemScopeLabel,"systemScopeLabel");const m={"n/a":0,ok:1,warn:2,bad:3};export function systemStatusRank(e){return m[e]}s(systemStatusRank,"systemStatusRank"),n(systemStatusRank,"systemStatusRank"),r(systemStatusRank,"systemStatusRank");
|
package/lib/team-design.d.ts
CHANGED
|
@@ -136,6 +136,54 @@ export interface TeamDesignBasis {
|
|
|
136
136
|
projects: string[];
|
|
137
137
|
trackedFiles: number;
|
|
138
138
|
at: number;
|
|
139
|
+
/**
|
|
140
|
+
* The team's files as the run read them (planning/team/27): `.lensmcp/team/…` path → sha256 of its text. A file whose
|
|
141
|
+
* text is not this any more changed after the run read it — accepting the run's version of it overwrites that change.
|
|
142
|
+
* Absent on runs made before it was kept: those are compared by the file's modification time against the run's start.
|
|
143
|
+
*/
|
|
144
|
+
teamFiles?: Record<string, string>;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* What a change does to one role file, counted by LensMCP from the file before and after it, with no model
|
|
148
|
+
* (planning/team/27) — so the person reads «+12 skills, −290 characters of rules» instead of a diff. Each field is
|
|
149
|
+
* there only when it moves; `[before, after]` pairs, and lists of what was added and what was removed.
|
|
150
|
+
*/
|
|
151
|
+
export interface TeamFileEffect {
|
|
152
|
+
/** The file is new (no file before), or goes (no file after). */
|
|
153
|
+
created?: true;
|
|
154
|
+
deleted?: true;
|
|
155
|
+
/** Characters of the role's own rules (its `<rules>` sections), before → after. */
|
|
156
|
+
rulesChars?: [number, number];
|
|
157
|
+
/** Rule sections (`<rules id=…>`) added and removed, by id. */
|
|
158
|
+
sections?: {
|
|
159
|
+
added: string[];
|
|
160
|
+
removed: string[];
|
|
161
|
+
};
|
|
162
|
+
skills?: {
|
|
163
|
+
added: string[];
|
|
164
|
+
removed: string[];
|
|
165
|
+
};
|
|
166
|
+
/** Tool lines added and removed, and the tools whose reason changed. */
|
|
167
|
+
tools?: {
|
|
168
|
+
added: string[];
|
|
169
|
+
removed: string[];
|
|
170
|
+
reasons: string[];
|
|
171
|
+
};
|
|
172
|
+
owns?: {
|
|
173
|
+
added: string[];
|
|
174
|
+
removed: string[];
|
|
175
|
+
};
|
|
176
|
+
takes?: {
|
|
177
|
+
added: string[];
|
|
178
|
+
removed: string[];
|
|
179
|
+
};
|
|
180
|
+
base?: [string | null, string | null];
|
|
181
|
+
agents?: [number | null, number | null];
|
|
182
|
+
model?: [string | null, string | null];
|
|
183
|
+
effort?: [string | null, string | null];
|
|
184
|
+
start?: [string | null, string | null];
|
|
185
|
+
/** The file is not a role file (the brief): its characters, before → after. */
|
|
186
|
+
chars?: [number, number];
|
|
139
187
|
}
|
|
140
188
|
export interface TeamDesign {
|
|
141
189
|
version: typeof TEAM_DESIGN_VERSION;
|
|
@@ -185,6 +233,11 @@ export interface DashTeamDesignRun {
|
|
|
185
233
|
files: string[];
|
|
186
234
|
goals: string[];
|
|
187
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* A done design not accepted yet, against the team as it is NOW (planning/team/27): per role what accepting it would
|
|
238
|
+
* change in that role's file, and what it would undo. Worked out on every read with no model; never kept.
|
|
239
|
+
*/
|
|
240
|
+
now?: DashTeamDesignNow;
|
|
188
241
|
/**
|
|
189
242
|
* How its research went, from the run's record: the tool calls it made of the most it had, its ceiling, its turns,
|
|
190
243
|
* and why it ended — Claude answered on its own, the ceiling asked for the answer, or the tool calls ran out.
|
|
@@ -197,6 +250,46 @@ export interface DashTeamDesignRun {
|
|
|
197
250
|
ended: 'answered' | 'ceiling' | 'tool-calls';
|
|
198
251
|
};
|
|
199
252
|
}
|
|
253
|
+
/** One role of a design against its file now: what accepting that role would write over what is there. */
|
|
254
|
+
export interface DashTeamDesignRoleNow {
|
|
255
|
+
id: string;
|
|
256
|
+
/** `.lensmcp/team/roles/<id>.md`. */
|
|
257
|
+
file: string;
|
|
258
|
+
/** `new`: no file; `replaces`: the repository's own file, rewritten whole; `refines`: a LensMCP default refined. */
|
|
259
|
+
is: 'new' | 'replaces' | 'refines';
|
|
260
|
+
/** The file now → the file accepting writes. */
|
|
261
|
+
effect: TeamFileEffect;
|
|
262
|
+
/** The file changed after the design read it (its hash, or its modification time on an older run). */
|
|
263
|
+
changedSince?: true;
|
|
264
|
+
/** Tune changes written to this file after the design ran: accepting the role writes over them. */
|
|
265
|
+
undoes?: Array<{
|
|
266
|
+
runId: string;
|
|
267
|
+
id: string;
|
|
268
|
+
title: string;
|
|
269
|
+
}>;
|
|
270
|
+
}
|
|
271
|
+
/** A role the design switches off, and the file that goes (the repository's own) or the default that stops. */
|
|
272
|
+
export interface DashTeamDesignOffNow {
|
|
273
|
+
id: string;
|
|
274
|
+
file: string;
|
|
275
|
+
exists: boolean;
|
|
276
|
+
changedSince?: true;
|
|
277
|
+
}
|
|
278
|
+
export interface DashTeamDesignNow {
|
|
279
|
+
roles: DashTeamDesignRoleNow[];
|
|
280
|
+
off: DashTeamDesignOffNow[];
|
|
281
|
+
/** The brief the design writes, against `.lensmcp/team/project.md` now. */
|
|
282
|
+
brief?: {
|
|
283
|
+
exists: boolean;
|
|
284
|
+
effect: TeamFileEffect;
|
|
285
|
+
changedSince?: true;
|
|
286
|
+
};
|
|
287
|
+
/** The flow file, when the design changes the flow (`keep: false`). */
|
|
288
|
+
flow?: {
|
|
289
|
+
exists: boolean;
|
|
290
|
+
changedSince?: true;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
200
293
|
/** What the person keeps of a design. Roles they edited carry their own rules. */
|
|
201
294
|
export interface DashTeamDesignAccept {
|
|
202
295
|
runId: string;
|
|
@@ -353,7 +446,8 @@ export type TeamCheckupGroup = (typeof TEAM_CHECKUP_GROUPS)[number];
|
|
|
353
446
|
* `old-flow`, `duplicate-of-base`, `filler-reason`, `cap-mismatch`, `copied`, `check-unread`, `failed-twice`,
|
|
354
447
|
* `lesson-stale`;
|
|
355
448
|
* - skills — `skills-unheld`: project skills no role holds; `role-without-skills`: a role whose kind of work has
|
|
356
|
-
* project skills and holds none
|
|
449
|
+
* project skills and holds none — a finding with the names that match, never a patch: names are not the skills'
|
|
450
|
+
* descriptions, and «Tune the team» reads those (planning/team/27 F2);
|
|
357
451
|
* - weight — `heavy-instructions`: an instruction file an agent's client loads, past 40,000 characters; `heavy-rules`:
|
|
358
452
|
* a role file's rules past the length a join carries well; `past-cut`, `long-craft`: text a join cuts or carries long;
|
|
359
453
|
* - proposals — `open-proposal`: a retrospective's or the overseer's open proposal about the team's files.
|
|
@@ -371,8 +465,9 @@ export interface TeamCheckupEdit {
|
|
|
371
465
|
}
|
|
372
466
|
/**
|
|
373
467
|
* A ready patch to one team file. `safe`: mechanical — it changes no rule and takes no tool or skill a role uses (a
|
|
374
|
-
* filler
|
|
375
|
-
*
|
|
468
|
+
* filler tool line removed where the role's base names the tool, or its reason replaced by the one reason the base's
|
|
469
|
+
* family gives it — planning/team/27 F3; a name that resolves nowhere removed; the base's version recorded). A patch
|
|
470
|
+
* that is not safe is one the person picks by itself (a moved base).
|
|
376
471
|
*/
|
|
377
472
|
export interface TeamCheckupPatch {
|
|
378
473
|
file: string;
|
|
@@ -496,6 +591,21 @@ export interface TeamTuneChange {
|
|
|
496
591
|
at: number;
|
|
497
592
|
problem?: string;
|
|
498
593
|
};
|
|
594
|
+
/**
|
|
595
|
+
* The change against its file as it is NOW, worked out by LensMCP on every read with no model (planning/team/27) —
|
|
596
|
+
* on a change with no verdict, or accepted but not written; never kept. `changed`: the file is not what the tune read
|
|
597
|
+
* for this change (the diff made now differs from `diff`). `applies`: its edits still stand once and the file still
|
|
598
|
+
* loads after them — else `problem` says why, and accepting would not write it: the page offers to tune again.
|
|
599
|
+
* `diff`: against the file as it is now, when it changed and still applies.
|
|
600
|
+
*/
|
|
601
|
+
now?: {
|
|
602
|
+
changed: boolean;
|
|
603
|
+
applies: boolean;
|
|
604
|
+
problem?: string;
|
|
605
|
+
diff?: string;
|
|
606
|
+
};
|
|
607
|
+
/** What it does to its file (against the file as it is now when `now` is set). */
|
|
608
|
+
effect?: TeamFileEffect;
|
|
499
609
|
}
|
|
500
610
|
/** A tune's answer, as LensMCP checked it: a change set, never whole roles. */
|
|
501
611
|
export interface TeamTune {
|
package/lib/team.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var r=(t,e)=>i(t,"name",{value:e,configurable:!0});var n=Object.defineProperty,o=r((t,e)=>n(t,"name",{value:e,configurable:!0}),"r"),a=Object.defineProperty,c=o((t,e)=>a(t,"name",{value:e,configurable:!0}),"o");export const DASH_TEAM_KINDS=["goal","build","bug","review","test","qa","docs","marketing","research","chore"],DASH_TEAM_LINK_KINDS=["task","flow","error","suggestion","ai-call","review","page","route","commit","branch","worktree","file","finding","test"];export function modelClient(t){const e=t?.trim()??"";if(/\b(claude|opus|sonnet|haiku|fable)\b/i.test(e))return"claude";if(/^(gpt|o\d+|codex)\b/i.test(e))return"codex"}r(modelClient,"modelClient"),o(modelClient,"modelClient"),c(modelClient,"modelClient");export const DASH_TEAM_SEARCH_QUESTION_MAX=300;
|