omnius 1.0.874 → 1.0.876

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 (25) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/library.js +37 -20
  3. package/dist/providerRegistry.d.ts +6 -0
  4. package/dist/tui/native/worker.js +137 -8
  5. package/docs/DISCOVERY.json +747 -47
  6. package/docs/DISCOVERY.md +20 -1
  7. package/docs/guides/endpoint-requirements.md +33 -0
  8. package/docs/guides/sponsored-inference-mesh.md +84 -0
  9. package/docs/work-orders/evidence/endpoint-completion-verification-20261017.json +95 -0
  10. package/docs/work-orders/evidence/endpoint-source-verification-20261017.json +175 -0
  11. package/docs/work-orders/evidence/expanded-variant-repair-20261017.json +88 -0
  12. package/docs/work-orders/evidence/mesh-optional-startup-verification-20261017.json +70 -0
  13. package/docs/work-orders/evidence/mesh-source-verification-20261017.json +46 -0
  14. package/docs/work-orders/evidence/mesh-transport-verification-20261017.json +156 -0
  15. package/docs/work-orders/evidence/opencode-endpoint-regression-20261017.json +984 -0
  16. package/docs/work-orders/evidence/packaged-startup-independent-20261017.json +106 -0
  17. package/docs/work-orders/evidence/packaged-startup-native-20261017.json +131 -0
  18. package/docs/work-orders/evidence/publish-lock-verification-20261017.json +80 -0
  19. package/docs/work-orders/evidence/published-startup-investigation-20261017.json +158 -0
  20. package/docs/work-orders/evidence/startup-recovery-delivery-20261017.json +77 -0
  21. package/docs/work-orders/evidence/sticky-catalog-candidate-release-20261017.json +314 -0
  22. package/docs/work-orders/evidence/system-devices-source-verification-20261017.json +60 -0
  23. package/docs/work-orders/evidence/system-devices-verification-20261017.json +39 -0
  24. package/npm-shrinkwrap.json +1657 -636
  25. package/package.json +15 -33
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/index.js
3
- size: 37925419 bytes
4
- sha256: 60600931f277c7850afc402e56d9985628d48802a8c905961f9396a865666432
3
+ size: 38055609 bytes
4
+ sha256: 1177d20dac77ac80829d0bfca941cfd775b5fab0069bf239a6bf22f69b19aa81
package/dist/library.js CHANGED
@@ -340816,10 +340816,6 @@ var OPENAI_CAPABILITIES = [
340816
340816
  ...CHAT_CAPABILITIES,
340817
340817
  "embeddings"
340818
340818
  ];
340819
- var noAuth = (required = false) => ({
340820
- strategy: "none",
340821
- required
340822
- });
340823
340819
  var bearerAuth = (required, keyPrefix, staticHeaders) => ({
340824
340820
  strategy: "bearer",
340825
340821
  required,
@@ -340834,9 +340830,27 @@ var descriptor = (value) => Object.freeze({
340834
340830
  ...value.auth,
340835
340831
  ...value.auth.staticHeaders ? { staticHeaders: Object.freeze({ ...value.auth.staticHeaders }) } : {}
340836
340832
  }),
340837
- capabilities: Object.freeze([...value.capabilities])
340833
+ capabilities: Object.freeze([...value.capabilities]),
340834
+ ...value.availability ? { availability: Object.freeze({ ...value.availability }) } : {}
340838
340835
  });
340839
340836
  var registrations = [
340837
+ {
340838
+ descriptor: descriptor({
340839
+ id: "mesh",
340840
+ aliases: [],
340841
+ label: "Sponsored inference mesh",
340842
+ protocol: "openai-chat",
340843
+ local: false,
340844
+ apiPrefix: "/v1",
340845
+ paths: { chat: "/v1/chat/completions", models: "/v1/models" },
340846
+ auth: bearerAuth(true),
340847
+ capabilities: CHAT_CAPABILITIES,
340848
+ defaultUrl: "http://127.0.0.1:11436/v1",
340849
+ description: "Opt-in remote sponsor inference through your private authenticated mesh gateway."
340850
+ }),
340851
+ // A loopback port is not provider identity. Select this transport explicitly.
340852
+ match: () => false
340853
+ },
340840
340854
  {
340841
340855
  descriptor: descriptor({
340842
340856
  id: "builtin-free",
@@ -340845,7 +340859,7 @@ var registrations = [
340845
340859
  protocol: "openai-chat",
340846
340860
  local: false,
340847
340861
  apiPrefix: "/inference/openai/v1",
340848
- paths: { chat: "/inference/openai/v1/chat/completions", models: "/inference/openai/v1/models" },
340862
+ paths: { chat: "/inference/openai/v1/chat/completions", models: "/inference/v1/models" },
340849
340863
  auth: { strategy: "bearer", required: false, staticHeaders: { Authorization: "Bearer public" } },
340850
340864
  capabilities: CHAT_CAPABILITIES,
340851
340865
  defaultUrl: "https://opencode.ai/inference/openai/v1",
@@ -341028,12 +341042,12 @@ var registrations = [
341028
341042
  },
341029
341043
  auth: bearerAuth(true),
341030
341044
  capabilities: OPENAI_CAPABILITIES,
341031
- defaultUrl: "https://api.together.xyz/v1",
341045
+ defaultUrl: "https://api.together.ai/v1",
341032
341046
  apiKeyUrl: "https://api.together.xyz/settings/api-keys",
341033
341047
  docsUrl: "https://docs.together.ai",
341034
341048
  description: "Together OpenAI-compatible inference."
341035
341049
  }),
341036
- match: (url) => url.hostname.toLowerCase() === "api.together.xyz"
341050
+ match: (url) => ["api.together.ai", "api.together.xyz"].includes(url.hostname.toLowerCase())
341037
341051
  },
341038
341052
  {
341039
341053
  descriptor: descriptor({
@@ -341163,7 +341177,8 @@ var registrations = [
341163
341177
  defaultUrl: "https://api.hyperbolic.xyz/v1",
341164
341178
  apiKeyUrl: "https://app.hyperbolic.xyz/settings",
341165
341179
  docsUrl: "https://docs.hyperbolic.xyz",
341166
- description: "Hyperbolic OpenAI-compatible inference."
341180
+ description: "Retired Hyperbolic serverless API. Explicit custom deployments require their own URL.",
341181
+ availability: { state: "retired", reason: "Hyperbolic's serverless inference API has been retired; old serverless models no longer accept requests, including with valid keys.", docsUrl: "https://www.hyperbolic.ai/docs/faq/inference-models" }
341167
341182
  }),
341168
341183
  match: (url) => url.hostname.toLowerCase() === "api.hyperbolic.xyz"
341169
341184
  },
@@ -341182,7 +341197,7 @@ var registrations = [
341182
341197
  embeddings: "/api/embed",
341183
341198
  health: "/api/tags"
341184
341199
  },
341185
- auth: noAuth(),
341200
+ auth: bearerAuth(false),
341186
341201
  capabilities: OPENAI_CAPABILITIES,
341187
341202
  defaultUrl: "http://127.0.0.1:11434",
341188
341203
  docsUrl: "https://docs.ollama.com/api",
@@ -341336,7 +341351,7 @@ function customDescriptor(protocol2, rawUrl) {
341336
341351
  strategy: "anthropic-api-key",
341337
341352
  required: false,
341338
341353
  staticHeaders: { "anthropic-version": "2023-06-01" }
341339
- } : protocol2 === "ollama" ? noAuth() : bearerAuth(false),
341354
+ } : bearerAuth(false),
341340
341355
  capabilities: protocol2 === "anthropic-messages" ? CHAT_CAPABILITIES : OPENAI_CAPABILITIES,
341341
341356
  defaultUrl: `${url.origin}${endpointPath}`,
341342
341357
  description: `Custom endpoint with explicit ${protocol2} protocol.`
@@ -341384,7 +341399,8 @@ function listProviderDescriptors() {
341384
341399
  ...entry.auth,
341385
341400
  ...entry.auth.staticHeaders ? { staticHeaders: { ...entry.auth.staticHeaders } } : {}
341386
341401
  },
341387
- capabilities: [...entry.capabilities]
341402
+ capabilities: [...entry.capabilities],
341403
+ ...entry.availability ? { availability: { ...entry.availability } } : {}
341388
341404
  }));
341389
341405
  }
341390
341406
  function detectProviderDescriptor(rawUrl) {
@@ -341619,7 +341635,7 @@ function toProviderInfo(provider) {
341619
341635
  };
341620
341636
  }
341621
341637
  var PROVIDER_PRESETS = [
341622
- ...listProviderDescriptors().map(toProviderInfo),
341638
+ ...listProviderDescriptors().filter((provider) => provider.availability?.state !== "retired").map(toProviderInfo),
341623
341639
  {
341624
341640
  id: "custom",
341625
341641
  label: "Custom endpoint",
@@ -343368,7 +343384,7 @@ var OPENCODE_INFERENCE_BASE_URL = "https://opencode.ai/inference/openai/v1";
343368
343384
  function isOpenCodeInferenceBaseUrl(value) {
343369
343385
  return value === OPENCODE_INFERENCE_BASE_URL || value === OPENCODE_LEGACY_INFERENCE_BASE_URL;
343370
343386
  }
343371
- var OPENCODE_AVAILABLE_MODELS_URL = `${OPENCODE_INFERENCE_BASE_URL}/models`;
343387
+ var OPENCODE_AVAILABLE_MODELS_URL = `${OPENCODE_LEGACY_INFERENCE_BASE_URL}/models`;
343372
343388
  var OPENCODE_COMPATIBILITY_CLIENT_VERSION = "2.0.27";
343373
343389
  var observedModelCompatibility = Object.freeze({
343374
343390
  "openai-responses": Object.freeze({
@@ -343598,7 +343614,7 @@ var FREE_INFERENCE_SEEDS = Object.freeze([
343598
343614
  name: "Built-in free inference",
343599
343615
  chatUrl: `${OPENCODE_INFERENCE_BASE_URL}/chat/completions`,
343600
343616
  modelsUrl: OPENCODE_MODEL_CATALOG_URL,
343601
- availabilityModelsUrl: `${OPENCODE_INFERENCE_BASE_URL}/models`,
343617
+ availabilityModelsUrl: OPENCODE_AVAILABLE_MODELS_URL,
343602
343618
  model: "nemotron-3.5-lightning-free",
343603
343619
  nativeToolsHint: true,
343604
343620
  catalogKind: "opencode",
@@ -345863,7 +345879,7 @@ var InferenceRoutePolicyError = class extends Error {
345863
345879
  fatal = true;
345864
345880
  retryable = false;
345865
345881
  constructor(failure) {
345866
- super(`Inference request failed (${failure.category}${failure.status === void 0 ? "" : `; HTTP ${failure.status}`}${failure.validationReason ? `; ${failure.validationReason}` : failure.reason && failure.reason !== "terminal" ? `; ${failure.reason}` : ""}).`);
345882
+ super(`Inference request failed (${failure.category}${failure.status === void 0 ? "" : `; HTTP ${failure.status}`}${failure.accessReason ? `; ${failure.accessReason}` : failure.validationReason ? `; ${failure.validationReason}` : failure.reason && failure.reason !== "terminal" ? `; ${failure.reason}` : ""}).`);
345867
345883
  this.failure = failure;
345868
345884
  this.name = "InferenceRoutePolicyError";
345869
345885
  }
@@ -346111,7 +346127,7 @@ var RemoteInferenceFallback = class _RemoteInferenceFallback {
346111
346127
  handleStickyFailure(request, candidate, deadline, error, frames) {
346112
346128
  let disposition = "surface_error";
346113
346129
  const category = safeFailure(error, request, candidate, frames).category;
346114
- let reason = category === "authentication" || category === "access_denied" ? "authentication" : category === "request_rejected" ? "request_rejected" : category === "invalid_response" ? "response_contract" : category === "transport" ? "adapter_or_configuration" : "terminal";
346130
+ let reason = category === "authentication" ? "authentication" : category === "access_denied" ? "access_restricted" : category === "request_rejected" ? "request_rejected" : category === "invalid_response" ? "response_contract" : category === "transport" ? "adapter_or_configuration" : "terminal";
346115
346131
  let retryDelayMs;
346116
346132
  if (this.learnNativeSchemaRestriction(request, candidate, error)) {
346117
346133
  disposition = "repair_same_model";
@@ -346376,13 +346392,13 @@ var RemoteInferenceFallback = class _RemoteInferenceFallback {
346376
346392
  return remote.chatCompletion(remoteRequest);
346377
346393
  }, remaining <= this.policy.requestTimeoutMs ? "remote_aggregate" : "remote_attempt");
346378
346394
  this.fenceRemoteDeadline(request, deadline);
346395
+ if ((request.responseFormat ?? request.response_format) && result?.outputTruncated)
346396
+ throw new ExpectedInferenceResponseError(InputValidationFailure.Truncated, expectedInferenceResponseKind(request));
346379
346397
  if (!usableResult(result))
346380
346398
  throw new EmptyInferenceResponse();
346381
346399
  const validation = validateRemoteMessage(result.choices[0]?.message, request);
346382
346400
  if (validation.normalizedContent !== void 0 && result.choices[0]?.message)
346383
346401
  result.choices[0].message.content = validation.normalizedContent;
346384
- if ((request.responseFormat ?? request.response_format) && result.outputTruncated)
346385
- throw new ExpectedInferenceResponseError(InputValidationFailure.Truncated, expectedInferenceResponseKind(request));
346386
346402
  cooldowns.delete(routeKey(candidate));
346387
346403
  cooldowns.delete(rateLimitKey(candidate));
346388
346404
  cooldowns.delete(contractCooldownKey(candidate, request));
@@ -347297,7 +347313,8 @@ ${line}`).join("");
347297
347313
  const pending = [];
347298
347314
  let matched = !eligible;
347299
347315
  for await (const candidate of this.catalogCandidates(request, deadline, includeCooling)) {
347300
- if (!matched && routeKey(candidate) !== routeKey(eligible)) {
347316
+ const preferredCatalogComplete = eligible?.baseUrl === OPENCODE_INFERENCE_BASE_URL && candidate.baseUrl === eligible.baseUrl && eligible.keyless?.catalogKind === "opencode" && candidate.keyless?.catalogKind === "opencode";
347317
+ if (!matched && routeKey(candidate) !== routeKey(eligible) && !preferredCatalogComplete) {
347301
347318
  pending.push(candidate);
347302
347319
  continue;
347303
347320
  }
@@ -28,6 +28,12 @@ export interface ProviderDescriptor {
28
28
  defaultUrl?: string;
29
29
  apiKeyUrl?: string;
30
30
  docsUrl?: string;
31
+ /** Published retirement metadata; this is not a live availability attestation. */
32
+ availability?: Readonly<{
33
+ state: "retired";
34
+ reason: string;
35
+ docsUrl: string;
36
+ }>;
31
37
  description: string;
32
38
  }
33
39
  export interface ResolveProviderOptions {
@@ -35,6 +35,7 @@ function sanitizeNativeInterfaceState(value) {
35
35
  Object.defineProperty(views, key, { value: { top: offset(entry.top), live: entry.live === true, disclosures }, enumerable: true, configurable: true, writable: true });
36
36
  }
37
37
  const layout = record(value.layout) ? value.layout : {}, instruments = record(value.instruments) ? value.instruments : {}, tabs = record(value.tabs) ? value.tabs : {};
38
+ const deviceSections = record(instruments.deviceSections) ? instruments.deviceSections : void 0;
38
39
  const taskNotes = record(instruments.taskNotes) ? instruments.taskNotes : void 0;
39
40
  const workQueue = record(instruments.workQueue) ? instruments.workQueue : void 0;
40
41
  const workDisclosures = {};
@@ -64,6 +65,7 @@ function sanitizeNativeInterfaceState(value) {
64
65
  session: instruments.session === true,
65
66
  context: instruments.context === true,
66
67
  devices: instruments.devices === true,
68
+ ...deviceSections ? { deviceSections: { cpu: deviceSections.cpu === true, memory: deviceSections.memory === true, disk: deviceSections.disk === true, network: deviceSections.network === true, gpu: deviceSections.gpu !== false } } : {},
67
69
  scrollTop: offset(instruments.scrollTop),
68
70
  deviceScrollTop: offset(instruments.deviceScrollTop),
69
71
  ...typeof instruments.routeAttempts === "boolean" ? { routeAttempts: instruments.routeAttempts } : {},
@@ -3691,6 +3693,8 @@ var DeviceMonitor = class extends BoxRenderable7 {
3691
3693
  contentOptions: { flexDirection: "column" }
3692
3694
  });
3693
3695
  this.add(this.scroll);
3696
+ for (const [key, title] of [["cpu", "CPU"], ["memory", "MEMORY"], ["disk", "DISK"], ["network", "NETWORK"], ["gpu", "GPU"]])
3697
+ this.createSection(renderer2, key, title);
3694
3698
  this.notes = new TextRenderable6(renderer2, {
3695
3699
  id: "omnius-devices:notes",
3696
3700
  content: "",
@@ -3702,7 +3706,7 @@ var DeviceMonitor = class extends BoxRenderable7 {
3702
3706
  wrapMode: "none",
3703
3707
  truncate: true
3704
3708
  });
3705
- this.scroll.add(this.notes);
3709
+ this.sections.get("gpu").body.add(this.notes);
3706
3710
  const controls = new BoxRenderable7(renderer2, { id: "omnius-devices:controls", width: "100%", height: 1, flexShrink: 0, flexDirection: "row", gap: 2 });
3707
3711
  this.add(controls);
3708
3712
  this.policy = this.button(renderer2, "omnius-devices:policy", "GPU POLICY", () => {
@@ -3722,10 +3726,119 @@ var DeviceMonitor = class extends BoxRenderable7 {
3722
3726
  status;
3723
3727
  notes;
3724
3728
  expanded = false;
3729
+ sectionState = { cpu: false, memory: false, disk: false, network: false, gpu: true };
3730
+ sections = /* @__PURE__ */ new Map();
3725
3731
  availableRows = 100;
3726
3732
  snapshot;
3727
3733
  historySource = "";
3728
3734
  rows = /* @__PURE__ */ new Map();
3735
+ createSection(renderer2, key, title) {
3736
+ const root = new BoxRenderable7(renderer2, {
3737
+ id: `omnius-devices:${key}`,
3738
+ width: "100%",
3739
+ minWidth: 0,
3740
+ flexShrink: 0,
3741
+ flexDirection: "column",
3742
+ onSizeChange: () => {
3743
+ const section = this.sections.get(key);
3744
+ if (!section) return;
3745
+ section.header.width = root.width;
3746
+ for (const row of section.readings.values()) row.width = root.width;
3747
+ if (section.detail) section.detail.width = root.width;
3748
+ }
3749
+ });
3750
+ const header = new SectionBanner(renderer2, title, `${root.id}:heading`, () => this.toggleDeviceSection(key));
3751
+ header.on(RenderableEvents5.FOCUSED, () => this.scroll.scrollChildIntoView(header.id));
3752
+ const body = new BoxRenderable7(renderer2, { id: `${root.id}:body`, width: "100%", minWidth: 0, flexShrink: 0, flexDirection: "column", visible: this.sectionState[key] });
3753
+ root.add(header);
3754
+ root.add(body);
3755
+ this.scroll.add(root);
3756
+ const readings = /* @__PURE__ */ new Map();
3757
+ const labels = key === "cpu" ? ["LOAD", "CORES", "SAMPLE"] : key === "memory" ? ["USED", "FREE", "LOAD"] : key === "disk" ? ["SPACE USED", "USED", "FREE"] : key === "network" ? ["RECEIVE", "TRANSMIT", "SAMPLE"] : [];
3758
+ for (const label2 of labels) {
3759
+ const row = new TelemetryRow(renderer2, label2, `${root.id}:${label2.toLowerCase().replace(/ /g, "-")}`, 16);
3760
+ readings.set(label2, row);
3761
+ body.add(row);
3762
+ }
3763
+ const detail = key !== "gpu" ? new TextRenderable6(renderer2, {
3764
+ id: `${root.id}:detail`,
3765
+ content: "",
3766
+ width: "100%",
3767
+ height: 1,
3768
+ flexShrink: 0,
3769
+ fg: foreground,
3770
+ bg: background,
3771
+ attributes: TextAttributes7.DIM,
3772
+ wrapMode: "none",
3773
+ truncate: true
3774
+ }) : void 0;
3775
+ if (detail) body.add(detail);
3776
+ this.sections.set(key, { root, header, body, readings, detail });
3777
+ }
3778
+ toggleDeviceSection(key) {
3779
+ this.setDeviceSections({ ...this.sectionState, [key]: !this.sectionState[key] });
3780
+ }
3781
+ captureDeviceSections() {
3782
+ return { ...this.sectionState };
3783
+ }
3784
+ setDeviceSections(state) {
3785
+ if (!state) return;
3786
+ for (const key of Object.keys(this.sectionState)) {
3787
+ if (typeof state[key] !== "boolean") continue;
3788
+ const section = this.sections.get(key);
3789
+ if (!state[key]) for (let focused = this._ctx.currentFocusedRenderable; focused; focused = focused.parent) {
3790
+ if (focused === section.body) {
3791
+ section.header.focus();
3792
+ break;
3793
+ }
3794
+ }
3795
+ this.sectionState[key] = state[key];
3796
+ section.body.visible = state[key];
3797
+ }
3798
+ this.refresh();
3799
+ }
3800
+ refreshSystem() {
3801
+ const system = this.snapshot?.system;
3802
+ const number = (value, suffix = "") => instrumentNumber(value, suffix === " GiB" ? 1 : 0, suffix);
3803
+ const ratio = (used, total) => `${instrumentNumber(used, 1)}/${instrumentNumber(total, 1)} GiB`;
3804
+ const sample = (status) => status === "measured" ? "Measured" : status === "warming-up" ? "Warming up" : status === "reset" ? "Counter reset" : "Unavailable";
3805
+ const rate = (value) => {
3806
+ if (value === void 0 || !Number.isFinite(value) || value < 0) return "--";
3807
+ const units = ["B/s", "KiB/s", "MiB/s", "GiB/s", "TiB/s"];
3808
+ let unit = 0;
3809
+ while (value >= 1024 && unit < units.length - 1) {
3810
+ value /= 1024;
3811
+ unit++;
3812
+ }
3813
+ return `${instrumentNumber(value, unit ? 1 : 0)} ${units[unit]}`;
3814
+ };
3815
+ const set = (key, label2, value) => this.sections.get(key).readings.get(label2).update(value);
3816
+ set("cpu", "LOAD", formatSignalMeter(system?.cpu.utilization, 100, 6));
3817
+ set("cpu", "CORES", number(system?.cpu.cores));
3818
+ set("cpu", "SAMPLE", sample(system?.cpu.status));
3819
+ set("memory", "USED", ratio(system?.memory.usedGB, system?.memory.totalGB));
3820
+ const free = system?.memory.totalGB !== void 0 && system.memory.usedGB !== void 0 ? Math.max(0, system.memory.totalGB - system.memory.usedGB) : void 0;
3821
+ set("memory", "FREE", number(free, " GiB"));
3822
+ set("memory", "LOAD", formatSignalMeter(system?.memory.utilization, 100, 6));
3823
+ set("disk", "SPACE USED", number(system?.disk.utilization, "%"));
3824
+ set("disk", "USED", ratio(system?.disk.usedGB, system?.disk.totalGB));
3825
+ set("disk", "FREE", number(system?.disk.freeGB, " GiB"));
3826
+ set("network", "RECEIVE", rate(system?.network.rxBytesPerSec));
3827
+ set("network", "TRANSMIT", rate(system?.network.txBytesPerSec));
3828
+ set("network", "SAMPLE", sample(system?.network.status));
3829
+ const captions = {
3830
+ cpu: `CPU · ${number(system?.cpu.utilization, "%")}`,
3831
+ memory: `MEMORY · ${number(system?.memory.utilization, "%")}`,
3832
+ disk: `DISK · ${number(system?.disk.utilization, "%")} SPACE`,
3833
+ network: "NETWORK",
3834
+ gpu: this.snapshot?.source === "jtop" ? "GPU / UMA" : `GPU · ${this.snapshot?.devices.length ?? 0}`
3835
+ };
3836
+ for (const key of Object.keys(captions)) this.sections.get(key).header.update(captions[key], this.sectionState[key]);
3837
+ this.sections.get("cpu").detail.content = system?.cpu.model || "Processor unavailable";
3838
+ this.sections.get("memory").detail.content = "Host RAM · OS used / total";
3839
+ this.sections.get("disk").detail.content = system?.disk.path || "Filesystem unavailable";
3840
+ this.sections.get("network").detail.content = system?.network.source === "proc-net-dev" ? "All non-loopback interfaces" : system?.network.source === "netstat" ? "Interface en0" : "Interface counters unavailable";
3841
+ }
3729
3842
  button(renderer2, id, label2, activate) {
3730
3843
  const button = new TextRenderable6(renderer2, {
3731
3844
  id,
@@ -3829,7 +3942,7 @@ var DeviceMonitor = class extends BoxRenderable7 {
3829
3942
  root.add(memory);
3830
3943
  root.add(memoryGraph);
3831
3944
  root.add(reason);
3832
- this.scroll.add(root);
3945
+ this.sections.get("gpu").body.add(root);
3833
3946
  row = { root, title, load, memory, reason, history, loadGraph, memoryGraph };
3834
3947
  this.rows.set(device.uuid, row);
3835
3948
  }
@@ -3852,6 +3965,12 @@ var DeviceMonitor = class extends BoxRenderable7 {
3852
3965
  this.refresh();
3853
3966
  }
3854
3967
  toggle() {
3968
+ if (this.expanded) for (let focused = this._ctx.currentFocusedRenderable; focused; focused = focused.parent) {
3969
+ if (focused === this.scroll) {
3970
+ this.heading.focus();
3971
+ break;
3972
+ }
3973
+ }
3855
3974
  this.expanded = !this.expanded;
3856
3975
  this.scroll.visible = this.expanded;
3857
3976
  this.scroll.minHeight = this.expanded ? 1 : 0;
@@ -3882,10 +4001,11 @@ var DeviceMonitor = class extends BoxRenderable7 {
3882
4001
  if (!this.heading) return;
3883
4002
  const data = this.snapshot, devices = data?.devices ?? [];
3884
4003
  this.heading.update(data?.source === "jtop" ? "DEVICES / JETSON" : "DEVICES", this.expanded);
4004
+ this.refreshSystem();
3885
4005
  const measured = devices.map((device) => device.utilization).filter((value) => value !== void 0 && Number.isFinite(value) && value >= 0);
3886
4006
  const on = devices.filter((device) => device.enabled === true).length;
3887
4007
  const policyKnown = devices.every((device) => device.enabled !== void 0);
3888
- this.summary.content = !devices.length ? data?.source === "unavailable" ? "Telemetry unavailable" : "No local GPUs reported" : `${devices.length} GPU · ${policyKnown ? on : "--"} ON · ${measured.length === devices.length ? Math.round(Math.max(...measured)) : "--"}% PEAK`;
4008
+ this.summary.content = data?.system ? `CPU ${instrumentNumber(data.system.cpu.utilization, 0, "%")} · RAM ${instrumentNumber(data.system.memory.utilization, 0, "%")}` : !devices.length ? data?.source === "unavailable" ? "Telemetry unavailable" : "No local GPUs reported" : `${devices.length} GPU · ${policyKnown ? on : "--"} ON · ${measured.length === devices.length ? Math.round(Math.max(...measured)) : "--"}% PEAK`;
3889
4009
  this.notes.content = [
3890
4010
  data?.local === false ? "REMOTE" : void 0,
3891
4011
  data ? `${data.source.toUpperCase()} · ${data.policy.toUpperCase()} · ${data.broker.toUpperCase()}` : void 0,
@@ -3902,6 +4022,10 @@ var DeviceMonitor = class extends BoxRenderable7 {
3902
4022
  const next = `${caption} ${deviceHistorySparkline(compactHistory, field, plotWidth)} ${value}`;
3903
4023
  if (element.plainText !== next) element.content = next;
3904
4024
  }
4025
+ if (!primary && data?.system) {
4026
+ this.compactLoad.content = `CPU ${formatSignalMeter(data.system.cpu.utilization, 100, 6)}`;
4027
+ this.compactMemory.content = `MEM ${formatSignalMeter(data.system.memory.utilization, 100, 6)}`;
4028
+ }
3905
4029
  for (const device of devices) {
3906
4030
  const row = this.rows.get(device.uuid);
3907
4031
  if (!row) continue;
@@ -3916,9 +4040,10 @@ var DeviceMonitor = class extends BoxRenderable7 {
3916
4040
  focusTargets() {
3917
4041
  return !this.visible ? [] : [
3918
4042
  this.heading,
4043
+ ...this.expanded ? [...this.sections.values()].map((section) => section.header) : [],
4044
+ ...this.expanded && this.sectionState.gpu ? [...this.rows.values()].map((row) => row.title).filter((title) => title.focusable) : [],
3919
4045
  ...this.policy.focusable ? [this.policy] : [],
3920
- ...this.status.focusable ? [this.status] : [],
3921
- ...this.expanded ? [...this.rows.values()].map((row) => row.title).filter((title) => title.focusable) : []
4046
+ ...this.status.focusable ? [this.status] : []
3922
4047
  ];
3923
4048
  }
3924
4049
  };
@@ -4323,6 +4448,7 @@ var InstrumentRail = class extends BoxRenderable7 {
4323
4448
  session: this.session.visible,
4324
4449
  context: this.contextHeader.expanded,
4325
4450
  devices: this.devices.isExpanded,
4451
+ deviceSections: this.devices.captureDeviceSections(),
4326
4452
  routeAttempts: this.routeAttemptsHeader.expanded,
4327
4453
  scrollTop: this.scroll.scrollTop,
4328
4454
  deviceScrollTop: this.devices.scroll.scrollTop,
@@ -4340,6 +4466,7 @@ var InstrumentRail = class extends BoxRenderable7 {
4340
4466
  this.routeAttemptsHeader.update(this.routeAttemptsHeading, state.routeAttempts === true);
4341
4467
  this.routeAttempts.visible = this.routeAttemptsHeader.visible && state.routeAttempts === true;
4342
4468
  this.devices.setExpanded(state.devices);
4469
+ this.devices.setDeviceSections(state.deviceSections);
4343
4470
  this.scroll.scrollTo(state.scrollTop);
4344
4471
  this.devices.scroll.scrollTo(state.deviceScrollTop);
4345
4472
  }
@@ -4377,8 +4504,8 @@ var COMMAND_SIGNATURES = [
4377
4504
  ["/model", "Select from available models"],
4378
4505
  ["/model <name>", "Switch to a specific model"],
4379
4506
  ["/models", "List all available models"],
4380
- ["/endpoint", "Show current endpoint"],
4381
- ["/endpoint <url>", "Set backend URL (auto-detects type)"],
4507
+ ["/endpoint", "Select an endpoint or provider"],
4508
+ ["/endpoint <provider|alias|url>", "Set a provider name, alias, or backend URL"],
4382
4509
  ["/endpoint <url> --auth <t>", "Set endpoint with Bearer auth"],
4383
4510
  ["/fallback", "Show remote inference fallback mode"],
4384
4511
  ["/fallback status", "Show remote inference fallback mode"],
@@ -4831,6 +4958,7 @@ var COMMAND_SIGNATURES = [
4831
4958
  ["/ipfs share <tool|skill> <name>", "Share a tool or skill through IPFS"],
4832
4959
  ["/ipfs import <cid>", "Import a shared IPFS tool or skill reference"],
4833
4960
  ["/sponsor", "Sponsor inference - onboarding wizard or dashboard"],
4961
+ ["/mesh [status|identity]", "Inspect trusted inference mesh routing and public identity"],
4834
4962
  ["/sponsor status", "Show sponsor dashboard with usage metrics"],
4835
4963
  ["/sponsor image <prompt>", "Generate an image on a sponsored peer"],
4836
4964
  ["/sponsor video <prompt>", "Generate a video on a sponsored peer"],
@@ -4888,7 +5016,7 @@ var COMMAND_SIGNATURES = [
4888
5016
  ],
4889
5017
  ["/reminders", "Alias for /reminder"],
4890
5018
  ["/daemon", "Show or manage the local API daemon"],
4891
- ["/daemon <start|stop|restart|takeover>", "Control the local API daemon"],
5019
+ ["/daemon <status|diagnostics|start|stop|restart|takeover>", "Inspect startup diagnostics or control the local API daemon"],
4892
5020
  ["/apikey", "Show current API key (for pasting into Web UI / clients)"],
4893
5021
  ["/apikey copy", "Copy the API key to clipboard"],
4894
5022
  ["/apikey new", "Rotate to a new API key (regenerate)"],
@@ -5107,6 +5235,7 @@ var CATEGORY_OVERRIDES = {
5107
5235
  "task-type": "runtime",
5108
5236
  tasktype: "runtime",
5109
5237
  sponsor: "network",
5238
+ mesh: "network",
5110
5239
  expose: "gateway",
5111
5240
  access: "network",
5112
5241
  host: "network",