跳到正文
cccskills
免费在 GitHub 公开

openrind-dev

Develop Openrind Shell's OpenShell-supervised PostgreSQL FUSE runtime, compatibility sync runtime, and just-bash library.

中文简介正在准备中。当前显示原文说明。

集成工具DockerPostgreSQL
查看安装方法

包含的文件(1)

  • SKILL.md6.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Openrind Shell Development

Read README.md, ARCHITECTURE.md, BUILD.md, FUSE-DESIGN.md, and the files being changed before implementation. Keep the primary FUSE, compatibility, and custom-agent library paths distinct.

Runtime Architecture

flowchart TB
  subgraph openshell["Vendored OpenShell patch"]
    api["Public --fuse resource"] --> driver["Docker operator gate<br/>and /dev/fuse passthrough"]
    driver --> supervisor["Supervisor mount before TSYNC prelude"]
    supervisor --> fds["Explicit FUSE and readiness FDs"]
    fds --> critical["Critical-child lifecycle<br/>container restart on exit"]
  end

  subgraph primary["Primary sandbox image"]
    init["TypeScript one-shot init<br/>migrations, volume, legacy import"]
    fused["Rust openrind-shell-fused<br/>VFS, cache, lease, fencing"]
    home["/sandbox/work<br/>native persisted HOME"]
    proxy["OpenShell CONNECT proxy<br/>end-to-end PostgreSQL TLS"]
    init --> home
    home <--> fused
    fused --> proxy
  end

  subgraph compatibility["Compatibility sandbox image"]
    disk["Native /sandbox disk"] --> watcher["Node prefix-scoped watcher"]
    watcher <--> legacy[("_openeral.workspace_files")]
  end

  subgraph library["Custom-agent library"]
    justbash["createOpenrindShell"] --> workspacefs["WorkspaceFs"]
    justbash --> pgfs["read-only PgFs at /db"]
  end

  critical --> fused
  proxy --> normalized[("_openeral.fs_* tables")]

Route a change to exactly one path unless the public contract genuinely spans paths. Primary FUSE must never start compatibility watchers; sandbox Claude never uses the custom-agent WorkspaceFs or /db virtual filesystem.

Key Files

The source directories and _openeral database schema retain their historical names for upgrade compatibility. Public commands and images use openrind-shell.

crates/openeral-fused/src/
  main.rs          inherited FUSE/readiness fds, critical-process lifecycle
  runtime.rs       database coordination, state, lease/fence transitions
  connect.rs       mandatory OpenShell CONNECT + PostgreSQL TLS
  store.rs         normalized inode/dirent/chunk transactions and fencing
  cache.rs         bounded coherent dirty cache and durability barriers
  fs.rs            fuser operation implementation
  management.rs    same-UID health and flush socket

openeral-js/src/
  db/migrations.ts       V1-V8 migrations; sole migration owner and rename bridge
  db/fuse-init.ts        volume preparation, marker, legacy import, lease check
  sync.ts                compatibility prefix-scoped sync only
  shell.ts               custom-agent just-bash factory
  pg-fs/                 read-only /db virtual filesystem
  workspace-fs/          custom-agent workspace adapter

sandboxes/openeral/
  Dockerfile             primary FUSE image source
  Dockerfile.compat      compatibility image source
  setup-fuse.sh          one-shot primary initialization
  openeral-claude-fuse.sh primary Claude parent + final flush
  setup.sh               compatibility initialization
  openeral-bash.mjs      compatibility daemon/watchers
  policy.yaml            FUSE declaration and egress policy

vendor/openshell/
  UPSTREAM               source commit/tree provenance
  crates/openshell-driver-docker/
  crates/openshell-supervisor-process/
  crates/openshell-policy/
  crates/openshell-server/

Non-Negotiable Boundaries

  • OpenShell supervisor performs the mount before its TSYNC seccomp prelude.
  • Claude receives no /dev/fuse, mount syscall, capability, or daemon selection.
  • TypeScript owns V7 FUSE migration, V8 compatibility bridge, and import. Rust validates but never migrates.
  • Primary persistence uses FUSE only. Never start watchAndSync for /sandbox/work.
  • PostgreSQL uses OpenShell HTTP CONNECT with end-to-end TLS and no direct fallback.
  • Lease loss is terminal. A fenced process never reacquires in-process.
  • FUSE loop/daemon exit terminates the supervisor/container; remount is impossible.
  • _openeral remains the storage schema until an explicit data migration exists.
  • Preserve old executable and environment aliases during the public rename window.
  • Ignore artifacts through .gitignore, never through selective commit omission.

Build And Test

cargo fmt --all --check
cargo test -p openeral-fused
cargo clippy -p openeral-fused --all-targets -- -D warnings

cd openeral-js
pnpm install
pnpm check

Vendored OpenShell patch:

cd vendor/openshell
cargo fmt --all --check
cargo check -p openshell-cli -p openshell-driver-docker \
  -p openshell-policy -p openshell-supervisor-process
cargo test -p openshell-policy -p openshell-driver-docker \
  -p openshell-supervisor-process -p openshell-cli

The gateway binary needs libz3.so.4 at runtime (libz3-4/libz3-dev, or LD_LIBRARY_PATH to an extracted copy); see BUILD.md.

Build only the child image; do not rebuild NVIDIA's base image:

docker pull ghcr.io/nvidia/openshell-community/sandboxes/base:latest
docker build --pull=false -f Dockerfile.openrind-shell -t openrind-shell-fuse:local .
docker build --pull=false -f Dockerfile.openrind-shell-compat -t openrind-shell-compat:local .

Real FUSE E2E:

DATABASE_URL='postgresql://...' \
OPENSHELL_GATEWAY_ENDPOINT='http://127.0.0.1:18770' \
OPENRIND_SHELL_FUSE_E2E_IMAGE='openrind-shell-fuse:local' \
tests/fuse/test_openshell_e2e.sh

Without a Supabase URL, use the local TLS fixture in tests/fuse/postgres-fixture/ (compose + gen-certs.sh; see BUILD.md "Local TLS PostgreSQL Fixture") and build the derived image with --build-arg BASE_IMAGE=openrind-shell-fuse:local, then set OPENRIND_SHELL_FUSE_E2E_IMAGE=openrind-shell-fuse-localdb:test.

Required FUSE Semantics

  • stable inode identity across rename;
  • byte-preserving names, symlinks, sparse files, and partial writes;
  • open-unlinked lifetime and restart-time orphan cleanup;
  • bounded shared dirty state across handles;
  • fsync/fdatasync and sync-open durability;
  • atomic dirty-source rename replacement;
  • existing-file O_TRUNC close barrier;
  • synchronous namespace/metadata commits;
  • uncertain-commit operation deduplication;
  • one-writer advisory lock, lease epoch, and terminal fencing.

Source Pin Discipline

Before rebasing vendor/openshell, verify its UPSTREAM commit and tree, compare a pristine archive, and review mount ordering, seccomp, ProcessHandle, lifecycle state, and Docker restart behavior before replaying the patch.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Create new OpenCode agents with a gpt-5.2-codex default.

中文简介正在准备中。当前显示原文说明。

openrind/openrind-shell32026年10月19日 更新

Guide users through browser automation setup using Chrome DevTools MCP only. Use when the user asks to set up browser automation, Chrome DevTools MCP, browser MCP, or runs the browser-setup command.

中文简介正在准备中。当前显示原文说明。

openrind/openrind-shell32026年10月19日 更新

Manages Cargo.lock file updates and resolves --locked flag issues in CI/CD. Triggers when user mentions: - "cargo test --locked failed" - "cannot update the lock file" - "Cargo.lock is out of date" - "PR failed with --locked error" - "fix Cargo.lock"

中文简介正在准备中。当前显示原文说明。

openrind/openrind-shell32026年10月19日 更新

Create OpenCode custom commands for repeatable tasks.

中文简介正在准备中。当前显示原文说明。

openrind/openrind-shell32026年10月19日 更新

Create an auditable Markdown report for any uploaded Microsoft Excel (.xlsx) or CSV files in an Openrind Shell sandbox.

中文简介正在准备中。当前显示原文说明。

openrind/openrind-shell32026年10月19日 更新

Guide users through the get started setup and Chrome DevTools demo.

中文简介正在准备中。当前显示原文说明。

openrind/openrind-shell32026年10月19日 更新

查看 openrind 的全部技能

报告此技能的问题