Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/runtime-install.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/runtime-install.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions lib/runtime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/runtime.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/types/runtime-install.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ interface UpstreamManifest {
export declare function bundledUpstreamRoot(): string;
/** Convert one command into a user-facing executable string. */
export declare function displayCommand(command: RuntimeCommand): string;
export declare function isolatedPythonEnvironment(home: string): NodeJS.ProcessEnv;
/** Verify every packaged upstream file against the committed content manifest. */
export declare function verifyBundledUpstream(): Promise<UpstreamManifest>;
/** Persistent per-DSH-home cache root shared by runtime and Web support files. */
Expand Down
2 changes: 1 addition & 1 deletion lib/types/runtime-install.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/types/runtime.d.ts.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/types/upstream.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 4 additions & 18 deletions lib/upstream.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upstream.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
},
"visionToolkit": {
"upstreamRepository": "https://github.com/Anionex/agent-vision-toolkit",
"upstreamVersion": "v0.1.0+snapshot.c27d1a3",
"upstreamCommit": "c27d1a300962b553c0884993c575cd3e819465ce"
"upstreamVersion": "v0.1.0+snapshot.8ccf9d7",
"upstreamCommit": "8ccf9d7d89bc395ad7dd19dde840401a5b84623d"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update external-runtime instructions to the new pin

After changing the packaged upstream commit here, README.md:265 and README.zh.md:265 still instruct external-mode users to check out c27d1a300962b553c0884993c575cd3e819465ce. Because prepareUpstreamRuntime compares the checkout HEAD against the new UPSTREAM_COMMIT and rejects any mismatch (src/runtime-install.ts:659-660), following the documented setup now always produces a runtime error; update both instructions to the new commit.

Useful? React with 👍 / 👎.

}
},
"dependencies": {
Expand Down
10 changes: 6 additions & 4 deletions src/runtime-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function sha256(bytes: string | Buffer): string {
return createHash('sha256').update(bytes).digest('hex')
}

function isolatedPythonEnv(home: string): NodeJS.ProcessEnv {
export function isolatedPythonEnvironment(home: string): NodeJS.ProcessEnv {
return {
HOME: home,
USERPROFILE: home,
Expand All @@ -103,7 +103,9 @@ function isolatedPythonEnv(home: string): NodeJS.ProcessEnv {
PYTHONPATH: undefined,
VIRTUAL_ENV: undefined,
PYTHONDONTWRITEBYTECODE: '1',
PYTHONIOENCODING: 'utf-8',
PYTHONNOUSERSITE: '1',
PYTHONUTF8: '1',
}
}

Expand Down Expand Up @@ -233,7 +235,7 @@ async function pythonMetadata(
let result: CommandResult
try {
result = await runCollected(ctx, [command.program, ...command.prefix, '-c', script], cwd, {
env: isolatedPythonEnv(cwd),
env: isolatedPythonEnvironment(cwd),
})
} catch {
return undefined
Expand Down Expand Up @@ -314,7 +316,7 @@ async function dependencyVersions(
let result: CommandResult
try {
result = await runCollected(ctx, [python.program, ...python.prefix, '-c', script], cwd, {
env: isolatedPythonEnv(cwd),
env: isolatedPythonEnvironment(cwd),
})
} catch (error) {
throw new VisionToolkitError('runtime', `failed to start ${displayCommand(python)}`, { cause: error })
Expand Down Expand Up @@ -494,7 +496,7 @@ async function prepareManaged(

const staging = await mkdtemp(join(parent, '.prepare-'))
const installEnv: NodeJS.ProcessEnv = {
...isolatedPythonEnv(cleanHome),
...isolatedPythonEnvironment(cleanHome),
UV_CACHE_DIR: join(stateRoot, 'uv-cache'),
}
const heartbeat = setInterval(() => {
Expand Down
Loading
Loading