hob-bot 1.3.0 → 1.4.0
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.
- package/README.md +31 -23
- package/README.zh-CN.md +32 -24
- package/dist/web/assets/{DesktopView-lixZfbYr.js → DesktopView-A11jmUwu.js} +1 -1
- package/dist/web/assets/index-B-YlVbpo.js +270 -0
- package/dist/web/assets/index-DkSQ-ygR.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/web/mock/readme-cover.svg +13 -0
- package/dist/web/mock/readme-page.html +7 -0
- package/package.json +1 -1
- package/server/src/assistant-skills.ts +2 -2
- package/server/src/delete-skill.ts +19 -0
- package/server/src/desktop-tools.ts +4 -5
- package/server/src/http.ts +24 -4
- package/server/src/job-view.ts +2 -2
- package/server/src/jobs.ts +105 -62
- package/server/src/knowledge-tools.ts +1 -1
- package/server/src/main.ts +2 -0
- package/server/src/memory.ts +2 -2
- package/server/src/now.ts +1 -1
- package/server/src/overview.ts +1 -2
- package/server/src/pages.ts +4 -4
- package/server/src/prompt.ts +46 -110
- package/server/src/router-tools.ts +47 -27
- package/server/src/router.ts +2 -1
- package/server/src/routines.ts +8 -3
- package/server/src/runtime.ts +12 -1
- package/server/src/settings.ts +37 -0
- package/server/src/transcript.ts +14 -4
- package/server/src/usage-prices.ts +165 -0
- package/server/src/usage.ts +281 -0
- package/server/src/worker-tools.ts +6 -9
- package/shared/types.ts +83 -2
- package/dist/web/assets/index-BZhge0qe.js +0 -267
- package/dist/web/assets/index-DIo1ArRa.css +0 -1
package/README.md
CHANGED
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
# Hob
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Hob is a self-hosted personal assistant that gets work done: talk to Hob, and it handles small requests itself and delegates larger jobs.
|
|
4
4
|
|
|
5
5
|
[中文说明](README.zh-CN.md) · [Architecture](docs/architecture.md) · MIT License
|
|
6
6
|
|
|
7
7
|
> The interface is currently Chinese-only. Hob is a single-user app you run on your own machine or server.
|
|
8
8
|
|
|
9
|
-

|
|
10
|
+
|
|
11
|
+
*Illustration: the floating cards are composed from separate screenshots.*
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
You talk to assistants, not jobs. An assistant handles small requests directly and delegates larger work to a job. Jobs return Markdown results and files only to their assistant, and ask the assistant when they need an answer; the assistant decides what to show you and when to ask you. Global rules and each assistant's own rules determine what needs your confirmation.
|
|
10
16
|
|
|
11
17
|
## What you get
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
### Assistants, jobs and schedules
|
|
20
|
+
|
|
21
|
+
Each assistant has a conversation, duties, rules, skills, schedules and a work log. When similar requests recur, Hob can propose a dedicated assistant. When it delegates to another assistant, a delegation card tracks the work, carries your original request and lets you take over in the receiving assistant's conversation.
|
|
22
|
+
|
|
23
|
+
Jobs can be inspected, stopped or resumed, with each round retained; the assistant receives reminders when a job exceeds its expected duration. Routines put their job cards and results in the conversation. The conversation follows new output as the assistant writes, and a screenshot can be pasted straight into the input box.
|
|
24
|
+
|
|
25
|
+
On a phone, the assistant list, conversation and profile use a mobile layout; the app supports swipe-to-reply and long-press actions. Push notifications alert you when an assistant needs your decision or a job gets stuck or fails.
|
|
26
|
+
|
|
27
|
+

|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
### Skills
|
|
16
30
|
|
|
17
|
-
|
|
31
|
+
An assistant decides which of its skills each job gets; a schedule can be bound to one. When a job finishes something worth repeating, the assistant has that job write the skill up in its own session, running the commands and scripts again first. Skills covering the same kind of work are merged into one and the older copy archived; when a job finds a step outdated, the skill gets corrected.
|
|
18
32
|
|
|
19
|
-
|
|
33
|
+
### Rules
|
|
20
34
|
|
|
21
|
-
|
|
35
|
+
Global rules apply to every assistant and job; each assistant can also have its own. Rules distinguish actions that require confirmation from instructions to follow automatically; confirmation choices can save an exception for next time.
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
### Pages and knowledge
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
Assistants can present comparisons and research as pages in the side panel. Organize, search and preview files in knowledge bases, bind them to assistants and follow citations; optional embeddings enable hybrid search, including indexed PDF text.
|
|
26
40
|
|
|
27
|
-
|
|
41
|
+
### Cloud desktop and tools
|
|
28
42
|
|
|
29
|
-
|
|
43
|
+
An optional cloud desktop gives each assistant a browser and screen shared with its jobs; selected assistants can also use a public screen. Assistants can operate the browser and send screenshots in chat; you can watch or take control.
|
|
30
44
|
|
|
31
|
-
|
|
45
|
+
Assistants and jobs can use web search across SearXNG, Exa, Tavily, Brave, Serper, Jina, Firecrawl, Perplexity, You.com and Ollama. Jobs can call configured MCP services, including configurations imported from Claude Code, Cursor and pi. Memory can be local or use [Lore](https://github.com/FFatTiger/lore); image generation uses an OpenAI-compatible API. npm and source installations can also use an existing Claude Code subscription login.
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
### Usage and cost
|
|
34
48
|
|
|
35
|
-
|
|
36
|
-
- **Skills** from Hob's own skill folder, the shared `~/.agents/skills`, and Lore. Import existing skills or let assistants save reusable ones, edit their instructions with version history, and choose a skill for a job.
|
|
37
|
-
- **MCP servers** (stdio or streamable HTTP) that jobs can call, with per-server and per-tool switches; import what you already have from Claude Code, Cursor and pi.
|
|
38
|
-
- **Long-term memory**, kept locally or in [Lore](https://github.com/FFatTiger/lore).
|
|
39
|
-
- **Image generation** in chat through an OpenAI-compatible image API, with a progress card while it runs.
|
|
40
|
-
- **Claude subscription** via an existing local Claude Code login on npm or source installs.
|
|
41
|
-
- **Push notifications** when an assistant needs your decision or a job gets stuck or fails.
|
|
49
|
+
Settings → Usage counts the conversations and jobs you already have and shows requests, tokens and estimated cost for the last day, 7 days, 30 days or all time, with a heatmap for the past year and breakdowns by model and by assistant. Prices come from models.dev by default and can be edited per model.
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
### Light and dark
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Hob has light and dark themes and can follow the system setting.
|
|
46
54
|
|
|
47
55
|
## Quick start
|
|
48
56
|
|
|
@@ -155,7 +163,7 @@ npm test # vitest
|
|
|
155
163
|
npm run typecheck
|
|
156
164
|
```
|
|
157
165
|
|
|
158
|
-
Add `?mock=1` to the dev URL to run the UI against an in-browser fake backend.
|
|
166
|
+
Add `?mock=1` to the dev URL to run the UI against an in-browser fake backend. The screenshots above use dedicated mock scenarios; after `npx vite build`, set `CHROME_PATH` to your Chrome or Chromium executable and run `CHROME_PATH=/path/to/chrome node scripts/readme-screenshots.mjs`. To export the full set of detailed views separately, add `--all <output-directory>`.
|
|
159
167
|
|
|
160
168
|
Stack: Node 22 + TypeScript, Hono with SSE, Vite + React with hand-written CSS. The agent engine is the [pi](https://github.com/earendil-works/pi) SDK, used in-process. Read [docs/architecture.md](docs/architecture.md) for the design, data layout and tool list (in Chinese).
|
|
161
169
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
# Hob
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Hob 是一个自己部署、真正动手处理事务的私人助手。你只和 Hob 说话:小事它当场处理,大活交给后台任务。
|
|
4
4
|
|
|
5
5
|
[English](README.md) · [架构说明](docs/architecture.md) · MIT 许可证
|
|
6
6
|
|
|
7
7
|
> 目前界面只有中文。Hob 是单用户应用,运行在你自己的电脑或服务器上。
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
*示意图:浮层卡片由单独截图合成。*
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## 怎么运作
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
你只和助手说话,不直接和任务交互。助手小事当场处理,大活交给任务;任务只向助手交 Markdown 结果和文件,有问题也只问助手。助手决定给你看什么、什么时候问你;全局规则和每个助手自己的规则决定哪些事情要先征求你的确认。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 功能
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### 助手、任务和定时
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
每个助手有自己的对话、职责、规则、技能、定时任务和工作日志。同类工作反复出现时,Hob 会提议创建专门的助手;向其他助手转交时,对话中的转交卡会跟踪状态、带上你的原话,你也可以在接收助手的对话中接手。
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
任务可查看过程、停止或续做,每轮记录分别保留;超出预计用时后,助手会收到督办提醒。定时任务把任务卡和结果发到对应的对话里。助手输出时对话会跟着往下滚,输入框里也可以直接粘贴截图。
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
手机上可查看助手列表、对话和档案,支持滑动回复和长按操作。助手需要你确认,或任务受阻、失败时,可以收到推送通知。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+

|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
### 技能
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
技能归助手管:派活时由助手决定给任务哪几份,定时任务可以绑定一份。任务做完、结果值得留下时,助手让做这件事的原任务在自己的会话里把它写成技能,写之前把命令和脚本真跑一遍。管同一类事的技能会合成一份,旧的归档;任务照着技能做时发现哪一步过时,助手会让它改对。
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
### 规则
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
- **技能**:读取 Hob 自己的技能目录、通用的 `~/.agents/skills` 和 Lore。可以导入已有技能;助手可以沉淀技能、修改正文并保留旧版,派任务时可指定技能。
|
|
37
|
-
- **MCP 服务**:任务可以调用本地命令(stdio)或远程地址(streamable HTTP)的 MCP 服务,可按服务、按工具单独开关;可以从 Claude Code、Cursor、pi 导入已有配置。
|
|
38
|
-
- **长期记忆**:保存在本地,或接入 [Lore](https://github.com/FFatTiger/lore)。
|
|
39
|
-
- **图像生成**:接 OpenAI 兼容的图像接口,在对话里生图,并通过生成中卡片查看进度。
|
|
40
|
-
- **Claude 订阅**:npm 或源码安装时,可使用本机已有的 Claude Code 登录。
|
|
41
|
-
- **推送通知**:助手需要你确认,或任务受阻、失败时通知你。
|
|
35
|
+
全局规则对所有助手和任务生效,每个助手也可以有自己的规则。规则分为执行前确认和一律照做;确认时可以选择以后允许同类操作,保存为规则。
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
### 页面和知识库
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
助手可以把方案比较、调研等内容做成页面,在侧栏打开。知识库支持整理、搜索和预览文件,绑定到助手并从引用跳到原文;配置向量模型后可混合检索,也支持为 PDF 文字建立索引。
|
|
40
|
+
|
|
41
|
+
### 云桌面和工具
|
|
42
|
+
|
|
43
|
+
可选的云桌面为每个助手提供与任务共用的屏幕和浏览器,也可允许指定助手使用公共屏幕。助手可以自己操作浏览器并在对话中发送截图,你可以观看或接管。
|
|
44
|
+
|
|
45
|
+
助手和任务可以使用 SearXNG、Exa、Tavily、Brave、Serper、Jina、Firecrawl、Perplexity、You.com、Ollama 的联网搜索。任务可以调用配置好的 MCP 服务,也可以从 Claude Code、Cursor 和 pi 导入已有配置。记忆可保存在本地或接入 [Lore](https://github.com/FFatTiger/lore);图像生成使用 OpenAI 兼容接口。npm 或源码安装也可以使用本机已有的 Claude Code 订阅登录。
|
|
46
|
+
|
|
47
|
+
### 消耗
|
|
48
|
+
|
|
49
|
+
设置 → 消耗 把已有的对话和任务统计起来,显示今天、近 7 天、近 30 天和全部的请求数、token 和估算花费,附最近一年的热力图,以及按模型、按助手的明细。单价默认取自 models.dev,也可以按模型自己改。
|
|
50
|
+
|
|
51
|
+
### 浅色和深色
|
|
52
|
+
|
|
53
|
+
Hob 支持浅色、深色,以及跟随系统设置。
|
|
46
54
|
|
|
47
55
|
## 快速开始
|
|
48
56
|
|
|
@@ -155,7 +163,7 @@ npm test # vitest
|
|
|
155
163
|
npm run typecheck
|
|
156
164
|
```
|
|
157
165
|
|
|
158
|
-
开发地址加上 `?mock=1
|
|
166
|
+
开发地址加上 `?mock=1`,界面会使用浏览器内的模拟后端。上面的截图使用专门的模拟场景;执行 `npx vite build` 后,将 `CHROME_PATH` 设为 Chrome 或 Chromium 可执行文件路径,再运行 `CHROME_PATH=/path/to/chrome node scripts/readme-screenshots.mjs` 重新拍摄。要另行导出完整的详细场景图,可加上 `--all <输出目录>`。
|
|
159
167
|
|
|
160
168
|
技术栈:Node 22 + TypeScript,Hono + SSE,Vite + React,CSS 全部手写。智能体引擎是进程内运行的 [pi](https://github.com/earendil-works/pi) SDK。设计、数据布局和工具列表见 [docs/architecture.md](docs/architecture.md)。
|
|
161
169
|
|