@the-open-engine/zeroshot 6.23.0 → 6.24.0
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/docker/zeroshot-cluster/Dockerfile +7 -0
- package/lib/agent-cli-provider/omp-release.d.ts +3 -0
- package/lib/agent-cli-provider/omp-release.d.ts.map +1 -1
- package/lib/agent-cli-provider/omp-release.js +20 -1
- package/lib/agent-cli-provider/omp-release.js.map +1 -1
- package/lib/agent-cli-provider/provider-registry.d.ts +19 -7
- package/lib/agent-cli-provider/provider-registry.d.ts.map +1 -1
- package/lib/agent-cli-provider/provider-registry.js +49 -8
- package/lib/agent-cli-provider/provider-registry.js.map +1 -1
- package/lib/docker-config.js +122 -5
- package/package.json +2 -2
- package/src/agent/agent-lifecycle.js +12 -1
- package/src/agent/provider-session.js +1 -0
- package/src/agent-cli-provider/omp-release.ts +26 -0
- package/src/agent-cli-provider/provider-registry.ts +95 -19
- package/src/isolation-manager.js +535 -89
- package/src/orchestrator.js +11 -1
- package/src/preflight.js +15 -2
package/src/orchestrator.js
CHANGED
|
@@ -1836,12 +1836,18 @@ class Orchestrator {
|
|
|
1836
1836
|
throw new Error('Docker is not available. Install Docker to use --docker mode.');
|
|
1837
1837
|
}
|
|
1838
1838
|
|
|
1839
|
+
// Pre-effect platform probe: fail before any workspace/container side effect when the
|
|
1840
|
+
// Docker engine cannot run the provider's registry-owned platform (e.g. OMP's linux/amd64).
|
|
1841
|
+
const platform = IsolationManager.providerDockerPlatform(providerName);
|
|
1842
|
+
IsolationManager.assertPlatformSupported(platform);
|
|
1843
|
+
|
|
1839
1844
|
const baseImage = options.isolationImage || 'zeroshot-cluster-base';
|
|
1840
1845
|
const image = IsolationManager.imageForProvider(providerName, baseImage);
|
|
1841
1846
|
await IsolationManager.ensureImage(
|
|
1842
1847
|
image,
|
|
1843
1848
|
true,
|
|
1844
|
-
IsolationManager.providerBuildArgs(providerName)
|
|
1849
|
+
IsolationManager.providerBuildArgs(providerName, options.containerHome || '/home/node'),
|
|
1850
|
+
platform
|
|
1845
1851
|
);
|
|
1846
1852
|
isolationImage = image;
|
|
1847
1853
|
|
|
@@ -1856,6 +1862,7 @@ class Orchestrator {
|
|
|
1856
1862
|
mounts: options.mounts,
|
|
1857
1863
|
containerHome: options.containerHome,
|
|
1858
1864
|
provider: providerName,
|
|
1865
|
+
platform,
|
|
1859
1866
|
});
|
|
1860
1867
|
this._log(`[Orchestrator] Container created: ${containerId} (workDir: ${workDir})`);
|
|
1861
1868
|
} else if (options.worktree) {
|
|
@@ -2848,11 +2855,14 @@ class Orchestrator {
|
|
|
2848
2855
|
}
|
|
2849
2856
|
|
|
2850
2857
|
const providerName = this._resolveClusterProvider(cluster.config);
|
|
2858
|
+
const platform = IsolationManager.providerDockerPlatform(providerName);
|
|
2859
|
+
IsolationManager.assertPlatformSupported(platform);
|
|
2851
2860
|
const newContainerId = await cluster.isolation.manager.createContainer(clusterId, {
|
|
2852
2861
|
workDir,
|
|
2853
2862
|
image: cluster.isolation.image,
|
|
2854
2863
|
reuseExistingWorkspace: true,
|
|
2855
2864
|
provider: providerName,
|
|
2865
|
+
platform,
|
|
2856
2866
|
});
|
|
2857
2867
|
|
|
2858
2868
|
this._log(`[Orchestrator] New container created: ${newContainerId}`);
|
package/src/preflight.js
CHANGED
|
@@ -551,7 +551,7 @@ function validateGhRequirement() {
|
|
|
551
551
|
return errors;
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
function validateDockerRequirement() {
|
|
554
|
+
function validateDockerRequirement(providerName) {
|
|
555
555
|
const errors = [];
|
|
556
556
|
const docker = checkDocker();
|
|
557
557
|
if (!docker.available) {
|
|
@@ -567,6 +567,19 @@ function validateDockerRequirement() {
|
|
|
567
567
|
]
|
|
568
568
|
)
|
|
569
569
|
);
|
|
570
|
+
return errors;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
try {
|
|
574
|
+
const IsolationManager = require('./isolation-manager');
|
|
575
|
+
IsolationManager.assertPlatformSupported(IsolationManager.providerDockerPlatform(providerName));
|
|
576
|
+
} catch (err) {
|
|
577
|
+
errors.push(
|
|
578
|
+
formatError('Docker cannot run required platform', err.message, [
|
|
579
|
+
'Install Buildx and run: docker run --privileged --rm tonistiigi/binfmt --install amd64',
|
|
580
|
+
'Or run Zeroshot on a native amd64 Docker host',
|
|
581
|
+
])
|
|
582
|
+
);
|
|
570
583
|
}
|
|
571
584
|
|
|
572
585
|
return errors;
|
|
@@ -732,7 +745,7 @@ async function runPreflight(options = {}) {
|
|
|
732
745
|
|
|
733
746
|
// 6. Check Docker (if required)
|
|
734
747
|
if (options.requireDocker) {
|
|
735
|
-
errors.push(...validateDockerRequirement());
|
|
748
|
+
errors.push(...validateDockerRequirement(providerName));
|
|
736
749
|
}
|
|
737
750
|
|
|
738
751
|
// 7. Check git repo (if required for worktree isolation)
|