omp-superagent 0.0.0-stage → 0.1.2

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.
Files changed (97) hide show
  1. package/DESIGN.md +1502 -0
  2. package/LICENSE +21 -0
  3. package/README.ko.md +198 -0
  4. package/README.md +224 -2
  5. package/THIRD_PARTY_NOTICES.md +388 -0
  6. package/assets/architecture.mmd +24 -0
  7. package/assets/architecture.svg +126 -0
  8. package/assets/superagent-avatar.jpg +0 -0
  9. package/assets/superagent-mascot.webp +0 -0
  10. package/config.example.json +26 -0
  11. package/docs/OPERATIONS.md +1178 -0
  12. package/docs/discord-voice.md +96 -0
  13. package/docs/releases/0.1.0.md +222 -0
  14. package/docs/releases/0.1.1.md +60 -0
  15. package/docs/releases/0.1.2.md +53 -0
  16. package/package.json +65 -4
  17. package/scripts/ci.ts +33 -0
  18. package/scripts/prepare-ulw.ts +18 -0
  19. package/scripts/release.ts +58 -0
  20. package/scripts/setup.sh +25 -0
  21. package/scripts/test-omp.sh +36 -0
  22. package/skills/head/SKILL.md +100 -0
  23. package/skills/head/references/model-selection.md +83 -0
  24. package/skills/head/references/routing.md +181 -0
  25. package/skills/head/references/supervision.md +122 -0
  26. package/skills/lane/SKILL.md +66 -0
  27. package/skills/lane/references/workflow.md +95 -0
  28. package/src/autostart.ts +295 -0
  29. package/src/board-extension.ts +217 -0
  30. package/src/board.ts +396 -0
  31. package/src/cli.ts +253 -0
  32. package/src/codex-live-bridge.py +73 -0
  33. package/src/codex-live.ts +244 -0
  34. package/src/codex-voice-requirements.txt +5 -0
  35. package/src/codex_live_auth.py +192 -0
  36. package/src/codex_live_media.py +219 -0
  37. package/src/codex_live_provider.py +192 -0
  38. package/src/config.ts +266 -0
  39. package/src/contracts.ts +381 -0
  40. package/src/credentials.ts +172 -0
  41. package/src/decision-tool.ts +59 -0
  42. package/src/decisions.ts +143 -0
  43. package/src/delivery.ts +17 -0
  44. package/src/dialog.ts +73 -0
  45. package/src/discord-command-registration.ts +201 -0
  46. package/src/discord-commands.ts +29 -0
  47. package/src/discord-context.ts +118 -0
  48. package/src/discord-markdown.ts +172 -0
  49. package/src/discord-voice-draft.ts +124 -0
  50. package/src/discord-voice-link.ts +270 -0
  51. package/src/discord-voice.ts +150 -0
  52. package/src/discord.ts +1012 -0
  53. package/src/extension.ts +446 -0
  54. package/src/gateway-client.ts +229 -0
  55. package/src/gateway-protocol.ts +85 -0
  56. package/src/gateway-restart.ts +151 -0
  57. package/src/gateway-server.ts +440 -0
  58. package/src/gateway-store.ts +251 -0
  59. package/src/gateway.ts +654 -0
  60. package/src/head-recovery.ts +61 -0
  61. package/src/host-broker-services.ts +108 -0
  62. package/src/host-extension.ts +561 -0
  63. package/src/host-owner.ts +366 -0
  64. package/src/host-protocol.ts +144 -0
  65. package/src/host-services.ts +54 -0
  66. package/src/host.ts +415 -0
  67. package/src/installed-omp.ts +71 -0
  68. package/src/lane-extension.ts +184 -0
  69. package/src/lane-models.ts +75 -0
  70. package/src/lane-report.ts +70 -0
  71. package/src/lane-rows.ts +12 -0
  72. package/src/managed-ulw-probe.ts +172 -0
  73. package/src/managed-ulw.ts +471 -0
  74. package/src/message-order.ts +21 -0
  75. package/src/messenger-commands.ts +16 -0
  76. package/src/messengers.ts +143 -0
  77. package/src/native-presets.ts +370 -0
  78. package/src/native-sessions.ts +32 -0
  79. package/src/native-settings.ts +131 -0
  80. package/src/openai-live.ts +377 -0
  81. package/src/pr-github-schema.ts +110 -0
  82. package/src/pr-github.ts +170 -0
  83. package/src/pr-watch.ts +200 -0
  84. package/src/repository.ts +12 -0
  85. package/src/runtime.ts +4229 -0
  86. package/src/setup-judge.ts +34 -0
  87. package/src/setup-memory.ts +39 -0
  88. package/src/setup-profiles.ts +84 -0
  89. package/src/setup.ts +300 -0
  90. package/src/slack-command-registration.ts +217 -0
  91. package/src/slack-commands.ts +18 -0
  92. package/src/slack.ts +779 -0
  93. package/src/store.ts +862 -0
  94. package/src/telegram-command-registration.ts +155 -0
  95. package/src/telegram.ts +677 -0
  96. package/src/workflow.ts +94 -0
  97. package/upstream/ulw.json +9 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dbc-hbin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.ko.md ADDED
@@ -0,0 +1,198 @@
1
+ <p align="center">
2
+ <img src="assets/superagent-mascot.webp" width="320" alt="omp-superagent — 보라색 π 모양의 슈퍼히어로 에이전트">
3
+ </p>
4
+
5
+ [English](README.md) · **한국어**
6
+
7
+ # omp-superagent
8
+
9
+ **메신저에서 하나의 OMP 헤드와 대화하고, 필요한 작업만 독립적인 저장소·주제 레인으로 나눕니다.**
10
+
11
+ Discord·Telegram·Slack을 [oh-my-pi](https://github.com/can1357/oh-my-pi)의 세션·인증·도구·native `task`에 연결합니다.
12
+ 헤드는 직접 작업하거나 독립 레인에 위임하고 결과를 종합합니다. 기존 레인에 연결된 대화에서도 모든 후속 입력은 먼저 헤드로 갑니다.
13
+
14
+ [설계](DESIGN.md) · [운영](docs/OPERATIONS.md) · [설정 예제](config.example.json)
15
+
16
+ ## 배포 형태
17
+
18
+ [npm 패키지](https://www.npmjs.com/package/omp-superagent)를 Bun 또는 npm으로 설치하거나
19
+ [GitHub Release](https://github.com/dbc-hbin/omp-superagent/releases/tag/v0.1.2)의 소스·npm tarball을 받으세요.
20
+ 실행에는 Bun이 필요하며 독립 실행 바이너리는 아닙니다. OMP는 미리 설치되어 있어야 하며
21
+ 이 프로젝트가 패치하거나 빌드하지 않습니다. 설치 시 관리형 의존성도 준비합니다.
22
+
23
+ ## 차별점
24
+
25
+ - **직접 실행하는 헤드:** 조사·구현을 직접 처리하거나, 분리할 작업의 범위와 인계를 정해 위임합니다.
26
+ - **맡긴 목표 안의 자율 실행:** 다음 유용한 일을 선택·우선순위화하고 계획·실행·검증·수정합니다.
27
+ 검증한 중간 결과 뒤에도 남은 허가 작업을 단계별 허락 없이 이어가되 새 범위·외부 효과를 임의로 추가하지 않습니다.
28
+ - **저장소·주제별 독립 레인:** 별도 OMP Host와 세션으로 작업 디렉터리와 맥락을 나눕니다.
29
+ - **레인별 native 모델·프리셋:** 헤드가 native judge의 자문을 받아 선택하며, 다른 레인이나 전역 설정을 바꾸지 않습니다.
30
+ - **연결과 세션 수명의 분리:** 지속 실행되는 Gateway가 메신저 연결과 수신·조율 장부를 맡고, OMP 세션이 대화 맥락을 맡습니다.
31
+ - **관리 세션만 쓰는 공유 게시판:** 같은 인스턴스에 등록된 헤드·레인이 정보를 공유하며, 명령이나 승인 경로로 쓰지 않습니다.
32
+ - **순정 OMP 사용:** 관리형 익스텐션과 공개 API로 기존 세션·도구·승인·인증을 재사용하며 코어 fork를 유지하지 않습니다.
33
+
34
+ ## 구조
35
+
36
+ ![메신저 연결을 유지하는 Gateway, 직접 작업하거나 독립 레인에 인계하는 OMP 헤드, 같은 인스턴스의 정보 게시판](assets/architecture.svg)
37
+
38
+ [구조도 Mermaid 원본](assets/architecture.mmd)
39
+
40
+ Gateway는 메신저 연결·수신 장부·헤드 수명을 관리하는 데몬입니다. 작업을 판단하고 레인을 지시하는 주체는 헤드입니다.
41
+ 레인은 결과를 헤드에 보고하고, 헤드는 원래 대화에 맞춰 답합니다.
42
+
43
+ ## 빠른 시작
44
+
45
+ 현재 소스는 Git, **Bun >= 1.4.4**, 로컬 Unix socket을 사용합니다. 패키지 설치에는 OMP가
46
+ 필요 없습니다. Host를 실행할 때는 별도로 설치한 OMP의 기능을 검사하며, 버전 범위로 제한하지
47
+ 않습니다. 검증한 공식 버전은 **OMP 18.20.3, 18.22.2, 19.0.0**입니다. SDK는 **19.0.0**으로 유지하며 upstream 커밋은
48
+ [`57771ae562b9345e0579bceb2d68d585e3e6927e`](https://github.com/can1357/oh-my-pi/commit/57771ae562b9345e0579bceb2d68d585e3e6927e)입니다.
49
+ `bun run test:ci`는 현재 설치된 OMP를 검사합니다. CI를 재현하려면 SDK 기준판은
50
+ `bun run test:baseline`, OMP 18은 `bash scripts/test-omp.sh v18.22.2` 또는 `v18.20.3`을 사용하세요.
51
+ 두 명령 모두 공식 바이너리를 검증한 뒤 같은 회귀를 실행합니다.
52
+ 별도의 주간·수동 **OMP upstream compatibility** 검사는 최신판이 깨지면 그대로 실패하며 릴리스를 막지 않습니다.
53
+ Windows는 지원하지 않습니다.
54
+
55
+ ### 1. 설치
56
+
57
+ Host를 OMP 18에서 19로 바꾸기 전에 기존 백그라운드 서비스를 확인하세요.
58
+ OMP 19 데몬은 이전 브로커의 서비스를 인수하지 않습니다.
59
+
60
+ OMP 자체를 설치하려면 [공식 설치 안내](https://github.com/can1357/oh-my-pi#installation)를 참고하세요.
61
+
62
+ ```sh
63
+ bun add --global --trust omp-superagent@0.1.2
64
+ omp-sa --help
65
+ ```
66
+
67
+ `--trust`는 관리형 `omp-ulw` 준비 등 패키지 설치 스크립트 실행을 허용합니다.
68
+ `bun pm bin --global`의 출력 경로를 `PATH`에 포함하세요. Bun이 `PATH`에 있다면 npm으로도 설치할 수 있습니다.
69
+
70
+ ```sh
71
+ npm install --global omp-superagent@0.1.2
72
+ ```
73
+
74
+ postinstall이 필수 관리형 `omp-ulw`를 준비하므로 설치 스크립트를 생략하지 마세요.
75
+ 공개 SDK 패키지와 플랫폼 네이티브 의존성은 패키지 레지스트리에서 받으며, Rust 도구·OMP 소스
76
+ checkout·코어 패치·네이티브 빌드가 필요하지 않습니다. 의존성 설치에는 네트워크가 필요하지만,
77
+ 봇을 시작하거나 설치된 OMP를 교체하지는 않습니다.
78
+ `command`에는 설치된 OMP 실행 파일과 그 뒤에 네이티브 CLI 옵션을 지정합니다.
79
+ Bun 등 런타임으로 OMP 소스를 실행하는 래퍼는 지원하지 않습니다.
80
+
81
+ CLI 명령어는 **`omp-sa`**이며 프로젝트·패키지 이름은 `omp-superagent`로 유지합니다.
82
+ 소스 checkout이나 소스 tarball을 사용하는 경우에는 그 루트에서 대신 실행합니다.
83
+
84
+ ```sh
85
+ bun install --frozen-lockfile
86
+ bun link
87
+ ```
88
+
89
+ `omp-sa`와 소스 호출 `bun --no-env-file src/cli.ts`는 같은 CLI이며 둘 다 `.env` 자동 로딩을 끕니다.
90
+
91
+ ### 2. 설정과 자격 증명
92
+
93
+ [플랫폼 앱·권한](docs/OPERATIONS.md#2-플랫폼별-앱과-접근-범위)을 준비한 뒤 터미널에서 실행합니다.
94
+
95
+ ```sh
96
+ omp-sa setup --config ./config.local.json
97
+ ```
98
+
99
+ 셋업은 `config.local.json`을 만들고 숨김 입력으로 받은 토큰을 소유자 전용
100
+ `config.local.json.env`(`0600`)에 저장합니다. 파일은 암호화 저장소가 아닌 평문이며,
101
+ 비어 있지 않은 셸 자격 증명이 우선합니다. 모델 제공자 인증은 기존 OMP 방식으로 설정합니다.
102
+
103
+ 봇·모델 세션은 시작하지 않습니다. 최종 저장 확인에는 Discord/Telegram 봇 프로필 사진을
104
+ 마스코트로 바꾸는 작업도 포함됩니다. 권장하는 Mnemopi 기억 backend 활성화는 별도의 명시적
105
+ `yes`와 최종 저장 확인이 있어야 하며 OMP 전역 기억 backend를 변경합니다.
106
+ 누락된 native judge 역할은 설정을 권장하지만 모델을 자동 선택하거나 호출하지 않습니다.
107
+
108
+ 메모리 동작, 다른 설정 경로, 수동 설정과 저장 효과는
109
+ [설정 가이드](docs/OPERATIONS.md#3-설정)를 참고하세요.
110
+
111
+ ### 3. 진단 후 명시적으로 시작
112
+
113
+ ```sh
114
+ omp-sa doctor --config ./config.local.json
115
+ ```
116
+
117
+ 소스 준비와 `doctor`는 메신저에 로그인하지 않습니다. `doctor`로 로컬 설정과 CLI·자격 증명 환경을 진단한 뒤 시작합니다.
118
+
119
+ ```sh
120
+ omp-sa start --config ./config.local.json
121
+ ```
122
+
123
+ 같은 헤드가 누락된 native `high`/`middle`/`low` 프리셋만 초기화한 뒤 일반 작업을 시작합니다.
124
+ 관리 프리셋은 이후 OMP의 `slow`·`default`·`smol` 역할을 따라가며, 활성 세션과 수동 프리셋은
125
+ 보존합니다. `status`는 초기화와 transport 준비를 구분합니다.
126
+ setup과 doctor는 봇·모델 세션을 시작하지 않습니다.
127
+
128
+ `start`는 설정에 남긴 **모든 플랫폼**을 활성화하고, detached Gateway와 헤드를 시작합니다.
129
+ 이 패치 없는 배포판은 관리형 RPC Host에 native TUI/herdr로 접속하는 기능을 제공하지 않습니다.
130
+ 관리 세션은 메신저 명령과 `omp-sa status`로 확인하고 제어합니다.
131
+ 레인 기록은 일반 OMP의 기본 세션 검색에서도 찾습니다. `/resume`(Tab으로 모든 프로젝트)
132
+ 또는 native 기록 도구를 사용하세요. 의도적인 재개는 일반 OMP 작업이며 관리 Host 접속이나
133
+ 관리·게시판 권한 부여가 아닙니다.
134
+ [native 세션 접근](docs/OPERATIONS.md#일반-omp에서-세션-기록-찾기)에서 범위와 사용법을 확인하세요.
135
+
136
+ 상태 조회·종료·macOS 로그인 후 자동 시작·복구는 [운영 가이드](docs/OPERATIONS.md)를
137
+ 참고하세요. 로그인 자동 시작은 한 번 실행하는 방식이며 crash 자동 재시작은 아닙니다.
138
+ Linux 서비스 설치는 제공하지 않습니다.
139
+
140
+ ## 사용 방법
141
+
142
+ Discord에서는 [소유자 전용 음성채팅](docs/discord-voice.md)을 선택적으로 켤 수 있습니다.
143
+ Codex 구독 음성 또는 별도 과금되는 API 음성 중 하나를 선택합니다. 구독 모드는 API 키 없이
144
+ 동작하며, 구독 권한이 없으면 유료 API로 전환하지 않습니다. 작업은 텍스트로 확인한 뒤 기존 HEAD가 맡습니다.
145
+ 기본값은 꺼짐이며 봇 시작만으로 음성 채널에 들어가거나 음성 요금이 발생하지 않습니다.
146
+
147
+ - 일반 메시지로 요청하세요. 질문은 바로 답하고, 작업 지시는 별도 주제에서 짧은 착수 보고와
148
+ 의미 있는 진척·결과를 전달합니다.
149
+ - 같은 주제의 후속 입력은 헤드를 통해 실행 중인 작업을 조정합니다. 저장소·주제별 레인 맥락은
150
+ 독립적입니다. 음성 첨부 메타데이터 보존이 자동 전사를 뜻하지는 않습니다.
151
+ - `/help`와 `/status`로 명령·상태를 확인합니다. `/model`·`/effort`는 유휴 헤드 세션만
152
+ 바꾸며 기존 레인·전역 기본값은 유지합니다. 일반 메시지로 헤드 모델 변경을 요청하면
153
+ 해당 턴이 끝난 뒤 적용합니다. 전역 프리셋 저장은 명시적 `--global`이 필요합니다.
154
+ Slack 일반 메시지 명령은 `!`를 씁니다.
155
+ - `/stop`은 연결 레인을 일시정지하고 `/resume`은 재개를 허가합니다. 승인·취소·도구 제외와
156
+ 불확실한 효과에 대한 보류는 유지합니다. 진척 보고·복구가 작업 완료의 검증이나 외부 효과의
157
+ 취소를 뜻하지 않으며, 저장된 goal은 crash replay나 로드되지 않은 상태의 실행을 보장하지 않습니다.
158
+
159
+ 명령 등록, 재시작·복구 의미와 플랫폼 차이는
160
+ [명령과 일상 사용](docs/OPERATIONS.md#4-명령과-일상-사용)을 참고하세요.
161
+ 저장소를 편집했다고 현재 운영 서비스에 반영되는 것은 아닙니다.
162
+
163
+ ## ULW
164
+
165
+ 공식 [omp-ulw](https://github.com/dbc-hbin/omp-ulw)는 필수 관리형 통합입니다.
166
+ 사용자의 명시적 요청이나 허가된 작업에 구체적으로 도움이 된다는 헤드의 판단으로 workflow를
167
+ 선택합니다. 일반 작업은 직접 세션·native task·일반 레인으로 처리할 수 있습니다.
168
+
169
+ 업데이트는 새 Host에 적용하며 실행 중인 헤드·레인의 버전은 유지합니다.
170
+ [관리형 통합 운영](docs/OPERATIONS.md#필수-관리형-omp-ulw-설치와-갱신)에서 갱신·활성화 동작을 확인하세요.
171
+
172
+ ## 개발
173
+
174
+ 설치 후 로컬 검사를 실행합니다.
175
+
176
+ ```sh
177
+ bun run check
178
+ bun test test
179
+ bun run test:ci
180
+ ```
181
+
182
+ 오프라인 native/PTY 범위·필요 도구·로컬 패키징과 게시 경계는
183
+ [개발자 검증·소스 릴리즈 절차](docs/OPERATIONS.md#6-개발자-검증)를 참고하세요.
184
+ [실행 결과와 한계](docs/releases/0.1.0.md#verification-records)는 시험한 버전에만 적용됩니다.
185
+ OMP 19.0.0 런타임·실계정·운영 준비 완료의 검증 근거가 아닙니다.
186
+
187
+ ## 문서와 출처
188
+
189
+ - [운영 가이드](docs/OPERATIONS.md): 설치·설정·명령·복구 절차.
190
+ - [릴리즈 기록](docs/releases/0.1.0.md#verification-records): 날짜·기준선별 검증 근거와 한계.
191
+ - [설계](DESIGN.md): Gateway·헤드·레인과 공유 게시판의 계약.
192
+
193
+ [oh-my-pi](https://github.com/can1357/oh-my-pi)를 기반으로 하며, workflow에는 [omp-ulw](https://github.com/dbc-hbin/omp-ulw)를 사용합니다.
194
+
195
+ ## License
196
+
197
+ 프로젝트 코드는 [MIT 라이선스](LICENSE)를 따릅니다. 서드파티 구성 요소에는 별도 조건이
198
+ 적용됩니다. [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)를 참고하세요.
package/README.md CHANGED
@@ -1,3 +1,225 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="assets/superagent-mascot.webp" width="320" alt="omp-superagent — a purple pi-shaped superhero agent">
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ # omp-superagent
6
+
7
+ **English** · [한국어](README.ko.md)
8
+
9
+ **One OMP head in your messenger. Independent sessions for work that needs its own context.**
10
+
11
+ Connect Discord, Telegram, and Slack to [oh-my-pi](https://github.com/can1357/oh-my-pi).
12
+ The head can investigate, write code, and answer directly—or assign work to independent
13
+ OMP sessions called **lanes**, each with its own repository, context, and model.
14
+ Every request and follow-up goes through the head, which coordinates the work and brings
15
+ the results back to your conversation.
16
+
17
+ [Design](DESIGN.md) · [Setup & operations](docs/OPERATIONS.md) · [Configuration](config.example.json)
18
+
19
+ ## Distribution
20
+
21
+ Install from [npm](https://www.npmjs.com/package/omp-superagent) or use the source
22
+ and npm tarballs from the
23
+ [GitHub Release](https://github.com/dbc-hbin/omp-superagent/releases/tag/v0.1.2).
24
+ Install with Bun or npm below. Bun is still required at runtime; this is not a
25
+ standalone binary. OMP must already be installed; this project neither patches nor
26
+ builds it. Installation prepares the managed dependencies.
27
+
28
+ ## Why superagent?
29
+
30
+ - **A head that works, not just delegates.** Keep straightforward work in the main session.
31
+ Open lanes when separate context or independent execution helps.
32
+ - **Autonomy inside the entrusted objective.** Choose and prioritize useful next work,
33
+ plan, act, test, and repair. Verified intermediate results lead to remaining authorized
34
+ work without per-step permission, not to unrelated scope or automatic external effects.
35
+ - **Separate repositories and topics.** Lanes are real OMP work sessions, not another
36
+ supervisor layered over a worker.
37
+ - **Models chosen per lane.** The head consults OMP's judge and chooses a native model or
38
+ preset. Lane model changes stay local to that session, without rewriting global settings.
39
+ - **An always-on gateway, not an always-thinking agent.** The daemon keeps messenger
40
+ connections and durable intake alive. OMP retains conversations separately from process residency.
41
+ - **A shared information board.** The head and its managed lanes exchange findings and
42
+ progress. Unconnected OMP sessions cannot join; posts are information, not commands.
43
+ - **Unmodified OMP.** Reuse native sessions, tools, approvals, and authentication through
44
+ managed extensions and public APIs, without maintaining a core fork.
45
+
46
+ ## Architecture
47
+
48
+ ![Messengers connect to the Gateway, which routes all input through the OMP head. The head controls independent lanes and shares an informational board with them.](assets/architecture.svg)
49
+
50
+ [Mermaid source](assets/architecture.mmd)
51
+
52
+ The **Gateway** owns messenger connections and the head's lifecycle. The **head** owns
53
+ lane control and decides whether to work directly or delegate. **Lanes** report to the
54
+ head; the head replies to the original conversation.
55
+
56
+ ## Quick start
57
+
58
+ This checkout requires Git, **Bun >= 1.4.4**, and local Unix sockets. Installing the
59
+ package does not require OMP. To run a Host, install stock OMP separately; the
60
+ CLI checks capabilities, not a version range. The tested releases are
61
+ **OMP 18.20.3, 18.22.2, and 19.0.0**.
62
+ The SDK stays pinned to **19.0.0**, from upstream `v19.0.0` commit
63
+ [`57771ae562b9345e0579bceb2d68d585e3e6927e`](https://github.com/can1357/oh-my-pi/commit/57771ae562b9345e0579bceb2d68d585e3e6927e).
64
+ `bun run test:ci` tests the installed OMP. To reproduce CI, use
65
+ `bun run test:baseline` for the SDK-matched CLI or `bash scripts/test-omp.sh v18.22.2`
66
+ (or `v18.20.3`) for OMP 18. Each verifies the release binary and runs the same suite.
67
+ The separate weekly/manual **OMP upstream compatibility** workflow tests the latest
68
+ published CLI without falling back to the baseline or blocking releases.
69
+ Windows is unsupported.
70
+ Configure `command` with the installed OMP executable followed by native CLI flags;
71
+ runtime/script wrappers are unsupported.
72
+
73
+ ### 1. Install
74
+
75
+ Before switching a Host from OMP 18 to 19, check its background services; the
76
+ OMP 19 daemon does not take over the old broker's services.
77
+
78
+ To install OMP separately, see the
79
+ [upstream instructions](https://github.com/can1357/oh-my-pi#installation).
80
+
81
+ ```sh
82
+ bun add --global --trust omp-superagent@0.1.2
83
+ omp-sa --help
84
+ ```
85
+
86
+ `--trust` allows package lifecycle scripts, including managed `omp-ulw` preparation.
87
+ Ensure `bun pm bin --global` is on `PATH`. Alternatively, with Bun on `PATH`:
88
+
89
+ ```sh
90
+ npm install --global omp-superagent@0.1.2
91
+ ```
92
+
93
+ Keep lifecycle scripts enabled for the managed `omp-ulw` integration.
94
+ Published SDK packages and platform-native dependencies come from the package registry;
95
+ no Rust toolchain, OMP source checkout, core patch, or native build is required.
96
+ Dependency installation needs network access. It does not start a bot or replace OMP.
97
+
98
+ The CLI command is **`omp-sa`**; the package name is `omp-superagent`.
99
+ For a source checkout or extracted source tarball, run from its root instead:
100
+
101
+ ```sh
102
+ bun install --frozen-lockfile
103
+ bun link
104
+ ```
105
+
106
+ Both `omp-sa` and the source invocation `bun --no-env-file src/cli.ts` run the same
107
+ CLI with automatic `.env` loading disabled.
108
+
109
+ ### 2. Configure
110
+
111
+ Prepare your platform apps using the [operations guide](docs/OPERATIONS.md#2-플랫폼별-앱과-접근-범위),
112
+ then run:
113
+
114
+ ```sh
115
+ omp-sa setup --config ./config.local.json
116
+ ```
117
+
118
+ Setup creates `config.local.json` and stores hidden-input tokens in owner-only
119
+ `config.local.json.env` (`0600`). That file is plaintext, not a vault; nonempty shell
120
+ credentials take precedence. Configure model authentication through OMP.
121
+
122
+ Setup does not start a bot or model session. Its final save confirmation includes
123
+ replacing configured Discord/Telegram bot avatars with the mascot. Enabling the
124
+ recommended Mnemopi memory backend requires a separate explicit `yes` and final save;
125
+ it changes OMP's global memory backend. Setup recommends configuring a missing native
126
+ judge role but does not choose or call a model.
127
+
128
+ See [configuration and setup effects](docs/OPERATIONS.md#3-설정) for permissions,
129
+ memory behavior, alternative config paths, and manual configuration.
130
+
131
+ ### 3. Start
132
+
133
+ Check local configuration without logging into the messengers:
134
+
135
+ ```sh
136
+ omp-sa doctor --config ./config.local.json
137
+ ```
138
+
139
+ Start the detached Gateway and head, connecting **all configured messengers**:
140
+
141
+ ```sh
142
+ omp-sa start --config ./config.local.json
143
+ ```
144
+
145
+ The same head initializes missing native `high`/`middle`/`low` presets before ordinary
146
+ work. Managed presets then follow OMP's `slow`/`default`/`smol` roles without changing
147
+ active sessions or overwriting custom presets. `status` distinguishes initialization from
148
+ transport readiness. Setup and doctor do not start bot/model sessions.
149
+
150
+ Native TUI/herdr attachment to managed RPC Hosts is not available in this patch-free
151
+ release. Use messenger commands and `omp-sa status` for managed sessions.
152
+ Lane journals also appear in ordinary OMP's native session discovery. Use `/resume`
153
+ (Tab for all projects) or native history tools; an intentional resume is normal OMP work,
154
+ not managed-Host attachment or a manager/board permission grant. See
155
+ [native session access](docs/OPERATIONS.md#일반-omp에서-세션-기록-찾기).
156
+
157
+ For status, shutdown, macOS login startup, and recovery, use the
158
+ [operations guide](docs/OPERATIONS.md). Login startup is a one-shot launch, not a
159
+ crash supervisor; Linux service installation is not provided.
160
+
161
+ ## Working from chat
162
+
163
+ Discord can optionally join a private voice conversation with the owner. A separate
164
+ OpenAI Live session answers speech; work goes to HEAD only after written confirmation.
165
+ Select Codex subscription voice or the separately billed API in the
166
+ [voice configuration guide](docs/discord-voice.md). Voice is off by default;
167
+ a rejected subscription call never switches to API billing.
168
+
169
+ - Ask normally. Questions get direct answers; work instructions open a topic with a
170
+ brief approach, followed by meaningful progress and results.
171
+ - Follow up in the same topic to steer active work through the head. Repositories and
172
+ topics keep independent lane context; voice metadata does not imply transcription.
173
+ - Use `/help` and `/status` for controls and state. `/model` and `/effort` manage the
174
+ idle head session, not existing lanes or global defaults. You can also ask the head
175
+ in a normal message to switch its own model after that turn. Global preset changes
176
+ require explicit `--global`. Slack's message commands use `!`.
177
+ - `/stop` pauses the bound lane; `/resume` authorizes continuation. Approvals,
178
+ cancellations, tool exclusions, and uncertain-effect holds remain binding.
179
+ Neither progress reports nor recovery prove task completion or undo external effects.
180
+ Saved goals do not guarantee crash replay or execution while unloaded.
181
+
182
+ See [commands, approvals, and everyday use](docs/OPERATIONS.md#4-명령과-일상-사용)
183
+ for command registration, restart and recovery semantics, and platform differences.
184
+ Repository changes alone do not update a running service.
185
+
186
+ ## ULW included
187
+
188
+ [omp-ulw](https://github.com/dbc-hbin/omp-ulw) is installed and loaded as a managed integration.
189
+ Use a workflow explicitly, or let the head select one when the authorized task genuinely
190
+ benefits from it. Ordinary work can stay in a direct session, native task, or regular lane.
191
+
192
+ Updates apply to new Hosts, not running heads or lanes. See
193
+ [managed integration operations](docs/OPERATIONS.md#필수-관리형-omp-ulw-설치와-갱신)
194
+ for update and activation behavior.
195
+
196
+ ## Development
197
+
198
+ Local checks after installation:
199
+
200
+ ```sh
201
+ bun run check
202
+ bun test test
203
+ bun run test:ci
204
+ ```
205
+
206
+ See [developer verification and source release steps](docs/OPERATIONS.md#6-개발자-검증)
207
+ for offline native/PTY coverage, prerequisites, and local packaging/publication boundaries.
208
+ [Recorded results and limitations](docs/releases/0.1.0.md#verification-records) apply
209
+ to the versions tested; they do not verify the OMP 19.0.0 runtime, live accounts,
210
+ or production readiness.
211
+
212
+ ## Documentation & credits
213
+
214
+ - [Design](DESIGN.md): routing, roles, sessions, and lifecycle.
215
+ - [Operations guide](docs/OPERATIONS.md): platform setup, commands, and recovery.
216
+ - [Release records](docs/releases/0.1.0.md#verification-records): dated verification evidence and limits.
217
+
218
+ Built on [oh-my-pi](https://github.com/can1357/oh-my-pi), with
219
+ [omp-ulw](https://github.com/dbc-hbin/omp-ulw) workflow integration.
220
+ The mascot reimagines OMP's pi mark as a little superhero.
221
+
222
+ ## License
223
+
224
+ Project code is licensed under [MIT](LICENSE). Third-party components retain their
225
+ separate terms; see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).