diff --git a/agent-ops/rules/project/domain/dart/rules.md b/agent-ops/rules/project/domain/dart/rules.md index 4ed91b9..c629fcf 100644 --- a/agent-ops/rules/project/domain/dart/rules.md +++ b/agent-ops/rules/project/domain/dart/rules.md @@ -1,20 +1,20 @@ --- domain: dart -last_rule_review_commit: 34692aec1891b5042867daf29479e478861954ed -last_rule_updated_at: 2026-05-21 +last_rule_review_commit: 7ea0b484d2c5c73e85f4ef4b16cba20f25cb4b51 +last_rule_updated_at: 2026-06-01 --- # dart ## 목적 / 책임 -Proto Socket의 Dart/Flutter 구현체를 담당한다. TCP/WebSocket 클라이언트·서버, 공통 Communicator/BaseClient 로직, 하트비트 처리를 제공한다. +Proto Socket의 Dart/Flutter 구현체를 담당한다. Dart IO TCP/WS/WSS 클라이언트·서버, Flutter Web WebSocket 클라이언트, 공통 Communicator/BaseClient 로직, 하트비트 처리를 제공한다. ## 포함 경로 - `dart/lib/` — 공개 API 및 구현 (packets/ 제외) -- `dart/test/` — 동일 언어 단위/통합 테스트 -- `dart/crosstest/` — 크로스 언어 테스트 (Go, Kotlin, Python, TypeScript와 연동). 오케스트레이터 또는 클라이언트 헬퍼 +- `dart/test/` — 동일 언어 단위/통합 테스트, browser WebSocket 테스트, WSS 테스트 인증서 fixture +- `dart/crosstest/` — 크로스 언어 테스트 (Dart.web, Go, Kotlin, Python, TypeScript와 연동). 오케스트레이터 또는 클라이언트 헬퍼 - `dart/pubspec.yaml` — 패키지 의존성 - `dart/analysis_options.yaml` — Dart 정적 분석 설정 @@ -24,16 +24,19 @@ Proto Socket의 Dart/Flutter 구현체를 담당한다. TCP/WebSocket 클라이 ## 주요 구성 요소 -- `ProtobufClient` — 소켓 클라이언트 기반 클래스 -- `ProtobufServer` — 소켓 서버 기반 클래스 -- `WsProtobufClient` / `WsProtobufServer` — WebSocket 클라이언트/서버 기반 클래스 +- `ProtobufClient` — Dart IO TCP 클라이언트 기반 클래스. web target에서는 TCP 미지원 stub +- `ProtobufServer` — Dart IO TCP 서버 기반 클래스. web target에서는 TCP 미지원 stub +- `WsProtobufClient` — 조건부 export로 Dart IO `dart:io` WebSocket과 Flutter Web `dart:html` WebSocket 클라이언트를 제공 +- `WsProtobufServer` — Dart IO WS/WSS 서버 기반 클래스. web target에서는 서버 미지원 stub - `BaseClient` / `Communicator` — 메시지 라우팅, 요청-응답 상관관계, 전송 공통 로직 - `HeartbeatMixin` — 하트비트 송수신 및 연결 종료 처리 ## 유지할 패턴 - `dart pub get` 후 `dart test`로 테스트 실행 -- crosstest는 상대방 언어 서버/클라이언트가 실행 중인 상태에서 수행 +- browser WebSocket 테스트는 `dart test -p chrome test/browser_ws_*_test.dart` 형식을 사용한다 +- crosstest는 상대방 언어 서버/클라이언트가 실행 중인 상태에서 수행하며, Dart.web은 browser client runtime으로만 취급한다 +- conditional export 구조를 유지한다: TCP와 WebSocket server는 IO 전용, browser target은 WebSocket client만 제공한다 - Available 표시 조건: 동일 언어 테스트 + 크로스 언어 테스트 통과 - PacketBase의 `typeName`, `nonce`, `data`, `responseNonce` 의미는 PROTOCOL.md와 맞춘다 diff --git a/agent-ops/rules/project/domain/go/rules.md b/agent-ops/rules/project/domain/go/rules.md index 005dbd6..53a460b 100644 --- a/agent-ops/rules/project/domain/go/rules.md +++ b/agent-ops/rules/project/domain/go/rules.md @@ -1,20 +1,20 @@ --- domain: go -last_rule_review_commit: 34692aec1891b5042867daf29479e478861954ed -last_rule_updated_at: 2026-05-21 +last_rule_review_commit: 7ea0b484d2c5c73e85f4ef4b16cba20f25cb4b51 +last_rule_updated_at: 2026-06-01 --- # go ## 목적 / 책임 -Proto Socket의 Go 구현체를 담당한다. TCP/WebSocket 서버·클라이언트, TLS 지원, 공통 Communicator 로직, 타입 헬퍼 함수를 제공한다. +Proto Socket의 Go 구현체를 담당한다. TCP/WS/WSS 서버·클라이언트, TLS 지원, 공통 Communicator 로직, 타입 헬퍼 함수를 제공한다. ## 포함 경로 - `go/*.go` — 핵심 구현 및 루트 패키지 테스트 (packets/ 제외) - `go/test/` — 동일 언어 테스트 -- `go/crosstest/` — 크로스 언어 테스트 (Dart, Kotlin, Python, TypeScript와 연동). 오케스트레이터 또는 클라이언트 헬퍼 +- `go/crosstest/` — 크로스 언어 테스트 (Dart.io, Dart.web, Kotlin, Python, TypeScript와 연동). 오케스트레이터 또는 클라이언트 헬퍼 - `go/go.mod`, `go/go.sum` — 모듈 의존성 - `go/examples/` — 사용 예제 @@ -25,7 +25,8 @@ Proto Socket의 Go 구현체를 담당한다. TCP/WebSocket 서버·클라이언 ## 주요 구성 요소 - `TcpServer` / `TcpClient` — TCP 서버/클라이언트 -- `WsServer` / `WsClient` — WebSocket 서버/클라이언트 +- `WsServer` / `WsClient` — WS/WSS 서버/클라이언트 +- `WsServerOptions` / `NewWsServerWithOptions` — browser client Origin 허용 등 WebSocket accept option 주입 - `Communicator` — 메시지 라우팅 및 요청-응답 상관관계 공통 로직 - `Transport` / `ParserMap` — 전송 추상화와 타입명 기반 파서 등록 - `AddListenerTyped`, `AddRequestListenerTyped`, `SendRequestTyped` — 타입 헬퍼 @@ -36,12 +37,13 @@ Proto Socket의 Go 구현체를 담당한다. TCP/WebSocket 서버·클라이언 - `go test ./...`로 테스트 실행 - `ParserMap`으로 타입명 → 파서 함수 등록 - TLS 변형은 기본 구현과 같은 인터페이스 유지 +- Dart.web 크로스 테스트 서버는 필요한 OriginPatterns를 `WsServerOptions`로 명시한다 - PacketBase의 `typeName`, `nonce`, `data`, `responseNonce` 의미는 PROTOCOL.md와 맞춘다 ## 다른 도메인과의 경계 - **protocol**: packets/ 패키지를 import하지만, 패키지 내용은 protocol 도메인 -- **dart/kotlin/python/typescript**: crosstest에서 상호 연동 +- **dart/kotlin/python/typescript**: crosstest에서 상호 연동. Dart.web은 browser client runtime으로만 연동 ## 금지 사항 diff --git a/agent-ops/rules/project/domain/kotlin/rules.md b/agent-ops/rules/project/domain/kotlin/rules.md index 8438a4e..ef3bd23 100644 --- a/agent-ops/rules/project/domain/kotlin/rules.md +++ b/agent-ops/rules/project/domain/kotlin/rules.md @@ -1,20 +1,20 @@ --- domain: kotlin -last_rule_review_commit: 34692aec1891b5042867daf29479e478861954ed -last_rule_updated_at: 2026-05-21 +last_rule_review_commit: 7ea0b484d2c5c73e85f4ef4b16cba20f25cb4b51 +last_rule_updated_at: 2026-06-01 --- # kotlin ## 목적 / 책임 -Proto Socket의 Kotlin/Android 구현체를 담당한다. JVM/Android 대상 TCP/WebSocket 클라이언트·서버, 공통 Communicator/BaseClient 로직, 하트비트 처리를 제공한다. +Proto Socket의 Kotlin/Android 구현체를 담당한다. JVM/Android 대상 TCP/WS/WSS 클라이언트·서버, 공통 Communicator/BaseClient 로직, 하트비트 처리를 제공한다. ## 포함 경로 - `kotlin/src/main/kotlin/` — 구현 소스 - `kotlin/src/test/` — 동일 언어 테스트 및 테스트 리소스 -- `kotlin/crosstest/` — 크로스 언어 테스트 (Dart, Go, Python, TypeScript와 연동). 오케스트레이터 또는 클라이언트 헬퍼 +- `kotlin/crosstest/` — 크로스 언어 테스트 (Dart.io, Dart.web, Go, Python, TypeScript와 연동). 오케스트레이터 또는 클라이언트 헬퍼 - `kotlin/build.gradle.kts`, `kotlin/settings.gradle.kts` — Gradle 빌드 설정 - `kotlin/gradle/`, `kotlin/gradlew`, `kotlin/gradlew.bat` — Gradle wrapper @@ -29,19 +29,20 @@ Proto Socket의 Kotlin/Android 구현체를 담당한다. JVM/Android 대상 TCP - `Communicator` — 메시지 라우팅 및 요청-응답 상관관계 공통 로직 - `BaseClient` — 하트비트와 연결 종료 공통 처리 - `TcpClient` / `TcpServer` — TCP 클라이언트/서버 -- `WsClient` / `WsServer` — WebSocket 클라이언트/서버 +- `WsClient` / `WsServer` — OkHttp/Java-WebSocket 기반 WS/WSS 클라이언트·서버 - `HeartbeatTimer` — 하트비트 타이머 처리 ## 유지할 패턴 - `./gradlew test`로 테스트 실행 - `./gradlew run -PmainClass=...`으로 crosstest 실행 +- Dart.web 크로스 테스트는 Kotlin WS/WSS 서버가 Dart browser test를 실행하는 구조다 - PacketBase의 `typeName`, `nonce`, `data`, `responseNonce` 의미는 PROTOCOL.md와 맞춘다 ## 다른 도메인과의 경계 - **protocol**: proto 타입을 사용하지만, `kotlin/src/main/proto/`의 스키마 복사본은 protocol 도메인 -- **dart/go/python/typescript**: crosstest에서 상호 연동 +- **dart/go/python/typescript**: crosstest에서 상호 연동. Dart.web은 browser client runtime으로만 연동 ## 금지 사항 diff --git a/agent-ops/rules/project/domain/protocol/rules.md b/agent-ops/rules/project/domain/protocol/rules.md index 5873738..35a8add 100644 --- a/agent-ops/rules/project/domain/protocol/rules.md +++ b/agent-ops/rules/project/domain/protocol/rules.md @@ -1,7 +1,7 @@ --- domain: protocol -last_rule_review_commit: 34692aec1891b5042867daf29479e478861954ed -last_rule_updated_at: 2026-05-21 +last_rule_review_commit: 7ea0b484d2c5c73e85f4ef4b16cba20f25cb4b51 +last_rule_updated_at: 2026-06-01 --- # protocol @@ -32,6 +32,7 @@ last_rule_updated_at: 2026-05-21 ## 주요 구성 요소 - `proto/message_common.proto` — PacketBase, 메시지 타입 정식 원본 +- `dart/lib/src/packets/message_common.pb*.dart` — Dart protobuf 생성 바인딩 - `go/packets/message_common.proto` — Go 언어 옵션이 붙은 proto 복사본 - `kotlin/src/main/proto/message_common.proto` — Kotlin/Java 언어 옵션이 붙은 proto 복사본 - `python/proto_socket/packets/message_common.proto` — Python 패키지의 proto 복사본 diff --git a/agent-ops/rules/project/domain/tools/rules.md b/agent-ops/rules/project/domain/tools/rules.md index e05f31a..8b57eae 100644 --- a/agent-ops/rules/project/domain/tools/rules.md +++ b/agent-ops/rules/project/domain/tools/rules.md @@ -1,7 +1,7 @@ --- domain: tools -last_rule_review_commit: 34692aec1891b5042867daf29479e478861954ed -last_rule_updated_at: 2026-05-21 +last_rule_review_commit: 7ea0b484d2c5c73e85f4ef4b16cba20f25cb4b51 +last_rule_updated_at: 2026-06-01 --- # tools