Skip to content

Commit a257433

Browse files
os-zhuangclaude
andauthored
fix(skills): drop the per-skill permissions keys — the field does not exist in SkillSchema (objectstack#3820) (#511)
All six skills declared `permissions: ['crm:…']`. SkillSchema has no such field, so Zod strips the key at parse time: it granted and restricted nothing while reading as a security control — the ADR-0049 prohibited shape, flagged in objectstack#3820 §4. Access to AI capability is gated at the agent level (`agent.access`/`agent.permissions`, enforced at the chat route) and by each tool's own authz; the spec now documents this on SkillSchema itself (objectstack#3871). typecheck, `objectstack validate`, and the test suite (67) all pass. Claude-Session: https://claude.ai/code/session_01BHjroNkLkajskKbJaidko4 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8b28fa2 commit a257433

6 files changed

Lines changed: 0 additions & 12 deletions

src/skills/case-triage.skill.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@ classify a case:
2727
triggerConditions: [
2828
{ field: 'objectName', operator: 'eq', value: 'crm_case' },
2929
],
30-
31-
permissions: ['crm:case:write'],
3230
});

src/skills/customer-360.skill.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,4 @@ customer / account / contact:
2424
'give me the full picture',
2525
'account summary',
2626
],
27-
28-
permissions: ['crm:account:read'],
2927
});

src/skills/email-drafting.skill.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,4 @@ export const EmailDraftingSkill = defineSkill({
2525
'optimise subject line',
2626
'email template',
2727
],
28-
29-
permissions: ['crm:email:write'],
3028
});

src/skills/lead-qualification.skill.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,4 @@ export const LeadQualificationSkill = defineSkill({
3636
triggerConditions: [
3737
{ field: 'objectName', operator: 'eq', value: 'crm_lead' },
3838
],
39-
40-
permissions: ['crm:lead:read'],
4139
});

src/skills/live-data.skill.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,4 @@ record (account, contact, lead, opportunity, case, quote, etc.):
5252
'pipeline',
5353
'forecast',
5454
],
55-
56-
permissions: ['crm:read'],
5755
});

src/skills/revenue-forecasting.skill.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ risk, or deal slippage:
3030
triggerConditions: [
3131
{ field: 'objectName', operator: 'in', value: ['crm_opportunity', 'dashboard'] },
3232
],
33-
34-
permissions: ['crm:opportunity:read'],
3533
});

0 commit comments

Comments
 (0)