mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-12 07:10:09 +00:00
rename artifact names to openworker: desktop/server binaries, console scripts, npm package
The Python import namespace (coworker) and the live auth config strings are intentionally unchanged.
This commit is contained in:
@@ -17,7 +17,7 @@ bash platform/packaging/setup_dev_env.sh # → platform/.venv (server + this r
|
||||
or add one later in the app's Settings):
|
||||
```bash
|
||||
cd platform
|
||||
./.venv/bin/coworker-server --cwd /path/to/your/project --port 8765
|
||||
./.venv/bin/openworker-server --cwd /path/to/your/project --port 8765
|
||||
```
|
||||
2. **Start the UI:**
|
||||
```bash
|
||||
@@ -33,7 +33,7 @@ Open http://localhost:5173. The UI talks to `http://127.0.0.1:8765` (override wi
|
||||
|
||||
The Tauri shell wraps the same UI and supervises the Python server itself — no separate
|
||||
terminal. It needs the Rust toolchain (`rustup`) plus the venv from the bootstrap step;
|
||||
in dev it finds the server at `platform/.venv/bin/coworker-server` automatically (a
|
||||
in dev it finds the server at `platform/.venv/bin/openworker-server` automatically (a
|
||||
packaged sidecar binary is only produced by the release scripts in `platform/packaging/`).
|
||||
|
||||
```bash
|
||||
|
||||
@@ -8,7 +8,7 @@ import { newestFile, scratchBaseIfReady, sendTask, startCoworkSession } from "./
|
||||
|
||||
test("live: a write blocks on an approval card, then completes once approved", async ({ page }) => {
|
||||
const scratchBase = await scratchBaseIfReady();
|
||||
test.skip(!scratchBase, "live backend not ready — start coworker-server and configure a model");
|
||||
test.skip(!scratchBase, "live backend not ready — start openworker-server and configure a model");
|
||||
|
||||
// Unique filename per run so the "doesn't exist before approval" check can't see a prior run's file.
|
||||
const name = `hello-${Date.now()}.txt`;
|
||||
|
||||
@@ -14,7 +14,7 @@ const EXPECTED = ["144", "377", "987", "4181"];
|
||||
|
||||
test("live: agent writes fib.md to its scratch workspace, verified on disk", async ({ page }) => {
|
||||
const scratchBase = await scratchBaseIfReady();
|
||||
test.skip(!scratchBase, "live backend not ready — start coworker-server and configure a model");
|
||||
test.skip(!scratchBase, "live backend not ready — start openworker-server and configure a model");
|
||||
|
||||
await startCoworkSession(page);
|
||||
await selectMode(page, "Full access"); // run the write without an approval gate
|
||||
|
||||
@@ -7,7 +7,7 @@ import { scratchBaseIfReady, sendTask, startCoworkSession } from "./helpers";
|
||||
|
||||
test("live: unattended routes an approval to the Inbox", async ({ page }) => {
|
||||
const scratchBase = await scratchBaseIfReady();
|
||||
test.skip(!scratchBase, "live backend not ready — start coworker-server and configure a model");
|
||||
test.skip(!scratchBase, "live backend not ready — start openworker-server and configure a model");
|
||||
|
||||
const token = `INBOX-${Date.now()}`;
|
||||
const name = `inbox-${Date.now()}.txt`;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { scratchBaseIfReady, selectMode, sendTask, startCoworkSession } from "./
|
||||
|
||||
test("live: a session's transcript and artifact survive a page reload", async ({ page }) => {
|
||||
const scratchBase = await scratchBaseIfReady();
|
||||
test.skip(!scratchBase, "live backend not ready — start coworker-server and configure a model");
|
||||
test.skip(!scratchBase, "live backend not ready — start openworker-server and configure a model");
|
||||
|
||||
const token = `PERSIST-${Date.now()}`;
|
||||
// Unique filename — appears early in the session title (so it survives title truncation and is a
|
||||
|
||||
@@ -14,7 +14,7 @@ const FIXTURE_DIR = path.join(here, "fixtures", "persona"); // holds e2e-tester.
|
||||
|
||||
test("live: install a persona from a directory, enable it, and run a task as it", async ({ page }) => {
|
||||
const scratchBase = await scratchBaseIfReady();
|
||||
test.skip(!scratchBase, "live backend not ready — start coworker-server and configure a model");
|
||||
test.skip(!scratchBase, "live backend not ready — start openworker-server and configure a model");
|
||||
|
||||
const token = `PERSONA-${Date.now()}`;
|
||||
const name = `persona-${Date.now()}.txt`;
|
||||
|
||||
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "coworker-gui",
|
||||
"name": "openworker-gui",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "coworker-gui",
|
||||
"name": "openworker-gui",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"pdfjs-dist": "^4.10.38",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "coworker-gui",
|
||||
"name": "openworker-gui",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
// LIVE smoke config — runs against the REAL backend (coworker-server on :8765) and a REAL model.
|
||||
// LIVE smoke config — runs against the REAL backend (openworker-server on :8765) and a REAL model.
|
||||
// Deliberately separate from playwright.config.ts (testDir ./e2e), so `npm run e2e` and CI never
|
||||
// pick these up. Run manually with `npm run e2e:live` when the backend is up and a model is set.
|
||||
// Nondeterministic and costs a few model tokens per run — a confidence smoke, not an assertion gate.
|
||||
|
||||
Generated
+15
-15
@@ -647,21 +647,6 @@ dependencies = [
|
||||
"bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coworker-desktop"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ocw-stt",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-build",
|
||||
"tauri-plugin-autostart",
|
||||
"tauri-plugin-dialog",
|
||||
"tauri-plugin-single-instance",
|
||||
"tauri-plugin-updater",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cpal"
|
||||
version = "0.15.3"
|
||||
@@ -2685,6 +2670,21 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
|
||||
|
||||
[[package]]
|
||||
name = "openworker-desktop"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ocw-stt",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-build",
|
||||
"tauri-plugin-autostart",
|
||||
"tauri-plugin-dialog",
|
||||
"tauri-plugin-single-instance",
|
||||
"tauri-plugin-updater",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "option-ext"
|
||||
version = "0.2.0"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "coworker-desktop"
|
||||
name = "openworker-desktop"
|
||||
version = "0.1.0"
|
||||
description = "OpenWorker desktop shell"
|
||||
edition = "2021"
|
||||
rust-version = "1.77"
|
||||
|
||||
[lib]
|
||||
name = "coworker_desktop_lib"
|
||||
name = "openworker_desktop_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! OpenWorker desktop shell.
|
||||
//!
|
||||
//! Tauri is a thin native window over the existing React SPA. It:
|
||||
//! 1. picks a free localhost port and starts the Python `coworker-server` as a managed
|
||||
//! 1. picks a free localhost port and starts the Python `openworker-server` as a managed
|
||||
//! sidecar on that port (so it never clashes with a hand-run server on 8765);
|
||||
//! 2. injects `window.__COWORKER_HTTP__` / `__COWORKER_WS__` before the SPA loads, so
|
||||
//! `api.ts` talks to the sidecar (single codebase — the browser build still hits 8765);
|
||||
@@ -47,7 +47,7 @@ fn free_port() -> u16 {
|
||||
/// 2. The bundled onedir sidecar shipped via Tauri `resources` (production): the
|
||||
/// `sidecar/` folder lands in Contents/Resources on macOS and in the install dir
|
||||
/// (next to the app exe) on Windows.
|
||||
/// 3. Legacy onefile slot: `coworker-server[.exe]` next to the app binary (pre-onedir
|
||||
/// 3. Legacy onefile slot: `openworker-server[.exe]` next to the app binary (pre-onedir
|
||||
/// builds used Tauri externalBin).
|
||||
/// 4. Dev fallback: the repo venv, relative to this crate (`src-tauri` → `platform/.venv`;
|
||||
/// `bin/` on POSIX, `Scripts\` on Windows).
|
||||
@@ -56,9 +56,9 @@ fn server_bin() -> PathBuf {
|
||||
return PathBuf::from(p);
|
||||
}
|
||||
let exe_name = if cfg!(windows) {
|
||||
"coworker-server.exe"
|
||||
"openworker-server.exe"
|
||||
} else {
|
||||
"coworker-server"
|
||||
"openworker-server"
|
||||
};
|
||||
if let Ok(exe) = std::env::current_exe() {
|
||||
if let Some(dir) = exe.parent() {
|
||||
@@ -78,9 +78,9 @@ fn server_bin() -> PathBuf {
|
||||
}
|
||||
let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
if cfg!(windows) {
|
||||
p.push("../../../.venv/Scripts/coworker-server.exe");
|
||||
p.push("../../../.venv/Scripts/openworker-server.exe");
|
||||
} else {
|
||||
p.push("../../../.venv/bin/coworker-server");
|
||||
p.push("../../../.venv/bin/openworker-server");
|
||||
}
|
||||
p
|
||||
}
|
||||
@@ -105,15 +105,15 @@ fn desktop_prefs_path() -> PathBuf {
|
||||
state_dir().join("desktop.json")
|
||||
}
|
||||
|
||||
/// The sidecar's log file: `<state_dir>/logs/coworker-server.log`, fresh per
|
||||
/// The sidecar's log file: `<state_dir>/logs/openworker-server.log`, fresh per
|
||||
/// launch with the previous run kept as `.old`. None (→ /dev/null) only if the
|
||||
/// directory can't be created — logging must never block startup.
|
||||
fn server_log_file() -> Option<std::fs::File> {
|
||||
let dir = state_dir().join("logs");
|
||||
std::fs::create_dir_all(&dir).ok()?;
|
||||
let path = dir.join("coworker-server.log");
|
||||
let path = dir.join("openworker-server.log");
|
||||
if path.exists() {
|
||||
let _ = std::fs::rename(&path, dir.join("coworker-server.log.old"));
|
||||
let _ = std::fs::rename(&path, dir.join("openworker-server.log.old"));
|
||||
}
|
||||
std::fs::File::create(&path).ok()
|
||||
}
|
||||
@@ -568,7 +568,7 @@ async fn install_update(
|
||||
}
|
||||
// Windows never reaches here (the NSIS installer takes over and relaunches).
|
||||
// macOS: the .app was swapped in place — restart into the new version. The tray
|
||||
// Exit path's sidecar kill runs via RunEvent, so no orphaned coworker-server.
|
||||
// Exit path's sidecar kill runs via RunEvent, so no orphaned openworker-server.
|
||||
app.restart();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
coworker_desktop_lib::run();
|
||||
openworker_desktop_lib::run();
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ export function ScheduledView({ onOpenRun, onRunNow, initialOpenId }: Props) {
|
||||
<div className="text-[12px] text-faint flex gap-1.5 mb-4">
|
||||
<span aria-hidden>ⓘ</span>
|
||||
<span>
|
||||
Runs only while coworker-server is up — a missed schedule catches up once when it next
|
||||
Runs only while openworker-server is up — a missed schedule catches up once when it next
|
||||
starts.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user