@lensmcp/protocol-types 1.26.0 → 1.26.2
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/ai-call-groups.js +2 -2
- package/lib/ai-call-row.js +3 -3
- package/lib/ai-call.js +9 -9
- package/lib/ai-context.js +6 -6
- package/lib/ai-origins.js +9 -9
- package/lib/attributes.d.ts +4 -4
- 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/context.d.ts +2 -2
- package/lib/dashboard-path.d.ts +1 -1
- package/lib/dashboard-path.js +1 -1
- package/lib/dashboard.d.ts +46 -0
- package/lib/edge.d.ts +8 -8
- package/lib/error-cause.js +5 -5
- package/lib/error-dismissal.js +1 -1
- package/lib/event-loop.js +1 -1
- package/lib/event.d.ts +45 -45
- package/lib/expected-failure.d.ts +251 -0
- package/lib/expected-failure.js +2 -0
- package/lib/flood-guard.js +1 -1
- package/lib/goal-design.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/node.d.ts +11 -11
- package/lib/overseer-findings.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/resources.d.ts +28 -28
- package/lib/sources.js +1 -1
- package/lib/system-report.js +1 -1
- package/lib/team.js +1 -1
- package/package.json +1 -1
package/lib/resources.d.ts
CHANGED
|
@@ -14,18 +14,18 @@ export declare const ResourceEnvelopeSchema: z.ZodObject<{
|
|
|
14
14
|
export type ResourceEnvelope = z.infer<typeof ResourceEnvelopeSchema>;
|
|
15
15
|
export declare const AgentStatusKindSchema: z.ZodEnum<{
|
|
16
16
|
warning: "warning";
|
|
17
|
-
starting: "starting";
|
|
18
17
|
clean: "clean";
|
|
19
18
|
failing: "failing";
|
|
19
|
+
starting: "starting";
|
|
20
20
|
}>;
|
|
21
21
|
export type AgentStatusKind = z.infer<typeof AgentStatusKindSchema>;
|
|
22
22
|
export declare const AgentBlockingItemSchema: z.ZodObject<{
|
|
23
23
|
source: z.ZodString;
|
|
24
24
|
severity: z.ZodEnum<{
|
|
25
25
|
error: "error";
|
|
26
|
+
debug: "debug";
|
|
26
27
|
info: "info";
|
|
27
28
|
warning: "warning";
|
|
28
|
-
debug: "debug";
|
|
29
29
|
fatal: "fatal";
|
|
30
30
|
}>;
|
|
31
31
|
title: z.ZodString;
|
|
@@ -49,37 +49,37 @@ export declare const AgentBlockingItemSchema: z.ZodObject<{
|
|
|
49
49
|
export type AgentBlockingItem = z.infer<typeof AgentBlockingItemSchema>;
|
|
50
50
|
export declare const AgentChecksSchema: z.ZodObject<{
|
|
51
51
|
typecheck: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
unknown: "unknown";
|
|
52
53
|
passed: "passed";
|
|
53
54
|
failed: "failed";
|
|
54
|
-
unknown: "unknown";
|
|
55
55
|
}>>;
|
|
56
56
|
lint: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
unknown: "unknown";
|
|
57
58
|
passed: "passed";
|
|
58
59
|
failed: "failed";
|
|
59
|
-
unknown: "unknown";
|
|
60
60
|
}>>;
|
|
61
61
|
build: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
unknown: "unknown";
|
|
62
63
|
passed: "passed";
|
|
63
64
|
failed: "failed";
|
|
64
|
-
unknown: "unknown";
|
|
65
65
|
}>>;
|
|
66
66
|
runtime: z.ZodOptional<z.ZodEnum<{
|
|
67
|
-
passed: "passed";
|
|
68
|
-
failed: "failed";
|
|
69
67
|
warning: "warning";
|
|
70
68
|
unknown: "unknown";
|
|
71
|
-
}>>;
|
|
72
|
-
visual: z.ZodOptional<z.ZodEnum<{
|
|
73
69
|
passed: "passed";
|
|
74
70
|
failed: "failed";
|
|
71
|
+
}>>;
|
|
72
|
+
visual: z.ZodOptional<z.ZodEnum<{
|
|
75
73
|
warning: "warning";
|
|
76
74
|
unknown: "unknown";
|
|
77
|
-
}>>;
|
|
78
|
-
memory: z.ZodOptional<z.ZodEnum<{
|
|
79
75
|
passed: "passed";
|
|
80
76
|
failed: "failed";
|
|
77
|
+
}>>;
|
|
78
|
+
memory: z.ZodOptional<z.ZodEnum<{
|
|
81
79
|
warning: "warning";
|
|
82
80
|
unknown: "unknown";
|
|
81
|
+
passed: "passed";
|
|
82
|
+
failed: "failed";
|
|
83
83
|
}>>;
|
|
84
84
|
}, z.core.$strip>;
|
|
85
85
|
/**
|
|
@@ -92,14 +92,14 @@ export declare const AgentChecksSchema: z.ZodObject<{
|
|
|
92
92
|
* bundle it started with until that session ends).
|
|
93
93
|
*/
|
|
94
94
|
export declare const AgentServerModeSchema: z.ZodEnum<{
|
|
95
|
-
shared: "shared";
|
|
96
95
|
embedded: "embedded";
|
|
96
|
+
shared: "shared";
|
|
97
97
|
}>;
|
|
98
98
|
export type AgentServerMode = z.infer<typeof AgentServerModeSchema>;
|
|
99
99
|
export declare const AgentServerInfoSchema: z.ZodObject<{
|
|
100
100
|
mode: z.ZodEnum<{
|
|
101
|
-
shared: "shared";
|
|
102
101
|
embedded: "embedded";
|
|
102
|
+
shared: "shared";
|
|
103
103
|
}>;
|
|
104
104
|
pid: z.ZodNumber;
|
|
105
105
|
startedAt: z.ZodString;
|
|
@@ -114,9 +114,9 @@ export declare const AgentCurrentStatusSchema: z.ZodObject<{
|
|
|
114
114
|
sessionId: z.ZodString;
|
|
115
115
|
status: z.ZodEnum<{
|
|
116
116
|
warning: "warning";
|
|
117
|
-
starting: "starting";
|
|
118
117
|
clean: "clean";
|
|
119
118
|
failing: "failing";
|
|
119
|
+
starting: "starting";
|
|
120
120
|
}>;
|
|
121
121
|
activeTab: z.ZodOptional<z.ZodString>;
|
|
122
122
|
tabsWithIssues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -124,9 +124,9 @@ export declare const AgentCurrentStatusSchema: z.ZodObject<{
|
|
|
124
124
|
source: z.ZodString;
|
|
125
125
|
severity: z.ZodEnum<{
|
|
126
126
|
error: "error";
|
|
127
|
+
debug: "debug";
|
|
127
128
|
info: "info";
|
|
128
129
|
warning: "warning";
|
|
129
|
-
debug: "debug";
|
|
130
130
|
fatal: "fatal";
|
|
131
131
|
}>;
|
|
132
132
|
title: z.ZodString;
|
|
@@ -151,9 +151,9 @@ export declare const AgentCurrentStatusSchema: z.ZodObject<{
|
|
|
151
151
|
source: z.ZodString;
|
|
152
152
|
severity: z.ZodEnum<{
|
|
153
153
|
error: "error";
|
|
154
|
+
debug: "debug";
|
|
154
155
|
info: "info";
|
|
155
156
|
warning: "warning";
|
|
156
|
-
debug: "debug";
|
|
157
157
|
fatal: "fatal";
|
|
158
158
|
}>;
|
|
159
159
|
title: z.ZodString;
|
|
@@ -177,43 +177,43 @@ export declare const AgentCurrentStatusSchema: z.ZodObject<{
|
|
|
177
177
|
suggestedReads: z.ZodArray<z.ZodString>;
|
|
178
178
|
checks: z.ZodOptional<z.ZodObject<{
|
|
179
179
|
typecheck: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
unknown: "unknown";
|
|
180
181
|
passed: "passed";
|
|
181
182
|
failed: "failed";
|
|
182
|
-
unknown: "unknown";
|
|
183
183
|
}>>;
|
|
184
184
|
lint: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
unknown: "unknown";
|
|
185
186
|
passed: "passed";
|
|
186
187
|
failed: "failed";
|
|
187
|
-
unknown: "unknown";
|
|
188
188
|
}>>;
|
|
189
189
|
build: z.ZodOptional<z.ZodEnum<{
|
|
190
|
+
unknown: "unknown";
|
|
190
191
|
passed: "passed";
|
|
191
192
|
failed: "failed";
|
|
192
|
-
unknown: "unknown";
|
|
193
193
|
}>>;
|
|
194
194
|
runtime: z.ZodOptional<z.ZodEnum<{
|
|
195
|
-
passed: "passed";
|
|
196
|
-
failed: "failed";
|
|
197
195
|
warning: "warning";
|
|
198
196
|
unknown: "unknown";
|
|
199
|
-
}>>;
|
|
200
|
-
visual: z.ZodOptional<z.ZodEnum<{
|
|
201
197
|
passed: "passed";
|
|
202
198
|
failed: "failed";
|
|
199
|
+
}>>;
|
|
200
|
+
visual: z.ZodOptional<z.ZodEnum<{
|
|
203
201
|
warning: "warning";
|
|
204
202
|
unknown: "unknown";
|
|
205
|
-
}>>;
|
|
206
|
-
memory: z.ZodOptional<z.ZodEnum<{
|
|
207
203
|
passed: "passed";
|
|
208
204
|
failed: "failed";
|
|
205
|
+
}>>;
|
|
206
|
+
memory: z.ZodOptional<z.ZodEnum<{
|
|
209
207
|
warning: "warning";
|
|
210
208
|
unknown: "unknown";
|
|
209
|
+
passed: "passed";
|
|
210
|
+
failed: "failed";
|
|
211
211
|
}>>;
|
|
212
212
|
}, z.core.$strip>>;
|
|
213
213
|
server: z.ZodOptional<z.ZodObject<{
|
|
214
214
|
mode: z.ZodEnum<{
|
|
215
|
-
shared: "shared";
|
|
216
215
|
embedded: "embedded";
|
|
216
|
+
shared: "shared";
|
|
217
217
|
}>;
|
|
218
218
|
pid: z.ZodNumber;
|
|
219
219
|
startedAt: z.ZodString;
|
|
@@ -328,9 +328,9 @@ declare const CheckEntrySchema: z.ZodObject<{
|
|
|
328
328
|
rule: z.ZodOptional<z.ZodString>;
|
|
329
329
|
severity: z.ZodOptional<z.ZodEnum<{
|
|
330
330
|
error: "error";
|
|
331
|
+
debug: "debug";
|
|
331
332
|
info: "info";
|
|
332
333
|
warning: "warning";
|
|
333
|
-
debug: "debug";
|
|
334
334
|
fatal: "fatal";
|
|
335
335
|
}>>;
|
|
336
336
|
file: z.ZodOptional<z.ZodString>;
|
|
@@ -417,9 +417,9 @@ export declare const TypecheckErrorsSchema: z.ZodObject<{
|
|
|
417
417
|
rule: z.ZodOptional<z.ZodString>;
|
|
418
418
|
severity: z.ZodOptional<z.ZodEnum<{
|
|
419
419
|
error: "error";
|
|
420
|
+
debug: "debug";
|
|
420
421
|
info: "info";
|
|
421
422
|
warning: "warning";
|
|
422
|
-
debug: "debug";
|
|
423
423
|
fatal: "fatal";
|
|
424
424
|
}>>;
|
|
425
425
|
file: z.ZodOptional<z.ZodString>;
|
package/lib/sources.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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");
|
package/lib/system-report.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var
|
|
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");
|
package/lib/team.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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;
|