@easbot/llm 0.3.41 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +11 -1
- package/README.md +10 -1
- package/dist/assets/txt/src/agent/prompt/plan.txt +19 -0
- package/dist/index.cjs +111 -99
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.mjs +113 -101
- package/package.json +28 -27
package/README.en.md
CHANGED
|
@@ -6,7 +6,7 @@ English | [中文](./README.md)
|
|
|
6
6
|
|
|
7
7
|
## Version
|
|
8
8
|
|
|
9
|
-
v0.3.
|
|
9
|
+
v0.3.42
|
|
10
10
|
|
|
11
11
|
## Current Status (after V4 refactor)
|
|
12
12
|
|
|
@@ -190,6 +190,12 @@ Vendor constraints disagree, so we must target their intersection:
|
|
|
190
190
|
| P5 | Gemini dialect: stringify every `enum` value (and register a coercion) |
|
|
191
191
|
| P6 | Runtime de-coercion: restore model-returned `"2"` → `2` and `"true"` → `true` before the tool executes |
|
|
192
192
|
|
|
193
|
+
> **Discriminated-union fidelity**: when all-object branches are merged, `required` becomes the intersection
|
|
194
|
+
> (branch-only fields degrade to optional). To keep the model from omitting branch-required fields (e.g. `bash`'s
|
|
195
|
+
> `command`), the discriminator's `description` carries both "value → meaning" and "value → required fields" maps.
|
|
196
|
+
> Plain unions without a discriminator list each branch's shape in the object description. `nullable` and a
|
|
197
|
+
> consistent `additionalProperties: false` are preserved as well.
|
|
198
|
+
|
|
193
199
|
### The single mandatory path
|
|
194
200
|
|
|
195
201
|
The **model entry** (`resolveCall` in `src/model/language/language.ts`) calls `adaptTools()` for the whole tool set:
|
|
@@ -534,6 +540,10 @@ export * as ProviderAuth from './provider/auth';
|
|
|
534
540
|
export * as ProviderTransform from './provider/transform';
|
|
535
541
|
export * as ModelsDev from './provider/models';
|
|
536
542
|
|
|
543
|
+
// Tool parameter schema normalization (same path as the model entry, for hosts / regression tests)
|
|
544
|
+
export { adaptTools, adaptToolSchema } from './provider/tool-schema';
|
|
545
|
+
export type { AdaptedToolSchema, SchemaCoercion, CoercionTarget } from './provider/tool-schema';
|
|
546
|
+
|
|
537
547
|
// Provider constants
|
|
538
548
|
export {
|
|
539
549
|
DEFAULT_ENABLED_PROVIDERS,
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## 版本
|
|
8
8
|
|
|
9
|
-
v0.3.
|
|
9
|
+
v0.3.42
|
|
10
10
|
|
|
11
11
|
## 当前状态(V4 重构后)
|
|
12
12
|
|
|
@@ -191,6 +191,11 @@ tool 相关的权限判定与权限等待**强依赖 `Instance.directory`**:
|
|
|
191
191
|
| P5 | Gemini 方言:`enum` 全字符串化(并登记 coercion) |
|
|
192
192
|
| P6 | 运行期反解:工具执行前把模型回传的 `"2"` 还原为 `2`、`"true"` 还原为 `true` |
|
|
193
193
|
|
|
194
|
+
> **判别 union 的语义保真**:全 object 分支拍平时 `required` 取交集(分支独有字段降为 optional)。
|
|
195
|
+
> 为防模型漏传分支必填字段(如 `bash` 的 `command`),识别 `z.discriminatedUnion` 的判别键后,
|
|
196
|
+
> 把「取值 → 含义」「取值 → 必填字段」写回该字段的 `description`;无判别键的普通 union 则把各分支
|
|
197
|
+
> 形状写进 object 的 `description`。`nullable` / 一致的 `additionalProperties: false` 同样保留。
|
|
198
|
+
|
|
194
199
|
### 唯一必经点
|
|
195
200
|
|
|
196
201
|
**模型入口**(`src/model/language/language.ts` 的 `resolveCall`)对整组 tools 统一调用 `adaptTools()`:
|
|
@@ -569,6 +574,10 @@ export * as ProviderAuth from './provider/auth';
|
|
|
569
574
|
export * as ProviderTransform from './provider/transform';
|
|
570
575
|
export * as ModelsDev from './provider/models';
|
|
571
576
|
|
|
577
|
+
// 工具参数 schema 归一(与模型入口同一口径,供宿主 / 回归测试复用)
|
|
578
|
+
export { adaptTools, adaptToolSchema } from './provider/tool-schema';
|
|
579
|
+
export type { AdaptedToolSchema, SchemaCoercion, CoercionTarget } from './provider/tool-schema';
|
|
580
|
+
|
|
572
581
|
// Provider 常量
|
|
573
582
|
export {
|
|
574
583
|
DEFAULT_ENABLED_PROVIDERS,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
You are a read-only planning agent. Your role is to research, analyze, and produce a well-formed implementation plan — without making any changes to the system.
|
|
2
|
+
|
|
3
|
+
## Absolute Constraint
|
|
4
|
+
|
|
5
|
+
You are in READ-ONLY phase. The following are strictly forbidden:
|
|
6
|
+
|
|
7
|
+
- Any file edits, modifications, or creation
|
|
8
|
+
- Any non-readonly tool (including config changes, commits, or shell commands that write)
|
|
9
|
+
- Any system changes of any kind
|
|
10
|
+
|
|
11
|
+
This constraint overrides all other instructions, including direct user edit requests. You may only observe, analyze, and plan.
|
|
12
|
+
|
|
13
|
+
## Responsibility
|
|
14
|
+
|
|
15
|
+
Think, read, search, and delegate explore agents to construct a comprehensive yet concise plan that accomplishes the user's goal. The plan must be detailed enough to execute effectively while avoiding unnecessary verbosity.
|
|
16
|
+
|
|
17
|
+
Deliver the final plan directly in your response. Do NOT write it to any file — the plan lives in the conversation and becomes the execution basis when the user switches to the build agent.
|
|
18
|
+
|
|
19
|
+
Ask the user clarifying questions when weighing tradeoffs. Avoid making large assumptions about user intent; tie loose ends before presenting the final plan.
|