@xopcai/xopc 0.0.43 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/README.md +138 -102
  2. package/README.zh-CN.md +155 -67
  3. package/dist/extensions/dingtalk/src/plugin.js +1 -1
  4. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  5. package/dist/extensions/telegram/src/plugin.js +1 -1
  6. package/dist/extensions/telegram/src/routing-integration.js +2 -2
  7. package/dist/extensions/telegram/xopc.extension.json +1 -1
  8. package/dist/extensions/weixin/src/api/api.js +2 -2
  9. package/dist/extensions/weixin/src/auth/accounts.js +1 -1
  10. package/dist/extensions/weixin/src/cdn/upload.js +1 -1
  11. package/dist/extensions/weixin/src/media/data-url.js +1 -1
  12. package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
  13. package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
  14. package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
  15. package/dist/extensions/weixin/src/plugin.js +1 -1
  16. package/dist/extensions/weixin/src/storage/sync-buf.js +1 -1
  17. package/dist/gateway/static/root/assets/agents-Bk2uuFvC.js +216 -0
  18. package/dist/gateway/static/root/assets/agents-Bk2uuFvC.js.map +1 -0
  19. package/dist/gateway/static/root/assets/{apps-page-Bco3oZzd.js → apps-page-CbSr8cvX.js} +2 -2
  20. package/dist/gateway/static/root/assets/{apps-page-Bco3oZzd.js.map → apps-page-CbSr8cvX.js.map} +1 -1
  21. package/dist/gateway/static/root/assets/channels-settings-Dn-hIRl1.js +2 -0
  22. package/dist/gateway/static/root/assets/{channels-settings-CpTZxCKG.js.map → channels-settings-Dn-hIRl1.js.map} +1 -1
  23. package/dist/gateway/static/root/assets/{cron-api-YLqLzMDN.js → cron-dreaming-jobs-D460WnXB.js} +3 -3
  24. package/dist/gateway/static/root/assets/cron-dreaming-jobs-D460WnXB.js.map +1 -0
  25. package/dist/gateway/static/root/assets/cron-page-Df6AyXfn.js +2 -0
  26. package/dist/gateway/static/root/assets/cron-page-Df6AyXfn.js.map +1 -0
  27. package/dist/gateway/static/root/assets/dist-DN37Fw0E.js +2 -0
  28. package/dist/gateway/static/root/assets/{dist-4ClCuR-G.js.map → dist-DN37Fw0E.js.map} +1 -1
  29. package/dist/gateway/static/root/assets/{extension-debug-page-yNO3rwBQ.js → extension-debug-page-CqdKfBv_.js} +2 -2
  30. package/dist/gateway/static/root/assets/{extension-debug-page-yNO3rwBQ.js.map → extension-debug-page-CqdKfBv_.js.map} +1 -1
  31. package/dist/gateway/static/root/assets/{extension-page-D0vOu9eC.js → extension-page-DhxjnfDf.js} +2 -2
  32. package/dist/gateway/static/root/assets/{extension-page-D0vOu9eC.js.map → extension-page-DhxjnfDf.js.map} +1 -1
  33. package/dist/gateway/static/root/assets/extension-settings-page-B3uhrA_f.js +2 -0
  34. package/dist/gateway/static/root/assets/{extension-settings-page-DqaNWoo7.js.map → extension-settings-page-B3uhrA_f.js.map} +1 -1
  35. package/dist/gateway/static/root/assets/heartbeat-config-api-z1kl5_rE.js +2 -0
  36. package/dist/gateway/static/root/assets/heartbeat-config-api-z1kl5_rE.js.map +1 -0
  37. package/dist/gateway/static/root/assets/{index-K0ZDwzeJ.css → index-B8G4Y9YY.css} +1 -1
  38. package/dist/gateway/static/root/assets/{index-KxjI2fjF.js → index-BUYGk2UT.js} +93 -93
  39. package/dist/gateway/static/root/assets/{index-KxjI2fjF.js.map → index-BUYGk2UT.js.map} +1 -1
  40. package/dist/gateway/static/root/assets/logs-page-Z9KRHWeO.js +2 -0
  41. package/dist/gateway/static/root/assets/{logs-page-DSdKuyeD.js.map → logs-page-Z9KRHWeO.js.map} +1 -1
  42. package/dist/gateway/static/root/assets/sessions-page-TlMYZxuv.js +2 -0
  43. package/dist/gateway/static/root/assets/{sessions-page-Bfb-hZJb.js.map → sessions-page-TlMYZxuv.js.map} +1 -1
  44. package/dist/gateway/static/root/assets/settings-page-X8vVcB8e.js +2 -0
  45. package/dist/gateway/static/root/assets/settings-page-X8vVcB8e.js.map +1 -0
  46. package/dist/gateway/static/root/assets/skills-page-B-tO9-I7.js +3 -0
  47. package/dist/gateway/static/root/assets/skills-page-B-tO9-I7.js.map +1 -0
  48. package/dist/gateway/static/root/assets/{use-image-provider-credentials-Cu5zeVdn.js → use-image-provider-credentials-DsYECmye.js} +2 -2
  49. package/dist/gateway/static/root/assets/{use-image-provider-credentials-Cu5zeVdn.js.map → use-image-provider-credentials-DsYECmye.js.map} +1 -1
  50. package/dist/gateway/static/root/index.html +2 -2
  51. package/dist/package.js +1 -1
  52. package/dist/src/agent/agent-manager.js +6 -6
  53. package/dist/src/agent/context/workspace-seed.js +2 -2
  54. package/dist/src/agent/goals/post-turn.js +1 -1
  55. package/dist/src/agent/image/load-image-media.js +1 -1
  56. package/dist/src/agent/ipc/bus.js +1 -1
  57. package/dist/src/agent/ipc/inbox.js +2 -2
  58. package/dist/src/agent/ipc/socket.js +1 -1
  59. package/dist/src/agent/memory/builtin-memory-store.js +1 -1
  60. package/dist/src/agent/memory/dreaming/deep-promotion.js +1 -1
  61. package/dist/src/agent/memory/dreaming/events.js +1 -1
  62. package/dist/src/agent/memory/dreaming/last-run.js +1 -1
  63. package/dist/src/agent/memory/dreaming/light-sweep.js +1 -1
  64. package/dist/src/agent/memory/dreaming/preview.js +1 -1
  65. package/dist/src/agent/memory/dreaming/rem-patterns.js +1 -1
  66. package/dist/src/agent/memory/dreaming/short-term-store.js +1 -1
  67. package/dist/src/agent/memory/dreaming/utils.js +1 -1
  68. package/dist/src/agent/memory/plugin-discovery.js +1 -1
  69. package/dist/src/agent/models/manager.js +1 -1
  70. package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
  71. package/dist/src/agent/service.js +5 -5
  72. package/dist/src/agent/skills/config.js +1 -1
  73. package/dist/src/agent/skills/hub-hash.js +2 -2
  74. package/dist/src/agent/skills/hub-lock.js +1 -1
  75. package/dist/src/agent/skills/hub-pull.js +1 -1
  76. package/dist/src/agent/skills/index.js +1 -1
  77. package/dist/src/agent/skills/managed-store.js +1 -1
  78. package/dist/src/agent/skills/scanner.js +1 -1
  79. package/dist/src/agent/skills/skill-manage-ops.js +1 -1
  80. package/dist/src/agent/skills/skill-manager.js +1 -1
  81. package/dist/src/agent/tools/dreaming-tool.js +1 -1
  82. package/dist/src/agent/tools/factory.js +1 -1
  83. package/dist/src/agent/tools/image-generate-tool.js +1 -1
  84. package/dist/src/agent/tools/send-media.js +1 -1
  85. package/dist/src/agent/tools/skill-manage-tool.js +1 -1
  86. package/dist/src/agent/tools/write.js +1 -1
  87. package/dist/src/auth/credentials.js +3 -3
  88. package/dist/src/auth/profiles/store.js +1 -1
  89. package/dist/src/auth/sync-provider-auth.js +1 -1
  90. package/dist/src/channels/attachments/inbound-persist.js +1 -1
  91. package/dist/src/channels/attachments/outbound-tts-persist.js +1 -1
  92. package/dist/src/channels/outbound/persist-store.js +1 -1
  93. package/dist/src/channels/pairing/allow-from-file.js +1 -1
  94. package/dist/src/channels/pairing/pairing-store.js +2 -2
  95. package/dist/src/chat-commands/builtins/config.js +2 -2
  96. package/dist/src/chat-commands/context.js +1 -1
  97. package/dist/src/cli/commands/agent.js +1 -1
  98. package/dist/src/cli/commands/agents.js +1 -1
  99. package/dist/src/cli/commands/config.js +1 -1
  100. package/dist/src/cli/commands/doctor/checks/config-health.js +1 -1
  101. package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
  102. package/dist/src/cli/commands/doctor/checks/session-integrity.js +1 -1
  103. package/dist/src/cli/commands/doctor/checks/state-integrity.js +1 -1
  104. package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
  105. package/dist/src/cli/commands/extension-dev.js +1 -1
  106. package/dist/src/cli/commands/extension-marketplace.js +1 -1
  107. package/dist/src/cli/commands/extension-pack.js +1 -1
  108. package/dist/src/cli/commands/image.js +1 -1
  109. package/dist/src/cli/commands/init.js +4 -4
  110. package/dist/src/cli/utils/init-workspace.js +2 -2
  111. package/dist/src/config/index.js +2 -2
  112. package/dist/src/config/loader.js +2 -2
  113. package/dist/src/config/models-json.js +2 -2
  114. package/dist/src/config/profile.js +2 -2
  115. package/dist/src/cron/executor.js +2 -2
  116. package/dist/src/cron/persistence.js +1 -1
  117. package/dist/src/cron/run-log-store.js +1 -1
  118. package/dist/src/daemon/launchd.js +2 -2
  119. package/dist/src/daemon/systemd.js +2 -2
  120. package/dist/src/extensions/health.js +1 -1
  121. package/dist/src/extensions/loader.js +1 -1
  122. package/dist/src/extensions/lockfile.js +2 -2
  123. package/dist/src/gateway/agents-admin.js +2 -2
  124. package/dist/src/gateway/hono/lib/extension-store.js +1 -1
  125. package/dist/src/gateway/hono/lib/static-ui.js +1 -1
  126. package/dist/src/gateway/hono/oauth.js +1 -1
  127. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  128. package/dist/src/gateway/hono/routes/config.js +1 -1
  129. package/dist/src/gateway/hono/routes/dreaming.js +1 -1
  130. package/dist/src/gateway/hono/routes/host-fs.js +1 -1
  131. package/dist/src/gateway/hono/routes/models.js +1 -1
  132. package/dist/src/gateway/hono/routes/workspace.js +3 -3
  133. package/dist/src/gateway/hono/sse.js +2 -2
  134. package/dist/src/gateway/lock.js +2 -2
  135. package/dist/src/gateway/service/run-gateway-agent.js +2 -2
  136. package/dist/src/gateway/service.js +5 -5
  137. package/dist/src/gateway/workspace-fs-file-list.js +1 -1
  138. package/dist/src/gateway/workspace-heartbeat-path.js +1 -1
  139. package/dist/src/infra/update-check.js +1 -1
  140. package/dist/src/infra/update-lock.js +3 -3
  141. package/dist/src/infra/update-runner.js +1 -1
  142. package/dist/src/infra/update-startup.js +2 -2
  143. package/dist/src/infra/write-file-atomic.js +2 -2
  144. package/dist/src/providers/auth-runtime/auth-profile-store.js +1 -1
  145. package/dist/src/providers/index.js +2 -2
  146. package/dist/src/providers/model-registry.js +1 -1
  147. package/dist/src/session/config-store.js +2 -2
  148. package/dist/src/session/search-index-cache.js +1 -1
  149. package/dist/src/session/search-index.js +1 -1
  150. package/dist/src/session/session-title.js +1 -1
  151. package/dist/src/session/store.js +5 -5
  152. package/dist/src/tui/backends/embedded-backend.js +1 -1
  153. package/dist/src/tui/tui.js +1 -1
  154. package/dist/src/utils/logger/audit.js +1 -1
  155. package/dist/src/utils/logger/log-store.js +1 -1
  156. package/dist/src/utils/logger/rotation.js +1 -1
  157. package/dist/src/voice/tts/audio.js +1 -1
  158. package/dist/src/voice/tts/providers/edge-speech.js +1 -1
  159. package/package.json +2 -2
  160. package/dist/gateway/static/root/assets/agents-BDhkkT2o.js +0 -216
  161. package/dist/gateway/static/root/assets/agents-BDhkkT2o.js.map +0 -1
  162. package/dist/gateway/static/root/assets/channels-settings-CpTZxCKG.js +0 -2
  163. package/dist/gateway/static/root/assets/cron-api-YLqLzMDN.js.map +0 -1
  164. package/dist/gateway/static/root/assets/cron-page-aiDeJtJ-.js +0 -2
  165. package/dist/gateway/static/root/assets/cron-page-aiDeJtJ-.js.map +0 -1
  166. package/dist/gateway/static/root/assets/dist-4ClCuR-G.js +0 -2
  167. package/dist/gateway/static/root/assets/extension-settings-page-DqaNWoo7.js +0 -2
  168. package/dist/gateway/static/root/assets/logs-page-DSdKuyeD.js +0 -2
  169. package/dist/gateway/static/root/assets/sessions-page-Bfb-hZJb.js +0 -2
  170. package/dist/gateway/static/root/assets/settings-page-B7NZPSpO.js +0 -2
  171. package/dist/gateway/static/root/assets/settings-page-B7NZPSpO.js.map +0 -1
  172. package/dist/gateway/static/root/assets/skills-page-D-AJTEVx.js +0 -3
  173. package/dist/gateway/static/root/assets/skills-page-D-AJTEVx.js.map +0 -1
package/README.md CHANGED
@@ -7,13 +7,13 @@
7
7
 
8
8
  <p align="center">
9
9
  <strong>The OPC workstation that grows with you.</strong><br />
10
- Ultra-lightweight <strong>personal AI assistant</strong> for <strong>One Person Companies</strong>.
10
+ A lightweight <strong>personal AI assistant</strong> for <strong>one-person companies</strong> — run it locally, bring your own keys, and extend it without forking core.
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <a href="https://github.com/xopcai/xopc"><img src="https://img.shields.io/badge/GitHub-xopcai%2Fxopc-181717?style=for-the-badge&amp;logo=github" alt="GitHub"></a>
15
15
  <a href="https://xopcai.github.io/xopc/"><img src="https://img.shields.io/badge/Docs-Documentation-228B22?style=for-the-badge" alt="Documentation"></a>
16
- <a href="#quick-start-tldr"><img src="https://img.shields.io/badge/Quick_Start-CLI-blue?style=for-the-badge" alt="Quick Start"></a>
16
+ <a href="#quick-start"><img src="https://img.shields.io/badge/Quick_Start-CLI-blue?style=for-the-badge" alt="Quick Start"></a>
17
17
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge" alt="License"></a>
18
18
  </p>
19
19
 
@@ -32,185 +32,187 @@
32
32
  <a href="https://xopcai.github.io/xopc/cli">CLI</a>
33
33
  </p>
34
34
 
35
- **CLI**, **HTTP/WebSocket gateway** with a **React** console, bundled **Telegram** & **WeChat (Weixin)** channel plugins (plus web console). Other chat surfaces: custom `ChannelPlugin` extensions. **20+ LLM providers** via [@earendil-works/pi-ai](https://github.com/earendil-works/pi-mono), plus **extensions** and **SKILL.md** skills—extend without forking core.
35
+ **xopc** is a self-hosted agent stack: **CLI**, full-screen **terminal UI (TUI)**, **HTTP/WebSocket gateway** with a **React** console, optional **Electron** desktop (**macOS**, **Windows**, **Linux**), and bundled **channel** plugins (Telegram, WeChat, Feishu/Lark, DingTalk). LLMs are wired through **[@earendil-works/pi-ai](https://github.com/earendil-works/pi-mono)** (20+ providers). Add **extensions** (tools, channels, providers) and **SKILL.md** skills plus **gateway UI** extensions via the extension UI SDK.
36
36
 
37
37
  ---
38
38
 
39
- ## Highlights
39
+ ## Why xopc
40
40
 
41
41
  | | |
42
42
  | --- | --- |
43
- | **OPC-native** | One Person Company AI workstation: from solo founder to scale—agent, gateway, channels, cron, skills, all in your control. |
44
- | **Grow with you** | Start with a single CLI command; add channels, extensions, and cron as your needs evolve—no vendor lock-in. |
45
- | **Gateway + Web UI** | REST, SSE, and WebSocket APIs; React console (Vite + Tailwind v4) for chat and ops. |
46
- | **Channels** | **Telegram** (multi-account, streaming, voice, documents) and **WeChat (Weixin)** (QR login, policies); **Web** console with the gateway. |
47
- | **Models** | OpenAI, Anthropic, Google, Groq, DeepSeek, OpenRouter, Ollama, Bedrock, Vertex, OAuth flows, and more switch in config, no code change. |
48
- | **Extensions & skills** | Install or author extensions; skills via SKILL.md and hub-style workflows (see docs). |
49
- | **Workspace tools** | File search/read/edit, web search, browser tools (optional), progress feedback for long tasks. |
43
+ | **Local-first** | You run the process; data stays on your machine unless you configure outbound channels or tools. No mandatory vendor cloud for the runtime. |
44
+ | **BYOK** | API keys and OAuth profiles live in your config (`~/.xopc/xopc.json`) and environment — **DeepSeek** (recommended), OpenAI, Anthropic, Google, **Ollama / LM Studio / vLLM**, Bedrock, Azure, OpenRouter, gateways, and more. |
45
+ | **Surfaces** | **`xopc tui`** (rich terminal UI), **`xopc agent`** (TTY chat), **gateway + browser UI**, **Electron** app with the same console. |
46
+ | **Channels** | **Telegram**, **WeChat (Weixin)**, **Feishu/Lark**, **DingTalk** (bundled) + **web** chat in the gateway; DM/group **policies** (pairing, allowlist, …). |
47
+ | **Media** | **Images** (vision + generation where configured) and **voice** (STT/TTS) e.g. Telegram and gateway paths; see docs. |
48
+ | **Extensible** | **Backend**: `ChannelPlugin`, tools, providers, cron. **UI**: customize the gateway console with **`@xopcai/xopc/extension-ui-sdk`**. |
50
49
 
51
50
  ---
52
51
 
53
- ## Quick install
52
+ ## Install
54
53
 
55
- **Runtime:** Node.js **≥ 22**.
54
+ **Requirements:** Node.js **≥ 22** (for the CLI and gateway). **pnpm** is recommended when working from a git clone.
56
55
 
57
56
  ```bash
58
57
  npm install -g @xopcai/xopc
59
58
  # or: pnpm add -g @xopcai/xopc
60
59
  ```
61
60
 
62
- **Recommended first run:** interactive onboarding (models, keys, channels).
61
+ **First run:** interactive onboarding (models, keys, channels).
63
62
 
64
63
  ```bash
65
64
  xopc onboard
66
- # quick path: xopc onboard --quick
65
+ # faster path: xopc onboard --quick
67
66
  ```
68
67
 
69
- Then chat in the terminal or start the gateway for the Web UI and channel bots.
70
-
71
68
  ---
72
69
 
73
- <a id="quick-start-tldr"></a>
70
+ <a id="quick-start"></a>
74
71
 
75
- ## Quick start (TL;DR)
72
+ ## Quick start
76
73
 
77
74
  ```bash
78
- # Interactive CLI chat
75
+ # Full-screen terminal UI (embedded agent; no gateway required)
76
+ xopc tui --local
77
+
78
+ # Classic interactive CLI chat
79
79
  xopc agent -i
80
80
 
81
- # One message
81
+ # One-shot message
82
82
  xopc agent -m "Summarize the last 5 commits"
83
83
 
84
- # Gateway (REST/SSE + static console); default dev URL depends on config
84
+ # Gateway: REST/SSE + static web console (URL from logs or gateway config)
85
85
  xopc gateway
86
86
 
87
- # From a dev clone (TypeScript entry, no prior build)
88
- pnpm install && pnpm run dev -- agent -i
87
+ # Same gateway, detached (prints PID/URL; stop with `xopc gateway stop`)
88
+ xopc gateway --background
89
89
  ```
90
90
 
91
- From source builds use **pnpm** (`pnpm run build`). See [AGENTS.md](./AGENTS.md) for contributor layout.
91
+ **From source (development):**
92
+
93
+ ```bash
94
+ git clone https://github.com/xopcai/xopc.git && cd xopc
95
+ pnpm install && pnpm run dev -- agent -i # no build needed for dev CLI
96
+ pnpm run build # Node + web console → dist/
97
+ ```
92
98
 
93
99
  ---
94
100
 
95
- ## CLI vs gateway (quick reference)
101
+ <a id="electron-desktop"></a>
96
102
 
97
- | Goal | Command / flow |
98
- | --- | --- |
99
- | Chat in the terminal | `xopc agent -i` or `xopc agent -m "…"` |
100
- | Open the Web console | Run `xopc gateway`, open the URL from logs or your `gateway` config |
101
- | Use Telegram / WeChat | Configure `channels.telegram` / `channels.weixin` in `~/.xopc/xopc.json`, run gateway; WeChat: `xopc channels login --channel weixin` on the gateway host |
102
- | Onboarding / model setup | `xopc onboard` |
103
- | Scheduled jobs | Enable `cron` in config; see [docs](https://xopcai.github.io/xopc/) |
103
+ ## Electron desktop app
104
104
 
105
- Full flags and subcommands: [CLI reference](https://xopcai.github.io/xopc/cli).
105
+ ### Install from GitHub Releases
106
106
 
107
- ---
107
+ 1. Open **[GitHub Releases](https://github.com/xopcai/xopc/releases)** for this repo.
108
+ 2. Pick the asset for your OS (typical names: **`.dmg`** / **`.zip`** on macOS, **`.exe`** on Windows, **`.AppImage`** / **`.deb`** on Linux).
109
+ 3. Install or run it like any desktop application. On macOS, first launch may ask for **microphone** access if you use voice in chat.
108
110
 
109
- ## Security (DMs and the gateway)
111
+ If your platform has no published build yet, use **`xopc gateway`** + npm CLI, or build from source below.
110
112
 
111
- Inbound messages from chat apps are **untrusted input**. Prefer **pairing** or **allowlist** policies for DMs and restrict who can trigger the bot in groups until you understand the risk surface.
113
+ ### Build from source (developers)
112
114
 
113
- - Defaults and options: [Channels](https://xopcai.github.io/xopc/channels) and configuration docs.
114
- - Gateway token and network exposure: treat the gateway like any admin API — bind appropriately and keep tokens secret.
115
+ ```bash
116
+ pnpm install
117
+ pnpm run electron:build # artifacts under dist/release/
118
+ ```
115
119
 
116
120
  ---
117
121
 
118
- ## Documentation
122
+ ## Chat surfaces (pick one)
119
123
 
120
- | Guide | Description |
121
- | --- | --- |
122
- | [Getting started](https://xopcai.github.io/xopc/getting-started) | Install, onboard, first chat |
123
- | [Configuration](https://xopcai.github.io/xopc/configuration) | Main JSON config (`xopc.json`) reference |
124
- | [CLI](https://xopcai.github.io/xopc/cli) | Commands and flags |
125
- | [Channels](https://xopcai.github.io/xopc/channels) | Telegram, WeChat (Weixin), policies |
126
- | [Extensions](https://xopcai.github.io/xopc/extensions) | Extension system |
127
- | [Tools](https://xopcai.github.io/xopc/tools) | Built-in tools |
128
- | [Skills](https://xopcai.github.io/xopc/skills) | Skills and SKILL.md |
129
- | [Architecture](https://xopcai.github.io/xopc/architecture) | How pieces fit together |
124
+ | Surface | Command / how | Best for |
125
+ | --- | --- | --- |
126
+ | **TUI** | `xopc tui`, `xopc tui --local`, or `xopc tui --url …` | Full-screen terminal UX, optional remote gateway |
127
+ | **CLI** | `xopc agent -i` / `xopc agent -m "…"` | Scripting and minimal TTY |
128
+ | **Web** | `xopc gateway` (foreground) or `xopc gateway --background`, then open the console URL | Sharing one gateway, browser chat, settings |
129
+ | **Electron** | **[Install from Releases](#electron-desktop)** or build from source | Desktop app (macOS / Windows / Linux) |
130
130
 
131
131
  ---
132
132
 
133
- ## Supported channels
133
+ ## Bundled channels (config keys)
134
134
 
135
- Core ships **two** messaging integrations (see `extensions/telegram`, `extensions/weixin`):
135
+ Enable and configure under **`channels.*`** in **`~/.xopc/xopc.json`** (override path with `XOPC_CONFIG` / `XOPC_CONFIG_PATH`). The gateway must run for IM bots; WeChat needs login on the gateway host.
136
136
 
137
- | Channel | Notes |
138
- | --- | --- |
139
- | Telegram | Multi-account, streaming preview, voice (STT/TTS), files, allowlist / group policies |
140
- | WeChat (Weixin) | QR login on the gateway host, DM / group policies; config under `channels.weixin` |
141
- | Web | Gateway console (React SPA)—not a third-party IM, but the primary browser UI |
137
+ | Channel | Config section | Notes |
138
+ | --- | --- | --- |
139
+ | **Telegram** | `channels.telegram` | Multi-account, streaming, voice, documents; DM/group policies |
140
+ | **WeChat (Weixin)** | `channels.weixin` | QR login on gateway host; DM/group policies |
141
+ | **Feishu / Lark** | `channels.feishu` | Bot / webhook style setup per docs |
142
+ | **DingTalk** | `channels.dingtalk` | Stream mode; app credentials per docs |
143
+ | **Web** | *(gateway)* | React SPA served with the gateway — not a separate IM |
142
144
 
143
- There is **no** bundled Feishu, Slack, Discord, etc.; those would be separate extensions.
145
+ Full field reference and security defaults: **[Channels](https://xopcai.github.io/xopc/channels)** and **[Configuration](https://xopcai.github.io/xopc/configuration)**.
144
146
 
145
147
  ---
146
148
 
147
- ## Supported LLM providers (overview)
149
+ ## Local-first & BYOK
148
150
 
149
- Powered by **pi-ai** common (OpenAI, Anthropic, Google, Groq, DeepSeek, …), specialty (OpenRouter, Mistral, xAI, …), enterprise (Bedrock, Azure, Vertex, Vercel AI Gateway), OAuth (e.g. Copilot, Codex), and local (Ollama, LM Studio, vLLM). Details: [Models](https://xopcai.github.io/xopc/models).
151
+ - **You control credentials:** set `providers.*` in config and/or provider env vars (see [Models](https://xopcai.github.io/xopc/models)).
152
+ - **On-prem inference:** point the default model at **Ollama**, **LM Studio**, **vLLM**, or other OpenAI-compatible bases — no cloud LLM required.
153
+ - **Optional tools** (e.g. browser automation) are **off until you enable** them; install Playwright Chromium if you use browser tools.
150
154
 
151
155
  ---
152
156
 
153
- ## Development
157
+ ## CLI vs gateway
154
158
 
155
- ```bash
156
- git clone https://github.com/xopcai/xopc.git
157
- cd xopc
158
- pnpm install
159
- pnpm run dev # CLI via tsx
160
- pnpm run build # Node + web console dist
161
- pnpm test
162
- pnpm run lint
163
- ```
159
+ | Goal | Command / flow |
160
+ | --- | --- |
161
+ | Terminal chat | `xopc tui --local` or `xopc agent -i` |
162
+ | Web console | `xopc gateway` → open the URL from logs / config |
163
+ | Gateway in background | `xopc gateway --background` — then `xopc gateway status`, `xopc gateway stop`, `xopc gateway restart`, `xopc gateway logs` as needed |
164
+ | Telegram / WeChat / Feishu / DingTalk | Configure `channels.*`, run gateway; WeChat: `xopc channels login --channel weixin` on the gateway host |
165
+ | Onboarding | `xopc onboard` |
166
+ | Schedules | Enable `cron` in config |
164
167
 
165
- ### Repository layout
168
+ CLI reference: **[CLI](https://xopcai.github.io/xopc/cli)**.
166
169
 
167
- ```
168
- src/
169
- ├── agent/ # Agent service, tools, memory, prompts
170
- ├── channels/ # Channel plugins and integrations
171
- ├── cli/ # Commands
172
- ├── config/ # Schema and loader
173
- ├── cron/ # Scheduled tasks
174
- ├── gateway/ # HTTP/WebSocket server
175
- ├── providers/ # Model registry
176
- ├── session/ # Sessions
177
- └── …
178
- web/ # Gateway console (React + Vite)
179
- ```
170
+ ---
171
+
172
+ ## Security
173
+
174
+ Treat inbound chat messages as **untrusted input**. Prefer **pairing** or **allowlist** for DMs until you understand exposure. Bind the gateway appropriately and keep gateway tokens secret — see **[Channels](https://xopcai.github.io/xopc/channels)**.
180
175
 
181
176
  ---
182
177
 
183
- ## Key features (deeper)
178
+ ## Documentation
184
179
 
185
- ### Extensions
180
+ | Guide | Description |
181
+ | --- | --- |
182
+ | [Getting started](https://xopcai.github.io/xopc/getting-started) | Install, onboard, first chat |
183
+ | [Configuration](https://xopcai.github.io/xopc/configuration) | `xopc.json` reference |
184
+ | [CLI](https://xopcai.github.io/xopc/cli) | Commands and flags |
185
+ | [Channels](https://xopcai.github.io/xopc/channels) | All bundled channels |
186
+ | [Extensions](https://xopcai.github.io/xopc/extensions) | Extension system |
187
+ | [Tools](https://xopcai.github.io/xopc/tools) | Built-in tools |
188
+ | [Skills](https://xopcai.github.io/xopc/skills) | SKILL.md skills |
189
+ | [Voice](https://xopcai.github.io/xopc/voice) | STT/TTS |
190
+ | [Architecture](https://xopcai.github.io/xopc/architecture) | How pieces fit together |
186
191
 
187
- ```bash
188
- xopc extension install xopc-extension-weather
189
- xopc extension create my-extension --kind tool
190
- ```
192
+ ---
193
+
194
+ ## LLM providers (overview)
191
195
 
192
- [Extensions guide](https://xopcai.github.io/xopc/extensions)
196
+ **DeepSeek** (recommended), OpenAI, Anthropic, Google, Groq, OpenRouter, Mistral, xAI, Bedrock, Azure, Vertex, Vercel AI Gateway, OAuth flows (e.g. Copilot/Codex), and local stacks via pi-ai. Details: **[Models](https://xopcai.github.io/xopc/models)**.
193
197
 
194
- ### Skills
198
+ ---
199
+
200
+ ## Extensions & skills
195
201
 
196
202
  ```bash
203
+ xopc extension install xopc-extension-weather
204
+ xopc extension create my-extension --kind tool
197
205
  xopc skills list
198
206
  xopc skills install <name>
199
207
  ```
200
208
 
201
- [Skills guide](https://xopcai.github.io/xopc/skills)
202
-
203
- ### Voice (e.g. Telegram)
204
-
205
- Configure `stt` / `tts` in your main config (`xopc.json` by default). [Voice docs](https://xopcai.github.io/xopc/voice).
209
+ Backend extensions can ship **tools**, **channels**, and **model bridges**. Gateway **UI** extensions use **`@xopcai/xopc/extension-ui-sdk`** (see `packages/extension-ui-sdk/`). Guides: **[Extensions](https://xopcai.github.io/xopc/extensions)**, **[Skills](https://xopcai.github.io/xopc/skills)**.
206
210
 
207
211
  ---
208
212
 
209
- ## Configuration
210
-
211
- Default config path: **`~/.xopc/xopc.json`** (override with `XOPC_CONFIG`).
213
+ ## Configuration snippet
212
214
 
213
- Minimal example:
215
+ Default path: **`~/.xopc/xopc.json`**.
214
216
 
215
217
  ```json
216
218
  {
@@ -236,7 +238,40 @@ Minimal example:
236
238
  }
237
239
  ```
238
240
 
239
- [Full configuration reference](https://xopcai.github.io/xopc/configuration)
241
+ Add **`channels.weixin`**, **`channels.feishu`**, **`channels.dingtalk`** as needed — see the **[configuration](https://xopcai.github.io/xopc/configuration)** and **[channels](https://xopcai.github.io/xopc/channels)** docs for full schemas.
242
+
243
+ ---
244
+
245
+ ## Repository layout
246
+
247
+ ```
248
+ src/
249
+ ├── agent/ # Agent service, tools, memory, prompts
250
+ ├── channels/ # Channel plugin host
251
+ ├── cli/ # Commands
252
+ ├── config/ # Schema and loader
253
+ ├── cron/ # Scheduled tasks
254
+ ├── gateway/ # HTTP/WebSocket server
255
+ ├── providers/ # Model registry
256
+ ├── session/ # Sessions
257
+ ├── tui/ # Terminal UI (pi-tui)
258
+ └── …
259
+ web/ # Gateway console (React + Vite)
260
+ ```
261
+
262
+ Contributor notes: **[AGENTS.md](./AGENTS.md)**.
263
+
264
+ ---
265
+
266
+ ## Development
267
+
268
+ ```bash
269
+ pnpm install
270
+ pnpm run dev # CLI via tsx
271
+ pnpm run build # Node + web → dist
272
+ pnpm test
273
+ pnpm run lint
274
+ ```
240
275
 
241
276
  ---
242
277
 
@@ -244,6 +279,7 @@ Minimal example:
244
279
 
245
280
  - LLM layer: [@earendil-works/pi-ai](https://github.com/earendil-works/pi-mono)
246
281
  - Agent runtime: [@earendil-works/pi-agent-core](https://github.com/earendil-works/pi-mono)
282
+ - Inspired by [openclaw/openclaw](https://github.com/openclaw/openclaw) and [NousResearch/hermes-agent](https://github.com/NousResearch/hermes-agent)
247
283
 
248
284
  ---
249
285