Feat v0.6.3 dead code sweep (#38)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-sqlite (push) Successful in 2m46s
CI/CD / test-go-pg (push) Successful in 2m47s
CI/CD / build-and-deploy (push) Successful in 26s

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:
2026-03-31 12:37:47 +00:00
committed by xcaliber
parent a887b4c78b
commit 3d4228f868
130 changed files with 522 additions and 1215 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -3,7 +3,7 @@ package models
import "time"
// =========================================
// NOTIFICATIONS (v0.20.0)
// NOTIFICATIONS
// =========================================
// Notification represents an in-app notification for a user.

View File

@@ -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 {