Skip to content
Merged
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 AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HotPlex 项目知识库

**最后更新**: 2026-10-04 · **分支**: main · **版本**: v1.51.0 · **提交**: 6255138b
**最后更新**: 2026-10-09 · **分支**: main · **版本**: v1.52.0 · **提交**: 4119b288

---

Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [1.52.0] - 2026-10-09

### Summary

v1.52.0 是一次 minor 版本更新,核心主题是 **数据生命周期与可核验交付**。运行资源回收与历史数据保留分开计时,让不占运行资源的会话保留更久;效果对账、围栏和队列终态进入执行时间线,并修复会话清理、事件顺序、PostgreSQL 队列和关闭竞态等可靠性问题。

### Added

- **分层生命周期**:新会话默认使用 `v2` 策略,最近有效输入后 7 天标记归档、180 天到期;归档后仍可查看和续聊。每条新消息正文独立保留 180 天,投递正文在结算后保留 7 天,已结算投递/执行明细保留 90 天后清理或压缩,并保留去重根事实。v2 无正文审计事实默认保留 180 天,媒体缓存 24 小时,已关闭 ACP trace 48 小时。期限、扫描间隔、批量大小和积压告警均可配置。
- **生命周期迁移与删除进度**:管理员可通过 `preview` / `apply` 预览并分批延长存量会话期限;用户删除后的异步清理进度可查询。不支持远端清理的 Worker 会明确返回 unsupported,并保留 blocked 状态。
- **效果对账与运行时事件**:效果账本增加 reconciled / fenced 终态,执行时间线区分对账结果与围栏;新增效果计划、对账、围栏和操作员动作事件,排队输入取消、清空与过期也产生终态事实。Go、TypeScript、Python、Java SDK 与 AEP 文档同步扩展。
- **Worker 隔离能力报告**:四种 Worker 如实报告可提供的隔离能力和限制,区分 Agent 配置约束与操作系统级隔离。
- **显式云端交付工具**:指定 Issue 后顺序执行受限实施、质量门和草稿 PR 发布;支持过期验证检测、提交/推送检查点恢复、已有 PR 复用和必须执行的 Git hooks,不增加自动合并或部署能力。

### Fixed

- **会话续期与迁移**:已迁移会话在持久受理新输入时正确续期;热/冷缓存路径保留已保存的策略版本与更长期限,迁移候选和 readiness 使用一致规则,分批操作能够收敛。重复输入不续期,生命周期写入失败的排队输入不会被误确认或退回易失队列。
- **留存窗口不随新配置缩短**:投递与执行记录在创建时保存窗口和策略版本,按各自结算时钟计算清理期限;缺少快照、未结算、状态未知或仍有活动义务的记录继续受保护。审计哈希链按已到期连续前缀清理,legacy 与 v2 链独立保留。
- **PostgreSQL 清理与队列**:删除会话后先关闭 `RETURNING` 结果集再入队远端清理,保持同一事务的原子性;修复队列预算、领取、结算及深度查询的占位符转换,以及留存窗口和结算时间的 BIGINT 类型推断。
- **事件顺序与消息身份**:`done` 先于运行时终态事实送达,seq 与送达顺序一致;delta 合并保留消息身份与 metadata,超时回调不再修改转发器拥有的文本聚合状态。
- **关闭竞态**:Repairer 仅在后台处理循环退出后执行单一 drain,整个关闭过程受同一个时间预算约束;取消/超时不会启动并发重试,回调重入和关闭后的 Start 不会死锁或创建新处理循环。
- **原生 SDK 与诊断**:固定 Origin 白名单下允许不携带 Origin 的原生客户端,仍拒绝携带未授权 Origin 的请求;诊断检查改用明确注入的状态与配置根目录。Cron 在计划阶段拒绝不安全的工作目录。

### Upgrade Notes

- 启动时会自动应用 SQLite / PostgreSQL 成对迁移 039–045;升级前备份数据库,涉及数据格式的回退按 `docs/guides/developer/release-recovery.md` 的恢复流程执行。
- 已有 legacy 会话不会自动切换到 v2,历史期限不会因升级或缩短配置被重算。需要迁移时先预览,再由管理员显式 apply;迁移不会缩短期限或复活已删除记录。
- `session.retention_period` 继续表示兼容的运行资源期限,不是聊天正文保留期。生命周期清理参数调整后需重启 Gateway;备份、用户工作文件及聊天平台自身的消息不属于本地清理范围。
- 审计正文采集仍关闭,`lifecycle.audit.capture_content: true` 会校验失败;`audit.content_retention` 是预留项。云端自动实施需要有效 Codex 认证,认证失败时停止并保留现场。

## [1.51.0] - 2026-10-04

### Summary
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ARG DEBIAN_MIRROR

LABEL org.opencontainers.image.title="HotPlex Worker Gateway"
LABEL org.opencontainers.image.description="AI Coding Agent access layer"
LABEL org.opencontainers.image.version="1.51.0"
LABEL org.opencontainers.image.version="1.52.0"
LABEL org.opencontainers.image.source="https://github.com/hotplex/hotplex"
LABEL org.opencontainers.image.revision="${GIT_SHA}"
LABEL org.opencontainers.image.created="${BUILD_TIME}"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GOOS := $(shell go env GOOS)
GOARCH := $(shell go env GOARCH)
GIT_SHA := $(shell git rev-parse --short=8 HEAD 2>/dev/null || echo "unknown")
BUILD_TIME := $(shell date '+%Y-%m-%dT%H:%M:%S%z')
VERSION := v1.51.0
VERSION := v1.52.0
LDFLAGS := -s -w -X main.version=$(VERSION) -X main.buildTime=$(BUILD_TIME)
BUILD_OPTS := -trimpath

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<p align="center">
<a href="https://github.com/hrygo/hotplex/actions/workflows/ci.yml"><img src="https://github.com/hrygo/hotplex/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<img src="https://img.shields.io/badge/Version-v1.51.0-10B981?style=flat-square" alt="Version">
<img src="https://img.shields.io/badge/Version-v1.52.0-10B981?style=flat-square" alt="Version">
<a href="https://github.com/hrygo/hotplex/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-3B82F6?style=flat-square" alt="License"></a>
<img src="https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat-square&logo=go" alt="Go">
<img src="https://img.shields.io/badge/Protocol-AEP%20v1-7C3AED?style=flat-square" alt="AEP v1">
Expand Down Expand Up @@ -135,13 +135,13 @@ See the [worker and channel reliability audit](docs/architecture/worker-channel-

Worker choice can be set per bot or platform, with shared defaults for the rest of the deployment.

## ✨ Latest release: v1.51.0
## ✨ Latest release: v1.52.0

- **可证明的输入生命周期。** 输入先持久化受理再投递 Worker,由 owner 租约与 active gate 保证同一轮次只有一次有效执行;租约过期置为 `unknown` 并围栏,`unknown` 永不自动重投。
- **权威运行时计划。** 每次会话启动都记录带指纹的 launch plan,事后可回答"实际生效的是哪份配置",而不是靠复现推测。
- **交付与 Agent 完成分离。** 执行记录与投递效果各自持久化:Agent 的 `done` 不等于用户已收到结果,投递回执独立可查。
- **执行台。** Admin 控制台基于同一份运行时存储提供执行列表、时间线与队列操作。
- **真实链路验证。** 本版本在真实 PostgreSQL 与真实 Claude Code Worker 上完成端到端运行,并据此修复了终态事件丢失与多回合不可观测两个缺陷。
- **Longer-lived conversations.** Runtime resources, conversation history and message content have separate clocks. New conversations default to 7-day archive marking and 180-day history/content retention, with configurable limits.
- **Safe lifecycle upgrades.** Existing sessions retain their policy. Administrators can preview and apply bounded migrations that extend deadlines; duplicate inputs and configuration changes do not shorten stored retention windows.
- **Visible delivery outcomes.** Reconciled and fenced effects, operator actions and queued-input terminal events are exposed in the execution timeline and all four SDKs.
- **Reliable shutdown and cleanup.** Fixes Repairer shutdown races, PostgreSQL cleanup and queue queries, terminal event ordering, and native SDK connections under an Origin allowlist.
- **Explicit cloud delivery.** A selected Issue can proceed through scoped implementation, validation and a draft PR, with resumable checkpoints and mandatory hooks.

See the [changelog](CHANGELOG.md) for the complete release history.

Expand Down
14 changes: 7 additions & 7 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<p align="center">
<a href="https://github.com/hrygo/hotplex/actions/workflows/ci.yml"><img src="https://github.com/hrygo/hotplex/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<img src="https://img.shields.io/badge/Version-v1.51.0-10B981?style=flat-square" alt="Version">
<img src="https://img.shields.io/badge/Version-v1.52.0-10B981?style=flat-square" alt="Version">
<a href="https://github.com/hrygo/hotplex/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-3B82F6?style=flat-square" alt="License"></a>
<img src="https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat-square&logo=go" alt="Go">
<img src="https://img.shields.io/badge/Protocol-AEP%20v1-7C3AED?style=flat-square" alt="AEP v1">
Expand Down Expand Up @@ -135,13 +135,13 @@ HotPlex 把“用户在哪里对话”和“哪个 Agent 执行任务”分离

Worker 可以按 Bot 或平台指定,其余场景继承部署级共享默认值。

## ✨ 最新版本:v1.51.0
## ✨ 最新版本:v1.52.0

- **输入生命周期可证明。** 输入先持久化受理再投递 Worker,由 owner 租约与 active gate 保证同一轮次只有一次有效执行;租约过期置为 `unknown` 并围栏,`unknown` 永不自动重投。
- **权威运行时计划。** 每次会话启动都记录带指纹的 launch plan,事后可回答"实际生效的是哪份配置",而不是靠复现推测。
- **交付与 Agent 完成分离。** 执行记录与投递效果各自持久化:Agent 的 `done` 不等于用户已收到结果,投递回执独立可查。
- **执行台。** Admin 控制台基于同一份运行时存储提供执行列表、时间线与队列操作。
- **真实链路验证。** 本版本在真实 PostgreSQL 与真实 Claude Code Worker 上完成端到端运行,并据此修复了终态事件丢失与多回合不可观测两个缺陷。
- **历史会话保留更久。** 运行资源、会话历史与消息正文分别计时。新会话默认 7 天标记归档、历史和正文保留 180 天,期限均可配置。
- **存量迁移保护。** 已有会话保留原策略;管理员可先预览再分批延长期限。重复输入和配置调整不会缩短已记录的留存窗口。
- **交付结果可见。** 效果对账与围栏状态、操作员决策和排队输入终态进入执行时间线,并同步四种 SDK。
- **关闭与清理更可靠。** 修复 Repairer 关闭竞态、PostgreSQL 清理与队列查询、终态事件顺序,以及固定 Origin 白名单下原生 SDK 连接。
- **明确的云端交付流程。** 指定 Issue 后依次完成实施、验证与草稿 PR,保留可恢复检查点并强制执行 Git hooks。

完整版本历史见[更新记录](CHANGELOG.md)。

Expand Down
2 changes: 1 addition & 1 deletion cmd/hotplex/doc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package main is the entry point for the HotPlex Worker Gateway.
//
// @title HotPlex API
// @version 1.51.0
// @version 1.52.0
// @description HotPlex Worker Gateway — unified access layer for AI Coding Agent sessions.
// @contact.name HotPlex
// @contact.url https://github.com/hrygo/hotplex/issues
Expand Down
2 changes: 1 addition & 1 deletion cmd/hotplex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

var (
version = "v1.51.0"
version = "v1.52.0"
buildTime = "unknown"
)

Expand Down
2 changes: 1 addition & 1 deletion docs/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "https://github.com/hrygo/hotplex/blob/main/LICENSE"
},
"version": "1.51.0"
"version": "1.52.0"
},
"host": "localhost:8888",
"basePath": "/",
Expand Down
10 changes: 7 additions & 3 deletions examples/java-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,30 @@

## Installation

Build this reference SDK from source with `mvn clean install` before using the
coordinates below. This installs `1.52.0-SNAPSHOT` in your local Maven repository;
the Gateway release does not publish SDK packages to Maven Central.

### Maven

```xml
<dependency>
<groupId>dev.hotplex</groupId>
<artifactId>hotplex-client</artifactId>
<version>1.8.0</version>
<version>1.52.0-SNAPSHOT</version>
</dependency>
```

### Gradle (Groovy)

```groovy
implementation 'dev.hotplex:hotplex-client:1.8.0'
implementation 'dev.hotplex:hotplex-client:1.52.0-SNAPSHOT'
```

### Gradle (Kotlin)

```kotlin
implementation("dev.hotplex:hotplex-client:1.8.0")
implementation("dev.hotplex:hotplex-client:1.52.0-SNAPSHOT")
```

---
Expand Down
2 changes: 1 addition & 1 deletion examples/java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>dev.hotplex</groupId>
<artifactId>hotplex-client</artifactId>
<version>1.51.0-SNAPSHOT</version>
<version>1.52.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>HotPlex Client</name>
Expand Down
2 changes: 1 addition & 1 deletion examples/python-client/hotplex_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A Python client library for interacting with HotPlex Gateway via AEP v1 protocol.
"""

__version__ = "1.51.0"
__version__ = "1.52.0"
__author__ = "HotPlex Team"

# 导出公共 API
Expand Down
2 changes: 1 addition & 1 deletion examples/python-client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hotplex-client"
version = "1.51.0"
version = "1.52.0"
description = "Python client example for HotPlex Gateway (AEP v1)"
requires-python = ">=3.10"
dependencies = [
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/typescript-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hotplex-client",
"version": "1.51.0",
"version": "1.52.0",
"description": "TypeScript client SDK for HotPlex Gateway (AEP v1)",
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion webchat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hotplex-webchat",
"version": "1.51.0",
"version": "1.52.0",
"private": true,
"packageManager": "pnpm@11.4.0",
"scripts": {
Expand Down
Loading