@milisp/keke 0.1.8 → 0.1.9

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 +46 -68
  2. package/README.zh-CN.md +35 -58
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -1,10 +1,15 @@
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.
7
7
 
8
+ **Status: early (v0.1.x), usable day to day.** Good fit for personal daily
9
+ driving, scripted/CI use, and small-team trials. Not yet the right choice for
10
+ a regulated or uninterruptible production pipeline — see
11
+ [Production & safety](#production--safety).
12
+
8
13
  ## Why keke?
9
14
 
10
15
  - **Protocol: ACP for every client**
@@ -23,7 +28,9 @@ curl -fsSL https://raw.githubusercontent.com/milisp/keke-agent/main/scripts/inst
23
28
  ```
24
29
 
25
30
  This downloads the latest prebuilt binary for your platform into
26
- `~/.local/bin` (override with `KEKE_INSTALL_DIR`).
31
+ `~/.local/bin` (override with `KEKE_INSTALL_DIR`). Piping a remote script into
32
+ `sh` runs it with your privileges — inspect it first if that matters to you:
33
+ `curl -fsSL .../install.sh | less`.
27
34
 
28
35
  ### npm
29
36
 
@@ -35,92 +42,63 @@ You can also grab a binary directly from the
35
42
  [latest release](https://github.com/milisp/keke-agent/releases/latest), or build
36
43
  from source with `cargo build --release`.
37
44
 
38
- ## Try it
45
+ ## Try it (30 seconds)
39
46
 
40
47
  ```sh
41
- # Sign in with a subscription you already pay for
48
+ keke doctor # see which providers/logins resolve, before you rely on one
49
+
50
+ # Sign in with a subscription you already pay for...
42
51
  keke login codex
43
52
  keke login grok
44
-
45
53
  # ...or bring a key
46
- export OPENAI_API_KEY=sk-...
54
+ export ANTHROPIC_API_KEY=sk-ant-...
47
55
 
48
56
  keke exec "what does this project do?" # one-shot, for scripts and CI
49
57
  keke # interactive TUI
50
58
  keke resume # pick the last conversation back up
51
- keke doctor # which providers and logins resolve
52
- ```
53
-
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:
66
-
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
59
  ```
98
60
 
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.
61
+ Provider routes, API keys, local models, gateways, per-directory accounts, and
62
+ all other settings are documented in [`docs/config.md`](docs/config.md).
103
63
 
104
64
  ## Status
105
65
 
106
66
  Usable day to day. `keke exec`, the TUI, and the ACP server all run real
107
67
  sessions end to end; runtime plugins (skills, commands, hooks, MCP servers)
108
68
  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).
69
+ until you approve them. `/model` switches models inside a running session
70
+ (tied to their provider so config can't persist an invalid pairing), and the
71
+ agent can spawn subagents — isolated child sessions given one task that
72
+ report back a single answer instead of their whole search trace. See
73
+ [`docs/ROADMAP.md`](docs/ROADMAP.md) for what's next.
74
+
75
+ ## Production & safety
76
+
77
+ Fine for personal use, local/self-hosted models, and CI one-shots today.
78
+ Before trusting it with anything you can't afford to break, weigh in:
79
+
80
+ - **Sandboxing & approvals** — default `approval_policy` and `sandbox_mode`
81
+ are conservative, but you should confirm they match what you're running
82
+ ([`docs/config.md`](docs/config.md)).
83
+ - **Plugin trust** — repository-provided plugins (hooks, MCP servers) never
84
+ execute on `git clone` alone; a person must approve them, keyed to their
85
+ exact contents, not their path. There's no flag to turn that gate off.
86
+ - **Maturity** — early (v0.1.x), single-maintainer, no formal security audit
87
+ or SLA. Remaining roadmap gaps (full end-to-end MCP tool-call verification)
88
+ are tracked in [`docs/ROADMAP.md`](docs/ROADMAP.md).
89
+
90
+ **Good fit:** you want no vendor lock-in, script/CI-friendly one-shot runs,
91
+ local models, or ACP integration into your own editor/client.
92
+ **Not yet a fit:** you need turnkey OAuth for every vendor, an established
93
+ plugin ecosystem, or vendor support contracts.
111
94
 
112
95
  ## Where it comes from
113
96
 
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).
97
+ keke is a fresh implementation informed by OpenAI's **codex**, xAI's
98
+ **grok-build**, and **deepseek-harness**. A few pieces are ported and
99
+ attributed in-crate; most of the code is original. Design rationale and
100
+ CI-enforced invariants: [`docs/architecture.md`](docs/architecture.md),
101
+ [`AGENTS.md`](AGENTS.md).
124
102
 
125
103
  ## License
126
104
 
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
+ **当前状态:早期阶段(v0.1.x),已可用于日常开发。** 适合个人日常主力使用、脚本/CI 自动化及小团队试用。目前尚不适合用于强监管或要求不可中断的生产流水线——详见[生产与安全性](#生产与安全性)。
9
9
 
10
- keke 通过 stdio 提供开放的 Agent Client Protocol,所以任何支持 ACP 的
11
- GUI(编辑器、Zed 之类)都能像终端一样驱动它。如果想在脚本或 CI 里用,用
12
- `keke exec`。如果想用一个它还不认识的模型,在 `config.toml` 里声明即
13
- 可——引擎里不需要改任何厂商相关的代码。
10
+ ## 为什么选择 keke?
11
+
12
+ - **协议:为所有客户端提供 ACP 支持**
13
+ 无论是外部客户端集成,还是内部 TUI 与 agent 之间的解耦边界,统一基于开放的 Agent Client Protocol (ACP)。
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` 覆盖)。将远程脚本管道传输到 `sh` 会以你的权限执行——如介意可先检查脚本:`curl -fsSL .../install.sh | less`。
25
28
 
26
29
  ### npm 安装
27
30
 
@@ -29,71 +32,45 @@ 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、路由器等 |
53
+ 配置文件位置、Provider 声明、API Key、本地模型、多账号、按目录切换账号及其他设置,详见 [`docs/config.md`](docs/config.md)。
60
54
 
61
- 内置支持之外的服务,只需要在 `$KEKE_HOME/config.toml` 里加几行,不需要改代码:
55
+ ## 现状
62
56
 
63
- ```toml
64
- [providers.ollama]
65
- base_url = "http://localhost:11434/v1"
66
- default_model = "gpt-oss:20b"
57
+ 日常开发已完全可用。`keke exec`、TUI 和 ACP 服务器均支持端到端完整运行会话;运行时插件(skills、commands、hooks、MCP servers)遵循 Claude Code 格式安装,仓库自带的插件在你显式批准前会保持非激活状态。在运行中的会话内可通过 `/model` 切换模型(模型与 provider 绑定,避免配置持久化无效组合),并且 agent 支持生成子 agent——分配独立任务的子会话,仅汇总返回最终结果而不会污染完整的搜索 trace。后续规划请参见 [`docs/ROADMAP.md`](docs/ROADMAP.md)。
67
58
 
68
- [providers.anthropic]
69
- base_url = "https://api.anthropic.com"
70
- env_key = "ANTHROPIC_API_KEY"
71
- wire = "messages"
72
- ```
59
+ ## 生产与安全性
73
60
 
74
- `wire` 决定请求格式——`chat_completions`(默认)、`responses`,或
75
- `messages`——所以接入新接口只是一条配置,而不是一次发版。
61
+ 目前非常适合个人使用、本地/自托管模型以及 CI 一次性任务。在将其托付给任何不容出错的关键场景前,请评估以下事项:
76
62
 
77
- ## 现状
63
+ - **沙盒与审批** — 默认的 `approval_policy` 和 `sandbox_mode` 策略较为保守,但建议确认其符合你的运行环境与需求([`docs/config.md`](docs/config.md))。
64
+ - **插件信任机制** — 仓库自带的插件(hooks、MCP servers)在单纯 `git clone` 后绝不会自动执行;必须由人工确认批准,且该授权基于命令的具体内容而非文件路径。系统未提供任何可全局绕过此门控的开关。
65
+ - **成熟度** — 项目处于早期阶段(v0.1.x),目前由单人维护,暂无正式的安全审计或 SLA。路线图中的待补齐项(完整的端到端 MCP 工具调用校验)记录在 [`docs/ROADMAP.md`](docs/ROADMAP.md) 中。
78
66
 
79
- 日常使用已经可用。`keke exec`、TUI 和 ACP server 都能完整跑通一次会话;
80
- 运行时插件(skills、commands、hooks、MCP servers)按 Claude Code 的格式
81
- 安装,仓库自带的插件在你批准之前始终处于未激活状态。在运行中的会话里切换
82
- 模型这个功能还没实现——详见 [`docs/ROADMAP.md`](docs/ROADMAP.md)。
67
+ **适合的场景:** 希望摆脱厂商锁定、需要脚本/CI 友好的一次性运行模式、使用本地模型,或希望将 ACP 集成至自己的编辑器/客户端中。
68
+ **暂不适合的场景:** 需要针对所有厂商的即插即用式开箱即用 OAuth、成熟的插件生态市场,或需要商业支持合同。
83
69
 
84
- ## 灵感来源
70
+ ## 灵感与来源
85
71
 
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)。
72
+ keke 是一个全新的实现,参考并吸取了 OpenAI 的 **codex**、xAI 的 **grok-build** 以及 **deepseek-harness** 的设计思路。少数模块直接移植并在对应 crate 中注明来源;大部分代码均为原创。设计理念与 CI 强制执行的不变量详见:[`docs/architecture.md`](docs/architecture.md)、[`AGENTS.md`](AGENTS.md)。
95
73
 
96
74
  ## 许可证
97
75
 
98
- Apache-2.0。详见 [`LICENSE`](LICENSE) 与 [`NOTICE`](NOTICE);从其他项目移植
99
- 的代码会在承载它的 crate 的 `THIRD_PARTY_NOTICES.md` 中注明来源。
76
+ Apache-2.0。详见 [`LICENSE`](LICENSE) 与 [`NOTICE`](NOTICE);从其他项目移植的代码在相应 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.9",
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.9",
22
+ "@milisp/keke-darwin-arm64": "0.1.9",
23
+ "@milisp/keke-linux-x64": "0.1.9",
24
+ "@milisp/keke-linux-arm64": "0.1.9",
25
+ "@milisp/keke-win32-x64": "0.1.9"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",