@lensmcp/protocol-types 1.26.23 → 1.26.25
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 +5 -0
- package/index.js +1 -1
- package/lib/ai-cache-facts.js +1 -1
- package/lib/ai-cache-verdict.d.ts +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.d.ts +11 -0
- 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/canvas-attachments.d.ts +80 -0
- package/lib/canvas-attachments.js +1 -0
- package/lib/canvas-catalog.js +5 -4
- package/lib/canvas-editing.d.ts +107 -0
- package/lib/canvas-editing.js +4 -0
- package/lib/canvas-frame-policy.d.ts +20 -0
- package/lib/canvas-frame-policy.js +1 -0
- package/lib/canvas-hub.d.ts +231 -0
- package/lib/canvas-hub.js +1 -0
- package/lib/canvas.d.ts +149 -8
- package/lib/canvas.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.d.ts +9 -2
- package/lib/docker-jobs.js +1 -1
- package/lib/docker-report.d.ts +2 -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/http-exchange.d.ts +10 -0
- package/lib/lens-hosts.d.ts +40 -0
- package/lib/lens-hosts.js +1 -0
- package/lib/lint-coverage.d.ts +8 -0
- package/lib/lint-coverage.js +1 -1
- package/lib/lint-ignores.d.ts +20 -0
- package/lib/lint-ignores.js +2 -2
- package/lib/log-query.js +1 -1
- package/lib/metrics-reset.js +1 -1
- package/lib/overseer-findings.d.ts +21 -4
- package/lib/overseer-findings.js +1 -1
- package/lib/peers.d.ts +123 -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/sources.js +1 -1
- package/lib/static-checks.d.ts +14 -0
- package/lib/static-checks.js +1 -1
- package/lib/system-report.js +1 -1
- package/lib/team.d.ts +35 -0
- package/lib/team.js +1 -1
- package/package.json +1 -1
package/lib/remote-instances.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var _=Object.defineProperty;var t=(e,E)=>_(e,"name",{value:E,configurable:!0});var r=Object.defineProperty,n=t((e,E)=>r(e,"name",{value:E,configurable:!0}),"_"),o=Object.defineProperty,A=n((e,E)=>o(e,"name",{value:E,configurable:!0}),"t");export const REMOTE_INSTANCE_ID_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]{7,39}$/,REMOTE_INSTANCE_NAME_PREFIX="g-",MAX_REMOTE_INSTANCE_SEC=14400,REMOTE_LENS_LABEL="lensmcp",REMOTE_DASHBOARD_BASE_PATTERN=/^\/[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/,PEER_TUNNEL_HEADER="x-lensmcp-peer-tunnel";export function remoteLensHost(e){return`${REMOTE_LENS_LABEL}.${e.toLowerCase()}`}t(remoteLensHost,"remoteLensHost"),n(remoteLensHost,"remoteLensHost"),A(remoteLensHost,"remoteLensHost");export const REMOTE_INSTANCES_FILE="instances.json";
|
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.d.ts
CHANGED
|
@@ -23,6 +23,20 @@ export type StaticFindingSeverity = 'error' | 'warning';
|
|
|
23
23
|
export declare const OWNER_WORKSPACE = "(workspace)";
|
|
24
24
|
/** The owner of a file under `node_modules`, or outside the checkout. */
|
|
25
25
|
export declare const OWNER_EXTERNAL = "(external)";
|
|
26
|
+
/** A file's path as the workspace names it: POSIX separators, no leading `./`. */
|
|
27
|
+
export declare function workspacePath(file: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Which Nx project owns a file: the one whose root is the longest prefix of its workspace-relative path. A file under
|
|
30
|
+
* `node_modules`, or outside the checkout, is {@link OWNER_EXTERNAL}; a workspace file no project's root holds is
|
|
31
|
+
* {@link OWNER_WORKSPACE}. A project at the root (`.`) owns only what no other project does.
|
|
32
|
+
*
|
|
33
|
+
* An error is listed under the project that owns its file, not under the program that found it: FoodGuard's missing
|
|
34
|
+
* `contracts` field was reported by every program that reaches `shared/contracts` through `paths`, and each of them
|
|
35
|
+
* showed it as its own. A lint ignore holds a finding by the same owner (lint-ignores.ts).
|
|
36
|
+
*/
|
|
37
|
+
export declare function ownerMap(projects: Readonly<Record<string, {
|
|
38
|
+
root: string;
|
|
39
|
+
}>>): (file: string) => string;
|
|
26
40
|
/** One type error, once, wherever it was found. Key: (file, line, col, code) — never the message. */
|
|
27
41
|
export interface TypecheckFinding {
|
|
28
42
|
/** Workspace-relative, POSIX. */
|
package/lib/static-checks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var g=Object.defineProperty;var l=(e,t)=>g(e,"name",{value:t,configurable:!0});var y=Object.defineProperty,u=l((e,t)=>y(e,"name",{value:t,configurable:!0}),"l"),m=Object.defineProperty,a=u((e,t)=>m(e,"name",{value:t,configurable:!0}),"l");export const OWNER_WORKSPACE="(workspace)",OWNER_EXTERNAL="(external)";export function workspacePath(e){return e.replace(/\\/g,"/").replace(/^(\.\/)+/,"")}l(workspacePath,"workspacePath"),u(workspacePath,"workspacePath"),a(workspacePath,"workspacePath");export function ownerMap(e){const t=Object.entries(e).map(([o,r])=>({name:o,root:workspacePath(r.root).replace(/\/+$/,"")})).filter(o=>o.root!==""&&o.root!==".").sort((o,r)=>r.root.length-o.root.length||(o.name<r.name?-1:o.name>r.name?1:0)),s=Object.entries(e).filter(([,o])=>["","."].includes(workspacePath(o.root).replace(/\/+$/,""))).map(([o])=>o).sort()[0];return o=>{const r=workspacePath(o);if(r.startsWith("/")||r.startsWith("../")||r===".."||/^[A-Za-z]:\//.test(r)||r.split("/").includes("node_modules"))return OWNER_EXTERNAL;for(const{name:n,root:i}of t)if(r===i||r.startsWith(`${i}/`))return n;return s??OWNER_WORKSPACE}}l(ownerMap,"ownerMap"),u(ownerMap,"ownerMap"),a(ownerMap,"ownerMap");export const 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}`}l(typecheckFindingKey,"typecheckFindingKey"),u(typecheckFindingKey,"typecheckFindingKey"),a(typecheckFindingKey,"typecheckFindingKey");export function lintFindingKey(e){return`${e.file}:${e.line}:${e.col}:${e.ruleId??""}`}l(lintFindingKey,"lintFindingKey"),u(lintFindingKey,"lintFindingKey"),a(lintFindingKey,"lintFindingKey");const f=a((e,t)=>e.file<t.file?-1:e.file>t.file?1:e.line-t.line||e.col-t.col,"byPosition");export function dedupeTypecheckFindings(e,t){const s=new Map;for(const{program:r,diagnostics:n}of e)for(const i of n){const c=typecheckFindingKey(i),d=s.get(c);if(!d){s.set(c,{file:i.file,line:i.line,col:i.col,code:i.code,severity:i.severity,message:i.message,project:t(i.file),programs:[r]});continue}d.programs.includes(r)||d.programs.push(r),i.severity==="error"&&(d.severity="error")}const o=[...s.values()];for(const r of o)r.programs.sort();return o.sort((r,n)=>f(r,n)||(r.code<n.code?-1:r.code>n.code?1:0))}l(dedupeTypecheckFindings,"dedupeTypecheckFindings"),u(dedupeTypecheckFindings,"dedupeTypecheckFindings"),a(dedupeTypecheckFindings,"dedupeTypecheckFindings");export function dedupeLintFindings(e,t){const s=new Map;for(const{unit:n,messages:i}of e)for(const c of i){const d=lintFindingKey(c),p=s.get(d);if(!p){s.set(d,{file:c.file,line:c.line,col:c.col,ruleId:c.ruleId,severity:c.severity,message:c.message,project:t(c.file),units:[n],...c.fixable?{fixable:!0}:{}});continue}p.units.includes(n)||p.units.push(n),c.severity==="error"&&(p.severity="error")}const o=[...s.values()];for(const n of o)n.units.sort();const r=a(n=>n.ruleId??"","rule");return o.sort((n,i)=>f(n,i)||(r(n)<r(i)?-1:r(n)>r(i)?1:0))}l(dedupeLintFindings,"dedupeLintFindings"),u(dedupeLintFindings,"dedupeLintFindings"),a(dedupeLintFindings,"dedupeLintFindings");export function verdictOf(e){const{errors:t,coverage:s}=e;return t>0?"errors":s.toolErrors.length>0||s.inScope<=0||s.checked.count<=0?"no-verdict":s.stale.length>0||s.notCovered.length>0||s.checked.count<s.inScope?"partial":"clean"}l(verdictOf,"verdictOf"),u(verdictOf,"verdictOf"),a(verdictOf,"verdictOf");export function exitCodeOf(e,t={}){return e==="errors"?1:e==="clean"||e==="partial"&&t.allowPartial?0:2}l(exitCodeOf,"exitCodeOf"),u(exitCodeOf,"exitCodeOf"),a(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.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export interface DashTeamTask {
|
|
|
72
72
|
/** Whole on `/api/team/task`; its first lines on the board. */
|
|
73
73
|
description: string;
|
|
74
74
|
kind?: DashTeamKind;
|
|
75
|
+
/** A QA run's level, when it is not a goal's (`.lensmcp/team/qa.json` levels): a main run, or a release run. */
|
|
76
|
+
level?: 'main' | 'release';
|
|
75
77
|
/** The role that may claim it; none: any agent. */
|
|
76
78
|
role?: string;
|
|
77
79
|
/** 0 (drop everything) … 3 (when there is time). */
|
|
@@ -816,6 +818,39 @@ export interface DashTeamBoard {
|
|
|
816
818
|
scope?: DashTeamBoardScope;
|
|
817
819
|
/** On a worker Mac: this board is the organizer's, read through the link, and read-only here (slice D32). */
|
|
818
820
|
remote?: DashTeamRemote;
|
|
821
|
+
/** Main QA as the person left it (issues/closed/overseer-116): absent while it runs as qa.json says. */
|
|
822
|
+
mainQa?: DashTeamMainQa;
|
|
823
|
+
}
|
|
824
|
+
/** Main QA on the board (issues/closed/overseer-116). */
|
|
825
|
+
export interface DashTeamMainQa {
|
|
826
|
+
/** Auto Main QA paused by the person's cancel of a run LensMCP made, before any agent took it. */
|
|
827
|
+
paused?: DashMainQaPause;
|
|
828
|
+
}
|
|
829
|
+
/** The pause: whose cancel of which run made it, when, and why they said. A person's Main QA run, or a resume, ends it. */
|
|
830
|
+
export interface DashMainQaPause {
|
|
831
|
+
at: number;
|
|
832
|
+
by: 'user';
|
|
833
|
+
delegate?: string;
|
|
834
|
+
runId: string;
|
|
835
|
+
runTitle: string;
|
|
836
|
+
head?: string;
|
|
837
|
+
reason: string;
|
|
838
|
+
}
|
|
839
|
+
/** `POST /api/team/task/operate`'s note when the task is a main QA run the person cancelled (overseer-116). */
|
|
840
|
+
export interface DashMainQaCancelAnswer {
|
|
841
|
+
paused: boolean;
|
|
842
|
+
says: string;
|
|
843
|
+
}
|
|
844
|
+
/** `POST /api/team/qa/main/start` — the person's Main QA run now — and `/api/team/qa/main/resume`: what happened, in words. */
|
|
845
|
+
export interface DashMainQaStartAnswer {
|
|
846
|
+
task: DashTeamTask;
|
|
847
|
+
made: boolean;
|
|
848
|
+
resumed: boolean;
|
|
849
|
+
says: string;
|
|
850
|
+
}
|
|
851
|
+
export interface DashMainQaResumeAnswer {
|
|
852
|
+
resumed: boolean;
|
|
853
|
+
says: string;
|
|
819
854
|
}
|
|
820
855
|
export interface DashTeamBoardScope {
|
|
821
856
|
worktreeId: string;
|
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;
|