billion-context-dsh 0.2.13 → 0.2.14

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  [English](./README.en.md) | [中文](./README.md)
4
4
 
5
5
  > **⚠️ Beta notice — not for production use**
6
- > This project (**v0.2.13**) is a work-in-progress beta. The [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) itself is also in **public beta**. **Do not use either in engineering / production environments** — expect breaking changes and rough edges.
6
+ > This project (**v0.2.14**) is a work-in-progress beta. The [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) itself is also in **public beta**. **Do not use either in engineering / production environments** — expect breaking changes and rough edges.
7
7
 
8
8
  <p align="center">
9
9
  <strong>Built with gratitude on top of these projects</strong> — please give them a ⭐:
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [中文](./README.md) | [English](./README.en.md)
4
4
 
5
5
  > **⚠️ 测试版声明——请勿用于生产环境**
6
- > 本项目(**v0.2.13**)仍处于开发中的测试版。[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 本身也处于**公开测试版**阶段。**请勿将两者用于工程化 / 生产环境**——预期会有破坏性变更与粗糙之处。
6
+ > 本项目(**v0.2.14**)仍处于开发中的测试版。[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 本身也处于**公开测试版**阶段。**请勿将两者用于工程化 / 生产环境**——预期会有破坏性变更与粗糙之处。
7
7
 
8
8
  <p align="center">
9
9
  <strong>衷心感谢以下项目——请给它们一个 ⭐:</strong>
package/dist/index.js CHANGED
@@ -3502,7 +3502,7 @@ var AcpStateStore = class {
3502
3502
  };
3503
3503
 
3504
3504
  // src/tools.ts
3505
- import { defineTool } from "@deepseek-ai/dsh-tools";
3505
+ import { defineTool, ToolArgsError } from "@deepseek-ai/dsh-tools";
3506
3506
 
3507
3507
  // src/config.ts
3508
3508
  function kernelConfigFor(input) {
@@ -3855,6 +3855,16 @@ var compressParameters = {
3855
3855
  // intentionally NOT `required: true` — a required property would reject the
3856
3856
  // wrapped shape before `handleCompress` can see it. The tool description
3857
3857
  // still tells the model content is mandatory.
3858
+ //
3859
+ // The items fields are the opposite case: startSeq/endSeq/summary MUST be
3860
+ // `required: true`. Without that, a model call that omits `summary` (only
3861
+ // startSeq/endSeq/topic present) passed schema validation and failed late
3862
+ // inside the kernel with "Summary is empty" — and live sessions showed the
3863
+ // model retrying the identical broken call in a loop. With the fields
3864
+ // required, the same call is rejected at the schema gate with
3865
+ // `missing required property "content[0].summary"`, which tells the model
3866
+ // exactly which field to add (same pattern as decompress's required
3867
+ // blockId / search_context's required query).
3858
3868
  arguments: { type: "json", description: "Tolerated wrapped-arguments form (model-generated); unwrapped in handleCompress. Prefer passing content directly." },
3859
3869
  topic: { type: "string", description: "Fallback topic for entries without their own." },
3860
3870
  content: {
@@ -3864,18 +3874,20 @@ var compressParameters = {
3864
3874
  type: "object",
3865
3875
  properties: {
3866
3876
  startSeq: {
3877
+ required: true,
3867
3878
  oneOf: [
3868
3879
  { type: "integer", description: "First surface seq of the range." },
3869
3880
  { type: "string", description: "Seq as text; a trailing #callId fragment is ignored." }
3870
3881
  ]
3871
3882
  },
3872
3883
  endSeq: {
3884
+ required: true,
3873
3885
  oneOf: [
3874
3886
  { type: "integer", description: "Inclusive last surface seq of the range." },
3875
3887
  { type: "string", description: "Seq as text; a trailing #callId fragment is ignored." }
3876
3888
  ]
3877
3889
  },
3878
- summary: { type: "string", description: "Complete technical summary replacing the range; keep paths, decisions, values verbatim. Minimum 50 characters." },
3890
+ summary: { type: "string", required: true, description: "Complete technical summary replacing the range; keep paths, decisions, values verbatim. Minimum 50 characters." },
3879
3891
  topic: { type: "string", description: "Short label (3-5 words) for this range." }
3880
3892
  },
3881
3893
  additionalProperties: false
@@ -3946,6 +3958,18 @@ function unwrapEnvelope(args) {
3946
3958
  if (typeof inner !== "object" || inner === null || Array.isArray(inner)) return args;
3947
3959
  return { ...args, ...inner };
3948
3960
  }
3961
+ function validateContentItems(content) {
3962
+ const violations = [];
3963
+ content.forEach((item, index) => {
3964
+ const path = `content[${index}]`;
3965
+ if (item.startSeq === void 0) violations.push(`missing required property "${path}.startSeq"`);
3966
+ if (item.endSeq === void 0) violations.push(`missing required property "${path}.endSeq"`);
3967
+ if (typeof item.summary !== "string" || item.summary.trim().length === 0) {
3968
+ violations.push(`missing required property "${path}.summary"`);
3969
+ }
3970
+ });
3971
+ if (violations.length > 0) throw new ToolArgsError(violations);
3972
+ }
3949
3973
  async function handleCompress(env, args, exec) {
3950
3974
  const agent = requireAgent(exec);
3951
3975
  const session = agent.session;
@@ -3967,6 +3991,7 @@ async function handleCompress(env, args, exec) {
3967
3991
  };
3968
3992
  }
3969
3993
  args = unwrapped;
3994
+ validateContentItems(args.content);
3970
3995
  const ranges = [];
3971
3996
  const alreadyCompressedNotes = [];
3972
3997
  for (const range of args.content) {