@sparkelf/dsh-patch-ptc-mcp-schema-types 0.1.0-rc.22 → 0.1.0-rc.26

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write patches/npm/ptc-mcp-schema-types/README.md
5
- README.md: 35431431e166db9a004cd22fd3ec2eeb3b2a4be9
6
- README.zh.md: 0acbda6045cf60a4111e4dfefa77b2531b7d39b9
5
+ README.md: a6e79ebc38ea37d7b252801ddeeee4194d977358
6
+ README.zh.md: b849bddbd6802af079137e1af0d6b612e93e2c87
package/README.md CHANGED
@@ -4,6 +4,6 @@ English | [中文](README.zh.md)
4
4
 
5
5
  This data-only package keeps TypeScript PTC declarations precise when MCP tools advertise JSON Schema draft markers, string length or pattern constraints, and array item-count constraints. The projection omits only those validation keywords while retaining object, array, property, required, and scalar types. Unsupported structural keywords still render as `unknown`.
6
6
 
7
- The ToolRuntime enforced Schema subset remains unchanged, and the MCP server continues to validate the complete original Schema. The target is exact official source revision `d347e703908d0406b7a7ef80e3a0e594d86b2215`.
7
+ The ToolRuntime enforced Schema subset remains unchanged, and the MCP server continues to validate the complete original Schema. The target is exact official source revision `fb2c4b9e698e30edb738bca4cf0618587db7d203`.
8
8
 
9
9
  Retire this package when official DSH projects the same validation-only MCP keywords into PTC declarations without weakening runtime Schema enforcement.
package/README.zh.md CHANGED
@@ -4,6 +4,6 @@
4
4
 
5
5
  该 data-only package 让 MCP 工具带有 JSON Schema draft 标记、字符串长度或正则约束、数组元素数量约束时,TypeScript PTC 声明仍保留精确类型。投影只省略这些校验关键字,对象、数组、属性、必填项与标量类型均保留;不受支持的结构性关键字仍渲染为 `unknown`。
6
6
 
7
- ToolRuntime 强制执行的 Schema 子集保持不变,MCP server 继续校验完整原始 Schema。目标为 exact official source revision `d347e703908d0406b7a7ef80e3a0e594d86b2215`。
7
+ ToolRuntime 强制执行的 Schema 子集保持不变,MCP server 继续校验完整原始 Schema。目标为 exact official source revision `fb2c4b9e698e30edb738bca4cf0618587db7d203`。
8
8
 
9
9
  当 official DSH 能以相同行为把纯校验 MCP 关键字投影为 PTC 声明,且不放松运行时 Schema 校验时,退役该 package。
package/package.json CHANGED
@@ -4,11 +4,11 @@
4
4
  "formatVersion": 1,
5
5
  "variants": [
6
6
  {
7
- "dsh": ">=0.1.3-alpha.1",
7
+ "dsh": ">=0.1.5-rc.2",
8
8
  "file": "./patches/ptc-mcp-schema-types.patch",
9
9
  "id": "ptc-mcp-validation-schema-types",
10
10
  "target": {
11
- "baseRevision": "d347e703908d0406b7a7ef80e3a0e594d86b2215",
11
+ "baseRevision": "fb2c4b9e698e30edb738bca4cf0618587db7d203",
12
12
  "kind": "dsh-source",
13
13
  "paths": [
14
14
  "packages/core/tools/"
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.1.0-rc.22"
34
+ "version": "0.1.0-rc.26"
35
35
  }
@@ -1,41 +1,3 @@
1
- diff --git a/packages/core/tools/README.i18n.yaml b/packages/core/tools/README.i18n.yaml
2
- index feacbdc2e4..e86e7ea531 100644
3
- --- a/packages/core/tools/README.i18n.yaml
4
- +++ b/packages/core/tools/README.i18n.yaml
5
- @@ -2,5 +2,5 @@
6
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
7
- # after editing either side, bring the other along and re-record with:
8
- # pnpm run verify-translation-pairing --write packages/core/tools/README.md
9
- -README.md: f586b926ec9a8e426f48b62e4d03b1661201a76a
10
- -README.zh.md: 5f422dd848ee9a6e8e0afe96d3dd03238ecc3857
11
- +README.md: c4d6ad64f2cc36b295f696262a74ed99ba151859
12
- +README.zh.md: 7f810c335505ff0a34c8f7b4d133880c13a85862
13
- diff --git a/packages/core/tools/README.md b/packages/core/tools/README.md
14
- index f586b926ec..c4d6ad64f2 100644
15
- --- a/packages/core/tools/README.md
16
- +++ b/packages/core/tools/README.md
17
- @@ -168,7 +168,7 @@ Prefix-stable while visible definitions and their order are unchanged. Registrat
18
-
19
- #### What the model sees
20
-
21
- -PTC mode exposes the generated [`run_code` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tools), the SDK instructions below, and the generated exact SDK block for the loaded runtime's language. The TypeScript instructions identify generated declarations as program-only bindings. When the current `bash` parameter schema accepts the example arguments, they also show a complete `run_code` call around `tools.bash(...)`. The `tools:sdk` section uses first-party order 5000. `both` exposes normal schemas and this PTC mode API; under `ptc` the prompt also carries the `tools:ptc-only` rule earlier in the first-party order, so the model reads which tools it may call before it reads what each one is for.
22
- +PTC mode exposes the generated [`run_code` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tools), the SDK instructions below, and the generated exact SDK block for the loaded runtime's language. The TypeScript instructions identify generated declarations as program-only bindings. JSON Schema draft markers plus string length, string pattern, and array item-count constraints remain owned by the tool validator and are omitted only from TypeScript declarations, so an MCP schema retains its object, array, property, required, and scalar types; unsupported structural keywords still render as `unknown`. When the current `bash` parameter schema accepts the example arguments, the instructions also show a complete `run_code` call around `tools.bash(...)`. The `tools:sdk` section uses first-party order 5000. `both` exposes normal schemas and this PTC mode API; under `ptc` the prompt also carries the `tools:ptc-only` rule earlier in the first-party order, so the model reads which tools it may call before it reads what each one is for.
23
-
24
- ##### TypeScript PTC mode SDK instructions with bash
25
-
26
- diff --git a/packages/core/tools/README.zh.md b/packages/core/tools/README.zh.md
27
- index 5f422dd848..7f810c3355 100644
28
- --- a/packages/core/tools/README.zh.md
29
- +++ b/packages/core/tools/README.zh.md
30
- @@ -168,7 +168,7 @@ ctx.tools.register(defineTool({
31
-
32
- #### 模型看到什么
33
-
34
- -PTC mode 会公开生成的 [`run_code` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tools)、下方 SDK 说明,以及按所加载运行时语言生成的精确 SDK 块。TypeScript 说明会把生成声明明确标为只能在程序内使用的绑定。当当前 `bash` 参数 schema 接受示例参数时,说明还会给出以 `run_code` 包住 `tools.bash(...)` 的完整调用。`tools:sdk` 段使用 first-party 顺序 5000。`both` 会同时公开普通 schema 与此 PTC mode API;在 `ptc` 下,提示词还会带上处于更早 first-party 顺序的 `tools:ptc-only` 规则,让模型先读到「可以调用哪些工具」再读「每个工具做什么」。
35
- +PTC mode 会公开生成的 [`run_code` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tools)、下方 SDK 说明,以及按所加载运行时语言生成的精确 SDK 块。TypeScript 说明会把生成声明明确标为只能在程序内使用的绑定。JSON Schema draft 标记、字符串长度与正则约束、数组元素数量约束仍由工具 validator 持有,只在 TypeScript 声明中省略,因此 MCP schema 会保留对象、数组、属性、必填项与标量类型;不受支持的结构性关键字仍渲染为 `unknown`。当当前 `bash` 参数 schema 接受示例参数时,说明还会给出以 `run_code` 包住 `tools.bash(...)` 的完整调用。`tools:sdk` 段使用 first-party 顺序 5000。`both` 会同时公开普通 schema 与此 PTC mode API;在 `ptc` 下,提示词还会带上处于更早 first-party 顺序的 `tools:ptc-only` 规则,让模型先读到「可以调用哪些工具」再读「每个工具做什么」。
36
-
37
- ##### 带 bash 的 TypeScript PTC mode SDK 说明
38
-
39
1
  diff --git a/packages/core/tools/src/json-schema.ts b/packages/core/tools/src/json-schema.ts
40
2
  index c064fb294c..573cdd69c0 100644
41
3
  --- a/packages/core/tools/src/json-schema.ts