Skip to content
Merged

Dev #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.i18n/README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

El `docker-compose.yml` generado ya usa `pgvector/pgvector:pg16` para PostgreSQL.
El `docker-compose.yml` generado ya usa `pgvector/pgvector:pg18` para PostgreSQL.

## Windows (experimental)

Expand Down
2 changes: 1 addition & 1 deletion README.i18n/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

生成される `docker-compose.yml` は PostgreSQL に `pgvector/pgvector:pg16` を使用します。
生成される `docker-compose.yml` は PostgreSQL に `pgvector/pgvector:pg18` を使用します。

## Windows(実験的)

Expand Down
2 changes: 1 addition & 1 deletion README.i18n/README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

생성되는 `docker-compose.yml` 은 PostgreSQL 이미지로 `pgvector/pgvector:pg16` 을 사용합니다.
생성되는 `docker-compose.yml` 은 PostgreSQL 이미지로 `pgvector/pgvector:pg18` 을 사용합니다.

## Windows (실험적)

Expand Down
2 changes: 1 addition & 1 deletion README.i18n/README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

Сгенерированный `docker-compose.yml` уже использует `pgvector/pgvector:pg16` для PostgreSQL.
Сгенерированный `docker-compose.yml` уже использует `pgvector/pgvector:pg18` для PostgreSQL.

## Windows (экспериментально)

Expand Down
2 changes: 1 addition & 1 deletion README.i18n/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

生成的 `docker-compose.yml` 已经默认使用 `pgvector/pgvector:pg16` 作为 PostgreSQL 镜像。
生成的 `docker-compose.yml` 已经默认使用 `pgvector/pgvector:pg18` 作为 PostgreSQL 镜像。

然后访问 `https://your-domain`,使用 `admin` 和打印出来的密码登录。之后使用 `imcodes bind` 绑定你的开发机。

Expand Down
2 changes: 1 addition & 1 deletion README.i18n/README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

產生的 `docker-compose.yml` 已經預設使用 `pgvector/pgvector:pg16` 作為 PostgreSQL 映像。
產生的 `docker-compose.yml` 已經預設使用 `pgvector/pgvector:pg18` 作為 PostgreSQL 映像。

然后访问 `https://your-domain`,使用 `admin` 和打印出来的密码登录。之后使用 `imcodes bind` 绑定你的开发机。

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ IM.codes gives coding agents one shared memory layer across providers. It turns

### Breaking Changes

- **PostgreSQL image changed to `pgvector/pgvector:pg16`** (was `postgres:16-alpine`). Required for multilingual vector search in shared agent memory. Existing self-hosted deployments must update their `docker-compose.yml`:
- **PostgreSQL default image changed to `pgvector/pgvector:pg18`** (instead of `postgres:16-alpine`). New self-hosted deployments generated from the current templates use this image for multilingual vector search in shared agent memory:
```yaml
postgres:
image: pgvector/pgvector:pg16 # was: postgres:16-alpine
image: pgvector/pgvector:pg18 # was: postgres:16-alpine
```
This is a drop-in replacement — data volumes are fully compatible. The pgvector extension is enabled automatically by the server migration on first startup.
The pgvector extension is enabled automatically by the server migration on first startup.

## Screenshots

Expand Down Expand Up @@ -309,7 +309,7 @@ git clone https://github.com/im4codes/imcodes.git && cd imcodes
docker compose up -d
```

The generated `docker-compose.yml` already uses `pgvector/pgvector:pg16` for PostgreSQL.
The generated `docker-compose.yml` already uses `pgvector/pgvector:pg18` for PostgreSQL.

Login at `https://your-domain` with `admin` and the printed password. Bind your dev machine with `imcodes bind`.

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
postgres:
image: pgvector/pgvector:pg16
image: pgvector/pgvector:pg18
restart: unless-stopped
environment:
POSTGRES_DB: imcodes
Expand Down
16 changes: 8 additions & 8 deletions landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ <h2 data-i18n="h_selfhost">self-host</h2>
<div class="code-block">git clone https://github.com/im4codes/imcodes.git && cd imcodes
./gen-env.sh imc.example.com <span class="comment"># generates .env, prints admin password</span>
docker compose up -d</div>
<p style="color:var(--dim); font-size:12px; margin-top:8px;" data-i18n="sh_manual_pgvector">Generated docker-compose.yml uses pgvector/pgvector:pg16 for PostgreSQL.</p>
<p style="color:var(--dim); font-size:12px; margin-top:8px;" data-i18n="sh_manual_pgvector">Generated docker-compose.yml uses pgvector/pgvector:pg18 for PostgreSQL.</p>
</section>

<section>
Expand Down Expand Up @@ -513,7 +513,7 @@ <h2 data-i18n="h_about">about</h2>
oc_4: 'Saved to <code>~/.imcodes/openclaw.json</code> so the daemon can reconnect automatically',
oc_5: 'Use <code>imcodes disconnect openclaw</code> to remove the saved config',
oc_note: 'Only tested on macOS so far. Remote plain-text <code>ws://</code> URLs require <code>--insecure</code>.',
sh_manual_pgvector: 'Generated docker-compose.yml uses pgvector/pgvector:pg16 for PostgreSQL.',
sh_manual_pgvector: 'Generated docker-compose.yml uses pgvector/pgvector:pg18 for PostgreSQL.',
},
'zh-CN': {
tagline: '给 AI agent 的 IM。共享记忆、受监督执行,以及跨模型审计。',
Expand Down Expand Up @@ -584,7 +584,7 @@ <h2 data-i18n="h_about">about</h2>
oc_note: '目前只在 macOS 上测试过。远程明文 <code>ws://</code> 地址需要加 <code>--insecure</code>。',
sh_intro: '在一台机器上部署服务端和守护进程。需要 Docker 和指向该服务器的域名。',
sh_desc: '自动生成配置、启动 PostgreSQL + 服务端 + Caddy(自动 HTTPS)、创建管理员账户并绑定本地守护进程。凭证在最后打印。',
sh_connect: '连接其他机器:', sh_manual: '手动部署:', sh_manual_pgvector: '生成的 docker-compose.yml 已默认使用 pgvector/pgvector:pg16 作为 PostgreSQL 镜像。',
sh_connect: '连接其他机器:', sh_manual: '手动部署:', sh_manual_pgvector: '生成的 docker-compose.yml 已默认使用 pgvector/pgvector:pg18 作为 PostgreSQL 镜像。',
req_os: 'macOS、Linux 或 Windows(原生试验性;<a href="https://learn.microsoft.com/en-us/windows/wsl/">WSL</a> 完全支持)',
req_mux: 'tmux(Linux/macOS/WSL)。Windows 原生使用 ConPTY(内置)。',
about_text: '个人项目。几乎完全由 <a href="https://github.com/anthropics/claude-code">Claude Code</a> 构建,<a href="https://github.com/openai/codex">Codex</a> 和 <a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a> 也有重要贡献。',
Expand Down Expand Up @@ -659,7 +659,7 @@ <h2 data-i18n="h_about">about</h2>
oc_note: '目前只在 macOS 上測試過。遠端明文 <code>ws://</code> 位址需要加上 <code>--insecure</code>。',
sh_intro: '在一台機器上部署伺服器和守護程序。需要 Docker 和指向該伺服器的網域。',
sh_desc: '自動產生設定、啟動 PostgreSQL + 伺服器 + Caddy(自動 HTTPS)、建立管理員帳戶並綁定本地守護程序。憑證在最後列印。',
sh_connect: '連接其他機器:', sh_manual: '手動部署:', sh_manual_pgvector: '產生的 docker-compose.yml 已經預設使用 pgvector/pgvector:pg16 作為 PostgreSQL 映像。',
sh_connect: '連接其他機器:', sh_manual: '手動部署:', sh_manual_pgvector: '產生的 docker-compose.yml 已經預設使用 pgvector/pgvector:pg18 作為 PostgreSQL 映像。',
req_os: 'macOS、Linux 或 Windows(原生試驗性;<a href="https://learn.microsoft.com/en-us/windows/wsl/">WSL</a> 完全支援)',
req_mux: 'tmux(Linux/macOS/WSL)。Windows 原生使用 ConPTY(內建)。',
about_text: '個人專案。幾乎完全由 <a href="https://github.com/anthropics/claude-code">Claude Code</a> 建構,<a href="https://github.com/openai/codex">Codex</a> 和 <a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a> 也有重要貢獻。',
Expand Down Expand Up @@ -734,7 +734,7 @@ <h2 data-i18n="h_about">about</h2>
oc_note: 'Only tested on macOS so far. Remote plain-text <code>ws://</code> URLs require <code>--insecure</code>.',
sh_intro: '1台のマシンにサーバーとデーモンをデプロイ。DockerとDNS設定済みのドメインが必要です。',
sh_desc: '設定を自動生成、PostgreSQL + サーバー + Caddy(自動HTTPS)を起動、管理者アカウントを作成しローカルデーモンをバインド。認証情報は最後に表示されます。',
sh_connect: '追加マシンの接続:', sh_manual: '手動セットアップ:', sh_manual_pgvector: '生成される docker-compose.yml は PostgreSQL に pgvector/pgvector:pg16 を使用します。',
sh_connect: '追加マシンの接続:', sh_manual: '手動セットアップ:', sh_manual_pgvector: '生成される docker-compose.yml は PostgreSQL に pgvector/pgvector:pg18 を使用します。',
req_os: 'macOS、Linux、または Windows(ネイティブは実験的、<a href="https://learn.microsoft.com/en-us/windows/wsl/">WSL</a> は完全対応)',
req_mux: 'tmux(Linux/macOS/WSL)。Windows ネイティブは ConPTY(組み込み)を使用。',
about_text: '個人プロジェクト。ほぼ全てを <a href="https://github.com/anthropics/claude-code">Claude Code</a> が構築、<a href="https://github.com/openai/codex">Codex</a> と <a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a> も重要な貢献。',
Expand Down Expand Up @@ -809,7 +809,7 @@ <h2 data-i18n="h_about">about</h2>
oc_note: 'Only tested on macOS so far. Remote plain-text <code>ws://</code> URLs require <code>--insecure</code>.',
sh_intro: '단일 머신에 서버와 데몬을 배포합니다. Docker와 서버를 가리키는 도메인이 필요합니다.',
sh_desc: '모든 설정 자동 생성, PostgreSQL + 서버 + Caddy(자동 HTTPS) 시작, 관리자 계정 생성 및 로컬 데몬 바인딩. 자격 증명은 마지막에 출력됩니다.',
sh_connect: '추가 머신 연결:', sh_manual: '수동 설정:', sh_manual_pgvector: '생성되는 docker-compose.yml 은 PostgreSQL 이미지로 pgvector/pgvector:pg16 을 사용합니다.',
sh_connect: '추가 머신 연결:', sh_manual: '수동 설정:', sh_manual_pgvector: '생성되는 docker-compose.yml 은 PostgreSQL 이미지로 pgvector/pgvector:pg18 을 사용합니다.',
req_os: 'macOS, Linux 또는 Windows (네이티브 실험적; <a href="https://learn.microsoft.com/en-us/windows/wsl/">WSL</a> 완전 지원)',
req_mux: 'tmux (Linux/macOS/WSL). Windows 네이티브는 ConPTY (기본 내장) 사용.',
about_text: '개인 프로젝트. 거의 전적으로 <a href="https://github.com/anthropics/claude-code">Claude Code</a>가 구축, <a href="https://github.com/openai/codex">Codex</a>와 <a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a>도 중요한 기여.',
Expand Down Expand Up @@ -884,7 +884,7 @@ <h2 data-i18n="h_about">about</h2>
oc_note: 'Only tested on macOS so far. Remote plain-text <code>ws://</code> URLs require <code>--insecure</code>.',
sh_intro: 'Despliega servidor + daemon en una sola máquina. Requiere Docker y un dominio con DNS apuntando al servidor.',
sh_desc: 'Genera toda la configuración, inicia PostgreSQL + servidor + Caddy con HTTPS automático, crea la cuenta admin y vincula el daemon local. Las credenciales se imprimen al final.',
sh_connect: 'Para conectar máquinas adicionales:', sh_manual: 'Configuración manual:', sh_manual_pgvector: 'El docker-compose.yml generado ya usa pgvector/pgvector:pg16 para PostgreSQL.',
sh_connect: 'Para conectar máquinas adicionales:', sh_manual: 'Configuración manual:', sh_manual_pgvector: 'El docker-compose.yml generado ya usa pgvector/pgvector:pg18 para PostgreSQL.',
req_os: 'macOS, Linux o Windows (nativo experimental; <a href="https://learn.microsoft.com/en-us/windows/wsl/">WSL</a> totalmente soportado)',
req_mux: 'tmux (Linux/macOS/WSL). Windows nativo usa ConPTY (integrado).',
about_text: 'Proyecto personal. Construido casi en su totalidad por <a href="https://github.com/anthropics/claude-code">Claude Code</a>, con contribuciones de <a href="https://github.com/openai/codex">Codex</a> y <a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a>.',
Expand Down Expand Up @@ -959,7 +959,7 @@ <h2 data-i18n="h_about">about</h2>
oc_note: 'Only tested on macOS so far. Remote plain-text <code>ws://</code> URLs require <code>--insecure</code>.',
sh_intro: 'Разверните сервер + демон на одной машине. Требуется Docker и домен с DNS, указывающим на сервер.',
sh_desc: 'Автоматически генерирует конфигурацию, запускает PostgreSQL + сервер + Caddy с автоматическим HTTPS, создаёт учётную запись администратора и привязывает локальный демон. Данные для входа выводятся в конце.',
sh_connect: 'Подключение дополнительных машин:', sh_manual: 'Ручная настройка:', sh_manual_pgvector: 'Сгенерированный docker-compose.yml уже использует pgvector/pgvector:pg16 для PostgreSQL.',
sh_connect: 'Подключение дополнительных машин:', sh_manual: 'Ручная настройка:', sh_manual_pgvector: 'Сгенерированный docker-compose.yml уже использует pgvector/pgvector:pg18 для PostgreSQL.',
req_os: 'macOS, Linux или Windows (нативная поддержка экспериментальная; <a href="https://learn.microsoft.com/en-us/windows/wsl/">WSL</a> полностью поддерживается)',
req_mux: 'tmux (Linux/macOS/WSL). Нативный Windows использует ConPTY (встроенный).',
about_text: 'Личный проект. Почти полностью создан <a href="https://github.com/anthropics/claude-code">Claude Code</a>, со значительным вкладом <a href="https://github.com/openai/codex">Codex</a> и <a href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a>.',
Expand Down
2 changes: 1 addition & 1 deletion server/src/db/migrations/042_pgvector_embeddings.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Enable pgvector extension (requires pgvector/pgvector Docker image).
-- BREAKING CHANGE: PostgreSQL image must be pgvector/pgvector:pg16 (not postgres:16-alpine).
-- Default compose/template image is pgvector/pgvector:pg18 (not postgres:16-alpine).
CREATE EXTENSION IF NOT EXISTS vector;

-- Migration 038 created shared_context_embeddings with either vector(1536) or JSONB fallback.
Expand Down
2 changes: 1 addition & 1 deletion server/test/setup/integration-global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { PostgreSqlContainer } from '@testcontainers/postgresql';

export async function setup() {
const container = await new PostgreSqlContainer('pgvector/pgvector:pg16').start();
const container = await new PostgreSqlContainer('pgvector/pgvector:pg18').start();
process.env.TEST_DATABASE_URL = container.getConnectionUri();

return async function teardown() {
Expand Down
15 changes: 10 additions & 5 deletions src/agent/providers/codex-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ interface CodexSdkSessionState {
}

function toolFromItem(item: Record<string, any>, lifecycle: 'started' | 'completed'): ToolCallEvent | null {
const meaningfulString = (value: unknown): string | undefined => {
if (typeof value !== 'string') return undefined;
const trimmed = value.trim();
return trimmed ? trimmed : undefined;
};
switch (item.type) {
case 'commandExecution':
return {
Expand Down Expand Up @@ -155,11 +160,11 @@ function toolFromItem(item: Record<string, any>, lifecycle: 'started' | 'complet
// `JSON.stringify(input)` — that's where the
// `{"query":"","action":{"type":"other"}}` screen artifact came from.
const action = item.action as Record<string, unknown> | undefined;
const actionType = typeof action?.type === 'string' ? action.type : undefined;
const actionQuery = typeof action?.query === 'string' ? action.query : undefined;
const actionPattern = typeof action?.pattern === 'string' ? action.pattern : undefined;
const actionUrl = typeof action?.url === 'string' ? action.url : undefined;
const topLevelQuery = typeof item.query === 'string' ? item.query : undefined;
const actionType = meaningfulString(action?.type);
const actionQuery = meaningfulString(action?.query);
const actionPattern = meaningfulString(action?.pattern);
const actionUrl = meaningfulString(action?.url);
const topLevelQuery = meaningfulString(item.query);
// Pick the single best human-readable label for the flat `input.query`
// slot. Priority: explicit query → pattern → url → bracketed action
// type (`(other)` / `(open_page)`) for the no-info fallback. The UI
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/supervision-automation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ class SupervisionAutomation {
sessionName,
'assistant.text',
{ text, streaming: false, automation: true, automationKind: kind, memoryExcluded: true },
{ source: 'daemon', confidence: 'high', eventId: `supervision-note:${kind}:${randomUUID()}` },
{ source: 'daemon', confidence: 'high', eventId: `supervision-note:${sessionName}` },
);
}

Expand Down
Loading
Loading