@steerable/agent-shell 0.6.37 → 0.6.39
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.
|
@@ -2439,7 +2439,7 @@ export class LocalBackendRouter {
|
|
|
2439
2439
|
`如确需读取项目外的文件,可请用户在项目里附加为源文件夹。\n` +
|
|
2440
2440
|
`例外:本会话的用户上传附件目录 ${chatAttachmentsDirPath(chatId)} 也在项目家目录外,` +
|
|
2441
2441
|
`但它已作为**只读放行根**开放给 local_read_file(用绝对路径可直接读取,不会被项目围栏拒绝)。` +
|
|
2442
|
-
`用户附到本条消息的文件都放在那里;需要转换(docx / pdf / xlsx / pptx 等)时,` +
|
|
2442
|
+
/* shell-neutral:allow generic document extensions, not product identity */ `用户附到本条消息的文件都放在那里;需要转换(docx / pdf / xlsx / pptx 等)时,` +
|
|
2443
2443
|
`把该绝对路径交给 local_exec_shell 的转换脚本处理即可,**不要**因为它在项目家目录外就拒绝读取或要求用户重新拷贝。`;
|
|
2444
2444
|
// W6-5 + W6-7a:项目级规则文件(AGENTS.md / CLAUDE.md)是不可信输入,
|
|
2445
2445
|
// 仅在用户显式信任该项目后才注入模型上下文——未信任一律不读取、不注入
|
|
@@ -85,7 +85,7 @@ export declare function egressBinaryCacheDir(platform?: NodeJS.Platform, env?: N
|
|
|
85
85
|
* 被截断或替换的文件不会被执行。
|
|
86
86
|
*/
|
|
87
87
|
export declare function verifiedCachedEgress(cacheDir: string, version: string, target: string): string | null;
|
|
88
|
-
/** Download the
|
|
88
|
+
/** Download the artifact-lock egress binary. Returns the printed path, or null. */
|
|
89
89
|
export declare function downloadPublishedEgress(repoRoot: string, cacheDir: string): Promise<string | null>;
|
|
90
90
|
/**
|
|
91
91
|
* Env override, then a locally built private binary, then a cached copy
|
|
@@ -105,14 +105,22 @@ function hostEgressTarget() {
|
|
|
105
105
|
return process.arch === 'x64' ? 'linux-x64' : null;
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function artifactVersion(repoRoot) {
|
|
109
109
|
try {
|
|
110
|
-
const
|
|
111
|
-
|
|
110
|
+
const lock = JSON.parse(readFileSync(path.join(repoRoot, 'rust-artifacts.lock.json'), 'utf8'));
|
|
111
|
+
if (lock.compatibility?.egressCli !== 1)
|
|
112
|
+
return null;
|
|
113
|
+
return typeof lock.artifactVersion === 'string' ? lock.artifactVersion : null;
|
|
112
114
|
}
|
|
113
115
|
catch {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
try {
|
|
117
|
+
const manifest = readFileSync(path.join(repoRoot, 'rust-artifacts.toml'), 'utf8');
|
|
118
|
+
return manifest.match(/\[artifacts\][\s\S]*?\nversion\s*=\s*"([^"]+)"/)?.[1] ?? null;
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
// 读不到 artifact 版本就无法安全定位缓存文件。
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
/**
|
|
@@ -130,13 +138,13 @@ export function verifiedCachedEgress(cacheDir, version, target) {
|
|
|
130
138
|
return expected && expected === actual ? binary : null;
|
|
131
139
|
}
|
|
132
140
|
const EGRESS_DOWNLOAD_TIMEOUT_MS = 60_000;
|
|
133
|
-
/** Download the
|
|
141
|
+
/** Download the artifact-lock egress binary. Returns the printed path, or null. */
|
|
134
142
|
export function downloadPublishedEgress(repoRoot, cacheDir) {
|
|
135
143
|
const script = path.join(repoRoot, 'scripts', 'fetch_verified_artifacts.py');
|
|
136
144
|
// 与 sidecar 同一解释器:系统 python3 可能不带 SSL,下载不了 https。
|
|
137
145
|
const python = resolveSidecarPython();
|
|
138
146
|
return new Promise((resolve) => {
|
|
139
|
-
const child = spawn(python, [script, 'egress', '--
|
|
147
|
+
const child = spawn(python, [script, 'egress', '--artifact-lock', '--target', 'host', '--out', cacheDir], {
|
|
140
148
|
cwd: repoRoot,
|
|
141
149
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
142
150
|
});
|
|
@@ -175,7 +183,7 @@ export async function ensureEgressProxyExecutable(startDir, download = downloadP
|
|
|
175
183
|
const built = localBuiltEgress(repoRoot);
|
|
176
184
|
if (built)
|
|
177
185
|
return built;
|
|
178
|
-
const version =
|
|
186
|
+
const version = artifactVersion(repoRoot);
|
|
179
187
|
const target = hostEgressTarget();
|
|
180
188
|
if (!version || !target)
|
|
181
189
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steerable/agent-shell",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.39",
|
|
4
4
|
"description": "Steerable framework — product-neutral desktop/headless agent host (Tier 5). Electron main + preload + headless HTTP server (BS) sharing one storage/sidecar/tooling core; scenario packs extend it through the @steerable/pack-sdk contract and are composed at build time by the consuming product.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://steerableframework.com/",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"he": "^1.2.0",
|
|
56
56
|
"node-pty": "^1.1.0",
|
|
57
57
|
"semver": "^7.8.0",
|
|
58
|
-
"@steerable/
|
|
59
|
-
"@steerable/agent-protocol": "0.6.
|
|
60
|
-
"@steerable/
|
|
58
|
+
"@steerable/pack-sdk": "0.6.39",
|
|
59
|
+
"@steerable/agent-protocol": "0.6.39",
|
|
60
|
+
"@steerable/agent-harness": "0.6.39"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/better-sqlite3": "^7.6.13",
|