@01.works/visual-review 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,6 +34,62 @@ credential을 browser 설정으로 전달하지 않습니다.
34
34
  npm install @01.works/visual-review
35
35
  ```
36
36
 
37
+ ## CLI
38
+
39
+ 같은 공개 패키지가 프로젝트 범위 리뷰 피드백 CLI를 제공합니다. scope 없는
40
+ `npx visual-review`은 동명의 다른 npm 패키지를 해석할 수 있으므로 사용하지 않습니다.
41
+
42
+ ```bash
43
+ npm exec --package=@01.works/visual-review -- visual-review configure --email <owner-email> --list
44
+ npm exec --package=@01.works/visual-review -- visual-review configure --email <owner-email> --project <project-id>
45
+ npm exec --package=@01.works/visual-review -- visual-review list
46
+ npm exec --package=@01.works/visual-review -- visual-review get <comment-id>
47
+ npm exec --package=@01.works/visual-review -- visual-review reply <comment-id> --body "수정했습니다."
48
+ npm exec --package=@01.works/visual-review -- visual-review export --format json --output feedback.json
49
+ npm exec --package=@01.works/visual-review -- visual-review webhook set --url https://hooks.example/review --secret "$WEBHOOK_SECRET"
50
+ npm exec --package=@01.works/visual-review -- visual-review webhook get
51
+ ```
52
+
53
+ 프로젝트에 이미 설치되어 있으면 package script 별칭도 사용할 수 있습니다.
54
+
55
+ ```json
56
+ { "scripts": { "review": "visual-review" } }
57
+ ```
58
+
59
+ ```bash
60
+ npm run review -- list
61
+ npm run review -- logout
62
+ ```
63
+
64
+ `configure`는 이메일 코드를 터미널의 숨김 입력으로 확인한 뒤, 프로젝트 하나에
65
+ 고정된 30일 credential만 `.visual-review.json`에 POSIX mode 0600으로 저장합니다. owner
66
+ JWT와 인증 코드는 출력하거나 저장하지 않습니다. 성공 결과는 JSON stdout, 진단은
67
+ stderr로 나갑니다. 만료되면 자동 재인증하지 않으며 `configure`를 다시 실행합니다.
68
+ `logout`은 서버에서 session을 폐기한 다음 로컬 설정을 제거합니다.
69
+ `export --output`은 기존 파일을 덮어쓰지 않고 mode 0600의 새 파일만 만듭니다. webhook
70
+ secret은 32~256자이며 CLI가 결과에 되돌려 출력하지 않습니다. 수신자는
71
+ `X-Visual-Review-Timestamp`와 raw body를 점(`.`)으로 연결해 HMAC-SHA256을 계산하고
72
+ `X-Visual-Review-Signature: v1=<hex>`와 constant-time 비교해야 합니다.
73
+
74
+ 브라우저 자동화는 인증된 staging widget에서만 다음 공개 API를 사용합니다.
75
+
76
+ ```js
77
+ const widget = document.querySelector('agency-review-widget')
78
+ await widget.createFeedbackAtPoint({ body: '간격 불일치', clientX: 420, clientY: 180 })
79
+ widget.setMode('review') // 'view' | 'comment' | 'review'
80
+ const archive = widget.exportPageFeedback('json')
81
+ await widget.importPageFeedback(archive)
82
+ ```
83
+
84
+ `ReviewWidgetOptions.repository`는 custom backend seam입니다. 구현체가
85
+ `ReviewRepository`의 snapshot/subscription/entity mutation 계약과 fail-closed 권한을
86
+ 지키면 hosted Convex 대신 사용할 수 있습니다. `moveCommentPin`은 선택 capability입니다.
87
+ `reply`는 기존 피드백 thread에 owner 답글을 추가합니다. 네트워크 결과가 불명확한
88
+ 호출을 재시도할 때는 같은 `--reply-id <uuid>`를 넘기면 중복 생성되지 않습니다.
89
+ Windows에서는 ACL 검증을 아직 제공하지 않으므로 저장형 `configure`를 거부합니다.
90
+ 그 환경에서는 사전 발급한 `VISUAL_REVIEW_TOKEN`, `VISUAL_REVIEW_PROJECT_ID`,
91
+ `VISUAL_REVIEW_SERVICE_URL` 환경변수를 사용해야 합니다.
92
+
37
93
  ### React / Vite
38
94
 
39
95
  Vite config에 build identity plugin을 한 번 추가하면 CI deployment metadata 또는
@@ -66,9 +122,7 @@ capture에는 파일 위치가 남지 않습니다.
66
122
  import { VisualReview } from '@01.works/visual-review/react';
67
123
 
68
124
  export function App() {
69
- return (
70
- <VisualReview developerTools={{ codeContextCopy: import.meta.env.DEV }} />
71
- );
125
+ return <VisualReview />;
72
126
  }
73
127
  ```
74
128
 
@@ -183,20 +237,23 @@ npm run preview
183
237
  `enabled={false}`는 integrator가 쓸 수 있는 긴급 kill switch일 뿐 정상 설치 계약이
184
238
  아닙니다. Origin 연결 해제는 이미 열린 reviewer permission까지 닫는 운영 kill switch입니다.
185
239
 
186
- ## 실시간 협업
240
+ ## Optional cursor chat
187
241
 
188
- `collaboration`의 기능은 기본적으로 꺼져 있습니다.
242
+ Authoritative Convex runtime에서는 reviewer cursor와 ephemeral cursor chat을 하나의 optional
243
+ module로 켤 수 있습니다.
189
244
 
190
245
  ```tsx
191
- <VisualReview collaboration={{ cursors: true, chat: true }} />
246
+ <VisualReview cursorChat />
192
247
  ```
193
248
 
194
- `cursors`와 `chat`은 저장하지 않는 presence를 사용합니다. `chat`을 켜면 일반 입력
195
- 요소 밖에서 `/`를 눌러 현재 cursor room의 ephemeral 채팅을 수 있습니다.
196
- 따라서 저장되는 page chat은 없고, legacy `reviewMessages`는 read-only 호환 data로만
197
- 남습니다. 모두 유효한
198
- invitation과 같은 deny-by-default project 권한을 전제로 하며 browser flag 자체는
199
- 권한을 부여하지 않습니다.
249
+ 기본값은 `false`입니다. 꺼져 있으면 cursor-chat UI와 repository는 각각 lazy chunk 뒤에
250
+ 남아 DOM, pointer listener, subscription과 mutation을 만들지 않습니다. 켜면 같은 page의
251
+ reviewer끼리 cursor와 최대 280자의 말풍선을 공유하고, editable element 밖에서 `/`를 눌러
252
+ 입력창을 엽니다. 메시지는 comment로 저장되지 않고 25초 TTL의 Convex presence로만
253
+ 오갑니다. 연결 오류는 optional module만 중단하며 pin/thread/reply 기능은 계속됩니다.
254
+
255
+ Self-hosted custom runtime은 `cursorChatRepository`와 `cursorChatRoomId`를 제공해야 합니다.
256
+ Instant runtime과 `/v1/collaboration/room` 호환 경로는 제공하지 않습니다.
200
257
 
201
258
  ## 위젯 위치
202
259
 
@@ -44,10 +44,6 @@ The bundled selection engine uses `react-grab/primitives`, and the widget UI
44
44
  adapts interface elements from the initial UI snapshot below. The bundled
45
45
  dock adapts drag thresholds, edge-snap geometry, velocity projection, and
46
46
  orientation from the newer dock snapshot below.
47
- An explicitly enabled developer tool also uses React Grab's context and
48
- clipboard primitives on first use for code context copying without initializing
49
- another toolbar, shortcut, or telemetry surface.
50
-
51
47
  - Repository: https://github.com/aidenybai/react-grab
52
48
  - Version first integrated: `0.1.50`
53
49
  - Initial UI snapshot commit: `2a39bc29e5f8bdbd69095cf1d33d91634576cd20`