Tài liệu

Tạo project

Trong trang này
Terminal
sota init my-app --features all
cd my-app

# terminal 1 — watcher của chính bạn
npm run dev

# terminal 2 — Development session
npm run dev:sota

sota init tạo scaffold tương thích manifest schema v3. Chạy không kèm --features thì CLI hỏi capability cần scaffold; truyền --features admin-screen,skill,backend,tool,tool-result-ui (hoặc all) để trả lời sẵn. Thêm sau bằng sota add.

Các scaffold feature#

FeatureThêm gìKéo theo
admin-screenMột native page React + TypeScript + Vite kèm watch build cho local development.—
skillMột contribution dạng nội dung SKILL.md. Không cần backend.—
backendMột Express service tối thiểu với request log, Core JWT verification và health route.—
toolMột tool cho agent: entry trong manifest, JSON Schema input/output và backend route trả lời nó.backend
tool-result-uiMột tool cộng thêm React surface render ngay dưới kết quả của nó trong conversation.tool, backend
Scaffold là tiện lợi, không phải bắt buộc.

Express, npm và TypeScript được chọn vì phổ biến dễ hiểu. Contract của nền tảng chỉ là HTTP thuần cộng một manifest — bất kỳ ngôn ngữ hay runtime nào phục vụ được route đã khai báo và verify được invocation token đều là app backend hợp lệ.

Template có gì?#

PathÝ nghĩa
manifest.yamlIdentity, version, contributions, runtime bindings, health, locales và platform compatibility.
src/backend/Service đã có auth verification, health và tool routes mẫu.
src/ui/Native React modules và style cho UI slots.
src/skills/Skills dạng nội dung.
src/schemas/JSON Schema cho tool input/output.
src/locales/Nhãn và chuỗi đa ngôn ngữ.
.sota/app-ui-contracts/Platform UI contracts được generate; không sửa tay.
.agent/skills/Best practices đi kèm về architecture, security, testing, tools và UI.

Mục lục

Esc

Tìm theo tiêu đề và nội dung trong mọi chương.