@milisp/keke 0.1.8 → 0.1.10

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 (3) hide show
  1. package/README.md +28 -72
  2. package/README.zh-CN.md +27 -63
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # keke
2
2
 
3
- [中文文档](README.zh-CN.md) | [Architecture](docs/architecture.md) | [Roadmap](docs/ROADMAP.md)
3
+ [中文文档](README.zh-CN.md) | [Architecture](docs/architecture.md) | [Config](docs/config.md) | [Roadmap](docs/ROADMAP.md)
4
4
 
5
5
  keke is a local terminal coding agent built for zero-vendor lock-in.
6
6
  Works with subscriptions you already have, standard API keys, or self-hosted local models.
@@ -9,6 +9,8 @@ Works with subscriptions you already have, standard API keys, or self-hosted loc
9
9
 
10
10
  - **Protocol: ACP for every client**
11
11
  Speaks the open Agent Client Protocol for both external client integrations and its internal TUI/agent seam.
12
+ - **Multi-Account & Per-Directory Routing**
13
+ Login to multiple subscription accounts (e.g., work and personal) and automatically route requests based on workspace directory path.
12
14
  - **Script & CI First (`keke exec`)**
13
15
  Supports one-shot execution out of the box for non-interactive scripting and automated CI pipelines.
14
16
  - **Vendor-Isolated Engine**
@@ -23,7 +25,9 @@ curl -fsSL https://raw.githubusercontent.com/milisp/keke-agent/main/scripts/inst
23
25
  ```
24
26
 
25
27
  This downloads the latest prebuilt binary for your platform into
26
- `~/.local/bin` (override with `KEKE_INSTALL_DIR`).
28
+ `~/.local/bin` (override with `KEKE_INSTALL_DIR`). Piping a remote script into
29
+ `sh` runs it with your privileges — inspect it first if that matters to you:
30
+ `curl -fsSL .../install.sh | less`.
27
31
 
28
32
  ### npm
29
33
 
@@ -35,95 +39,47 @@ You can also grab a binary directly from the
35
39
  [latest release](https://github.com/milisp/keke-agent/releases/latest), or build
36
40
  from source with `cargo build --release`.
37
41
 
38
- ## Try it
42
+ ## Try it (30 seconds)
39
43
 
40
44
  ```sh
41
- # Sign in with a subscription you already pay for
45
+ keke doctor # see which providers/logins resolve, before you rely on one
46
+
47
+ # Sign in with a subscription you already pay for...
42
48
  keke login codex
43
49
  keke login grok
44
-
45
50
  # ...or bring a key
46
- export OPENAI_API_KEY=sk-...
51
+ export ANTHROPIC_API_KEY=sk-ant-...
47
52
 
48
53
  keke exec "what does this project do?" # one-shot, for scripts and CI
49
54
  keke # interactive TUI
50
55
  keke resume # pick the last conversation back up
51
- keke doctor # which providers and logins resolve
52
56
  ```
53
57
 
54
- ## What you can point it at
55
-
56
- | Provider | How you authenticate | Notes |
57
- | --- | --- | --- |
58
- | OpenAI / ChatGPT | `keke login codex`, or `OPENAI_API_KEY` | OAuth flow ported from codex |
59
- | Anthropic Claude | `ANTHROPIC_API_KEY` | Built in; the default provider. API key only — no subscription login |
60
- | xAI Grok | `keke login grok`, or `XAI_API_KEY` | Built in |
61
- | Local (Ollama, vLLM, …) | none | Your code never leaves the machine |
62
- | Any OpenAI-compatible gateway | `env_key` in `config.toml` | Company proxies, NVIDIA NIM, routers |
63
-
64
- Anything not built in is a few lines of `$KEKE_HOME/config.toml`, not a code
65
- change:
58
+ Provider routes, API keys, local models, gateways, per-directory accounts, and
59
+ all other settings are documented in [`docs/config.md`](docs/config.md).
66
60
 
67
- ```toml
68
- [providers.ollama]
69
- base_url = "http://localhost:11434/v1"
70
- default_model = "gpt-oss:20b"
71
-
72
- [providers.anthropic]
73
- base_url = "https://api.anthropic.com"
74
- env_key = "ANTHROPIC_API_KEY"
75
- wire = "messages"
76
- ```
77
-
78
- `wire` picks the request format — `chat_completions` (the default),
79
- `responses`, or `messages` — so a new endpoint is a config entry rather than a release.
80
-
81
- Behind a corporate proxy or a TLS-intercepting gateway, a declared provider
82
- can also carry a CA certificate, a proxy, and headers your gateway wants for
83
- routing or audit:
84
-
85
- ```toml
86
- [providers.internal-gateway]
87
- base_url = "https://gateway.corp.internal/v1"
88
- env_key = "INTERNAL_GATEWAY_API_KEY"
89
- ca_cert_path = "/etc/ssl/certs/corp-root-ca.pem"
90
- proxy = "http://proxy.corp.internal:8080"
91
- proxy_username = "svc-keke"
92
- proxy_password_env_key = "CORP_PROXY_PASSWORD"
93
-
94
- [providers.internal-gateway.headers]
95
- X-Department-Token = "env:DEPT_TOKEN"
96
- X-Company-User-Id = "milisp-labs"
97
- ```
61
+ ## Safety
98
62
 
99
- A header value written as `env:VAR_NAME` is resolved from the environment
100
- rather than taken literally, so a secret header need not sit in the config
101
- file in the clear. `authorization` is reserved for the provider's own
102
- credential and cannot be set here.
63
+ - **Sandboxing & approvals** — `approval_policy` and `sandbox_mode` are
64
+ configurable to match how you run it ([`docs/config.md`](docs/config.md)).
65
+ - **Plugin trust** — repository-provided plugins (hooks, MCP servers) never
66
+ execute on `git clone` alone; a person must approve them, keyed to their
67
+ exact contents, not their path. There's no flag to turn that gate off.
103
68
 
104
69
  ## Status
105
70
 
106
71
  Usable day to day. `keke exec`, the TUI, and the ACP server all run real
107
72
  sessions end to end; runtime plugins (skills, commands, hooks, MCP servers)
108
73
  install in the Claude Code format, and repository-provided ones stay inert
109
- until you approve them. Switching models inside a running session is not
110
- implemented yet — see [`docs/ROADMAP.md`](docs/ROADMAP.md).
111
-
112
- ## Where it comes from
113
-
114
- keke is a fresh implementation built by studying three open agent repos:
115
- OpenAI's **codex**, xAI's **grok-build**, and **deepseek-harness** — whose
116
- seam-first architecture (a hard boundary between engine and vendor, not a
117
- convention) is the idea keke leans on hardest. Some pieces are ported
118
- outright and attributed in the crate that carries them (codex's OAuth login
119
- flow, for instance); most of it is keke's own code, shaped by what worked and
120
- what didn't in those three. What keke does differently — and why that
121
- matters enough to enforce in CI — is in
122
- [`docs/architecture.md`](docs/architecture.md); the invariants themselves are
123
- in [`AGENTS.md`](AGENTS.md).
74
+ until you approve them. `/model` switches models inside a running session
75
+ (tied to their provider so config can't persist an invalid pairing), and the
76
+ agent can spawn subagents — isolated child sessions given one task that
77
+ report back a single answer instead of their whole search trace. See
78
+ [`docs/ROADMAP.md`](docs/ROADMAP.md) for what's next.
124
79
 
125
80
  ## License
126
81
 
127
- Apache-2.0. See [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE); code ported from
128
- other projects is attributed in the `THIRD_PARTY_NOTICES.md` of the crate that
129
- contains it.
82
+ Apache-2.0. See [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE). Design rationale
83
+ and source attribution are documented in
84
+ [`docs/architecture.md`](docs/architecture.md#why-it-is-shaped-this-way) and
85
+ `THIRD_PARTY_NOTICES.md` files in the relevant crates.
package/README.zh-CN.md CHANGED
@@ -1,16 +1,20 @@
1
1
  # keke
2
2
 
3
- [![CI](https://github.com/milisp/keke-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/milisp/keke-agent/actions)
3
+ [English](README.md) | [架构设计](docs/architecture.md) | [配置文档](docs/config.md) | [路线图](docs/ROADMAP.md)
4
4
 
5
- [English](README.md)
5
+ keke 是一个专为“零厂商锁定”打造的本地终端编码 agent。
6
+ 可直接搭配你已有的付费订阅、标准 API Key 或自托管的本地模型使用。
6
7
 
7
- keke 是一个运行在本地终端的编码 agent,可以搭配任意模型使用——你已经订阅的
8
- 服务、一个 API key,或者你自己机器上跑的模型。
8
+ ## 为什么选择 keke?
9
9
 
10
- keke 通过 stdio 提供开放的 Agent Client Protocol,所以任何支持 ACP 的
11
- GUI(编辑器、Zed 之类)都能像终端一样驱动它。如果想在脚本或 CI 里用,用
12
- `keke exec`。如果想用一个它还不认识的模型,在 `config.toml` 里声明即
13
- 可——引擎里不需要改任何厂商相关的代码。
10
+ - **协议:为所有客户端提供 ACP 支持**
11
+ 无论是外部客户端集成,还是内部 TUI 与 agent 之间的解耦边界,统一基于开放的 Agent Client Protocol (ACP)。
12
+ - **多账户与按目录路由**
13
+ 登录多个订阅账户(例如工作账户和个人账户),并根据工作区目录路径自动路由请求。
14
+ - **脚本与 CI 优先(`keke exec`)**
15
+ 开箱即用支持非交互式一次性执行,专为脚本自动化与 CI 流水线设计。
16
+ - **与厂商隔离的引擎核心**
17
+ `keke-core` 内部没有任何厂商特定的逻辑。添加标准模型端点无需修改任何引擎代码——只需在 `config.toml` 中简单声明配置即可。
14
18
 
15
19
  ## 安装
16
20
 
@@ -20,8 +24,7 @@ GUI(编辑器、Zed 之类)都能像终端一样驱动它。如果想在脚
20
24
  curl -fsSL https://raw.githubusercontent.com/milisp/keke-agent/main/scripts/install.sh | sh
21
25
  ```
22
26
 
23
- 该脚本会为你的平台下载最新的预编译二进制文件到 `~/.local/bin`
24
- (可通过 `KEKE_INSTALL_DIR` 覆盖)。
27
+ 该脚本会下载适合你平台的最新预编译二进制文件至 `~/.local/bin`,也可以通过 `KEKE_INSTALL_DIR` 指定安装目录。
25
28
 
26
29
  ### npm 安装
27
30
 
@@ -29,71 +32,32 @@ curl -fsSL https://raw.githubusercontent.com/milisp/keke-agent/main/scripts/inst
29
32
  npm install -g @milisp/keke
30
33
  ```
31
34
 
32
- 你也可以直接从 [latest release](https://github.com/milisp/keke-agent/releases/latest)
33
- 下载预编译二进制文件,或者用 `cargo build --release` 从源码构建。
35
+ 你也可以直接从 [最新 Release](https://github.com/milisp/keke-agent/releases/latest) 下载二进制文件,或使用 `cargo build --release` 从源码构建。
34
36
 
35
- ## 试一试
37
+ ## 快速试用(30 秒)
36
38
 
37
39
  ```sh
38
- # 用你已经付费的订阅登录
40
+ keke doctor # 检查 provider 和登录配置
41
+
42
+ # 使用已有付费订阅登录……
39
43
  keke login codex
40
44
  keke login grok
45
+ # ……或直接配置 API Key
46
+ export ANTHROPIC_API_KEY=sk-ant-...
41
47
 
42
- # ……或者直接用 key
43
- export XAI_API_KEY=xai-...
44
-
45
- keke exec "what does this project do?" # 一次性运行,适合脚本和 CI
48
+ keke exec "what does this project do?" # 一次性运行,适合脚本与 CI
46
49
  keke # 交互式 TUI
47
- keke resume # 接着上一次的对话继续
48
- keke doctor # 查看哪些 provider 和登录能解析成功
50
+ keke resume # 恢复上一次的对话
49
51
  ```
50
52
 
51
- ## 你能接入什么
52
-
53
- | Provider | 如何认证 | 说明 |
54
- | --- | --- | --- |
55
- | OpenAI / ChatGPT | `keke login codex`,或 `OPENAI_API_KEY` | OAuth 流程从 codex 移植而来 |
56
- | xAI Grok | `keke login grok`,或 `XAI_API_KEY` | 内置,默认 provider |
57
- | Anthropic | `config.toml` 中的 `env_key` | 声明时用 `wire = "messages"` |
58
- | 本地模型(Ollama、vLLM 等) | 无需认证 | 代码不会离开这台机器 |
59
- | 任意 OpenAI 兼容网关 | `config.toml` 中的 `env_key` | 公司代理、NVIDIA NIM、路由器等 |
60
-
61
- 内置支持之外的服务,只需要在 `$KEKE_HOME/config.toml` 里加几行,不需要改代码:
62
-
63
- ```toml
64
- [providers.ollama]
65
- base_url = "http://localhost:11434/v1"
66
- default_model = "gpt-oss:20b"
67
-
68
- [providers.anthropic]
69
- base_url = "https://api.anthropic.com"
70
- env_key = "ANTHROPIC_API_KEY"
71
- wire = "messages"
72
- ```
73
-
74
- `wire` 决定请求格式——`chat_completions`(默认)、`responses`,或
75
- `messages`——所以接入新接口只是一条配置,而不是一次发版。
76
-
77
- ## 现状
53
+ 配置文件位置、Provider 声明、API Key、本地模型、多账号、按目录切换账号及其他设置,详见 [`docs/config.md`](docs/config.md)。
78
54
 
79
- 日常使用已经可用。`keke exec`、TUI 和 ACP server 都能完整跑通一次会话;
80
- 运行时插件(skills、commands、hooks、MCP servers)按 Claude Code 的格式
81
- 安装,仓库自带的插件在你批准之前始终处于未激活状态。在运行中的会话里切换
82
- 模型这个功能还没实现——详见 [`docs/ROADMAP.md`](docs/ROADMAP.md)。
55
+ ## 功能状态
83
56
 
84
- ## 灵感来源
57
+ keke 已支持日常开发所需的完整会话。你可以使用 `keke exec` 执行一次性任务,也可以通过 TUI 或 ACP 接入自己的编辑器和客户端。运行时插件(skills、commands、hooks、MCP servers)遵循 Claude Code 格式安装;会话中还可以使用 `/model` 切换模型,并生成独立的子 agent 处理分配的任务。
85
58
 
86
- keke 是通过研究三个开源 agent 项目——OpenAI 的 **codex**、xAI 的
87
- **grok-build**,以及 **deepseek-harness**——写出来的全新实现,其中
88
- deepseek-harness 提倡的 seam-first 架构(引擎和厂商之间是硬边界,而不是
89
- 约定)是 keke 最依赖的一个想法。少数部分是直接移植过来的,并在承载它的
90
- crate 中注明来源(比如 codex 的 OAuth 登录流程);其余大部分都是 keke
91
- 自己的代码,只是被这三者的经验(包括踩过的坑)塑造出来的。keke 的不同
92
- 之处、以及为什么值得在 CI 里强制执行,详见
93
- [`docs/architecture.md`](docs/architecture.md);不变量本身在
94
- [`AGENTS.md`](AGENTS.md)。
59
+ 后续规划请参见 [`docs/ROADMAP.md`](docs/ROADMAP.md)。
95
60
 
96
61
  ## 许可证
97
62
 
98
- Apache-2.0。详见 [`LICENSE`](LICENSE) 与 [`NOTICE`](NOTICE);从其他项目移植
99
- 的代码会在承载它的 crate 的 `THIRD_PARTY_NOTICES.md` 中注明来源。
63
+ Apache-2.0。详见 [`LICENSE`](LICENSE) 与 [`NOTICE`](NOTICE)。设计背景与代码来源说明见 [`docs/architecture.md`](docs/architecture.md#why-it-is-shaped-this-way) 及相关 crate 中的 `THIRD_PARTY_NOTICES.md`。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milisp/keke",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "keke is a multi-vendor terminal coding agent.",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -18,11 +18,11 @@
18
18
  "win32"
19
19
  ],
20
20
  "optionalDependencies": {
21
- "@milisp/keke-darwin-x64": "0.1.8",
22
- "@milisp/keke-darwin-arm64": "0.1.8",
23
- "@milisp/keke-linux-x64": "0.1.8",
24
- "@milisp/keke-linux-arm64": "0.1.8",
25
- "@milisp/keke-win32-x64": "0.1.8"
21
+ "@milisp/keke-darwin-x64": "0.1.10",
22
+ "@milisp/keke-darwin-arm64": "0.1.10",
23
+ "@milisp/keke-linux-x64": "0.1.10",
24
+ "@milisp/keke-linux-arm64": "0.1.10",
25
+ "@milisp/keke-win32-x64": "0.1.10"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",