@qilin-agent/base 0.0.0-stage → 3.1.3
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/LICENSE +21 -0
- package/README.i18n.yaml +58 -0
- package/README.md +143 -2
- package/README.zh.md +144 -0
- package/cordis.patch.yml +518 -0
- package/lib/index.js +1 -0
- package/lib/types/index.d.ts +9 -0
- package/package.json +135 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kkutysllb
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/bundle/base/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: 9287daaf4ca81ac3
|
|
7
|
+
zh: b91402a7e13adb98
|
|
8
|
+
/qilin-base:
|
|
9
|
+
en: f1248f2a147590d3
|
|
10
|
+
zh: 45cf386dffbdd068
|
|
11
|
+
/qilin-base/summary:
|
|
12
|
+
en: 654e632a4443a17f
|
|
13
|
+
zh: d0a1310c89a00ef2
|
|
14
|
+
/qilin-base/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: 09388d293f9be9cb
|
|
17
|
+
/qilin-base/use-this-package:
|
|
18
|
+
en: 064dc51cda83341e
|
|
19
|
+
zh: 968ea2882bf2aa1a
|
|
20
|
+
/qilin-base/use-this-package/a-minimal-custom-profile:
|
|
21
|
+
en: 1372d66f5c853fbb
|
|
22
|
+
zh: 0d6835f20370011f
|
|
23
|
+
/qilin-base/use-this-package/what-you-get:
|
|
24
|
+
en: d0a31cf2a4b3c85a
|
|
25
|
+
zh: f7ef5358f854db3f
|
|
26
|
+
/qilin-base/use-this-package/shell-tools-per-platform:
|
|
27
|
+
en: 2dce12f82d6ee955
|
|
28
|
+
zh: d4599eb899a3cd88
|
|
29
|
+
/qilin-base/use-this-package/changing-the-defaults:
|
|
30
|
+
en: 96a55abd5f7007dd
|
|
31
|
+
zh: d94f020708c38a17
|
|
32
|
+
/qilin-base/understand-the-implementation:
|
|
33
|
+
en: 094cfca8e26a0042
|
|
34
|
+
zh: de435e3e38420c01
|
|
35
|
+
/qilin-base/understand-the-implementation/composition-mechanics:
|
|
36
|
+
en: fd37bc66e39ac5e7
|
|
37
|
+
zh: 1a039afb8bf2d517
|
|
38
|
+
/qilin-base/understand-the-implementation/platform-gating:
|
|
39
|
+
en: f8f55ee5092e17ed
|
|
40
|
+
zh: 02d82b43a871d02a
|
|
41
|
+
/qilin-base/understand-the-implementation/source-map:
|
|
42
|
+
en: a8efda71d444155e
|
|
43
|
+
zh: c8221593709fbb99
|
|
44
|
+
/qilin-base/further-exploration:
|
|
45
|
+
en: 42df9b1749f17c7a
|
|
46
|
+
zh: 063be5205d8f5b94
|
|
47
|
+
/qilin-base/model-experience:
|
|
48
|
+
en: f6c4d2609b5f4bb6
|
|
49
|
+
zh: 869a9565a133fb01
|
|
50
|
+
/qilin-base/model-experience/kv-cache-effect:
|
|
51
|
+
en: e6e907c99df7cd0a
|
|
52
|
+
zh: f19f2f84a5f95177
|
|
53
|
+
/qilin-base/known-limitations-and-deferred-work:
|
|
54
|
+
en: b10a276d7d7d7e41
|
|
55
|
+
zh: e49305f24f239b0d
|
|
56
|
+
/qilin-base/known-limitations-and-deferred-work/dev-note:
|
|
57
|
+
en: e67f633dc6fe7773
|
|
58
|
+
zh: 3bb0c20c93f16f98
|
package/README.md
CHANGED
|
@@ -1,3 +1,144 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "The shared qilin core: model access, tools, durable sessions, and safety defaults for every qilin --profile surface, for users composing or customizing a profile."
|
|
3
|
+
kind: "package-bundle"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @qilin-agent/base
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Every base-backed `qilin --profile` surface runs on `qilin-base`, so those surfaces share a model connection, the full tool set, durable session history, and workspace safety defaults. The shipped `sdk-minimal` profile deliberately uses a complete standalone tree instead. You rarely touch this bundle directly — shipped base-backed profiles already include it, and a custom base-backed profile names it first. When you need different defaults, change your profile patch or add a later bundle; this package is not a library you import.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
You get the qilin core automatically: the shipped `web`, `headless`, `sdk`, and `acp` profiles already include it, and a custom profile names it as its first bundle. After that, everything works with no further configuration.
|
|
29
|
+
|
|
30
|
+
### A minimal custom profile
|
|
31
|
+
|
|
32
|
+
To build a profile on the shared core, create a profile with a `package.json` that names `@qilin-agent/base` first:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"name": "my-profile",
|
|
37
|
+
"private": true,
|
|
38
|
+
"qilin": {
|
|
39
|
+
"profile": {
|
|
40
|
+
"bundles": ["@qilin-agent/base"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Run `qilin --profile my-profile "your task"` and you get a working agent with model access, tools, persistence, and the default permission policy. The shipped `web`, `headless`, `sdk`, and `acp` profiles are created for you on first use. To add more bundles, run `qilin plugin --profile <name> add <package>`; in-box bundles resolve from the qilin installation. The profile contract is documented in the [app-boot profile section](../../boot/app-boot/README.md).
|
|
47
|
+
|
|
48
|
+
### What you get
|
|
49
|
+
|
|
50
|
+
Out of the box, every profile built on this core provides: a DeepSeek model connection (the provider and model are configurable, and you can enable extra providers from your settings), the full tool set — file editing, shell commands, web search, public HTTP(S) fetch, subagents, task and goal tracking — durable sessions that survive restarts, and the default permission policy that confines file writes to your workspace and asks before risky actions. Web fetch runs without per-call approval; its provider rejects non-public destinations. Feedback stays in the Session log. [OTel session upload](../../session/session-telemetry-otel/README.md) defaults to `FEEDBACK_ONLY` for all users, including `deepseek-official`: new text feedback, message ratings, edits, and withdrawals release the complete canonical prefix through that event, including context. Later records wait for the next explicit feedback; sending an authorized batch needs no further interaction or model call. `DISABLED` prevents OTel capture. The default-on [DeepSeek session-log contributor](../../session/session-log-deepseek/README.md) remains a separate request path.
|
|
51
|
+
|
|
52
|
+
Default file editing uses `read`, `write`, and `edit`. The `str_replace_editor` tool remains available as an explicit opt-in. To add it to a base-backed profile, put this entry in the profile, home, or invocation patch:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
- insert:
|
|
56
|
+
- id: tool-str-replace-editor
|
|
57
|
+
name: '@qilin-agent/tool-str-replace-editor'
|
|
58
|
+
config:
|
|
59
|
+
maxOutputChars: 16000
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The bundle mounts [MCP resources](../../mcp/mcp-resources/README.md) once. Configure only [MCP client entries](../../mcp/mcp-client/README.md) for the servers you need. Clients mounted by another provider also count as configured in their scope. Callers with no configured server in scope receive no MCP tools or prompt text.
|
|
63
|
+
|
|
64
|
+
### Shell tools per platform
|
|
65
|
+
|
|
66
|
+
On macOS and Linux you get the bash shell tools; on Windows you get the PowerShell twins instead, so exactly one shell stack is available per machine. The safety behavior is identical on every platform. A Windows host that prefers the unconfined PowerShell executor can switch the shell rows in its profile patch — the switch must disable both PowerShell rows and re-enable both bash rows, otherwise the profile fails to load.
|
|
67
|
+
|
|
68
|
+
### Changing the defaults
|
|
69
|
+
|
|
70
|
+
To change what a profile built on this core provides — a different default model, a stricter permission mode, extra or fewer tools — edit your profile's `cordis.patch.yml` or add a later bundle. Each patch entry replaces the target's whole configuration, so restate every setting you want to keep. Keep the sandboxed filesystem provider as the single file-write path: adding the plain filesystem provider on top of it makes the profile fail to load.
|
|
71
|
+
|
|
72
|
+
-----
|
|
73
|
+
|
|
74
|
+
<a id="understand-the-implementation"></a>
|
|
75
|
+
## Understand the implementation
|
|
76
|
+
|
|
77
|
+
<details>
|
|
78
|
+
<summary>Implementation internals — click to expand</summary>
|
|
79
|
+
|
|
80
|
+
The bundle is a static patch document: one `insert` list applied over the empty profile root. It mounts no service, emits no events, and holds no mutable state; each inserted row's package owns that row's behavior and invariants.
|
|
81
|
+
|
|
82
|
+
### Composition mechanics
|
|
83
|
+
|
|
84
|
+
A patch replaces the targeted row's whole `config` rather than merging into it. Later bundle layers and the user's profile `cordis.patch.yml` override rows by id, with the last write winning per row. Rows whose value differs by mode do not live here: each mode bundle restates its complete configuration, keeping any single row down to one bundle layer plus the user's. The full row set and its rationale are documented inline in [`cordis.patch.yml`](cordis.patch.yml); the [generated composition graph](../../../apps/cli/composition.md) renders it.
|
|
85
|
+
|
|
86
|
+
### Platform gating
|
|
87
|
+
|
|
88
|
+
The patch gates the two shell stacks by platform on its own rows: `bash-sandbox` and `tool-bash` carry `disabled: !!js process.platform === 'win32'`, and their twins `pwsh-sandbox` and `tool-pwsh` mount on win32 only with the inverted expression. The permission surface stays identical to POSIX: the sandbox policy executes the same file-effect policy through the Windows ACL restricted-token runner (`qilin-sandbox-local` → `@qilin-agent/sandbox-windows-acl`), and `fs-sandbox` keeps fencing `ctx.fs` writes — mounting `qilin-fs-local` alongside it would double-register `ctx.fs` and fail the load.
|
|
89
|
+
|
|
90
|
+
### Source map
|
|
91
|
+
|
|
92
|
+
| File | Role |
|
|
93
|
+
|---|---|
|
|
94
|
+
| [`cordis.patch.yml`](cordis.patch.yml) | The bundle substance: the base plugin rows, with per-row rationale as inline comments |
|
|
95
|
+
| [`src/index.ts`](src/index.ts) | Package entry; carries no runtime API |
|
|
96
|
+
| [`tests/base.spec.ts`](tests/base.spec.ts) | Manifest declaration and platform-gating checks |
|
|
97
|
+
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
-----
|
|
101
|
+
|
|
102
|
+
<a id="further-exploration"></a>
|
|
103
|
+
## Further Exploration
|
|
104
|
+
|
|
105
|
+
Read these pages when you want to go deeper into profiles, the surfaces built on this core, or the exact composition.
|
|
106
|
+
|
|
107
|
+
- [app-boot profile section](../../boot/app-boot/README.md) — how profiles are resolved, layered, and customized.
|
|
108
|
+
- [Bundle package map](../README.md) — the surfaces built on this core.
|
|
109
|
+
- [Generated composition graph](../../../apps/cli/composition.md) — the exact plugin set each shipped profile uses.
|
|
110
|
+
- [Profile plugin bundles note](../../../.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md) — the profile and bundle composition design.
|
|
111
|
+
- [Codex and Claude Code provider bundles](../../subagent/README.md) — optional provider bundles you can install on top.
|
|
112
|
+
|
|
113
|
+
-----
|
|
114
|
+
|
|
115
|
+
<a id="model-experience"></a>
|
|
116
|
+
## Model Experience
|
|
117
|
+
|
|
118
|
+
Indirectly, through each inserted row's package, which owns that row's model-facing behavior.
|
|
119
|
+
|
|
120
|
+
#### KV Cache effect
|
|
121
|
+
|
|
122
|
+
The bundle itself adds no request prefix; each inserted row's package owns any cache effect.
|
|
123
|
+
|
|
124
|
+
## Known Limitations and Deferred Work
|
|
125
|
+
|
|
126
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
These limits tell you when the core needs extra care or where an override must go. They are current package constraints, not a general comparison or a task backlog.
|
|
130
|
+
|
|
131
|
+
- **Overrides replace whole settings blocks** — a patch entry replaces the target's entire configuration, so your override must restate every setting you want to keep; nothing merges automatically.
|
|
132
|
+
- **Per-surface settings belong to the surface's bundle** — a default that differs between the web GUI and headless mode lives in that surface's bundle, not in the shared core.
|
|
133
|
+
- **Windows temp grants are private per-session subdirectories** — `workspace-write` confines writes to the workspace plus the session's own temp subdirectory (`<temp>\qilin-<hash>`, TMP/TEMP rewritten for confined children); `read-only` grants nothing. See `@qilin-agent/sandbox-windows-acl`.
|
|
134
|
+
- **Adding the plain filesystem provider on top of the sandboxed one fails the profile** — the two register the same service, so the profile refuses to load; use one or the other.
|
|
135
|
+
|
|
136
|
+
<a id="dev-note"></a>
|
|
137
|
+
### Dev Note
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
141
|
+
|
|
142
|
+
None.
|
|
143
|
+
|
|
144
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "共享的 qilin 核心:为每个 qilin --profile 表层提供模型访问、工具、持久会话与安全默认值,供用户组合或定制 profile。"
|
|
3
|
+
kind: "package-bundle"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @qilin-agent/base
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
每个基于 base 的 `qilin --profile` 表层都运行在 `qilin-base` 上,因此这些表层共享模型连接、完整工具集、持久会话历史和 workspace 安全默认值。随附的 `sdk-minimal` profile 刻意改用完整的独立配置树。你通常不直接操作本组合包——随发行版交付的基于 base 的 profile 已经包含它,自定义的基于 base 的 profile 则把它放在第一位。需要其他默认值时,应修改自己的 profile patch 或添加后续组合包;本包不是供导入的库。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
你会自动获得 qilin 核心:随发行版交付的 `web`、`headless`、`sdk` 与 `acp` profile 已包含它,自定义 profile 则把它列为第一个组合包。之后一切无需任何额外配置即可工作。
|
|
29
|
+
|
|
30
|
+
### 最小自定义 profile
|
|
31
|
+
|
|
32
|
+
要在共享核心之上构建 profile,请创建一个 profile,其 `package.json` 把 `@qilin-agent/base` 列在首位:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"name": "my-profile",
|
|
37
|
+
"private": true,
|
|
38
|
+
"qilin": {
|
|
39
|
+
"profile": {
|
|
40
|
+
"bundles": ["@qilin-agent/base"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
运行 `qilin --profile my-profile "your task"`,你就得到一个可用的 agent(智能体),带模型访问、工具、持久化与默认权限策略。随发行版交付的 `web`、`headless`、`sdk` 与 `acp` profile 会在首次使用时为你创建。要添加更多组合包,运行 `qilin plugin --profile <name> add <package>`;内置组合包从 qilin 安装目录解析。profile 约定见 [app-boot 的 profile 章节](../../boot/app-boot/README.zh.md)。
|
|
47
|
+
|
|
48
|
+
### 你得到什么
|
|
49
|
+
|
|
50
|
+
开箱即用,基于本核心构建的每个 profile 都提供:DeepSeek 模型连接(提供方与模型可配置,你还可以在设置中启用额外提供方)、完整工具集——文件编辑、shell 命令、web 搜索、公开 HTTP(S) 抓取、subagent、任务与目标跟踪——可跨重启存活的持久会话,以及默认权限策略:把文件写入限制在工作区内,危险操作前征询许可。Web 抓取无需逐次审批,其提供方会拒绝非公开目的地址。反馈保存在会话日志中。[OTel 会话上传](../../session/session-telemetry-otel/README.zh.md)对所有用户默认使用 `FEEDBACK_ONLY`,包括 `deepseek-official`:新的文本反馈、消息评分、编辑与撤回会释放截至该事件的完整规范会话日志前缀,包含上下文。后续记录等待下一次显式反馈;发送已授权批次无需进一步交互或模型调用。`DISABLED` 阻止 OTel 捕获。默认开启的 [DeepSeek 会话日志贡献器](../../session/session-log-deepseek/README.zh.md)仍是独立的请求路径。
|
|
51
|
+
|
|
52
|
+
默认文件编辑使用 `read`、`write` 和 `edit`。`str_replace_editor` 工具仍可显式启用。要将它加入基于 base 的 profile,请在 profile、home 或逐次调用 patch 中添加以下条目:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
- insert:
|
|
56
|
+
- id: tool-str-replace-editor
|
|
57
|
+
name: '@qilin-agent/tool-str-replace-editor'
|
|
58
|
+
config:
|
|
59
|
+
maxOutputChars: 16000
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
本 bundle 统一挂载 [MCP 资源](../../mcp/mcp-resources/README.zh.md)一次。只需为所需服务器配置 [MCP 客户端条目](../../mcp/mcp-client/README.zh.md)。其他提供方挂载的客户端在所属作用域中也属于已配置状态。调用方作用域中没有已配置服务器时,不会获得 MCP 工具或提示词文本。
|
|
63
|
+
|
|
64
|
+
### 各平台的 shell 工具
|
|
65
|
+
|
|
66
|
+
在 macOS 与 Linux 上你获得 bash shell 工具;在 Windows 上则获得对应的 PowerShell 孪生工具,因此每台机器恰好有一套 shell 栈。各平台的安全行为完全一致。偏好不受沙盒约束的 PowerShell 执行器的 Windows 主机可以在其 profile patch 中切换 shell 行——切换必须同时禁用两个 PowerShell 行并重新启用两个 bash 行,否则 profile 无法加载。
|
|
67
|
+
|
|
68
|
+
### 更改默认值
|
|
69
|
+
|
|
70
|
+
要改变基于本核心构建的 profile 提供的内容——不同的默认模型、更严格的权限模式、更多或更少的工具——请编辑 profile 的 `cordis.patch.yml` 或添加后面的组合包。每个 patch 条目会替换目标的整个配置,因此请重述每个想保留的设置。保持沙箱化文件系统提供方作为唯一的文件写入路径:在其之上再添加普通文件系统提供方会导致 profile 加载失败。
|
|
71
|
+
|
|
72
|
+
-----
|
|
73
|
+
|
|
74
|
+
<a id="understand-the-implementation"></a>
|
|
75
|
+
## 理解实现
|
|
76
|
+
|
|
77
|
+
<details>
|
|
78
|
+
<summary>实现细节——点击展开</summary>
|
|
79
|
+
|
|
80
|
+
本组合包是一份静态 patch 文档:一个应用到空 profile 根之上的 `insert` 列表。它不挂载任何服务、不发出任何事件、也不持有任何可变状态;每条插入行所属的包负责该行的行为与不变式。
|
|
81
|
+
|
|
82
|
+
### 组合机制
|
|
83
|
+
|
|
84
|
+
patch 会替换目标行的整个 `config`,而不是合并进它。后续组合包层与用户的 profile `cordis.patch.yml` 按 id 覆盖行,每行最后一次写入生效。按模式取值不同的行不属于这里:每个模式组合包重述自己的完整配置,让任何单一行最多只属于一个组合包层加用户层。完整行集合及其设计依据以行内注释写在 [`cordis.patch.yml`](cordis.patch.yml) 里;[生成的组合图](../../../apps/cli/composition.md)负责渲染它。
|
|
85
|
+
|
|
86
|
+
### 平台门控
|
|
87
|
+
|
|
88
|
+
patch 在自身上按平台门控两个 shell 栈:`bash-sandbox` 与 `tool-bash` 携带 `disabled: !!js process.platform === 'win32'`,孪生行 `pwsh-sandbox` 与 `tool-pwsh` 以取反的表达式仅在 win32 挂载。权限面与 POSIX 完全一致:沙箱策略通过 Windows ACL 受限令牌 runner(`qilin-sandbox-local` → `@qilin-agent/sandbox-windows-acl`)执行相同的文件效果策略,`fs-sandbox` 继续围栏 `ctx.fs` 写入——在其旁再挂载 `qilin-fs-local` 会重复注册 `ctx.fs` 并在加载时失败。
|
|
89
|
+
|
|
90
|
+
### 源码地图
|
|
91
|
+
|
|
92
|
+
| 文件 | 职责 |
|
|
93
|
+
|---|---|
|
|
94
|
+
| [`cordis.patch.yml`](cordis.patch.yml) | 组合包的实体:基础插件行,附以行内注释说明各行依据 |
|
|
95
|
+
| [`src/index.ts`](src/index.ts) | 包入口;不携带任何运行时 API |
|
|
96
|
+
| [`tests/base.spec.ts`](tests/base.spec.ts) | manifest(元数据清单)声明与平台门控检查 |
|
|
97
|
+
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
-----
|
|
101
|
+
|
|
102
|
+
<a id="further-exploration"></a>
|
|
103
|
+
## 进一步探索
|
|
104
|
+
|
|
105
|
+
当你想深入了解 profile、基于本核心构建的表层或确切组合时,阅读以下页面。
|
|
106
|
+
|
|
107
|
+
- [app-boot 的 profile 章节](../../boot/app-boot/README.zh.md)——profile 如何解析、分层与定制。
|
|
108
|
+
- [组合包索引](../README.zh.md)——基于本核心构建的表层。
|
|
109
|
+
- [生成组合图](../../../apps/cli/composition.md)——随发行版交付的每个 profile 使用的确切插件集合。
|
|
110
|
+
- [Profile 组合包设计笔记](../../../.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.zh.md)——profile 与组合包的组合设计。
|
|
111
|
+
- [Codex 与 Claude Code 提供方组合包](../../subagent/README.zh.md)——可叠加安装的可选提供方组合包。
|
|
112
|
+
|
|
113
|
+
-----
|
|
114
|
+
|
|
115
|
+
<a id="model-experience"></a>
|
|
116
|
+
## 模型体验
|
|
117
|
+
|
|
118
|
+
通过每条插入行所属的包间接产生影响,由各包负责其行的模型可见行为。
|
|
119
|
+
|
|
120
|
+
#### KV Cache 影响
|
|
121
|
+
|
|
122
|
+
组合包本身不添加任何请求前缀;每条插入行所属的包负责各自的缓存影响。
|
|
123
|
+
|
|
124
|
+
## 已知限制与延期工作
|
|
125
|
+
|
|
126
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
这些限制告诉你核心何时需要额外注意、覆盖应放在哪里。它们是当前包约束,不是通用对比或任务积压。
|
|
130
|
+
|
|
131
|
+
- **覆盖会替换整个设置块**——patch 条目会替换目标的整个配置,因此你的覆盖必须重述每个想保留的设置;不会自动合并。
|
|
132
|
+
- **按表层的设置属于该表层的组合包**——web GUI 与 headless 模式取值不同的默认值放在对应表层的组合包里,而不是共享核心。
|
|
133
|
+
- **Windows 的临时目录授权是按会话的私有子目录**——`workspace-write` 把写入限制在工作区与会话自己的 temp 子目录(`<temp>\qilin-<hash>`,受限子进程的 TMP/TEMP 被改写);`read-only` 不授予任何临时目录写入权限。见 `@qilin-agent/sandbox-windows-acl`。
|
|
134
|
+
- **在沙箱化文件系统提供方之上添加普通提供方会导致 profile 失败**——两者注册同一个服务,profile 因此拒绝加载;二选一。
|
|
135
|
+
|
|
136
|
+
<a id="dev-note"></a>
|
|
137
|
+
### 开发备注
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
<summary>维护者的工作上下文——点击展开</summary>
|
|
141
|
+
|
|
142
|
+
无。
|
|
143
|
+
|
|
144
|
+
</details>
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
# The qilin-base bundle patch: the shared core of each base-backed profile, applied as
|
|
2
|
+
# ONE insert over the empty profile root. Later bundle patches and the user's
|
|
3
|
+
# profile cordis.patch.yml address these rows by id, with the last write
|
|
4
|
+
# winning per row.
|
|
5
|
+
#
|
|
6
|
+
# A patch replaces the targeted row's whole `config` rather than merging into
|
|
7
|
+
# it, so a row whose value differs by mode does NOT live here: it belongs to
|
|
8
|
+
# each mode bundle, keeping any single row down to one bundle layer plus the
|
|
9
|
+
# user's. Mode-specific rows appear below only with shared plugin identity and
|
|
10
|
+
# neutral defaults; each mode bundle restates its complete configuration.
|
|
11
|
+
#
|
|
12
|
+
# Row order carries no load semantics (activation is service-availability
|
|
13
|
+
# driven); the grouping is for readers.
|
|
14
|
+
|
|
15
|
+
- insert:
|
|
16
|
+
- id: tool-plugin-manager
|
|
17
|
+
name: '@qilin-agent/plugin-manager/tools'
|
|
18
|
+
disabled: true
|
|
19
|
+
|
|
20
|
+
- id: plugin-manager
|
|
21
|
+
name: '@qilin-agent/plugin-manager'
|
|
22
|
+
disabled: !!js "!ctx.get('profileContext')"
|
|
23
|
+
|
|
24
|
+
- id: timer
|
|
25
|
+
name: '@qilin-agent/kylin-plugin-timer'
|
|
26
|
+
|
|
27
|
+
# Profile configuration reloads by default; module roots are opt-in.
|
|
28
|
+
- id: hmr
|
|
29
|
+
name: '@qilin-agent/hmr'
|
|
30
|
+
disabled: !!js "!ctx.get('profileContext')"
|
|
31
|
+
config:
|
|
32
|
+
root: []
|
|
33
|
+
|
|
34
|
+
- id: llm
|
|
35
|
+
name: '@qilin-agent/llm'
|
|
36
|
+
|
|
37
|
+
- id: deepseek-llm-api-extensions
|
|
38
|
+
name: '@qilin-agent/deepseek-llm-api-extensions'
|
|
39
|
+
|
|
40
|
+
- id: session
|
|
41
|
+
name: '@qilin-agent/session'
|
|
42
|
+
|
|
43
|
+
- id: session-log-deepseek
|
|
44
|
+
name: '@qilin-agent/session-log-deepseek'
|
|
45
|
+
|
|
46
|
+
- id: typert
|
|
47
|
+
name: '@qilin-agent/typert-registry'
|
|
48
|
+
|
|
49
|
+
- id: typert-loader
|
|
50
|
+
name: '@qilin-agent/typert-loader'
|
|
51
|
+
|
|
52
|
+
- id: typert-gateway
|
|
53
|
+
name: '@qilin-agent/api-gateway'
|
|
54
|
+
|
|
55
|
+
- id: session-title
|
|
56
|
+
name: '@qilin-agent/session-title'
|
|
57
|
+
config:
|
|
58
|
+
fallbackMaxWords: 5
|
|
59
|
+
fallbackMaxBytes: 40
|
|
60
|
+
maxTitleBytes: 80
|
|
61
|
+
|
|
62
|
+
- id: session-title-llm
|
|
63
|
+
name: '@qilin-agent/session-title-first-prompt-llm'
|
|
64
|
+
config:
|
|
65
|
+
targetWords: 5
|
|
66
|
+
targetCjkCharacters: 10
|
|
67
|
+
maxInputBytes: 4096
|
|
68
|
+
maxOutputTokens: 64
|
|
69
|
+
timeoutMs: 60000
|
|
70
|
+
|
|
71
|
+
- id: user-questions
|
|
72
|
+
name: '@qilin-agent/user-questions'
|
|
73
|
+
|
|
74
|
+
- id: agent
|
|
75
|
+
name: '@qilin-agent/agent'
|
|
76
|
+
|
|
77
|
+
- id: plugin-package-inventory-deepseek
|
|
78
|
+
name: '@qilin-agent/plugin-package-inventory-deepseek'
|
|
79
|
+
|
|
80
|
+
# The transport-independent default for Agents created by entry points.
|
|
81
|
+
# Settings may supply a saved selection; consumers read it at creation time.
|
|
82
|
+
- id: agent-default-model
|
|
83
|
+
name: '@qilin-agent/agent-default-model'
|
|
84
|
+
config:
|
|
85
|
+
provider: deepseek-official
|
|
86
|
+
model: deepseek-flash
|
|
87
|
+
|
|
88
|
+
- id: jobs
|
|
89
|
+
name: '@qilin-agent/jobs-local'
|
|
90
|
+
|
|
91
|
+
- id: llm-retry
|
|
92
|
+
name: '@qilin-agent/llm-retry'
|
|
93
|
+
|
|
94
|
+
# User-settings document (`$QILIN_HOME/settings.yaml`, hot-reloaded): a
|
|
95
|
+
# `llm-deepseek:` or `llm-pi-ai:` section there overrides the adapter entries
|
|
96
|
+
# below without a restart, and is what the web Models page writes.
|
|
97
|
+
- id: settings
|
|
98
|
+
name: '@qilin-agent/settings-file'
|
|
99
|
+
|
|
100
|
+
# Credential sources: inherited environment over the managed
|
|
101
|
+
# `$QILIN_HOME/.credentials.yaml`, with project and user `.env` fallbacks.
|
|
102
|
+
# Adapters resolve references per request; the Models page writes only the
|
|
103
|
+
# managed document, which is never materialized into the process environment.
|
|
104
|
+
- id: credentials
|
|
105
|
+
name: '@qilin-agent/credentials-local'
|
|
106
|
+
|
|
107
|
+
# The pi-ai multi-provider twin, mounted dormant: zero routes (and no extra
|
|
108
|
+
# models in the picker) until a `llm-pi-ai:` settings section supplies provider
|
|
109
|
+
# profiles — then those routes register live, keys resolving per request
|
|
110
|
+
# through their apiKeyEnv references, and drop again when the section empties.
|
|
111
|
+
# Supplying those profiles is exactly what the web Models page does. Which
|
|
112
|
+
# adapters exist is composition; which providers run is the user's settings
|
|
113
|
+
# document.
|
|
114
|
+
- id: llm-pi-ai
|
|
115
|
+
name: '@qilin-agent/llm-pi-ai'
|
|
116
|
+
|
|
117
|
+
- id: session-persistence-jsonl
|
|
118
|
+
name: '@qilin-agent/session-persistence-jsonl'
|
|
119
|
+
config:
|
|
120
|
+
root: !!js qilinHomePath('sessions')
|
|
121
|
+
|
|
122
|
+
# Durable image bytes live outside the append-only session log. Messages
|
|
123
|
+
# keep content-addressed references that this shared backend resolves for
|
|
124
|
+
# provider requests and authorized history reads.
|
|
125
|
+
- id: attachment-local
|
|
126
|
+
name: '@qilin-agent/attachment-local'
|
|
127
|
+
|
|
128
|
+
# Full-text session search is opt-in. `openAt: never` keeps
|
|
129
|
+
# ctx.sessionQuery mounted — exact reads, titles, and lineage traces
|
|
130
|
+
# (session export, subagent-fork Workspace inheritance) stay available —
|
|
131
|
+
# while search calls fail with SESSION_QUERY_SEARCH_DISABLED and SQLite is
|
|
132
|
+
# never opened; the Web sidebar search matches titles and workspace names
|
|
133
|
+
# only. Deployments enabling content search override `openAt` to
|
|
134
|
+
# `first-search` or `startup` in a later patch layer (profile
|
|
135
|
+
# cordis.patch.yml or a --patch overlay), typically with a durable `path`.
|
|
136
|
+
- id: session-query-sqlite
|
|
137
|
+
name: '@qilin-agent/session-query-sqlite'
|
|
138
|
+
config:
|
|
139
|
+
path: ':memory:'
|
|
140
|
+
openAt: never
|
|
141
|
+
|
|
142
|
+
# Shared projection registry: subagent catalog identity (mode/label) folds
|
|
143
|
+
# through its registered units, so the `list_agents` surface below fails
|
|
144
|
+
# loud without it; web layers reuse this same mount for list rows.
|
|
145
|
+
- id: session-projection
|
|
146
|
+
name: '@qilin-agent/session-projection'
|
|
147
|
+
|
|
148
|
+
# Durable KV storage: the storage hub, the json backend, and the
|
|
149
|
+
# schema-validated domain form over them. Session-layer persistence (the
|
|
150
|
+
# projection cache below; workspace in web layers)
|
|
151
|
+
# routes through this stack, so it belongs to the shared base.
|
|
152
|
+
- id: storage
|
|
153
|
+
name: '@qilin-agent/storage'
|
|
154
|
+
|
|
155
|
+
- id: storage-json
|
|
156
|
+
name: '@qilin-agent/storage-json'
|
|
157
|
+
config:
|
|
158
|
+
root: !!js qilinHomePath('storages')
|
|
159
|
+
|
|
160
|
+
- id: storage-domain
|
|
161
|
+
name: '@qilin-agent/storage-domain'
|
|
162
|
+
config:
|
|
163
|
+
backend: json
|
|
164
|
+
|
|
165
|
+
# Persisted projection cache: throttled write-behind over the
|
|
166
|
+
# session_projcache domain (per-record layout — one version-stamped
|
|
167
|
+
# checkpoint document per session), serving the session listing's
|
|
168
|
+
# projection column.
|
|
169
|
+
- id: session-projection-cache
|
|
170
|
+
name: '@qilin-agent/session-projection-cache'
|
|
171
|
+
config:
|
|
172
|
+
writeEveryEvents: 200
|
|
173
|
+
writeIntervalMs: 5000
|
|
174
|
+
|
|
175
|
+
- id: otel
|
|
176
|
+
name: '@qilin-agent/otel'
|
|
177
|
+
|
|
178
|
+
# OTel releases a Session-log prefix only after explicit user feedback,
|
|
179
|
+
# regardless of model provider. Ordinary activity never triggers capture.
|
|
180
|
+
# QILIN_TELEMETRY_OTLP_URL overrides the production endpoint. A non-empty
|
|
181
|
+
# QILIN_TELEMETRY_DISABLED — any value, including '0'/'false' — opts the
|
|
182
|
+
# process out (the launchers patch the row disabled; config cannot disable
|
|
183
|
+
# a row). Exports carry the harness home's anonymous user id ($QILIN_HOME/.anonymous-user-id,
|
|
184
|
+
# random UUID; delete the file to reset the identity) as the Resource's
|
|
185
|
+
# user.id. Byte-bounded batching may turn an authorized prefix into
|
|
186
|
+
# several HTTP requests. Requests run serially; each has its own 1s
|
|
187
|
+
# transport timeout and 1.5s watchdog. A watchdog does not release the
|
|
188
|
+
# active request slot. The outer 3s shutdown deadline stops queued sends;
|
|
189
|
+
# large prefixes or an unsettled transport may leave records unsent.
|
|
190
|
+
# Every CLI exit path drains by disposing the root on SIGINT/SIGTERM.
|
|
191
|
+
- id: session-telemetry-otel
|
|
192
|
+
name: '@qilin-agent/session-telemetry-otel'
|
|
193
|
+
config:
|
|
194
|
+
mode: !!js process.env.QILIN_TELEMETRY_MODE || 'FEEDBACK_ONLY'
|
|
195
|
+
shutdownTimeoutMillis: 3000
|
|
196
|
+
maxRequestBytes: 4000000
|
|
197
|
+
exporter:
|
|
198
|
+
url: !!js process.env.QILIN_TELEMETRY_OTLP_URL ?? 'https://dsh-otel-collector.deepseeksvc.com/v1/logs'
|
|
199
|
+
compression: gzip
|
|
200
|
+
timeoutMillis: 1000
|
|
201
|
+
processor:
|
|
202
|
+
scheduledDelayMillis: 10000
|
|
203
|
+
maxQueueSize: 2048
|
|
204
|
+
maxExportBatchSize: 2048
|
|
205
|
+
exportTimeoutMillis: 1500
|
|
206
|
+
|
|
207
|
+
- id: subprocess
|
|
208
|
+
name: '@qilin-agent/subprocess-local'
|
|
209
|
+
|
|
210
|
+
# Every shipped CLI mode starts with the same file-effect boundary.
|
|
211
|
+
# The environment remains an explicit deployment override; otherwise fresh
|
|
212
|
+
# sessions pin workspace-write + ask through the permission service below.
|
|
213
|
+
- id: sandbox
|
|
214
|
+
name: '@qilin-agent/sandbox-local'
|
|
215
|
+
|
|
216
|
+
- id: sandbox-policy
|
|
217
|
+
name: '@qilin-agent/sandbox-policy'
|
|
218
|
+
config:
|
|
219
|
+
mode: !!js process.env.QILIN_PERMISSION_MODE ?? 'workspace-write'
|
|
220
|
+
workspaceRoot: !!js process.cwd()
|
|
221
|
+
|
|
222
|
+
- id: bash-sandbox
|
|
223
|
+
name: '@qilin-agent/bash-sandbox'
|
|
224
|
+
disabled: !!js process.platform === 'win32'
|
|
225
|
+
config:
|
|
226
|
+
timeoutMs: 60000
|
|
227
|
+
|
|
228
|
+
- id: pwsh-sandbox
|
|
229
|
+
name: '@qilin-agent/pwsh-sandbox'
|
|
230
|
+
disabled: !!js process.platform !== 'win32'
|
|
231
|
+
|
|
232
|
+
- id: approval
|
|
233
|
+
name: '@qilin-agent/user-approval'
|
|
234
|
+
config:
|
|
235
|
+
policy: !!js "(process.env.QILIN_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask'"
|
|
236
|
+
|
|
237
|
+
- id: permission
|
|
238
|
+
name: '@qilin-agent/permission-presets'
|
|
239
|
+
config:
|
|
240
|
+
presets:
|
|
241
|
+
read-only:
|
|
242
|
+
sandbox: read-only
|
|
243
|
+
approval: ask
|
|
244
|
+
workspace-write:
|
|
245
|
+
sandbox: workspace-write
|
|
246
|
+
approval: ask
|
|
247
|
+
danger-full-access:
|
|
248
|
+
sandbox: danger-full-access
|
|
249
|
+
approval: never
|
|
250
|
+
|
|
251
|
+
- id: shell-env
|
|
252
|
+
name: '@qilin-agent/shell-env'
|
|
253
|
+
|
|
254
|
+
- id: tool-bash
|
|
255
|
+
name: '@qilin-agent/tool-bash'
|
|
256
|
+
disabled: !!js process.platform === 'win32'
|
|
257
|
+
|
|
258
|
+
- id: tool-pwsh
|
|
259
|
+
name: '@qilin-agent/tool-pwsh'
|
|
260
|
+
disabled: !!js process.platform !== 'win32'
|
|
261
|
+
|
|
262
|
+
- id: tool-jobs
|
|
263
|
+
name: '@qilin-agent/tool-jobs'
|
|
264
|
+
|
|
265
|
+
# The model-facing "show me that" tool: its requests ride a Remote stream to
|
|
266
|
+
# the browser's Sidebar, so the service and the tool share one host row.
|
|
267
|
+
- id: sidebar-opens
|
|
268
|
+
name: '@qilin-agent/sidebar-opens'
|
|
269
|
+
|
|
270
|
+
- id: fs-observation-policy
|
|
271
|
+
name: '@qilin-agent/fs-observation-policy'
|
|
272
|
+
|
|
273
|
+
- id: tool-fs
|
|
274
|
+
name: '@qilin-agent/tool-fs'
|
|
275
|
+
|
|
276
|
+
- id: tool-fs-search
|
|
277
|
+
name: '@qilin-agent/tool-fs-search'
|
|
278
|
+
config:
|
|
279
|
+
sampleOverCapGlobResults: false
|
|
280
|
+
|
|
281
|
+
- id: agent-instructions
|
|
282
|
+
name: '@qilin-agent/agent-instructions'
|
|
283
|
+
config:
|
|
284
|
+
maxBytes: 65536
|
|
285
|
+
|
|
286
|
+
- id: skill
|
|
287
|
+
name: '@qilin-agent/skill'
|
|
288
|
+
|
|
289
|
+
- id: skill-filesystem
|
|
290
|
+
name: '@qilin-agent/skill-filesystem'
|
|
291
|
+
|
|
292
|
+
- id: skill-badge
|
|
293
|
+
name: '@qilin-agent/skill-badge'
|
|
294
|
+
disabled: true
|
|
295
|
+
|
|
296
|
+
- id: tool-skill
|
|
297
|
+
name: '@qilin-agent/tool-skill'
|
|
298
|
+
|
|
299
|
+
- id: commands
|
|
300
|
+
name: '@qilin-agent/commands'
|
|
301
|
+
|
|
302
|
+
- id: command-feedback
|
|
303
|
+
name: '@qilin-agent/command-feedback'
|
|
304
|
+
|
|
305
|
+
- id: goal
|
|
306
|
+
name: '@qilin-agent/goal'
|
|
307
|
+
|
|
308
|
+
- id: goal-round-driver
|
|
309
|
+
name: '@qilin-agent/goal-round-driver'
|
|
310
|
+
|
|
311
|
+
- id: command-goal
|
|
312
|
+
name: '@qilin-agent/command-goal'
|
|
313
|
+
|
|
314
|
+
- id: plan-mode
|
|
315
|
+
name: '@qilin-agent/plan-mode'
|
|
316
|
+
config:
|
|
317
|
+
section: |
|
|
318
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
319
|
+
|
|
320
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
321
|
+
|
|
322
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed only to keep the request shape stable. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
323
|
+
|
|
324
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
325
|
+
|
|
326
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
327
|
+
|
|
328
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
329
|
+
|
|
330
|
+
- id: token-meter
|
|
331
|
+
name: '@qilin-agent/token-meter'
|
|
332
|
+
|
|
333
|
+
- id: compaction-basic
|
|
334
|
+
name: '@qilin-agent/compaction-basic'
|
|
335
|
+
|
|
336
|
+
# Human `/compact`: one useful reduction below the automatic threshold. Backend
|
|
337
|
+
# independent, so it follows whichever compaction service this leaf mounts.
|
|
338
|
+
- id: command-compact
|
|
339
|
+
name: '@qilin-agent/command-compact'
|
|
340
|
+
|
|
341
|
+
- id: subagent
|
|
342
|
+
name: '@qilin-agent/subagent'
|
|
343
|
+
|
|
344
|
+
- id: subagent-spawn-in-process
|
|
345
|
+
name: '@qilin-agent/subagent-spawn-in-process'
|
|
346
|
+
config:
|
|
347
|
+
providerName: spawn
|
|
348
|
+
|
|
349
|
+
- id: subagent-fork-in-process
|
|
350
|
+
name: '@qilin-agent/subagent-fork-in-process'
|
|
351
|
+
config:
|
|
352
|
+
providerName: fork
|
|
353
|
+
|
|
354
|
+
# Continuable background children are selected per delegation tool. The
|
|
355
|
+
# separately loaded follow-up tool registers the one global `send_message`.
|
|
356
|
+
- id: tool-subagent-control
|
|
357
|
+
name: '@qilin-agent/tool-subagent-control'
|
|
358
|
+
|
|
359
|
+
- id: tool-subagent-list-agents
|
|
360
|
+
name: '@qilin-agent/tool-subagent-control/list-agents'
|
|
361
|
+
|
|
362
|
+
- id: tool-subagent
|
|
363
|
+
name: '@qilin-agent/tool-subagent'
|
|
364
|
+
config:
|
|
365
|
+
provider: spawn
|
|
366
|
+
toolName: subagent
|
|
367
|
+
backgroundMode: continuable
|
|
368
|
+
|
|
369
|
+
# Fork omits model selection so provider/model stay equal to the parent and
|
|
370
|
+
# the inherited history remains eligible for KV Cache reuse. This base row
|
|
371
|
+
# stays one-shot; preset layers may select continuable mode without adding a
|
|
372
|
+
# child-only system-prompt section or tool schema ahead of that history.
|
|
373
|
+
# See .agents/notes/implemented/feature/2026-08-18-model-selected-subagent-routes.md
|
|
374
|
+
# and .agents/notes/implemented/architecture/2026-08-10-fork-children-stay-one-shot.md.
|
|
375
|
+
- id: tool-subagent-fork
|
|
376
|
+
name: '@qilin-agent/tool-subagent'
|
|
377
|
+
config:
|
|
378
|
+
provider: fork
|
|
379
|
+
toolName: subagent_fork
|
|
380
|
+
backgroundMode: one-shot
|
|
381
|
+
|
|
382
|
+
- id: ptc-runtime
|
|
383
|
+
name: '@qilin-agent/ptc-runtime-node'
|
|
384
|
+
|
|
385
|
+
- id: workflow-ptc
|
|
386
|
+
name: '@qilin-agent/workflow-ptc'
|
|
387
|
+
config:
|
|
388
|
+
provider: spawn
|
|
389
|
+
|
|
390
|
+
- id: tool-workflow
|
|
391
|
+
name: '@qilin-agent/tool-workflow'
|
|
392
|
+
|
|
393
|
+
- id: timeout-policy
|
|
394
|
+
name: '@qilin-agent/tool-call-timeout-policy'
|
|
395
|
+
|
|
396
|
+
- id: spill-local
|
|
397
|
+
name: '@qilin-agent/spill-local'
|
|
398
|
+
|
|
399
|
+
- id: spill-policy
|
|
400
|
+
name: '@qilin-agent/spill-policy'
|
|
401
|
+
config:
|
|
402
|
+
maxInlineTokens: 12500
|
|
403
|
+
|
|
404
|
+
# Durability checkpoints before each model request and top-level dispatch.
|
|
405
|
+
- id: session-checkpoint-policy
|
|
406
|
+
name: '@qilin-agent/session-checkpoint-policy'
|
|
407
|
+
|
|
408
|
+
# Compacts oversized tool results before the broader conversation compactor
|
|
409
|
+
# runs, preserving the model-visible result within the configured budget.
|
|
410
|
+
- id: tool-result-pruner
|
|
411
|
+
name: '@qilin-agent/compaction-tool-result-pruner'
|
|
412
|
+
config:
|
|
413
|
+
thresholdChars: 8192
|
|
414
|
+
headChars: 4096
|
|
415
|
+
tailChars: 1024
|
|
416
|
+
|
|
417
|
+
# When an image-capable route rejects a request as over its image budget,
|
|
418
|
+
# replace the oldest images with placeholders on the surface and retry.
|
|
419
|
+
- id: image-offload
|
|
420
|
+
name: '@qilin-agent/compaction-image-offload'
|
|
421
|
+
|
|
422
|
+
- id: tool-todo
|
|
423
|
+
name: '@qilin-agent/tool-todo'
|
|
424
|
+
config:
|
|
425
|
+
allowParallelInProgress: true
|
|
426
|
+
|
|
427
|
+
# Persisted same-session goals reach the model and the slash menu here; the
|
|
428
|
+
# domain, driver, and `/goal` command are above.
|
|
429
|
+
- id: tool-goal
|
|
430
|
+
name: '@qilin-agent/tool-goal'
|
|
431
|
+
|
|
432
|
+
# Fresh-agent Ralph iteration over a build-time-fixed script. Off by
|
|
433
|
+
# default: the tool description restricts `ralph` to runs the human
|
|
434
|
+
# explicitly asked for, and completion is a worker self-report, not an
|
|
435
|
+
# independent evaluation. An overlay row restores it for a base-backed
|
|
436
|
+
# profile (`$QILIN_HOME/cordis.patch.yml`, or a `--patch <file>`):
|
|
437
|
+
# - id: tool-ralph
|
|
438
|
+
# disabled: false
|
|
439
|
+
- id: tool-ralph
|
|
440
|
+
name: '@qilin-agent/tool-ralph'
|
|
441
|
+
disabled: true
|
|
442
|
+
config:
|
|
443
|
+
subagentProvider: spawn
|
|
444
|
+
maxRounds: 64
|
|
445
|
+
|
|
446
|
+
# Consecutive-repeat reminders on the tool chain.
|
|
447
|
+
- id: repeat-tool-reminder
|
|
448
|
+
name: '@qilin-agent/repeat-tool-reminder'
|
|
449
|
+
config:
|
|
450
|
+
thresholds: [3, 5, 8]
|
|
451
|
+
argumentsPreviewChars: 500
|
|
452
|
+
|
|
453
|
+
# The shared base enables the stable model-facing web_search and web_fetch
|
|
454
|
+
# tools. The Web app disables this host row and composes both tools per agent
|
|
455
|
+
# preset; products with a stricter network policy override tool-web. DeepSeek
|
|
456
|
+
# search resolves the same DEEPSEEK_API_KEY
|
|
457
|
+
# credential the Models page manages for chat, at each search; its Messages
|
|
458
|
+
# endpoint is separate from the chat-completions endpoint, so it takes its own
|
|
459
|
+
# base-URL override. Anonymous fetch accepts only public HTTP(S) destinations,
|
|
460
|
+
# resolves and validates every destination, and pins every actual connection.
|
|
461
|
+
# Search is a full auxiliary model request with server-side retrieval, so this
|
|
462
|
+
# shipped DeepSeek route gets 60s while the provider-neutral tool default
|
|
463
|
+
# remains 30s.
|
|
464
|
+
- id: web
|
|
465
|
+
name: '@qilin-agent/web'
|
|
466
|
+
config:
|
|
467
|
+
searchProvider: deepseek-official
|
|
468
|
+
fetchProvider: http
|
|
469
|
+
|
|
470
|
+
- id: web-search-deepseek
|
|
471
|
+
name: '@qilin-agent/web-search-deepseek'
|
|
472
|
+
config:
|
|
473
|
+
apiKeyEnv: DEEPSEEK_API_KEY
|
|
474
|
+
|
|
475
|
+
- id: web-fetch-http
|
|
476
|
+
name: '@qilin-agent/web-fetch-http'
|
|
477
|
+
|
|
478
|
+
- id: tool-web
|
|
479
|
+
name: '@qilin-agent/tool-web'
|
|
480
|
+
config:
|
|
481
|
+
fetch: true
|
|
482
|
+
searchTimeoutMs: 60000
|
|
483
|
+
|
|
484
|
+
- id: mcp-resources
|
|
485
|
+
name: '@qilin-agent/mcp-resources'
|
|
486
|
+
|
|
487
|
+
# ── rows every mode mounts, whose values each overlay may state ──────────────
|
|
488
|
+
|
|
489
|
+
# The tool registry. Presentation mode is a deployment choice; omitting it here
|
|
490
|
+
# keeps the schema default (native).
|
|
491
|
+
- id: tools
|
|
492
|
+
name: '@qilin-agent/tools'
|
|
493
|
+
|
|
494
|
+
# The deployment persona is a deployment choice; plan-mode and tool plugins own
|
|
495
|
+
# their own prompt sections.
|
|
496
|
+
- id: system-prompt
|
|
497
|
+
name: '@qilin-agent/system-prompt'
|
|
498
|
+
config:
|
|
499
|
+
personaPrefix: ''
|
|
500
|
+
|
|
501
|
+
# Agents created at startup. The base stays empty; raw overlays may create
|
|
502
|
+
# agents, while Web creates sessions on client request.
|
|
503
|
+
- id: agent-loop
|
|
504
|
+
name: '@qilin-agent/agent-loop'
|
|
505
|
+
config:
|
|
506
|
+
agents: []
|
|
507
|
+
|
|
508
|
+
# The sandboxed filesystem provider. `cwd` defaults to `process.cwd()`; an
|
|
509
|
+
# overlay can pin another workspace.
|
|
510
|
+
- id: fs-sandbox
|
|
511
|
+
name: '@qilin-agent/fs-sandbox'
|
|
512
|
+
|
|
513
|
+
# The native DeepSeek adapter. No key or endpoint is inlined: both resolve per
|
|
514
|
+
# request from the `llm-deepseek:` settings section over this entry, with the
|
|
515
|
+
# key coming from the credential store below. Thinking defaults are a deployment
|
|
516
|
+
# choice.
|
|
517
|
+
- id: llm-deepseek
|
|
518
|
+
name: '@qilin-agent/llm-deepseek-api-key'
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @qilin-agent/base — the shared qilin core as a profile bundle. The
|
|
3
|
+
* package's substance is `cordis.patch.yml`, declared by the `qilin.bundle.patch`
|
|
4
|
+
* manifest field and resolved by the profile composer through that field;
|
|
5
|
+
* this module carries no runtime API.
|
|
6
|
+
* @module @qilin-agent/base
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,138 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/base",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "The shared qilin core as a profile bundle: the first patch layer of base-backed profiles, inserting core rows over the empty profile root",
|
|
4
|
+
"version": "3.1.3",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kkutysllb/QiLin.git",
|
|
11
|
+
"directory": "packages/bundle/base"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "lib/index.js",
|
|
18
|
+
"types": "lib/types/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./lib/types/index.d.ts",
|
|
22
|
+
"default": "./lib/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
25
|
+
"./src/*": "./src/*",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/index.js",
|
|
30
|
+
"cordis.patch.yml",
|
|
31
|
+
"lib/types/**/*.d.ts"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"qilin": {
|
|
35
|
+
"bundle": {
|
|
36
|
+
"patch": "./cordis.patch.yml"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@qilin-agent/hmr": "3.1.3",
|
|
41
|
+
"@qilin-agent/kylin-plugin-timer": "~1.1.5",
|
|
42
|
+
"@qilin-agent/agent-default-model": "3.1.3",
|
|
43
|
+
"@qilin-agent/agent": "3.1.3",
|
|
44
|
+
"@qilin-agent/attachment-local": "3.1.3",
|
|
45
|
+
"@qilin-agent/agent-loop": "3.1.3",
|
|
46
|
+
"@qilin-agent/shell-env": "3.1.3",
|
|
47
|
+
"@qilin-agent/command-compact": "3.1.3",
|
|
48
|
+
"@qilin-agent/bash-sandbox": "3.1.3",
|
|
49
|
+
"@qilin-agent/command-feedback": "3.1.3",
|
|
50
|
+
"@qilin-agent/command-goal": "3.1.3",
|
|
51
|
+
"@qilin-agent/commands": "3.1.3",
|
|
52
|
+
"@qilin-agent/compaction-basic": "3.1.3",
|
|
53
|
+
"@qilin-agent/compaction-image-offload": "3.1.3",
|
|
54
|
+
"@qilin-agent/compaction-tool-result-pruner": "3.1.3",
|
|
55
|
+
"@qilin-agent/credentials-local": "3.1.3",
|
|
56
|
+
"@qilin-agent/deepseek-llm-api-extensions": "3.1.3",
|
|
57
|
+
"@qilin-agent/plugin-package-inventory-deepseek": "3.1.3",
|
|
58
|
+
"@qilin-agent/fs-observation-policy": "3.1.3",
|
|
59
|
+
"@qilin-agent/fs-sandbox": "3.1.3",
|
|
60
|
+
"@qilin-agent/goal": "3.1.3",
|
|
61
|
+
"@qilin-agent/goal-round-driver": "3.1.3",
|
|
62
|
+
"@qilin-agent/fs-local": "3.1.3",
|
|
63
|
+
"@qilin-agent/api-gateway": "3.1.3",
|
|
64
|
+
"@qilin-agent/llm-deepseek-api-key": "3.1.3",
|
|
65
|
+
"@qilin-agent/llm-pi-ai": "3.1.3",
|
|
66
|
+
"@qilin-agent/llm-retry": "3.1.3",
|
|
67
|
+
"@qilin-agent/permission-presets": "3.1.3",
|
|
68
|
+
"@qilin-agent/llm": "3.1.3",
|
|
69
|
+
"@qilin-agent/mcp-resources": "3.1.3",
|
|
70
|
+
"@qilin-agent/plan-mode": "3.1.3",
|
|
71
|
+
"@qilin-agent/pwsh-sandbox": "3.1.3",
|
|
72
|
+
"@qilin-agent/sandbox-local": "3.1.3",
|
|
73
|
+
"@qilin-agent/repeat-tool-reminder": "3.1.3",
|
|
74
|
+
"@qilin-agent/sandbox-policy": "3.1.3",
|
|
75
|
+
"@qilin-agent/session": "3.1.3",
|
|
76
|
+
"@qilin-agent/session-checkpoint-policy": "3.1.3",
|
|
77
|
+
"@qilin-agent/session-log-deepseek": "3.1.3",
|
|
78
|
+
"@qilin-agent/session-persistence-jsonl": "3.1.3",
|
|
79
|
+
"@qilin-agent/session-projection": "3.1.3",
|
|
80
|
+
"@qilin-agent/session-projection-cache": "3.1.3",
|
|
81
|
+
"@qilin-agent/session-query-sqlite": "3.1.3",
|
|
82
|
+
"@qilin-agent/session-telemetry-otel": "3.1.3",
|
|
83
|
+
"@qilin-agent/session-title": "3.1.3",
|
|
84
|
+
"@qilin-agent/skill": "3.1.3",
|
|
85
|
+
"@qilin-agent/skill-badge": "3.1.3",
|
|
86
|
+
"@qilin-agent/session-title-first-prompt-llm": "3.1.3",
|
|
87
|
+
"@qilin-agent/skill-filesystem": "3.1.3",
|
|
88
|
+
"@qilin-agent/settings-file": "3.1.3",
|
|
89
|
+
"@qilin-agent/spill-local": "3.1.3",
|
|
90
|
+
"@qilin-agent/spill-policy": "3.1.3",
|
|
91
|
+
"@qilin-agent/storage": "3.1.3",
|
|
92
|
+
"@qilin-agent/storage-json": "3.1.3",
|
|
93
|
+
"@qilin-agent/storage-domain": "3.1.3",
|
|
94
|
+
"@qilin-agent/subagent": "3.1.3",
|
|
95
|
+
"@qilin-agent/subagent-fork-in-process": "3.1.3",
|
|
96
|
+
"@qilin-agent/subprocess-local": "3.1.3",
|
|
97
|
+
"@qilin-agent/subagent-spawn-in-process": "3.1.3",
|
|
98
|
+
"@qilin-agent/system-prompt": "3.1.3",
|
|
99
|
+
"@qilin-agent/tool-call-timeout-policy": "3.1.3",
|
|
100
|
+
"@qilin-agent/token-meter": "3.1.3",
|
|
101
|
+
"@qilin-agent/tool-bash": "3.1.3",
|
|
102
|
+
"@qilin-agent/jobs-local": "3.1.3",
|
|
103
|
+
"@qilin-agent/tool-fs-search": "3.1.3",
|
|
104
|
+
"@qilin-agent/tool-present": "3.1.3",
|
|
105
|
+
"@qilin-agent/tool-goal": "3.1.3",
|
|
106
|
+
"@qilin-agent/tool-ralph": "3.1.3",
|
|
107
|
+
"@qilin-agent/tool-fs": "3.1.3",
|
|
108
|
+
"@qilin-agent/tool-pwsh": "3.1.3",
|
|
109
|
+
"@qilin-agent/tool-skill": "3.1.3",
|
|
110
|
+
"@qilin-agent/tool-schedule": "3.1.3",
|
|
111
|
+
"@qilin-agent/tool-subagent": "3.1.3",
|
|
112
|
+
"@qilin-agent/tool-subagent-control": "3.1.3",
|
|
113
|
+
"@qilin-agent/tool-jobs": "3.1.3",
|
|
114
|
+
"@qilin-agent/sidebar-opens": "3.1.3",
|
|
115
|
+
"@qilin-agent/tool-web": "3.1.3",
|
|
116
|
+
"@qilin-agent/typert-loader": "3.1.3",
|
|
117
|
+
"@qilin-agent/tool-workflow": "3.1.3",
|
|
118
|
+
"@qilin-agent/user-approval": "3.1.3",
|
|
119
|
+
"@qilin-agent/typert-registry": "3.1.3",
|
|
120
|
+
"@qilin-agent/tool-todo": "3.1.3",
|
|
121
|
+
"@qilin-agent/tools": "3.1.3",
|
|
122
|
+
"@qilin-agent/user-questions": "3.1.3",
|
|
123
|
+
"@qilin-agent/web": "3.1.3",
|
|
124
|
+
"@qilin-agent/web-fetch-http": "3.1.3",
|
|
125
|
+
"@qilin-agent/web-search-deepseek": "3.1.3",
|
|
126
|
+
"@qilin-agent/workflow-ptc": "3.1.3",
|
|
127
|
+
"@qilin-agent/agent-instructions": "3.1.3",
|
|
128
|
+
"@qilin-agent/plugin-manager": "3.1.3",
|
|
129
|
+
"@qilin-agent/ptc-runtime-node": "3.1.3",
|
|
130
|
+
"@qilin-agent/otel": "3.1.3"
|
|
131
|
+
},
|
|
132
|
+
"peerDependencies": {
|
|
133
|
+
"@qilin-agent/kylin": "~4.0.3"
|
|
134
|
+
},
|
|
135
|
+
"devDependencies": {
|
|
136
|
+
"@qilin-agent/kylin": "~4.0.3"
|
|
137
|
+
}
|
|
6
138
|
}
|