@gmickel/gno 1.17.0 → 1.19.0
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/README.md +18 -4
- package/assets/skill/SKILL.md +44 -1
- package/assets/skill/mcp-reference.md +21 -0
- package/package.json +3 -2
- package/spec/AGENTS.md +83 -0
- package/spec/CLAUDE.md +83 -0
- package/spec/bench-fixture.schema.json +137 -0
- package/spec/cli.md +2894 -0
- package/spec/db/schema.sql +442 -0
- package/spec/evals-agentic.md +510 -0
- package/spec/evals.md +1106 -0
- package/spec/mcp.md +2229 -0
- package/spec/output-schemas/activation-verification.schema.json +515 -0
- package/spec/output-schemas/ask.schema.json +366 -0
- package/spec/output-schemas/backlinks.schema.json +131 -0
- package/spec/output-schemas/bench-result.schema.json +120 -0
- package/spec/output-schemas/capture-receipt.schema.json +143 -0
- package/spec/output-schemas/collection-list.schema.json +45 -0
- package/spec/output-schemas/context-capsule-v1.schema.json +691 -0
- package/spec/output-schemas/context-capsule-verification.schema.json +1338 -0
- package/spec/output-schemas/context-list.schema.json +21 -0
- package/spec/output-schemas/doctor.schema.json +313 -0
- package/spec/output-schemas/error.schema.json +30 -0
- package/spec/output-schemas/expansion.schema.json +37 -0
- package/spec/output-schemas/get.schema.json +140 -0
- package/spec/output-schemas/graph-query.schema.json +99 -0
- package/spec/output-schemas/graph.schema.json +371 -0
- package/spec/output-schemas/links-list.schema.json +186 -0
- package/spec/output-schemas/mcp-add-collection-result.schema.json +23 -0
- package/spec/output-schemas/mcp-capture-result.schema.json +152 -0
- package/spec/output-schemas/mcp-http-error.schema.json +30 -0
- package/spec/output-schemas/mcp-job-list.schema.json +58 -0
- package/spec/output-schemas/mcp-job-status.schema.json +224 -0
- package/spec/output-schemas/mcp-remove-result.schema.json +39 -0
- package/spec/output-schemas/mcp-sync-result.schema.json +41 -0
- package/spec/output-schemas/mcp-tag-result.schema.json +33 -0
- package/spec/output-schemas/models-list.schema.json +93 -0
- package/spec/output-schemas/multi-get.schema.json +103 -0
- package/spec/output-schemas/process-status.schema.json +119 -0
- package/spec/output-schemas/query-diagnose.schema.json +123 -0
- package/spec/output-schemas/resident-status.schema.json +154 -0
- package/spec/output-schemas/retrieval-trace-common.schema.json +492 -0
- package/spec/output-schemas/retrieval-trace-delete.schema.json +16 -0
- package/spec/output-schemas/retrieval-trace-export.schema.json +61 -0
- package/spec/output-schemas/retrieval-trace-filters.schema.json +139 -0
- package/spec/output-schemas/retrieval-trace-judgment.schema.json +15 -0
- package/spec/output-schemas/retrieval-trace-list.schema.json +18 -0
- package/spec/output-schemas/retrieval-trace-payloads.schema.json +178 -0
- package/spec/output-schemas/retrieval-trace-purge.schema.json +31 -0
- package/spec/output-schemas/retrieval-trace-qrels.schema.json +303 -0
- package/spec/output-schemas/retrieval-trace-replay.schema.json +286 -0
- package/spec/output-schemas/retrieval-trace-show.schema.json +69 -0
- package/spec/output-schemas/retrieval-trace-summary.schema.json +65 -0
- package/spec/output-schemas/search-result.schema.json +154 -0
- package/spec/output-schemas/search-results.schema.json +338 -0
- package/spec/output-schemas/similar.schema.json +84 -0
- package/spec/output-schemas/status.schema.json +676 -0
- package/spec/output-schemas/tags-list.schema.json +48 -0
- package/src/app/context-runtime-types.ts +3 -0
- package/src/app/context-runtime.ts +15 -1
- package/src/cli/commands/ask.ts +106 -36
- package/src/cli/commands/context-build.ts +56 -9
- package/src/cli/commands/daemon.ts +69 -2
- package/src/cli/commands/get.ts +64 -3
- package/src/cli/commands/models/pull.ts +13 -3
- package/src/cli/commands/query.ts +62 -23
- package/src/cli/commands/replay.ts +140 -0
- package/src/cli/commands/search.ts +48 -3
- package/src/cli/commands/shared.ts +3 -1
- package/src/cli/commands/status.ts +2 -0
- package/src/cli/commands/trace.ts +200 -0
- package/src/cli/commands/vsearch.ts +75 -53
- package/src/cli/detach.ts +37 -20
- package/src/cli/program.ts +329 -27
- package/src/config/index.ts +12 -0
- package/src/config/retrieval-traces.ts +56 -0
- package/src/config/types.ts +41 -0
- package/src/core/context-compiler.ts +11 -4
- package/src/core/job-manager.ts +19 -0
- package/src/core/mutation-generations.ts +33 -0
- package/src/core/retrieval-qrels.ts +405 -0
- package/src/core/retrieval-replay-candidate.ts +368 -0
- package/src/core/retrieval-replay-types.ts +109 -0
- package/src/core/retrieval-replay-validation.ts +89 -0
- package/src/core/retrieval-replay.ts +441 -0
- package/src/core/retrieval-trace-evidence-origin.ts +175 -0
- package/src/core/retrieval-trace-export.ts +113 -0
- package/src/core/retrieval-trace-filter-normalization.ts +27 -0
- package/src/core/retrieval-trace-filters.ts +19 -0
- package/src/core/retrieval-trace-management-helpers.ts +247 -0
- package/src/core/retrieval-trace-management-types.ts +132 -0
- package/src/core/retrieval-trace-management.ts +422 -0
- package/src/core/retrieval-trace-request.ts +141 -0
- package/src/core/retrieval-trace-session.ts +494 -0
- package/src/core/retrieval-trace.ts +472 -0
- package/src/llm/cache.ts +13 -3
- package/src/llm/nodeLlamaCpp/adapter.ts +10 -1
- package/src/llm/nodeLlamaCpp/lifecycle.ts +71 -0
- package/src/mcp/context.ts +161 -0
- package/src/mcp/http-security.ts +477 -0
- package/src/mcp/http-session.ts +272 -0
- package/src/mcp/http-transport.ts +370 -0
- package/src/mcp/resources/index.ts +141 -134
- package/src/mcp/server.ts +19 -79
- package/src/mcp/tools/add-collection.ts +3 -1
- package/src/mcp/tools/capture.ts +3 -0
- package/src/mcp/tools/clear-collection-embeddings.ts +2 -0
- package/src/mcp/tools/context.ts +68 -16
- package/src/mcp/tools/embed.ts +62 -52
- package/src/mcp/tools/get.ts +35 -1
- package/src/mcp/tools/index-cmd.ts +88 -74
- package/src/mcp/tools/index.ts +96 -2
- package/src/mcp/tools/query.ts +95 -64
- package/src/mcp/tools/remove-collection.ts +2 -0
- package/src/mcp/tools/search.ts +36 -13
- package/src/mcp/tools/status.ts +11 -0
- package/src/mcp/tools/sync.ts +16 -14
- package/src/mcp/tools/trace.ts +143 -0
- package/src/mcp/tools/vsearch.ts +71 -38
- package/src/mcp/tools/workspace-write.ts +7 -3
- package/src/pipeline/answer.ts +167 -26
- package/src/pipeline/graph-retrieval.ts +15 -1
- package/src/pipeline/hybrid.ts +151 -43
- package/src/pipeline/search.ts +36 -3
- package/src/pipeline/trace-metadata.ts +47 -0
- package/src/pipeline/types.ts +43 -0
- package/src/pipeline/vsearch.ts +101 -38
- package/src/sdk/client.ts +380 -71
- package/src/sdk/documents.ts +48 -1
- package/src/sdk/index.ts +17 -0
- package/src/sdk/types.ts +28 -0
- package/src/serve/background-runtime.ts +12 -212
- package/src/serve/context-capsule.ts +67 -8
- package/src/serve/embed-scheduler.ts +74 -43
- package/src/serve/index.ts +9 -0
- package/src/serve/jobs.ts +78 -80
- package/src/serve/public/app.tsx +12 -1
- package/src/serve/public/components/HealthCenter.tsx +74 -1
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/lib/workspace-tabs.ts +2 -0
- package/src/serve/public/pages/Dashboard.tsx +11 -0
- package/src/serve/public/pages/TraceHistory.tsx +478 -0
- package/src/serve/public/pages/trace-history-detail.tsx +224 -0
- package/src/serve/resident-admission.ts +159 -0
- package/src/serve/resident-background-work.ts +39 -0
- package/src/serve/resident-request.ts +55 -0
- package/src/serve/resident-runtime.ts +490 -0
- package/src/serve/resident-status.ts +96 -0
- package/src/serve/retrieval-trace.ts +28 -0
- package/src/serve/routes/api.ts +629 -239
- package/src/serve/routes/mcp.ts +69 -0
- package/src/serve/routes/traces.ts +156 -0
- package/src/serve/server.ts +276 -37
- package/src/serve/status-model.ts +51 -0
- package/src/serve/status.ts +5 -0
- package/src/store/index.ts +31 -0
- package/src/store/migrations/014-retrieval-traces.ts +303 -0
- package/src/store/migrations/index.ts +2 -0
- package/src/store/retrieval-trace-codec.ts +384 -0
- package/src/store/sqlite/adapter.ts +179 -10
- package/src/store/sqlite/retrieval-trace-management-store.ts +341 -0
- package/src/store/sqlite/retrieval-trace-retention.ts +349 -0
- package/src/store/sqlite/retrieval-trace-rows.ts +267 -0
- package/src/store/sqlite/retrieval-trace-store.ts +515 -0
- package/src/store/types.ts +297 -0
- package/src/store/vector/sqlite-vec.ts +76 -1
- package/src/store/vector/types.ts +1 -1
package/src/serve/jobs.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Background job tracker for API write operations.
|
|
3
|
-
* Simple in-memory tracking with global mutex (one job at a time).
|
|
4
|
-
*
|
|
5
|
-
* @module src/serve/jobs
|
|
6
|
-
*/
|
|
1
|
+
/** REST-compatible facade over the resident JobManager. */
|
|
7
2
|
|
|
3
|
+
import type { JobManager, JobRecord } from "../core/job-manager";
|
|
8
4
|
import type { SyncResult } from "../ingestion";
|
|
9
5
|
|
|
10
|
-
// Job expiration: 1 hour
|
|
11
6
|
const JOB_EXPIRATION_MS = 60 * 60 * 1000;
|
|
12
7
|
|
|
13
8
|
export type JobType = "add" | "sync" | "embed";
|
|
@@ -42,44 +37,60 @@ export interface StartJobError {
|
|
|
42
37
|
|
|
43
38
|
export type StartJobResult = StartJobSuccess | StartJobError;
|
|
44
39
|
|
|
45
|
-
//
|
|
40
|
+
// Standalone fallback retained for unit fixtures that do not construct a resident.
|
|
46
41
|
let activeJobId: string | null = null;
|
|
47
42
|
const jobs = new Map<string, JobStatus>();
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
const fromResidentRecord = (record: JobRecord): JobStatus => ({
|
|
45
|
+
id: record.id,
|
|
46
|
+
type: record.type as JobType,
|
|
47
|
+
status: record.status,
|
|
48
|
+
createdAt: record.startedAt,
|
|
49
|
+
progress: record.progress,
|
|
50
|
+
result: record.result,
|
|
51
|
+
error: record.error,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
54
|
function cleanupExpiredJobs(now = Date.now()): void {
|
|
55
55
|
for (const [id, job] of jobs) {
|
|
56
|
-
|
|
57
|
-
if (job.status === "running") {
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
if (now - job.createdAt > JOB_EXPIRATION_MS) {
|
|
56
|
+
if (job.status !== "running" && now - job.createdAt > JOB_EXPIRATION_MS) {
|
|
61
57
|
jobs.delete(id);
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
/**
|
|
67
|
-
* Start a background job.
|
|
68
|
-
* Returns immediately with jobId; caller polls /api/jobs/:id for status.
|
|
69
|
-
* Use updateJobProgress() to update progress during execution.
|
|
70
|
-
*
|
|
71
|
-
* @param type - Job type identifier
|
|
72
|
-
* @param fn - Async function to run in background
|
|
73
|
-
* @returns Job ID on success, or 409 error if job already running
|
|
74
|
-
*/
|
|
75
62
|
export function startJob(
|
|
76
63
|
type: JobType,
|
|
77
64
|
fn: () => Promise<SyncResult>
|
|
78
|
-
): StartJobResult
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
): StartJobResult;
|
|
66
|
+
export function startJob(
|
|
67
|
+
type: JobType,
|
|
68
|
+
fn: () => Promise<SyncResult>,
|
|
69
|
+
manager: JobManager
|
|
70
|
+
): Promise<StartJobResult>;
|
|
71
|
+
export function startJob(
|
|
72
|
+
type: JobType,
|
|
73
|
+
fn: () => Promise<SyncResult>,
|
|
74
|
+
manager: JobManager | undefined
|
|
75
|
+
): StartJobResult | Promise<StartJobResult>;
|
|
76
|
+
export function startJob(
|
|
77
|
+
type: JobType,
|
|
78
|
+
fn: () => Promise<SyncResult>,
|
|
79
|
+
manager?: JobManager
|
|
80
|
+
): StartJobResult | Promise<StartJobResult> {
|
|
81
|
+
if (manager) {
|
|
82
|
+
return manager.startJob(type, fn).then(
|
|
83
|
+
(jobId) => ({ ok: true, jobId }),
|
|
84
|
+
(error: unknown) => ({
|
|
85
|
+
ok: false,
|
|
86
|
+
error: error instanceof Error ? error.message : String(error),
|
|
87
|
+
status: 409,
|
|
88
|
+
activeJobId: manager.getActiveJob()?.id ?? "",
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
}
|
|
81
92
|
|
|
82
|
-
|
|
93
|
+
cleanupExpiredJobs();
|
|
83
94
|
if (activeJobId) {
|
|
84
95
|
return {
|
|
85
96
|
ok: false,
|
|
@@ -88,21 +99,14 @@ export function startJob(
|
|
|
88
99
|
activeJobId,
|
|
89
100
|
};
|
|
90
101
|
}
|
|
91
|
-
|
|
92
102
|
const jobId = crypto.randomUUID();
|
|
93
103
|
activeJobId = jobId;
|
|
94
|
-
|
|
95
|
-
const jobStatus: JobStatus = {
|
|
104
|
+
jobs.set(jobId, {
|
|
96
105
|
id: jobId,
|
|
97
106
|
type,
|
|
98
107
|
status: "running",
|
|
99
108
|
createdAt: Date.now(),
|
|
100
|
-
};
|
|
101
|
-
jobs.set(jobId, jobStatus);
|
|
102
|
-
|
|
103
|
-
// Run in background (don't await)
|
|
104
|
-
// Wrap with Promise.resolve().then() to catch sync throws from fn()
|
|
105
|
-
// Without this, a sync throw would leave activeJobId set forever (deadlock)
|
|
109
|
+
});
|
|
106
110
|
Promise.resolve()
|
|
107
111
|
.then(fn)
|
|
108
112
|
.then((result) => {
|
|
@@ -112,73 +116,67 @@ export function startJob(
|
|
|
112
116
|
job.result = result;
|
|
113
117
|
}
|
|
114
118
|
})
|
|
115
|
-
.catch((
|
|
119
|
+
.catch((error: unknown) => {
|
|
116
120
|
const job = jobs.get(jobId);
|
|
117
121
|
if (job) {
|
|
118
122
|
job.status = "failed";
|
|
119
|
-
job.error =
|
|
123
|
+
job.error = error instanceof Error ? error.message : String(error);
|
|
120
124
|
}
|
|
121
125
|
})
|
|
122
126
|
.finally(() => {
|
|
123
127
|
activeJobId = null;
|
|
124
128
|
});
|
|
125
|
-
|
|
126
129
|
return { ok: true, jobId };
|
|
127
130
|
}
|
|
128
131
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
export function getJobStatus(
|
|
133
|
+
jobId: string,
|
|
134
|
+
manager?: JobManager
|
|
135
|
+
): JobStatus | undefined {
|
|
136
|
+
if (manager) {
|
|
137
|
+
const record = manager.getJob(jobId);
|
|
138
|
+
return record ? fromResidentRecord(record) : undefined;
|
|
139
|
+
}
|
|
136
140
|
cleanupExpiredJobs();
|
|
137
141
|
return jobs.get(jobId);
|
|
138
142
|
}
|
|
139
143
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*/
|
|
143
|
-
export function getActiveJobId(): string | null {
|
|
144
|
-
return activeJobId;
|
|
144
|
+
export function getActiveJobId(manager?: JobManager): string | null {
|
|
145
|
+
return manager?.getActiveJob()?.id ?? activeJobId;
|
|
145
146
|
}
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (!activeJobId) {
|
|
152
|
-
return null;
|
|
148
|
+
export function getActiveJob(manager?: JobManager): JobStatus | null {
|
|
149
|
+
if (manager) {
|
|
150
|
+
const record = manager.getActiveJob();
|
|
151
|
+
return record ? fromResidentRecord(record) : null;
|
|
153
152
|
}
|
|
154
|
-
return jobs.get(activeJobId) ?? null;
|
|
153
|
+
return activeJobId ? (jobs.get(activeJobId) ?? null) : null;
|
|
155
154
|
}
|
|
156
155
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if (job) {
|
|
166
|
-
job.progress = progress;
|
|
156
|
+
export function updateJobProgress(
|
|
157
|
+
jobId: string,
|
|
158
|
+
progress: JobProgress,
|
|
159
|
+
manager?: JobManager
|
|
160
|
+
): void {
|
|
161
|
+
if (manager) {
|
|
162
|
+
manager.updateJobProgress(jobId, progress);
|
|
163
|
+
return;
|
|
167
164
|
}
|
|
165
|
+
const job = jobs.get(jobId);
|
|
166
|
+
if (job) job.progress = progress;
|
|
168
167
|
}
|
|
169
168
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
export function getAllJobs(manager?: JobManager): JobStatus[] {
|
|
170
|
+
if (manager) {
|
|
171
|
+
const listed = manager.listJobs(100);
|
|
172
|
+
return [...listed.active, ...listed.recent].map(fromResidentRecord);
|
|
173
|
+
}
|
|
174
174
|
cleanupExpiredJobs();
|
|
175
175
|
return Array.from(jobs.values());
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
*/
|
|
181
|
-
export function clearAllJobs(): void {
|
|
178
|
+
export function clearAllJobs(manager?: JobManager): void {
|
|
179
|
+
if (manager) manager.clear();
|
|
182
180
|
jobs.clear();
|
|
183
181
|
activeJobId = null;
|
|
184
182
|
}
|
package/src/serve/public/app.tsx
CHANGED
|
@@ -29,6 +29,7 @@ import DocumentEditor from "./pages/DocumentEditor";
|
|
|
29
29
|
import DocView from "./pages/DocView";
|
|
30
30
|
import GraphView from "./pages/GraphView";
|
|
31
31
|
import Search from "./pages/Search";
|
|
32
|
+
import TraceHistory from "./pages/TraceHistory";
|
|
32
33
|
|
|
33
34
|
type Route =
|
|
34
35
|
| "/"
|
|
@@ -39,7 +40,8 @@ type Route =
|
|
|
39
40
|
| "/edit"
|
|
40
41
|
| "/collections"
|
|
41
42
|
| "/graph"
|
|
42
|
-
| "/connectors"
|
|
43
|
+
| "/connectors"
|
|
44
|
+
| "/traces";
|
|
43
45
|
type Navigate = (to: string | number) => void;
|
|
44
46
|
|
|
45
47
|
interface RoutePageProps {
|
|
@@ -57,6 +59,7 @@ const routes: Record<Route, React.ComponentType<RoutePageProps>> = {
|
|
|
57
59
|
"/connectors": Connectors,
|
|
58
60
|
"/ask": Ask,
|
|
59
61
|
"/graph": GraphView,
|
|
62
|
+
"/traces": TraceHistory,
|
|
60
63
|
};
|
|
61
64
|
|
|
62
65
|
interface AppContentProps {
|
|
@@ -165,6 +168,14 @@ function AppContent({
|
|
|
165
168
|
Collections
|
|
166
169
|
</button>
|
|
167
170
|
<span className="text-border/30">—</span>
|
|
171
|
+
<button
|
|
172
|
+
className="transition-colors duration-300 hover:text-primary"
|
|
173
|
+
onClick={() => navigate("/traces")}
|
|
174
|
+
type="button"
|
|
175
|
+
>
|
|
176
|
+
Trace history
|
|
177
|
+
</button>
|
|
178
|
+
<span className="text-border/30">—</span>
|
|
168
179
|
<a
|
|
169
180
|
className="transition-colors duration-300 hover:text-primary"
|
|
170
181
|
href="https://github.com/gmickel/gno"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ActivityIcon,
|
|
2
3
|
AlertCircleIcon,
|
|
3
4
|
CheckCircle2Icon,
|
|
4
5
|
HardDriveIcon,
|
|
5
6
|
Loader2Icon,
|
|
7
|
+
ServerIcon,
|
|
6
8
|
SparklesIcon,
|
|
7
9
|
} from "lucide-react";
|
|
8
10
|
|
|
@@ -24,6 +26,7 @@ import {
|
|
|
24
26
|
|
|
25
27
|
interface HealthCenterProps {
|
|
26
28
|
health: AppStatusResponse["health"];
|
|
29
|
+
resident: AppStatusResponse["resident"];
|
|
27
30
|
onAction: (action: HealthActionKind) => void;
|
|
28
31
|
busyAction?: HealthActionKind | null;
|
|
29
32
|
}
|
|
@@ -52,6 +55,7 @@ function getStatusLabel(status: HealthCheck["status"]): string {
|
|
|
52
55
|
|
|
53
56
|
export function HealthCenter({
|
|
54
57
|
health,
|
|
58
|
+
resident,
|
|
55
59
|
onAction,
|
|
56
60
|
busyAction,
|
|
57
61
|
}: HealthCenterProps) {
|
|
@@ -83,7 +87,76 @@ export function HealthCenter({
|
|
|
83
87
|
</Badge>
|
|
84
88
|
</div>
|
|
85
89
|
|
|
86
|
-
<div className="
|
|
90
|
+
<div className="rounded-lg border border-border/40 bg-muted/10 px-4 py-3">
|
|
91
|
+
<div className="mb-3 flex items-center gap-2">
|
|
92
|
+
<ServerIcon className="size-4 text-primary" />
|
|
93
|
+
<h3 className="font-mono text-[10px] text-muted-foreground uppercase tracking-[0.15em]">
|
|
94
|
+
{resident.resident ? "Resident runtime" : "Standalone runtime"}
|
|
95
|
+
</h3>
|
|
96
|
+
<span className="ml-auto rounded bg-primary/12 px-1.5 py-0.5 font-mono text-[10px] text-primary tabular-nums">
|
|
97
|
+
{resident.mode}
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
<dl className="grid grid-cols-2 gap-x-4 gap-y-3 text-sm sm:grid-cols-4 lg:grid-cols-6">
|
|
101
|
+
<div>
|
|
102
|
+
<dt className="font-mono text-[9px] text-muted-foreground/50 uppercase">
|
|
103
|
+
Uptime
|
|
104
|
+
</dt>
|
|
105
|
+
<dd className="font-mono tabular-nums">
|
|
106
|
+
{resident.uptimeSeconds === null
|
|
107
|
+
? "standalone"
|
|
108
|
+
: `${resident.uptimeSeconds}s`}
|
|
109
|
+
</dd>
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
<dt className="font-mono text-[9px] text-muted-foreground/50 uppercase">
|
|
113
|
+
Listener
|
|
114
|
+
</dt>
|
|
115
|
+
<dd className="font-mono tabular-nums">
|
|
116
|
+
{resident.listenerPort ?? "none"}
|
|
117
|
+
</dd>
|
|
118
|
+
</div>
|
|
119
|
+
<div>
|
|
120
|
+
<dt className="font-mono text-[9px] text-muted-foreground/50 uppercase">
|
|
121
|
+
Sessions
|
|
122
|
+
</dt>
|
|
123
|
+
<dd className="font-mono tabular-nums">
|
|
124
|
+
{resident.transport.activeSessions}
|
|
125
|
+
</dd>
|
|
126
|
+
</div>
|
|
127
|
+
<div>
|
|
128
|
+
<dt className="font-mono text-[9px] text-muted-foreground/50 uppercase">
|
|
129
|
+
Requests
|
|
130
|
+
</dt>
|
|
131
|
+
<dd className="font-mono tabular-nums">
|
|
132
|
+
{resident.transport.activeRequests}
|
|
133
|
+
{resident.transport.queuedRequests > 0
|
|
134
|
+
? ` +${resident.transport.queuedRequests} queued`
|
|
135
|
+
: ""}
|
|
136
|
+
</dd>
|
|
137
|
+
</div>
|
|
138
|
+
<div>
|
|
139
|
+
<dt className="font-mono text-[9px] text-muted-foreground/50 uppercase">
|
|
140
|
+
Models
|
|
141
|
+
</dt>
|
|
142
|
+
<dd className="font-mono tabular-nums">
|
|
143
|
+
{resident.models.loadedModels} warm ·{" "}
|
|
144
|
+
{resident.models.activeLeases} leased
|
|
145
|
+
</dd>
|
|
146
|
+
</div>
|
|
147
|
+
<div>
|
|
148
|
+
<dt className="font-mono text-[9px] text-muted-foreground/50 uppercase">
|
|
149
|
+
Admission
|
|
150
|
+
</dt>
|
|
151
|
+
<dd className="flex items-center gap-1.5 font-mono">
|
|
152
|
+
<ActivityIcon className="size-3 text-primary" />
|
|
153
|
+
{resident.admission.state}
|
|
154
|
+
</dd>
|
|
155
|
+
</div>
|
|
156
|
+
</dl>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
|
87
160
|
{health.checks.map((check) => {
|
|
88
161
|
const isBusy = busyAction === check.actionKind;
|
|
89
162
|
|