@gmickel/gno 1.17.0 → 1.18.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.
Files changed (51) hide show
  1. package/README.md +14 -2
  2. package/assets/skill/SKILL.md +17 -1
  3. package/assets/skill/mcp-reference.md +21 -0
  4. package/package.json +2 -2
  5. package/src/cli/commands/daemon.ts +69 -2
  6. package/src/cli/commands/models/pull.ts +13 -3
  7. package/src/cli/commands/status.ts +2 -0
  8. package/src/cli/detach.ts +37 -20
  9. package/src/cli/program.ts +74 -27
  10. package/src/config/index.ts +3 -0
  11. package/src/config/types.ts +37 -0
  12. package/src/core/job-manager.ts +19 -0
  13. package/src/core/mutation-generations.ts +33 -0
  14. package/src/llm/cache.ts +13 -3
  15. package/src/llm/nodeLlamaCpp/adapter.ts +10 -1
  16. package/src/llm/nodeLlamaCpp/lifecycle.ts +71 -0
  17. package/src/mcp/context.ts +161 -0
  18. package/src/mcp/http-security.ts +477 -0
  19. package/src/mcp/http-session.ts +272 -0
  20. package/src/mcp/http-transport.ts +370 -0
  21. package/src/mcp/resources/index.ts +141 -134
  22. package/src/mcp/server.ts +19 -79
  23. package/src/mcp/tools/add-collection.ts +3 -1
  24. package/src/mcp/tools/capture.ts +3 -0
  25. package/src/mcp/tools/clear-collection-embeddings.ts +2 -0
  26. package/src/mcp/tools/context.ts +9 -8
  27. package/src/mcp/tools/embed.ts +62 -52
  28. package/src/mcp/tools/index-cmd.ts +88 -74
  29. package/src/mcp/tools/index.ts +22 -2
  30. package/src/mcp/tools/remove-collection.ts +2 -0
  31. package/src/mcp/tools/status.ts +11 -0
  32. package/src/mcp/tools/sync.ts +16 -14
  33. package/src/mcp/tools/workspace-write.ts +7 -3
  34. package/src/serve/background-runtime.ts +12 -212
  35. package/src/serve/embed-scheduler.ts +74 -43
  36. package/src/serve/index.ts +9 -0
  37. package/src/serve/jobs.ts +78 -80
  38. package/src/serve/public/components/HealthCenter.tsx +74 -1
  39. package/src/serve/public/globals.built.css +1 -1
  40. package/src/serve/public/pages/Dashboard.tsx +1 -0
  41. package/src/serve/resident-admission.ts +159 -0
  42. package/src/serve/resident-background-work.ts +39 -0
  43. package/src/serve/resident-request.ts +55 -0
  44. package/src/serve/resident-runtime.ts +490 -0
  45. package/src/serve/resident-status.ts +96 -0
  46. package/src/serve/routes/api.ts +263 -167
  47. package/src/serve/routes/mcp.ts +69 -0
  48. package/src/serve/server.ts +191 -37
  49. package/src/serve/status-model.ts +51 -0
  50. package/src/serve/status.ts +5 -0
  51. package/src/store/sqlite/adapter.ts +26 -9
@@ -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="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
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