@deepseek-ai/dsh-session-title-all-prompts-llm 0.0.1-rc.5

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 ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, DeepSeek
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/session/session-title-all-prompts-llm/README.md
5
+ README.md: cdda77f4bd92b927a156db093d690062ea10d531
6
+ README.zh.md: 25af029ce1002ecffcd40e453213899d8f0b8f31
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @deepseek-ai/dsh-session-title-all-prompts-llm
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ Optional `ctx.sessionTitle` provider that summarizes every eligible human message through `ctx.llm`. It registers the `all-prompts` cadence and starts a new revision after each new human prompt, using seeded history as well as child-session prompts. A newer revision aborts and supersedes older work; even a provider that ignores cancellation cannot commit stale output.
6
+
7
+ The plugin uses the complete required [shared LLM configuration](../session-title-llm/README.md#configuration). Omit both `provider` and `model` to inherit the exact route from each current logged main request, or set both to route title generation independently. If the final framed aggregate prompt exceeds `maxInputBytes`, the request fails instead of truncating history; automatic use warns and keeps the prior title.
8
+
9
+ ## Model Experience
10
+
11
+ ### All-messages title request
12
+
13
+ #### What the model sees
14
+
15
+ The title model receives the shared title instruction and a JSON array of all eligible human messages through the current revision, in log order with exact seqs. Seeded history is included.
16
+
17
+ #### Token effect
18
+
19
+ One auxiliary request may follow every new eligible prompt, bounded per request by `maxInputBytes` and `maxOutputTokens`; explicit refreshes may add calls. The main agent request gains zero tokens.
20
+
21
+ #### KV Cache effect
22
+
23
+ No main-request invalidation. Auxiliary input grows or changes after each prompt, so provider-specific cache reuse ends at the first changed JSON token.
24
+
25
+ ## Known Limitations and Deferred Work
26
+
27
+ - Input overflow retains the prior title; this provider has no summarization-of-summaries or retention policy for very long sessions.
28
+ - It treats all eligible human messages equally and offers no weighting, filtering, or manual-title precedence.
package/README.zh.md ADDED
@@ -0,0 +1,28 @@
1
+ # @deepseek-ai/dsh-session-title-all-prompts-llm
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 可选的 `ctx.sessionTitle` 提供方,通过 `ctx.llm` 总结所有符合条件的用户消息。它注册 `all-prompts` 节奏,并在每条新用户提示词后启动新 revision,同时使用预置历史与子会话提示词。较新的 revision 会中止并取代旧工作;即使提供方忽略取消,也无法提交陈旧输出。
6
+
7
+ 该插件使用完整且必填的[共享 LLM(大语言模型)配置](../session-title-llm/README.md#configuration)。同时省略 `provider` 与 `model` 时,会继承每个当前已记录主请求的确切路由;也可以同时设置二者,使标题生成使用独立路由。如果最终封装的聚合提示词超过 `maxInputBytes`,请求会失败而不是截断历史;自动使用时会发出警告并保留先前标题。
8
+
9
+ ## 模型体验
10
+
11
+ ### 全消息标题请求
12
+
13
+ #### 模型看到的内容
14
+
15
+ 标题模型会收到共享标题指令,以及一个 JSON 数组,其中按日志顺序包含截至当前 revision 的所有符合条件用户消息和确切 seq。预置历史也包含在内。
16
+
17
+ #### Token 影响
18
+
19
+ 每条符合条件的新提示词之后都可能发送一次辅助请求,每次请求受 `maxInputBytes` 和 `maxOutputTokens` 约束;显式刷新可能增加调用。主 agent(智能体)请求不会增加 token。
20
+
21
+ #### KV Cache 影响
22
+
23
+ 不会使主请求的 KV Cache 失效。每条提示词后,辅助输入都会增长或变化,因此提供方专用缓存复用会在第一个变化的 JSON token 处结束。
24
+
25
+ ## 已知限制与暂缓事项
26
+
27
+ - 输入溢出时保留先前标题;对于很长的会话,此提供方没有基于摘要继续生成摘要的机制或保留策略。
28
+ - 它平等对待所有符合条件的用户消息,不提供权重、过滤或手动标题优先级。
package/lib/index.js ADDED
@@ -0,0 +1,30 @@
1
+ import z from "@deepseek-ai/schemastery";
2
+ import { SessionTitleLlmConfigFields, registerSessionTitleLlmProvider } from "@deepseek-ai/dsh-session-title-llm";
3
+ //#region lib/types/index.js
4
+ /** All-human-messages model provider for `ctx.sessionTitle`. */
5
+ const name = "session-title-all-prompts-llm";
6
+ const inject = [
7
+ "sessionTitle",
8
+ "llm",
9
+ "sessions"
10
+ ];
11
+ /** Loader schema shared with the first-prompt provider. */
12
+ const Config = z.object({
13
+ targetWords: SessionTitleLlmConfigFields.targetWords,
14
+ targetCjkCharacters: SessionTitleLlmConfigFields.targetCjkCharacters,
15
+ maxInputBytes: SessionTitleLlmConfigFields.maxInputBytes,
16
+ maxOutputTokens: SessionTitleLlmConfigFields.maxOutputTokens,
17
+ timeoutMs: SessionTitleLlmConfigFields.timeoutMs,
18
+ provider: SessionTitleLlmConfigFields.provider,
19
+ model: SessionTitleLlmConfigFields.model
20
+ });
21
+ /**
22
+ * Register the all-prompts model provider.
23
+ * @param ctx - context exposing session-title, LLM, and session services.
24
+ * @param config - required route, target, byte, token, and timeout policy.
25
+ */
26
+ function apply(ctx, config) {
27
+ registerSessionTitleLlmProvider(ctx, config, name, "all-prompts", (messages) => messages);
28
+ }
29
+ //#endregion
30
+ export { Config, apply, inject, name };
@@ -0,0 +1,23 @@
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned invariant companion for `@deepseek-ai/dsh-session-title-all-prompts-llm`.
4
+ * @module @deepseek-ai/dsh-session-title-all-prompts-llm/invariant
5
+ */
6
+ const PACKAGE_NAME = "@deepseek-ai/dsh-session-title-all-prompts-llm";
7
+ /** Cordis companion plugin name. */
8
+ const name = "session-title-all-prompts-llm-invariant";
9
+ /** Service required before the companion can reserve package ownership. */
10
+ const inject = ["invariants"];
11
+ /**
12
+ * No runtime invariant: this thin provider delegates request and result validation to the shared
13
+ * title service and LLM helper and retains no independent mutable state.
14
+ */
15
+ const install = () => {};
16
+ /**
17
+ * Register this package's invariant companion.
18
+ * @param ctx - Cordis context carrying the invariant service.
19
+ * @returns the installed registration's disposer after setup succeeds.
20
+ */
21
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
22
+ //#endregion
23
+ export { apply, inject, name };
@@ -0,0 +1,17 @@
1
+ /** All-human-messages model provider for `ctx.sessionTitle`. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import z from '@deepseek-ai/schemastery';
4
+ import type { SessionTitleLlmConfig } from '@deepseek-ai/dsh-session-title-llm';
5
+ export declare const name = "session-title-all-prompts-llm";
6
+ export declare const inject: string[];
7
+ /** Required LLM policy; this plugin adds no defaults. */
8
+ export type Config = SessionTitleLlmConfig;
9
+ /** Loader schema shared with the first-prompt provider. */
10
+ export declare const Config: z<Config>;
11
+ /**
12
+ * Register the all-prompts model provider.
13
+ * @param ctx - context exposing session-title, LLM, and session services.
14
+ * @param config - required route, target, byte, token, and timeout policy.
15
+ */
16
+ export declare function apply(ctx: Context, config: Config): void;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for `@deepseek-ai/dsh-session-title-all-prompts-llm`.
3
+ * @module @deepseek-ai/dsh-session-title-all-prompts-llm/invariant
4
+ */
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ /** Cordis companion plugin name. */
7
+ export declare const name = "session-title-all-prompts-llm-invariant";
8
+ /** Service required before the companion can reserve package ownership. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant service.
13
+ * @returns the installed registration's disposer after setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-session-title-all-prompts-llm",
3
+ "description": "All-user-messages LLM provider plugin for DeepSeek Harness session titles",
4
+ "version": "0.0.1-rc.5",
5
+ "publishConfig": {
6
+ "access": "restricted"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/session/session-title-all-prompts-llm"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "lib/index.js",
29
+ "lib/invariant.js",
30
+ "lib/types/**/*.d.ts"
31
+ ],
32
+ "license": "BSD-3-Clause",
33
+ "peerDependencies": {
34
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
35
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
36
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
37
+ "@deepseek-ai/dsh-session-title": "^0.0.1-rc.5",
38
+ "@deepseek-ai/dsh-session-title-llm": "^0.0.1-rc.5",
39
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
40
+ },
41
+ "dependencies": {
42
+ "@deepseek-ai/schemastery": "^3.18.1-rc.4"
43
+ },
44
+ "devDependencies": {
45
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
46
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
47
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
48
+ "@deepseek-ai/dsh-session-title": "^0.0.1-rc.5",
49
+ "@deepseek-ai/dsh-session-title-llm": "^0.0.1-rc.5",
50
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
51
+ }
52
+ }