@astralform/js 4.4.0 → 4.5.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/dist/index.cjs CHANGED
@@ -538,6 +538,14 @@ var AstralformClient = class {
538
538
  llmProvider: raw.llm_provider,
539
539
  llmModel: raw.llm_model,
540
540
  message: raw.message,
541
+ // Defaults to [] rather than undefined so a caller can iterate without a
542
+ // guard, and so a server that predates the field behaves as "reports
543
+ // nothing" instead of throwing. Entries missing a key are dropped: a
544
+ // capability with no name cannot be matched against and would render as
545
+ // an unlabelled row.
546
+ capabilities: (raw.capabilities ?? []).flatMap(
547
+ (c) => typeof c?.key === "string" && c.key.length > 0 ? [{ key: c.key, enabled: Boolean(c.enabled) }] : []
548
+ ),
541
549
  uiComponents: {
542
550
  enabled: Boolean(ui.enabled),
543
551
  protocol: ui.protocol ?? null,