Skip to content

Releases: Tosd0/ReiStandard

@rei-standard/amsg-server@2.6.0-next.5

Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Jul 06:55
cca86e2

Minor Changes

  • ca31c9e: onBeforeFire 新增 { skip: true } 出口:在第一次 LLM 调用之前结束本次 fire

    宿主在 fire 时刻就能判断这条消息已经多余(比如排程之后对话又有了新进展)时,onBeforeFire 返回 { skip: true } 即可作废本次触发。这次 fire 算作一次零推送的成功投递(status: 'skipped'):一次性任务照删、循环任务照推进到下次,且不调用 LLM、不消耗 token。

    返回 null 的既有语义不变(回退到排程时冻结的 completePrompt 老链路)。

  • 81133e4: GET /messages 每条任务额外返回 charId / clientTaskId(取自任务 metadata 的 charId / amsgClientTaskId,缺省为 null),供宿主按角色归属筛选任务。metadata 的其余字段不回传,凭据类字段照旧不回传。

@rei-standard/amsg-shared@0.4.0-next.1

Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Jul 16:32
7ce4c4e

Minor Changes

  • f13f2f1: fire 级 scratch:hook 之间传上下文不再自己维护 Map

    单次 fire 开始时库创建一个空对象,onBeforeFire 的 fireCtx 和同一次 fire 里每轮 onLLMOutput / executeToolCalls 的 sessionCtx 都拿到同一个 scratch 引用;fire 结束(finish / skip-push / 抛错 / 轮数超限)后随之丢弃。不落库、不进日志、不跨 fire 共享。amsg-shared 的 buildSessionContext 新增可选 scratch 参数(不传则字段缺席,amsg-instant 行为不变)。

@rei-standard/amsg-server@2.6.0-next.4

Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Jul 16:32
7ce4c4e

Minor Changes

  • f13f2f1: fire 级 scratch:hook 之间传上下文不再自己维护 Map

    单次 fire 开始时库创建一个空对象,onBeforeFire 的 fireCtx 和同一次 fire 里每轮 onLLMOutput / executeToolCalls 的 sessionCtx 都拿到同一个 scratch 引用;fire 结束(finish / skip-push / 抛错 / 轮数超限)后随之丢弃。不落库、不进日志、不跨 fire 共享。amsg-shared 的 buildSessionContext 新增可选 scratch 参数(不传则字段缺席,amsg-instant 行为不变)。

  • f13f2f1: GET /capabilities 特性探测端点 + 客户端 getCapabilities()

    worker 部署版本落后时,新功能只是「探测不到」而不是静默失效。单用户 worker 新增 GET /capabilities,返回 { serverVersion, features }(feature 名如 client-state / client-state-chunking / agentic-hooks,随版本演进追加;表达代码能力,不反映部署配置);鉴权与 /vapid-public-key 一致。客户端 SDK 新增 getCapabilities():打到没有该路由的老 worker(404)返回 null 不抛错,前端可据此在设置里提示「worker 需要重新部署」。

  • f13f2f1: client_state 大值透明分块 + 整批局部失败(单用户 worker)

    • PUT /client-state 单条 value 不再受 200KB 整批 413 的限制:超过 200KB 的值由服务端切片跨行存储,GET /client-state 与 hook 的 ctx.readState() 返回拼好的原值,客户端和 hook 作者无感。单条总上限默认 5MB,工厂配置 maxStateValueBytes 可调。切片在码点边界(中文 / emoji 不会被劈开);覆盖写变小不残留旧切片;块不齐全(写到一半断了)时该 key 视为不存在,读方走自己的兜底。
    • 整批局部失败:批里某条超限 / 非法只拒它自己,其余照常入库。有拒绝时响应带 data.rejected: [{ index, namespace, key, code, message }];全部成功时响应形状与之前完全一致。
    • namespace / key 里的控制字符(\u0000-\u001f)为库内部保留,逐条拒绝。
    • adapter 的 upsertClientState 新增可选第三参 cleanups 与返回值 outcomes;自定义 adapter 不实现也能工作(只损失存储卫生,不影响正确性)。
    • DELETE /client-state 返回的 deleted 计数包含内部切片行(有分块值时会大于逻辑条目数)。

Patch Changes

  • Updated dependencies [f13f2f1]
    • @rei-standard/amsg-shared@0.4.0-next.1

@rei-standard/amsg-client@2.9.0-next.4

Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Jul 16:32
7ce4c4e

Minor Changes

  • f13f2f1: GET /capabilities 特性探测端点 + 客户端 getCapabilities()

    worker 部署版本落后时,新功能只是「探测不到」而不是静默失效。单用户 worker 新增 GET /capabilities,返回 { serverVersion, features }(feature 名如 client-state / client-state-chunking / agentic-hooks,随版本演进追加;表达代码能力,不反映部署配置);鉴权与 /vapid-public-key 一致。客户端 SDK 新增 getCapabilities():打到没有该路由的老 worker(404)返回 null 不抛错,前端可据此在设置里提示「worker 需要重新部署」。

Patch Changes

  • Updated dependencies [f13f2f1]
    • @rei-standard/amsg-shared@0.4.0-next.1

@rei-standard/amsg-sw@2.3.3-next.0

Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jul 08:21
693c846

Patch Changes

  • Updated dependencies [914ddcf]
    • @rei-standard/amsg-shared@0.4.0-next.0

@rei-standard/amsg-shared@0.4.0-next.0

Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jul 08:20
693c846

Minor Changes

  • 914ddcf: amsg-shared 新增 agentic 循环契约工具:buildSessionContextextractAssistantMessageassertValidDecision(新增 inlineToolCalls 选项,允许 tool-request 直接携带 toolCalls,供服务端就地执行工具的场景用)、extractToolCallsFromDecision。amsg-instant 的 SessionContext 构建与 decision 校验改为从 amsg-shared 复用同一实现,对外行为与错误信息不变。

@rei-standard/amsg-server@2.6.0-next.3

Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jul 08:20
693c846

Minor Changes

  • 914ddcf: 单用户 / Cloudflare 模式新增「fire 时刻现场生成」能力:

    • 新表 client_state(init-tenant 幂等建表)+ 三个端点:PUT /client-state 批量上传状态(按 updatedAt last-write-wins,单条 value ≤ 200KB)、GET /client-state?namespace= 读取、DELETE /client-state 清空。value 用 per-user key 加密落库,鉴权与加密头沿用现有端点。
    • createSingleUserCloudflareWorker 的 config 接受可选 hooks: { onBeforeFire, onLLMOutput, executeToolCalls }maxToolIterations(默认 5)、totalTimeoutMs(默认 240000,两者都可在 onBeforeFire 返回值里按次覆盖)。配置后,AI 类任务在触发时由 onBeforeFire 现场组装 messages(可经 ctx.readState(namespace) 读 client_state),工具在 worker 内就地执行、多轮循环闭环后推送成品;onLLMOutput 的 ctx 与 decision 契约与 @rei-standard/amsg-instant 的同名 hook 一致,instant 的 classifier 可直接复用(tool-request 同时接受 toolCalls 直传与 tool_request pushPayloads 两种形状)。
    • 不配 hooks、或 onBeforeFire 返回 null 时,任务照走排程时冻结的 completePrompt 老链路;固定文本任务永远走老链路。hook ctx 不含 apiKey / pushSubscription / VAPID。多租户入口(Netlify/Neon)行为不变。

Patch Changes

  • Updated dependencies [914ddcf]
    • @rei-standard/amsg-shared@0.4.0-next.0

@rei-standard/amsg-instant@0.10.1-next.0

Choose a tag to compare

@github-actions github-actions released this 17 Jul 08:20
693c846

Patch Changes

  • 914ddcf: amsg-shared 新增 agentic 循环契约工具:buildSessionContextextractAssistantMessageassertValidDecision(新增 inlineToolCalls 选项,允许 tool-request 直接携带 toolCalls,供服务端就地执行工具的场景用)、extractToolCallsFromDecision。amsg-instant 的 SessionContext 构建与 decision 校验改为从 amsg-shared 复用同一实现,对外行为与错误信息不变。
  • Updated dependencies [914ddcf]
    • @rei-standard/amsg-shared@0.4.0-next.0

@rei-standard/amsg-client@2.9.0-next.3

Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jul 10:02
4926a2d

Minor Changes

  • a26b797: 新增 client_state 三方法,对接单用户 worker 的云端状态镜像(amsg-server 2.6.0 的 /client-state 端点)。

    • putClientState(entries):批量 upsert。一次请求发完全部变更(照顾 iOS 切后台前只有几秒的存活窗口);请求体走既有加密链路(需先 init()),服务端按 updatedAt 最后写赢,重发旧批次无害。
    • getClientState(namespace):取一个 namespace 的全部条目,自动解密响应 envelope(同 listMessages)。
    • clearClientState():清空该用户全部云端状态(给设置页「清除云端状态」这类入口用)。

    配了 serverToken 时三个方法都带 X-Client-Token

@rei-standard/amsg-client@2.9.0-next.2

Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jul 08:20
693c846

Patch Changes

  • Updated dependencies [914ddcf]
    • @rei-standard/amsg-shared@0.4.0-next.0