Skip to content

Commit c992915

Browse files
os-zhuangclaude
andauthored
fix(metadata-admin): drop the SkillPreview "Required Permissions" panel (framework#3686) (#2874)
Upstream removed SkillSchema.permissions (it never gated skill invocation). Removes the header pill, the "Required Permissions" section and the now-orphan ShieldCheck import, leaving a comment that points at the enforced surfaces (agent-level access/permissions, or the tools' underlying actions). Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent b5609cb commit c992915

2 files changed

Lines changed: 16 additions & 20 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@object-ui/app-shell": patch
3+
---
4+
5+
fix(metadata-admin): drop the SkillPreview "Required Permissions" panel (framework#3686)
6+
7+
Upstream removed `SkillSchema.permissions` — skill invocation was never gated by
8+
it. Showing a "Required Permissions" section (and a "N required perms" header
9+
pill) for an unenforced list taught the wrong model: access is gated at the
10+
AGENT (`access`/`permissions`, enforced at the chat route) or on the underlying
11+
actions the skill's tools call.

packages/app-shell/src/views/metadata-admin/previews/SkillPreview.tsx

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
Filter,
2828
MessagesSquare,
2929
Power,
30-
ShieldCheck,
3130
Sparkles,
3231
Wrench,
3332
} from 'lucide-react';
@@ -45,7 +44,6 @@ export function SkillPreview({ name, draft }: MetadataPreviewProps) {
4544
const triggerConditions = Array.isArray(d.triggerConditions)
4645
? (d.triggerConditions as Array<Record<string, unknown>>)
4746
: [];
48-
const permissions = Array.isArray(d.permissions) ? (d.permissions as string[]) : [];
4947
const active = d.active !== false;
5048
const model = (d.model as string | undefined) ?? undefined;
5149

@@ -76,9 +74,6 @@ export function SkillPreview({ name, draft }: MetadataPreviewProps) {
7674
<div className="mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px]">
7775
<Pill icon={Power} label={active ? 'Active' : 'Disabled'} tone={active ? 'green' : 'gray'} />
7876
{model && <Pill label={`model: ${model}`} mono />}
79-
{permissions.length > 0 && (
80-
<Pill icon={ShieldCheck} label={`${permissions.length} required perm${permissions.length === 1 ? '' : 's'}`} />
81-
)}
8277
</div>
8378
</div>
8479
</div>
@@ -163,21 +158,11 @@ export function SkillPreview({ name, draft }: MetadataPreviewProps) {
163158
</Section>
164159
)}
165160

166-
{/* Permissions */}
167-
{permissions.length > 0 && (
168-
<Section title="Required Permissions" icon={ShieldCheck}>
169-
<div className="flex flex-wrap gap-1">
170-
{permissions.map((p) => (
171-
<span
172-
key={p}
173-
className="inline-flex items-center gap-1 rounded border bg-muted/40 px-1.5 py-0.5 text-[11px] font-mono"
174-
>
175-
{p}
176-
</span>
177-
))}
178-
</div>
179-
</Section>
180-
)}
161+
{/* `permissions` was REMOVED from SkillSchema (framework#3686): skill
162+
invocation was never gated by it, and showing a "Required
163+
Permissions" panel for an unenforced list taught the wrong model.
164+
Access is gated at the AGENT (`access`/`permissions`) or on the
165+
underlying actions the skill's tools call. */}
181166
</div>
182167
</PreviewErrorBoundary>
183168
</PreviewShell>

0 commit comments

Comments
 (0)