Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1.4 KB
Raw Blame
-- Draft skills generated by @three-ws/skill-import (packages/skill-import)
-- from an OpenAPI/Swagger spec or a GitHub repository. This is a different
-- table from skill_import_registries/skill_import_requests (api/skill-imports.js,
-- docs/skill-import.md): that system imports prompt-only SKILL.md text into
-- agent_custom_skills with a scan/approve flow and never executes code. This
-- table holds an executable bundle shape (manifest.json/tools.json/handlers.js,
-- specs/SKILL_SPEC.md) served at runtime by api/skills/import/[id]/[...file].js
-- so src/skills/index.js's SkillRegistry can install it like any hosted bundle.
--
-- `enabled` defaults to false and nothing in api/_lib/openapi-skill-imports.js
-- ever sets it true on create: an import always lands as a draft the owner
-- must deliberately enable.

CREATE TABLE IF NOT EXISTS openapi_skill_imports (
	id            uuid PRIMARY KEY DEFAULT gen_random_uuid(),
	user_id       uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
	source_url    text NOT NULL,
	kind          text NOT NULL CHECK (kind IN ('openapi', 'declarative')),
	manifest      jsonb NOT NULL,
	skill_md      text NOT NULL,
	tools         jsonb,
	handlers_src  text,
	enabled       boolean NOT NULL DEFAULT false,
	created_at    timestamptz NOT NULL DEFAULT now()
);

CREATE INDEX IF NOT EXISTS openapi_skill_imports_user_recent
	ON openapi_skill_imports (user_id, created_at DESC);