{"_id":"@buddhilive/dsh-session-title-all-prompts-llm","name":"@buddhilive/dsh-session-title-all-prompts-llm","dist-tags":{"alpha":"0.1.2-alpha.3","latest":"0.1.2-alpha.3"},"versions":{"0.1.2-alpha.3":{"name":"@buddhilive/dsh-session-title-all-prompts-llm","description":"All-user-messages LLM provider plugin for DeepSeek Harness session titles","version":"0.1.2-alpha.3","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Buddhilive/buddhi-ai-harness.git","directory":"packages/session/session-title-all-prompts-llm"},"type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@buddhilive/dsh-invariants":"^0.1.2-alpha.3","@buddhilive/dsh-llm":"^0.1.2-alpha.3","@buddhilive/dsh-session":"^0.1.2-alpha.3","@buddhilive/dsh-session-title":"^0.1.2-alpha.3","@buddhilive/dsh-session-title-llm":"^0.1.2-alpha.3","@deepseek-ai/cordis":"^4.0.2"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.2"},"devDependencies":{"@buddhilive/dsh-invariants":"^0.1.2-alpha.3","@buddhilive/dsh-session":"^0.1.2-alpha.3","@buddhilive/dsh-llm":"^0.1.2-alpha.3","@buddhilive/dsh-session-title":"^0.1.2-alpha.3","@buddhilive/dsh-session-title-llm":"^0.1.2-alpha.3","@buddhilive/dsh-session-projection":"^0.1.2-alpha.3","@buddhilive/dsh-agent-loop":"^0.1.2-alpha.3","@deepseek-ai/cordis":"^4.0.2"},"_id":"@buddhilive/dsh-session-title-all-prompts-llm@0.1.2-alpha.3","bugs":{"url":"https://github.com/Buddhilive/buddhi-ai-harness/issues"},"homepage":"https://github.com/Buddhilive/buddhi-ai-harness#readme","_integrity":"sha512-fLDmTTg+X1c2y20lpT07pxv2rE/KLTow7M2NZEQ4dk8Fg1JMB0hS54tuL86Jh7IqPwtdBnVCVMUpJAICDr2pJg==","_resolved":"C:\\DevDojo\\Buddhi\\buddhi-ai-harness\\dist\\npm\\buddhilive-dsh-session-title-all-prompts-llm-0.1.2-alpha.3.tgz","_from":"file:C:/DevDojo/Buddhi/buddhi-ai-harness/dist/npm/buddhilive-dsh-session-title-all-prompts-llm-0.1.2-alpha.3.tgz","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-fLDmTTg+X1c2y20lpT07pxv2rE/KLTow7M2NZEQ4dk8Fg1JMB0hS54tuL86Jh7IqPwtdBnVCVMUpJAICDr2pJg==","shasum":"a2259fd2538083e6fd8de554ad5b7dae425d9d94","tarball":"https://registry.npmjs.org/@buddhilive/dsh-session-title-all-prompts-llm/-/dsh-session-title-all-prompts-llm-0.1.2-alpha.3.tgz","fileCount":9,"unpackedSize":18562,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDqNeFN/8DkcAeLtWkPbA8szQaa2hVt2sXiAG+RpOfDdgIgLRgyLcOK2pzbx+p2lC3sU9CcaEfJgLUpCoBSrWYut3s="}]},"_npmUser":{"name":"buddhilive","email":"visitbudkavin@gmail.com"},"directories":{},"maintainers":[{"name":"buddhilive","email":"visitbudkavin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-session-title-all-prompts-llm_0.1.2-alpha.3_1788166718441_0.23117260326669253"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-31T08:58:38.219Z","0.1.2-alpha.3":"2026-08-31T08:58:38.573Z","modified":"2026-08-31T08:58:38.797Z"},"maintainers":[{"name":"buddhilive","email":"visitbudkavin@gmail.com"}],"description":"All-user-messages LLM provider plugin for DeepSeek Harness session titles","homepage":"https://github.com/Buddhilive/buddhi-ai-harness#readme","repository":{"type":"git","url":"git+https://github.com/Buddhilive/buddhi-ai-harness.git","directory":"packages/session/session-title-all-prompts-llm"},"bugs":{"url":"https://github.com/Buddhilive/buddhi-ai-harness/issues"},"license":"MIT","readme":"---\ndescription: \"面向用户与维护者的全消息 LLM 会话标题提供方说明，用于选择标题策略或排查自动标题生成。\"\nkind: \"package-reference\"\n---\n\n# @buddhilive/dsh-session-title-all-prompts-llm\n\n[English](README.md) | 中文\n\n## 概述\n\n`dsh-session-title-all-prompts-llm` 作为可选的 `ctx.sessionTitle` 提供方，通过 `ctx.llm` 总结所有符合条件的用户消息。它注册 `all-prompts` 节奏，并在每条新用户提示词后启动新修订，使用预置历史与子会话提示词。较新的修订会中止并取代旧工作，即使提供方忽略取消，也无法提交陈旧输出。它使用 `dsh-session-title-llm` 的完整必填共享 LLM 配置，因此路由、提示词、预算与取消行为不会漂移。自动行为与配置在前；实现是对共享策略的薄注册。\n\n## 目录\n\n- [使用本包](#use-this-package)\n- [理解实现](#understand-the-implementation)\n- [进一步探索](#further-exploration)\n- [模型体验](#model-experience)\n- [已知限制与延期工作](#known-limitations-and-deferred-work)\n- [开发备注](#dev-note)\n\n-----\n\n<a id=\"use-this-package\"></a>\n## 使用本包\n\n当会话应随其增长而重新生成标题、使标题持续代表整个对话时，在标题服务旁挂载此插件。它要求完整的[共享 LLM 配置](../session-title-llm/README.zh.md#configuration)，且无默认值。\n\n### 标题生成时机\n\n每条新的符合条件用户提示词之后都会启动新修订，包括子会话中的提示词；生成会折叠截至当前修订的所有符合条件消息，预置历史也包含在内。较新的修订会中止并取代旧工作，因此陈旧的完成结果永远无法提交。自动失败——包括输入超过 `maxInputBytes`（此时请求失败而非截断历史）——会发出警告并保留先前标题；`ctx.sessionTitle.refresh()` 是显式重试。\n\n### 配置\n\n插件接受完整必填的[共享 LLM 配置](../session-title-llm/README.zh.md#configuration)：`targetWords`、`targetCjkCharacters`、`maxInputBytes`、`maxOutputTokens`、`timeoutMs`，以及可选成对的 `provider`/`model` 路由。同时省略二者，会继承每个当前已记录主请求的确切路由；同时设置二者，则让标题生成使用独立路由。生成的[配置目录](../../../docs/config-catalog.zh.md#buddhilivedsh-session-title-all-prompts-llm)是每个受支持字段的穷尽式真源。\n\n### 失败与恢复\n\n如果最终封装的聚合提示词超过 `maxInputBytes`，请求会失败而不是截断历史；自动使用时会发出警告并保留先前标题，只有显式 `refresh()` 会重试。自动工作不会为主 agent 请求增加 token 或延迟。\n\n-----\n\n<a id=\"understand-the-implementation\"></a>\n## 理解实现\n\n<details>\n<summary>实现细节——点击展开</summary>\n\n本节解释插件形态；可观察行为已在[使用本包](#use-this-package)中完整说明。\n\n### 设计理念\n\n一个薄提供方插件：它注册 `all-prompts` 节奏，用恒等选择器选取所有符合条件消息，其余全部委托给[共享 LLM 策略](../session-title-llm/README.zh.md)。\n\n### 源码地图\n\n| 文件 | 职责 |\n|---|---|\n| [`src/index.ts`](src/index.ts) | 插件入口：共享配置 schema、以全消息选择器注册提供方 |\n\n### 调度\n\n标题服务负责调度自动工作：对 `all-prompts` 节奏，每条新的符合条件用户消息都会启动一个修订，较新的修订会取代旧工作；提供方调用在确切主请求路由被记录后才开始。\n\n</details>\n\n-----\n\n<a id=\"further-exploration\"></a>\n## 进一步探索\n\n当提供方约定不够用时阅读以下页面。它们从共享策略逐步进入替代节奏与它所插入的服务。\n\n- [共享 LLM 标题策略](../session-title-llm/README.zh.md)——此提供方使用的生成辅助模块。\n- [首消息标题提供方](../session-title-first-prompt-llm/README.zh.md)——只根据首条提示词为会话生成一次标题的节奏。\n- [会话标题服务](../session-title/README.zh.md)——回退行为、重命名、刷新与提供方注册。\n- [会话包映射](../README.zh.md)——相邻的持久化、投影、标题与遥测包。\n\n-----\n\n<a id=\"model-experience\"></a>\n## 模型体验\n\n### 全消息标题请求\n\n#### 模型看到什么\n\n标题模型会收到共享标题指令，以及一个 JSON 数组，其中按日志顺序包含截至当前修订的所有符合条件用户消息和确切 seq。预置历史也包含在内。\n\n#### Token 影响\n\n每条符合条件的新提示词之后都可能发出一次辅助请求，每次请求受 `maxInputBytes` 与 `maxOutputTokens` 约束；显式刷新可能增加调用。主 agent 请求不会增加 token。\n\n#### KV Cache 影响\n\n不会使主请求的 KV Cache 失效。每条提示词后，辅助输入都会增长或变化，因此提供方专用缓存复用会在第一个变化的 JSON token 处结束。\n\n## 已知限制与延期工作\n\n<a id=\"known-limitations-and-deferred-work\"></a>\n\n\n这些限制说明提供方如何对待长会话与异构会话。它们是当前包约束。\n\n- **没有基于摘要继续生成摘要的机制**——输入溢出时保留先前标题；对于很长的会话，此提供方没有基于摘要继续生成摘要的机制或保留策略。\n- **消息被平等对待**——它平等对待所有符合条件的用户消息，不提供权重、过滤或手动标题优先级。\n\n<a id=\"dev-note\"></a>\n### 开发备注\n\n<details>\n<summary>维护者的工作上下文——点击展开</summary>\n\n无。\n\n</details>\n","readmeFilename":"README.zh.md","_rev":"1-ef7ba730bf2941825c311d1bb19e7408"}