Add company skills library and agent skills UI

This commit is contained in:
Dotta
2026-03-14 10:55:04 -05:00
parent 2137c2f715
commit 0bf53bc513
22 changed files with 8050 additions and 131 deletions

View File

@@ -0,0 +1,35 @@
import {
pgTable,
uuid,
text,
timestamp,
jsonb,
index,
uniqueIndex,
} from "drizzle-orm/pg-core";
import { companies } from "./companies.js";
export const companySkills = pgTable(
"company_skills",
{
id: uuid("id").primaryKey().defaultRandom(),
companyId: uuid("company_id").notNull().references(() => companies.id),
slug: text("slug").notNull(),
name: text("name").notNull(),
description: text("description"),
markdown: text("markdown").notNull(),
sourceType: text("source_type").notNull().default("local_path"),
sourceLocator: text("source_locator"),
sourceRef: text("source_ref"),
trustLevel: text("trust_level").notNull().default("markdown_only"),
compatibility: text("compatibility").notNull().default("compatible"),
fileInventory: jsonb("file_inventory").$type<Array<Record<string, unknown>>>().notNull().default([]),
metadata: jsonb("metadata").$type<Record<string, unknown>>(),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
},
(table) => ({
companySlugUniqueIdx: uniqueIndex("company_skills_company_slug_idx").on(table.companyId, table.slug),
companyNameIdx: index("company_skills_company_name_idx").on(table.companyId, table.name),
}),
);

View File

@@ -32,3 +32,4 @@ export { approvalComments } from "./approval_comments.js";
export { activityLog } from "./activity_log.js";
export { companySecrets } from "./company_secrets.js";
export { companySecretVersions } from "./company_secret_versions.js";
export { companySkills } from "./company_skills.js";