@steerable/agent-shell 0.6.37 → 0.6.38
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.
|
@@ -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.38",
|
|
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/agent-harness": "0.6.
|
|
59
|
-
"@steerable/agent-protocol": "0.6.
|
|
60
|
-
"@steerable/pack-sdk": "0.6.
|
|
58
|
+
"@steerable/agent-harness": "0.6.38",
|
|
59
|
+
"@steerable/agent-protocol": "0.6.38",
|
|
60
|
+
"@steerable/pack-sdk": "0.6.38"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/better-sqlite3": "^7.6.13",
|