Stages: optional skills block loading pinned library skills per visit
A model stage may declare a skills block (name or name@N per line). Drafts and publications are validated against the server skill library; human/ntfy stages reject the block. Each run resolves unpinned names to the latest version at admission and records name@N per stage (run stage_skills, step skills); retry reuses the recorded versions. Every visit gets a private read-only copy of exactly those bundles under the run's artifact tree, and the harness loads only them: Claude via a session plugin (--plugin-dir, Skill tool with per-skill allow rules, bundled skills off, ambient loads fail the visit), Pi via --skill under --no-skills, and OpenCode via per-session instruction entries (V2 only). The app shows the block in the stage definition and the resolved versions on each visit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,9 @@ type OpenCodeClient struct {
|
||||
ArtifactsDir string
|
||||
Operations *OperationLog
|
||||
OnGenerationSession func(id, backend, reference string, active bool) error
|
||||
// Skills are attached to each new session as instruction entries (see
|
||||
// attachSkills); nil attaches none.
|
||||
Skills *SkillSet
|
||||
connection *opencode.Connection
|
||||
command func(context.Context, string, ...string) ([]byte, error)
|
||||
sessionPollInterval time.Duration // test seam; defaults to defaultSessionPollInterval
|
||||
@@ -413,6 +416,11 @@ func (c *OpenCodeClient) Generate(ctx context.Context, config ModelConfig, promp
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
if resume == "" {
|
||||
if err = c.attachSkills(ctx, session.Data.ID); err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
ctx, watch, err = c.watchBudget(ctx, config.Budget, session.Data.ID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user