mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 21:28:10 +00:00
* feat: adopt directory-based docs versioning with Edge channel Switch docs.crewai.com from navigation-only versioning (every version selector entry rendered the same docs/<lang>/* source files) to Mintlify's directory-based versioning so each version selector entry renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/* that always reflects main HEAD for unreleased work, eliminating pre-release leakage onto frozen release labels. External links to canonical /<lang>/* URLs are preserved via wildcard redirects that always land on the current default version. Layout: - docs/edge/<lang>/* rolling source (you edit here) - docs/edge/enterprise-api.*.yaml - docs/v<X.Y.Z>/<lang>/* frozen, immutable snapshots - docs/v<X.Y.Z>/enterprise-api.*.yaml - docs/images/ shared, append-only - docs/docs.json nav + redirects URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links working, and every freeze rewrites them (plus all per-section/per-page redirects) so destinations always resolve to the current default without depending on a second redirect hop. Release flow integration (devtools release): - New module crewai_devtools.docs_versioning.freeze() materialises docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the snapshot, inserts the version into every language block in docs.json, and refreshes all redirect destinations. - _update_docs_and_create_pr() in cli.py now calls that freeze during Phase 2 of devtools release. Edge changelogs are updated first (so the snapshot freeze picks them up), then the snapshot is staged alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z> — the title prefix the new CI guard reads. - The PR still gates tag, GitHub release, PyPI publish, and the enterprise release as before; no new PRs are added. - Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride Edge — and the docs PR title omits the [docs-freeze] prefix. - docs_check (AI-generated docs scaffolding) writes to docs/edge/<lang>/* so newly-generated unreleased docs land in Edge and never accidentally touch a frozen snapshot. Migration scripts (one-shot): - scripts/docs/freeze_historical_versions.py reconstructs all 16 historical snapshots (v1.10.0 .. v1.14.7) from git tags via git archive | tar, rewriting openapi: MDX refs so each snapshot reads its own enterprise-api YAML rather than the live one. - scripts/docs/prefix_version_paths.py one-shot-migrates docs.json: rewrites every page path in 16 versioned blocks to point under docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags v1.14.7 as Latest (default), prunes pages whose target file doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before v1.12.0), and writes the wildcard + per-section redirects. - scripts/docs/freeze_current_edge.py is now a thin CLI wrapper around docs_versioning.freeze for manual one-off freezes (e.g. retroactively snapshotting a forgotten release). CI guards (.github/workflows/docs-snapshots.yml): - Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose title contains [docs-freeze] (i.e. release-cut PRs generated by devtools release or the manual wrapper) may modify them. - Images under docs/images/ are append-only since snapshots share a single image directory. Deleting or renaming an image breaks every historical snapshot that still references it. Restored docs/images/crewai-otel-export.png from PR #3673; it was deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference it. Restoring instead of editing the snapshots preserves historical rendering fidelity and validates the new append-only rule retroactively. Tests: - lib/devtools/tests/test_docs_versioning.py covers the freeze: file copy, openapi rewrite, version insertion, default demotion, redirect upserts, per-section redirect rewriting, idempotency, and invalid inputs. Verified locally with mintlify broken-links: 0 broken links across the full site (Edge + 16 frozen versions, 4 locales). AGENTS.md (repo root) is the contributor guide for the new model; RELEASING.md is the release-cut runbook; README's Contribution section links to both. Co-authored-by: Cursor <cursoragent@cursor.com> * style: resolve linter issues --------- Co-authored-by: Cursor <cursoragent@cursor.com>
113 lines
3.7 KiB
Plaintext
113 lines
3.7 KiB
Plaintext
---
|
|
title: "React 컴포넌트 내보내기"
|
|
description: "CrewAI AMP React 컴포넌트를 애플리케이션에 내보내고 통합하는 방법을 알아보세요"
|
|
icon: "react"
|
|
mode: "wide"
|
|
---
|
|
|
|
이 가이드는 CrewAI AMP crew를 React 컴포넌트로 내보내고 이를 여러분의 애플리케이션에 통합하는 방법을 설명합니다.
|
|
|
|
## React 컴포넌트 내보내기
|
|
|
|
<Steps>
|
|
<Step title="컴포넌트 내보내기">
|
|
배포된 crew 오른쪽에 있는 줄임표(세 개의 점)를 클릭한 다음 내보내기 옵션을 선택하고 파일을 로컬에 저장하세요. 본 예시에서는 `CrewLead.jsx`를 사용합니다.
|
|
|
|
<Frame>
|
|
<img src="/images/enterprise/export-react-component.png" alt="React 컴포넌트 내보내기" />
|
|
</Frame>
|
|
</Step>
|
|
|
|
</Steps>
|
|
|
|
## 리액트 환경 설정
|
|
|
|
이 리액트 컴포넌트를 로컬에서 실행하려면 리액트 개발 환경을 설정하고 이 컴포넌트를 리액트 프로젝트에 통합해야 합니다.
|
|
|
|
<Steps>
|
|
<Step title="Node.js 설치">
|
|
- 공식 웹사이트(https://nodejs.org/)에서 Node.js를 다운로드하고 설치하세요.
|
|
- 안정성을 위해 LTS(장기 지원) 버전을 선택하세요.
|
|
</Step>
|
|
|
|
<Step title="새 리액트 프로젝트 생성">
|
|
- 명령 프롬프트 또는 PowerShell을 엽니다.
|
|
- 프로젝트를 생성하고자 하는 디렉터리로 이동하세요.
|
|
- 다음 명령어를 실행하여 새로운 리액트 프로젝트를 생성합니다:
|
|
|
|
```bash
|
|
npx create-react-app my-crew-app
|
|
```
|
|
- 프로젝트 디렉터리로 이동합니다:
|
|
|
|
```bash
|
|
cd my-crew-app
|
|
```
|
|
</Step>
|
|
|
|
<Step title="필요한 의존성 설치">
|
|
```bash
|
|
npm install react-dom
|
|
```
|
|
</Step>
|
|
|
|
<Step title="CrewLead 컴포넌트 생성">
|
|
- 다운로드한 파일 `CrewLead.jsx`를 프로젝트의 `src` 폴더로 이동하세요.
|
|
</Step>
|
|
|
|
<Step title="App.js를 수정하여 CrewLead 컴포넌트 사용">
|
|
- `src/App.js`를 엽니다.
|
|
- 내용물을 아래와 같이 교체하세요:
|
|
|
|
```jsx
|
|
import React from 'react';
|
|
import CrewLead from './CrewLead';
|
|
|
|
function App() {
|
|
return (
|
|
<div className="App">
|
|
<CrewLead baseUrl="YOUR_API_BASE_URL" bearerToken="YOUR_BEARER_TOKEN" />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default App;
|
|
```
|
|
- `YOUR_API_BASE_URL` 및 `YOUR_BEARER_TOKEN` 부분을 실제 API 값으로 바꿔주세요.
|
|
</Step>
|
|
|
|
<Step title="개발 서버 시작">
|
|
- 프로젝트 디렉터리에서 다음 명령어를 실행하세요:
|
|
|
|
```bash
|
|
npm start
|
|
```
|
|
- 개발 서버가 시작되며, 기본 웹 브라우저가 자동으로 http://localhost:3000 을 열고 리액트 앱이 실행되는 것을 확인할 수 있습니다.
|
|
</Step>
|
|
|
|
</Steps>
|
|
|
|
## 커스터마이징
|
|
|
|
그런 다음 `CrewLead.jsx`를 커스터마이즈하여 색상, 제목 등을 추가할 수 있습니다.
|
|
|
|
<Frame>
|
|
<img
|
|
src="/images/enterprise/customise-react-component.png"
|
|
alt="React 컴포넌트 커스터마이즈"
|
|
/>
|
|
</Frame>
|
|
<Frame>
|
|
<img
|
|
src="/images/enterprise/customise-react-component-2.png"
|
|
alt="React 컴포넌트 커스터마이즈"
|
|
/>
|
|
</Frame>
|
|
|
|
## 다음 단계
|
|
|
|
- 구성 요소 스타일을 애플리케이션 디자인에 맞게 맞춤화하세요
|
|
- 추가 구성을 위한 props를 추가하세요
|
|
- 애플리케이션의 상태 관리와 통합하세요
|
|
- 오류 처리 및 로딩 상태를 추가하세요
|