@deepseek-ai/dsh-tmux-context 0.1.3-alpha.2 → 0.1.5-alpha.2
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 +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/index.js +8 -2
- package/package.json +13 -12
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 packages/context/tmux-context/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 2f00aa4e8f42670bbadba4e2a1777d5b596090b9
|
|
6
|
+
README.zh.md: 06743d57d6332401fcb65bf00e6c23bf0ec7eec2
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-tmux-context`
|
|
12
|
+
`dsh-tmux-context` lets the model identify the tmux session, window, pane, and pane-tree layout containing its agent process. It adds a durable, source-attributed reading on the first step of a turn only when that location changed. Terminals that merely inherit tmux environment variables without running in the named pane add nothing; failed queries also add nothing and do not fail the turn. This package is opt-in and is not included in the shipped Web or headless profiles.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-tmux-context`
|
|
12
|
+
`dsh-tmux-context` 让模型识别其 agent(智能体)进程所在的 tmux session、window、pane 和 pane 树布局。它仅在位置发生变化时,于每轮的第一个步骤追加一条持久、带来源的读数。若终端只继承了 tmux 环境变量,却并未在所指名的 pane 中运行,则不添加任何内容;查询失败同样不添加内容,也不会使该轮失败。本包需主动启用,且不包含在随附的 Web 或无头 profile 中。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
package/lib/index.js
CHANGED
|
@@ -521,11 +521,13 @@ function contentHasImage(content) {
|
|
|
521
521
|
/**
|
|
522
522
|
* True when typed model content contains a file block, walking nested
|
|
523
523
|
* tool-result content on the same recursion every file policy shares.
|
|
524
|
+
* Reads current content on every call without retaining scan results.
|
|
524
525
|
* @param content - typed model content blocks.
|
|
525
526
|
* @returns whether any nested block is a file.
|
|
526
527
|
*/
|
|
527
528
|
function contentHasFile(content) {
|
|
528
|
-
|
|
529
|
+
for (const block of content) if (block.type === "file" || block.type === "tool-result" && contentHasFile(block.content)) return true;
|
|
530
|
+
return false;
|
|
529
531
|
}
|
|
530
532
|
/**
|
|
531
533
|
* Stable model-facing handle for one durable file reference: the address of
|
|
@@ -1080,6 +1082,8 @@ var LlmError = class extends HarnessError {
|
|
|
1080
1082
|
const context = resolved.context;
|
|
1081
1083
|
if (context !== void 0 && (!Number.isInteger(context.contextWindow) || context.contextWindow <= 0)) throw new LlmError(`adapter returned invalid context metadata for provider "${provider}" model "${model}"`, "INVALID_MODEL_CONTEXT");
|
|
1082
1084
|
const inputModalities = this.detachedModalities(resolved.inputModalities);
|
|
1085
|
+
const systemPromptUpdate = resolved.systemPromptUpdate;
|
|
1086
|
+
if (systemPromptUpdate !== void 0 && systemPromptUpdate !== "in-history") throw new LlmError(`adapter returned invalid system prompt update mode for provider "${provider}" model "${model}"`, "INVALID_MODEL_INFO");
|
|
1083
1087
|
const defaultMaxTokens = resolved.defaultMaxTokens;
|
|
1084
1088
|
if (defaultMaxTokens !== void 0 && (!Number.isSafeInteger(defaultMaxTokens) || defaultMaxTokens <= 0)) throw new LlmError(`adapter returned invalid default maxTokens for provider "${provider}" model "${model}"`, "INVALID_MODEL_MAX_TOKENS");
|
|
1085
1089
|
const info = {
|
|
@@ -1089,7 +1093,8 @@ var LlmError = class extends HarnessError {
|
|
|
1089
1093
|
...resolved.description === void 0 ? {} : { description: resolved.description },
|
|
1090
1094
|
...inputModalities === void 0 ? {} : { inputModalities },
|
|
1091
1095
|
...context === void 0 ? {} : { context: { contextWindow: context.contextWindow } },
|
|
1092
|
-
...defaultMaxTokens === void 0 ? {} : { defaultMaxTokens }
|
|
1096
|
+
...defaultMaxTokens === void 0 ? {} : { defaultMaxTokens },
|
|
1097
|
+
...resolved.systemPromptUpdate === void 0 ? {} : { systemPromptUpdate: resolved.systemPromptUpdate }
|
|
1093
1098
|
};
|
|
1094
1099
|
const reasoning = resolved.reasoning;
|
|
1095
1100
|
if (reasoning === void 0) return info;
|
|
@@ -1183,6 +1188,7 @@ var LlmError = class extends HarnessError {
|
|
|
1183
1188
|
adapterDefaults,
|
|
1184
1189
|
...context === void 0 ? {} : { context },
|
|
1185
1190
|
...modelInfo.inputModalities === void 0 ? {} : { inputModalities: Object.freeze([...modelInfo.inputModalities]) },
|
|
1191
|
+
...modelInfo.systemPromptUpdate === void 0 ? {} : { systemPromptUpdate: modelInfo.systemPromptUpdate },
|
|
1186
1192
|
stream: (options) => {
|
|
1187
1193
|
if (dispatched) throw new LlmError("a prepared LLM call can only be dispatched once", "INVALID_PREPARED_CALL");
|
|
1188
1194
|
if (!callConfigEquals(options, resolvedConfig)) throw new LlmError("prepared LLM call config changed before adapter dispatch", "INVALID_PREPARED_CALL");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tmux-context",
|
|
3
3
|
"description": "Opt-in durable per-step context with this agent's tmux pane and window location",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,19 +31,20 @@
|
|
|
31
31
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
35
|
-
"@deepseek-ai/dsh-shell": "^0.1.
|
|
36
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
34
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
|
|
35
|
+
"@deepseek-ai/dsh-shell": "^0.1.5-alpha.2",
|
|
36
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
38
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
38
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.5-alpha.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
42
|
-
"@deepseek-ai/dsh-shell": "^0.1.
|
|
43
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/cordis": "^4.0.2"
|
|
41
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.5-alpha.2",
|
|
42
|
+
"@deepseek-ai/dsh-shell": "^0.1.5-alpha.2",
|
|
43
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
|
|
44
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
45
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
|
|
46
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-alpha.2",
|
|
47
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
48
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.5-alpha.2"
|
|
48
49
|
}
|
|
49
50
|
}
|