A cross-platform Agent Text Workspace Bridge.
The repository is now at a V1-ready baseline:
- M1: transport / handshake baseline completed
- M2: workspace + path policy completed
- M3: file service completed (
fs.list,fs.stat,fs.read,fs.read_range,fs.write,fs.mkdir,fs.move,fs.copy,fs.rename) - M4: search service completed (
search.text,search.regex) - M5: patch service completed (
patch.preview,patch.apply,patch.rollback,history.list) - M6: runtime / audit logging baseline completed
- Windows native runtime / transport baseline completed with CI, smoke script, and PowerShell native integration coverage
- Timeout / cancel baseline completed across search, streaming file reads, and streaming patch preview
- Streaming baseline completed for search, file reads, and patch preview
- Patch preview lifecycle + conflict diagnostics + rollback metadata completed
P6 validation assets are now in place. Linux/POSIX validation has been rerun in this phase; Windows now has a fuller functional matrix for native smoke, stream/cancel/timeout, CLI contract, logging code consistency, logging success completeness, and release/package closure, but still needs one native rerun before final release sign-off.
daemon.pingworkspace.infoworkspace.openworkspace.resolve_pathfs.listfs.statfs.readfs.read_rangefs.writefs.mkdirfs.movefs.copyfs.renamesearch.textsearch.regexrequest.cancelpatch.previewpatch.applypatch.rollbackhistory.list
- POSIX runtime + Unix domain socket transport
- Windows runtime + Named Pipe transport
- Instance identity derived from
user + workspace + profile + policy - Per-instance runtime directory / endpoint / lock
workspace.info/workspace.opendiagnostics fields:runtime_dirplatformtransport
- path normalization
- workspace containment checks
- path policy states:
normalskip_by_defaultdeny
- binary/text detection
- encoding metadata
- BOM detection
- EOL detection
- line count
- size / mtime
- direct text writes:
fs.write - directory creation:
fs.mkdir - file/directory move:
fs.move - file/directory copy:
fs.copy - same-directory rename:
fs.rename fs.writecreates parent directories by default- move/copy create parent directories by default
- overwrite control is available for write/move/copy/rename paths where applicable
- patch preview/apply can now target a file that does not yet exist
- rollback for a newly created file restores the original absent state
- patch preview diff output is now narrowed to a contextual hunk instead of a full-file replacement dump
- search streaming:
search-text --stream,search-regex --stream - file streaming:
read --stream,read-range --stream - patch streaming:
patch-preview --stream - stream final summaries consistently include:
stream_eventchunk_countcancelledtimed_out
--timeout-msis forwarded to server-side processing budgets for search / stream reads / patch preview streams- CLI keeps a small extra transport grace window so structured timeout responses can still be returned
request.cancelis enforced for search, streaming file reads, and streaming patch preview
patch.previewreturnspreview_idpatch.apply --preview-id <id>supports preview-then-commit flow- patch previews expose:
preview_created_atpreview_expires_at
- preview lifecycle errors are distinguished as:
PREVIEW_CONSUMEDPREVIEW_EXPIREDPREVIEW_EVICTEDPREVIEW_INVALID
- patch conflict errors remain
PATCH_CONFLICT, but now include a more specific reason such as:mtime_changedhash_changedmtime_and_hash_changed
patch.rollbackreturns restored file hash / mtime metadata
apps/bridge_daemon: local daemonapps/bridge_cli: command line clientlibs/bridge_core: protocol, workspace, path policy, file/search/patch/logging/error-code serviceslibs/bridge_platform: runtime dir, lock, endpoint helpers (POSIX/Windows split)libs/bridge_transport: local IPC transport (Unix socket / Named Pipe)tests: unit and integration testsdocs: architecture, protocol, plan, risks, run/test guide
cmake -S . -B build
cmake --build build -j1
ctest --test-dir build --output-on-failurecmake -S . -B build
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failuretest_instancetest_path_policytest_file_servicetest_file_streamtest_search_servicetest_patch_servicetest_platform_transporttest_loggingtest_error_codestest_file_service_edgestest_search_service_edgestest_patch_service_edgestest_bridge_cli_versiontest_bridge_daemon_version
- integration:
test_integration_ping_info,test_integration_file_ops,test_integration_search_ops,test_integration_patch_ops,test_integration_logging_ops,test_integration_cancel_ops,test_integration_stream_ops,test_integration_read_stream_ops,test_integration_patch_stream_ops,test_integration_timeout_ops - functional:
test_functional_workspace_ops,test_functional_workspace_edges,test_functional_fs_ops,test_functional_search_ops,test_functional_patch_lifecycle,test_functional_stream_cancel_timeout,test_functional_cancel_edges,test_functional_logging_release,test_functional_cli_contract
The session_recovery CTest label is wired into CI as an independent gate on Linux.
Run locally:
ctest --test-dir build -N -L session_recovery
ctest --test-dir build --output-on-failure --parallel 1 -L session_recoveryCoverage in this gate:
test_functional_session_drop_change_contracttest_functional_session_drop_change_edgestest_integration_session_opstest_integration_recovery_opstest_integration_structure_opstest_integration_sdk_opstest_session_service
test_functional_windows_nativetest_functional_windows_stream_cancel_timeouttest_functional_windows_cli_contracttest_functional_windows_logging_codestest_functional_windows_logging_successtest_functional_windows_release_package
Windows coverage now closes the loop across these domains:
- native smoke and Unicode / space-path coverage
- stream / cancel / timeout behavior
- CLI usability and normalized error-code contract
- runtime.log / audit.log error-path code consistency
- runtime.log / audit.log success-path field completeness
- install / package / unzip smoke
ctest --test-dir build --output-on-failureFor stepwise triage, run in this order:
- shared unit/core tests
- POSIX integration tests
- POSIX functional tests
./scripts/validate_v1.sh --build-dir build --jobs 1./scripts/package_release.sh --build-dir build --out-dir dist --run-tests --jobs 1
Recommended stepwise order on a native Windows host:
ctest --test-dir build -C Release -R "^(test_instance|test_path_policy|test_file_service|test_file_stream|test_search_service|test_patch_service|test_platform_transport|test_logging|test_error_codes|test_file_service_edges|test_search_service_edges|test_patch_service_edges|test_bridge_cli_version|test_bridge_daemon_version)$" --output-on-failure
ctest --test-dir build -C Release -R "^test_functional_windows_native$" --output-on-failure
ctest --test-dir build -C Release -R "^test_functional_windows_stream_cancel_timeout$" --output-on-failure
ctest --test-dir build -C Release -R "^test_functional_windows_cli_contract$" --output-on-failure
ctest --test-dir build -C Release -R "^test_functional_windows_logging_(codes|success)$" --output-on-failure
ctest --test-dir build -C Release -R "^test_functional_windows_release_package$" --output-on-failureFor a one-shot rerun:
ctest --test-dir build -C Release --output-on-failure
pwsh ./scripts/windows_smoke.ps1 -BuildDir ./build -Config Release
pwsh ./scripts/validate_v1.ps1 -BuildDir build -Config Release -Jobs 1
pwsh ./scripts/package_release.ps1 -BuildDir build -Config Release -OutDir dist -RunTests -Jobs 1This repository now includes:
- structure adapter methods for Markdown / JSON / YAML / HTML on top of the controlled-editing session pipeline
- minimal Python and TypeScript SDK wrappers in
sdk/pythonandsdk/typescript - benchmark scenarios for structure roundtrip and multi-file session risk checks
Representative CLI commands:
markdown-upsert-sectionjson-upsert-keyyaml-append-itemhtml-set-attribute
- Run locally:
bash ./scripts/run_benchmarks.sh build .benchmark_reports .benchmark_run - Reports:
.benchmark_reports/benchmark_report.jsonand.benchmark_reports/benchmark_report.md - Thresholds:
benchmark/thresholds.json
The repository includes extensions/vscode-bridge/ with a no-build VSCode MVP for search, staged session inspection, preview, reject, commit, and recover flows.
Current release packaging now produces both a portable archive and a platform-native installer by default:
- Linux:
*.tar.gz+*.deb - macOS:
*.tar.gz+*.pkg - Windows:
*.zip+*.exe(NSIS)
Runtime packages are now slimmed down to only the runtime payload:
bin/bridge_daemon(.exe)bin/bridge_cli(.exe)share/ai_bridge/README.md
They no longer ship the internal validation docs, packaging scripts, or development headers.