Merge branch 'dr/login-design' of github.com:keboola/agnes-the-ai-analyst into dr/login-design
This commit is contained in:
commit
41ea87d4d9
4 changed files with 28 additions and 6 deletions
|
|
@ -167,6 +167,7 @@ def _normalize_primary_key(v):
|
||||||
# Devin ANALYSIS_0001 on PR #141 5f649a4 review.
|
# Devin ANALYSIS_0001 on PR #141 5f649a4 review.
|
||||||
_URL_BEARING_FIELDS: tuple[tuple[str, ...], ...] = (
|
_URL_BEARING_FIELDS: tuple[tuple[str, ...], ...] = (
|
||||||
("data_source", "keboola", "stack_url"),
|
("data_source", "keboola", "stack_url"),
|
||||||
|
("marketplace", "curators_url"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -257,6 +258,7 @@ _EDITABLE_SECTIONS: tuple[str, ...] = (
|
||||||
"corporate_memory",
|
"corporate_memory",
|
||||||
"materialize",
|
"materialize",
|
||||||
"guardrails",
|
"guardrails",
|
||||||
|
"marketplace",
|
||||||
)
|
)
|
||||||
|
|
||||||
# "Danger-zone" sections — flipping these can lock operators out (auth.*) or
|
# "Danger-zone" sections — flipping these can lock operators out (auth.*) or
|
||||||
|
|
@ -811,6 +813,17 @@ _KNOWN_FIELDS: dict[str, dict[str, dict]] = {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"marketplace": {
|
||||||
|
"curators_url": {
|
||||||
|
"kind": "string",
|
||||||
|
"hint": (
|
||||||
|
"URL the 'See all curators →' link on /marketplace points to "
|
||||||
|
"(e.g. an internal wiki page listing curators accountable for "
|
||||||
|
"the curated marketplace). Empty → the link is hidden. "
|
||||||
|
"Validated against private-IP allowlist on save (SSRF guard)."
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# Keys whose values must be redacted from the audit diff. We match
|
# Keys whose values must be redacted from the audit diff. We match
|
||||||
|
|
|
||||||
|
|
@ -1921,9 +1921,12 @@ async def marketplace_listing(
|
||||||
):
|
):
|
||||||
import json as _json
|
import json as _json
|
||||||
from src.category_icons import all_paths
|
from src.category_icons import all_paths
|
||||||
|
from app.instance_config import get_value
|
||||||
|
curators_url = (get_value("marketplace", "curators_url") or "").strip()
|
||||||
ctx = _build_context(
|
ctx = _build_context(
|
||||||
request, user=user,
|
request, user=user,
|
||||||
category_icons_json=_json.dumps(all_paths()),
|
category_icons_json=_json.dumps(all_paths()),
|
||||||
|
curators_url=curators_url,
|
||||||
)
|
)
|
||||||
return templates.TemplateResponse(request, "marketplace.html", ctx)
|
return templates.TemplateResponse(request, "marketplace.html", ctx)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -518,7 +518,9 @@
|
||||||
<div class="title">Each plugin here has a named curator accountable for it.</div>
|
<div class="title">Each plugin here has a named curator accountable for it.</div>
|
||||||
<div class="body">Each plugin in this marketplace has a named curator and meets a baseline review bar (security, telemetry hygiene, documentation).</div>
|
<div class="body">Each plugin in this marketplace has a named curator and meets a baseline review bar (security, telemetry hygiene, documentation).</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="link" href="#">See all curators →</a>
|
{% if curators_url %}
|
||||||
|
<a class="link" href="{{ curators_url }}" target="_blank" rel="noopener">See all curators →</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Flea Market info block — open-shelf signal, mirror structure of
|
<!-- Flea Market info block — open-shelf signal, mirror structure of
|
||||||
|
|
|
||||||
|
|
@ -1015,12 +1015,16 @@
|
||||||
const d = await res.json();
|
const d = await res.json();
|
||||||
|
|
||||||
// ── Title resolution per source ─────────────────────────────────────
|
// ── Title resolution per source ─────────────────────────────────────
|
||||||
// Curated: marketplace-metadata.json `display_name` wins, else frontmatter `name`.
|
// Curated inner + flea inner: prefer marketplace-metadata `display_name`,
|
||||||
// Flea standalone skill/agent reuses PluginDetailResponse — `display_name`
|
// then frontmatter `name` (returned as `d.name`), then the URL slug.
|
||||||
// populated by the same on-demand parser path, otherwise `plugin_name`
|
// Standalone flea (no innerName) falls back to `d.plugin_name` — for
|
||||||
// (the entity name; manifest_name is the suffixed `<name>-by-<username>`).
|
// plugin entities that field IS the entity's user-set title. The earlier
|
||||||
|
// shape branched on `source === 'curated'` and so flea inner skills/agents
|
||||||
|
// fell through to `d.plugin_name`, which the flea inner-detail API
|
||||||
|
// populates with the *parent plugin's* entity name — so a skill nested
|
||||||
|
// inside a flea plugin rendered the plugin's title on its hero.
|
||||||
const heroTitle = d.display_name
|
const heroTitle = d.display_name
|
||||||
|| (source === 'curated' ? (d.name || innerName) : (d.plugin_name || ''));
|
|| (innerName ? (d.name || innerName) : (d.plugin_name || ''));
|
||||||
|
|
||||||
document.title = `${heroTitle} — Marketplace`;
|
document.title = `${heroTitle} — Marketplace`;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue