paimon 0.2.2__tar.gz → 0.2.4__tar.gz
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.
- paimon-0.2.4/PKG-INFO +116 -0
- paimon-0.2.4/README.md +104 -0
- paimon-0.2.4/README.zh-CN.md +104 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/__init__.py +4 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/agent.py +350 -62
- {paimon-0.2.2 → paimon-0.2.4}/paimon/app.py +46 -3
- {paimon-0.2.2 → paimon-0.2.4}/paimon/app.tcss +13 -1
- paimon-0.2.4/paimon/aside.py +165 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/cli.py +14 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/commands.py +89 -109
- {paimon-0.2.2 → paimon-0.2.4}/paimon/compaction.py +46 -4
- paimon-0.2.4/paimon/config.py +373 -0
- paimon-0.2.4/paimon/diff.py +167 -0
- paimon-0.2.4/paimon/errors.py +16 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/headless.py +42 -14
- {paimon-0.2.2 → paimon-0.2.4}/paimon/jobs.py +2 -3
- {paimon-0.2.2 → paimon-0.2.4}/paimon/llm.py +22 -1
- {paimon-0.2.2 → paimon-0.2.4}/paimon/lockfile.py +17 -9
- {paimon-0.2.2 → paimon-0.2.4}/paimon/login.py +28 -5
- {paimon-0.2.2 → paimon-0.2.4}/paimon/pane.py +161 -30
- {paimon-0.2.2 → paimon-0.2.4}/paimon/prompt.py +15 -5
- {paimon-0.2.2 → paimon-0.2.4}/paimon/retry.py +27 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/session.py +163 -14
- {paimon-0.2.2 → paimon-0.2.4}/paimon/skill/SKILL.md +5 -2
- {paimon-0.2.2 → paimon-0.2.4}/paimon/supervisor.py +2 -1
- paimon-0.2.4/paimon/telemetry.py +160 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/tools.py +625 -44
- {paimon-0.2.2 → paimon-0.2.4}/paimon/ui.py +157 -21
- paimon-0.2.4/paimon.egg-info/PKG-INFO +116 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon.egg-info/SOURCES.txt +3 -0
- paimon-0.2.4/paimon.egg-info/requires.txt +3 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon.egg-info/scm_file_list.json +7 -0
- paimon-0.2.4/paimon.egg-info/scm_version.json +8 -0
- {paimon-0.2.2 → paimon-0.2.4}/pyproject.toml +1 -1
- paimon-0.2.2/PKG-INFO +0 -116
- paimon-0.2.2/README.md +0 -104
- paimon-0.2.2/README.zh-CN.md +0 -104
- paimon-0.2.2/paimon/config.py +0 -162
- paimon-0.2.2/paimon/diff.py +0 -71
- paimon-0.2.2/paimon.egg-info/PKG-INFO +0 -116
- paimon-0.2.2/paimon.egg-info/requires.txt +0 -3
- paimon-0.2.2/paimon.egg-info/scm_version.json +0 -8
- {paimon-0.2.2 → paimon-0.2.4}/LICENSE +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/MANIFEST.in +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/__main__.py +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/mentions.py +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/model_windows.py +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/tabs.py +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon/taskpane.py +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon.egg-info/dependency_links.txt +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon.egg-info/entry_points.txt +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/paimon.egg-info/top_level.txt +0 -0
- {paimon-0.2.2 → paimon-0.2.4}/setup.cfg +0 -0
paimon-0.2.4/PKG-INFO
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: paimon
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: A minimal code agent built on pydantic-ai + textual
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: pydantic-ai-slim[anthropic,openai]>=2.31.0
|
|
9
|
+
Requires-Dist: textual>=8.2.7
|
|
10
|
+
Requires-Dist: textual-serve>=1.1.3
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# Paimon
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
English | [简体中文](README.zh-CN.md)
|
|
18
|
+
|
|
19
|
+
Paimon is a coding agent that lives in your terminal. It reads and edits files in the current directory and runs commands. It also runs headless and imports as a library, so a stronger agent or a program of your own can drive it.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv tool install paimon # or: pip install paimon
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Getting started
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
paimon
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or run it without installing anything:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uvx paimon
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The first launch asks for a provider, model, API base and key. Then just type what you want done. Write `@path/to/file` in a prompt to hand a file to the agent.
|
|
40
|
+
|
|
41
|
+
While it runs: `Shift+Tab` switches how much the agent may do on its own (**read** asks before writing files or running commands, **edit** lets edits inside the working directory through, **yolo** never asks and is the default), `Esc` interrupts the current turn, `Ctrl+P` opens the command palette, `Ctrl+C` quits.
|
|
42
|
+
|
|
43
|
+
`Ctrl+T` opens another session in a pane of its own, `Ctrl+W` closes one, `Ctrl+PageUp` and `Ctrl+PageDown` move between them, and `Ctrl+G` jumps to a pane waiting for permission. Paimon can open panes itself: ask for two independent things and it starts a second agent in its own tab. It can also leave a command running in a tab of its own, a dev server or a watcher, instead of holding up a turn.
|
|
44
|
+
|
|
45
|
+
## Using Paimon as a subagent
|
|
46
|
+
|
|
47
|
+
Frontier models are good at planning and reviewing; the steps in between are often mechanical. Point Paimon at a cheaper model and let Claude Code or Codex write the plan and check the result. A profile keeps that model's account separate:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
paimon login --profile glm --model zai:glm-4.7 --api-key-env ZAI_API_KEY
|
|
51
|
+
paimon --profile glm -p "apply the plan in PLAN.md" --mode edit --output-format result
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The bundled skill teaches the calling agent this workflow:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
paimon install-skill # into Claude Code (~/.claude/skills/paimon)
|
|
58
|
+
paimon install-skill --target codex # into Codex; --dest DIR for anywhere else
|
|
59
|
+
npx skills add aisk/paimon # the same skill, via skills.sh
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Using Paimon as a library
|
|
63
|
+
|
|
64
|
+
The agent loop is importable, so a Python program can drive it without going through the CLI. `Agent.open()` starts or resumes a session and `agent.run()` yields typed events, one per text chunk, tool call and turn end, which the caller renders or filters however it likes:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import asyncio
|
|
68
|
+
|
|
69
|
+
from paimon.agent import Agent, TextDelta
|
|
70
|
+
|
|
71
|
+
async def main():
|
|
72
|
+
agent = Agent.open(mode="edit")
|
|
73
|
+
async for event in agent.run("summarize the tests in this directory"):
|
|
74
|
+
if isinstance(event, TextDelta):
|
|
75
|
+
print(event.text, end="", flush=True)
|
|
76
|
+
|
|
77
|
+
asyncio.run(main())
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`Agent.open()` also takes a working directory, an async `confirm` callback for permission prompts, and a `toolset` to hand the model fewer tools or tools of your own. An agent holds its session until it goes away; to give it back at a definite moment, call `close()` or use the agent as a context manager. It writes the same session files as the CLI, so a run started in code can be resumed later with `paimon -r`.
|
|
81
|
+
|
|
82
|
+
## Sessions
|
|
83
|
+
|
|
84
|
+
Every conversation is saved, and long ones are summarized in place near the context limit. Paimon prints the command that brings a session back when you leave:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
paimon -r # choose a session started in this directory
|
|
88
|
+
paimon -r a1b2c3 # resume one by id
|
|
89
|
+
paimon -c # resume the most recent one
|
|
90
|
+
paimon sessions # list them (--json for machines)
|
|
91
|
+
paimon log a1b2c3 # what a session did, one line per event
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Other ways to run it
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
paimon --mode read # start in a more cautious permission mode (yolo is the default)
|
|
98
|
+
paimon --strict # ask before every command, even read-only ones
|
|
99
|
+
paimon --web # the same UI in a browser (--port, default 8000)
|
|
100
|
+
paimon -p "what does cli.py do?" # one answer on stdout, no UI
|
|
101
|
+
cat log.txt | paimon -p "summarize this"
|
|
102
|
+
paimon --model zai:glm-4.7 # this model for this run only
|
|
103
|
+
paimon --profile work # a separately configured account
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`-p` never stops to ask, so with the default `yolo` mode it can already write files and run commands. Add `--output-format result` for a single JSON object with the outcome, which is what a calling program should read. `paimon --help` lists the rest.
|
|
107
|
+
|
|
108
|
+
## Configuration
|
|
109
|
+
|
|
110
|
+
Each profile keeps its model settings in `~/.config/paimon/<name>/config.json`, written by the first launch or by `paimon login`. Sessions live in `~/.local/share/paimon/sessions/`. File changes render nicer if [delta](https://github.com/dandavison/delta) is installed.
|
|
111
|
+
|
|
112
|
+
Read and edit modes run a small set of clearly read-only commands (`ls`, `cat`, `git status`, …) without asking; `--strict` turns that off. **This is a guardrail against agent mistakes, not a security boundary.** For real isolation, run Paimon inside a container or VM.
|
|
113
|
+
|
|
114
|
+
## Telemetry
|
|
115
|
+
|
|
116
|
+
Each launch sends one anonymous event to Google Analytics: a random install id, the launch mode, the version, the OS name and the configured provider and model name. Nothing from your sessions, prompts, files or credentials is included. Set `PAIMON_NO_TELEMETRY=1` or `DO_NOT_TRACK=1` to turn it off.
|
paimon-0.2.4/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Paimon
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
English | [简体中文](README.zh-CN.md)
|
|
6
|
+
|
|
7
|
+
Paimon is a coding agent that lives in your terminal. It reads and edits files in the current directory and runs commands. It also runs headless and imports as a library, so a stronger agent or a program of your own can drive it.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv tool install paimon # or: pip install paimon
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Getting started
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
paimon
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or run it without installing anything:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uvx paimon
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The first launch asks for a provider, model, API base and key. Then just type what you want done. Write `@path/to/file` in a prompt to hand a file to the agent.
|
|
28
|
+
|
|
29
|
+
While it runs: `Shift+Tab` switches how much the agent may do on its own (**read** asks before writing files or running commands, **edit** lets edits inside the working directory through, **yolo** never asks and is the default), `Esc` interrupts the current turn, `Ctrl+P` opens the command palette, `Ctrl+C` quits.
|
|
30
|
+
|
|
31
|
+
`Ctrl+T` opens another session in a pane of its own, `Ctrl+W` closes one, `Ctrl+PageUp` and `Ctrl+PageDown` move between them, and `Ctrl+G` jumps to a pane waiting for permission. Paimon can open panes itself: ask for two independent things and it starts a second agent in its own tab. It can also leave a command running in a tab of its own, a dev server or a watcher, instead of holding up a turn.
|
|
32
|
+
|
|
33
|
+
## Using Paimon as a subagent
|
|
34
|
+
|
|
35
|
+
Frontier models are good at planning and reviewing; the steps in between are often mechanical. Point Paimon at a cheaper model and let Claude Code or Codex write the plan and check the result. A profile keeps that model's account separate:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
paimon login --profile glm --model zai:glm-4.7 --api-key-env ZAI_API_KEY
|
|
39
|
+
paimon --profile glm -p "apply the plan in PLAN.md" --mode edit --output-format result
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The bundled skill teaches the calling agent this workflow:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
paimon install-skill # into Claude Code (~/.claude/skills/paimon)
|
|
46
|
+
paimon install-skill --target codex # into Codex; --dest DIR for anywhere else
|
|
47
|
+
npx skills add aisk/paimon # the same skill, via skills.sh
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Using Paimon as a library
|
|
51
|
+
|
|
52
|
+
The agent loop is importable, so a Python program can drive it without going through the CLI. `Agent.open()` starts or resumes a session and `agent.run()` yields typed events, one per text chunk, tool call and turn end, which the caller renders or filters however it likes:
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import asyncio
|
|
56
|
+
|
|
57
|
+
from paimon.agent import Agent, TextDelta
|
|
58
|
+
|
|
59
|
+
async def main():
|
|
60
|
+
agent = Agent.open(mode="edit")
|
|
61
|
+
async for event in agent.run("summarize the tests in this directory"):
|
|
62
|
+
if isinstance(event, TextDelta):
|
|
63
|
+
print(event.text, end="", flush=True)
|
|
64
|
+
|
|
65
|
+
asyncio.run(main())
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`Agent.open()` also takes a working directory, an async `confirm` callback for permission prompts, and a `toolset` to hand the model fewer tools or tools of your own. An agent holds its session until it goes away; to give it back at a definite moment, call `close()` or use the agent as a context manager. It writes the same session files as the CLI, so a run started in code can be resumed later with `paimon -r`.
|
|
69
|
+
|
|
70
|
+
## Sessions
|
|
71
|
+
|
|
72
|
+
Every conversation is saved, and long ones are summarized in place near the context limit. Paimon prints the command that brings a session back when you leave:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
paimon -r # choose a session started in this directory
|
|
76
|
+
paimon -r a1b2c3 # resume one by id
|
|
77
|
+
paimon -c # resume the most recent one
|
|
78
|
+
paimon sessions # list them (--json for machines)
|
|
79
|
+
paimon log a1b2c3 # what a session did, one line per event
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Other ways to run it
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
paimon --mode read # start in a more cautious permission mode (yolo is the default)
|
|
86
|
+
paimon --strict # ask before every command, even read-only ones
|
|
87
|
+
paimon --web # the same UI in a browser (--port, default 8000)
|
|
88
|
+
paimon -p "what does cli.py do?" # one answer on stdout, no UI
|
|
89
|
+
cat log.txt | paimon -p "summarize this"
|
|
90
|
+
paimon --model zai:glm-4.7 # this model for this run only
|
|
91
|
+
paimon --profile work # a separately configured account
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`-p` never stops to ask, so with the default `yolo` mode it can already write files and run commands. Add `--output-format result` for a single JSON object with the outcome, which is what a calling program should read. `paimon --help` lists the rest.
|
|
95
|
+
|
|
96
|
+
## Configuration
|
|
97
|
+
|
|
98
|
+
Each profile keeps its model settings in `~/.config/paimon/<name>/config.json`, written by the first launch or by `paimon login`. Sessions live in `~/.local/share/paimon/sessions/`. File changes render nicer if [delta](https://github.com/dandavison/delta) is installed.
|
|
99
|
+
|
|
100
|
+
Read and edit modes run a small set of clearly read-only commands (`ls`, `cat`, `git status`, …) without asking; `--strict` turns that off. **This is a guardrail against agent mistakes, not a security boundary.** For real isolation, run Paimon inside a container or VM.
|
|
101
|
+
|
|
102
|
+
## Telemetry
|
|
103
|
+
|
|
104
|
+
Each launch sends one anonymous event to Google Analytics: a random install id, the launch mode, the version, the OS name and the configured provider and model name. Nothing from your sessions, prompts, files or credentials is included. Set `PAIMON_NO_TELEMETRY=1` or `DO_NOT_TRACK=1` to turn it off.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Paimon
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[English](README.md) | 简体中文
|
|
6
|
+
|
|
7
|
+
Paimon 是一个终端里的 coding agent。它读写当前目录下的文件,执行命令。它也支持无头运行,还可以作为库导入,由更强的 agent 或者你自己的程序来驱动。
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv tool install paimon # 或者:pip install paimon
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 快速开始
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
paimon
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
或者不安装直接运行:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uvx paimon
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
首次启动会询问 provider、模型、API base 和 key。之后输入要完成的任务即可。在提示中写 `@path/to/file` 可以把文件提供给 agent。
|
|
28
|
+
|
|
29
|
+
运行时:`Shift+Tab` 切换 agent 的自主程度(**read** 写文件或执行命令前先询问,**edit** 放行工作目录内的编辑,**yolo** 从不询问,也是默认值),`Esc` 打断当前回合,`Ctrl+P` 打开命令面板,`Ctrl+C` 退出。
|
|
30
|
+
|
|
31
|
+
`Ctrl+T` 在新 pane 里打开另一个会话,`Ctrl+W` 关闭当前 pane,`Ctrl+PageUp` 和 `Ctrl+PageDown` 在 pane 之间切换,`Ctrl+G` 跳到正在等待授权的 pane。Paimon 自己也能开 pane:让它同时做两件互不相干的事,它会在新 tab 里起第二个 agent。它也能把一条命令留在单独的 tab 里跑,比如开发服务器或者文件监视,不占着当前回合。
|
|
32
|
+
|
|
33
|
+
## 当作 subagent 使用
|
|
34
|
+
|
|
35
|
+
前沿模型擅长制定计划和验收结果,中间的执行步骤往往比较机械。让 Paimon 使用成本较低的模型执行,由 Claude Code 或 Codex 制定计划并检查结果。用一个 profile 单独保存该模型的账号:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
paimon login --profile glm --model zai:glm-4.7 --api-key-env ZAI_API_KEY
|
|
39
|
+
paimon --profile glm -p "apply the plan in PLAN.md" --mode edit --output-format result
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
自带的 skill 会向调用方 agent 说明这套流程:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
paimon install-skill # 安装到 Claude Code(~/.claude/skills/paimon)
|
|
46
|
+
paimon install-skill --target codex # 安装到 Codex;--dest DIR 安装到任意目录
|
|
47
|
+
npx skills add aisk/paimon # 通过 skills.sh 安装同一个 skill
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 当作库使用
|
|
51
|
+
|
|
52
|
+
agent 循环本身是可以导入的,Python 程序不必经过 CLI 就能驱动它。`Agent.open()` 新建或恢复一个会话,`agent.run()` 产出类型化的事件,每段文本、每次工具调用、每个回合结束各一个,调用方自己决定怎么渲染或过滤:
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import asyncio
|
|
56
|
+
|
|
57
|
+
from paimon.agent import Agent, TextDelta
|
|
58
|
+
|
|
59
|
+
async def main():
|
|
60
|
+
agent = Agent.open(mode="edit")
|
|
61
|
+
async for event in agent.run("summarize the tests in this directory"):
|
|
62
|
+
if isinstance(event, TextDelta):
|
|
63
|
+
print(event.text, end="", flush=True)
|
|
64
|
+
|
|
65
|
+
asyncio.run(main())
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`Agent.open()` 还接受工作目录、用于权限确认的异步 `confirm` 回调,以及 `toolset`,可以只给模型一部分工具,或者换成你自己的工具。agent 被回收时会交还会话,想在确定的时刻交还就调 `close()`,或者把它当上下文管理器用。它写的会话文件和 CLI 一样,所以代码里跑出来的会话之后可以用 `paimon -r` 恢复。
|
|
69
|
+
|
|
70
|
+
## 会话
|
|
71
|
+
|
|
72
|
+
每次对话都会保存,很长的对话在接近上下文上限时会被原地总结。退出时 Paimon 会打印恢复该会话的命令:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
paimon -r # 从当前目录的会话中选择
|
|
76
|
+
paimon -r a1b2c3 # 按 id 恢复
|
|
77
|
+
paimon -c # 恢复最近一个会话
|
|
78
|
+
paimon sessions # 列出会话(--json 输出机器可读格式)
|
|
79
|
+
paimon log a1b2c3 # 查看会话做了什么,每个事件一行
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## 其他运行方式
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
paimon --mode read # 以更谨慎的权限模式启动(默认为 yolo)
|
|
86
|
+
paimon --strict # 每条命令都先询问,包括只读命令
|
|
87
|
+
paimon --web # 在浏览器中使用同一套 UI(--port,默认 8000)
|
|
88
|
+
paimon -p "what does cli.py do?" # 直接在 stdout 输出回答,不启动 UI
|
|
89
|
+
cat log.txt | paimon -p "summarize this"
|
|
90
|
+
paimon --model zai:glm-4.7 # 仅本次运行使用该模型
|
|
91
|
+
paimon --profile work # 单独配置的另一个账号
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`-p` 不会停下来询问,配合默认的 `yolo` 模式,它已经可以修改文件和执行命令。加 `--output-format result` 会输出一个包含结果的 JSON 对象,调用方程序读这个就够了。其余选项见 `paimon --help`。
|
|
95
|
+
|
|
96
|
+
## 配置
|
|
97
|
+
|
|
98
|
+
每个 profile 的模型设置保存在 `~/.config/paimon/<name>/config.json`,由首次启动或 `paimon login` 写入。会话存放在 `~/.local/share/paimon/sessions/`。安装 [delta](https://github.com/dandavison/delta) 后文件改动的展示效果更好。
|
|
99
|
+
|
|
100
|
+
read 和 edit 模式会不经询问执行一小组明确只读的命令(`ls`、`cat`、`git status` 等),`--strict` 可以关掉。**这是防止 agent 失误的护栏,不是安全边界。** 需要真正的隔离时,请在容器或虚拟机中运行 Paimon。
|
|
101
|
+
|
|
102
|
+
## 遥测
|
|
103
|
+
|
|
104
|
+
每次启动会向 Google Analytics 发送一条匿名事件:随机生成的安装 id、启动方式、版本号、操作系统名称,以及配置的 provider 和模型名。会话、提示词、文件和密钥一概不上报。设置 `PAIMON_NO_TELEMETRY=1` 或 `DO_NOT_TRACK=1` 可以关闭。
|