diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e223a2b6..36f5a6264 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,8 +39,7 @@ jobs: cache: 'npm' - run: npm ci - name: Install server deps - run: npm ci - working-directory: server + run: ./scripts/ci-npm-ci.sh server - name: Daemon run: npx tsc --noEmit - name: Server @@ -161,8 +160,7 @@ jobs: node-version: ${{ env.NODE_VERSION_PRIMARY }} cache: 'npm' - run: npm ci - - run: npm ci - working-directory: web + - run: ./scripts/ci-npm-ci.sh web - run: cd web && npx vitest run --config vitest.unit.config.ts web-tests-components: @@ -175,8 +173,7 @@ jobs: node-version: ${{ env.NODE_VERSION_PRIMARY }} cache: 'npm' - run: npm ci - - run: npm ci - working-directory: web + - run: ./scripts/ci-npm-ci.sh web - run: cd web && npx vitest run --config vitest.components.config.ts # FileBrowser component test skipped in CI (OOM — renders full 1300-line component in jsdom). @@ -195,8 +192,7 @@ jobs: cache: 'npm' cache-dependency-path: package-lock.json - run: npm ci - - run: npm ci - working-directory: server + - run: ./scripts/ci-npm-ci.sh server - run: npm run test:server - name: Run server-native tests (auth-flow, proxy-addr — require server/node_modules) run: npm test @@ -284,6 +280,8 @@ jobs: name: Coverage Report runs-on: ubuntu-latest needs: [unit-tests, web-tests-unit, web-tests-components] + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -296,18 +294,20 @@ jobs: run: tmux new-session -d -s init && tmux kill-session -t init - run: npm ci - name: Install web deps (needed for tsx component tests) - run: npm ci - working-directory: web + run: ./scripts/ci-npm-ci.sh web - name: Install server deps (needed for server route tests) - run: npm ci - working-directory: server + run: ./scripts/ci-npm-ci.sh server - run: npm run build - run: npm run test:coverage - name: Upload to Codecov + if: ${{ env.CODECOV_TOKEN != '' }} uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ env.CODECOV_TOKEN }} fail_ci_if_error: false + - name: Skip Codecov upload when token is unavailable + if: ${{ env.CODECOV_TOKEN == '' }} + run: echo "Skipping Codecov upload because CODECOV_TOKEN is not configured for this workflow context." - name: Comment PR with coverage diff if: github.event_name == 'pull_request' uses: davelosert/vitest-coverage-report-action@v2 @@ -337,11 +337,9 @@ jobs: - run: npm install -g npm@11.11.1 - run: npm ci - name: Install web deps - run: npm ci - working-directory: web + run: ./scripts/ci-npm-ci.sh web - name: Install server deps - run: npm ci - working-directory: server + run: ./scripts/ci-npm-ci.sh server - run: npm run build - name: Set version run: npm version ${{ needs.docker.outputs.npm_version }} --no-git-tag-version diff --git a/.gitignore b/.gitignore index 9183ae182..20792a073 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,10 @@ docs/*.local.md .claude/ .codex/ .gemini/ +.qwen/ +.imcodes/ +.opencode/ +opencode.json # System .DS_Store diff --git a/CLAUDE.md b/CLAUDE.md index 4b2dbc86f..0b58ab969 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -90,6 +90,7 @@ The web project uses `i18next` with `react-i18next` for internationalization. - **Pod-sticky routing (MANDATORY for daemon-dependent requests)**: The server runs multiple replicas. Each daemon connects to ONE pod via WebSocket. The ingress uses `:serverId` in the URL path to route requests to the pod holding that daemon's WS. Any endpoint that depends on the daemon (file transfer, session commands, Watch API) **MUST** include `:serverId` in the URL path (e.g., `/api/server/:serverId/...`). In-memory state (download tokens, WsBridge instances, terminal streams) is per-pod — requests without serverId routing will hit a random pod and fail. - Server secrets (`JWT_SIGNING_KEY`) are set via environment variables, never committed. - E2E tests require tmux. They are auto-skipped when `SKIP_TMUX_TESTS=1` or inside a Claude Code session (`CLAUDECODE` env var set). +- **MANDATORY — Test session hygiene:** Any e2e/integration test that creates tmux sessions, main sessions, sub-sessions, or temporary projects/cwds **MUST** use naming/path patterns covered by `shared/test-session-guard.ts`. If a new test introduces a new naming family, you **MUST** update `shared/test-session-guard.ts` and its tests in the same change. Leaked test sessions must never persist to `~/.imcodes/sessions.json`, must never be written to the server DB, and must be cleaned from live terminal backends on daemon startup. - The server TypeScript project is stricter (`noUnusedLocals`, `noImplicitReturns`). Both daemon and server projects must compile cleanly. - **Shared code between daemon, server, and web**: Use `shared/` directory (NOT `src/shared/`). Server tsconfig includes `../shared/**/*`. Import path from server: `../../../shared/foo.js`. Import path from daemon/test: `../../shared/foo.js`. Import path from web: `@shared/foo.js` (Vite alias configured in `web/vite.config.ts`). The `shared/` dir is copied into Docker image by `Dockerfile` (`COPY shared/ ./shared/`). **NEVER** import across project boundaries with `../../../src/` paths — they break at runtime in Docker. - **Web tsconfig is stricter** than daemon (`noUnusedLocals`). The Docker build runs `cd web && npm run build` which will fail on unused variables/imports that pass `npx tsc --noEmit` in daemon. Always run `cd web && npx tsc --noEmit` before pushing. diff --git a/README.i18n/README.es.md b/README.i18n/README.es.md index 136b288fc..b905d34b4 100644 --- a/README.i18n/README.es.md +++ b/README.i18n/README.es.md @@ -3,13 +3,13 @@ [English](../README.md) | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Español](README.es.md) | [Русский](README.ru.md) | [日本語](README.ja.md) | [한국어](README.ko.md) -**La capa de mensajería para agentes.** +**El IM para agentes. Memoria compartida, ejecución supervisada y auditoría cruzada entre proveedores de IA.** -IM.codes es un mensajero especializado para agentes de programación con IA. Te permite seguir sesiones largas desde iPhone, iPad, Apple Watch, móvil o web, con acceso a terminal, navegación de archivos, vistas de Git, vista previa de localhost, notificaciones y flujos multiagente integrados. Funciona con [Claude Code](https://github.com/anthropics/claude-code), [Codex](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [OpenClaw](https://openclaw.com) y [Qwen](https://github.com/QwenLM/qwen-agent). +IM.codes ofrece a los coding agents una capa de memoria compartida entre proveedores. Convierte el trabajo completado en contexto reutilizable y vuelve a inyectar el historial adecuado en sesiones futuras. Funciona con [Claude Code](https://github.com/anthropics/claude-code), [Codex](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), GitHub Copilot, Cursor, OpenCode, [OpenClaw](https://openclaw.com) y [Qwen](https://github.com/QwenLM/qwen-agent), además de terminal, archivos, vistas Git, localhost preview, notificaciones, flujos multiagente y streaming nativo para agentes transport. Auto supervision integrado puede juzgar los turnos completados, seguir trabajando de forma autónoma y, si quieres, ejecutar un bucle de auditoría y retrabajo antes de devolverte el control. La discusión P2P integrada permite que varios modelos revisen y auditen los planes y las implementaciones de los demás, reduciendo de forma eficaz las omisiones, puntos ciegos y sesgos de un solo modelo. > **Nota:** Este archivo es una traducción. **El README en inglés (`../README.md`) es la versión canónica.** Si hay alguna diferencia, prevalece la versión en inglés. -Claude Code y Codex ahora admiten dos modos de integración: CLI y SDK. +Varios agentes admiten dos modos de integración: CLI y SDK. ## Capturas @@ -58,7 +58,7 @@ La compatibilidad con Apple Watch cubre monitorización rápida de sesiones, con Download on the App Store -Compatible con iPhone, iPad y Apple Watch. También disponible como [web app](https://app.im.codes) y mediante `npm install -g imcodes` (CLI del daemon). +Compatible con iPhone, iPad y Apple Watch. También disponible como [web app](https://app.im.codes). ## Por qué @@ -76,11 +76,22 @@ IM.codes convierte continuamente el trabajo ya resuelto de los agentes en memori - **Se guarda problema → solución, no ruido de logs.** Solo se materializan las salidas finales `assistant.text`; se excluyen deltas en streaming, tool calls, tool results y ruido intermedio. - **Memoria personal con sincronización opcional en la nube.** La memoria cruda y la procesada permanecen siempre en local; los resúmenes procesados pueden sincronizarse opcionalmente con un pool en la nube a nivel de usuario compartido entre tus dispositivos. -- **Enterprise Shared Context consultable.** Los equipos pueden publicar memoria reutilizable en ámbitos workspace/project, inspeccionarla desde la UI, consultarla y ver estadísticas, en lugar de esconder contexto dentro de prompts invisibles. +- **Enterprise Shared Context consultable.** Los equipos pueden publicar memoria reutilizable en ámbitos workspace/project, inspeccionarla desde la UI, consultarla y ver estadísticas, en lugar de esconder contexto dentro de prompts invisibles. Esta parte sigue en desarrollo activo y todavía no ha pasado pruebas completas de producción. - **Recuperación multilingüe.** La búsqueda semántica local y el recall del servidor con pgvector usan embeddings multilingües para encontrar soluciones relacionadas entre inglés, chino, japonés, coreano, español, ruso y repos mixtos. - **Inyección automática donde importa.** El historial relevante se inyecta tanto por mensaje como al iniciar la sesión, con tarjetas en la timeline que muestran qué se recuperó, por qué, la puntuación de relevancia, el número de recalls y el último uso. - **Visible y controlable por el usuario.** La UI de Shared Context separa raw events, processed summaries, cloud memory y enterprise memory, con controles de consulta, vista previa, archive/restore y configuración de procesamiento. +## Ejecución Supervisada y Auto Audit + +IM.codes puede conducir sesiones de agent compatibles turno a turno — un supervisor con tus propias instrucciones evalúa cada turno completado en el límite idle y decide auto-continuar, devolver el control o disparar un bucle de auditoría, en lugar de que tengas que escribir "continue" cada ronda. + +- **Modos Auto por sesión.** Configura `off`, `supervised` o `supervised_audit` por sesión, en vez de forzar una sola política en todo el sistema. +- **Comprobaciones de finalización en el límite idle.** Cuando un turno termina, IM.codes puede clasificarlo como `complete`, `continue` o `ask_human` y enviar el siguiente continue prompt dentro de la misma sesión. +- **Automatización fail-closed.** Auto supervision permanece visible en la timeline y en el footer, usa decisiones estructuradas y te devuelve el control si hay timeout, salida inválida o mala configuración. +- **Bucle opcional audit → rework.** En `supervised_audit`, un turno completado puede entrar automáticamente en un pipeline de auditoría y reenviar un brief de retrabajo a la misma sesión antes de devolverte el control. +- **Valores globales + overrides por sesión.** Define una vez el backend/modelo/timeout por defecto del supervisor y, cuando haga falta, sobrescribe backend/modelo/timeout, modo de auditoría e instrucciones personalizadas en cada sesión. +- **Pensado para flujos reales de IM.codes.** Auto supervision entiende flujos de OpenSpec, revisiones P2P y coordinación entre agentes con `imcodes send` como pasos válidos del agente, no como una razón inmediata para parar y pedir a un humano. + ## Funciones ### Terminal remota diff --git a/README.i18n/README.ja.md b/README.i18n/README.ja.md index a89141e97..987f6da70 100644 --- a/README.i18n/README.ja.md +++ b/README.i18n/README.ja.md @@ -2,13 +2,13 @@ [English](../README.md) | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Español](README.es.md) | [Русский](README.ru.md) | [日本語](README.ja.md) | [한국어](README.ko.md) -**AI エージェントのための IM。** +**エージェントのための IM。共有メモリ、監督付き実行、そして AI プロバイダー横断の監査。** -IM.codes は AI コーディングエージェント向けの専用メッセンジャーです。iPhone、iPad、Apple Watch、モバイルや Web から長時間動作する agent session にアクセスし、ターミナル、ファイル閲覧、Git 変更、localhost プレビュー、通知、マルチエージェント連携を扱えます。Claude Code、Codex、Gemini CLI、OpenClaw、Qwen に対応します。 +IM.codes は coding agent のための、プロバイダーをまたぐ共有メモリレイヤーです。完了した作業を再利用可能なコンテキストとして蓄積し、適切な履歴を後続 session に再注入します。対応先は Claude Code、Codex、Gemini CLI、GitHub Copilot、Cursor、OpenCode、OpenClaw、Qwen などで、ターミナル、ファイル閲覧、Git 変更、localhost プレビュー、通知、マルチエージェント連携、transport 系 agent のネイティブストリーミングも備えています。内蔵の Auto supervision は完了済みターンを判定し、自律的な継続や監査/手戻りループまで行ったうえで制御を返せます。P2P ディスカッションを内蔵——複数のモデルが互いの計画と実装をレビュー・監査し合い、単一モデルの見落とし・盲点・バイアスを効果的に減らします。 > これは翻訳版です。**正式な内容は英語版 README(`../README.md`)です。** 差異がある場合は英語版を優先してください。 -Claude Code と Codex はどちらも CLI と SDK の両方で接続できます。 +複数のエージェントが CLI と SDK の両方で接続できます。 ## スクリーンショット @@ -56,7 +56,7 @@ Apple Watch ではセッションの素早い確認、未読件数、push 通知 Download on the App Store -iPhone、iPad、Apple Watch に対応しています。[Web App](https://app.im.codes) と `npm install -g imcodes` による daemon CLI も利用できます。 +iPhone、iPad、Apple Watch に対応しています。[Web App](https://app.im.codes) も利用できます。 ## なぜ作ったか @@ -72,11 +72,22 @@ IM.codes は完了済みのエージェント作業を継続的に再利用可 - **保存するのは 問題 → 解決 の要約であり、ログのノイズではありません。** 記憶化されるのは最終的な `assistant.text` のみで、ストリーミング delta、tool call、tool result、中間ノイズは除外されます。 - **個人メモリは任意でクラウド同期できます。** 生データと処理済みメモリは常にローカルに残り、処理済み要約だけをユーザー単位のクラウドプールへ同期してデバイス間で共有できます。 -- **Enterprise Shared Context は検索・閲覧可能です。** チームは知見を workspace / project スコープに公開し、UI 上で検索・統計確認できるため、見えない prompt 文字列として埋め込まれたままになりません。 +- **Enterprise Shared Context は検索・閲覧可能です。** チームは知見を workspace / project スコープに公開し、UI 上で検索・統計確認できるため、見えない prompt 文字列として埋め込まれたままになりません。これはまだ継続開発中で、完全な本番テストは終わっていません。 - **多言語リコール。** ローカルのセマンティック検索と pgvector ベースのサーバーリコールは多言語 embedding を使うため、日本語・英語・中国語・韓国語・スペイン語・ロシア語をまたいで関連修正を見つけられます。 - **メッセージ送信時とセッション起動時に自動注入。** 関連履歴は送信前と起動時の両方で自動注入され、timeline カードに注入理由、関連度スコア、再利用回数、最終使用時刻まで表示されます。 - **ユーザーから見えて制御できる。** Shared Context UI では raw events、processed summaries、cloud memory、enterprise memory を分けて表示し、検索、プレビュー、archive/restore、処理設定を操作できます。 +## 監督付き実行と Auto Audit + +IM.codes は、自分で書いた supervisor の指示で、対応する agent session をターン単位で駆動できます —— 各完了ターンを idle 境界で構造化判定し、auto-continue するか、制御を返すか、audit ループを起動するかを決定します。毎ラウンド手動で "continue" を打つ必要はありません。 + +- **セッション単位の Auto モード。** `off`、`supervised`、`supervised_audit` をセッションごとに設定でき、全体に一つの方針を強制しません。 +- **idle 境界での完了判定。** ターン完了時に IM.codes は `complete`、`continue`、`ask_human` を判定し、次の continue prompt を同じ session に送り返せます。 +- **fail-closed な自動化。** Auto supervision は timeline/footer に可視のまま残り、構造化された判定を使い、タイムアウト・不正出力・設定不備時には推測せずユーザーへ制御を返します。 +- **任意の audit → rework ループ。** `supervised_audit` では、完了ターンを自動で監査パイプラインに通し、必要なら同じ session に手戻り brief を戻してから制御を返せます。 +- **グローバル既定値 + セッションごとの上書き。** 既定の supervisor backend/model/timeout を一度決めておき、必要に応じて backend/model/timeout・監査モード・カスタム指示を各 session で上書きできます。 +- **実際の IM.codes workflow を前提。** Auto supervision は OpenSpec 作業、P2P レビュー/議論、`imcodes send` によるエージェント間連携を「人間待ち」の理由ではなく、エージェントが続けるべき正当な次の一手として扱います。 + ## 主な機能 ### リモートターミナル diff --git a/README.i18n/README.ko.md b/README.i18n/README.ko.md index 5e7d0680e..7d85c8a66 100644 --- a/README.i18n/README.ko.md +++ b/README.i18n/README.ko.md @@ -2,13 +2,13 @@ [English](../README.md) | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Español](README.es.md) | [Русский](README.ru.md) | [日本語](README.ja.md) | [한국어](README.ko.md) -**AI 에이전트를 위한 IM.** +**에이전트를 위한 IM. 공유 메모리, 감독된 실행, 그리고 AI 제공자 전반의 교차 감사.** -IM.codes는 AI 코딩 에이전트를 위한 전용 메신저입니다. iPhone, iPad, Apple Watch, 모바일이나 웹에서 장시간 실행 중인 agent session에 접근해 터미널, 파일 브라우징, Git 변경 보기, localhost 미리보기, 알림, 멀티 에이전트 워크플로를 사용할 수 있습니다. Claude Code, Codex, Gemini CLI, OpenClaw, Qwen을 지원합니다. +IM.codes는 coding agent를 위한, provider를 가로지르는 공유 메모리 레이어입니다. 완료된 작업을 재사용 가능한 컨텍스트로 축적하고, 적절한 기록을 이후 session에 다시 주입합니다. Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor, OpenCode, OpenClaw, Qwen 등을 지원하며, 터미널, 파일 브라우징, Git 보기, localhost 미리보기, 알림, 멀티 에이전트 워크플로우, transport 기반 agent의 네이티브 스트리밍 출력도 함께 제공합니다. 내장된 Auto supervision은 완료된 턴을 판정하고, 자동 계속과 감사/재작업 루프까지 수행한 뒤 제어를 돌려줄 수 있습니다. P2P 토론 기능 내장 — 여러 모델이 서로의 계획과 구현을 리뷰하고 감사하여, 단일 모델의 누락·맹점·편향을 효과적으로 줄입니다. > 이 문서는 번역본입니다. **기준 문서는 영어 README(`../README.md`)입니다.** 차이가 있으면 영어판을 우선합니다. -Claude Code와 Codex는 이제 CLI와 SDK 두 방식 모두로 연결할 수 있습니다. +여러 에이전트가 CLI와 SDK 두 방식 모두로 연결될 수 있습니다. ## 스크린샷 @@ -56,7 +56,7 @@ Apple Watch에서는 세션 빠른 확인, 읽지 않음 개수, 푸시 알림, Download on the App Store -iPhone, iPad, Apple Watch를 지원합니다. [Web App](https://app.im.codes) 과 `npm install -g imcodes` 기반 daemon CLI도 사용할 수 있습니다. +iPhone, iPad, Apple Watch를 지원합니다. [Web App](https://app.im.codes) 도 사용할 수 있습니다. ## 왜 필요한가 @@ -72,11 +72,22 @@ IM.codes는 완료된 에이전트 작업을 계속 재사용 가능한 메모 - **저장되는 것은 문제 → 해결 요약이지 로그 잡음이 아닙니다.** 메모리화되는 것은 최종 `assistant.text` 뿐이며, 스트리밍 delta, tool call, tool result, 중간 잡음은 제외됩니다. - **개인 메모리는 선택적으로 클라우드 동기화할 수 있습니다.** 원본과 처리된 메모리는 항상 로컬에 남고, 처리된 요약만 사용자 단위 클라우드 풀에 동기화해 여러 기기에서 공유할 수 있습니다. -- **Enterprise Shared Context는 검색하고 확인할 수 있습니다.** 팀은 지식을 workspace / project 범위에 게시하고 UI에서 검색과 통계를 볼 수 있으므로, 보이지 않는 prompt 문자열로만 남지 않습니다. +- **Enterprise Shared Context는 검색하고 확인할 수 있습니다.** 팀은 지식을 workspace / project 범위에 게시하고 UI에서 검색과 통계를 볼 수 있으므로, 보이지 않는 prompt 문자열로만 남지 않습니다. 이 부분은 아직 계속 개발 중이며 완전한 프로덕션 테스트는 끝나지 않았습니다. - **다국어 리콜.** 로컬 의미 검색과 pgvector 기반 서버 리콜이 다국어 embedding을 사용하므로 한국어, 영어, 중국어, 일본어, 스페인어, 러시아어 사이에서도 관련 수정 이력을 찾을 수 있습니다. - **메시지 전송 시와 세션 시작 시 자동 주입.** 관련 기록은 전송 전과 시작 시점 모두에서 자동 주입되며, timeline 카드에 주입 이유, 관련성 점수, 재사용 횟수, 마지막 사용 시각까지 표시됩니다. - **사용자가 보고 제어할 수 있습니다.** Shared Context UI는 raw events, processed summaries, cloud memory, enterprise memory를 분리해 보여주고, 검색, 미리보기, archive/restore, 처리 설정을 제공합니다. +## 감독된 실행과 Auto Audit + +IM.codes는 직접 작성한 supervisor 지시문으로 지원되는 agent session을 턴 단위로 주행할 수 있습니다 —— 각 완료된 턴을 idle 경계에서 구조적으로 판정해 auto-continue, 제어 반환, 또는 audit 루프 발동을 결정하며, 매 라운드마다 "continue"를 직접 입력할 필요가 없습니다. + +- **세션별 Auto 모드.** `off`, `supervised`, `supervised_audit`를 세션마다 설정할 수 있어 하나의 정책을 전체에 강제하지 않습니다. +- **idle 경계에서의 완료 판정.** 한 턴이 끝나면 IM.codes가 `complete`, `continue`, `ask_human`을 판정하고, 다음 continue prompt를 같은 session에 다시 보낼 수 있습니다. +- **fail-closed 자동화.** Auto supervision은 timeline/footer에 보이는 상태로 남고, 구조화된 결정을 사용하며, timeout·잘못된 출력·설정 오류가 있으면 추측하지 않고 사용자에게 제어를 돌려줍니다. +- **선택적 audit → rework 루프.** `supervised_audit`에서는 완료된 턴을 자동 감사 파이프라인으로 보내고, 필요하면 같은 session에 재작업 brief를 넣은 뒤 제어를 돌려줄 수 있습니다. +- **전역 기본값 + 세션별 override.** 기본 supervisor backend/model/timeout을 한 번 정해 두고, 필요할 때 각 session에서 backend/model/timeout, audit 모드, custom instructions를 덮어쓸 수 있습니다. +- **실제 IM.codes workflow를 이해.** Auto supervision은 OpenSpec 작업, P2P 토론/리뷰 흐름, `imcodes send` 기반 에이전트 간 조정을 사람에게 즉시 넘겨야 하는 이유가 아니라, 에이전트가 계속 수행할 수 있는 정상적인 다음 단계로 해석합니다。 + ## 주요 기능 ### 원격 터미널 diff --git a/README.i18n/README.ru.md b/README.i18n/README.ru.md index d3d3cfae7..7d85a9b80 100644 --- a/README.i18n/README.ru.md +++ b/README.i18n/README.ru.md @@ -2,13 +2,13 @@ [English](../README.md) | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Español](README.es.md) | [Русский](README.ru.md) | [日本語](README.ja.md) | [한국어](README.ko.md) -**Слой мессенджера для агентов.** +**IM для агентов. Общая память, контролируемое выполнение и кросс-модельный аудит поверх AI-провайдеров.** -IM.codes — специализированный мессенджер для AI coding agents. Он позволяет держать долгие agent‑сессии под рукой с iPhone, iPad, Apple Watch, телефона или из веба: терминал, файлы, Git, просмотр localhost, уведомления и multi‑agent workflows. Поддерживаются Claude Code, Codex, Gemini CLI, OpenClaw и Qwen. +IM.codes даёт coding agents единый слой памяти поверх разных провайдеров. Он превращает завершённую работу в переиспользуемый контекст и подмешивает нужную историю в будущие session. Поддерживаются Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor, OpenCode, OpenClaw и Qwen, а также терминал, файлы, Git, localhost preview, уведомления, multi-agent workflows и нативный стриминг для transport-агентов. Встроенный Auto supervision умеет оценивать завершённые ходы, продолжать работу автономно и при необходимости запускать цикл audit/rework перед возвратом контроля. Встроенное P2P-обсуждение — несколько моделей взаимно проверяют и аудируют планы и реализации друг друга, эффективно уменьшая пропуски, «слепые зоны» и смещения одной модели. > Это перевод. **Каноническая версия — английский README (`../README.md`).** Если есть расхождения, ориентируйтесь на английский вариант. -Claude Code и Codex теперь поддерживают два способа интеграции: CLI и SDK. +Несколько агентов теперь поддерживают два способа интеграции: CLI и SDK. ## Скриншоты @@ -56,7 +56,7 @@ Claude Code и Codex теперь поддерживают два способа Download on the App Store -Поддерживаются iPhone, iPad и Apple Watch. Также доступно как [web app](https://app.im.codes) и через `npm install -g imcodes` (CLI daemon). +Поддерживаются iPhone, iPad и Apple Watch. Также доступно как [web app](https://app.im.codes). ## Зачем @@ -72,11 +72,22 @@ IM.codes постоянно превращает уже завершённую - **Сохраняется связка проблема → решение, а не шум логов.** В память попадают только финальные `assistant.text`; стриминговые delta, tool call, tool result и промежуточный шум исключаются. - **Личная память с опциональной облачной синхронизацией.** Сырые и обработанные данные всегда остаются локально; обработанные сводки можно по желанию синхронизировать в пользовательский облачный пул, общий для всех ваших устройств. -- **Enterprise Shared Context доступен для поиска и просмотра.** Команды могут публиковать переиспользуемую память в пределах workspace/project, просматривать её в UI, искать и анализировать статистику, а не держать контекст скрытым внутри prompt'ов. +- **Enterprise Shared Context доступен для поиска и просмотра.** Команды могут публиковать переиспользуемую память в пределах workspace/project, просматривать её в UI, искать и анализировать статистику, а не держать контекст скрытым внутри prompt'ов. Эта часть всё ещё активно разрабатывается и ещё не прошла полноценное продакшен-тестирование. - **Многоязычный recall.** Локальный семантический поиск и серверный recall на pgvector используют многоязычные embeddings, поэтому связанные решения находятся между английским, китайским, японским, корейским, испанским, русским и смешанными репозиториями. - **Автоматическая инъекция там, где это важно.** Релевантная история автоматически подмешивается как при отправке сообщения, так и при старте сессии, а карточки timeline показывают, что именно было найдено, почему, score релевантности, число recall и время последнего использования. - **Пользователь видит и контролирует процесс.** UI Shared Context разделяет raw events, processed summaries, cloud memory и enterprise memory и даёт управление поиском, preview, archive/restore и настройками обработки. +## Контролируемое выполнение и Auto Audit + +IM.codes может вести поддерживаемые agent session ход за ходом с помощью вашего собственного supervisor-промпта — на каждой idle-границе структурно оценивается завершённый ход и принимается решение auto-continue, вернуть управление или запустить audit-цикл, вместо того чтобы вы вручную набирали "continue" каждый раунд. + +- **Режимы Auto на уровне session.** Можно настраивать `off`, `supervised` и `supervised_audit` для каждой session отдельно, не навязывая одну политику всем. +- **Проверка завершения на границе idle.** Когда ход заканчивается, IM.codes может классифицировать его как `complete`, `continue` или `ask_human` и отправить следующий continue prompt в ту же session. +- **Fail-closed автоматизация.** Auto supervision остаётся видимым в timeline/footer, использует структурированные решения и возвращает управление пользователю при timeout, невалидном выводе или плохой конфигурации вместо догадок. +- **Опциональный цикл audit → rework.** В `supervised_audit` завершённый ход может автоматически перейти в аудит, а brief на доработку вернётся в ту же session до возврата управления. +- **Глобальные значения по умолчанию + переопределение на уровне session.** Один раз задайте default backend/model/timeout для supervisor, а при необходимости переопределяйте backend/model/timeout, режим audit и пользовательские инструкции для конкретной session. +- **Понимание реальных workflow IM.codes.** Auto supervision понимает OpenSpec-задачи, P2P review/discussion и координацию через `imcodes send` как нормальные следующие действия агента, а не как повод немедленно остановиться и ждать человека. + ## Возможности ### Удалённый терминал diff --git a/README.i18n/README.zh-CN.md b/README.i18n/README.zh-CN.md index c795fb27b..d71d84e30 100644 --- a/README.i18n/README.zh-CN.md +++ b/README.i18n/README.zh-CN.md @@ -3,13 +3,13 @@ [English](../README.md) | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Español](README.es.md) | [Русский](README.ru.md) | [日本語](README.ja.md) | [한국어](README.ko.md) -**Agent 的即时通讯层。** +**给 AI agent 的 IM。共享记忆、受监督执行,以及跨模型审计。** -IM.codes 是一个面向 AI 编码代理的专用即时通讯器。你可以在 iPhone、iPad、Apple Watch、手机或网页上持续查看长时间运行的 agent 会话,直接访问终端、浏览文件、查看 Git 变更、预览本地 localhost、接收通知,并进行多 agent 协作。支持 [Claude Code](https://github.com/anthropics/claude-code)、[Codex](https://github.com/openai/codex)、[Gemini CLI](https://github.com/google-gemini/gemini-cli)、[OpenClaw](https://openclaw.com)、[Qwen](https://github.com/QwenLM/qwen-agent) 等,也支持 transport 型 agent 的原生流式输出。 +IM.codes 为 coding agent 提供一套跨 provider 共享的记忆层。它会把已完成的工作沉淀成可复用上下文,再把合适的历史注入后续 session,贯通 [Claude Code](https://github.com/anthropics/claude-code)、[Codex](https://github.com/openai/codex)、[Gemini CLI](https://github.com/google-gemini/gemini-cli)、GitHub Copilot、Cursor、OpenCode、[OpenClaw](https://openclaw.com)、[Qwen](https://github.com/QwenLM/qwen-agent) 等,同时提供终端访问、文件浏览、Git 视图、localhost 预览、通知、多 agent 工作流,以及 transport 型 agent 的原生流式输出。内置 Auto supervision 可在每轮完成后判断任务是否完成、是否继续自动执行,并可选进入审计/返工闭环后再把控制权交还给你。内置 P2P 讨论功能,让多个模型相互审阅对方的方案和实现,能有效减少单模型的遗漏、盲点和偏差。 > **说明:** 本文件是中文翻译版。**英文 README(`../README.md`)是规范版本。** 若内容存在差异,以英文版为准。 -Claude Code 和 Codex 现在都支持两种接入方式:CLI 和 SDK。 +支持多个 agent 通过 CLI 和 SDK 两种方式接入。 ## 截图 @@ -58,7 +58,7 @@ Claude Code 和 Codex 现在都支持两种接入方式:CLI 和 SDK。 Download on the App Store -支持 iPhone、iPad 和 Apple Watch。也可以通过 [Web App](https://app.im.codes) 使用,或通过 `npm install -g imcodes` 安装 daemon CLI。 +支持 iPhone、iPad 和 Apple Watch。也可以通过 [Web App](https://app.im.codes) 使用。 ## 为什么做这个 @@ -76,11 +76,22 @@ IM.codes 会持续把已完成的代理工作沉淀成可复用记忆,并在 - **保存的是问题 → 解决方案,不是日志噪音。** 只有最终 `assistant.text` 会进入记忆;流式 delta、tool call、tool result 和中间噪音都会被排除。 - **个人记忆支持可选云同步。** 原始和处理后的记忆始终保留在本地;处理后的摘要可以按需同步到用户级云端池,在多台设备之间共享。 -- **企业共享上下文可查询、可检查。** 团队可以把经验发布到 workspace/project 作用域,在 UI 里查询、查看统计,而不是把上下文藏在不可见的 prompt 里。 +- **企业共享上下文可查询、可检查。** 团队可以把经验发布到 workspace/project 作用域,在 UI 里查询、查看统计,而不是把上下文藏在不可见的 prompt 里。这部分仍在持续开发中,还没有经过完整的生产级测试。 - **多语言召回。** 本地语义搜索和基于 pgvector 的服务端召回使用多语言 embedding,可以跨中英日韩西俄等语言找到相关修复经验。 - **按消息和按会话启动自动注入。** 相关历史会在发送消息前和 session 启动时自动注入,并通过 timeline 卡片显示召回内容、原因、相关性分数、召回次数和最后使用时间。 - **用户可见、可控。** Shared Context UI 分离 raw events、processed summaries、cloud memory 和 enterprise memory,并提供查询、预览、archive/restore 与处理配置控制。 +## 受监督执行与 Auto Audit + +IM.codes 可用你自己的 supervisor 提示词对支持的 agent session 做逐轮驱动 —— 每一轮 idle 边界上结构化判定是 auto-continue、交还给你,还是触发一次 audit 闭环,而不是让你每轮手动打 "continue"。 + +- **按 session 配置 Auto 模式。** 可以为每个 session 单独设置 `off`、`supervised` 或 `supervised_audit`,而不是对所有会话强行使用同一套策略。 +- **在 idle 边界做完成判定。** 当一轮完成后,IM.codes 会把结果判成 `complete`、`continue` 或 `ask_human`,并把后续 continue prompt 直接发回同一 session。 +- **失败即回退的自动化。** Auto supervision 会保持在 timeline/footer 中可见,使用结构化判定,并在超时、输出无效或配置错误时把控制权还给你,而不是默默猜测。 +- **可选的 audit → rework 闭环。** 在 `supervised_audit` 中,已完成的回合可自动进入审计流程,并在交还控制权前把返工 brief 发回同一 session。 +- **全局默认值 + 单 session 覆盖。** 你可以先设置默认的 supervisor backend/model/timeout,再按需在某个 session 上覆盖 backend/model/timeout、审计模式和自定义提示词。 +- **理解 IM.codes 原生工作流。** Auto supervision 会把 OpenSpec 工作流、P2P 讨论/评审流程,以及 `imcodes send` 式的 agent 协作视为正常下一步,而不是立即停下来要求人工介入。 + ## 功能 ### 远程终端 diff --git a/README.i18n/README.zh-TW.md b/README.i18n/README.zh-TW.md index 45b380b2c..6eeb88c77 100644 --- a/README.i18n/README.zh-TW.md +++ b/README.i18n/README.zh-TW.md @@ -3,13 +3,13 @@ [English](../README.md) | [簡體中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Español](README.es.md) | [Русский](README.ru.md) | [日本語](README.ja.md) | [한국어](README.ko.md) -**Agent 的即時通訊層。** +**給 AI agent 的 IM。共享記憶、受監督執行,以及跨模型審計。** -IM.codes 是一个面向 AI 编码代理的專用即時通訊器。你可以在 iPhone、iPad、Apple Watch、手機或網頁上持续檢視长时间运行的 agent 会话,直接访问终端、瀏覽文件、檢視 Git 變更、預覽本地 localhost、接收通知,并进行多 agent 协作。支持 [Claude Code](https://github.com/anthropics/claude-code)、[Codex](https://github.com/openai/codex)、[Gemini CLI](https://github.com/google-gemini/gemini-cli)、[OpenClaw](https://openclaw.com)、[Qwen](https://github.com/QwenLM/qwen-agent) 等,也支持 transport 型 agent 的原生流式输出。 +IM.codes 為 coding agent 提供一套跨 provider 共享的記憶層。它會把已完成的工作沉澱成可重用上下文,再把合適的歷史注入後續 session,貫通 [Claude Code](https://github.com/anthropics/claude-code)、[Codex](https://github.com/openai/codex)、[Gemini CLI](https://github.com/google-gemini/gemini-cli)、GitHub Copilot、Cursor、OpenCode、[OpenClaw](https://openclaw.com)、[Qwen](https://github.com/QwenLM/qwen-agent) 等,同時提供終端存取、檔案瀏覽、Git 視圖、localhost 預覽、通知、多 agent 工作流,以及 transport 型 agent 的原生串流輸出。內建 Auto supervision 可在每輪完成後判斷任務是否完成、是否繼續自動執行,並可選進入審計/返工閉環後再把控制權交還給你。內建 P2P 討論功能,讓多個模型互相審閱對方的方案和實作,能有效減少單模型的遺漏、盲點和偏差。 > **說明:** 本文件是中文翻译版。**英文 README(`../README.md`)是規範版本。** 若内容存在差异,以英文版为准。 -Claude Code 和 Codex 現在都支援兩種接入方式:CLI 和 SDK。 +支援多個 agent 透過 CLI 和 SDK 兩種方式接入。 ## 截圖 @@ -58,7 +58,7 @@ Claude Code 和 Codex 現在都支援兩種接入方式:CLI 和 SDK。 Download on the App Store -支持 iPhone、iPad 和 Apple Watch。也可以通过 [Web App](https://app.im.codes) 使用,或通过 `npm install -g imcodes` 安裝 daemon CLI。 +支持 iPhone、iPad 和 Apple Watch。也可以通过 [Web App](https://app.im.codes) 使用。 ## 為什麼做這個 @@ -76,11 +76,22 @@ IM.codes 會持續把已完成的代理工作沉澱成可重用記憶,並在 - **保存的是問題 → 解決方案,不是日誌噪音。** 只有最終 `assistant.text` 會進入記憶;串流 delta、tool call、tool result 和中間噪音都會被排除。 - **個人記憶支援可選雲端同步。** 原始與處理後的記憶始終保留在本地;處理後的摘要可以按需同步到使用者級雲端池,在多台裝置之間共享。 -- **企業共享上下文可查詢、可檢視。** 團隊可以把經驗發佈到 workspace/project 範圍,在 UI 中查詢、查看統計,而不是把上下文藏在不可見的 prompt 裡。 +- **企業共享上下文可查詢、可檢視。** 團隊可以把經驗發佈到 workspace/project 範圍,在 UI 中查詢、查看統計,而不是把上下文藏在不可見的 prompt 裡。這部分仍在持續開發中,還沒有經過完整的生產級測試。 - **多語言召回。** 本地語意搜尋與基於 pgvector 的伺服器召回使用多語言 embedding,可以跨中英日韓西俄等語言找到相關修復經驗。 - **按訊息與按工作階段啟動自動注入。** 相關歷史會在送出訊息前和 session 啟動時自動注入,並透過 timeline 卡片顯示召回內容、原因、相關性分數、召回次數和最後使用時間。 - **使用者可見、可控。** Shared Context UI 分離 raw events、processed summaries、cloud memory 和 enterprise memory,並提供查詢、預覽、archive/restore 與處理設定控制。 +## 受監督執行與 Auto Audit + +IM.codes 可用你自己的 supervisor 提示詞對支援的 agent session 做逐輪驅動 —— 每一輪 idle 邊界上結構化判定是 auto-continue、交還給你,還是觸發一次 audit 閉環,而不是讓你每輪手動打 "continue"。 + +- **按 session 設定 Auto 模式。** 可以為每個 session 單獨設定 `off`、`supervised` 或 `supervised_audit`,而不是對所有會話強制使用同一套策略。 +- **在 idle 邊界做完成判定。** 當一輪完成後,IM.codes 會把結果判成 `complete`、`continue` 或 `ask_human`,並把後續 continue prompt 直接送回同一 session。 +- **失敗即回退的自動化。** Auto supervision 會保持在 timeline/footer 中可見,使用結構化判定,並在逾時、輸出無效或配置錯誤時把控制權還給你,而不是默默猜測。 +- **可選的 audit → rework 閉環。** 在 `supervised_audit` 中,已完成的回合可自動進入審計流程,並在交還控制權前把返工 brief 送回同一 session。 +- **全域預設值 + 單 session 覆蓋。** 你可以先設定預設的 supervisor backend/model/timeout,再按需在某個 session 上覆蓋 backend/model/timeout、審計模式和自訂提示詞。 +- **理解 IM.codes 原生工作流。** Auto supervision 會把 OpenSpec 工作流、P2P 討論/評審流程,以及 `imcodes send` 式的 agent 協作視為正常下一步,而不是立即停下來要求人工介入。 + ## 功能 ### 遠端終端 diff --git a/README.md b/README.md index 03728c754..4b7c42ebb 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [English](README.md) | [简体中文](README.i18n/README.zh-CN.md) | [繁體中文](README.i18n/README.zh-TW.md) | [Español](README.i18n/README.es.md) | [Русский](README.i18n/README.ru.md) | [日本語](README.i18n/README.ja.md) | [한국어](README.i18n/README.ko.md) -**The IM for agents.** +**The IM for agents. Shared memory, supervised execution, and cross-agent audit across AI providers.** -A specialized instant messenger for AI agents. Keep long-running coding-agent sessions within reach from iPhone, iPad, Apple Watch, mobile, or web, with terminal access, file browsing, git views, localhost preview, notifications, multi-agent workflows, and shared agent memory built in. Works with [Claude Code](https://github.com/anthropics/claude-code) and [Codex](https://github.com/openai/codex) via both CLI and SDK integrations, plus [Gemini CLI](https://github.com/google-gemini/gemini-cli), [OpenClaw](https://openclaw.com), [Qwen](https://github.com/QwenLM/qwen-agent), and more — including native streaming output for transport-backed agents. +IM.codes gives coding agents one shared memory layer across providers. It turns completed work into reusable context, then injects the right history back into future sessions across [Claude Code](https://github.com/anthropics/claude-code), [Codex](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), GitHub Copilot, Cursor, OpenCode, [OpenClaw](https://openclaw.com), [Qwen](https://github.com/QwenLM/qwen-agent), and more — with terminal access, file browsing, git views, localhost preview, notifications, multi-agent workflows, and native streaming output for transport-backed agents. Built-in Auto supervision can judge completed turns, continue work autonomously, and optionally run an audit/rework loop before handing control back. P2P discussion lets multiple models review and audit each other's plans and implementations — an effective way to reduce single-model misses, blind spots, and biases. > **Disclaimer:** This is an actively developed personal open-source project. There are no warranties, no SLA, and no guarantees of stability, security, or backward compatibility. Use at your own risk. Breaking changes may happen at any time without notice. @@ -63,7 +63,7 @@ Watch support covers quick session monitoring, unread counts, push notifications Download on the App Store -Supports iPhone, iPad, and Apple Watch. Also available as a [web app](https://app.im.codes) and via `npm install -g imcodes` (daemon CLI). +Supports iPhone, iPad, and Apple Watch. Also available as a [web app](https://app.im.codes). ## Why @@ -81,11 +81,23 @@ IM.codes continuously turns completed agent work into reusable memory and feeds - **Problem → solution memory, not log spam.** Only final `assistant.text` outputs are materialized. Streaming deltas, tool calls, and intermediate noise are excluded. - **Personal memory with optional cloud sync.** Raw and processed memory always stay local; processed summaries can optionally sync to a user-scoped cloud pool shared across your devices. -- **Enterprise shared context.** Teams can publish reusable memory into workspace/project scopes, inspect it in the UI, query it, and see stats instead of treating context as hidden prompt text. +- **Enterprise shared context.** Teams can publish reusable memory into workspace/project scopes, inspect it in the UI, query it, and see stats instead of treating context as hidden prompt text. This part is still under active development and has not been fully production-tested yet. - **Multilingual recall.** Local semantic search and server-side pgvector recall use multilingual embeddings, so related fixes can be found across English, Chinese, Japanese, Korean, Spanish, Russian, and mixed-language repos. - **Automatic injection where it matters.** Relevant past work is injected both per-message and at session startup, with timeline cards that show what was recalled, why, the relevance score, recall count, and last-used time. - **User-visible inspection and control.** Shared Context UI separates raw events, processed summaries, cloud memory, and enterprise memory, with query, preview, archive/restore, and processing configuration controls. +## Supervised Execution & Auto Audit + +IM.codes can drive supported agent sessions turn by turn — a supervisor with your own instructions evaluates each completed turn at the idle boundary and decides to auto-continue, hand back, or trigger an audit loop, instead of you typing "continue" every round. + +- **Per-session Auto modes.** Configure `off`, `supervised`, or `supervised_audit` per session instead of forcing one policy everywhere. +- **Completion checks at the idle boundary.** When a turn finishes, IM.codes can classify it as `complete`, `continue`, or `ask_human`, then dispatch the next continue prompt inside the same session. +- **Fail-closed automation.** Auto supervision stays visible in the timeline/footer, uses structured decisions, and returns control to you on timeout, invalid output, or bad config instead of silently guessing. +- **Optional audit → rework loop.** In `supervised_audit`, a completed turn can automatically enter an audit pipeline and send a rework brief back into the same session before control returns. +- **Global defaults seed new sessions.** Set your default supervisor backend, model, and timeout once. New `supervised` / `supervised_audit` sessions snapshot them at enable time, and each session can still override backend/model/timeout and audit mode individually. +- **Two-layer custom supervision instructions.** Keep a global supervision persona alongside a per-session addition. By default the two are concatenated (`global`, blank line, then `session`); tick the session's **Override global** checkbox to ignore the global value for that one session. Unlike backend/model/timeout, the global value is re-read on every dispatch, so editing it takes effect on already-enabled sessions without a re-enable. +- **Built for real IM.codes workflows.** Auto supervision understands OpenSpec work, P2P discussion/review flows, and `imcodes send`-style cross-agent coordination as valid agent actions, not immediate reasons to stop for a human. + ## Features ### Remote Terminal @@ -104,6 +116,12 @@ Preview your local dev server from any device — phone, tablet, or remote brows Full mobile support with biometric auth and push notifications. Shell sessions allow interactive keyboard input on mobile (SSH-like). Sub-session preview cards always show latest messages. Toast notifications navigate directly to the relevant session. Apple Watch support adds quick session monitoring, unread counts, and quick replies from the wrist. +### Supervised Task Automation + +Auto supervision adds turn-level control for supported transport-backed agents. Instead of blindly continuing forever, IM.codes evaluates the latest completed turn and decides whether the task looks done, should keep going, or should come back to you. For higher-assurance work, `supervised_audit` can automatically trigger an audit/rework loop before the session is considered finished. + +Auto supervision splits configuration into two layers. Backend, model, and timeout are **snapshot-frozen** at the moment you enable Auto on a session, so editing the global defaults later never surprises an already-running session. Custom supervision instructions work differently: a **global persona** is paired with the session's own free text and — by default — both are concatenated into the prompt sent to the supervisor. Tick the session's **Override global** checkbox to have that session ignore the global persona entirely. The global persona is re-read on every turn, so when you update it every already-enabled session picks it up on the next dispatch without needing a re-enable. Auto is also aware of IM.codes-native workflows such as OpenSpec changes, P2P discussions, and `imcodes send`, so those actions count as legitimate next steps instead of accidental "ask human" triggers. + ### Multi-Agent Discussions & Cross-Provider Audit Single-model output shouldn't be trusted blindly. P2P discussions let multiple agents — across different providers and thinking styles — collaborate on the same codebase before a single line is written. Each round follows a customizable multi-phase pipeline where every agent reads all prior contributions and builds on them. Different models catch different classes of issues: one spots a race condition, another flags a missing migration, a third questions the API design. This cross-provider scrutiny catches the majority of problems before implementation, dramatically reducing rework cycles. diff --git a/landing/index.html b/landing/index.html index a620e4ed2..b1ad7d619 100644 --- a/landing/index.html +++ b/landing/index.html @@ -3,8 +3,8 @@ -IM.codes — The IM for agents - +IM.codes — The IM for agents. Shared memory, supervised execution, and cross-agent audit across AI providers. +