Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[English](README.md) · [简体中文](README.zh-CN.md) · [繁體中文](README.zh-TW.md) · [日本語](README.ja.md)

> **R12 開発更新:** `feat/r12-dual-mode` にはペアリング済み Agent、暗号化 Relay、操作ごとのローカル承認を必要とする Windows バックエンドが含まれます。既存 GUI/Web の高度な操作画面への接続は未完了です。既定の文書は英語です。[英語 README](README.md)、[開発ガイド](docs/R12_DEVELOPMENT.md)、[GUI 引き継ぎ](docs/GUI_HANDOFF.md)をご覧ください。以下は R11.3 デスクトップの説明です。

**明示的に許可したローカルワークスペースを探索・検索・読取するための、Windows デスクトップ管理 UI と MCP ツール。**

> **R11.3 Desktop Preview。** 独自コードは [MIT](LICENSE)、第三者コードは各自のライセンスです。この時点で公開済み GitHub Release はありません。署名なしのプレビューであり、本番 supervisor やインストーラーではありません。`execution_available=false`、`release_ready=false` は維持されています。
Expand Down
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,33 @@

[English](README.md) · [简体中文](README.zh-CN.md) · [繁體中文](README.zh-TW.md) · [日本語](README.ja.md)

**Windows desktop management and MCP tools for discovering, searching and reading explicitly authorized local workspaces.**
**MCP tools and Windows desktop management for authorized workspace access, with an R12 backend for paired remote Agent operations.**

> **R11.3 Desktop Preview.** Source is available under [MIT](LICENSE), with separate third-party licenses. There is no published GitHub Release at this snapshot. This is an unsigned preview, not a production supervisor or installer; `execution_available=false` and `release_ready=false` remain in effect.
> **R12 backend development branch.** Get the current implementation from `feat/r12-dual-mode`; `main` remains the R11.3 Desktop Preview baseline until reviewed and merged. This is source for development, not a new Release. The existing desktop Developer page still reports `execution_available=false`; the separate paired target can opt into locally approved `trusted_host` operations. `release_ready=false` remains in effect. Project-owned source is [MIT](LICENSE); retain separate third-party licenses.

## R12: start here

```powershell
git clone --branch feat/r12-dual-mode git@github.com:LE-saber/Local-Probe.git
Set-Location .\Local-Probe
```

Read the [R12 developer guide](docs/R12_DEVELOPMENT.md), [GUI handoff](docs/GUI_HANDOFF.md), and [current status](docs/IMPLEMENTATION_STATUS.md). English is the default documentation language; detailed Chinese design and historical evidence remain available through the [documentation index](docs/README.md).

| Capability | Current implementation | Remaining work |
| --- | --- | --- |
| Web access to local files | Existing scoped MCP, Cloudflare Access and official OpenAI Tunnel integration | R12 advanced operations are not wired into the Web/desktop ingress |
| Agent access to another environment | Native stdio bridge, persistent pairing/revocation, direct WSS or static self-hosted Relay, inner TLS 1.3 mutual authentication | Certificate automation and production lifecycle management |
| Explicit developer operations | Windows command/script/version/build/test, text writes and exact patches; local per-operation approval, durable jobs, cancellation and bounded output | Trusted GUI management and approval interfaces |
| Concurrency and rules | Two independent connections can each run a job; scoped reads/writes and offline rule management | Full host for at least three independent connections, online rules and selective authorization epochs |

`trusted_host` runs with the current OS user's actual file and network permissions. It is **not a sandbox**. Existing read-only profiles are not upgraded; operations require an explicit writable v2 profile, `agent_remote`, developer/tool permission, a local runner catalog and exact local approval. See [operation setup and limits](docs/R12_OPERATIONS.md).

Local Windows operation tests and a public read-only Relay path have been exercised. The new operations have **not** been validated from the additional Linux computer through the real Relay, and Linux target execution/writes are unsupported. If an Agent already has authorized native access to the target workspace, use its native tools rather than this bridge.

## Existing desktop Preview

The sections below describe the existing R11.3 desktop behavior. Its saved connection controls and Developer page do not automatically use the new R12 target/Agent backend.

## What you can do

Expand All @@ -22,7 +46,7 @@ The GUI manages **one selected connection**. Stored connection history is not si
Requires Windows x64, WebView2 Runtime and PowerShell 7. Source builds require Go 1.25+ and Git; initial module resolution needs network access or a populated cache. Prepare the official `cloudflared` or `tunnel-client` separately for your chosen connection; neither is bundled.

```powershell
git clone --branch main https://github.com/LE-saber/Local-Probe.git
git clone --branch feat/r12-dual-mode git@github.com:LE-saber/Local-Probe.git
Set-Location .\Local-Probe
pwsh -NoLogo -NoProfile -File .\scripts\Build-LocalProbeDesktop.ps1
pwsh -NoLogo -NoProfile -File .\scripts\Start-LocalProbeDesktop.ps1
Expand Down Expand Up @@ -59,16 +83,21 @@ The older native Preview remains available through [Build-LocalProbePreview.ps1]

## Access and release boundaries

Available files and tools depend on profile roots, tools, deny/ignore rules and read-only policy. The preview does not expose arbitrary shell, arbitrary commands, writes, credential display or model-edited configuration. Backend modules and configuration intent are not proof that execution is enabled.
Available files and tools depend on profile roots, tools, deny/ignore rules and read-only policy. The existing desktop/Web Preview does not expose developer commands or writes. The separate R12 paired target supports explicitly configured and locally approved operations; merely saving a desktop command template does not enable them. Neither path exposes credential display or model-edited configuration.

Production supervision/service, a real WFP/broker enforcement path, signing, an installer, automatic updates, Linux/macOS GUI, default large-scale indexing, million-file end-to-end evidence and independent security review are not claimed as delivered. Local checks and historical validation records do not establish those guarantees. The [R11.3 release note](docs/RELEASE_NOTES_R11.3.zh-CN.md) is a draft, not a published release.

## Guides and evidence

Most detailed implementation guides remain in Simplified Chinese; these links preserve the existing documentation.
Start with the English R12 guides. Detailed historical implementation plans remain in Simplified Chinese.

| Guide | Contents |
| --- | --- |
| [R12 development](docs/R12_DEVELOPMENT.md) | Source checkout, component map, verification and remaining backend work |
| [GUI handoff](docs/GUI_HANDOFF.md) | Approved design, existing/proposed interfaces and acceptance requirements |
| [Operations](docs/R12_OPERATIONS.md) | Explicit trusted-host setup, approvals, jobs and file semantics |
| [Pairing and transport](docs/R12_PAIRING_AND_TRANSPORT.md) | Endpoint pairing, Tunnel/Relay startup and trust boundaries |
| [Documentation index](docs/README.md) | English entry points and Chinese design/evidence references |
| [Deployment](docs/DEPLOYMENT_PREVIEW.zh-CN.md) | Dependencies, configuration, workspaces and troubleshooting |
| [Desktop GUI](docs/DESKTOP_PREVIEW.zh-CN.md) | Interface, backups, file rules and verification boundaries |
| [Native Preview](docs/PREVIEW.zh-CN.md) | Older GUI, tray, workspaces and diagnostics |
Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[English](README.md) · [简体中文](README.zh-CN.md) · [繁體中文](README.zh-TW.md) · [日本語](README.ja.md)

> **R12 开发更新:** 当前分支 `feat/r12-dual-mode` 包含配对 Agent、加密 Relay 和逐次本地批准的 Windows 操作后端;尚未接入旧 GUI/Web 高级入口。仓库默认文档为英文,请先看[英文首页](README.md)、[开发指南](docs/R12_DEVELOPMENT.md)和[GUI交接](docs/GUI_HANDOFF.md)。下文保留 R11.3 桌面基线说明,不代表新独立后端的完整能力。

Local-Probe 是面向 Windows 的本地 MCP 工具与桌面 GUI:让 ChatGPT 在明确授权的工作空间内发现、搜索和读取文件。当前版本为 **R11.3 Desktop Preview**,自有源码采用 [MIT](LICENSE);它不是生产级 supervisor、安装器或签名稳定版。

## 桌面 GUI(推荐)
Expand Down
2 changes: 2 additions & 0 deletions README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[English](README.md) · [简体中文](README.zh-CN.md) · [繁體中文](README.zh-TW.md) · [日本語](README.ja.md)

> **R12 開發更新:** `feat/r12-dual-mode` 已包含配對 Agent、加密 Relay 與逐次本機核准的 Windows 操作後端;舊 GUI/Web 進階入口尚未接入。英文為預設文件語言,請先閱讀[英文首頁](README.md)、[開發指南](docs/R12_DEVELOPMENT.md)及 [GUI 交接](docs/GUI_HANDOFF.md)。以下保留 R11.3 桌面基線說明。

**Windows 桌面管理介面與 MCP 工具,讓 AI 探索、搜尋及讀取明確授權的本機工作區。**

> **R11.3 Desktop Preview。** 自有原始碼採 [MIT](LICENSE),第三方授權另列。目前快照沒有已發布的 GitHub Release。這是未簽章預覽版,並非正式 supervisor 或安裝程式;`execution_available=false`、`release_ready=false` 維持不變。
Expand Down
90 changes: 90 additions & 0 deletions cmd/local-probe-agent/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// local-probe-agent is started by an Agent's native MCP stdio client. Stdout is
// reserved for the official SDK; credentials are read from local environment.
package main

import (
"context"
"crypto/tls"
"errors"
"flag"
"fmt"
"net/http"
"os"
"os/signal"
"syscall"

"github.com/LE-saber/Local-Probe/internal/agentbridge"
"github.com/LE-saber/Local-Probe/internal/deviceidentity"
"github.com/LE-saber/Local-Probe/internal/peertransport"
"github.com/modelcontextprotocol/go-sdk/mcp"
)

func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
if err := run(ctx, os.Args[1:]); err != nil {
fmt.Fprintln(os.Stderr, "local-probe-agent:", err)
os.Exit(1)
}
}
func run(ctx context.Context, args []string) error {
f := flag.NewFlagSet("local-probe-agent", flag.ContinueOnError)
f.SetOutput(os.Stderr)
path := f.String("store", "", "absolute paired Agent identity directory")
endpoint := f.String("endpoint", "", "explicit wss:// Tunnel or Relay data endpoint")
transport := f.String("transport", "tunnel", "tunnel or relay")
outerCA := f.String("outer-ca-file", "", "optional absolute public CA PEM for private Relay/edge TLS")
if err := f.Parse(args); err != nil {
return err
}
if f.NArg() != 0 {
return errors.New("unexpected positional argument")
}
store, err := deviceidentity.OpenStore(*path)
if err != nil {
return err
}
defer store.Close()
inner, err := store.ClientTLS()
if err != nil {
return err
}
headers := http.Header{}
if value := os.Getenv("LOCAL_PROBE_AGENT_ACCESS_TOKEN"); value != "" {
headers.Set("Authorization", "Bearer "+value)
}
id, secret := os.Getenv("LOCAL_PROBE_CF_CLIENT_ID"), os.Getenv("LOCAL_PROBE_CF_CLIENT_SECRET")
if (id == "") != (secret == "") {
return errors.New("both Cloudflare credential environment references are required")
}
if id != "" {
headers.Set("CF-Access-Client-Id", id)
headers.Set("CF-Access-Client-Secret", secret)
}
if *transport != "tunnel" && *transport != "relay" {
return errors.New("transport must be tunnel or relay")
}
roots, err := peertransport.LoadPublicRoots(*outerCA)
if err != nil {
return err
}
newClient := func(endpoint string, inner *tls.Config, headers http.Header) (*http.Client, func(), error) {
return peertransport.HTTPClientWithRoots(endpoint, inner, headers, roots)
}
if *transport == "relay" {
newClient = func(endpoint string, inner *tls.Config, headers http.Header) (*http.Client, func(), error) {
return peertransport.RelayHTTPClient(endpoint, inner, headers, roots)
}
}
client, closeTransport, err := newClient(*endpoint, inner, headers)
if err != nil {
return err
}
defer closeTransport()
server, remote, err := agentbridge.New(ctx, client)
if err != nil {
return err
}
defer remote.Close()
return server.Run(ctx, &mcp.StdioTransport{})
}
74 changes: 74 additions & 0 deletions cmd/local-probe-operations/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// local-probe-operations is an owner-only approval/inspection CLI. It never
// runs commands and has no network listener or remote approval endpoint.
package main

import (
"encoding/json"
"errors"
"flag"
"fmt"
"github.com/LE-saber/Local-Probe/internal/operations"
"os"
)

func main() {
if err := run(os.Args[1:]); err != nil {
fmt.Fprintln(os.Stderr, "local-probe-operations:", err)
os.Exit(1)
}
}
func run(args []string) error {
f := flag.NewFlagSet("local-probe-operations", flag.ContinueOnError)
root := f.String("journal", "", "absolute private operation journal, outside all workspaces")
action := f.String("action", "list", "init, list, inspect, approve, reject, cancel or before")
id := f.String("id", "", "operation ID")
expected := f.String("digest", "", "exact plan digest shown by inspect")
ack := f.Bool("ack-trusted-host", false, "acknowledge current-user file/network access; not a sandbox")
if err := f.Parse(args); err != nil {
return err
}
if f.NArg() != 0 {
return errors.New("unexpected arguments")
}
j, err := operations.OpenJournal(*root, *action == "init")
if err != nil {
return err
}
defer j.Close()
if *action == "init" {
return j.Initialize()
}
switch *action {
case "cancel":
return j.CancelLocal(*id, *expected)
case "before":
b, err := j.BeforeImage(*id, *expected)
if err != nil {
return err
}
return json.NewEncoder(os.Stdout).Encode(struct {
Data []byte `json:"data_base64"`
}{b})
case "approve", "reject":
return j.Decide(*id, *expected, *action == "approve", *ack)
case "list", "inspect":
records, err := j.Records()
if err != nil {
return err
}
if *action == "inspect" {
r, ok := records[*id]
if !ok {
return operations.ErrDenied
}
return json.NewEncoder(os.Stdout).Encode(r)
}
out := []operations.Summary{}
for _, r := range records {
out = append(out, r.Summary)
}
return json.NewEncoder(os.Stdout).Encode(out)
default:
return errors.New("unsupported action")
}
}
Loading
Loading