Documentation
¶
Index ¶
- Constants
- Variables
- func Attach(mux goahttp.Muxer, service *Service)
- func ReplayOpenSuggestionOntoBase(ctx context.Context, queries *repo.Queries, projectID, skillID uuid.UUID) error
- func ValidSpecName(name string) bool
- func ValidateSkillManifest(content, expectedName string) error
- type CaptureResult
- type EditSuggestionStatus
- type FeedbackOutcome
- type FeedbackSource
- type ManualSuggestionSignaler
- type ReconcileSkillObservationsResult
- type Service
- func (s *Service) APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)
- func (s *Service) AddVersion(ctx context.Context, payload *gen.AddVersionPayload) (*gen.RecordSkillResult, error)
- func (s *Service) ApproveAllSuggestions(ctx context.Context, payload *gen.ApproveAllSuggestionsPayload) (*gen.ApproveAllSkillSuggestionsResult, error)
- func (s *Service) ApproveSuggestion(ctx context.Context, payload *gen.ApproveSuggestionPayload) (*gen.ApproveSkillSuggestionResult, error)
- func (s *Service) Archive(ctx context.Context, payload *gen.ArchivePayload) error
- func (s *Service) Create(ctx context.Context, payload *gen.CreatePayload) (*gen.RecordSkillResult, error)
- func (s *Service) DismissSuggestion(ctx context.Context, payload *gen.DismissSuggestionPayload) (*types.SkillEditSuggestion, error)
- func (s *Service) Distribute(ctx context.Context, payload *gen.DistributePayload) (*types.SkillDistribution, error)
- func (s *Service) Get(ctx context.Context, payload *gen.GetPayload) (*gen.GetSkillResult, error)
- func (s *Service) GetShared(ctx context.Context, payload *gen.GetSharedPayload) (*gen.SharedSkill, error)
- func (s *Service) List(ctx context.Context, payload *gen.ListPayload) (*gen.ListSkillsResult, error)
- func (s *Service) ListDistributions(ctx context.Context, payload *gen.ListDistributionsPayload) (*gen.ListSkillDistributionsResult, error)
- func (s *Service) ListFeedback(ctx context.Context, payload *gen.ListFeedbackPayload) (*gen.ListSkillFeedbackResult, error)
- func (s *Service) ListSuggestionFeedback(ctx context.Context, payload *gen.ListSuggestionFeedbackPayload) (*gen.ListSkillSuggestionFeedbackResult, error)
- func (s *Service) ListSuggestions(ctx context.Context, payload *gen.ListSuggestionsPayload) (*gen.ListSkillSuggestionsResult, error)
- func (s *Service) ListTags(ctx context.Context, _ *gen.ListTagsPayload) (*gen.ListSkillTagsResult, error)
- func (s *Service) ListUnknownActivations(ctx context.Context, payload *gen.ListUnknownActivationsPayload) (*gen.ListUnknownSkillActivationsResult, error)
- func (s *Service) ListVersions(ctx context.Context, payload *gen.ListVersionsPayload) (*gen.ListSkillVersionsResult, error)
- func (s *Service) RestoreVersion(ctx context.Context, payload *gen.RestoreVersionPayload) (*gen.RecordSkillResult, error)
- func (s *Service) ServeSharedSkillMarkdown(w http.ResponseWriter, r *http.Request) error
- func (s *Service) ServeSharedSkillPage(w http.ResponseWriter, r *http.Request) error
- func (s *Service) Share(ctx context.Context, payload *gen.SharePayload) (*types.SkillShareLink, error)
- func (s *Service) TriggerSuggestion(ctx context.Context, payload *gen.TriggerSuggestionPayload) error
- func (s *Service) Undistribute(ctx context.Context, payload *gen.UndistributePayload) error
- func (s *Service) Unshare(ctx context.Context, payload *gen.UnsharePayload) error
- func (s *Service) Update(ctx context.Context, payload *gen.UpdatePayload) (*types.Skill, error)
- type ValidatedSkillSuggestion
Constants ¶
const MaxFeedbackNoteRunes = 4000
MaxFeedbackNoteRunes caps a feedback note everywhere it is handled: the wire contract, ingest validation, and the suggestion prompt all admit the full note so recorded evidence is never silently truncated downstream.
Variables ¶
var ErrCaptureHashConflict = errors.New("captured skill raw hash conflicts with an existing alias")
var ErrInvalidCapture = errors.New("invalid captured skill manifest")
var ErrSkillSuggestionNoOp = errors.New("skill suggestion is unchanged from base")
ErrSkillSuggestionNoOp marks a valid proposal that is canonically identical to its base. Suggestion generation treats this as a terminal decline rather than asking the model to reformat the same content.
Functions ¶
func ReplayOpenSuggestionOntoBase ¶
func ReplayOpenSuggestionOntoBase(ctx context.Context, queries *repo.Queries, projectID, skillID uuid.UUID) error
ReplayOpenSuggestionOntoBase repoints an open suggestion at the skill's current base version. Because each proposed change stores its own diff, a change survives edits it does not overlap and is dropped on its own when it no longer applies; the suggestion is superseded only once nothing is left.
func ValidSpecName ¶
ValidSpecName reports whether name is already in canonical skill-spec form.
func ValidateSkillManifest ¶
ValidateSkillManifest applies the canonical SKILL.md parser and spec validation, and verifies that the frontmatter name matches expectedName.
Types ¶
type CaptureResult ¶
type EditSuggestionStatus ¶
type EditSuggestionStatus string
const ( EditSuggestionStatusOpen EditSuggestionStatus = "open" EditSuggestionStatusApproved EditSuggestionStatus = "approved" EditSuggestionStatusDismissed EditSuggestionStatus = "dismissed" EditSuggestionStatusSuperseded EditSuggestionStatus = "superseded" )
type FeedbackOutcome ¶
type FeedbackOutcome string
const ( FeedbackOutcomeHelped FeedbackOutcome = "helped" FeedbackOutcomePartiallyHelped FeedbackOutcome = "partially_helped" FeedbackOutcomeDidNotHelp FeedbackOutcome = "did_not_help" FeedbackOutcomeMisleading FeedbackOutcome = "misleading" FeedbackOutcomeHarmful FeedbackOutcome = "harmful" )
func (FeedbackOutcome) Valid ¶
func (o FeedbackOutcome) Valid() bool
type FeedbackSource ¶
type FeedbackSource string
const ( FeedbackSourceDev FeedbackSource = "dev" FeedbackSourceAssistant FeedbackSource = "assistant" )
func (FeedbackSource) Valid ¶
func (s FeedbackSource) Valid() bool
type ManualSuggestionSignaler ¶
type ManualSuggestionSignaler interface {
SignalManual(ctx context.Context, projectID, skillID uuid.UUID) error
}
ManualSuggestionSignaler starts or wakes analysis while bypassing automatic thresholds.
type ReconcileSkillObservationsResult ¶
func ReconcileSkillObservations ¶
func ReconcileSkillObservations(ctx context.Context, db *pgxpool.Pool, projectID uuid.UUID, batchSize int32) (*ReconcileSkillObservationsResult, error)
ReconcileSkillObservations folds one project-scoped batch into the skill registry. Observation completion and sighting updates commit atomically, so retries cannot count the same activation twice.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) APIKeyAuth ¶
func (*Service) AddVersion ¶
func (s *Service) AddVersion(ctx context.Context, payload *gen.AddVersionPayload) (*gen.RecordSkillResult, error)
func (*Service) ApproveAllSuggestions ¶
func (s *Service) ApproveAllSuggestions(ctx context.Context, payload *gen.ApproveAllSuggestionsPayload) (*gen.ApproveAllSkillSuggestionsResult, error)
func (*Service) ApproveSuggestion ¶
func (s *Service) ApproveSuggestion(ctx context.Context, payload *gen.ApproveSuggestionPayload) (*gen.ApproveSkillSuggestionResult, error)
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, payload *gen.CreatePayload) (*gen.RecordSkillResult, error)
func (*Service) DismissSuggestion ¶
func (s *Service) DismissSuggestion(ctx context.Context, payload *gen.DismissSuggestionPayload) (*types.SkillEditSuggestion, error)
func (*Service) Distribute ¶
func (s *Service) Distribute(ctx context.Context, payload *gen.DistributePayload) (*types.SkillDistribution, error)
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, payload *gen.GetPayload) (*gen.GetSkillResult, error)
func (*Service) GetShared ¶
func (s *Service) GetShared(ctx context.Context, payload *gen.GetSharedPayload) (*gen.SharedSkill, error)
func (*Service) List ¶
func (s *Service) List(ctx context.Context, payload *gen.ListPayload) (*gen.ListSkillsResult, error)
func (*Service) ListDistributions ¶
func (s *Service) ListDistributions(ctx context.Context, payload *gen.ListDistributionsPayload) (*gen.ListSkillDistributionsResult, error)
func (*Service) ListFeedback ¶
func (s *Service) ListFeedback(ctx context.Context, payload *gen.ListFeedbackPayload) (*gen.ListSkillFeedbackResult, error)
func (*Service) ListSuggestionFeedback ¶
func (s *Service) ListSuggestionFeedback(ctx context.Context, payload *gen.ListSuggestionFeedbackPayload) (*gen.ListSkillSuggestionFeedbackResult, error)
func (*Service) ListSuggestions ¶
func (s *Service) ListSuggestions(ctx context.Context, payload *gen.ListSuggestionsPayload) (*gen.ListSkillSuggestionsResult, error)
func (*Service) ListTags ¶
func (s *Service) ListTags(ctx context.Context, _ *gen.ListTagsPayload) (*gen.ListSkillTagsResult, error)
func (*Service) ListUnknownActivations ¶
func (s *Service) ListUnknownActivations(ctx context.Context, payload *gen.ListUnknownActivationsPayload) (*gen.ListUnknownSkillActivationsResult, error)
func (*Service) ListVersions ¶
func (s *Service) ListVersions(ctx context.Context, payload *gen.ListVersionsPayload) (*gen.ListSkillVersionsResult, error)
func (*Service) RestoreVersion ¶
func (s *Service) RestoreVersion(ctx context.Context, payload *gen.RestoreVersionPayload) (*gen.RecordSkillResult, error)
func (*Service) ServeSharedSkillMarkdown ¶
ServeSharedSkillMarkdown serves the raw SKILL.md of a shared skill at GET /shared/skills/{token}/SKILL.md with the same tenancy rules as ServeSharedSkillPage.
func (*Service) ServeSharedSkillPage ¶
ServeSharedSkillPage renders the public share page for a skill at GET /shared/skills/{token}. On a custom domain the lookup is pinned to the domain's organization so one tenant's skill can never be served under another tenant's domain. On the platform host the canonical page is the dashboard SPA route, so the request is redirected there instead.
func (*Service) Share ¶
func (s *Service) Share(ctx context.Context, payload *gen.SharePayload) (*types.SkillShareLink, error)
func (*Service) TriggerSuggestion ¶
func (*Service) Undistribute ¶
type ValidatedSkillSuggestion ¶
ValidatedSkillSuggestion is a proposed SKILL.md that differs canonically from its base version.
func ValidateSkillSuggestion ¶
func ValidateSkillSuggestion(content, expectedName, baseCanonicalSHA256 string) (ValidatedSkillSuggestion, error)
ValidateSkillSuggestion applies the SKILL.md parser and spec validation used by skill versions, verifies the target skill, and rejects canonical no-ops.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package efficacy scores how well a skill served an agent session: it renders the session transcript, asks an LLM judge for a structured verdict, and normalizes that verdict for the skill_efficacy_scores ClickHouse sink.
|
Package efficacy scores how well a skill served an agent session: it renders the session transcript, asks an LLM judge for a structured verdict, and normalizes that verdict for the skill_efficacy_scores ClickHouse sink. |
|
Package skilldiff represents a proposed SKILL.md edit as a unified diff so a suggestion outlives the exact version it was generated against.
|
Package skilldiff represents a proposed SKILL.md edit as a unified diff so a suggestion outlives the exact version it was generated against. |
|
Package suggest generates evidence-backed edits to recently active skills.
|
Package suggest generates evidence-backed edits to recently active skills. |