← Docs hub
SK-Intellix SDK Contract
이 문서는 현재 구현된 SDK 명세가 아니라, 기존 DeviceControlAPIJavaLib와 IDeviceControl.sendModuleCommand(Bundle)를 제품형 client API로 정리할 때의 계약 초안이다.
1. 현재 API 기준
| 항목 |
현재 근거 |
| Client library |
apps/DeviceControlAPI/java/com/sk/airbot/devicecontrol/DeviceControlProxy.java |
| Binder action |
com.sk.airbot.devicecontrol.IDeviceControl |
| Server package |
com.sk.airbot.deviceagent |
| Binder interface |
apps/DeviceAgent/app/src/main/aidl/com/sk/airbot/devicecontrol/IDeviceControl.aidl |
| Core call |
sendModuleCommand(in Bundle indata, out Bundle outdata) |
| Callback |
IDeviceControlCallback.onModuleCallback(Bundle data) |
| Permission |
com.sk.airbot.deviceagent.permission.ACCESS_DEVICE_CONTROL with signature|privileged |
2. SDK 전환 원칙
| 원칙 |
설명 |
| 기존 호출 보존 |
기존 Bundle/method string path를 바로 제거하지 않는다 |
| public API 안정화 |
외부 caller가 raw Bundle key를 직접 알지 않게 감싼다 |
| DeviceAgent 우회 금지 |
DeviceAgent가 제품 기능의 system service hub이므로 client API는 DeviceAgent Binder boundary를 통과한다 |
| platform evidence 필요 |
API 문서만으로 완료 판정하지 않고 실기기 bind/callback/HAL log를 확인한다 |
3. Candidate Public Surface
아래 surface는 구현 완료 상태가 아니라, 현재 DeviceAgent 기능을 감쌀 때의 후보다.
| API 영역 |
현재 연결 대상 |
후보 API |
| 연결 |
DeviceControlProxy.connect(...) |
IntellixClient.connect(context) |
| 원시 명령 호환 |
IDeviceControl.sendModuleCommand(Bundle) |
RawCommandClient.send(command) |
| 청소 |
MainApi, cleaning/*, AMR/cleaning manager |
CleaningClient.start/stop/spotClean |
| 이동/맵 |
moving/*, device/item/amr/* |
MovementClient.move/return/stop |
| 상태 조회 |
StateManager, DevicePlanningContextProvider, AMR/DeviceManager HAL |
StatusClient.getBattery/getMap/getRuntimeState |
| 설정 |
settings/*, config command handlers |
ConfigClient.get/set |
| 예약 |
schedule/* |
ScheduleClient.create/update/enable |
| 이벤트 |
IDeviceControlCallback, EventManager, task event |
EventClient.subscribe/unsubscribe |
4. Adapter Contract
Candidate SDK API
-> request object
-> Bundle adapter
-> IDeviceControl.sendModuleCommand(...)
-> DeviceAgent MainApi / framework command / task package
-> peer agent or HAL
-> Bundle result / callback
-> candidate SDK result/event object
초기 전환에서 중요한 것은 새 이름을 많이 만드는 것이 아니라, 기존 호출과 결과가 동일하게 유지되는지 검증하는 것이다.
5. Result / Event 후보
| 모델 |
최소 필드 |
IntellixRequest |
requestId, domain, method, timeoutMs, payload |
IntellixResult |
requestId, status, resultCode, errorCode, data |
IntellixEvent |
eventId, source, eventType, reasonCode, timestampMs, data |
reasonCode와 errorCode는 DeviceAgent의 task/error contract와 맞춰야 한다. 자연어 메시지나 UI 문구를 SDK 계약으로 삼지 않는다.
6. Release Gate
| Gate |
증거 |
| Binder compatibility |
기존 DeviceControlProxy path와 candidate SDK path의 bind/callback 결과 비교 |
| Bundle conversion |
request/result adapter unit test |
| Device behavior parity |
기존 caller와 SDK caller가 같은 DeviceAgent method를 실행했을 때 결과 비교 |
| Package evidence |
QSSI package, permissions/sysconfig, priv-app 권한 확인 |
| Vendor/HAL evidence |
HAL service 등록, callback, logcat/dmesg/AVC evidence |
7. Open Questions
| 질문 |
닫는 방법 |
SDK를 별도 AAR로 만들 것인가, 기존 DeviceControlAPIJavaLib를 확장할 것인가 |
build artifact와 consumer 목록 확정 |
| 어떤 Bundle key/method를 v1 API로 고정할 것인가 |
MainApi top command map과 실제 caller 사용량 확인 |
| task API를 SDK v1에 포함할 것인가 |
DeviceAgent/SoC TaskManager acceptance evidence 확인 |
| 외부 업체에게 SDK를 줄 것인가, privileged app 내부 API로만 둘 것인가 |
signing/permission/distribution 정책 확정 |