omp-superagent 0.1.5 → 0.1.6
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/DESIGN.md +62 -8
- package/README.ko.md +22 -14
- package/README.md +36 -22
- package/config.example.json +1 -0
- package/docs/OPERATIONS.md +180 -42
- package/docs/design/execution.md +20 -7
- package/docs/design/messaging.md +131 -11
- package/docs/releases/0.1.6.md +21 -0
- package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
- package/gateway/bin/omp-gateway-darwin-x64 +0 -0
- package/gateway/bin/omp-gateway-linux-arm64 +0 -0
- package/gateway/bin/omp-gateway-linux-x64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
- package/package.json +1 -1
- package/skills/head/SKILL.md +7 -2
- package/skills/head/references/model-selection.md +4 -4
- package/skills/head/references/routing.md +9 -4
- package/skills/head/references/supervision.md +4 -3
- package/skills/lane/SKILL.md +19 -13
- package/skills/lane/references/workflow.md +19 -11
- package/src/board.ts +7 -2
- package/src/cli.ts +22 -6
- package/src/config.ts +26 -3
- package/src/contracts.ts +20 -2
- package/src/decision-tool.ts +1 -1
- package/src/extension.ts +40 -2
- package/src/gateway-client.ts +22 -1
- package/src/gateway-config.ts +4 -4
- package/src/gateway-restart-env.ts +7 -2
- package/src/gateway-wire.ts +8 -0
- package/src/group-access.ts +222 -0
- package/src/group-policy.ts +117 -0
- package/src/group-runner-extension.ts +153 -0
- package/src/group-runner.ts +284 -0
- package/src/head-rotation.ts +88 -0
- package/src/host-extension.ts +52 -3
- package/src/host-protocol.ts +1 -0
- package/src/host-sdk-helper.ts +7 -0
- package/src/host-superkit.ts +26 -0
- package/src/host.ts +5 -1
- package/src/lane-extension.ts +6 -3
- package/src/managed-memory-helper.ts +22 -0
- package/src/managed-memory.ts +100 -0
- package/src/managed-ulw.ts +16 -20
- package/src/messenger-command-catalog.json +3 -2
- package/src/native-launch-profile.ts +16 -0
- package/src/native-settings.ts +9 -3
- package/src/result-attachment.ts +211 -0
- package/src/runtime.ts +1109 -157
- package/src/setup-memory.ts +15 -33
- package/src/setup.ts +24 -22
- package/src/store.ts +214 -13
- package/src/topic-history.ts +430 -0
- package/src/topic-request.ts +88 -0
package/docs/OPERATIONS.md
CHANGED
|
@@ -106,8 +106,8 @@ review·비용·범위·pause/cancel·불확실성 보류를 우회하지 않는
|
|
|
106
106
|
사용자 jevify 선택은 원래 입력 선두의 소문자 독립 prose `jevify`만 인정하며 `/jevify`·대문자·
|
|
107
107
|
인용/code/path·부정·뒤쪽 언급은 아니다. 호출 없는 일반 원문에도 헤드 선택 필드는 사용 가능하다.
|
|
108
108
|
runtime의 `workflowPrompt`는 fenced context 밖에 소문자 native `jevify`를 prefix하며 ULW
|
|
109
|
-
extension-command capability 조회를 하지 않는다. 레인은 실제 OMP jevify notice와
|
|
110
|
-
`
|
|
109
|
+
extension-command capability 조회를 하지 않는다. 레인은 실제 OMP jevify notice와 `eval`이 안내하는
|
|
110
|
+
judge 도움말(OMP 19.1에서는 `help://eval/judge`)을 따른다. notice 활성화는 native `magicKeywords.enabled`·`magicKeywords.jevify`와
|
|
111
111
|
eval 가용성에 달리므로 admission만으로 보장하지 않는다. 전역 설정을 바꾸지 않으며 jevify에는
|
|
112
112
|
ULW 스킬 조회·브랜드·추가 레인·goal·모델 변경·workflow artifact가 필요하지 않다.
|
|
113
113
|
레인의 보고는 헤드용이며 외부 발송이 아니다. 내부 지시·보고는 영어, 헤드의 외부 답변은
|
|
@@ -176,13 +176,13 @@ OMP 19.0.0이며 upstream `v19.0.0` 커밋은
|
|
|
176
176
|
사용한다. 이 저장소는 OMP를 다운로드하거나 소스에서 빌드하지 않는다.
|
|
177
177
|
|
|
178
178
|
```sh
|
|
179
|
-
bun add --global --trust omp-superagent@0.1.
|
|
179
|
+
bun add --global --trust omp-superagent@0.1.6
|
|
180
180
|
omp-sa --help
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
`--trust`는 관리형 ULW 준비 등 패키지 설치 스크립트를 허용한다.
|
|
184
184
|
`bun pm bin --global`의 출력 경로를 PATH에 포함한다. Bun이 PATH에 있으면
|
|
185
|
-
`npm install --global omp-superagent@0.1.
|
|
185
|
+
`npm install --global omp-superagent@0.1.6`도 사용할 수 있다.
|
|
186
186
|
설정은 설치 디렉터리가 아닌 사용자 작업 디렉터리에
|
|
187
187
|
`omp-sa setup --config ./config.local.json`으로 만든다. 설치만으로 봇을 활성화하지 않는다.
|
|
188
188
|
|
|
@@ -246,8 +246,13 @@ Gateway 상태 응답의 `ulw`는 `revision`, `packagePath`, `upstreamRevision`,
|
|
|
246
246
|
`error`, `updating`을 구분한다(`injected`는 테스트용 주입인 경우에만 표시). `revision`과
|
|
247
247
|
`packagePath`는 **다음 새 Host가 사용할 active package**이며 실행 중 모든 Host의 버전이 아니다.
|
|
248
248
|
`upstreamRevision`은 마지막 확인한 원격 결과이고 `checkedAt`·`error`·`updating`과 함께 읽는다.
|
|
249
|
-
원격 조회 실패·미확인을 최신 일치로 표시하지 않는다.
|
|
250
|
-
`
|
|
249
|
+
원격 조회 실패·미확인을 최신 일치로 표시하지 않는다. `omp-sa status --config FILE`의
|
|
250
|
+
`gateway.head.loadedSuperkitPath`는 연결된 head의 실제 OMP 세션이 시작할 때 확인한 패키지 경로다.
|
|
251
|
+
이 경로와 `gateway.ulw.packagePath`가 다르면 head는 아직 이전 버전을 쓰고 있다.
|
|
252
|
+
각 새 head·lane은 manifest의 모든 확장 모듈이 그 세션의 활성 목록에 있어야 시작한다.
|
|
253
|
+
파일이 있어도 import·초기화가 실패하거나 모듈이 비활성이면 준비 완료가 되지 않는다.
|
|
254
|
+
로드 확인을 지원하지 않는 기존 Host는 작업용으로 재연결하지 않는다. 진행 중인 작업을
|
|
255
|
+
확인하고 정상 종료한 뒤 다시 시작한다. 설치·검사는 일반 OMP의 전역 설정을 변경하지 않는다.
|
|
251
256
|
|
|
252
257
|
**실행 중 Host의 revision과 다음 Host의 revision은 다를 수 있다.** 이미 실행 중인 head/lane은
|
|
253
258
|
자신이 로드한 정확한 package 경로를 유지하며 업데이트 때문에 재시작·hot reload하지 않는다.
|
|
@@ -595,22 +600,27 @@ Slack을 설정했다면 셋업 마지막에 `https://api.slack.com/apps` →
|
|
|
595
600
|
Display Information → App icon**에서 같은 JPG를 수동 업로드하도록 경로를 출력한다.
|
|
596
601
|
메시지별 아이콘을 프로필 사진 자동 설정이라고 가장하거나 사용자의 개인 사진을 변경하지 않는다.
|
|
597
602
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
603
|
+
**관리형 헤드와 레인은 native Mnemopi가 실효 설정으로 적용되어 있어야 시작할 수 있다.**
|
|
604
|
+
기존 Superagent 구성도 예외가 아니다. `setup`과 `doctor`는 헤드 작업 디렉터리와 구성된 OMP
|
|
605
|
+
명령의 프로필·설정 오버레이를 기준으로 확인한다. `doctor`는 읽기 전용이며, Mnemopi가
|
|
606
|
+
미설정이거나 상위 설정에 가려지거나 확인할 수 없으면 0이 아닌 코드로 종료한다. native
|
|
607
|
+
Gateway는 메신저에 연결하기 전에 확인한다. 새 헤드나 레인 Host도 stock OMP를 실행하기 전에
|
|
608
|
+
해당 작업 디렉터리와 실제 실행 설정을 확인한다.
|
|
609
|
+
|
|
610
|
+
전역 값을 바꿔 Mnemopi를 활성화할 수 있는 경우에만 셋업에서 별도의 명시적 `y`/`yes`를 묻는다.
|
|
611
|
+
최종 저장까지 승인하면 선택된 native 프로필의 전역 `memory.backend`만 `mnemopi`로 변경한다.
|
|
612
|
+
Enter·거절·저장 전 취소로는 이 값을 바꾸지 않는다. 프로젝트나 `PI_CONFIG_FILES`/`--config`
|
|
613
|
+
오버레이를 덮어쓰지 않으며, 메모리 DB·스코프·임베딩·LLM·자동 저장 옵션과 기존 기억은 보존한다.
|
|
614
|
+
저장한 뒤에도 Mnemopi를 사용할 수 없으면 셋업은 0이 아닌 코드로 종료하되 저장된 구성과 자격
|
|
615
|
+
증명을 유지한다. 해당 native 프로필과 작업 디렉터리에서 차단 원인을 수정한 뒤 `doctor`를 다시
|
|
616
|
+
실행한다.
|
|
617
|
+
|
|
618
|
+
이 사전 확인은 메모리 backend를 초기화하거나 모델을 호출하지 않으며, 다운로드하거나 계정
|
|
619
|
+
저장소를 열지 않는다. 이전되지 않은 native 설정·계정 저장소만 남아 실효 backend를 판정할 수
|
|
620
|
+
없다면, 선택된 프로필에서 stock OMP로 설정을 이전한 뒤 다시 시도한다. 전역 값을 수동으로
|
|
621
|
+
바꾸려면 stock OMP의 `config set memory.backend mnemopi`를 사용하고, 더 높은 우선순위의 설정은
|
|
622
|
+
따로 확인한다. 전역 변경은 일반 OMP 세션에도 영향을 줄 수 있다. 이후 메모리 기능을 사용하면
|
|
623
|
+
native 설정에 따라 기억을 장기 저장·회수하거나 모델을 사용·다운로드할 수 있다.
|
|
614
624
|
|
|
615
625
|
새 구성 저장에 성공하면 Mnemopi 동의 여부와 별개로 head 작업 디렉터리의 native 설정을
|
|
616
626
|
읽기 전용으로 확인한다. 실효 `modelRoles.judge`가 없으면 **일반 OMP의 `/models` → Roles →
|
|
@@ -647,6 +657,7 @@ high/middle/low는 명시적 `start`의 전용 초기 설정 턴에서 기존
|
|
|
647
657
|
| `discord` | 선택 블록. 존재하면 `tokenEnv`, `ownerId`, `allowedGuildIds`, `allowedChannelIds` 모두 필수. |
|
|
648
658
|
| `telegram` | 선택 블록. 존재하면 `tokenEnv`, `ownerId`, `allowedChatIds` 모두 필수. 그룹 chat ID의 음수 부호를 보존한다. |
|
|
649
659
|
| `slack` | 선택 블록. 존재하면 `botTokenEnv`, `appTokenEnv`, `ownerId`, `teamId`, `allowedChannelIds` 모두 필수. |
|
|
660
|
+
| `groupRooms` | 선택 목록. 등록한 방과 사용자에게만 아래 그룹 모드를 열며, 해당 방에서는 운영자도 일반 그룹 권한만 갖는다. 기본값은 빈 목록이다. |
|
|
650
661
|
|
|
651
662
|
상태·cwd 상대 경로는 설정 파일 기준이지만 `command` 인수의 상대 경로는 그렇게 변환되지 않는다.
|
|
652
663
|
실행 cwd가 달라도 동작하도록 command에는 절대 경로를 권장한다.
|
|
@@ -657,6 +668,77 @@ OMP 소스 CLI나 프로젝트 패치 바이너리를 지정하지 않는다.
|
|
|
657
668
|
예산으로 잡는다. 이는 CPU·메모리·토큰 비용·디스크 할당량의 강제 제한이 아니다.
|
|
658
669
|
저장 기록과 다운로드 파일의 보존·디스크 사용량은 운영자가 관리한다.
|
|
659
670
|
|
|
671
|
+
### 단체방·서버 권한 분리
|
|
672
|
+
|
|
673
|
+
기존 플랫폼 허용 목록에 추가한 방을 `groupRooms`에서도 정확한 플랫폼·서버·채널 ID로
|
|
674
|
+
지정한다. 목록에 넣지 않은 기존 운영자 라우트의 동작은 바뀌지 않는다. 같은 서버의 다른
|
|
675
|
+
채널은 자동으로 열리지 않는다. 등록한 부모 채널의 스레드·포럼 토픽에는 같은 규칙이 적용된다.
|
|
676
|
+
운영자는 관리 명령·승인·결과 파일 발송을 위해 본인의 DM이나 별도 운영 채널을 사용한다.
|
|
677
|
+
|
|
678
|
+
```json
|
|
679
|
+
{
|
|
680
|
+
"groupRooms": [
|
|
681
|
+
{
|
|
682
|
+
"platform": "discord",
|
|
683
|
+
"guildId": "1234567890",
|
|
684
|
+
"channelId": "1234567891",
|
|
685
|
+
"userIds": ["1234567892"],
|
|
686
|
+
"mode": "request",
|
|
687
|
+
"dailyLimit": 10
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
- `platform`: `discord`, `telegram`, `slack`. Telegram은 `guildId`와 `channelId`에 같은 음수
|
|
694
|
+
그룹 ID를 넣는다. Slack `guildId`는 설정한 `teamId`다. `userIds`는 표시 이름이 아닌 실제
|
|
695
|
+
사용자 ID이며, 운영자도 제한 모드를 쓰려면 목록에 넣는다. 서버 관리자 역할은 권한이 아니다.
|
|
696
|
+
- 미허가 ID의 호출은 슬래시 명령을 포함해 접수·실행되지 않는다. Discord·Slack에서는
|
|
697
|
+
등록된 슬래시 명령이 앱 메뉴에 보일 수 있어도 제한 그룹 안에서는 누구에게도 실행되지 않는다.
|
|
698
|
+
허가된 ID는 해당 방에 설정된 `!request`, `!ask`, `!work` 중 하나만 사용할 수 있다.
|
|
699
|
+
- `request`: `!request 요청 내용`은 접수 확인만 답하고 모델이나 도구를 실행하지 않는다.
|
|
700
|
+
`omp-sa group --config FILE` 또는 `omp-sa group REQUEST_ID --config FILE`로 운영자가 로컬에서
|
|
701
|
+
원문을 확인한다. 검토한 요청을 실행하려면 운영자가 자신의 허용된 대화에서 새 요청으로 시작한다.
|
|
702
|
+
- `chat`: `!ask 질문`은 별도 OMP 실행에 현재 질문만 보내고 짧은 텍스트 답을 받는다. 작업
|
|
703
|
+
디렉터리·도구·이전 대화·운영자 메모리는 사용하지 않는다. `model`에 정확한 `provider/model`을 넣는다.
|
|
704
|
+
- `work`: `!work 작업 내용`은 `model`과 운영자가 `repository`에 지정한 저장소를 사용한다.
|
|
705
|
+
같은 방에 접수 확인이 실제로 도착한 뒤, 지정 저장소의 커밋으로 만든 별도 Git worktree 안에서
|
|
706
|
+
허용된 파일만 읽고 편집한다.
|
|
707
|
+
셸, 테스트 명령, Git 커밋·푸시·병합은 실행하지 않는다. 단체방에는 고정된 상태만 표시하고,
|
|
708
|
+
실제 diff와 worktree 위치는 운영자가 로컬에서 `omp-sa group REQUEST_ID --config FILE`로
|
|
709
|
+
확인한다. 종료 상태는 변경 내용 검증이나 배포 승인이 아니다.
|
|
710
|
+
- Telegram 개인정보 보호 모드에서는 봇의 실제 사용자명을 붙인 `/request@BotUsername`,
|
|
711
|
+
`/ask@BotUsername`, `/work@BotUsername`을 사용한다. 수정한 입력은 새 작업을 만들지 않는다.
|
|
712
|
+
- `dailyLimit`은 UTC 기준 방별 일일 접수 한도다. `chat`과 `work`는 동시에 하나만 실행하며
|
|
713
|
+
Host 예산에 남는 슬롯을 사용한다. `stateDir/groups/models.yml`에 별도 그룹용 OMP 모델 인증을
|
|
714
|
+
배치한다. 운영자 프로필은 상속하지 않는다. 이 모델에 전송해도 되는 저장소와 데이터만 지정한다.
|
|
715
|
+
worktree는 OS 샌드박스가 아니며, 미검토 파일을 원본에 적용하거나 실행하지 않는다.
|
|
716
|
+
- 설정 변경은 다음 Gateway 시작에서 적용된다. 중단된 실행·발송 결과가 불확실한 응답을
|
|
717
|
+
자동 재실행하거나 재발송하지 않는다. 그룹 모드로 전환하기 전 이미 공개된 메시지는 지워지지 않는다.
|
|
718
|
+
|
|
719
|
+
`request` 방에는 모델 파일이 필요 없다. `chat`·`work`를 쓰려면 `stateDir/groups`를
|
|
720
|
+
실행 계정만 접근할 수 있게 만들고(`0700`), 그 안에 `models.yml`을 `0600`으로 저장한다.
|
|
721
|
+
예를 들어 OpenAI 호환 API를 쓴다면 아래와 같이 등록하고 방의 `model`을
|
|
722
|
+
`group-provider/EXACT_MODEL_ID`로 지정한다. URL·키·한도·가격을 실제 제공자 값으로
|
|
723
|
+
교체한다. 운영자 자격 증명 대신 그룹 전용 키와 제공자 측 사용량 한도를 사용하는 것을 권장한다.
|
|
724
|
+
|
|
725
|
+
```yaml
|
|
726
|
+
providers:
|
|
727
|
+
group-provider:
|
|
728
|
+
api: openai-completions
|
|
729
|
+
baseUrl: https://provider.example/v1
|
|
730
|
+
apiKey: REPLACE_WITH_GROUP_ONLY_API_KEY
|
|
731
|
+
models:
|
|
732
|
+
- id: EXACT_MODEL_ID
|
|
733
|
+
name: Group model
|
|
734
|
+
contextWindow: 32768
|
|
735
|
+
maxTokens: 4096
|
|
736
|
+
cost: {input: 1, output: 4, cacheRead: 0, cacheWrite: 0}
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
그룹의 질문·작업은 실제 모델 호출이므로 제공자 비용이 발생할 수 있다. 로컬 시간/비용 제한은
|
|
740
|
+
실행을 제한하지만, 이미 전송한 요청의 과금을 취소하거나 제공자 청구액을 보장하지는 않는다.
|
|
741
|
+
|
|
660
742
|
## 4. 명령과 일상 사용
|
|
661
743
|
|
|
662
744
|
CLI 실행 이름은 `omp-sa`다. 위의 전역 패키지 설치 또는 준비한 저장소의 `bun link`로
|
|
@@ -716,9 +798,32 @@ launch 직후 소유권 기록 전 crash 등은 수동 조정까지 보류할
|
|
|
716
798
|
정확한 [접수](design/messaging.md#durable-admission-and-recovery)와
|
|
717
799
|
[소유권 복구](../DESIGN.md#startup-readiness-and-shutdown) 계약은 설계를 따른다.
|
|
718
800
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
801
|
+
헤드 런타임이 인증된 입력을 접수하지만, 일반 작업은 전역 헤드 **모델**을 거치지 않는다.
|
|
802
|
+
기존 주제에서는 그 세션을 이어 쓴다. 새 주제에서는 같은 채널·DM에서 사용한 저장소 이름을
|
|
803
|
+
요청에 쓰거나 이전 작업 메시지에 답장하면 해당 작업 디렉터리로 새 세션을 연다. 경로만 재사용하고
|
|
804
|
+
이전 대화 내용은 가져오지 않는다. 대상이 없거나 후보가 여럿이면 같은 대화에서 묻는다.
|
|
805
|
+
질문에 저장소 이름이나 절대 경로만 답하면 **원래 요청**을 시작한다. 수동으로 정하려면
|
|
806
|
+
첫 줄에 `cwd: /실제/작업/경로`, 다음 줄에 요청을 적는다. 진행·결과·승인은 원래 경로로
|
|
807
|
+
전달되며, 레인은 메신저 자격 증명을 갖지 않는다. 여러 주제를 비교하거나 헤드에서 직접
|
|
808
|
+
작업하려면 `/head 요청`(Slack `!head 요청`)을 사용한다.
|
|
809
|
+
|
|
810
|
+
다른 운영자 채널·DM에서도 `지난주 로그인 버그 보던 데서 계속해줘`처럼 시점과 작업을 설명하면 된다.
|
|
811
|
+
저장소 이름, 원래 메시지 링크, `/new`는 필요 없다. 먼저 헤드 프로필의 **OMP Mnemopi `recall`**로
|
|
812
|
+
단서를 찾고, 이 인스턴스에서 접근이 허용된 원본 작업 세션과 대조한다. 기억이 비어도 원본에서
|
|
813
|
+
찾을 수 있지만, 조회 자체가 실패하면 임의로 배정하지 않는다. 후보가 여럿이면 질문에 번호로 답한다.
|
|
814
|
+
`recall`은 헤드에 설정된 메모리 뱅크 범위를 그대로 사용하며, 다른 프로젝트의 비공개 뱅크를 열지 않는다.
|
|
815
|
+
메모리 원문은 채팅이나 새 세션에 전달하지 않는다. 다른 채널에서 이어갈 때는 이전 저장소와 해당 작업의
|
|
816
|
+
근거만 현재 대화의 독립 세션에 전달한다. 이미 연결된 Discord 작업 스레드에서는 새 세션을
|
|
817
|
+
열지 않고 현재 레인에 검증한 근거만 전달하며, 질문·작업·답변은 같은 스레드에 남는다.
|
|
818
|
+
이 스레드의 과거 작업 선택 질문에 한해 발송이 확인된 뒤 5분 내 답이 없으면 런타임이
|
|
819
|
+
검증된 후보 중 현재 세션을 우선하고, 그다음 같은 작업 디렉터리에서 가장 최근 후보를 선택한다.
|
|
820
|
+
유효한 후보가 없으면 현재 레인의 맥락만 사용한다. 기한 내 선택이 우선이며, 이 타임아웃은
|
|
821
|
+
다른 작업 디렉터리로 이동하거나 승인을 대신하지 않는다. 원래 세션의 진행 중 작업·승인을
|
|
822
|
+
넘기거나 메신저에 과거 대화 전문을 게시하지 않는다. `지난주`는 요청이 속한 주의 월요일
|
|
823
|
+
00:00 UTC 직전 7일이다.
|
|
824
|
+
사용자가 먼저 스레드를 만들 필요는 없다. 작업 스레드를 지원하는 채널에서는 봇이 그곳에 결과를 보내고,
|
|
825
|
+
스레드를 만들 수 없는 Discord·Telegram 일반 채널에서는 같은 채널에서 답한다.
|
|
826
|
+
일반적인 `계속해줘`는 여전히 현재 주제의 후속 입력이다.
|
|
722
827
|
|
|
723
828
|
**일반 후속 입력의 기본값은 steer다.** 같은 platform/account/authority/channel/thread/topic의
|
|
724
829
|
활성 실행에 일반 후속 요청을 native steer로 전달한다. `/steer`는 필요 없다. 다른 대화,
|
|
@@ -726,10 +831,16 @@ report이고 외부 회신은 헤드가 원래 route 또는 명시적으로 선
|
|
|
726
831
|
보류를 우회하지 않는다. 입력마다 실제 native 완료 receipt를 확인하고 같은 실행의 최종
|
|
727
832
|
답변/보고는 중복 발송하지 않는다.
|
|
728
833
|
|
|
729
|
-
**새 주제도 명령 없이 요청할 수 있다.**
|
|
730
|
-
실제 지원을 확인하고 thread/topic을 만들어 독립 OMP 세션에 연결한다.
|
|
731
|
-
|
|
732
|
-
|
|
834
|
+
**새 주제도 명령 없이 요청할 수 있다.** 헤드 런타임이 확인된 작업 디렉터리로 배정하면
|
|
835
|
+
실제 지원을 확인하고 thread/topic을 만들어 독립 OMP 세션에 연결한다. 이미 연결된 Discord
|
|
836
|
+
서버 작업 스레드에서는 다른 `cwd:`만 적어도 경로나 스레드가 바뀌지 않는다. 같은 부모에
|
|
837
|
+
새 스레드로 분리하려면 `/new 요청`이나 `이건 따로 빼줘: 로그인 점검`,
|
|
838
|
+
`로그인 점검은 새 스레드에서 해줘`, `Split this into a new thread: Check login`처럼
|
|
839
|
+
분리 의도와 작업을 한 줄 평문으로 명시한다. 다른 디렉터리에서 할 작업이라면
|
|
840
|
+
`/new cwd: /실제/작업/경로`를 첫 줄에, 작업을 다음 줄에 적는다.
|
|
841
|
+
`이건 따로 빼줘`처럼 작업을 특정하지 않으면 같은 스레드에서 `/new`로 작업을 명시해 달라고
|
|
842
|
+
안내하고 새 스레드를 만들지 않는다. 수정 메시지·인용·첨부는 새 스레드 지시가 아니다.
|
|
843
|
+
Discord DM과 다른 플랫폼의 주제 규칙은 그대로다. Gateway는 LLM 분류나 lane 실행을 하지 않는다.
|
|
733
844
|
|
|
734
845
|
| 플랫폼 | 자동 주제 생성 |
|
|
735
846
|
| --- | --- |
|
|
@@ -750,16 +861,16 @@ LLM 분류나 lane 실행을 하지 않는다.
|
|
|
750
861
|
|
|
751
862
|
| DM 입력 | 동작 |
|
|
752
863
|
| --- | --- |
|
|
753
|
-
| `/new 요청 내용` | 독립 주제 경계를 접수.
|
|
864
|
+
| `/new 요청 내용` | 독립 주제 경계를 접수. 작업 디렉터리가 확인되면 native topic을 우선 생성·연결하며 미지원 DM만 논리 주제를 유지 |
|
|
754
865
|
| `/new` | 빈 주제만 활성화하고 요청 내용을 묻는 고정 안내를 한 번 회신. 이 명령만으로 모델 호출·레인 시작은 하지 않음 |
|
|
755
|
-
| 일반 후속 메시지 | 선택된
|
|
756
|
-
| `/main` | 앞으로의
|
|
866
|
+
| 일반 후속 메시지 | 선택된 주제의 기존 세션에서 처리. 유휴면 복원하고, 같은 주제의 활성 실행은 조건에 따라 steer. 전역 모델에는 제출하지 않음 |
|
|
867
|
+
| `/main` | 앞으로의 DM 입력을 메인 대화 주소로 돌림. 이전 주제·레인은 보존하며 전역 모델 요청은 별도로 `/head 요청` 사용 |
|
|
757
868
|
|
|
758
869
|
헤드는 이미 제출받은 일반 DM 작업도 `lane_start`로 독립 주제에 인계할 수 있다.
|
|
759
870
|
원래 헤드 요청의 소유권은 유지하고 별도 handoff를 만든다. native thread를 만든 경우
|
|
760
871
|
안내된 thread에서 후속 대화를 이어간다. 논리 주제 fallback에서는 이후 DM 입력이 그 주제를 따른다.
|
|
761
872
|
서버를 만들 필요는 없고, 명시적으로 허용된 서버 스레드 목적지를 지정하는 인계도 가능하다.
|
|
762
|
-
그룹·workspace 채널 대화에서 `/new`(Slack `!new`)는 새 스레드/topic 사용 안내를 보내며
|
|
873
|
+
그룹·workspace 채널 대화에서 인자 없는 `/new`(Slack `!new`)는 새 스레드/topic 사용 안내를 보내며
|
|
763
874
|
OMP 자체 `/new`로 전달하지 않는다. 연결된 레인 대화의 `/stop`, `/resume`
|
|
764
875
|
(Slack `!stop`, `!resume`)은 각각 일시정지·명시적 재개 제어다.
|
|
765
876
|
종전 재개는 runtime queue를 다시 여는 동작이었으며 이제는 명시적으로 허가된 재개에서만 기존
|
|
@@ -798,9 +909,11 @@ Discord와 Slack은 드롭다운, Telegram은 인라인 버튼으로 표시한
|
|
|
798
909
|
모델 변경 후 effort가 native 지원 범위에 맞춰 조정될 수 있으며 응답은 실제 readback 값을
|
|
799
910
|
표시한다. 사용 불가능한 모델이나 effort를 임의의 대체값으로 바꾸지 않는다.
|
|
800
911
|
native 상태에 명시적 effort가 없으면 모델 기본값으로 표시하며 `off`와 혼동하지 않는다.
|
|
801
|
-
|
|
912
|
+
현재 모델이 `auto`를 광고하면 메뉴에서 선택하거나 `/effort auto`를 입력할 수 있다.
|
|
913
|
+
자동 모드에서는 설정값 `auto`와 OMP가 실제 적용하는 강도가 다를 수 있다. `auto`를
|
|
914
|
+
광고하지 않는 구형 Host에는 선택지가 나타나지 않으며 고정 강도로 대신 적용하지 않는다.
|
|
802
915
|
|
|
803
|
-
|
|
916
|
+
`/head 헤드 모델을 6.2 Astra로 바꿔`처럼 명시적으로 요청해도 된다. 헤드가
|
|
804
917
|
가용 모델을 확인하고, 현재 턴이 성공적으로 끝난 뒤 공유 헤드에만 적용한다. 예약 응답은
|
|
805
918
|
적용 완료가 아니며, 런타임이 원래 메시지에 실제 결과를 회신한다. 원래 턴이 중단되거나
|
|
806
919
|
종료 뒤에도 헤드가 유휴 상태가 아니면 자동으로 재시도하지 않는다.
|
|
@@ -878,17 +991,26 @@ Discord·Telegram에서 `/cron`, Slack의 일반 메시지에서는 `!cron`을
|
|
|
878
991
|
| 명령 | 동작 |
|
|
879
992
|
| --- | --- |
|
|
880
993
|
| `/help` | 실제 지원 명령과 적용 대상 안내 |
|
|
994
|
+
| `/head 요청` | 공유 헤드에만 명시적으로 요청. 일반 메시지는 현재 주제의 세션에서 처리 |
|
|
881
995
|
| `/status` | 공유 헤드의 실행 상태, 현재 주제·연결 레인, 대기·미해결 입력과 승인 확인 |
|
|
882
996
|
| `/restart` | 바쁜 헤드를 체크포인트한 뒤 Gateway와 헤드 교체. 원래 대화 ACK·실제 안전한 종료 확인, 같은 세션/모델 복원, 안전한 goal 재개. 레인은 유지하며 불확실한 효과는 보류 |
|
|
883
997
|
| `/context` | 헤드 native 컨텍스트 사용량·한도 조회. 추정치·미상은 그대로 표시 |
|
|
884
998
|
| `/usage` | 설정한 프로필의 순정 `omp usage`에서 제공자별 계정 한도·사용량·리셋 시각 조회. 세션 토큰·비용 통계가 아님 |
|
|
885
999
|
| `/compact [보존할 내용]` | 유휴 헤드의 native 컨텍스트 압축. 여러 줄 보존 지시 전달 가능 |
|
|
886
|
-
| `/stop` | 연결된 레인이 있으면
|
|
1000
|
+
| `/stop` | 연결된 레인이 있으면 일시정지. 배정 대기 중이면 해당 주제만 취소하며 여러 주제가 대기하면 원래 질문에 답장해 선택. 둘 다 없으면 헤드 작업 중단 |
|
|
887
1001
|
| `/stop head` | 현재 주제와 무관하게 공유 헤드 작업 중단 |
|
|
888
1002
|
| `/stop <lane-id>` | 해당 instance에 등록되고 허가된 레인만 일시정지 |
|
|
889
1003
|
| `/resolve [input-id]` | 이미 `uncertain`이 된 헤드 입력 **하나**를 운영자가 취소로 확정해 뒤의 헤드 작업 차단을 해제. 원래 작업을 재실행하지 않으며 실제 수행·완료를 주장하지 않음 |
|
|
890
1004
|
| `/resolve --lane <input-id>` | 현재 대화에 연결된 레인의 정확한 `uncertain` 입력 **하나**를 운영자가 취소 처리. 재실행·일시정지 해제·Host 재기동은 하지 않음 |
|
|
891
1005
|
|
|
1006
|
+
주제 **배정** 자체가 불확실하면 원래 대화에 배정 ID가 표시된다. 실제 스레드와 전송 결과를
|
|
1007
|
+
확인한 뒤 그 대화에서 `/resolve <배정 ID>`로 보류를 종료할 수 있다. 배정·실행·전송은 반복하지 않는다.
|
|
1008
|
+
|
|
1009
|
+
Gateway는 헤드가 연속 **30분 이상 유휴**이고 native 컨텍스트 사용률이 **50% 이상**이라고 확인된 경우에만
|
|
1010
|
+
새 헤드 세션으로 교체를 시도한다. 승인·실행·전송 등 미해결 작업이 있거나 사용률이 불명이면
|
|
1011
|
+
교체하지 않는다. 레인 `idleMs`와는 별개다. `status`의 `head.rotation`에서 이전·새 세션 ID와
|
|
1012
|
+
교체 단계를 확인할 수 있다. `/restart`는 이 자동 교체와 달리 같은 헤드 세션을 복원한다.
|
|
1013
|
+
|
|
892
1014
|
`/usage`는 인수를 받지 않는다. 모델을 호출하지 않고, 설치된 OMP가 보고한 수치만 원래 대화에
|
|
893
1015
|
보낸다. 제공자별 남은 한도와 초기화 시각은 Superagent 호스트의 로컬 시간대를 자동으로 따른다.
|
|
894
1016
|
계정이 여러 개면 `계정 1`,
|
|
@@ -900,14 +1022,20 @@ CLI 조회 실패와 확인 가능한 한도가 없는 경우는 구분한다. S
|
|
|
900
1022
|
`/restart`는 인수가 없다. Slack의 선택기는 `/superagent-restart`, 일반 메시지는 `!restart`다.
|
|
901
1023
|
접수 응답이 실제 전송된 뒤 Gateway가 정상 종료와 일회성 successor 기동을 맡고,
|
|
902
1024
|
새 헤드가 동일 세션·실제 준비 상태를 확인한 결과를 원래 대화에 알린다. 접수 알림만 보고
|
|
903
|
-
재시작 완료로 간주하지 않는다. 바쁜
|
|
904
|
-
|
|
905
|
-
|
|
1025
|
+
재시작 완료로 간주하지 않는다. `/stop head`를 먼저 보낼 필요는 없다. 바쁜 헤드의 원래 승인 카드를
|
|
1026
|
+
취소하고, 대기 입력을 회수하고, 진행 중인 턴과 goal을 중단한다. 헤드 소유의 네이티브 백그라운드
|
|
1027
|
+
작업도 취소하고 실제 종료를 기다린다. 새 헤드는 같은 세션과 작업 디렉터리, 기존 Mnemopi 프로필을
|
|
1028
|
+
다시 연다. 같은 모델·effort를 대조하며 재시작 직전 활성 goal만 원래 대화에서 이어간다.
|
|
906
1029
|
이미 paused/cancelled인 작업, receipt 없는 제출과 불확실한 외부 효과는 재실행하지 않는다.
|
|
907
1030
|
no-progress로 유휴 상태가 된 활성 goal도 생성 당시의 원래 source/route를 유지한다. 그 소유권을
|
|
908
1031
|
확인할 수 없으면 서비스 교체는 진행하되 goal 자동 재개만 보류하며 restart 대화로 넘기지 않는다.
|
|
909
1032
|
독립 레인은 원래 Host와 승인 신원을 유지한다. 종료되지 않은 소유 작업/서비스나 소유권 불명은
|
|
910
|
-
원래 HEAD의 native 상태를 확인하라는 구체적 보류로 남으며 강제 종료하지 않는다.
|
|
1033
|
+
원래 HEAD의 native 상태를 확인하라는 구체적 보류로 남으며 강제 종료하지 않는다. 체크포인트까지
|
|
1034
|
+
저장됐고 아직 종료를 요청하지 않았다면, 남은 작업을 정리한 뒤 새 `/restart`로 다시 시도할 수 있다.
|
|
1035
|
+
이전 명령의 중복 수신이나 종료 결과가 불분명한 요청은 재시도하지 않는다.
|
|
1036
|
+
실행 후 `idleMs` 같은 운영 설정을 바꿨어도 `/restart`로 적용할 수 있다. 상태 디렉터리,
|
|
1037
|
+
헤드의 작업 디렉터리·OMP 실행 프로필, 메신저 접근 권한이 바뀌었거나 접수 후 파일을 다시
|
|
1038
|
+
수정했다면 교체를 보류한다. 채팅에 표시되는 Gateway의 거부 사유를 확인한다.
|
|
911
1039
|
handoff 전 `/stop head`와 명시적 CLI `stop main`은 재시작보다 우선하며 successor 부활을 금지한다.
|
|
912
1040
|
바쁜 native가 CLI 중지를 거부했어도 중지 요청 이전 restart의 권한은 되살아나지 않는다.
|
|
913
1041
|
Gateway 앞에 불확실한 승인 답변이 남아 있어도 재시작·중지 제어와 초기 승인 복원 barrier는
|
|
@@ -1029,7 +1157,9 @@ head의 native 승인 카드 복구를 먼저 마친 뒤 입력·콜백 처리
|
|
|
1029
1157
|
헤드가 대신 고른 원래 선택지를 레인으로 돌려보낸다. 선택 이유는 내부 이력에 남기고 별도
|
|
1030
1158
|
메신저 알림은 보내지 않는다. 중요한 범위·비용·권한·외부 약속이 걸리거나 사용자 판단이
|
|
1031
1159
|
필요하면 이관 이유를 원래 질문 카드에 함께 표시한다. 실제 실행 승인과 일반 native dialog는
|
|
1032
|
-
헤드가 대신 답하지 않는다.
|
|
1160
|
+
헤드가 대신 답하지 않는다. 아래의 `ask` 카드는 `decision_ask`가 쓰는 구조화된
|
|
1161
|
+
`askDialog`다. OMP 19.1 내장 `ask`의 HTML `form`은 Host가 메신저로 보내지 않고
|
|
1162
|
+
즉시 취소한다. 선택한 기본값도 제출하지 않는다.
|
|
1033
1163
|
|
|
1034
1164
|
| 플랫폼 | 승인·질문 UI와 실제 한계 |
|
|
1035
1165
|
| --- | --- |
|
|
@@ -1140,10 +1270,18 @@ bun --no-env-file src/cli.ts uninstall --config config.local.json
|
|
|
1140
1270
|
- Slack: 토큰 없는 `slack-file:<file_id>`에서 `files.info`로 소유자의 hosted 파일·workspace·
|
|
1141
1271
|
원래 대화/thread share를 확인한다. 해당 team/file의 `files.slack.com/files-pri/TEAM-FILE/…`
|
|
1142
1272
|
HTTPS 경로에만 bot Authorization 헤더로 접근한다. 외부 링크 파일은 받지 않는다.
|
|
1273
|
+
- 운영자가 만든 파일을 결과물로 받고 싶으면 새 일반 메시지의 요청 첫 줄에
|
|
1274
|
+
`attach: 보고서/결과.pdf`처럼
|
|
1275
|
+
정확한 작업 디렉터리 상대 경로를 적는다. 첫 줄에 `cwd:`를 지정한다면 그 다음 줄에 적는다.
|
|
1276
|
+
첨부는 한 요청당 파일 하나, 최대 8 MiB다. 숨김 경로·링크·런타임 및 자격 증명 경로는 거부한다.
|
|
1277
|
+
Discord·Telegram·Slack의 원래 작업 대화에만 발송되며, 작업 스레드가 없는 경우 원래 요청 대화가
|
|
1278
|
+
대상이다. 수정 메시지·앱 슬래시 상호작용·모델 답변으로는 첨부를 허가할 수 없다.
|
|
1279
|
+
제한 그룹에서도 사용할 수 없다.
|
|
1143
1280
|
- 긴 출력은 아래 단일 텍스트 첨부로 보낸다. 입력 한도와 다르다. Discord만 예외로, 2,000 UTF-16 단위를
|
|
1144
1281
|
넘는 답변을 문단·줄·공백 경계에서 최대 5개 메시지로 나눠 순서대로 보낸다. 코드 블록이 경계에
|
|
1145
1282
|
걸리면 앞 메시지에서 닫고 다음 메시지에서 같은 언어로 다시 연다. 원래 메시지에 대한 답장 표시는 첫
|
|
1146
|
-
메시지에만 붙고,
|
|
1283
|
+
메시지에만 붙고, 전송 영수증도 첫 메시지 ID를 쓴다. 모두 전송된 경우 이후 조각의 ID도 기록해
|
|
1284
|
+
어느 조각에 답장해도 원래 작업을 찾을 수 있다. 일부만 보낸 뒤 실패하면 다시 보내지 않고
|
|
1147
1285
|
불확실(uncertain)로 남긴다. Telegram·Slack 변경·발송 API의 SDK 자동 재시도는 끈다. 읽기/poll 재연결과 불확실한 외부
|
|
1148
1286
|
효과를 재실행하는 것은 다르다.
|
|
1149
1287
|
|
package/docs/design/execution.md
CHANGED
|
@@ -32,10 +32,11 @@ references](../../skills/head/SKILL.md) for operating policy.
|
|
|
32
32
|
| `thread_inspect`, `lane_thread_update` and the `decision_*` tools | Use the [messaging and authority contract](messaging.md) for scope, original thread/approval identities and readback. |
|
|
33
33
|
|
|
34
34
|
Send only the original task, relevant evidence, constraints and acceptance
|
|
35
|
-
criteria to a lane; never copy the full head transcript.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
criteria to a lane; never copy the full head transcript. A new topic starts
|
|
36
|
+
with the exact observed head model, not its conversation; subsequent work uses
|
|
37
|
+
the topic's own saved model and session. A topic lane replies in the operator's
|
|
38
|
+
language through the controller outbox. Explicit manager handoffs and their
|
|
39
|
+
internal reports use English. No lane gains messenger credentials. Distinguish dispatch acceptance, actual
|
|
39
40
|
execution, native settlement, verified acceptance criteria, and user delivery.
|
|
40
41
|
|
|
41
42
|
The [`lane_report` tool](../../src/lane-extension.ts) records evidence in the
|
|
@@ -79,7 +80,11 @@ exit; a shutdown ACK is not exit. Reload the same native session when authorized
|
|
|
79
80
|
The resident Rust owner speaks the stock JSONL/v2 protocol. Bun and the published SDK still
|
|
80
81
|
prepare and publish the native session under its exact profile. The owner invokes short-lived
|
|
81
82
|
SDK helpers for operations that depend on stock semantics, including fitting a withdrawn
|
|
82
|
-
queue and verifying journal persistence after exit.
|
|
83
|
+
queue and verifying journal persistence after exit. On the private v2 interrupt channel,
|
|
84
|
+
queue restoration uses the SDK's reassembled-frame byte limit: this is the value of
|
|
85
|
+
[`maxResponseBytes` in OMP 19.0](https://github.com/can1357/oh-my-pi/blob/v19.0.0/packages/coding-agent/src/modes/rpc/rpc-frame.ts#L341-L347)
|
|
86
|
+
and [`maxIntactFrameBytes` in 19.1](https://github.com/can1357/oh-my-pi/blob/v19.1.0/packages/coding-agent/src/modes/rpc/rpc-frame.ts#L341-L347).
|
|
87
|
+
An intact queue must not be reported as truncated. No second Bun runtime stays resident per Host.
|
|
83
88
|
Gateway supervision reads the exact session, process and socket identity from a fresh handshake
|
|
84
89
|
instead of fetching the same full state again on the new connection.
|
|
85
90
|
|
|
@@ -240,8 +245,16 @@ A production Gateway requires a valid active installation before adapter
|
|
|
240
245
|
activation. With that installation in place, startup does not wait for the remote.
|
|
241
246
|
Startup and periodic update checks run in ordinary code, not a model turn.
|
|
242
247
|
Every **new Host** resolves the active revision; a running Host or reconnect
|
|
243
|
-
keeps its existing immutable package.
|
|
244
|
-
|
|
248
|
+
keeps its existing immutable package. Before the owner exposes its socket, the
|
|
249
|
+
root session checks every manifest entry against the active extensions in its own
|
|
250
|
+
OMP `extensionRunner`, after deferred binding if necessary. The owner requires
|
|
251
|
+
the resulting canonical package path to match its immutable launch selection.
|
|
252
|
+
An import or factory failure, a disabled module, or an unavailable runner cannot
|
|
253
|
+
produce a ready Host. Reattaching a managed session requires its startup receipt,
|
|
254
|
+
not a match against a newer active pointer; an unverified older Host can still
|
|
255
|
+
be inspected and stopped. Gateway status distinguishes `head.loadedSuperkitPath`
|
|
256
|
+
(the attached head's startup receipt) from `ulw.packagePath` (next launch).
|
|
257
|
+
This is not a continuous check of workflow mode or prompt execution. Managed discovery preserves
|
|
245
258
|
unrelated native resources and avoids loading a duplicate ULW instance. Refuse
|
|
246
259
|
configurations the stock CLI cannot express without silently changing scope,
|
|
247
260
|
discarding custom commands or enabling disabled extensions.
|
package/docs/design/messaging.md
CHANGED
|
@@ -23,6 +23,51 @@ topic is a binding key, not a fabricated conversation or thread ID.
|
|
|
23
23
|
| [Telegram](../../gateway/src/telegram.rs) | Bot API `getMe` identifies the bot. Use the configured real owner and allowed chats; anonymous, forwarded, bot-mediated and business identities do not confer authority. Long poll only after startup approval reconciliation; refuse an active webhook without removing it. |
|
|
24
24
|
| [Slack](../../gateway/src/slack.rs) | Socket Mode and the Web API, with bot/workspace and active human owner checks and actual channel membership. No group DMs or public HTTP endpoint. Known-route history is limited by cursors, scopes, membership, retention and rate limits. |
|
|
25
25
|
|
|
26
|
+
## Restricted group rooms
|
|
27
|
+
|
|
28
|
+
`groupRooms` opts a specific server/workspace/chat and parent channel into a
|
|
29
|
+
different scope. Its existing platform allowlist and an explicit, nonempty
|
|
30
|
+
allowlist of stable human user IDs must both match. Child threads and forum
|
|
31
|
+
topics inherit the parent policy. The owner is not privileged in that room;
|
|
32
|
+
the owner DM and other owner-authorized routes remain unchanged. A platform
|
|
33
|
+
administrator, moderator, mention, quoted sender, forwarded message, bot, or
|
|
34
|
+
webhook is not an operator grant. There are no wildcard or open group grants.
|
|
35
|
+
|
|
36
|
+
| Room mode | Explicit input | Authority and output |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `request` | `!request TEXT` | Save the original request in the local operator inbox and post only a receipt. No inference, approval, assignment, or execution. |
|
|
39
|
+
| `chat` | `!ask TEXT` | One fresh tool-free OMP turn with the dedicated group model; only its bounded text answer can return to the original scope. No owner context, transcript, resources, or attachments. |
|
|
40
|
+
| `work` | `!work TEXT` | One bounded stock OMP run in a new detached Git worktree for the configured repository, with only scoped file operations. No shell, Git mutation, external tools, approvals, or access to owner sessions. The room gets fixed status text, not the model's answer, file paths, diffs, or artifacts. The operator inspects the local worktree. |
|
|
41
|
+
|
|
42
|
+
Telegram also accepts a real bot-command entity `/request@BotUsername`,
|
|
43
|
+
`/ask@BotUsername` or `/work@BotUsername` addressed to the authenticated bot.
|
|
44
|
+
No unrestricted conversation, owner slash controls, card actions, edited
|
|
45
|
+
messages, or owner history backfill. Only original messages within the live
|
|
46
|
+
five-minute admission window can become new group work; after durable admission,
|
|
47
|
+
local recovery uses the original request rather than platform history.
|
|
48
|
+
|
|
49
|
+
A separate ingress event records the authenticated user as well as the immutable
|
|
50
|
+
physical route, original message ID and normalized policy revision. It cannot
|
|
51
|
+
be delivered to owner intake. The room and sender are checked again before
|
|
52
|
+
execution and sending. Only the matching registered controller may request a
|
|
53
|
+
group reply; the Gateway takes its destination from the original durable group
|
|
54
|
+
event. Per-room daily admission caps and one active restricted runner bound
|
|
55
|
+
work. A work request must receive a confirmed kickoff before the runner starts.
|
|
56
|
+
Persist the execution claim and response attempt before starting them;
|
|
57
|
+
an interrupted runner or ambiguous send is never replayed. `omp-sa group`
|
|
58
|
+
reads this local record without a model turn. This is an application-level
|
|
59
|
+
boundary: a worktree is not an OS sandbox, and approved repository data may
|
|
60
|
+
be sent to the configured group model. Do not authorize a private repository
|
|
61
|
+
or provider that should not see this data.
|
|
62
|
+
|
|
63
|
+
Stock OMP can expand inline file references even with no tools enabled. The
|
|
64
|
+
[restricted runner](../../src/group-runner.ts) therefore sends group input as
|
|
65
|
+
JSON-quoted data with file-reference characters escaped. A fresh private
|
|
66
|
+
profile and scratch cwd exclude owner settings and session context; worktree
|
|
67
|
+
access goes only through the dedicated file tools. Process exit alone is not
|
|
68
|
+
a successful group turn: the runner also requires a matching terminal native
|
|
69
|
+
result.
|
|
70
|
+
|
|
26
71
|
## Durable admission and recovery
|
|
27
72
|
|
|
28
73
|
```mermaid
|
|
@@ -90,11 +135,65 @@ See the [operations guide](../OPERATIONS.md#4-명령과-일상-사용) for comma
|
|
|
90
135
|
|
|
91
136
|
## Topic routing and controls
|
|
92
137
|
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
138
|
+
- The head **controller** receives ordinary input; its **model** does not. Each
|
|
139
|
+
authenticated original records its intended topic owner at admission. The
|
|
140
|
+
controller creates a source-bound handoff to that session. A new topic may reuse a
|
|
141
|
+
workspace, never another topic's transcript. The controller matches repository or
|
|
142
|
+
directory names in owner text against placed lanes of the same authenticated channel
|
|
143
|
+
or DM. A reply to a placed original or a sent message on its physical route supplies
|
|
144
|
+
that task's workspace; the quote body is not evidence. `/new` in a bound thread can
|
|
145
|
+
reuse that thread's workspace. An explicit `cwd: /absolute/path` takes precedence.
|
|
146
|
+
With no unique existing directory, ask on the original route; a known name or absolute
|
|
147
|
+
path selects just one pending original. Neither an edited confirmation nor a stale
|
|
148
|
+
answer to the workspace question becomes another task. A Slack reply uses the sent question's root timestamp.
|
|
149
|
+
A retrospective request with a task description can search previous managed native
|
|
150
|
+
sessions across the configured owner's currently allowed channels. Search the
|
|
151
|
+
operator's text, not reply bodies or attachments. Restricted group rooms, HEAD,
|
|
152
|
+
other bot accounts and unrelated local OMP sessions are not candidates. Natural
|
|
153
|
+
language dates refer to the original request timestamp, using UTC calendar boundaries.
|
|
154
|
+
The controller first calls the live head extension's public `ctx.memory.search`:
|
|
155
|
+
with Mnemopi this runs the same scoped lookup (`recallResultsScoped`) as OMP's
|
|
156
|
+
`recall` tool. The head does not run a model turn or save a memory. A memory
|
|
157
|
+
hit is a search hint, never a routing decision. Combine corroborated memory
|
|
158
|
+
hits with direct matches on active branches of eligible journals. A successful
|
|
159
|
+
empty recall still permits a direct match; an unavailable lookup does not.
|
|
160
|
+
Neither the outbox nor the destination prompt receives raw memory results.
|
|
161
|
+
If the journal read budget would leave the search incomplete, ask rather than
|
|
162
|
+
select a partial winner. Do not default to the latest lane.
|
|
163
|
+
Freeze matched lane/session/workspace identities at admission. Multiple plausible
|
|
164
|
+
tasks require a source-scoped choice, even in the same workspace or journal. Cross-channel
|
|
165
|
+
continuation starts a destination-owned session, not another writer on the old
|
|
166
|
+
journal. Recheck the prior identity, work state, entry and pinned evidence
|
|
167
|
+
digest before native submission, without searching mutable memory again;
|
|
168
|
+
historical text cannot start workflows or approve effects.
|
|
169
|
+
Outside a bound Discord work thread, a new request with a different explicit
|
|
170
|
+
workspace can start a separate topic. `/new` with a request in a thread starts
|
|
171
|
+
a separate topic instead of changing a lane's cwd. A closed lane or an
|
|
172
|
+
uncertain receipt is not reopened by ordinary input.
|
|
173
|
+
- In an already-bound physical Discord work thread, work and replies stay in the
|
|
174
|
+
current thread. A historical match contributes only verified, pinned evidence
|
|
175
|
+
to the current lane, not a handoff to a different session or workspace. Ask
|
|
176
|
+
about ambiguous matches in that same thread and honor a timely choice. For
|
|
177
|
+
this history-choice question only, after five minutes from confirmed delivery
|
|
178
|
+
the controller continues in that thread: prefer a verified eligible candidate
|
|
179
|
+
from the current session, then a verified candidate in the same cwd by recency.
|
|
180
|
+
If none remains eligible, continue with the current lane context. This timeout
|
|
181
|
+
does not approve effects or authorize cross-workspace execution.
|
|
182
|
+
- A different `cwd:` in a bound Discord work thread does not change its lane or
|
|
183
|
+
open a sibling automatically. To separate work, send `/new <request>` or a
|
|
184
|
+
direct, one-line split request, e.g. `이건 따로 빼줘: 로그인 점검`,
|
|
185
|
+
`로그인 점검은 새 스레드에서 해줘`, `Split this into a new thread: Check login`,
|
|
186
|
+
or `Do the login check in a new thread`. If the operator sends only
|
|
187
|
+
`이건 따로 빼줘` or `Split this into a new thread`, the controller asks them to
|
|
188
|
+
name the task with `/new` instead of creating a topic. Natural split
|
|
189
|
+
directives apply only to original owner messages in physical Discord work
|
|
190
|
+
threads, not edits, quoted text or attachments. DM and other adapters retain
|
|
191
|
+
their existing topic behavior.
|
|
192
|
+
- `/head <request>` explicitly addresses the shared coordination model (Slack:
|
|
193
|
+
`!head` or `/superagent-head`). Its manager handoffs keep the original review
|
|
194
|
+
path. Ordinary topic commentary and final answers instead pass through the
|
|
195
|
+
controller's source-bound outbox without a synthesis turn. Approval cards
|
|
196
|
+
also stay with their original native session and authorized route.
|
|
98
197
|
- Thread-first work sends a short kickoff to the selected topic. The durable
|
|
99
198
|
`sent` receipt gates new lane dispatch and steering for that input. A missing
|
|
100
199
|
or uncertain delivery is not a successful kickoff.
|
|
@@ -157,8 +256,9 @@ profile with `usage --json --redact --no-extensions` and projects provider quota
|
|
|
157
256
|
and reset data, without sending account identifiers or raw responses. Unknown
|
|
158
257
|
quota is not zero or an estimate of this session's usage. `/compact` uses native
|
|
159
258
|
compaction and requires an idle eligible head; status and priority stop remain
|
|
160
|
-
available while it runs. `/stop` pauses the bound lane
|
|
161
|
-
|
|
259
|
+
available while it runs. `/stop` pauses the bound lane. In an unbound topic it
|
|
260
|
+
cancels work awaiting workspace clarification, or stops head work when there
|
|
261
|
+
is no such request. Use `/stop head` or a lane ID to name a target. Once admitted to the
|
|
162
262
|
head, priority controls and approval answers do not wait for an ordinary model
|
|
163
263
|
turn to finish. [Restart](../../DESIGN.md#explicit-restart)
|
|
164
264
|
is distinct from stopping a task or resuming a topic. `/cron` controls
|
|
@@ -185,11 +285,16 @@ free-form drafts in native modals without echoing their contents on the channel
|
|
|
185
285
|
card. Unsupported or secret input is not approximated or auto-approved: cancel
|
|
186
286
|
the native request and direct the operator to the appropriate local UI.
|
|
187
287
|
|
|
188
|
-
|
|
288
|
+
OMP 19.1 sends a built-in `ask` as one HTML `form`. The stdio owner cancels
|
|
289
|
+
that exact request because the messenger adapters do not render arbitrary HTML;
|
|
290
|
+
it does not forward the HTML, submit defaults or wait for a connected head.
|
|
291
|
+
[`decision_ask`](../../src/decision-tool.ts) uses the separate native `askDialog`; it is not a
|
|
189
292
|
parallel approval engine. [Decision records](../../src/decisions.ts) link the
|
|
190
293
|
native tool call, original source and original question/card. `answering` is an
|
|
191
|
-
attempt, not the `answered` state confirmed by native settlement. A
|
|
192
|
-
|
|
294
|
+
attempt, not the `answered` state confirmed by native settlement. A topic-owned
|
|
295
|
+
question goes to the authorized topic directly; it does not wake the coordination
|
|
296
|
+
model. An unowned native dialog after reconnect is held if its original topic
|
|
297
|
+
cannot be verified. A manager-delegated lane's question goes to head review first. For a routine reversible
|
|
193
298
|
choice within the assignment, the head returns an original option to the lane
|
|
194
299
|
and records the reason internally, without a separate messenger message. When
|
|
195
300
|
the owner must decide, the original card shows why their decision is needed
|
|
@@ -215,11 +320,26 @@ approval.
|
|
|
215
320
|
follow redirects on private file downloads. Enforce byte limits end to end;
|
|
216
321
|
an unknown size is not zero and a known size must match the bytes received.
|
|
217
322
|
The adapters preserve audio metadata; they do not transcribe attachments.
|
|
323
|
+
- An owner can authorize one specific result file with a standalone leading
|
|
324
|
+
`attach: workspace/relative-file.ext` line. `result_attach` stages the exact
|
|
325
|
+
allowed regular file from that source's working directory; arbitrary model
|
|
326
|
+
prose cannot attach it. A lane calls this tool directly, including in code
|
|
327
|
+
mode: the head matches the live native execution start and result before it
|
|
328
|
+
queues the file. An Eval result or a replayed journal entry is not a delivery
|
|
329
|
+
request. Files must be nonempty and at most 8 MiB; symlinks,
|
|
330
|
+
hard links, dot paths and managed private state are excluded. Delivery uses
|
|
331
|
+
the original authorized topic and stable outbox identity, with no destination
|
|
332
|
+
override and no replay of uncertain sends. Restricted group rooms cannot
|
|
333
|
+
use this feature. The private controller outbox stores the bounded immutable
|
|
334
|
+
bytes; the Gateway attempt ledger stores their fingerprint and the receipt,
|
|
335
|
+
not a second copy of the file.
|
|
218
336
|
- Long outputs use a single bounded text attachment where supported. Discord
|
|
219
337
|
first splits an over-limit reply at paragraph, line, then space boundaries
|
|
220
338
|
into at most five ordered messages, closing and reopening a code fence that
|
|
221
339
|
crosses a boundary; only the first replies to the original message, each part
|
|
222
|
-
has its own nonce, and the first message ID is the receipt.
|
|
340
|
+
has its own nonce, and the first message ID is the delivery receipt. For newly
|
|
341
|
+
completed multipart sends the Gateway also records later message IDs for scoped
|
|
342
|
+
reply lookup; partial or uncertain sends are not workspace evidence. The Gateway has
|
|
223
343
|
25 seconds for the whole Discord output, including destination lookup,
|
|
224
344
|
leaving time to return the result before the head's 30-second IPC timeout.
|
|
225
345
|
No new parts are posted after that deadline. An in-flight POST at expiry or
|