Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c2ac83e
fix(fork): disable upstream updater and signing artifacts
TheerasakPing Oct 17, 2026
e1abcc2
fix(fork): fail closed for custom update commands until independent r…
TheerasakPing Oct 17, 2026
7c4c1e6
docs(fork): identify fork and warn about upstream-only downloads
TheerasakPing Oct 17, 2026
8019d5e
docs(fork): define independent product engineering rules
TheerasakPing Oct 17, 2026
e29aa8c
docs(fork): prioritize cross-platform ownership and agent reliability
TheerasakPing Oct 17, 2026
e0b806b
test(fork): guard against accidental upstream auto-update reactivation
TheerasakPing Oct 17, 2026
399335b
ci(fork): check upstream update isolation on every PR
TheerasakPing Oct 17, 2026
922741e
ci(fork): prevent upstream release workflow from publishing in fork
TheerasakPing Oct 17, 2026
30ad10f
test(fork): enforce upstream release CI guard
TheerasakPing Oct 17, 2026
1a90fe0
docs(fork): record inherited release workflow gate
TheerasakPing Oct 17, 2026
5bc9eca
fix(fork): make safety release-job assertions literal and robust
TheerasakPing Oct 17, 2026
92ea494
docs(fork): record issue-tracking fallback while GitHub Issues are di…
TheerasakPing Oct 17, 2026
b6df071
fix(ci): maintain search concurrency bound without deprecated atomics
TheerasakPing Oct 17, 2026
09de96e
fix(ci): propagate verified-compatible PTY and SyncAdapter lint corre…
TheerasakPing Oct 17, 2026
a404f35
fix(ci): propagate verified-compatible PTY and SyncAdapter lint corre…
TheerasakPing Oct 17, 2026
04ba8ed
fix(ci): propagate verified-compatible PTY and SyncAdapter lint corre…
TheerasakPing Oct 17, 2026
713fdf5
Merge pull request #1 from TheerasakPing/feat/independent-fork-founda…
TheerasakPing Oct 17, 2026
beb63d4
feat(fork): integrate TP Agent Studio with latest develop (two-tone, …
TheerasakPing Oct 17, 2026
a074401
style(fork): satisfy Prettier for fork deep-link routing
TheerasakPing Oct 17, 2026
10b14c8
style(fork): satisfy Prettier for fork deep-link routing
TheerasakPing Oct 17, 2026
5bd557f
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
6133266
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
116272b
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
a8223c3
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
73808b4
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
2f6f04f
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
45a074b
fix(ci): scope async_trait Clippy allowances and avoid cloned single-…
TheerasakPing Oct 17, 2026
0edb4e3
fix(fork): align frontend runtime identity, ports and OAuth scheme wi…
TheerasakPing Oct 17, 2026
ae768d4
fix(fork): correct numbered instance regex and formatting
TheerasakPing Oct 17, 2026
6b04a67
test(fork): cover frontend identity parity for prod, dev, numbered, a…
TheerasakPing Oct 17, 2026
c22ee9c
test(fork): verify native cloud OAuth callbacks use fork schemes
TheerasakPing Oct 17, 2026
38ad2ca
docs(fork): record frontend runtime parity and unresolved Cloud owner…
TheerasakPing Oct 17, 2026
c10001c
docs(fork): define release-blocking Cloud/OAuth identity and isolatio…
TheerasakPing Oct 17, 2026
5500b5f
style(test): align fork OAuth callback test layout with Prettier
TheerasakPing Oct 17, 2026
1fb706a
fix(scheduler): catch synchronous executor panics and recover dead se…
TheerasakPing Oct 17, 2026
c8491d6
test(scheduler): verify factory panic and worker crash do not poison …
TheerasakPing Oct 17, 2026
520b3b2
fix(recovery): always attempt stale running-session cleanup after par…
TheerasakPing Oct 17, 2026
bbb5358
fix(ci): resolve frontend Prettier violations from fork identity tests
TheerasakPing Oct 17, 2026
bb9c61c
fix(ci): resolve frontend Prettier violations from fork identity tests
TheerasakPing Oct 17, 2026
f49a92c
fix(scheduler): persist failed status when executor bypasses normal t…
TheerasakPing Oct 17, 2026
7d093b0
test(scheduler): failed executor must not leave SQLite session running
TheerasakPing Oct 17, 2026
8f66222
fix(scheduler): move executor factory separately from message metadata
TheerasakPing Oct 17, 2026
8303669
fix(recovery): collect owned startup failure messages across independ…
TheerasakPing Oct 17, 2026
3867986
docs(reliability): record multi-session freeze causes, safe diagnosti…
TheerasakPing Oct 17, 2026
ba8c4cd
docs(roadmap): track scheduler resurrection, startup repair and outst…
TheerasakPing Oct 17, 2026
ad16a95
fix(windows): use non-deprecated atomic try_update under warnings-den…
TheerasakPing Oct 17, 2026
26a7239
docs(readme): summarize TP Agent Studio integration, multi-session fi…
TheerasakPing Oct 17, 2026
8ef63ae
test(icons): forbid indexed PNG frames that crash Tauri Windows ICO d…
TheerasakPing Oct 17, 2026
cf4751c
fix(windows): repack TP Agent Studio multi-resolution ICO frames as R…
TheerasakPing Oct 17, 2026
d30405d
fix(ci): ship RGBA desktop icons and resolve cross-platform Rust clip…
TheerasakPing Oct 17, 2026
fcd3e93
test(macos): align dev executable assertions with TP Agent Studio for…
TheerasakPing Oct 17, 2026
4177ffb
test(scheduler): add deterministic 1/5/20/50 multi-session stress pro…
TheerasakPing Oct 17, 2026
aa63959
test(scheduler): register offline concurrent stress matrix module
TheerasakPing Oct 17, 2026
aa0ace6
test(stress): await cancellation dequeue before inspecting per-sessio…
TheerasakPing Oct 17, 2026
9108d19
test(scheduler): add dead-worker isolation and bounded queue overload…
TheerasakPing Oct 17, 2026
702b45b
fix(stress): release Tokio watch read borrow before awaiting changed
TheerasakPing Oct 17, 2026
bdd1620
docs(stress-lab): add reproducible synthetic 1/5/20/50 scheduler test…
TheerasakPing Oct 17, 2026
b9dec15
docs(roadmap): track synthetic stress test implementation without clo…
TheerasakPing Oct 17, 2026
7c3b668
test(scheduler): inject slow provider, mock timeout, never-ending too…
TheerasakPing Oct 17, 2026
efc4ea9
test(scheduler): register provider/tool fault injection scenarios sep…
TheerasakPing Oct 17, 2026
6bfff72
test(sqlite): inject 5/20/50 concurrent WAL writer contention in isol…
TheerasakPing Oct 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/fork-safety.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Fork release safety

on:
pull_request:
push:
branches: [develop]
workflow_dispatch:

permissions:
contents: read

jobs:
fork-release-safety:
name: Upstream updater protection
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Verify fork updater is fail-closed
run: node scripts/fork/check-safety.mjs
- name: Verify fork desktop identity and local data roots
run: node scripts/fork/check-identity.mjs
- name: Verify JavaScript dev and numbered instance parity
run: node --test scripts/tauri/instance-profile.test.cjs
- name: Validate packaged two-tone icons
run: node scripts/fork/check-icons.mjs
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ permissions:
jobs:
build-and-release:
name: Build & Release (macOS aarch64)
# The upstream signing/release pipeline must never publish from a derivative fork.
if: ${{ github.repository == 'org2AI/ORG2' }}
runs-on: macos-latest
env:
HAS_APPLE_CERT: ${{ secrets.APPLE_CERTIFICATE != '' }}
Expand Down Expand Up @@ -248,6 +250,8 @@ jobs:
# ── Windows x64 build ─────────────────────────────────────────────────
build-windows:
name: Build & Release (Windows x64)
# The upstream signing/release pipeline must never publish from a derivative fork.
if: ${{ github.repository == 'org2AI/ORG2' }}
runs-on: windows-latest
needs: build-and-release
# This makes GitHub's OIDC subject stable across all release tags:
Expand Down Expand Up @@ -469,6 +473,8 @@ jobs:
# ── Linux x64 build ───────────────────────────────────────────────────
build-linux:
name: Build & Release (Linux x64)
# The upstream signing/release pipeline must never publish from a derivative fork.
if: ${{ github.repository == 'org2AI/ORG2' }}
runs-on: ubuntu-22.04
needs: build-windows
steps:
Expand Down
54 changes: 54 additions & 0 deletions FORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Independent Fork Engineering Guide

This repository is the independent development fork maintained at **TheerasakPing/ORG2**.
Upstream: https://github.com/org2AI/ORG2 (tracked on branch `develop`).
**TP Agent Studio** is the provisional product name. Fork-specific desktop IDs and paths are being introduced, but complete isolation and production release readiness are still unverified.

## Current safety status

- **Fork exists** with its own GitHub ownership and history.
- **Not independently distributable yet.** Do not install test builds side by side with upstream ORG2.
- The base Tauri updater has `plugins.updater.active=false`, an empty endpoints list and `bundle.createUpdaterArtifacts=false`. Fork README no longer links to upstream production installers.
- The custom Rust `check_app_update` command is also fail-closed while `FORK_UPDATER_READY=false`. This prevents silently installing upstream's release packages through a separate code path.
- Original two-tone desktop icon artwork and generated macOS/Windows/Linux icon assets are introduced for production and Dev, with the default macOS live Dock variant included (see [branding guide](docs/fork/TWO_TONE_BRANDING.md)).
- Base and development Tauri identities, deep-link schemes, macOS signing placeholders, application data defaults, runtime ports, and external history defaults have been moved to **TP Agent Studio**. **This does not yet prove complete profile isolation**: external tool hooks, sidecars, inherited assets/credentials and fresh-install behavior require integration tests.
- The inherited `release.yaml` workflow is guarded to run **only** in `org2AI/ORG2`, not this fork. Do not tag/publish production releases until a separate fork release workflow has been validated.

## Fork strategy

1. Maintain `develop` as the integration branch and use feature branches and PRs for every production change.
2. Keep attribution and the existing `LICENSE` intact. This project is under **AGPL-3.0-or-later**; derivative distribution and network use must comply with its source-availability and notice obligations. Do not imply that the original upstream developers endorse the fork.
3. Track upstream separately using `git remote add upstream https://github.com/org2AI/ORG2.git` in local clones. Import security and correctness fixes deliberately, preferably through reviewed merge commits; never overwrite fork-owned release, updater, storage, or identity settings.
4. Keep reusable code in focused modules, maintain regression tests, and avoid changing production invariants merely to hide UI defects.
5. Prioritize macOS Apple Silicon, Windows 11 x64, and Linux x64 parity in CI, packaging, and runtime acceptance tests.

## Before enabling independent installation

- Choose final product name, domains, app ID and deep-link schemes. Update main and platform-specific Tauri configurations together.
- Partition every mutable state root (SQLite, settings, account tokens, sidecars, caches, session data, logs, WebSocket local ports, single-instance control). Provide explicit opt-in migration from upstream with backup and rollback.
- Replace upstream update endpoints in both `src-tauri/tauri.conf.json` and `src-tauri/src/app_update.rs`, as well as any frontend release/download links; generate **fork-owned updater signing keys**.
- Replace upstream Apple signing identity, Windows signing configuration, GitHub environments, release URLs and permissions. Never reuse another publisher's private key.
- Add and pass fresh-install, side-by-side-install, upgrade, rollback, and uninstall-with-data-retention tests on each platform.
- Only after those gates pass: set `FORK_UPDATER_READY=true`, re-enable updater artifacts, and configure the fork's signed release channels.

## Development and verification

```bash
pnpm install --frozen-lockfile
pnpm run download:sidecars
pnpm run tauri:dev
node scripts/fork/check-safety.mjs
node scripts/fork/check-identity.mjs
pnpm typecheck
pnpm test
cd src-tauri
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --no-fail-fast
```

CI file `.github/workflows/fork-safety.yml` checks the release-safety and desktop-identity posture independent of Rust/Node dependencies. The above commands are validation targets, **not claims that tests have passed on this fork**.

## Contribution and upstream notice

The original ORG2 source, licensing and attribution remain the foundation of this fork.
See [roadmap](docs/fork/ROADMAP.md). Any shipped modifications should record their author, purpose, test evidence and user-facing migration impact.
84 changes: 58 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
> **Independent community fork — TheerasakPing/ORG2**
>
> This repository is a fork of [org2AI/ORG2](https://github.com/org2AI/ORG2).
> Work-in-progress app identity: **TP Agent Studio** (provisional branding; legacy compatibility names remain in internal APIs).
>
> ![TP Agent Studio two-tone icon](assets/branding/tp-agent-studio.svg)
>
> Two-tone desktop branding details: [branding guide](docs/fork/TWO_TONE_BRANDING.md).
> This fork does **not** distribute the upstream publisher's installers.
> The fork's application updater is intentionally disabled pending independent signing and release infrastructure.
> **Do not install experimental fork builds alongside upstream ORG2** until the app identity,
> deep links and `~/.orgii` state/storage are isolated and migration-tested.
> See [FORK.md](FORK.md), [the fork roadmap](docs/fork/ROADMAP.md),
> [Cloud boundary audit](docs/fork/FORK_CLOUD_BOUNDARY.md) and [session-stall recovery](docs/fork/SESSION_STALL_RECOVERY.md).
>
> **Development status (17 October 2026):** changes are integrated on [PR #9](https://github.com/TheerasakPing/ORG2/pull/9)
> against `develop`, **not yet merged or released**. CI must pass on the final commit,
> including Rust on Windows/macOS, before the pull request is merged. Platform installer,
> co-installation, memory/restart stress and fork-owned Cloud/OAuth acceptance tests remain outstanding.

---

<div align="center">
<h1>ORG-2</h1>
<h1>TP Agent Studio</h1>
<p><strong>The system of record for how agents build software.<br />Run your coding agents — replay any session, review as a team, and trace every line back to the decision behind it.</strong></p>
</div>

---

<p align="center">
<a href="https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-mac-apple-silicon.dmg"><strong>macOS Apple Silicon</strong></a>
·
<a href="https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-windows-x64-setup.exe"><strong>Windows installer</strong></a>
·
<a href="https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-windows-x64.msi"><strong>Windows MSI</strong></a>
·
<a href="https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-linux-x64.AppImage"><strong>Linux AppImage</strong></a>
·
<a href="https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-linux-x64.deb"><strong>Linux DEB</strong></a>
·
<a href="https://github.com/org2AI/ORG2/releases/latest"><strong>All latest release assets</strong></a>
</p>

> **No TP Agent Studio installers are published yet.** macOS Apple Silicon, Windows 11, and Linux builds are undergoing identity, data-isolation, CI and signing verification. See [release readiness](FORK.md) and [engineering roadmap](docs/fork/ROADMAP.md).
---

<p align="center">
Expand All @@ -37,6 +46,36 @@ ORG-2 is where your team runs its coding agents — a native Rust harness plus l

It is not just another AI coding tool; it is an experiment in human/agent organizations and org-level alignment. ORG2 treats agents as persistent, observable colleagues inside a structured organization — replayable execution, cross-session memory, AI blame, and a local-first Rust runtime so humans, agents, and teams can collaborate around shared context and aligned goals.

## TP Agent Studio fork status / สถานะการพัฒนา

**ภาษาไทย:** TP Agent Studio เป็น Fork อิสระของ ORG2 ซึ่งกำลังพัฒนาระบบ Rust Agent Harness,
การจัดการหลาย Session, Memory และการกู้คืนเมื่อการทำงานหยุดชะงัก ยังไม่มีไฟล์ติดตั้ง
ที่ผ่านการตรวจสอบสำหรับ macOS Apple Silicon (M4), Windows 11 หรือ Linux
และ **ยังไม่ควรใช้งานกับบัญชี Cloud จริงหรือข้อมูลที่สำคัญ** จนกว่าการแยกบริการ
OAuth/Cloud และทดสอบการย้ายข้อมูลจะเสร็จสมบูรณ์

### Recent work (integration PR #9)

| Area | Implemented in the PR branch | Remaining verification |
| --- | --- | --- |
| Desktop identity | Independent TP Agent Studio package IDs, two-tone icons, fork deep-link scheme, dedicated profile roots and ports | Cross-platform install + side-by-side tests, remaining legacy resources |
| Rust Agent Harness / Session recovery | Per-session worker replacement after unexpected termination, future-factory panic isolation and persisted failure status | Heavy 1/5/20/50-session stress tests, long-hanging providers/tools, native E2E |
| Restart recovery | Continue independent startup DB reconciliation phases after partial errors; avoid automatically replaying side-effectful tools | Crash/kill/restart simulation on each OS and database integrity checks |
| Memory | Initial file-lease and fork-profile isolation hardening | Cross-process kill/restart proof, workspace-local migration, OS-specific validation |
| CI | Automated frontend, security, Rust and quality checks on every PR push | All checks green on **final** HEAD, including Windows Tauri icon parsing |
| Cloud / account isolation | Ownership risks documented; app updater and inherited upstream release workflow disabled | Fork-owned backend, callback allowlists, secure credentials, billing and release signing |

This is **source-level hardening**, not a confirmed resolution for every multi-session freeze.
A never-resolving provider/tool call can still make a session look busy; do not delete
`sessions.db` or its WAL files to "unfreeze" the app. Use the non-destructive
[session-stall diagnostic and recovery guide](docs/fork/SESSION_STALL_RECOVERY.md).

**Important:** GitHub commits on this fork do **not** modify an installed upstream ORG2 application.
To track code review and CI: [integration PR #9](https://github.com/TheerasakPing/ORG2/pull/9) ·
[GitHub Actions](https://github.com/TheerasakPing/ORG2/actions) ·
[Cloud/OAuth release blockers](docs/fork/FORK_CLOUD_BOUNDARY.md) ·
[two-tone icon and regeneration](docs/fork/TWO_TONE_BRANDING.md).

## Features

<table>
Expand Down Expand Up @@ -190,20 +229,13 @@ Use ORG2's built-in Rust harness or launch these supported coding-agent CLIs fro
<a href="https://pi.dev/docs/latest/providers"><kbd><img src="src/assets/modelIcons/pi.svg" alt="Pi logo" width="16" valign="middle" /> Pi</kbd></a>
</p>

## Download

Current build version: v2.0.8 (2026-09-23)
## Release availability

Download the latest ORG2 desktop app with one click:
Current source version: v2.0.8 (2026-09-23)

- [macOS Apple Silicon](https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-mac-apple-silicon.dmg)
- [Windows x64 installer](https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-windows-x64-setup.exe)
- [Windows x64 MSI](https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-windows-x64.msi)
- [Linux x64 AppImage](https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-linux-x64.AppImage)
- [Linux x64 DEB](https://github.com/org2AI/ORG2/releases/latest/download/ORG2-latest-linux-x64.deb)
- [All latest release assets](https://github.com/org2AI/ORG2/releases/latest)
**No independently signed TP Agent Studio installers are available yet.** This fork is being developed and tested separately from the original publisher. Releases are blocked on green CI, Windows icon packaging, concurrency/restart stress testing, independent Cloud/OAuth and data/installer coexistence, and release signing. Builds will only be linked after macOS, Windows and Linux identity, migration, packaging and signature verification are complete.

The direct download links always resolve through GitHub's latest release pointer.
See [Fork Engineering Guide](FORK.md) for current safety status. Do not mistake upstream installers for releases of this fork.

## Develop from source

Expand Down
13 changes: 13 additions & 0 deletions assets/branding/tp-agent-studio-dev.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/branding/tp-agent-studio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/fork/AUTO_DREAM_LOCK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Auto-Dream workspace memory — atomic lease upgrade

## Why

The original `.consolidate-lock` protocol wrote the process PID and then read it back. Two parallel tasks in the same process share a PID and could both believe they acquired the lock. On Windows the original PID liveness check always returned false, and mtime restoration was Unix-only.

## Changes (stacked after Branding PR #3)

- Add a distinct **permanent lock inode**: `{workspace}/.orgii/workspace-memory/.consolidate-lease`.
- Hold `fs2::FileExt::try_lock_exclusive` from before the legacy timestamp update until the RAII lease drops. This supplies OS-level advisory file locking across threads and processes on supported platforms.
- The old `.consolidate-lock` retains its previous timestamp+PID format so existing time-gates and persisted records continue to work.
- Replace Unix-specific timestamp rollback with cross-platform `std::fs::FileTimes`.
- Add eight-contender concurrency, same-process reentrancy, and subprocess lock exclusion tests alongside existing commit/rollback tests.

## Invariants / remaining work

1. Never remove or replace the `.consolidate-lease` file while another process may have it open. Keep its inode stable across app restarts; lock is released by the OS after process exit.
2. Only the RAII production entry point holds the lock. The timestamp/PID helper is now private; no product code should bypass the lease.
3. This change does **not** separate per-workspace `.orgii` memory from an upstream ORG2 instance opening the same project. Cross-product workspace metadata requires an opt-in compatibility/migration plan.
4. Crash consistency of the timestamp-based time-gate remains separate from exclusive ownership: a hard process crash may retain a too-recent timestamp; this will need a committed timestamp / in-progress marker split.
5. Run the included separate-process exclusion test on macOS Apple Silicon, Windows 11 and Linux; add *hard-kill/restart* tests and record successful results before shipping.

## Focused check

```bash
cd src-tauri
cargo test -p agent_core specialization::memory::workspace_memory::lock::tests
cargo clippy -p agent_core --all-targets -- -D warnings
```

**These are requested validation commands, not proof that CI has passed.**
Loading
Loading