Documentation
¶
Index ¶
- Constants
- Variables
- type AllBundles
- type AssistantPreset
- type AssistantPresetBundle
- type AssistantPresetListItem
- type AssistantPresetPageToken
- type BundlePageToken
- type DeleteAssistantPresetBundleRequest
- type DeleteAssistantPresetBundleResponse
- type DeleteAssistantPresetRequest
- type DeleteAssistantPresetResponse
- type GetAssistantPresetRequest
- type GetAssistantPresetResponse
- type ListAssistantPresetBundlesRequest
- type ListAssistantPresetBundlesResponse
- type ListAssistantPresetBundlesResponseBody
- type ListAssistantPresetsRequest
- type ListAssistantPresetsResponse
- type ListAssistantPresetsResponseBody
- type PatchAssistantPresetBundleRequest
- type PatchAssistantPresetBundleRequestBody
- type PatchAssistantPresetBundleResponse
- type PatchAssistantPresetRequest
- type PatchAssistantPresetRequestBody
- type PatchAssistantPresetResponse
- type PutAssistantPresetBundleRequest
- type PutAssistantPresetBundleRequestBody
- type PutAssistantPresetBundleResponse
- type PutAssistantPresetRequest
- type PutAssistantPresetRequestBody
- type PutAssistantPresetResponse
Constants ¶
View Source
const ( AssistantPresetBundlesMetaFileName = "assistantpresetbundles.json" AssistantPresetBuiltInOverlayDBFileName = "assistantpresetsbuiltin.overlay.sqlite" SchemaVersion = "2026-03-22" MaxPageSize = 256 DefaultPageSize = 25 MaxStartingTextBytes = 16 * 1024 )
Variables ¶
View Source
var ( ErrInvalidRequest = errors.New("invalid request") ErrInvalidDir = errors.New("invalid directory") ErrConflict = errors.New("resource already exists") ErrBuiltInReadOnly = errors.New("built-in resource is read-only") ErrBuiltInBundleNotFound = errors.New("built-in bundle not found") ErrBundleNotFound = errors.New("bundle not found") ErrBundleDisabled = errors.New("bundle is disabled") ErrBundleNotEmpty = errors.New("bundle is not empty") ErrBundleDeleting = errors.New("bundle is being deleted") ErrAssistantPresetNotFound = errors.New("assistant preset not found") ErrAssistantPresetDisabled = errors.New("assistant preset is disabled") ErrNilAssistantPreset = errors.New("assistant preset is nil") )
Functions ¶
This section is empty.
Types ¶
type AllBundles ¶
type AllBundles struct {
SchemaVersion string `json:"schemaVersion"`
Bundles map[bundleitemutils.BundleID]AssistantPresetBundle `json:"bundles"`
}
type AssistantPreset ¶
type AssistantPreset struct {
SchemaVersion string `json:"schemaVersion"`
ID bundleitemutils.ItemID `json:"id"`
Slug bundleitemutils.ItemSlug `json:"slug"`
Version bundleitemutils.ItemVersion `json:"version"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
IsEnabled bool `json:"isEnabled"`
IsBuiltIn bool `json:"isBuiltIn"`
// StartingText is optional initial composer/editor draft text.
// It is stored verbatim, including whitespace and newlines.
StartingText string `json:"startingText,omitempty"`
StartingModelPresetRef *modelpresetSpec.ModelPresetRef `json:"startingModelPresetRef,omitempty"`
// Validation rules:
// - systemPrompt must be nil
// - capabilitiesOverride must be nil
StartingModelPresetPatch *modelpresetSpec.ModelPresetPatch `json:"startingModelPresetPatch,omitempty"`
// Nil means the preset does not express a preference.
StartingIncludeModelSystemPrompt *bool `json:"startingIncludeModelSystemPrompt,omitempty"`
// Ordered tool selections.
StartingToolSelections []toolSpec.ToolSelection `json:"startingToolSelections,omitempty"`
// Ordered skill selections. PreLoadAsActive is only valid for argumentless "insert=instructions" skills,
// "insert=user-message" skills behave like user-message templates.
StartingSkillSelections []skillSpec.SkillSelection `json:"startingSkillSelections,omitempty"`
// StartingMCPContext is copied into the first user turn when this preset is applied.
StartingMCPContext *mcpSpec.MCPConversationContext `json:"startingMCPContext,omitempty"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
}
AssistantPreset is an immutable starter configuration snapshot. One (slug, version) is stored as one JSON file.
type AssistantPresetBundle ¶
type AssistantPresetBundle struct {
SchemaVersion string `json:"schemaVersion"`
ID bundleitemutils.BundleID `json:"id"`
Slug bundleitemutils.BundleSlug `json:"slug"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
IsEnabled bool `json:"isEnabled"`
IsBuiltIn bool `json:"isBuiltIn"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
SoftDeletedAt *time.Time `json:"softDeletedAt,omitempty"`
}
AssistantPresetBundle is a notional grouping for assistant preset version files. Bundle metadata is stored in a shared meta file; actual assistant preset versions are stored as individual JSON files inside the bundle directory.
type AssistantPresetListItem ¶
type AssistantPresetListItem struct {
BundleID bundleitemutils.BundleID `json:"bundleID"`
BundleSlug bundleitemutils.BundleSlug `json:"bundleSlug"`
AssistantPresetSlug bundleitemutils.ItemSlug `json:"assistantPresetSlug"`
AssistantPresetVersion bundleitemutils.ItemVersion `json:"assistantPresetVersion"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
IsEnabled bool `json:"isEnabled"`
IsBuiltIn bool `json:"isBuiltIn"`
ModifiedAt *time.Time `json:"modifiedAt,omitempty"`
}
type AssistantPresetPageToken ¶
type AssistantPresetPageToken struct {
RecommendedPageSize int `json:"s,omitempty"` //nolint:tagliatelle // Page token encoding.
IncludeDisabled bool `json:"d,omitempty"` //nolint:tagliatelle // Page token encoding.
BundleIDs []bundleitemutils.BundleID `json:"ids,omitempty"` //nolint:tagliatelle // Page token encoding.
DirTok string `json:"dt,omitempty"` //nolint:tagliatelle // Directory scan token.
BuiltInDone bool `json:"bi,omitempty"` //nolint:tagliatelle // Page token encoding.
BuiltInOffset int `json:"bo,omitempty"` //nolint:tagliatelle // Page token encoding.
}
type BundlePageToken ¶
type BundlePageToken struct {
BundleIDs []bundleitemutils.BundleID `json:"ids,omitempty"` //nolint:tagliatelle // Page token encoding.
IncludeDisabled bool `json:"d,omitempty"` //nolint:tagliatelle // Page token encoding.
PageSize int `json:"s,omitempty"` //nolint:tagliatelle // Page token encoding.
CursorMod string `json:"t,omitempty"` //nolint:tagliatelle // RFC3339Nano.
CursorID bundleitemutils.BundleID `json:"id,omitempty"` //nolint:tagliatelle // Page token encoding.
}
type DeleteAssistantPresetBundleRequest ¶
type DeleteAssistantPresetBundleRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
}
type DeleteAssistantPresetBundleResponse ¶
type DeleteAssistantPresetBundleResponse struct{}
type DeleteAssistantPresetRequest ¶
type DeleteAssistantPresetRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
AssistantPresetSlug bundleitemutils.ItemSlug `path:"assistantPresetSlug" required:"true"`
Version bundleitemutils.ItemVersion `path:"version" required:"true"`
}
type DeleteAssistantPresetResponse ¶
type DeleteAssistantPresetResponse struct{}
type GetAssistantPresetRequest ¶
type GetAssistantPresetRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
AssistantPresetSlug bundleitemutils.ItemSlug `path:"assistantPresetSlug" required:"true"`
Version bundleitemutils.ItemVersion `path:"version" required:"true"`
}
type GetAssistantPresetResponse ¶
type GetAssistantPresetResponse struct {
Body *AssistantPreset
}
type ListAssistantPresetBundlesRequest ¶
type ListAssistantPresetBundlesRequest struct {
BundleIDs []bundleitemutils.BundleID `query:"bundleIDs"`
IncludeDisabled bool `query:"includeDisabled"`
PageSize int `query:"pageSize"`
PageToken string `query:"pageToken"`
}
type ListAssistantPresetBundlesResponse ¶
type ListAssistantPresetBundlesResponse struct {
Body *ListAssistantPresetBundlesResponseBody
}
type ListAssistantPresetBundlesResponseBody ¶
type ListAssistantPresetBundlesResponseBody struct {
AssistantPresetBundles []AssistantPresetBundle `json:"assistantPresetBundles"`
NextPageToken *string `json:"nextPageToken,omitempty"`
}
type ListAssistantPresetsRequest ¶
type ListAssistantPresetsRequest struct {
BundleIDs []bundleitemutils.BundleID `query:"bundleIDs"`
IncludeDisabled bool `query:"includeDisabled"`
RecommendedPageSize int `query:"recommendedPageSize"`
PageToken string `query:"pageToken"`
}
type ListAssistantPresetsResponse ¶
type ListAssistantPresetsResponse struct {
Body *ListAssistantPresetsResponseBody
}
type ListAssistantPresetsResponseBody ¶
type ListAssistantPresetsResponseBody struct {
AssistantPresetListItems []AssistantPresetListItem `json:"assistantPresetListItems"`
NextPageToken *string `json:"nextPageToken,omitempty"`
}
type PatchAssistantPresetBundleRequest ¶
type PatchAssistantPresetBundleRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
Body *PatchAssistantPresetBundleRequestBody
}
type PatchAssistantPresetBundleRequestBody ¶
type PatchAssistantPresetBundleRequestBody struct {
IsEnabled bool `json:"isEnabled" required:"true"`
}
type PatchAssistantPresetBundleResponse ¶
type PatchAssistantPresetBundleResponse struct{}
type PatchAssistantPresetRequest ¶
type PatchAssistantPresetRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
AssistantPresetSlug bundleitemutils.ItemSlug `path:"assistantPresetSlug" required:"true"`
Version bundleitemutils.ItemVersion `path:"version" required:"true"`
Body *PatchAssistantPresetRequestBody
}
type PatchAssistantPresetRequestBody ¶
type PatchAssistantPresetRequestBody struct {
IsEnabled bool `json:"isEnabled" required:"true"`
}
type PatchAssistantPresetResponse ¶
type PatchAssistantPresetResponse struct{}
type PutAssistantPresetBundleRequest ¶
type PutAssistantPresetBundleRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
Body *PutAssistantPresetBundleRequestBody
}
type PutAssistantPresetBundleRequestBody ¶
type PutAssistantPresetBundleRequestBody struct {
Slug bundleitemutils.BundleSlug `json:"slug" required:"true"`
DisplayName string `json:"displayName" required:"true"`
Description string `json:"description,omitempty"`
IsEnabled bool `json:"isEnabled" required:"true"`
}
type PutAssistantPresetBundleResponse ¶
type PutAssistantPresetBundleResponse struct{}
type PutAssistantPresetRequest ¶
type PutAssistantPresetRequest struct {
BundleID bundleitemutils.BundleID `path:"bundleID" required:"true"`
AssistantPresetSlug bundleitemutils.ItemSlug `path:"assistantPresetSlug" required:"true"`
Version bundleitemutils.ItemVersion `path:"version" required:"true"`
Body *PutAssistantPresetRequestBody
}
type PutAssistantPresetRequestBody ¶
type PutAssistantPresetRequestBody struct {
DisplayName string `json:"displayName" required:"true"`
Description string `json:"description,omitempty"`
IsEnabled bool `json:"isEnabled" required:"true"`
StartingText string `json:"startingText,omitempty"`
StartingModelPresetRef *modelpresetSpec.ModelPresetRef `json:"startingModelPresetRef,omitempty"`
// Validation rules:
// - systemPrompt must be nil
// - capabilitiesOverride must be nil
StartingModelPresetPatch *modelpresetSpec.ModelPresetPatch `json:"startingModelPresetPatch,omitempty"`
StartingIncludeModelSystemPrompt *bool `json:"startingIncludeModelSystemPrompt,omitempty"`
StartingToolSelections []toolSpec.ToolSelection `json:"startingToolSelections,omitempty"`
StartingSkillSelections []skillSpec.SkillSelection `json:"startingSkillSelections,omitempty"`
StartingMCPContext *mcpSpec.MCPConversationContext `json:"startingMCPContext,omitempty"`
}
type PutAssistantPresetResponse ¶
type PutAssistantPresetResponse struct{}
Click to show internal directories.
Click to hide internal directories.