mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 13:43:01 -06:00
* Add initial UI for agent mode * fix: Cleanup and define agent contract * Add react agent * Add interactions memory * Add support for stdio based MCP integration * Add basic sqlite3 report generator * fix: Persist vulnerabilities with package relation * fix: Persist license information * refactor: Agents into its own command package * feat: Add support for tool calling introspection * refactor: UI to hide implementation detail * sqlite3 reporter persist dependency graph * fix: Support multiple LLM provider for agent * docs: Update agents doc * docs: Remove deprecated query docs * fix: UI tests * fix: Linter issue * Add support for prompt mode * Improve UI with animation * Fix UI tests after update * Add OpenSSF scorecard persistence * Add slsa provenances in sqlite3 reporter * Add test cases for sqlite3 reporter * Fix agent doc * fix: Sqlite3 reporter use safe accessors * feat: Add support for fast model * feat: Simplify and streamline agent UI for better user experience - Remove decorative borders and excessive styling to maximize output area - Implement clean minimal design similar to modern TUI interfaces - Add bordered input area for clear visual separation - Move thinking indicator above input area for better visibility - Enhance input field reset logic for proper line alignment - Remove verbose help text and status messages - Optimize layout calculations for full width utilization - Add smooth animations for agent thinking state with spinner - Clean up code structure and remove unused progress bar functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Improve agent status line * test: Update UI tests * fix: Use terminal safe rendering * fix: Fix nil deref without storing empty strings in DB * fix: Support overwriting sqlite3 database * fix: Data model to use m2m between manifest and package * style: Fix linter issue with unused variables * Misc fixes * Add test for agent memory --------- Co-authored-by: Claude <noreply@anthropic.com>
195 lines
8.2 KiB
Go
195 lines
8.2 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package reportdependencygraph
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the reportdependencygraph type in the database.
|
|
Label = "report_dependency_graph"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldFromPackageID holds the string denoting the from_package_id field in the database.
|
|
FieldFromPackageID = "from_package_id"
|
|
// FieldFromPackageName holds the string denoting the from_package_name field in the database.
|
|
FieldFromPackageName = "from_package_name"
|
|
// FieldFromPackageVersion holds the string denoting the from_package_version field in the database.
|
|
FieldFromPackageVersion = "from_package_version"
|
|
// FieldFromPackageEcosystem holds the string denoting the from_package_ecosystem field in the database.
|
|
FieldFromPackageEcosystem = "from_package_ecosystem"
|
|
// FieldToPackageID holds the string denoting the to_package_id field in the database.
|
|
FieldToPackageID = "to_package_id"
|
|
// FieldToPackageName holds the string denoting the to_package_name field in the database.
|
|
FieldToPackageName = "to_package_name"
|
|
// FieldToPackageVersion holds the string denoting the to_package_version field in the database.
|
|
FieldToPackageVersion = "to_package_version"
|
|
// FieldToPackageEcosystem holds the string denoting the to_package_ecosystem field in the database.
|
|
FieldToPackageEcosystem = "to_package_ecosystem"
|
|
// FieldDependencyType holds the string denoting the dependency_type field in the database.
|
|
FieldDependencyType = "dependency_type"
|
|
// FieldVersionConstraint holds the string denoting the version_constraint field in the database.
|
|
FieldVersionConstraint = "version_constraint"
|
|
// FieldDepth holds the string denoting the depth field in the database.
|
|
FieldDepth = "depth"
|
|
// FieldIsDirect holds the string denoting the is_direct field in the database.
|
|
FieldIsDirect = "is_direct"
|
|
// FieldIsRootEdge holds the string denoting the is_root_edge field in the database.
|
|
FieldIsRootEdge = "is_root_edge"
|
|
// FieldManifestID holds the string denoting the manifest_id field in the database.
|
|
FieldManifestID = "manifest_id"
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
|
FieldUpdatedAt = "updated_at"
|
|
// Table holds the table name of the reportdependencygraph in the database.
|
|
Table = "report_dependency_graphs"
|
|
)
|
|
|
|
// Columns holds all SQL columns for reportdependencygraph fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldFromPackageID,
|
|
FieldFromPackageName,
|
|
FieldFromPackageVersion,
|
|
FieldFromPackageEcosystem,
|
|
FieldToPackageID,
|
|
FieldToPackageName,
|
|
FieldToPackageVersion,
|
|
FieldToPackageEcosystem,
|
|
FieldDependencyType,
|
|
FieldVersionConstraint,
|
|
FieldDepth,
|
|
FieldIsDirect,
|
|
FieldIsRootEdge,
|
|
FieldManifestID,
|
|
FieldCreatedAt,
|
|
FieldUpdatedAt,
|
|
}
|
|
|
|
// ValidColumn reports if the column name is valid (part of the table columns).
|
|
func ValidColumn(column string) bool {
|
|
for i := range Columns {
|
|
if column == Columns[i] {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
var (
|
|
// FromPackageIDValidator is a validator for the "from_package_id" field. It is called by the builders before save.
|
|
FromPackageIDValidator func(string) error
|
|
// FromPackageNameValidator is a validator for the "from_package_name" field. It is called by the builders before save.
|
|
FromPackageNameValidator func(string) error
|
|
// FromPackageVersionValidator is a validator for the "from_package_version" field. It is called by the builders before save.
|
|
FromPackageVersionValidator func(string) error
|
|
// FromPackageEcosystemValidator is a validator for the "from_package_ecosystem" field. It is called by the builders before save.
|
|
FromPackageEcosystemValidator func(string) error
|
|
// ToPackageIDValidator is a validator for the "to_package_id" field. It is called by the builders before save.
|
|
ToPackageIDValidator func(string) error
|
|
// ToPackageNameValidator is a validator for the "to_package_name" field. It is called by the builders before save.
|
|
ToPackageNameValidator func(string) error
|
|
// ToPackageVersionValidator is a validator for the "to_package_version" field. It is called by the builders before save.
|
|
ToPackageVersionValidator func(string) error
|
|
// ToPackageEcosystemValidator is a validator for the "to_package_ecosystem" field. It is called by the builders before save.
|
|
ToPackageEcosystemValidator func(string) error
|
|
// DefaultDepth holds the default value on creation for the "depth" field.
|
|
DefaultDepth int
|
|
// DefaultIsDirect holds the default value on creation for the "is_direct" field.
|
|
DefaultIsDirect bool
|
|
// DefaultIsRootEdge holds the default value on creation for the "is_root_edge" field.
|
|
DefaultIsRootEdge bool
|
|
// ManifestIDValidator is a validator for the "manifest_id" field. It is called by the builders before save.
|
|
ManifestIDValidator func(string) error
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the ReportDependencyGraph queries.
|
|
type OrderOption func(*sql.Selector)
|
|
|
|
// ByID orders the results by the id field.
|
|
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByFromPackageID orders the results by the from_package_id field.
|
|
func ByFromPackageID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldFromPackageID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByFromPackageName orders the results by the from_package_name field.
|
|
func ByFromPackageName(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldFromPackageName, opts...).ToFunc()
|
|
}
|
|
|
|
// ByFromPackageVersion orders the results by the from_package_version field.
|
|
func ByFromPackageVersion(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldFromPackageVersion, opts...).ToFunc()
|
|
}
|
|
|
|
// ByFromPackageEcosystem orders the results by the from_package_ecosystem field.
|
|
func ByFromPackageEcosystem(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldFromPackageEcosystem, opts...).ToFunc()
|
|
}
|
|
|
|
// ByToPackageID orders the results by the to_package_id field.
|
|
func ByToPackageID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldToPackageID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByToPackageName orders the results by the to_package_name field.
|
|
func ByToPackageName(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldToPackageName, opts...).ToFunc()
|
|
}
|
|
|
|
// ByToPackageVersion orders the results by the to_package_version field.
|
|
func ByToPackageVersion(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldToPackageVersion, opts...).ToFunc()
|
|
}
|
|
|
|
// ByToPackageEcosystem orders the results by the to_package_ecosystem field.
|
|
func ByToPackageEcosystem(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldToPackageEcosystem, opts...).ToFunc()
|
|
}
|
|
|
|
// ByDependencyType orders the results by the dependency_type field.
|
|
func ByDependencyType(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDependencyType, opts...).ToFunc()
|
|
}
|
|
|
|
// ByVersionConstraint orders the results by the version_constraint field.
|
|
func ByVersionConstraint(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldVersionConstraint, opts...).ToFunc()
|
|
}
|
|
|
|
// ByDepth orders the results by the depth field.
|
|
func ByDepth(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDepth, opts...).ToFunc()
|
|
}
|
|
|
|
// ByIsDirect orders the results by the is_direct field.
|
|
func ByIsDirect(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldIsDirect, opts...).ToFunc()
|
|
}
|
|
|
|
// ByIsRootEdge orders the results by the is_root_edge field.
|
|
func ByIsRootEdge(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldIsRootEdge, opts...).ToFunc()
|
|
}
|
|
|
|
// ByManifestID orders the results by the manifest_id field.
|
|
func ByManifestID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldManifestID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUpdatedAt orders the results by the updated_at field.
|
|
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
|
}
|