Skip to content

feat(harness): support per-space skill policies - #1158

Merged
Rhosmarie merged 1 commit into
volcengine:mainfrom
Rhosmarie:feat/skill-space-black
Oct 9, 2026
Merged

Rhosmarie merged 1 commit into
volcengine:mainfrom
Rhosmarie:feat/skill-space-black

Conversation

@Rhosmarie

Copy link
Copy Markdown
Collaborator

Summary
Support per-Skill-Space allow/deny policies in Harness selected skills.

This lets callers load a Skill Space without downloading every skill in it, for example:

selected_skills=[
    HarnessSelectedSkill(
        source="skillspace",
        skill_space_id="ss-a",
        skill_space_policy=HarnessSkillSpacePolicy(mode="allow", ids=["s-a1"]),
    ),
    HarnessSelectedSkill(
        source="skillspace",
        skill_space_id="ss-b",
        skill_space_policy=HarnessSkillSpacePolicy(mode="deny", ids=["s-b9"]),
    ),
]

Changes

  • Add HarnessSkillSpacePolicy and HarnessSelectedSkill.skill_space_policy.
  • Support per-space SKILL_SPACE_POLICY format while keeping the existing global {mode, ids} format compatible.
  • Apply policy filtering before materializing/downloading remote Skill Space skills.
  • Pass request-level Harness policy explicitly instead of temporarily mutating os.environ, avoiding concurrent request policy leakage.
  • Treat mode="allow", ids=[] as a valid “disable all remote skills in this space” policy.
  • Reject conflicting policies for the same skill_space_id.
  • Add regression coverage for allow/deny filtering, empty allowlist, env compatibility, Harness spawn, and sandbox forwarding.

@Rhosmarie
Rhosmarie force-pushed the feat/skill-space-black branch from 696d1fd to eab2cc8 Compare October 9, 2026 08:43
@Rhosmarie
Rhosmarie merged commit 4ae2bfb into volcengine:main Oct 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants