omp-superagent 0.1.11 → 0.1.15
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 +21 -5
- package/README.ko.md +3 -1
- package/README.md +3 -1
- package/THIRD_PARTY_NOTICES.md +6 -0
- package/assets/architecture-dark.svg +4 -4
- package/assets/architecture.ko-dark.svg +4 -4
- package/assets/architecture.ko.svg +4 -4
- package/assets/architecture.mmd +5 -5
- package/assets/architecture.svg +4 -4
- package/config.example.json +1 -0
- package/docs/OPERATIONS.en.md +242 -31
- package/docs/OPERATIONS.md +225 -25
- package/docs/design/execution.md +161 -43
- package/docs/design/messaging.md +45 -9
- package/docs/releases/0.1.11.md +4 -2
- package/docs/releases/0.1.13.md +13 -0
- package/docs/releases/0.1.15.md +13 -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 +9 -3
- package/scripts/prepare-worker-memory.ts +37 -0
- package/scripts/upgrade-evidence-files.mjs +100 -0
- package/scripts/upgrade-evidence.mjs +192 -0
- package/scripts/upgrade-host-wire.mjs +162 -0
- package/skills/head/SKILL.md +22 -47
- package/skills/head/references/routing.md +11 -12
- package/skills/head/references/supervision.md +10 -14
- package/skills/lane/SKILL.md +14 -16
- package/skills/lane/references/workflow.md +14 -27
- package/src/cli.ts +59 -79
- package/src/config/config.ts +4 -0
- package/src/contracts.ts +34 -27
- package/src/cron/cron-jobs.ts +4 -3
- package/src/cron/cron-pr-intake.ts +1 -2
- package/src/extension.ts +57 -14
- package/src/gateway/gateway-client.ts +14 -12
- package/src/group/group-runner.ts +3 -2
- package/src/group-runner-extension.ts +7 -3
- package/src/host-extension.ts +109 -2
- package/src/host-sdk-helper.ts +12 -3
- package/src/lane/decision-tool.ts +2 -3
- package/src/lane/lane-report.ts +8 -30
- package/src/lane/lane-rows.ts +1 -1
- package/src/lane/workflow.ts +44 -3
- package/src/lane-extension.ts +5 -46
- package/src/messaging/discord-context.ts +8 -6
- package/src/omp/host-protocol.ts +4 -3
- package/src/omp/host.ts +24 -7
- package/src/omp/managed-super.ts +43 -27
- package/src/omp/native-sessions.ts +12 -0
- package/src/omp/worker-memory-import.ts +410 -0
- package/src/omp/worker-memory-sdk.ts +8 -0
- package/src/operator/setup.ts +8 -13
- package/src/operator/stop-lane.ts +25 -0
- package/src/pr/pr-github-schema.ts +9 -0
- package/src/pr/pr-github.ts +6 -2
- package/src/pr/pr-intake-automation.ts +11 -8
- package/src/pr/pr-intake-fix.ts +2 -5
- package/src/pr/pr-intake-review.ts +7 -7
- package/src/routing/topic-history.ts +2 -2
- package/src/runtime/controller.ts +444 -408
- package/src/runtime/head-recovery.ts +7 -7
- package/src/runtime/worker-memory.ts +156 -0
- package/src/storage/deferred-routing.ts +1 -7
- package/src/storage/store.ts +441 -375
- package/src/worker/worker-host.ts +3 -2
- package/src/worker/worker-ledger.ts +20 -11
- package/src/worker/worker-memory-page.ts +83 -0
- package/src/worker/worker-memory-proofs.ts +260 -0
- package/src/worker/worker-memory-source.ts +305 -0
- package/src/worker/worker-memory-storage.ts +130 -0
- package/src/worker/worker-profile.ts +2 -0
- package/src/worker/worker-repository.ts +92 -7
- package/src/worker/worker-request.ts +1 -0
- package/src/worker/worker-service.ts +25 -8
- package/src/worker/worker-wire.ts +20 -6
package/docs/OPERATIONS.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[프로젝트 소개로 돌아가기](../README.ko.md) · [English](OPERATIONS.en.md) · [설계](../DESIGN.md) ·
|
|
4
4
|
[설정 예제](../config.example.json) · [출처·라이선스 고지](../THIRD_PARTY_NOTICES.md)
|
|
5
5
|
|
|
6
|
-
[설치](#1-로컬-준비--봇은-시작하지-않음) · [플랫폼별 앱](#2-플랫폼별-앱과-접근-범위) · [설정](#3-설정) · [일상 사용](#4-명령과-일상-사용) · [복구](#5-운영-범위와-복구-제약) · [개발자 검증](#6-개발자-검증)
|
|
6
|
+
[설치](#1-로컬-준비--봇은-시작하지-않음) · [업데이트](#기존-설치-업데이트) · [플랫폼별 앱](#2-플랫폼별-앱과-접근-범위) · [설정](#3-설정) · [일상 사용](#4-명령과-일상-사용) · [복구](#5-운영-범위와-복구-제약) · [개발자 검증](#6-개발자-검증)
|
|
7
7
|
|
|
8
8
|
이 문서는 설치·설정·일상 제어와 복구 절차를 다룬다. 파일·코드 경로와 셸 명령은 별도
|
|
9
9
|
설명이 없으면 **저장소 루트 기준**이다. npm 설치에서는 같은 관리 명령을
|
|
@@ -157,16 +157,18 @@ SUPER 스킬 조회·추가 레인·goal·모델 변경·workflow artifact가
|
|
|
157
157
|
대상으로 헤드 검토 한 건이 즉시 영속 큐에 들어가지만 바로 답변이 오는 것은 아니다.
|
|
158
158
|
헤드는 원래 선택지 중 하나로 답하거나 같은 카드를 원래 경로의 운영자에게 넘긴다.
|
|
159
159
|
`to`를 생략하면 연결 주제의 질문은 운영자에게, 헤드가 위임한 작업의 질문은 헤드에게 간다.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
160
|
+
- **레인의 작업 변경:** 해당 레인에 연결된 주제에서 새 지시를 직접 보낸다. 인증된 운영자가
|
|
161
|
+
명시적으로 지시한 내용은 선택된 작업공간 안에서 기존 헤드 지시와 충돌하는 작업 범위나
|
|
162
|
+
완료 기준을 바꿀 수 있다. 레인이 새 턴이나 steer로 입력을 읽을 때 적용하며, 별도의 헤드
|
|
163
|
+
승인이나 재위임은 없다. 예를 들어 “이 저장소의 API 문서도 수정하고 예제까지 검증해 줘”는
|
|
164
|
+
작업을 변경하는 지시다. 같은 문장을 인용하거나 전달하는 것만으로는 지시가 되지 않는다.
|
|
165
|
+
체크아웃 변경, 다른 레인의 작업 인수, 일시정지 해제, native 승인, 거부되었거나 결과가
|
|
166
|
+
불확실한 작업의 재시도는 허용하지 않는다.
|
|
167
|
+
재연결로 같은 주제의 예전 지시가 최신 메시지보다 늦게 복구된 경우, 여전히 필요한 작업은
|
|
168
|
+
새 메시지로 지시한다. 봇 계정이 바뀌면 이전 계정의 대기 요청은 새 계정으로 실행하지 않는다.
|
|
167
169
|
|
|
168
170
|
[직접 조율](design/execution.md#direct-lane-coordination) 및
|
|
169
|
-
[
|
|
171
|
+
[운영자의 직접 작업 변경 규칙](design/execution.md#direct-owner-changes-to-bound-topic-work)을 참고한다.
|
|
170
172
|
|
|
171
173
|
### 새 레인의 모델 선택
|
|
172
174
|
|
|
@@ -209,24 +211,189 @@ SUPER 스킬 조회·추가 레인·goal·모델 변경·workflow artifact가
|
|
|
209
211
|
데몬은 이전 브로커의 서비스를 인수하지 않는다. 새 데몬의 목록이 비어 있어도 이전 세션에서
|
|
210
212
|
완료를 확인하지 못한 작업의 종료·회수를 승인하는 증거는 아니다.
|
|
211
213
|
|
|
212
|
-
**Bun 저널 검증기를 사용하던 설치를 덮어쓸 때:** 기존 설치를 유지한 상태에서 작업 정산을
|
|
213
|
-
기다리고, 상주 레인 Host(원격 워커 포함)와 Gateway/HEAD를 정상 종료한다. 종료 영수증과
|
|
214
|
-
소유 프로세스의 실제 종료를 확인한 뒤 파일을 교체한다. `stop main`만으로는 독립 레인이
|
|
215
|
-
종료되지 않는다. 이전 소유자는 종료 시까지 원래 helper 파일이 필요하고, 새 소유자는 Rust로
|
|
216
|
-
저널을 검증한다. 상태 DB와 세션 파일은 그대로 보존한다.
|
|
217
|
-
|
|
218
214
|
기본 `command: ["omp"]`는 PATH에서 찾는다. 다른 설치를 쓰려면 `command`의 첫 항목에
|
|
219
215
|
그 OMP 경로를 넣는다. 상대 경로는 설정 파일의 디렉터리 기준이며 모든 레인이 같은 경로를
|
|
220
216
|
사용한다. 이 저장소는 OMP를 다운로드하거나 소스에서 빌드하지 않는다.
|
|
221
217
|
|
|
218
|
+
### 기존 설치 업데이트
|
|
219
|
+
|
|
220
|
+
**해당 프로세스가 기존 파일을 사용하는 동안에는 덮어쓰지 않는다.** 점검 시간을 잡고 새 작업을
|
|
221
|
+
넣지 않는다. 다른 시작·재시작이나 로그인 자동 실행이 겹치지 않게 하고, 실행 중인 작업·승인·goal·
|
|
222
|
+
전달·소유 서비스가 정리될 때까지 기다린다. 현재 선택한 설정만 보지 말고, 교체할 설치본을 쓰는
|
|
223
|
+
모든 인스턴스와 등록된 워커 계정을 파악한다. `omp-sa status --config FILE`의 `lanes[]`와
|
|
224
|
+
`workers[]`는 저장된 기록이지 현재 소유권이나 종료 증거가 아니다. 머신별로
|
|
225
|
+
`ps -axo pid=,ppid=,uid=,comm=` 등으로 실행 중인 프로세스를 대조하고, 필요하면
|
|
226
|
+
`lsof -nP -a -p PID -d txt`로 Gateway 또는 소유 프로세스의 실행 파일 위치를 확인한다.
|
|
227
|
+
프로세스의 환경 변수나 자격 증명 파일을 출력하지 않는다. 해당 프로세스·머신·설치본을 빠짐없이
|
|
228
|
+
확인할 수 없다면 그 설치본을 교체하지 않는다.
|
|
229
|
+
|
|
230
|
+
#### 중지 전 증거 수집
|
|
231
|
+
|
|
232
|
+
이 가이드와 같은 리비전의 [`upgrade-evidence.mjs`](../scripts/upgrade-evidence.mjs),
|
|
233
|
+
[`upgrade-host-wire.mjs`](../scripts/upgrade-host-wire.mjs),
|
|
234
|
+
[`upgrade-evidence-files.mjs`](../scripts/upgrade-evidence-files.mjs)를 각 대상 머신의 **교체하지 않을
|
|
235
|
+
디렉터리에 나란히** 둔다. Bun과 기존 0.1.10 이상의 비공개 Gateway·Host 프로토콜을 사용하며
|
|
236
|
+
패키지 설치는 필요 없다. `capture`, `recheck`, `verify`는 읽기 전용이다. `stop-local`만
|
|
237
|
+
검증된 로컬 레인 하나에 종료를 요청한다. 수집 파일은 비공개로 보관한다.
|
|
238
|
+
|
|
239
|
+
Gateway 머신에서 **기존 설치본**의 CLI와 계정을 사용한다. 각 인스턴스의 실제 절대 경로를
|
|
240
|
+
지정하고 상태를 저장한다.
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
OLD_OMP_SA=/path/to/old/omp-sa
|
|
244
|
+
CONFIG=/path/to/config.local.json
|
|
245
|
+
PROBE=/path/outside/installation/upgrade-evidence.mjs
|
|
246
|
+
umask 077
|
|
247
|
+
EVIDENCE_DIR=$(mktemp -d /tmp/omp-sa-upgrade.XXXXXX) &&
|
|
248
|
+
"$OLD_OMP_SA" status --config "$CONFIG" > "$EVIDENCE_DIR/status-before.json"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
소스 설치라면 기존 CLI 명령의 `"$OLD_OMP_SA"` 대신
|
|
252
|
+
`bun --no-env-file /path/to/old/src/cli.ts`를 사용한다. 저장한 상태의 `main.socketPath`와
|
|
253
|
+
같은 디렉터리에 있는 `gateway.sock`이 Gateway 소켓이다. 실행 중인 각 Gateway를 HEAD와 함께
|
|
254
|
+
기록한다.
|
|
255
|
+
|
|
256
|
+
```sh
|
|
257
|
+
GATEWAY_SOCKET=/absolute/state/run/gateway.sock
|
|
258
|
+
bun --no-env-file "$PROBE" capture gateway "$GATEWAY_SOCKET" > "$EVIDENCE_DIR/gateway.json"
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
- 상주 HEAD는 실제 OMP PID와 세션 ID가 `gateway.head.pid`,
|
|
262
|
+
`gateway.head.initialization.sessionId`와 일치해야 한다. HEAD가 **절전 중**이면
|
|
263
|
+
`gateway.head.hibernation.sessionId`를 기록하며, 중지할 상주 Host는 없다. 살아 있는
|
|
264
|
+
Gateway가 보고한 `sleeping` 상태는 소켓 부재, `gateway: null`, 조회 실패와 다르다.
|
|
265
|
+
증거를 얻으려고 절전 중인 HEAD를 깨우지 않는다.
|
|
266
|
+
- 의도적으로 이미 중지됐음이 확인된 인스턴스나 레인에는 `stop`도 `start`도 실행하지 않는다.
|
|
267
|
+
이전 정상 종료 증거와 머신의 프로세스 목록을 대조한다. 소켓 부재·저장된 상태·다른 종료
|
|
268
|
+
영수증으로는 충분하지 않다. 소유자가 보이지 않거나 확인되지 않거나, HEAD 복귀·교체가 진행
|
|
269
|
+
중이거나, 수집에 실패하면 소유 상태를 먼저 확인한다. 중지된 것으로 간주하거나 강제로
|
|
270
|
+
시작하지 않는다.
|
|
271
|
+
|
|
272
|
+
교체할 설치본을 쓰는 각 상주 레인은 해당 `lanes[]` 항목의 `id`, `socketPath`, `sessionId`를
|
|
273
|
+
확인하고 `placement.target`을 확인한다. 소켓이 있는 실제 머신에서 현재 소유권을 기록한다.
|
|
274
|
+
|
|
275
|
+
```sh
|
|
276
|
+
LANE_ID=lane-example
|
|
277
|
+
LANE_SOCKET=/absolute/state/run/lane-example.sock
|
|
278
|
+
LANE_SESSION=SESSION_ID_FROM_STATUS
|
|
279
|
+
bun --no-env-file "$PROBE" capture host "$LANE_SOCKET" "$LANE_SESSION" > "$EVIDENCE_DIR/$LANE_ID.json"
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
`placement.target: "remote"`라면 `placement.workerId`를 `workers[].workerId`와 대조한다.
|
|
283
|
+
그 등록 머신에 **등록된 OS 계정**으로 별도 승인된 관리 접속을 사용한다. 해당 머신에서 같은
|
|
284
|
+
방법으로 `PROBE`를 지정하고 비공개 `EVIDENCE_DIR`를 만든다. 기록된 원격 소켓 경로를 쓰고,
|
|
285
|
+
`--worker`를 추가해 워커 실행 시도 ID까지 기록한다.
|
|
286
|
+
|
|
222
287
|
```sh
|
|
223
|
-
bun
|
|
288
|
+
bun --no-env-file "$PROBE" capture host "$LANE_SOCKET" "$LANE_SESSION" --worker > "$EVIDENCE_DIR/$LANE_ID.json"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
등록된 SSH 키의 강제 명령은 셸이 아니다. 제한을 풀거나 소켓을 터널링하거나 HEAD 머신의
|
|
292
|
+
동일한 이름의 경로를 쓰지 않는다. 대상 워커에 승인된 접속 수단이 없거나, 해당 설치본에
|
|
293
|
+
의존하는 모든 Host를 각 관리 HEAD와 대조할 수 없거나, 소유 상태를 확인할 수 없다면 해당
|
|
294
|
+
설치본을 그대로 둔다. HEAD 쪽만 업데이트할 때는 바꾸지 않는 설치본의 파일을 교체하거나 그
|
|
295
|
+
레인을 중지할 필요가 없다.
|
|
296
|
+
|
|
297
|
+
#### 중지·검증·교체
|
|
298
|
+
|
|
299
|
+
**로컬 레인**은 관리 인스턴스에서 비공개로 저장한 상태 파일과 해당 Host의 수집 파일을 함께
|
|
300
|
+
사용한다. `stop-local`은 레인에 기록된 소켓이 해당 인스턴스의 `main.socketPath`와 레인 ID로
|
|
301
|
+
계산한 소켓인지 확인한다. 실제 소유자와 세션이 수집 시점과 일치할 때만 **확인한 바로 그 연결**로
|
|
302
|
+
종료를 한 번 요청한다. 경로만 보고 다시 접속하는 구버전 CLI의 `stop LANE_ID`로 대체하지 않는다.
|
|
303
|
+
거부되거나 응답을 잃었을 때 종료 요청을 반복하지 않는다.
|
|
304
|
+
|
|
305
|
+
```sh
|
|
306
|
+
bun --no-env-file "$PROBE" stop-local "$EVIDENCE_DIR/$LANE_ID.json" "$EVIDENCE_DIR/status-before.json" "$LANE_ID" &&
|
|
307
|
+
bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/$LANE_ID.json"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
원격 레인은 워커에서 먼저
|
|
311
|
+
`bun --no-env-file "$PROBE" recheck "$EVIDENCE_DIR/$LANE_ID.json"`을 실행한다.
|
|
312
|
+
성공한 경우에만 관리 HEAD 머신에서 `"$OLD_OMP_SA" stop "$LANE_ID" --config "$CONFIG"`를
|
|
313
|
+
실행한다. 수락되면 워커에서 `bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/$LANE_ID.json"`을
|
|
314
|
+
실행한다.
|
|
315
|
+
|
|
316
|
+
대상 레인을 정리한 뒤, 원래 실행 중이던 각 Gateway를 기존 CLI와 수집 파일로 중지·검증한다.
|
|
317
|
+
`stop main`은 독립 레인을 중지하지 않는다.
|
|
318
|
+
|
|
319
|
+
```sh
|
|
320
|
+
bun --no-env-file "$PROBE" recheck "$EVIDENCE_DIR/gateway.json" &&
|
|
321
|
+
"$OLD_OMP_SA" stop main --config "$CONFIG" &&
|
|
322
|
+
bun --no-env-file "$PROBE" verify "$EVIDENCE_DIR/gateway.json"
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
처음 수집한 뒤 HEAD가 절전에 들어가면 상주 상태의 `recheck`는 실패한다. 동일 세션의
|
|
326
|
+
`sleeping` 상태가 확인된 뒤에만 Gateway를 다시 수집하고, 그 수집 파일로 중지 절차를 이어간다.
|
|
327
|
+
|
|
328
|
+
수집할 때 Gateway PID와 각 상주 Host의 OMP PID, 어댑터 소유 PID, 세션 ID, 저널 경로를
|
|
329
|
+
실제 소켓의 장치 번호와 inode에 연결한다. 재확인·종료 검증 때 저널의 장치 번호와 inode도
|
|
330
|
+
같아야 한다. 일반 로컬 저널은 같은 계정 소유의 일반 파일을 가리키는 소유 링크여도 되지만,
|
|
331
|
+
워커 저널은 심볼릭 링크일 수 없다. 같은 머신·계정에서 `verify`가 `exit-confirmed`를
|
|
332
|
+
반환해야 한다. 해당 PID가 실제로 없어야 하고(`ESRCH`만 인정하며 PID 재사용·권한 오류는
|
|
333
|
+
종료 증거가 아님), 기존 소켓 경로도 없어야 한다. 종료한 상주 Host마다 비공개
|
|
334
|
+
`<socketPath>.exit.json`의 inode가 **새로 생겼는지** 확인하고, 저장한 소유 정보(해당 시
|
|
335
|
+
워커 실행 시도 ID 포함)와 일치하는지, `code: 0`, `signal: null`, `persisted: true`,
|
|
336
|
+
`observationsFlushed: true`인지 대조한다. HEAD가 이미 절전 중이면 Gateway 중지 시 새 Host
|
|
337
|
+
영수증이 생기지 않는다. 살아 있던 Gateway가 절전 시 해당 Host 종료를 이미 검증했다.
|
|
338
|
+
중지 요청이 수락된 뒤 아직 종료 중이라면 프로세스가 끝난 후 `verify`만 다시 실행한다.
|
|
339
|
+
중지 요청을 무작정 반복하거나 소켓·영수증을 삭제하지 않는다. 오래된 영수증, 요청 수락,
|
|
340
|
+
소켓 부재만으로는 정상 종료가 아니다. 종료가 거부됐거나 끝내 확인되지 않으면 기존 파일을
|
|
341
|
+
유지한다.
|
|
342
|
+
|
|
343
|
+
검증 후에만 `bun add --global --trust omp-superagent@VERSION` 또는
|
|
344
|
+
`npm install --global omp-superagent@VERSION`으로 대상 버전을 설치하거나 소스 설치를
|
|
345
|
+
다시 빌드한다. 워커 파일은 그 설치본에 의존하는 Host의 종료를 확인한 뒤 해당 워커에서만
|
|
346
|
+
교체한다. 기존 설정·상태·등록 정보·저널을 보존하고 `setup`은 다시 실행하지 않는다.
|
|
347
|
+
|
|
348
|
+
#### 원래 실행 중이던 Gateway만 복구
|
|
349
|
+
|
|
350
|
+
각 Gateway 머신에서 `omp-sa doctor --config FILE`로 시작하지 않고 로컬 준비 상태를 확인할
|
|
351
|
+
수 있다. 점검 전에 **실행 중이던 Gateway에만** `omp-sa start --config FILE`을 실행한다.
|
|
352
|
+
HEAD가 절전 중이었어도 Gateway는 실행 중인 인스턴스다. 명시적 시작은 저장된 동일 세션으로
|
|
353
|
+
HEAD를 올리며, 바로 절전 상태로 돌려놓는 명령은 아니다. 레인은 HEAD가 관리하므로 수동으로
|
|
354
|
+
시작하지 않는다. 아래 세 명령에는 `PATH`에서 우연히 찾은 `omp-sa`가 아니라 **업데이트한
|
|
355
|
+
설치본의 절대 경로**를 쓴다. 패키지 설치라면 다음과 같이 실행한다.
|
|
356
|
+
|
|
357
|
+
```sh
|
|
358
|
+
NEW_OMP_SA=/absolute/path/to/upgraded/bin/omp-sa
|
|
359
|
+
"$NEW_OMP_SA" doctor --config "$CONFIG" &&
|
|
360
|
+
"$NEW_OMP_SA" start --config "$CONFIG" &&
|
|
361
|
+
"$NEW_OMP_SA" status --config "$CONFIG"
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
소스 설치라면 대신 업데이트한 체크아웃의 CLI를 직접 실행한다.
|
|
365
|
+
|
|
366
|
+
```sh
|
|
367
|
+
NEW_CLI=/absolute/path/to/upgraded/checkout/src/cli.ts
|
|
368
|
+
bun --no-env-file "$NEW_CLI" doctor --config "$CONFIG" &&
|
|
369
|
+
bun --no-env-file "$NEW_CLI" start --config "$CONFIG" &&
|
|
370
|
+
bun --no-env-file "$NEW_CLI" status --config "$CONFIG"
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
`status`에서 `gateway.gateway.ready`는
|
|
374
|
+
메신저 연결 준비, `gateway.gateway.admissionReady`는 최초 승인 복구를 마쳐 내구성 있는
|
|
375
|
+
입력 접수가 가능하다는 뜻이고, `gateway.head.ready`는 상주 컨트롤러와 프리셋 준비 상태다.
|
|
376
|
+
`start`는 셋이 모두 참이 되기 전에 반환할 수 있다. HEAD가 상주할 때
|
|
377
|
+
`gateway.head.initialization.sessionId`를 앞서 수집한 세션과 대조한다. 절전 상태를
|
|
378
|
+
수집했다면 **이전 값**은 `gateway.head.hibernation.sessionId`다. 보류된 입력이나 발송 결과가
|
|
379
|
+
불확실한 응답을 강제로 재전달하지 않는다.
|
|
380
|
+
|
|
381
|
+
**0.1.10의 파일을 이미 덮어썼다면** 새 helper로 기존 소유 프로세스의 종료를 마무리하지 않는다.
|
|
382
|
+
새 helper는 구버전의 `exit` 요청 출처를 증명할 수 없어 종료 영수증을 발행하지 않는다.
|
|
383
|
+
복구를 위해 인스턴스·설정·저널·로그를 보존하고, 재시작하거나 영수증을 직접 작성하거나 불확실한
|
|
384
|
+
종료 요청을 반복하지 않는다. 이미 검증에 실패한 소유 프로세스는 파일만 되돌려도 풀리지 않는다.
|
|
385
|
+
0.1.11부터 소유 프로세스는 Rust에서 자신의 종료를 직접 검증한다.
|
|
386
|
+
|
|
387
|
+
### 처음 설치
|
|
388
|
+
|
|
389
|
+
```sh
|
|
390
|
+
bun add --global --trust omp-superagent@0.1.15
|
|
224
391
|
omp-sa --help
|
|
225
392
|
```
|
|
226
393
|
|
|
227
394
|
`--trust`는 관리형 omp-superkit 준비 등 패키지 설치 스크립트를 허용한다.
|
|
228
395
|
`bun pm bin --global`의 출력 경로를 PATH에 포함한다. Bun이 PATH에 있으면
|
|
229
|
-
`npm install --global omp-superagent@0.1.
|
|
396
|
+
`npm install --global omp-superagent@0.1.15`도 사용할 수 있다.
|
|
230
397
|
설정은 설치 디렉터리가 아닌 사용자 작업 디렉터리에
|
|
231
398
|
`omp-sa setup --config ./config.local.json`으로 만든다. 설치만으로 봇을 활성화하지 않는다.
|
|
232
399
|
|
|
@@ -621,6 +788,10 @@ Slack은 [`reactions.add`](https://docs.slack.dev/reference/methods/reactions.ad
|
|
|
621
788
|
바꾸거나 자동 재시도하지 않는다. 이 표시는 작업 성공·완료 검증이나 플랫폼 read receipt가
|
|
622
789
|
아니다. 강제 종료·API 실패 시 원격 반응 정리는 보장하지 않는다.
|
|
623
790
|
|
|
791
|
+
같은 Discord 대화의 후속 메시지가 실행 중인 HEAD 턴에 합류한 경우 최종 답변 본문은
|
|
792
|
+
한 번만 전송한다. native 실행에서 후속 메시지가 그 답변 전에 들어왔고 해당 요청의
|
|
793
|
+
종료가 확인되면, 답변 전송이 확인된 뒤 각각의 원본 후속 메시지에 통합 답변 링크를 단다.
|
|
794
|
+
|
|
624
795
|
## 3. 설정
|
|
625
796
|
|
|
626
797
|
### 터미널 셋업
|
|
@@ -910,6 +1081,9 @@ start는 **detached Gateway를 먼저 실행**하고 Gateway가 지정 head 하
|
|
|
910
1081
|
영수증이 아니다. CLI가 출력한 Gateway/Host 로그에서 해당 단계의 실제 오류·상태를 구분한다.
|
|
911
1082
|
Gateway 로컬 endpoint는 `<stateDir>/run/gateway.sock`, 실제 어댑터·감독 로그는
|
|
912
1083
|
`<stateDir>/logs/gateway.log`다. native head 로그와 transport 로그를 혼동하지 않는다.
|
|
1084
|
+
Discord 소유자 메시지가 부모 채널 allowlist에서 제외되면 이 로그에서
|
|
1085
|
+
`Discord owner input ignored: channel not allowlisted`를 확인한다. 빈도를 제한하며
|
|
1086
|
+
서버·전송 대상·부모 채널 ID만 남긴다. 제외된 채널에는 아무것도 게시하지 않는다.
|
|
913
1087
|
헤드 부재 중에도 준비된 Gateway는 ACK 전에 수신을 저장한다. 미해결 접수/답변은
|
|
914
1088
|
pending 순서를 유지하고 `gateway.unresolvedEvents`와 `head.ready: false`로 표시한다.
|
|
915
1089
|
재연결·접수 재전달은 원래 작업·외부 효과의 재실행 허가가 아니다. 운영자는 로그·원래 receipt와
|
|
@@ -974,7 +1148,8 @@ HEAD 답변에서 저장한 리비전을 확인한다. 설정은 재시작 후
|
|
|
974
1148
|
작업 스레드는 해당 레인으로 전달한다. `/head 요청`은 스레드에서도 HEAD를 지정한다.
|
|
975
1149
|
같은 대화에 실행 중인 작업이 있으면 `/steer` 없이 다음 OMP steering 경계에서 반영하고,
|
|
976
1150
|
유휴 상태면 새 실행을 시작한다. 스레드 개설 직후의 첫 답장도 원래 실행의 답변 경로가
|
|
977
|
-
그 스레드로 확인되면 합류할 수 있다.
|
|
1151
|
+
그 스레드로 확인되면 합류할 수 있다. 운영자가 직접 보낸 steer는 레인의 작업을 바꿀 수 있지만
|
|
1152
|
+
실행의 보고 방식은 바꾸지 않는다. 메시지 접수나 RPC 수락만으로 모델이 입력을 읽었다고
|
|
978
1153
|
볼 수는 없다. 다른 대화, 내부 보고, workflow 선택과 제어 명령은 현재 실행에 섞지 않으며
|
|
979
1154
|
일시정지·승인·압축·불확실성 보류를 우회하지 않는다. 원래 Discord 주소 지정 정책은 그대로
|
|
980
1155
|
적용하며, 같은 실행의 최종 답변/보고는 중복 발송하지 않는다.
|
|
@@ -1495,13 +1670,11 @@ head의 native 승인 카드 복구를 먼저 마친 뒤 입력·콜백 처리
|
|
|
1495
1670
|
|
|
1496
1671
|
헤드가 위임한 작업의 질문과 레인 root가 `decision_ask({to:"head", questions:[…]})`로
|
|
1497
1672
|
명시적으로 보낸 질문은 헤드가 먼저 검토한다. 다른 연결 주제 질문은 운영자에게 직접 간다.
|
|
1498
|
-
|
|
1499
|
-
않은 채 내부에서 취소한다.
|
|
1500
|
-
위임 범위 안의 일상적 선택이면 헤드는 `lane_review_decision`으로 원래 선택지 중 하나를
|
|
1673
|
+
현재 작업 범위 안의 일상적 선택이면 헤드는 `lane_review_decision`으로 원래 선택지 중 하나를
|
|
1501
1674
|
골라 레인에 돌려보낸다. 이유는 내부 이력에 남기고 별도 메신저 알림은 보내지 않는다.
|
|
1502
1675
|
운영자의 판단이 필요하면 대기 중인 같은 질문을 넘기고 원래 카드에 이관 이유를 표시한다.
|
|
1503
|
-
|
|
1504
|
-
|
|
1676
|
+
기존 검토가 남은 상태에서 헤드가 중지되면 컨트롤러가 대기 중인 같은 질문을 원래
|
|
1677
|
+
운영자에게 넘길 수 있다.
|
|
1505
1678
|
이 경로는 범위 변경이나 native 실행 승인을 허가하지 않는다. 일반 native dialog에도 헤드가
|
|
1506
1679
|
대신 답하지 않는다. 아래의 `ask` 카드는 `decision_ask`가 쓰는 구조화된
|
|
1507
1680
|
`askDialog`다. OMP 19.1 내장 `ask`의 HTML `form`은 Host가 메신저로 보내지 않고
|
|
@@ -1637,6 +1810,27 @@ SSH가 끊겨도 Host 자체는 종료되지 않습니다. Host가 종료된 뒤
|
|
|
1637
1810
|
`omp-sa status --config ./config.local.json`에서 확인합니다. 접근을 철회할 때는
|
|
1638
1811
|
워커에서 **해당 등록 키만** 제거하세요. 키 제거가 이미 실행 중인 레인을 중단하지는 않습니다.
|
|
1639
1812
|
|
|
1813
|
+
**원격 레인의 프로젝트 메모리 가져오기(선택).** 워커에 명시적으로 저장한 사실을
|
|
1814
|
+
HEAD의 프로젝트 메모리에도 남겨도 되는 경우에만, **새 레인**을 열기 전에 HEAD
|
|
1815
|
+
설정에 `"remoteMemorySync": true`를 지정하세요. 기본은 꺼짐입니다. 양쪽 모두
|
|
1816
|
+
Mnemopi의 `per-project` 모드를 사용해야 하고, 레인의 로컬 작업 경로가 HEAD의 승인된 작업 경로와 같아야
|
|
1817
|
+
합니다. 새 워커 레인은 별도 메모리 저장소로 시작하며 기존 공유 메모리를 읽거나 옮기지
|
|
1818
|
+
않습니다. 텍스트 검색만 쓰려면 HEAD의 영구 프로필에 `mnemopi.noEmbeddings: true`가
|
|
1819
|
+
설정되어 있어야 합니다. 즉시 벡터 색인은 이미 `models.offline: true`로 운영하는 HEAD에서
|
|
1820
|
+
해당 메모리 저장소에 지정·허용된 인프로세스 임베딩 제공자가 있을 때 지원합니다.
|
|
1821
|
+
로컬 모델 이름이나 캐시된 가중치만 있으면 텍스트를 저장하고 벡터 색인은 보류합니다.
|
|
1822
|
+
일시적인 설정 변경만으로는 허용되지 않습니다. 온라인 HEAD에서 임베딩이 켜져 있으면
|
|
1823
|
+
모델 이름이 로컬이어도 가져오지 않습니다. OMP가 저장소를 다시 열 때 기존 사실을
|
|
1824
|
+
프로세스 공용 제공자에게 보낼 수 있기 때문입니다. 동기화가 채팅·임베딩 설정을 바꾸지는 않습니다.
|
|
1825
|
+
기존 세션이나 다른 백엔드의 데이터는 옮기지 않습니다. 설정은 평소처럼
|
|
1826
|
+
승인된 기동 시 반영되며, 상태 확인만을 위해 재시작할 필요는 없습니다.
|
|
1827
|
+
`lane_inspect`의 `memorySync`에서 마지막 페이지의 상태를 확인하세요. 조회 성공과
|
|
1828
|
+
벡터 색인 확인은 다릅니다. `pending`은 임베딩 진행 중, `deferred`는 저장된 벡터도
|
|
1829
|
+
실행 중인 임베딩도 확인되지 않은 상태입니다. 둘 다 텍스트 검색은 가능합니다. 유휴 Host가 이미
|
|
1830
|
+
내려갔다면 복사를 위해 깨우지 않습니다.
|
|
1831
|
+
다시 `false`로 설정하면 다음 설정 반영부터 가져오기가 중단되며, 이미 양쪽에 저장한
|
|
1832
|
+
사실은 삭제되지 않습니다. [백엔드별 지원 범위와 개인정보·색인 제약](design/execution.md#idle-remote-memory-pull)을 참고하세요.
|
|
1833
|
+
|
|
1640
1834
|
## 5. 운영 범위와 복구 제약
|
|
1641
1835
|
|
|
1642
1836
|
- 자율 작업은 기존 native task/job·goal·workflow owner를 사용하며 원래 허가 목표·source/route·
|
|
@@ -1728,7 +1922,9 @@ OMP_SUPERAGENT_WORKER_SSH_TEST=1 bun test test/native-worker-ssh.test.ts
|
|
|
1728
1922
|
```
|
|
1729
1923
|
|
|
1730
1924
|
일반 회귀는 `bun run check`와 `bun run test`로 실행한다. 테스트 스크립트는 네이티브 바이너리를
|
|
1731
|
-
빌드한 뒤 격리된 워커 두 개로 테스트 파일을 실행한다.
|
|
1925
|
+
빌드한 뒤 격리된 워커 두 개로 테스트 파일을 실행한다. 로컬과 CI 모두 루프백 operator를 Cargo로
|
|
1926
|
+
한 번 빌드해 출력된 실행 파일 경로를 워커에 전달한다. 개별 `bun test`는 필요할 때 직접 빌드한다.
|
|
1927
|
+
순서 의존성을 확인할 때는 같은 범위를 `bun test test`로 직렬 실행할 수 있다.
|
|
1732
1928
|
기본 테스트는 opt-in native/PTY 시나리오를 제외한다. `.upstream`까지 탐색하는 인수 없는
|
|
1733
1929
|
`bun test`로 대체하지 않는다. OMP와 관리형 omp-superkit이 준비된 checkout의 `bun run test:ci`는
|
|
1734
1930
|
타입 검사, Rust Host owner·Gateway 테스트, 로컬 project/native/PTY·omp-superkit 통합 회귀를 실행한다. `scripts/ci.ts`는 활성
|
|
@@ -1736,7 +1932,7 @@ OMP_SUPERAGENT_WORKER_SSH_TEST=1 bun test test/native-worker-ssh.test.ts
|
|
|
1736
1932
|
standalone CLI를 찾는다. Bun이 앞에 넣은 `node_modules/.bin`은 건너뛰며 SDK CLI나 과거 binary로 대체하지 않는다.
|
|
1737
1933
|
선택한 OMP 버전·실행 경로를 출력하고 공개 RPC·프로세스 관측 기능을 메타데이터로 확인한다.
|
|
1738
1934
|
`test:ci` 자체는 OMP를 다운로드·빌드·업데이트하지 않는다. Python 3이 필요하며 launchd 검증은 macOS에서만 실행한다.
|
|
1739
|
-
`test:ci`는 설치된 CLI가 추출한 네이티브
|
|
1935
|
+
`test:ci`는 설치된 CLI가 추출한 네이티브 바이너리를 실행별 임시 캐시에 공유한다. 각 fixture의 HOME·설정·인증은 계속 격리한다.
|
|
1740
1936
|
`OMP_TEST_NATIVES_DIR`에 신뢰하는 절대 경로를 직접 지정하면 임시 캐시 대신 사용하며, 이 경로는 실행 후 삭제하지 않는다.
|
|
1741
1937
|
|
|
1742
1938
|
PR, `main`, 수동 실행과 `v*` 릴리즈 태그의 GitHub Actions는 Ubuntu 24.04와 macOS 15 ARM64에서
|
|
@@ -1750,6 +1946,10 @@ SHA-256과 `omp --version`을 확인한다.
|
|
|
1750
1946
|
OMP 18은 CI에서 실행하지 않는다. 필요할 때만 `bash scripts/test-omp.sh v18.22.2` 또는 이전
|
|
1751
1947
|
비동기 작업 API를 쓰는 `v18.20.3`을 지정해 같은 검사를 수동으로 실행한다.
|
|
1752
1948
|
|
|
1949
|
+
CI는 Rust 의존성만 캐시하며 프로젝트 바이너리나 테스트 결과는 재사용하지 않는다. 성공한
|
|
1950
|
+
`main` 푸시만 캐시를 저장한다. 소스 테스트와 패키지 빌드의 캐시는 분리하고, 태그의 패키지는
|
|
1951
|
+
캐시를 복원하지 않고 빌드한다. 캐시가 있어도 프로젝트 컴파일·테스트·링크·설치 검증은 그대로 수행한다.
|
|
1952
|
+
|
|
1753
1953
|
**OMP upstream compatibility**는 매주 월요일 04:17 UTC 또는 Actions에서 수동으로 실행한다.
|
|
1754
1954
|
upstream의 최신 정식 릴리스 태그를 한 번 조회한 뒤 Ubuntu·macOS ARM64에서 그 태그로 같은 검사를 수행한다.
|
|
1755
1955
|
실패한 태그는 로컬에서 `bash scripts/test-omp.sh vX.Y.Z`로 재현한다. 필요한 기능이 없거나 회귀가
|
package/docs/design/execution.md
CHANGED
|
@@ -14,9 +14,9 @@ host requires it, unless the operator explicitly requests Git worktrees. No
|
|
|
14
14
|
checkout is needed just for a read-only lane or separate reporting; checkouts
|
|
15
15
|
do not isolate shared refs, services or integration effects.
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### Remote placement
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
The head may bind a new lane to a verified SSH worker.
|
|
20
20
|
The durable binding includes the target enrollment, repository identity, revision
|
|
21
21
|
and subdirectory. Admission, approvals and messenger delivery remain head-owned;
|
|
22
22
|
the worker launches the stock Host and owns its Unix socket, processes and native
|
|
@@ -44,6 +44,133 @@ cannot use attach to choose a different session or invoke native shell commands.
|
|
|
44
44
|
The target account and its explicitly approved extensions remain trusted;
|
|
45
45
|
OpenSSH command restrictions are not an OS sandbox for native agent tools.
|
|
46
46
|
|
|
47
|
+
### Idle remote memory pull
|
|
48
|
+
|
|
49
|
+
`remoteMemorySync` is an opt-in HEAD config setting, not a lane tool. The privacy
|
|
50
|
+
boundary is a newly negotiated, paired worker lane in the **same canonical
|
|
51
|
+
workspace as HEAD**. Both ends must use Mnemopi's `per-project` mode, not
|
|
52
|
+
`per-project-tagged` or `global`. A participating worker lane starts with a private native
|
|
53
|
+
bank and no previously shared project memories. Older sessions keep their
|
|
54
|
+
original native store; neither it nor its contents are moved or removed.
|
|
55
|
+
The controller never searches the worker's normal profile for historical records.
|
|
56
|
+
|
|
57
|
+
| Native backend | As worker source | As HEAD destination |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| Mnemopi | Explicit project `retain`/`learn` facts in the isolated lane's native project bank. Exclude global writes, automatic transcripts, synthesized episodes, scratchpads, context/metadata and skills. | The live HEAD's matching project write bank only. Import text, not vectors, using the local bank's indexing policy. |
|
|
60
|
+
| Local | No session-bound record iterator for the shared rollout summary / `learned.md`. | No independent non-overwriting, searchable record import; the summary is developer-instruction input. |
|
|
61
|
+
| Hindsight | Remote bank listing and project tags are not a lane-owned export. | A queued remote retain is neither a local import nor a confirmed index. |
|
|
62
|
+
| Sharpshooter | Shared project files, not a lane-owned native record stream. | No supported isolated record import with replay confirmation. |
|
|
63
|
+
| Off, unavailable, unknown or older peer | No pull. | No import. |
|
|
64
|
+
|
|
65
|
+
Both ends must qualify; a mixed pair is not converted in either direction.
|
|
66
|
+
An unsupported pair keeps its ordinary lane lifecycle, including the existing
|
|
67
|
+
managed-memory launch preflight. Sync does not enable memory, change auth,
|
|
68
|
+
silently create a vector provider or upgrade the peer.
|
|
69
|
+
|
|
70
|
+
**Why not an OMP export or an SSH file copy?** In
|
|
71
|
+
[OMP 19.2.1 at `b55cd1b`](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/coding-agent/src/memory-backend/types.ts),
|
|
72
|
+
the generic extension API exposes `status`, `search` and `save`. Search is ranked,
|
|
73
|
+
clipped and scoped for recall; it is not iteration. Mnemopi opens its project
|
|
74
|
+
store [with the bank as the BEAM session ID](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/coding-agent/src/mnemopi/state.ts);
|
|
75
|
+
that ID alone does not identify the OMP lane. Its
|
|
76
|
+
[snapshot and import](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/beam/store.ts)
|
|
77
|
+
operate on a bank, not an authenticated lane; a snapshot includes scratchpad
|
|
78
|
+
and consolidation data. Superagent neither calls a full export nor accepts a
|
|
79
|
+
database, filesystem path, table selector, provider option or command over SSH.
|
|
80
|
+
|
|
81
|
+
Children can share the parent's native bank and edit a row without replacing its
|
|
82
|
+
creation metadata. The worker therefore also requires a content digest witnessed
|
|
83
|
+
at a successful **root, built-in** `retain` or `learn` call. It correlates
|
|
84
|
+
the root execution start, effective tool result and terminal execution event.
|
|
85
|
+
If stock presents `retain` or `learn` as a Bash command, only a single literal
|
|
86
|
+
foreground invocation with a successful typed native dispatch receipt counts;
|
|
87
|
+
command output, file- or stdin-backed arguments, help, compound commands and
|
|
88
|
+
background jobs do not.
|
|
89
|
+
Only matching project text is sealed in the form of a digest, never a second
|
|
90
|
+
copy of the text. Indirect calls without that proof, partial successes, oversized
|
|
91
|
+
batches, skill writes, replaced text and facts predating enrollment remain local.
|
|
92
|
+
The worker caps the witness at 65,536 entries per private bank; after that it
|
|
93
|
+
still retains ordinary native memories but does not attest additional facts.
|
|
94
|
+
|
|
95
|
+
After an admitted run has settled, the existing controller pump can pull one
|
|
96
|
+
bounded page per minute while the native lane remains resident. It gives
|
|
97
|
+
queued work priority, uses a single in-flight pull, rechecks enrollment and
|
|
98
|
+
native identity, and discards a page if its authority or destination changed
|
|
99
|
+
before import. The live Git root, repository-relative path and revision must
|
|
100
|
+
still match after native idle confirmation. Preparing a private bank makes
|
|
101
|
+
that worker eligible for a later readiness check, not for a read: its native
|
|
102
|
+
backend may initialize after attachment. Idle eviction permits one bounded final attempt; release does
|
|
103
|
+
not wait indefinitely for indexing, retry a missing acknowledgement or wake a
|
|
104
|
+
Host just to copy memory. Capacity eviction bypasses maintenance for a queued
|
|
105
|
+
lane. Stop or expiry cancels the pull's SSH probe without disconnecting the
|
|
106
|
+
lane's normal control channel. A short residency can leave records on the worker
|
|
107
|
+
until a later eligible run. Memory is never removed on either side by sync.
|
|
108
|
+
|
|
109
|
+
The durable cursor is bound to the native session, worker enrollment and
|
|
110
|
+
placement, and the HEAD destination. A bounded, cyclic scan can rediscover an
|
|
111
|
+
edited row or a reused SQLite row ID. Each page examines at most 64 working
|
|
112
|
+
rows plus one lookahead and returns at most 16 facts, 2 KiB each, in a 24 KiB
|
|
113
|
+
page. After a complete scan with one stable bank-change stamp the worker can
|
|
114
|
+
answer without reading or transmitting the same facts. A new Host attempt
|
|
115
|
+
invalidates that stamp, not the destination's record IDs. Native import IDs bind the
|
|
116
|
+
logical destination, origin and fact text, not the source row number or ID: two
|
|
117
|
+
rows with the same witnessed text in the same lane represent one imported fact.
|
|
118
|
+
Replay cannot overwrite existing records
|
|
119
|
+
or schedule another embedding for unchanged text. HEAD keeps a destination-scoped
|
|
120
|
+
digest receipt, not the fact text: forgetting an imported fact locally does not
|
|
121
|
+
make replay recreate it. A crash after reserving the digest but before native
|
|
122
|
+
commit leaves that uncertain fact on the worker rather than replaying it.
|
|
123
|
+
This is an append-only
|
|
124
|
+
transfer of observed facts, **not** a replica of updates or deletions. Neither
|
|
125
|
+
the cursor nor an SSH acknowledgement proves a vector exists. `lane_inspect`
|
|
126
|
+
reports page-level counts; only readback of a matching local model/vector
|
|
127
|
+
counts as indexed. `pending` counts a running native embedding task; `deferred`
|
|
128
|
+
means the text is present but no current task or vector was confirmed;
|
|
129
|
+
`disabled` means the configured policy is text-only. Imported records
|
|
130
|
+
are marked `IMPORTED` and receive lexical indexing. The HEAD adapter calls the
|
|
131
|
+
live BEAM `importFromDict({ working_memory: … }, false)`, never the worker's
|
|
132
|
+
export or a vector insert. Only new records are submitted for native
|
|
133
|
+
[embedding](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/beam/store.ts).
|
|
134
|
+
An active-model vector is checked locally
|
|
135
|
+
after the native task settles; a missing vector is not proof of provider
|
|
136
|
+
failure or an instruction to send the text again. The adapter uses the
|
|
137
|
+
pinned SDK's document embedding and conditional live-vector insert for just
|
|
138
|
+
the new rows. It never rewrites fact text or starts a whole-bank reindex.
|
|
139
|
+
The package's normal postinstall prepares `.upstream/worker-memory-sdk.mjs`
|
|
140
|
+
from the locked dependencies for stock CLIs that cannot import those helpers
|
|
141
|
+
directly. This does not build or replace OMP; a missing supported capability
|
|
142
|
+
does not switch the lane to a shared memory store.
|
|
143
|
+
Coordination receipts, text inserts and delayed vector writes all defer on
|
|
144
|
+
lock contention rather than blocking HEAD's event loop.
|
|
145
|
+
HEAD must have a persistent profile that remains safe on a normal bank reopen:
|
|
146
|
+
`mnemopi.noEmbeddings: true` for lexical-only use, or `models.offline: true`.
|
|
147
|
+
Immediate vector indexing requires an embedding provider already scoped and
|
|
148
|
+
authorized on the live HEAD bank. A local model name or cached weights alone
|
|
149
|
+
are not such a handle: text is searchable and the vector is reported as
|
|
150
|
+
deferred. The importer does not initialize an unscoped model, download one or
|
|
151
|
+
launch another CLI. A temporary offline or text-only override alone is not sufficient.
|
|
152
|
+
|
|
153
|
+
An online HEAD with embeddings enabled is **not** a destination, even if its
|
|
154
|
+
model name is local. The pinned stock [reopen repair](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/beam/store.ts)
|
|
155
|
+
embeds missing vectors and, on any stale model stamp, the whole bank. Other
|
|
156
|
+
native sessions can write stamps into the same project bank. The [embedding
|
|
157
|
+
resolver](https://github.com/can1357/oh-my-pi/blob/b55cd1bb664d8ab46ddc77f2a34eb47555dbf1ac/packages/mnemopi/src/core/embeddings.ts)
|
|
158
|
+
can use a process-wide provider before the named local model. Sync cannot bind
|
|
159
|
+
a future stock reopen to a provider per imported row. An enabled HTTP profile
|
|
160
|
+
is also ineligible; stock does not authorize redirect targets individually.
|
|
161
|
+
Changing the operator's durable policy later can change how native OMP uses
|
|
162
|
+
facts already stored.
|
|
163
|
+
|
|
164
|
+
No transferred text is submitted as a prompt, published to a messenger or
|
|
165
|
+
included in a sync diagnostic. Once stored, the destination's normal OMP
|
|
166
|
+
recall and compaction policies still apply to it as memory data. Anyone with
|
|
167
|
+
access to that native repository/profile can potentially recall those facts.
|
|
168
|
+
Only enable transfer for a trusted workspace. Secret-pattern checks reject
|
|
169
|
+
recognizable credentials; they cannot determine whether an arbitrary
|
|
170
|
+
natural-language fact is confidential.
|
|
171
|
+
|
|
172
|
+
### Management tools
|
|
173
|
+
|
|
47
174
|
The [head extension](../../src/extension.ts) restricts manager tools to
|
|
48
175
|
the managed root. Use live tool schemas for arguments and [head role
|
|
49
176
|
references](../../skills/head/SKILL.md) for operating policy.
|
|
@@ -101,51 +228,42 @@ pending native dialog. Omitting `to` keeps the default: a topic-owned question
|
|
|
101
228
|
goes directly to its authorized topic; a manager-handoff question goes to HEAD.
|
|
102
229
|
HEAD answers with an original option or escalates the same card on its original
|
|
103
230
|
route via `lane_review_decision`. Do not use a decision to change scope or
|
|
104
|
-
grant native approvals.
|
|
105
|
-
|
|
106
|
-
An explicit HEAD-directed question on the resulting corrective assignment is
|
|
107
|
-
cancelled privately, not rerouted to the owner.
|
|
231
|
+
grant native approvals. A direct bound-topic owner instruction can revise
|
|
232
|
+
the assignment without a HEAD decision.
|
|
108
233
|
HEAD uses `lane_message` for a specific authorized follow-up; neither an
|
|
109
234
|
observation nor a decision supplies fresh dispatch authority. Do not poll or
|
|
110
235
|
schedule a model just to check for updates.
|
|
111
236
|
|
|
112
|
-
###
|
|
113
|
-
|
|
114
|
-
An
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
corrective input only after the original lane run and HEAD review both
|
|
143
|
-
settle successfully. The correction applies only to that assignment, not to
|
|
144
|
-
tool availability, native approvals, operator settings, or other work. It
|
|
145
|
-
cannot replay denied or uncertain effects. The lane delivers the corrected
|
|
146
|
-
outcome on the original thread; HEAD does not echo the request or add a
|
|
147
|
-
second reply. If the correction is unsupported or unclear, HEAD gives one
|
|
148
|
-
bounded reason or clarification there, without dispatching work.
|
|
237
|
+
### Direct owner changes to bound-topic work
|
|
238
|
+
|
|
239
|
+
An authenticated owner's direct, explicit work instruction in a lane's own
|
|
240
|
+
bound topic supersedes conflicting task scope or acceptance in an earlier
|
|
241
|
+
HEAD brief. The lane applies the change inside its selected workspace when the
|
|
242
|
+
native session consumes the input, whether as a new ordinary prompt or as an
|
|
243
|
+
eligible steer. Apply only what the owner changed. A binding by itself does not
|
|
244
|
+
authorize work; quoted or forwarded content, attachments, historical excerpts,
|
|
245
|
+
child reports and sibling assignments do not acquire the owner's authority.
|
|
246
|
+
The original brief and acceptance remain available as prior context even if the
|
|
247
|
+
opening prompt never ran. They are not a veto over the owner's later instruction.
|
|
248
|
+
|
|
249
|
+
The [ordinary topic routing rules](messaging.md#topic-routing-and-controls)
|
|
250
|
+
still apply. Keep the original source, session and delivery identity; steering
|
|
251
|
+
does not change an existing manager handoff's reporting mode. There is no
|
|
252
|
+
separate HEAD approval, scope-review turn or replayed handoff. HEAD can still
|
|
253
|
+
coordinate shared edit ownership, dependencies and integration, and answer or
|
|
254
|
+
escalate a genuine tracked decision on its original route.
|
|
255
|
+
If a direct instruction joined a manager run, its decision keeps the opener's
|
|
256
|
+
card and destination. HEAD receives the question, not private steer text or a
|
|
257
|
+
claim that the original brief still represents current permission.
|
|
258
|
+
|
|
259
|
+
The instruction does not move the lane to another workspace or checkout,
|
|
260
|
+
take over sibling work, change operator settings, bypass tool restrictions or
|
|
261
|
+
native approvals, resume paused work, or clear an uncertain effect. It does
|
|
262
|
+
not undo completed work or authorize repeating a denied or uncertain action.
|
|
263
|
+
Old pending records from the retired review path are not a source of work or
|
|
264
|
+
permission and must not dispatch or replay on upgrade. This does not discard a
|
|
265
|
+
verified completed result still waiting for its first delivery on the original
|
|
266
|
+
route. An interrupted send is uncertain, not a reason to send again.
|
|
149
267
|
|
|
150
268
|
### Failed lane requests
|
|
151
269
|
|