feat(controlplane): per-org model access, org aliases and org providers

The system org sets each org's allowed models and whether it may add its
own providers (org-model-policy); an org with no entry may use nothing.
An org's aliases and providers are checked against that policy on save
and filtered by it at resolution. Tasks get their org's providers, keyed
by the org's credential binding through the egress proxy. Org Settings
gains a Models tab; instance Models gains Org access.
This commit is contained in:
sam committed 2026-10-10 18:48:40 +11:00
1 parent ea52c8622e
commit 75b4eecfde
25 files changed
+1135 -516

No files matched your search

+5 -1
View File
@@ -28,6 +28,7 @@ const TABS = [
{ path: "/org/workspaces", label: "Workspaces" },
{ path: "/org/access", label: "Access", home: true },
{ path: "/org/tokens", label: "Tokens", home: true },
{ path: "/org/models", label: "Models", home: true, member: true },
];
const route = useRoute();
@@ -37,7 +38,10 @@ const router = useRouter();
// hidden while an instance admin views another org rather than editing the
// wrong one.
const away = computed(() => !!org.value && org.value.id !== homeOrg.value);
const tabs = computed(() => TABS.filter((tab) => !(away.value && tab.home)));
// Models is an org's own; the system org configures models in Settings.
const tabs = computed(() =>
TABS.filter((tab) => !(away.value && tab.home) && !(tab.member && homeOrg.value === "org-sys")),
);
watch(away, (isAway) => {
if (isAway && TABS.some((tab) => tab.home && route.path.startsWith(tab.path))) {
void router.replace("/org");