Phase 2: sandbox, agent, proc move into @artipod/core — events bus, /host controllers, console, sudo stub - #37
Merged
Merged
Conversation
Verbatim move of lib/sandbox (incl. git/git-auth/storage/table + commands), lib/proc, lib/agent (loop, ozwell + local ONNX clients, worker) with their vitest suites (90 tests). Decoupled git.ts from the app fs singleton (factory-only; NEXT_PUBLIC_GIT_CORS_PROXY guarded for non-Next bundles). New subpath exports: ./sandbox ./proc ./agent (+ agent/local/worker). isomorphic-git + diff join the optional exact-pinned peers.
artimount/artipod now use dependency-free posix path helpers (pod paths are posix by contract; Windows callers pass forward slashes) and WebCrypto ids — node builtins broke browser bundles (Next/Vite don't polyfill). Root-mount ('/') traversal boundary fixed: '//' prefix never matched.
PodEvents: exec:start/end, coarse fs:changed per live command (command-boundary invalidation is the contract), edit:request, agent:tool-call, approval:request. sudo is default-deny EPERM until the Phase 6.5 approval flow (Decision #10), pinned by tests, attempt surfaced via approval:request.
Collision #1 resolved: read_file/write_file/list_files minimal shapes deleted; createSandboxTools now serves bash (16 KiB truncation kept) + the pod file tools (read_file/create_file/list_dir/create_directory/replace_string_in_file/multi_replace_string_in_file/apply_patch) resolved over an app-declared mount table (default '/'), sharing the shell's ZenFS store via Sandbox.zfs.
TerminalSession (line discipline, history, tab completion, Ctrl+C, agent echo via agent:tool-call), FileBuffer (dirty tracking, external-change reload/flag), TreeSource (TreeDataProvider-shaped, fs:changed invalidation) — extracted from artipod-sync's components per plan §3. installConsole: zero-dep overlay console, SSR-safe no-op, approval:request surfacing. New exports: ./host ./console.
sandbox index re-exports storage + git/git-auth APIs (what artipod-sync's app layer consumes); agent exports DEFAULT_LOCAL_MODEL + CachedModel; LocalModelClient worker URL now ./worker.js so bundlers resolve it inside the published dist; terminal echoes bash result summaries on agent:tool-call result phase.
ArtiPod's container methods import ./docker on first use; root entry re-exports docker TYPES only (values moved to @artipod/core/docker) — dockerode's ssh2 native addon was breaking webpack builds of browser consumers.
Under file:/link installs the package resolves its own @zenfs/core copy; consumers adopting the returned instance is the only way to guarantee one store. lib/filesystem in artipod-sync now binds result.zfs.
This was referenced Aug 31, 2026
horner
added a commit
that referenced
this pull request
Aug 31, 2026
test(ci): 120s timeouts for container-execution tests (fixes red CI from #37)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package half of artipod-layer-plan Phase 2 (app half: horner/artipod-sync#2; ui acceptance: mieweb/ui#404).
306 tests green (17 files, docker suites included); Next production build of the consuming app green; acceptance flows verified live in a browser (see plan worklog). pod.createSandbox() deferred to Phase 3 with the realizers (noted in plan).