@lensmcp/protocol-types 1.26.19 → 1.26.21

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 (44) hide show
  1. package/lib/ai-cache-facts.js +1 -1
  2. package/lib/ai-cache-verdict.js +1 -1
  3. package/lib/ai-cache.js +3 -3
  4. package/lib/ai-call-groups.js +2 -2
  5. package/lib/ai-call-row.js +3 -3
  6. package/lib/ai-call.js +11 -11
  7. package/lib/ai-compare.js +3 -3
  8. package/lib/ai-context.js +6 -6
  9. package/lib/ai-origins.js +8 -8
  10. package/lib/ai-together.js +5 -5
  11. package/lib/bounded-clone.js +1 -1
  12. package/lib/bounded-map.js +1 -1
  13. package/lib/bounded-writer.js +1 -1
  14. package/lib/capture-demand.js +1 -1
  15. package/lib/dashboard-path.js +1 -1
  16. package/lib/docker-errors.js +1 -1
  17. package/lib/docker-jobs.js +1 -1
  18. package/lib/docker-report.js +2 -2
  19. package/lib/docker-runs.js +3 -3
  20. package/lib/error-cause.js +6 -6
  21. package/lib/error-dismissal.js +1 -1
  22. package/lib/error-verdict.js +3 -3
  23. package/lib/event-loop.js +1 -1
  24. package/lib/expected-failure.js +2 -2
  25. package/lib/finding-proof.js +1 -1
  26. package/lib/flood-guard.js +1 -1
  27. package/lib/goal-design.js +1 -1
  28. package/lib/host-agents.js +1 -1
  29. package/lib/lint-coverage.js +1 -1
  30. package/lib/lint-ignores.js +2 -2
  31. package/lib/log-query.js +1 -1
  32. package/lib/metrics-reset.js +1 -1
  33. package/lib/overseer-findings.js +1 -1
  34. package/lib/peers.d.ts +33 -33
  35. package/lib/peers.js +1 -1
  36. package/lib/perf-rules.js +1 -1
  37. package/lib/pod-memory.js +1 -1
  38. package/lib/producer-health.js +1 -1
  39. package/lib/remote-instances.js +1 -1
  40. package/lib/sources.js +1 -1
  41. package/lib/static-checks.js +1 -1
  42. package/lib/system-report.js +1 -1
  43. package/lib/team.js +1 -1
  44. package/package.json +1 -1
package/lib/sources.js CHANGED
@@ -1 +1 @@
1
- "use strict";var T=Object.defineProperty;var a=(t,r)=>T(t,"name",{value:r,configurable:!0});var U=Object.defineProperty,e=a((t,r)=>U(t,"name",{value:r,configurable:!0}),"r");export const SOURCE_KINDS=["queue","loop","store","traffic"],SOURCE_KINDS_READ=["queue","loop","store","traffic"],sourceWireSchema=e(t=>`lensmcp.${t}/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(t){return Math.max(SOURCE_STALE_MIN_MS,SOURCE_STALE_PERIODS*Math.max(0,t))}a(sourceStaleAfterMs,"sourceStaleAfterMs"),e(sourceStaleAfterMs,"sourceStaleAfterMs");const n=e(t=>typeof t=="object"&&t!==null&&!Array.isArray(t),"isObj"),s=e(t=>typeof t=="number"&&Number.isInteger(t)&&t>=0,"isCount"),E=e(t=>typeof t=="number"&&Number.isFinite(t)&&t>0,"isTime"),u=e((t,r)=>typeof t=="string"&&t.length>0&&t.length<=r,"isStr"),v=e(t=>t===void 0||typeof t=="number"&&t>0,"isMin");function _(t){if(!SOURCE_KINDS_READ.includes(t.sourceKind)||typeof t.path!="string"&&!(t.path===void 0&&(t.sourceKind==="traffic"||t.sourceKind==="loop"))||!u(t.name,200)||typeof t.intervalSec!="number"||t.feeds!==void 0&&!u(t.feeds,200))return!1;const r=t.thresholds;if(!n(r))return!1;for(const o of["stalledMin","idleMin","oldestWaitMin","quotaPct","errorRatePct","orphanMin","failurePct","p95Ms","rateLimited"])if(!v(r[o]))return!1;return t.sourceKind!=="queue"||typeof r.oldestWaitMin=="number"}a(_,"l"),e(_,"asDecl");const l=e(t=>t===null||typeof t=="string","isIsoOrNull"),c=e(t=>t===void 0||s(t),"isOptCount");function d(t){if(!n(t)||typeof t.at!="string"||!E(t.receivedAt)||!E(t.intervalSec)||!l(t.lastRunAt)||t.nextRunAt!==void 0&&!l(t.nextRunAt))return!1;for(const r of["lastDurationMs","lastItems","runsInWindow","itemsInWindow","failuresInWindow","windowSec"])if(!c(t[r]))return!1;return t.lastOutcome!==void 0&&!LOOP_OUTCOMES.includes(t.lastOutcome)?!1:t.lastError===void 0||typeof t.lastError=="string"}a(d,"_"),e(d,"asLoopSnapshot");const f=e(t=>t===void 0||n(t)&&Object.values(t).every(r=>typeof r=="string"),"isLabels");function S(t){if(!n(t)||typeof t.at!="string"||!E(t.receivedAt)||!s(t.objects)||!s(t.bytes)||t.quotaBytes!==void 0&&t.quotaBytes!==null&&!s(t.quotaBytes))return!1;for(const i of["opsInWindow","writesInWindow","deletesInWindow","errorsInWindow","windowSec"])if(!c(t[i]))return!1;if(t.lastWriteAt!==void 0&&!l(t.lastWriteAt)||t.lastError!==void 0&&typeof t.lastError!="string")return!1;const r=t.truncated;if(r!==void 0&&!(n(r)&&s(r.groups)))return!1;const o=t.groups;return o===void 0?!0:Array.isArray(o)&&o.length<=SOURCE_MAX_GROUPS&&o.every(i=>n(i)&&u(i.group,1e3)&&s(i.objects)&&s(i.bytes)&&f(i.labels))}a(S,"S"),e(S,"asStoreSnapshot");function p(t){if(!n(t)||typeof t.at!="string"||!E(t.receivedAt)||!Array.isArray(t.channels)||!c(t.windowSec))return!1;const r=t.truncated;return r!==void 0&&!(n(r)&&s(r.channels))?!1:t.channels.length<=SOURCE_MAX_GROUPS&&t.channels.every(o=>{if(!n(o)||!u(o.channel,1e3)||!f(o.labels)||o.direction!==void 0&&o.direction!=="inbound"&&o.direction!=="outbound"||o.counterpart!==void 0&&!u(o.counterpart,200))return!1;for(const i of["messagesInWindow","failuresInWindow","rateLimitedInWindow"])if(!c(o[i]))return!1;return o.p95Ms!==void 0&&!(typeof o.p95Ms=="number"&&Number.isFinite(o.p95Ms)&&o.p95Ms>=0)||o.lastAt!==void 0&&!l(o.lastAt)?!1:o.lastError===void 0||typeof o.lastError=="string"})}a(p,"R"),e(p,"asTrafficSnapshot");function R(t){return n(t)&&u(t.digest,100)&&typeof t.at=="string"&&E(t.receivedAt)}a(R,"A"),e(R,"asSame");function A(t){if(!n(t)||!u(t.group,1e3)||!s(t.pending))return!1;for(const i of["inFlight","failed","completedInWindow"])if(t[i]!==void 0&&!s(t[i]))return!1;const r=t.oldestPendingAt;if(r!=null&&typeof r!="string")return!1;const o=t.labels;return o===void 0||n(o)&&Object.values(o).every(i=>typeof i=="string")}a(A,"O"),e(A,"asGroup");function O(t){if(!n(t)||typeof t.at!="string"||!E(t.receivedAt)||!Array.isArray(t.groups))return!1;const r=t.totals;if(!n(r)||!s(r.groups)||!s(r.pending)||!s(r.inFlight)||!s(r.failed))return!1;const o=t.truncated;return o!==void 0&&!(n(o)&&s(o.groups))?!1:t.groups.length<=SOURCE_MAX_GROUPS&&t.groups.every(A)}a(O,"T"),e(O,"asSnapshot");export function asSourcePollRaw(t){if(!n(t)||t.kind!=="source-poll"||!u(t.project,200)||!_(t)||!SOURCE_POLL_STATES.includes(t.state)||!E(t.polledAt)||!E(t.reportEveryMs)||t.path===void 0)return;const r=SOURCE_SNAPSHOT_FIELD[t.sourceKind];for(const i of Object.values(SOURCE_SNAPSHOT_FIELD))if(i!==r&&t[i]!==void 0)return;const o={snapshot:O,loop:d,store:S,traffic:p}[r];if(!(t[r]!==void 0&&!o(t[r]))&&!(t.same!==void 0&&(!R(t.same)||t[r]!==void 0))&&!(t.state==="current"&&t[r]===void 0&&t.same===void 0))return t}a(asSourcePollRaw,"asSourcePollRaw"),e(asSourcePollRaw,"asSourcePollRaw");export function asSourceEventRaw(t){if(!n(t)||t.kind!=="source-event"||!u(t.project,200)||!u(t.name,200))return;const r=t.sourceKind;if(SOURCE_KINDS_READ.includes(r)&&SOURCE_PUSH_EVENTS[r].includes(t.event)&&!(t.item!==void 0&&!u(t.item,200)||t.group!==void 0&&!u(t.group,200))&&!(!c(t.items)||!c(t.durationMs)||!c(t.bytes))&&!(t.outcome!==void 0&&!SOURCE_PUSH_OUTCOMES[r].includes(t.outcome))){for(const o of["object","channel","counterpart","correlation"])if(t[o]!==void 0&&!u(t[o],200))return;if(!(t.error!==void 0&&typeof t.error!="string"))return t}}a(asSourceEventRaw,"asSourceEventRaw"),e(asSourceEventRaw,"asSourceEventRaw");export function asSourceDeclarationRaw(t){if(!(!n(t)||t.kind!=="source-declaration"||!u(t.project,200))&&!(!Array.isArray(t.sources)||!t.sources.every(r=>n(r)&&_(r)))&&!(!Array.isArray(t.problems)||!t.problems.every(r=>typeof r=="string")))return t}a(asSourceDeclarationRaw,"asSourceDeclarationRaw"),e(asSourceDeclarationRaw,"asSourceDeclarationRaw");
1
+ "use strict";var v=Object.defineProperty;var u=(r,t)=>v(r,"name",{value:t,configurable:!0});var I=Object.defineProperty,c=u((r,t)=>I(r,"name",{value:t,configurable:!0}),"u"),L=Object.defineProperty,E=c((r,t)=>L(r,"name",{value:t,configurable:!0}),"a"),C=Object.defineProperty,e=E((r,t)=>C(r,"name",{value:t,configurable:!0}),"r");export const SOURCE_KINDS=["queue","loop","store","traffic"],SOURCE_KINDS_READ=["queue","loop","store","traffic"],sourceWireSchema=e(r=>`lensmcp.${r}/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(r){return Math.max(SOURCE_STALE_MIN_MS,SOURCE_STALE_PERIODS*Math.max(0,r))}u(sourceStaleAfterMs,"sourceStaleAfterMs"),c(sourceStaleAfterMs,"sourceStaleAfterMs"),E(sourceStaleAfterMs,"sourceStaleAfterMs"),e(sourceStaleAfterMs,"sourceStaleAfterMs");const n=e(r=>typeof r=="object"&&r!==null&&!Array.isArray(r),"isObj"),s=e(r=>typeof r=="number"&&Number.isInteger(r)&&r>=0,"isCount"),l=e(r=>typeof r=="number"&&Number.isFinite(r)&&r>0,"isTime"),a=e((r,t)=>typeof r=="string"&&r.length>0&&r.length<=t,"isStr"),y=e(r=>r===void 0||typeof r=="number"&&r>0,"isMin");function d(r){if(!SOURCE_KINDS_READ.includes(r.sourceKind)||typeof r.path!="string"&&!(r.path===void 0&&(r.sourceKind==="traffic"||r.sourceKind==="loop"))||!a(r.name,200)||typeof r.intervalSec!="number"||r.feeds!==void 0&&!a(r.feeds,200))return!1;const t=r.thresholds;if(!n(t))return!1;for(const o of["stalledMin","idleMin","oldestWaitMin","quotaPct","errorRatePct","orphanMin","failurePct","p95Ms","rateLimited"])if(!y(t[o]))return!1;return r.sourceKind!=="queue"||typeof t.oldestWaitMin=="number"}u(d,"_"),c(d,"_"),E(d,"l"),e(d,"asDecl");const f=e(r=>r===null||typeof r=="string","isIsoOrNull"),_=e(r=>r===void 0||s(r),"isOptCount");function S(r){if(!n(r)||typeof r.at!="string"||!l(r.receivedAt)||!l(r.intervalSec)||!f(r.lastRunAt)||r.nextRunAt!==void 0&&!f(r.nextRunAt))return!1;for(const t of["lastDurationMs","lastItems","runsInWindow","itemsInWindow","failuresInWindow","windowSec"])if(!_(r[t]))return!1;return r.lastOutcome!==void 0&&!LOOP_OUTCOMES.includes(r.lastOutcome)?!1:r.lastError===void 0||typeof r.lastError=="string"}u(S,"f"),c(S,"d"),E(S,"_"),e(S,"asLoopSnapshot");const U=e(r=>r===void 0||n(r)&&Object.values(r).every(t=>typeof t=="string"),"isLabels");function R(r){if(!n(r)||typeof r.at!="string"||!l(r.receivedAt)||!s(r.objects)||!s(r.bytes)||r.quotaBytes!==void 0&&r.quotaBytes!==null&&!s(r.quotaBytes))return!1;for(const i of["opsInWindow","writesInWindow","deletesInWindow","errorsInWindow","windowSec"])if(!_(r[i]))return!1;if(r.lastWriteAt!==void 0&&!f(r.lastWriteAt)||r.lastError!==void 0&&typeof r.lastError!="string")return!1;const t=r.truncated;if(t!==void 0&&!(n(t)&&s(t.groups)))return!1;const o=r.groups;return o===void 0?!0:Array.isArray(o)&&o.length<=SOURCE_MAX_GROUPS&&o.every(i=>n(i)&&a(i.group,1e3)&&s(i.objects)&&s(i.bytes)&&U(i.labels))}u(R,"S"),c(R,"S"),E(R,"S"),e(R,"asStoreSnapshot");function p(r){if(!n(r)||typeof r.at!="string"||!l(r.receivedAt)||!Array.isArray(r.channels)||!_(r.windowSec))return!1;const t=r.truncated;return t!==void 0&&!(n(t)&&s(t.channels))?!1:r.channels.length<=SOURCE_MAX_GROUPS&&r.channels.every(o=>{if(!n(o)||!a(o.channel,1e3)||!U(o.labels)||o.direction!==void 0&&o.direction!=="inbound"&&o.direction!=="outbound"||o.counterpart!==void 0&&!a(o.counterpart,200))return!1;for(const i of["messagesInWindow","failuresInWindow","rateLimitedInWindow"])if(!_(o[i]))return!1;return o.p95Ms!==void 0&&!(typeof o.p95Ms=="number"&&Number.isFinite(o.p95Ms)&&o.p95Ms>=0)||o.lastAt!==void 0&&!f(o.lastAt)?!1:o.lastError===void 0||typeof o.lastError=="string"})}u(p,"R"),c(p,"p"),E(p,"R"),e(p,"asTrafficSnapshot");function A(r){return n(r)&&a(r.digest,100)&&typeof r.at=="string"&&l(r.receivedAt)}u(A,"p"),c(A,"R"),E(A,"A"),e(A,"asSame");function O(r){if(!n(r)||!a(r.group,1e3)||!s(r.pending))return!1;for(const i of["inFlight","failed","completedInWindow"])if(r[i]!==void 0&&!s(r[i]))return!1;const t=r.oldestPendingAt;if(t!=null&&typeof t!="string")return!1;const o=r.labels;return o===void 0||n(o)&&Object.values(o).every(i=>typeof i=="string")}u(O,"A"),c(O,"A"),E(O,"O"),e(O,"asGroup");function T(r){if(!n(r)||typeof r.at!="string"||!l(r.receivedAt)||!Array.isArray(r.groups))return!1;const t=r.totals;if(!n(t)||!s(t.groups)||!s(t.pending)||!s(t.inFlight)||!s(t.failed))return!1;const o=r.truncated;return o!==void 0&&!(n(o)&&s(o.groups))?!1:r.groups.length<=SOURCE_MAX_GROUPS&&r.groups.every(O)}u(T,"O"),c(T,"O"),E(T,"T"),e(T,"asSnapshot");export function asSourcePollRaw(r){if(!n(r)||r.kind!=="source-poll"||!a(r.project,200)||!d(r)||!SOURCE_POLL_STATES.includes(r.state)||!l(r.polledAt)||!l(r.reportEveryMs)||r.path===void 0)return;const t=SOURCE_SNAPSHOT_FIELD[r.sourceKind];for(const i of Object.values(SOURCE_SNAPSHOT_FIELD))if(i!==t&&r[i]!==void 0)return;const o={snapshot:T,loop:S,store:R,traffic:p}[t];if(!(r[t]!==void 0&&!o(r[t]))&&!(r.same!==void 0&&(!A(r.same)||r[t]!==void 0))&&!(r.state==="current"&&r[t]===void 0&&r.same===void 0))return r}u(asSourcePollRaw,"asSourcePollRaw"),c(asSourcePollRaw,"asSourcePollRaw"),E(asSourcePollRaw,"asSourcePollRaw"),e(asSourcePollRaw,"asSourcePollRaw");export function asSourceEventRaw(r){if(!n(r)||r.kind!=="source-event"||!a(r.project,200)||!a(r.name,200))return;const t=r.sourceKind;if(SOURCE_KINDS_READ.includes(t)&&SOURCE_PUSH_EVENTS[t].includes(r.event)&&!(r.item!==void 0&&!a(r.item,200)||r.group!==void 0&&!a(r.group,200))&&!(!_(r.items)||!_(r.durationMs)||!_(r.bytes))&&!(r.outcome!==void 0&&!SOURCE_PUSH_OUTCOMES[t].includes(r.outcome))){for(const o of["object","channel","counterpart","correlation"])if(r[o]!==void 0&&!a(r[o],200))return;if(!(r.error!==void 0&&typeof r.error!="string"))return r}}u(asSourceEventRaw,"asSourceEventRaw"),c(asSourceEventRaw,"asSourceEventRaw"),E(asSourceEventRaw,"asSourceEventRaw"),e(asSourceEventRaw,"asSourceEventRaw");export function asSourceDeclarationRaw(r){if(!(!n(r)||r.kind!=="source-declaration"||!a(r.project,200))&&!(!Array.isArray(r.sources)||!r.sources.every(t=>n(t)&&d(t)))&&!(!Array.isArray(r.problems)||!r.problems.every(t=>typeof t=="string")))return r}u(asSourceDeclarationRaw,"asSourceDeclarationRaw"),c(asSourceDeclarationRaw,"asSourceDeclarationRaw"),E(asSourceDeclarationRaw,"asSourceDeclarationRaw"),e(asSourceDeclarationRaw,"asSourceDeclarationRaw");
@@ -1 +1 @@
1
- "use strict";var p=Object.defineProperty;var c=(e,o)=>p(e,"name",{value:o,configurable:!0});var g=Object.defineProperty,l=c((e,o)=>g(e,"name",{value:o,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"),l(typecheckFindingKey,"typecheckFindingKey");export function lintFindingKey(e){return`${e.file}:${e.line}:${e.col}:${e.ruleId??""}`}c(lintFindingKey,"lintFindingKey"),l(lintFindingKey,"lintFindingKey");const a=l((e,o)=>e.file<o.file?-1:e.file>o.file?1:e.line-o.line||e.col-o.col,"byPosition");export function dedupeTypecheckFindings(e,o){const n=new Map;for(const{program:i,diagnostics:r}of e)for(const t of r){const s=typecheckFindingKey(t),u=n.get(s);if(!u){n.set(s,{file:t.file,line:t.line,col:t.col,code:t.code,severity:t.severity,message:t.message,project:o(t.file),programs:[i]});continue}u.programs.includes(i)||u.programs.push(i),t.severity==="error"&&(u.severity="error")}const d=[...n.values()];for(const i of d)i.programs.sort();return d.sort((i,r)=>a(i,r)||(i.code<r.code?-1:i.code>r.code?1:0))}c(dedupeTypecheckFindings,"dedupeTypecheckFindings"),l(dedupeTypecheckFindings,"dedupeTypecheckFindings");export function dedupeLintFindings(e,o){const n=new Map;for(const{unit:r,messages:t}of e)for(const s of t){const u=lintFindingKey(s),f=n.get(u);if(!f){n.set(u,{file:s.file,line:s.line,col:s.col,ruleId:s.ruleId,severity:s.severity,message:s.message,project:o(s.file),units:[r],...s.fixable?{fixable:!0}:{}});continue}f.units.includes(r)||f.units.push(r),s.severity==="error"&&(f.severity="error")}const d=[...n.values()];for(const r of d)r.units.sort();const i=l(r=>r.ruleId??"","rule");return d.sort((r,t)=>a(r,t)||(i(r)<i(t)?-1:i(r)>i(t)?1:0))}c(dedupeLintFindings,"dedupeLintFindings"),l(dedupeLintFindings,"dedupeLintFindings");export function verdictOf(e){const{errors:o,coverage:n}=e;return o>0?"errors":n.toolErrors.length>0||n.inScope<=0||n.checked.count<=0?"no-verdict":n.stale.length>0||n.notCovered.length>0||n.checked.count<n.inScope?"partial":"clean"}c(verdictOf,"verdictOf"),l(verdictOf,"verdictOf");export function exitCodeOf(e,o={}){return e==="errors"?1:e==="clean"||e==="partial"&&o.allowPartial?0:2}c(exitCodeOf,"exitCodeOf"),l(exitCodeOf,"exitCodeOf");
1
+ "use strict";var y=Object.defineProperty;var s=(e,i)=>y(e,"name",{value:i,configurable:!0});var v=Object.defineProperty,u=s((e,i)=>v(e,"name",{value:i,configurable:!0}),"c"),O=Object.defineProperty,f=u((e,i)=>O(e,"name",{value:i,configurable:!0}),"c"),h=Object.defineProperty,d=f((e,i)=>h(e,"name",{value:i,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}`}s(typecheckFindingKey,"typecheckFindingKey"),u(typecheckFindingKey,"typecheckFindingKey"),f(typecheckFindingKey,"typecheckFindingKey"),d(typecheckFindingKey,"typecheckFindingKey");export function lintFindingKey(e){return`${e.file}:${e.line}:${e.col}:${e.ruleId??""}`}s(lintFindingKey,"lintFindingKey"),u(lintFindingKey,"lintFindingKey"),f(lintFindingKey,"lintFindingKey"),d(lintFindingKey,"lintFindingKey");const g=d((e,i)=>e.file<i.file?-1:e.file>i.file?1:e.line-i.line||e.col-i.col,"byPosition");export function dedupeTypecheckFindings(e,i){const r=new Map;for(const{program:o,diagnostics:n}of e)for(const t of n){const c=typecheckFindingKey(t),l=r.get(c);if(!l){r.set(c,{file:t.file,line:t.line,col:t.col,code:t.code,severity:t.severity,message:t.message,project:i(t.file),programs:[o]});continue}l.programs.includes(o)||l.programs.push(o),t.severity==="error"&&(l.severity="error")}const a=[...r.values()];for(const o of a)o.programs.sort();return a.sort((o,n)=>g(o,n)||(o.code<n.code?-1:o.code>n.code?1:0))}s(dedupeTypecheckFindings,"dedupeTypecheckFindings"),u(dedupeTypecheckFindings,"dedupeTypecheckFindings"),f(dedupeTypecheckFindings,"dedupeTypecheckFindings"),d(dedupeTypecheckFindings,"dedupeTypecheckFindings");export function dedupeLintFindings(e,i){const r=new Map;for(const{unit:n,messages:t}of e)for(const c of t){const l=lintFindingKey(c),p=r.get(l);if(!p){r.set(l,{file:c.file,line:c.line,col:c.col,ruleId:c.ruleId,severity:c.severity,message:c.message,project:i(c.file),units:[n],...c.fixable?{fixable:!0}:{}});continue}p.units.includes(n)||p.units.push(n),c.severity==="error"&&(p.severity="error")}const a=[...r.values()];for(const n of a)n.units.sort();const o=d(n=>n.ruleId??"","rule");return a.sort((n,t)=>g(n,t)||(o(n)<o(t)?-1:o(n)>o(t)?1:0))}s(dedupeLintFindings,"dedupeLintFindings"),u(dedupeLintFindings,"dedupeLintFindings"),f(dedupeLintFindings,"dedupeLintFindings"),d(dedupeLintFindings,"dedupeLintFindings");export function verdictOf(e){const{errors:i,coverage:r}=e;return i>0?"errors":r.toolErrors.length>0||r.inScope<=0||r.checked.count<=0?"no-verdict":r.stale.length>0||r.notCovered.length>0||r.checked.count<r.inScope?"partial":"clean"}s(verdictOf,"verdictOf"),u(verdictOf,"verdictOf"),f(verdictOf,"verdictOf"),d(verdictOf,"verdictOf");export function exitCodeOf(e,i={}){return e==="errors"?1:e==="clean"||e==="partial"&&i.allowPartial?0:2}s(exitCodeOf,"exitCodeOf"),u(exitCodeOf,"exitCodeOf"),f(exitCodeOf,"exitCodeOf"),d(exitCodeOf,"exitCodeOf");
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var r=(e,n)=>o(e,"name",{value:n,configurable:!0});var a=Object.defineProperty,s=r((e,n)=>a(e,"name",{value:n,configurable:!0}),"n");export function systemScopeId(e){return e.kind==="machine"?"machine":e.kind==="repository"?`repo:${e.repoId}`:`ws:${e.key}`}r(systemScopeId,"systemScopeId"),s(systemScopeId,"systemScopeId");export function systemItemKey(e,n){return`${systemScopeId(e)}/${n}`}r(systemItemKey,"systemItemKey"),s(systemItemKey,"systemItemKey");export function systemValue(e,n){switch(n){case"bytes":{const t=e/1073741824;return t>=1?`${t.toFixed(t>=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)}}r(systemValue,"systemValue"),s(systemValue,"systemValue");export function systemScopeLabel(e){return e.kind==="machine"?"machine":e.kind==="repository"?e.name:`${e.name} lens`}r(systemScopeLabel,"systemScopeLabel"),s(systemScopeLabel,"systemScopeLabel");const u={"n/a":0,ok:1,warn:2,bad:3};export function systemStatusRank(e){return u[e]}r(systemStatusRank,"systemStatusRank"),s(systemStatusRank,"systemStatusRank");
1
+ "use strict";var u=Object.defineProperty;var s=(e,t)=>u(e,"name",{value:t,configurable:!0});var m=Object.defineProperty,n=s((e,t)=>m(e,"name",{value:t,configurable:!0}),"s"),c=Object.defineProperty,r=n((e,t)=>c(e,"name",{value:t,configurable:!0}),"r"),y=Object.defineProperty,a=r((e,t)=>y(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"),a(systemScopeId,"systemScopeId");export function systemItemKey(e,t){return`${systemScopeId(e)}/${t}`}s(systemItemKey,"systemItemKey"),n(systemItemKey,"systemItemKey"),r(systemItemKey,"systemItemKey"),a(systemItemKey,"systemItemKey");export function systemValue(e,t){switch(t){case"bytes":{const o=e/1073741824;return o>=1?`${o.toFixed(o>=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"),a(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"),a(systemScopeLabel,"systemScopeLabel");const i={"n/a":0,ok:1,warn:2,bad:3};export function systemStatusRank(e){return i[e]}s(systemStatusRank,"systemStatusRank"),n(systemStatusRank,"systemStatusRank"),r(systemStatusRank,"systemStatusRank"),a(systemStatusRank,"systemStatusRank");
package/lib/team.js CHANGED
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var r=(t,e)=>o(t,"name",{value:e,configurable:!0});var i=Object.defineProperty,n=r((t,e)=>i(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"),n(modelClient,"modelClient");export const DASH_TEAM_SEARCH_QUESTION_MAX=300;
1
+ "use strict";var n=Object.defineProperty;var r=(t,e)=>n(t,"name",{value:e,configurable:!0});var a=Object.defineProperty,o=r((t,e)=>a(t,"name",{value:e,configurable:!0}),"r"),l=Object.defineProperty,i=o((t,e)=>l(t,"name",{value:e,configurable:!0}),"r"),c=Object.defineProperty,u=i((t,e)=>c(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"),i(modelClient,"modelClient"),u(modelClient,"modelClient");export const DASH_TEAM_SEARCH_QUESTION_MAX=300;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/protocol-types",
3
- "version": "1.26.19",
3
+ "version": "1.26.21",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",