Skip to content

OpenAI4S v1.0.2

Latest

Choose a tag to compare

@Nobody-Zhang Nobody-Zhang released this 27 Nov 12:48
· 4 commits to main since this release
4acec59

OpenAI4S v1.0.2 is a reliability release. Four usability reviews ran real research tasks through the workbench with a real model, and this version fixes all 345 findings they produced (#269, #270, #271, #274), the product decisions that followed them (#272), and the failures found while re-testing the fixes. It also adds submission receipts for messages, exact-version history, an offline read-only export, and SpecStream search, and it is the first release whose upgrade path is run before publication.

The database moves from schema 43 to 45. Read “Upgrading from 1.0.1” before starting this version on an existing data directory.

Highlights

  • A send is neither lost nor doubled. A message carries a client-minted id, and the server records a receipt for it before a model call or a queue ticket exists. A lost response, a 5xx or a page reload now asks what became of the message instead of sending it again; the composer says so when it cannot tell (#276).
  • A model that says "now I'll run Python" runs it. Some models announced a cell reply after reply and sent only tool calls: one ran 21 replies before its first cell. After two ignored reminders the next call offers an Engine-owned run_cell(language, code), which runs as the same cell a fenced block gives: same kernel, approvals, Notebook and provenance. A model that sends fenced cells never sees it. A finalize_response sent beside a code cell that never ran is refused, so an answer can no longer report an analysis that did not execute (#270, #274).
  • Package installs are your decision, each time. An agent install used to go into the daemon's own environment while the approval card named the kernel's, and could downgrade packages there. Installs now ask every time, show the packages and the target environment, go into the interpreter the kernel actually uses, and refuse to change the version of an installed package. No standing "allow" answers for one (#269, #274).
  • History opens what was recorded. Reference chips and step cards open the exact artifact version a step produced, and say so when none was recorded. A cell that only runs a workspace script keeps that script as it ran, so the Notebook and the .ipynb exports still show it after the file changes. A reopened session shows its code cards as the live turn did (#276, #274, #271).
  • A failed turn says why. No key, a rejected key, no access, an unknown model, a wrong endpoint and an unreachable host are told apart, each with a button to the model settings, live and after a reload. openai4s run prints one error line and exits with status 4 instead of a traceback (#270, #271, #276).
  • The upgrade is tested before the release exists. The release workflow starts the published 1.0.1 Linux bundle, has it write a project, a session, three cells and two versions of a file, then migrates that data with the new bundle and reads every id and byte back, again after a restart. The pre-migration copy is then restored and read by 1.0.1. A Linux bundle without that record is not released (#276).

Downloads

Download For
OpenAI4S-1.0.2-macos-arm64.dmg (SHA-256) macOS Apple Silicon (arm64); embedded Python and science stack; ad-hoc signed
OpenAI4S-1.0.2-linux-x86_64.tar.gz Linux x86_64; embedded Python and the default science stack
OpenAI4S-1.0.2-windows-x86_64.zip Windows x86_64 with WSL2; includes the same Linux payload
openai4s-1.0.2-evidence.zip Publishing-workflow evidence: build receipts (with the upgrade read-back), quality receipt, SBOM and provenance
OpenAI4S-1.0.2-macos-arm64-validation.json Supplemental local macOS build and validation record
SHA256SUMS SHA-256 digests of the package, evidence and validation files

Python packages are on PyPI and the container image on GHCR. Verify downloads with sha256sum --ignore-missing -c SHA256SUMS on Linux, or shasum -a 256 --ignore-missing -c SHA256SUMS on macOS. openai4s verify-package openai4s-1.0.2-evidence.zip checks the evidence archive's internal integrity.

  • macOS Apple Silicon: download the DMG and its .sha256 file into one folder, run shasum -a 256 -c OpenAI4S-1.0.2-macos-arm64.dmg.sha256 (it must print OK), open the DMG and drag OpenAI4S.app into Applications. The image is ad-hoc signed, with no Developer ID signature and no Apple notarization: if macOS blocks the first launch, use System Settings → Privacy & Security → Open Anyway. Intel Macs install from PyPI.
  • Linux: unpack the tarball and run ./OpenAI4S, or ./install.sh for a per-user PATH entry and menu item. Install bubblewrap for sandboxed cells.
  • Windows: install WSL2 with Ubuntu 24.04 (wsl --install -d Ubuntu-24.04), extract the complete ZIP to a local folder and double-click OpenAI4S.cmd.
  • Python: python -m pip install --upgrade "openai4s[science]==1.0.2", then openai4s serve. Python 3.10+ is required; the core remains standard-library-only. The science extra now also installs openpyxl, statsmodels and seaborn.
  • Containers: docker pull --platform linux/amd64 ghcr.io/pku-yuangroup/openai4s:1.0.2.
  • R: the R kernel is not bundled. Install micromamba, mamba or conda, then run openai4s setup --profile standard or openai4s setup --only r.

Configure a model under Settings → Models after the first start. No model key is included.

Fixed

Agent loop

  • Announced but absent cells. Besides the run_cell fallback above: a promise to run "everything in one cell" that is not kept draws the no-code note, and a turn whose model promised a cell five times and sent none is stopped. The no-progress check now warns before it stops, sees loops that vary their arguments on the same file, and its stop notice names what repeated (#270, #271).
  • Duplicated provider history. A session resumed or switched to a branch rebuilt its provider history with every action group twice. The reviewed sessions sent 132, 84 and 6 groups for 66, 42 and 3 (#274).
  • Code fences. A bare fence inside a triple-quoted string no longer cuts the cell (#271).
  • Recap messages. A reply that already answered is no longer followed by a third-person recap (#274).
  • Gemini and other blocking wires. Every Web turn on a wire without streaming raised CapabilityError before a request was sent. The reply is now returned whole (#268).
  • Dropped connections. A dropped TLS handshake is retried, and a stream that opened and then went silent is asked again once. A request that never received headers is still not replayed (#271).
  • Batched reads in team mode. A parallel wave of read-only tool calls lost its caller and failed with PrincipalRequired (#268).

Environments and kernel

  • Bundled Skill helpers. All seven bundled sidecars whose helpers import host failed in a real kernel with No module named 'host'. The kernel now registers the injected host as a module (#274).
  • macOS HTTPS. Under the uv-managed CPython, Host-side requests to RCSB failed TLS verification. On macOS the Host now also trusts the roots Apple ships; an explicit SSL_CERT_FILE or SSL_CERT_DIR still wins (#270).
  • Cells. A crashed cell keeps its output and says why. input() fails at once instead of hanging. The last expression echoes, display() works and IPython syntax gets a hint. Workspace modules import. Tracebacks name the cell by the number the Notebook shows (#269).
  • Stop. Stop also stops the background cells the turn launched, and a Stop that landed inside host.bash now stops the command instead of reporting "interrupted" while it kept running (#269, #268).
  • Conda environments. Environments outside the product-managed roots are labelled "local". The agent asks before switching into one; a person picking one is not asked. R resolves the selected environment, then the product r environment, then Rscript on PATH (#269).
  • What the model is told. One system-prompt line states whether a local NVIDIA GPU exists and which key packages are present or missing, and the model is told the kernel's real limits (#274, #269).

Approvals and security

  • Approval cards. The dynamic-tool card shows the implementation and schemas, not only a name. Shell cards show the interpreter, directory and sandbox. Cards start at "once". A pending approval is a visible state and its card scrolls into view (#269).
  • Wildcard shell rules. An allow rule such as git * matched across ;, && and |, so it also allowed git x && curl … | sh. It now covers one simple command; a chained command asks again unless a rule names it exactly. Deny rules keep their full reach (#269).
  • Install arguments. A requested package that pip would read as an option, a path, a URL or a direct reference is refused before anything runs (#269).
  • Refused Skill loads. A Skill whose load was refused kept its network requirement: every later request in the session stayed narrowed to its domains, and searches came back empty blaming rate limits. Admission now runs before anything is bound (#267).
  • Skill network limits. A host_only Skill's network manifest limits only requests made by that Skill's own helper code. The rest of the session keeps its normal network (#274).
  • Team mode. A member no longer gets the admin's model wizard, can no longer list the daemon account's SSH hosts, and no longer sees the admin's endpoint URL. Admin-only settings show as locked with the reason. A disabled account can be enabled again, and the last admin cannot be disabled (#271, #272).

Conversation and sync

  • Several tabs. Every tab sees the user's message. A reconnect no longer duplicates narration, a reopened running turn keeps its event order and follows new output, and a tab showing a session deleted elsewhere leaves it with a notice (#269, #270, #271).
  • While a turn runs. Send stays and queues; Stop is a separate button. Queued messages are marked, editable, and can be sent at once with "stop and send now". A status row shows whether the agent is thinking, writing a cell, running, waiting for a tool or waiting for approval (#269, #270).
  • After a failed turn. The turns queued behind it wait until you resume or drop them, instead of running on a broken state (#271).
  • Status wording. The post-cell status shows the first output lines and never calls a cell "successful" because nothing raised. A denial or a Stop reads as a refusal, not a failure, in the chat and on the Timeline (#269, #274).
  • Uploads. A multi-file selection uploaded concurrently and all but one file was refused with 409. Files now upload one at a time and end with one summary. Same-name uploads ask, GBK and UTF-16 text is detected, and an attached file stays under its message after a reload (#269, #271).
  • First run. A saved but unfinished setup returns to "Test the connection" after a reload. A project folder outside the allowed roots now shows its refusal inside the dialog; Create used to look like a button that did nothing (#276, #267).
  • Language. A language switch repaints a running session, server-written progress lines follow the UI language, and the Chinese copy uses one term each for 智能体, 产物, 单元 and 标注 (#274, #272, #270).
  • Shell. The queued-message strip, the annotation bar, the environment banner and the microphone button were never rendered by the new workbench and are back. The composer row no longer overflows at phone width (#268).

Notebook

  • Stale flags follow the variable a cell actually read. On the reviewed session 46 of 48 cells were flagged before and 11 after (#270).
  • Export. The default .ipynb download is a cleaned notebook: failed, probe, scratch and bookkeeping cells are left out, figures are embedded and narration becomes Markdown. The raw execution log stays available (#269, #270).
  • Background tasks. Their code and output become a Notebook cell, so they are in the .ipynb, the session package and the live Notebook (#271).
  • R sessions. The Notebook status no longer says "not started" for a session that only ran R (#272).
  • Manual cells. A Settings switch turns Notebook manual cells on (off by default, admin-only in team mode). With it on, a fenced Python or R block in the composer gets Run in Notebook (#269, #272).

Artifacts, viewers and export

  • Figures. A figure the cell already saved is no longer captured a second time, and a failed cell leaves no half-drawn figure (#270, #269).
  • Previews. PDF previews render. Markdown artifacts show TeX and relative images. Large CSV, xlsx sheets and gzip files preview. The 3D viewer gains reset, residue labels and chain or B-factor colouring (#269).
  • Artifact links. A completion's artifact link left the workbench for a raw page that showed µ, × and ≥ as mojibake. It now opens the in-app viewer, and text types with no charset are served as UTF-8 (#267).
  • Process files. Plans, context spills and bookkeeping files are classified in one place and kept apart from deliverables (#270, #272).
  • Session packages. A package with a sub-directory artifact, or one whose artifact came from a background task, passed verification and then failed to import. Both round-trip now, and openai4s verify-package refuses exactly what the importer would. Packages redact local absolute paths and report the ones they had to keep byte-exact (#269, #270, #271).
  • Branches. Activating a branch asks first and says what did not come back; an activated branch lists only its own steps and files. "Branch from this question" is one click. A branch with about a thousand checkpoints no longer raises RecursionError from every reader of the session (#271, #274, #268).

Skills, search and network

  • literature-review. Its searches silently returned no hits because OpenAlex responses exceeded the default fetch limit. Requests are sized and failures are raised. Its manifest gains PubMed E-utilities, ClinicalTrials.gov and the web-search hosts (#269).
  • Chinese Skill search. Common research terms are also searched in English, and generic character pairs no longer match the wrong Skill (#274).
  • Skill documents are no longer cut into paged spill files, and paged reads say which lines they read (#270).
  • NCBI requests are paced at three per second with one bounded retry on 429 (#270).
  • Search keys. Settings and searches read keys from different places, so Settings could show an engine as usable while every search skipped it: under openai4s run, with a keychain that was locked at start, or with a key variable holding only whitespace. They now agree in every process. A saved key can be removed from Settings → Network, and a refused request stores nothing (#278).

CLI

  • openai4s run uses the model saved by openai4s init; it used to read only the environment and .env. Its runs are stored with the task and the answer (#271).
  • openai4s status prints alive but /health unreachable and exits 2 when the daemon accepts the connection and never answers; it used to print a traceback. openai4s lab --help works. openai4s cluster prints a refusal as an error (#268).
  • openai4s doctor --network probes each science host; a timed-out probe is retried once (#270).
  • Sharing. The UI and the CLI say when the relay is down, and share enable refuses when sharing is not configured (#271).

Added since 1.0.1

  • Submission receipts for plain messages, exact-version history, the upgrade read-back release gate, first-run resume and the model-failure fix entry (#276).
  • An offline read-only .html export of a session, and search over messages, cell code and output with snippets (#270).
  • SpecStream as an opt-in keyed backup engine for web_search, beside Tavily, You.com, Parallel and the built-in engines. It is off until a key is saved in Settings → Network (#277).
  • Deleting a branch other than the current one and the main line (#272).
  • Chinese or English output from openai4s init, doctor and setup, chosen by OPENAI4S_LANG, then the locale. --json output is identical in both (#272).
  • Team mode: members change their own password and see their own replays; the login page follows the workbench theme and language (#271).
  • Settings gains Experimental and Diagnostics tabs, and the token chip says why it is amber (#271, #274).

Changed behaviour

  • Server messages and docs say "Settings". They still told people to open a "Customize" panel that is nowhere on screen; the workbench calls it Settings (#272).
  • Standing install rules are ignored. An allow rule for a package install that 1.0.1 stored no longer answers; POST /permissions refuses a new one with 400 install_rule_refused.
  • Wildcard shell allow rules cover a single command, as described under "Approvals and security".
  • openai4s doctor --offline is removed. --network is the only switch, and network probes are opt-in. doctor now warns and exits 1 on a machine that has only personal conda environments and no managed ones.
  • The EXPLORE sub-agent is renamed SCOUT. EXPLORE stays an alias for model calls, old clients and saved switches.
  • Model-failure codes. A 401 now reads llm_authentication_failed and a 403 llm_access_denied (both were llm_auth_rejected); a 404 reads llm_model_unavailable or llm_request_target_not_found (was llm_model_not_found). Failures stored by 1.0.1 keep their codes.
  • Unknown sessions answer 404. Several sub-routes used to answer 200 with an empty body for a session that does not exist.
  • Team mode. Usernames are case-insensitive, and the sign-in page's next= accepts same-origin paths only.

Upgrading from 1.0.1

  1. Back up first. Stop the daemon (openai4s stop, then check openai4s status) and copy the whole data directory while nothing is running, including any openai4s.db-wal or openai4s.db-journal file, for example cp -a ~/.openai4s ~/.openai4s-before-1.0.2. The container image keeps its data in the /data volume.
  2. The first database-opening command migrates schema 43 → 45. Migration 44 adds one nullable column, execution_log.inlined_script, and migration 45 creates one table, message_admissions, which starts empty. No row that 1.0.1 stored is rewritten or removed. doctor and diagnostics inspect the schema without upgrading it.
  3. Downgrade is unsupported. 1.0.1 refuses the newer schema with future_schema before it writes anything, and the copy you made is the way back.

This path is the one the release workflow ran before publication: data written by the 1.0.1 Linux bundle, migrated and read back by the 1.0.2 bundle, then the restored copy read by 1.0.1 again. The upgrade guide is in English and 中文.

Known limitations

  • Validation scope: source CI and the full tagged publishing workflow passed at 4acec59e2e13b3fdb22a576e8588f0fbc2abfeae. The publishing run passed 8 quality gates and attested 14 source checks recorded against that commit. Serial pytest passed 14,091 tests (84 skipped, 7 deselected, 4 expected failures); response-schema recapture also passed 14,091 tests, and all 250 route contracts matched. The Linux bundle passed all 10 installed-runtime checks, including the real browser and restart read-back, and all 14 upgrade read-back checks against the published 1.0.1 bundle (schema 43 → 45). Windows archive and launcher checks, the clean wheel runtime and evidence sealing passed. The job that makes the release public refused once, because PyPI's index did not yet show the upload, and passed when re-run unchanged. Every public download matches SHA256SUMS, and the wheel and sdist on PyPI match the sealed build receipts. A separate clean installation from PyPI reported 1.0.2, carried all 612 Skills, started, created a schema-45 database and stopped cleanly. The macOS DMG (SHA-256 fc114e6f9a052e993abdf378d97f440701c0664553490b4a26ede7b8e193178c) has its own record: the bundle verifier, the same 10 installed-runtime checks from a path containing a space, a LaunchServices start, the Seatbelt boundary in enforce mode, and a signature check before and after the run. Under its embedded interpreter the offline suite passed 14,162 tests and failed 6: five run pytest in a child interpreter, which the app does not ship, and passed with pytest added to a copy of the app; one needs pertpy, which is not bundled. The GHCR publishing workflow passed its container runtime checks; 1.0.2 and latest both resolve to sha256:591c73681dac571e890263dbe95ade1f60ea6936a90805a5be0218f1f05e1f65 (linux/amd64). An anonymous pull after publication returned that digest, and the container started and answered with the exact version, a healthy /health, 401 without the access token and 200 with it.
  • The upgrade test covers one path. It is data written by 1.0.1, on the Linux x86_64 bundle. The PyPI wheel, the container image, the Windows package, the macOS app and data written by older releases are not covered by it.
  • macOS: the DMG is ad-hoc signed and Apple Silicon only. It was built locally from the tagged source and attached after the publishing workflow, so the evidence archive does not describe it; its own validation record does.
  • Windows/WSL2: after publication the public ZIP passed a runtime run on Windows Server 2025 with Ubuntu 24.04 WSL2: the shipped launcher, the authenticated dashboard in a Windows Chromium browser, nine installed-runtime checks inside WSL, status/stop, and bubblewrap isolation enforced with its self-test passing. That run used no model credential. Windows on ARM and the wider Windows 10/11 host matrix were not exercised, and the launcher is unsigned.
  • Script inlining covers cells run in the workbench, not CLI or delegated cells, and a session-package import drops the recorded script.
  • Completion check: it still accepts a claimed artifact that does not exist once any tool ran in the turn. The case the reviews hit, a finalize beside an unrun cell, is refused.
  • The lab is simulation only, and the Python and desktop packages do not bundle OpenMHS; run openai4s lab setup.
  • Deprecated bare @name references are still removed in 1.1.0; use the pinned @name#v-<version_id> form.
  • Containers: unprivileged containers may lack working bubblewrap namespaces. In that state, allowlist mode refuses new cells.

Contributors

Thank you to everyone who contributed since v1.0.1:

  • @Nobody-Zhang — the usability reviews and their fixes, submission receipts, exact-version history, the upgrade read-back gate, search-key handling and release engineering.
  • @Specstreamai — the SpecStream search engine, a first contribution.

Full changelog

v1.0.1...v1.0.2

中文摘要

  • 定位: 可靠性版本。四轮以真实模型、真实科研任务进行的可用性评审共提出 345 个问题,本版全部修复(#269、#270、#271、#274),并落实了随后的产品决定(#272)。
  • 数据库从 schema 43 升级到 45: 迁移 44 为 execution_log 新增可为空的 inlined_script 列,迁移 45 新建空表 message_admissions;1.0.1 存下的任何行都不会被改写或删除。首次打开数据库的命令会自动迁移。升级前请先停止 daemon 并复制整个数据目录(cp -a ~/.openai4s ~/.openai4s-before-1.0.2)。不支持降级:1.0.1 会以 future_schema 拒绝更新的 schema,回退请恢复备份。
  • 消息不丢也不重发(#276): 普通消息带上客户端生成的 id,服务端先记下提交回执;应答丢失、5xx 或刷新页面后,浏览器查询这条消息的结果,而不是再发一次。
  • 模型说"现在运行 Python"就真的运行(#270、#274): 有的模型反复宣布要运行代码却只发工具调用。两次提醒无效后,下一次调用会提供由引擎负责的 run_cell(language, code),它与普通代码单元走同一个内核、审批、Notebook 和溯源。与未执行的代码单元同时发出的 finalize_response 会被拒绝,回答不再能报告没有真正执行的分析。
  • 安装软件包每次都由你决定(#269、#274): 每次安装都会询问,卡片列出软件包和目标环境,安装进内核实际使用的解释器,并拒绝改动已安装软件包的版本。1.0.1 存下的"始终允许安装"规则不再生效。
  • 历史打开的是当时记录的版本(#276、#274、#271): 引用和步骤卡片打开当时产生的确切产物版本;只运行工作区脚本的单元会记下脚本当时的内容,Notebook 和 .ipynb 导出在文件改动后仍能显示它;重新打开的会话与运行时显示一致。
  • 失败会说明原因(#270、#271、#276): 区分没有 Key、Key 被拒、无权限、模型不存在、地址错误和无法连接,并给出"打开模型设置"的入口;openai4s run 失败时输出一行错误并以状态码 4 退出,不再打印 traceback。
  • 发布前实测升级(#276): 发布工作流用已发布的 1.0.1 Linux 安装包写入项目、会话、三个单元和同一文件的两个版本,由新安装包迁移并逐字节回读(重启后再读一次),再恢复迁移前的副本交回 1.0.1 读取。没有这份记录的 Linux 安装包不会发布。
  • 其他修复: 重开或切换分支时模型历史不再重复;Gemini 等非流式协议的 Web 对话恢复可用;macOS 上 Host 侧 HTTPS 信任系统根证书(RCSB 不再校验失败);7 个内置 Skill 的辅助函数可以 import host;被拒绝加载的 Skill 不再继续收窄整个会话的网络;git * 这类通配规则不再放行用 ;、&&、| 串起来的命令;多文件上传不再只成功一个;多标签页同步、排队消息、停止按钮、Notebook 过期标记、干净的 .ipynb 导出、PDF/xlsx/大 CSV 预览、会话包导入导出、团队模式权限等均有修复。
  • 新增: 会话的离线只读 .html 导出;覆盖消息、单元代码和输出的搜索;可选的 SpecStream 联网搜索引擎(#277,默认关闭,在"设置 → 网络"保存 Key 后启用),已保存的搜索 Key 可以在界面中移除(#278);删除非当前分支;openai4s init、doctor、setup 的中文输出;团队成员自行修改密码。science extra 新增 openpyxl、statsmodels、seaborn。
  • 行为变化: 服务端提示和文档里的"自定义(Customize)"统一改称"设置",与工作台一致;openai4s doctor --offline 已移除,联网探测改为 --network;子代理 EXPLORE 改名 SCOUT(旧名仍可用);模型失败码改名(401 为 llm_authentication_failed,403 为 llm_access_denied,404 为 llm_model_unavailable 或 llm_request_target_not_found);不存在的会话统一返回 404。
  • 验证范围: 源码 CI 与带标签的发布工作流均在 4acec59e 通过:8 项质量门禁、14 项源码检查认证;串行 pytest 通过 14,091 项,250 个路由契约全部一致;Linux 安装包通过全部 10 项安装后运行检查和 14 项升级回读检查(1.0.1 → 1.0.2,schema 43 → 45)。所有公开下载与 SHA256SUMS 一致,PyPI 上的 wheel 和 sdist 与封存的构建回执一致。macOS DMG 在本机由带标签的源码构建,有独立的验证记录。Windows ZIP 在发布后于 Windows Server 2025 + Ubuntu 24.04 WSL2 上通过了运行验收(随包启动器、Windows 浏览器中的工作台、九项运行时检查、强制启用的 bubblewrap 隔离)。镜像发布工作流通过,1.0.2 与 latest 指向同一镜像摘要。
  • 下载: macOS(Apple Silicon,ad-hoc 签名,未经 Apple 公证,首次启动需在"系统设置 → 隐私与安全性"中选择"仍要打开")、Linux x86_64、Windows x86_64(需 WSL2)安装包见上表;Python 包在 PyPI(pip install --upgrade "openai4s[science]==1.0.2"),容器镜像在 GHCR(ghcr.io/pku-yuangroup/openai4s:1.0.2)。首次启动后在"设置 → 模型"中配置服务商,安装包不含任何模型 Key。