> For the complete documentation index, see [llms.txt](https://getsquish.gitbook.io/squish/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://getsquish.gitbook.io/squish/th/resources/contributing.md).

# การมีส่วนร่วม

ฉบับย่อของ [`CONTRIBUTING.md`](https://github.com/getsquish/squish/blob/main/CONTRIBUTING.md) ในรีโป — อ่านไฟล์นั้นก่อนเปิด PR; หน้านี้คือแผนที่

## เริ่มต้นใช้งานสำหรับนักพัฒนาแบบเร็ว

ข้อกำหนด: Node ≥ 20 · `ffmpeg` + `ffprobe` อยู่ใน PATH

```bash
npm install
npm run squish -- path/to/clip.mov --json   # รัน CLI จากซอร์ส
npm run mcp                                  # รันเซิร์ฟเวอร์ MCP จากซอร์ส
npm test                                     # ชุดทดสอบ node:test
npm run check                                # tsc --noEmit
npm run build                                # tsup → dist/
npm run e2e -- path/to/clip.mov              # ไคลเอนต์ MCP จริงทดสอบกับเซิร์ฟเวอร์จริง
```

## สถาปัตยกรรมใน 3 บรรทัด

* `src/engine.ts` คือไปป์ไลน์เดียว: probe → plan → extract → compose → write
* `src/main.ts` (CLI + `mcp` subcommand) และ `src/mcp.ts` เป็นเพียงชั้นบางๆ ครอบอยู่ — ไม่มีการแยกตรรกะ
* `src/core/` เก็บตัววางแผนแบบบริสุทธิ์ไว้ (ความหนาแน่น, การสุ่มตัวอย่าง, การจัดวางตาราง, รูปแบบ timecode) ใช้ร่วมแบบตรงตัวกับ [getsquish.app](https://getsquish.app) เว็บแอป

## สัญญาถูกตรึงไว้แล้ว

`squish-cli-v0` (เอาต์พุต CLI `--json` และ `squish-mcp-v0` (ผลลัพธ์เครื่องมือ MCP) เป็นสัญญาเสถียรภาพ: **เปลี่ยนได้เฉพาะแบบเพิ่มอย่างเดียว**; ถ้ามีการเปลี่ยนแบบทำให้พัง ต้องเพิ่มเวอร์ชันของสตริงสัญญา ผู้ใช้งานจะอ่าน `สัญญา` ฟิลด์นี้เพื่อตรวจจับเรื่องนี้ — PR ต้องคงไว้แบบนี้ มี 2 ข้อที่ต้องรู้ก่อนแตะส่วน sampling/timecode:

* **Timecode จะอ้างอิงแบบสัมบูรณ์กับวิดีโอต้นฉบับในทุกระดับการซูม** — การรันแบบแบ่งหน้าต่างจะไม่รีเบสให้ใหม่
* ค่าต่ำสุดที่กำหนดได้คือ **2 ms ต่อช่อง**; หน้าต่างที่ต่ำกว่านี้จะถูกปฏิเสธด้วยข้อความสอน แทนที่จะสร้างออกมาเงียบๆ

ดู [stability and versioning](/squish/th/reference/stability.md) สำหรับนโยบายฉบับเต็ม

## การไหลของการเปลี่ยนแปลง (mirror-first)

รีโปสาธารณะเป็นมิเรอร์ที่คัดเลือกมาจาก monorepo ส่วนตัว ซึ่งยังเป็นแหล่งข้อมูลจริงอยู่ (เว็บแอป, hosted API และเอกสารภายในอยู่ที่นั่น) ในทางปฏิบัติ:

* **ยินดีรับ issue และ PR ในรีโปสาธารณะ** ผู้ดูแลจะรีวิวที่นั่น พอร์ตการเปลี่ยนแปลงที่รับแล้วกลับไปยังต้นทาง และมันจะไหลกลับมาในมิเรอร์รอบถัดไป — คุณจะยังได้เครดิตผู้เขียนใน commit ที่พอร์ตมา
* มิเรอร์ถูกประกอบด้วยสคริปต์ที่รันชุดทดสอบและ build ทั้งหมดก่อนจะ push อะไรออกไป ดังนั้น `main` ควรเขียวเสมอ

## ความปลอดภัย

รายงานช่องโหว่แบบส่วนตัวผ่าน [GitHub security advisories](https://github.com/getsquish/squish/security/advisories/new) — ไม่ใช่เปิดเป็น issue สาธารณะ ขอบเขต: CLI/MCP เรียกคำสั่งออกไปยังระบบ `ffmpeg`/`ffprobe`ของคุณ ดังนั้นบั๊กใน ffmpeg เองควรรายงาน upstream แต่กรณี "Squish ส่งอินพุตที่เป็นอันตรายไปให้ ffmpeg แบบไม่ปลอดภัย" อยู่ในขอบเขต รายงานเกี่ยวกับ hosted API ส่งผ่านช่องทางเดียวกันได้ นโยบายฉบับเต็ม: [`SECURITY.md`](https://github.com/getsquish/squish/blob/main/SECURITY.md).

## สัญญาอนุญาต

Apache-2.0 พร้อมไฟล์ `NOTICE` เมื่อคุณร่วมพัฒนา ถือว่ายอมรับว่า contribution ของคุณอยู่ภายใต้สัญญาอนุญาตนี้ ชื่อ, โลโก้, มาสคอต และสินทรัพย์แบรนด์ของ Squish ถูกสงวนสิทธิ์ไว้ และไม่รวมอยู่ในสัญญาอนุญาต


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://getsquish.gitbook.io/squish/th/resources/contributing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
