Feat v0.6.3 dead code sweep (#38)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #38.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package models
|
||||
|
||||
// ── Extension Connections (v0.38.1) ──────────────────
|
||||
// ── Extension Connections ──────────────────
|
||||
|
||||
// ExtConnection represents a scoped credential/endpoint configuration
|
||||
// for extensions that integrate with external services. Same scope
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package models
|
||||
|
||||
// ── Extension Dependencies (v0.38.2) ──────────────────
|
||||
// ── Extension Dependencies ──────────────────
|
||||
|
||||
// ExtDependency records that a consumer package depends on a library package.
|
||||
// Created at consumer install time from the manifest's "dependencies" map.
|
||||
|
||||
@@ -218,7 +218,7 @@ func IntPtr(i int) *int { return &i }
|
||||
func BoolPtr(b bool) *bool { return &b }
|
||||
|
||||
// =========================================
|
||||
// GROUPS (v0.16.0)
|
||||
// GROUPS
|
||||
// =========================================
|
||||
|
||||
// Group scope constants (reuses ScopeGlobal, ScopeTeam from above)
|
||||
@@ -286,7 +286,7 @@ type ResourceGrant struct {
|
||||
// KBChunk is a text segment from a document with its embedding vector.
|
||||
// KBSearchResult is a single result from similarity search.
|
||||
// ChannelKB represents a knowledge base linked to a channel.
|
||||
// PROVIDER HEALTH (v0.22.0)
|
||||
// PROVIDER HEALTH
|
||||
|
||||
// ProviderStatus represents the derived health state.
|
||||
|
||||
@@ -294,10 +294,10 @@ type ResourceGrant struct {
|
||||
|
||||
// ErrorRate returns the error fraction, or 0 if no requests.
|
||||
|
||||
// CAPABILITY OVERRIDES (v0.22.0)
|
||||
// CAPABILITY OVERRIDES
|
||||
|
||||
// CapabilityOverride is an admin correction for a model's capabilities.
|
||||
// ROUTING POLICIES (v0.22.2)
|
||||
// ROUTING POLICIES
|
||||
|
||||
// RoutingPolicy is one routing rule that controls how requests are
|
||||
// dispatched to provider configs. Stored in the routing_policies table.
|
||||
|
||||
@@ -31,11 +31,11 @@ const (
|
||||
ExtPermDBRead = "db.read"
|
||||
ExtPermDBWrite = "db.write"
|
||||
ExtPermAPIHTTP = "api.http"
|
||||
ExtPermFormValidate = "forms.validate" // v0.29.3: form validation hooks
|
||||
ExtPermWorkflowAccess = "workflow.access" // v0.30.2: workflow definition + stage data access
|
||||
ExtPermConnectionsRead = "connections.read" // v0.38.1: extension connection resolution
|
||||
ExtPermTriggersRegister = "triggers.register" // v0.2.2: event/webhook trigger registration
|
||||
ExtPermRealtimePublish = "realtime.publish" // v0.5.0: publish events to realtime channels
|
||||
ExtPermFormValidate = "forms.validate"
|
||||
ExtPermWorkflowAccess = "workflow.access"
|
||||
ExtPermConnectionsRead = "connections.read"
|
||||
ExtPermTriggersRegister = "triggers.register"
|
||||
ExtPermRealtimePublish = "realtime.publish"
|
||||
)
|
||||
|
||||
// ValidExtensionPermissions is the set of recognized permission keys.
|
||||
|
||||
@@ -3,7 +3,7 @@ package models
|
||||
import "time"
|
||||
|
||||
// =========================================
|
||||
// NOTIFICATIONS (v0.20.0)
|
||||
// NOTIFICATIONS
|
||||
// =========================================
|
||||
|
||||
// Notification represents an in-app notification for a user.
|
||||
|
||||
@@ -120,22 +120,21 @@ var ValidAudiences = map[string]bool{
|
||||
|
||||
// ── Typed Form Template ─────────────────────
|
||||
|
||||
// TypedFormTemplate is the structured form_template schema (v0.29.3).
|
||||
// v0.35.0: added Fieldsets for progressive multi-step forms.
|
||||
// TypedFormTemplate is the structured form_template schema.
|
||||
type TypedFormTemplate struct {
|
||||
Fields []FormField `json:"fields"`
|
||||
Fieldsets []FormFieldset `json:"fieldsets,omitempty"` // v0.35.0: multi-step form groups
|
||||
Fieldsets []FormFieldset `json:"fieldsets,omitempty"`
|
||||
Hooks *FormHooks `json:"hooks,omitempty"`
|
||||
}
|
||||
|
||||
// FormFieldset groups fields into a labelled step for progressive forms (v0.35.0).
|
||||
// FormFieldset groups fields into a labelled step for progressive forms.
|
||||
// When fieldsets is present, top-level fields is ignored.
|
||||
type FormFieldset struct {
|
||||
Label string `json:"label"`
|
||||
Fields []FormField `json:"fields"`
|
||||
}
|
||||
|
||||
// FieldCondition controls conditional visibility of a form field (v0.35.0).
|
||||
// FieldCondition controls conditional visibility of a form field.
|
||||
// When set, the field is shown/validated only if the condition is met.
|
||||
type FieldCondition struct {
|
||||
When string `json:"when"` // key of the field to check
|
||||
@@ -153,7 +152,7 @@ type FormField struct {
|
||||
Default interface{} `json:"default,omitempty"`
|
||||
Options []FormOption `json:"options,omitempty"`
|
||||
Validation *FormValidation `json:"validation,omitempty"`
|
||||
Condition *FieldCondition `json:"condition,omitempty"` // v0.35.0: conditional visibility
|
||||
Condition *FieldCondition `json:"condition,omitempty"`
|
||||
}
|
||||
|
||||
// FormOption is a choice for select fields.
|
||||
@@ -200,7 +199,6 @@ func ParseTypedFormTemplate(raw json.RawMessage) *TypedFormTemplate {
|
||||
return nil
|
||||
}
|
||||
|
||||
// v0.35.0: If fieldsets present, flatten into fields for backward compat
|
||||
if len(tpl.Fieldsets) > 0 {
|
||||
var allFields []FormField
|
||||
for _, fs := range tpl.Fieldsets {
|
||||
@@ -237,7 +235,6 @@ type FieldError struct {
|
||||
func ValidateFormData(tpl *TypedFormTemplate, data map[string]interface{}) []FieldError {
|
||||
var errs []FieldError
|
||||
for _, f := range tpl.Fields {
|
||||
// v0.35.0: Skip fields whose condition is not met
|
||||
if f.Condition != nil && !evaluateFieldCondition(f.Condition, data) {
|
||||
continue
|
||||
}
|
||||
@@ -392,7 +389,7 @@ func validateSelect(f FormField, val interface{}) []FieldError {
|
||||
return []FieldError{{Key: f.Key, Message: f.Label + " is not a valid option"}}
|
||||
}
|
||||
|
||||
// ── Field Condition Evaluator (v0.35.0) ─────
|
||||
// ── Field Condition Evaluator ─────
|
||||
|
||||
// evaluateFieldCondition checks if a conditional field should be visible/validated.
|
||||
func evaluateFieldCondition(cond *FieldCondition, data map[string]interface{}) bool {
|
||||
@@ -505,7 +502,7 @@ type WorkflowAssignment struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
// ── Workflow Signoff (v0.3.4) ───────────────
|
||||
// ── Workflow Signoff ───────────────
|
||||
|
||||
// WorkflowSignoff records a user's approval or rejection at a stage boundary.
|
||||
type WorkflowSignoff struct {
|
||||
|
||||
Reference in New Issue
Block a user