dank-ai 1.0.29 → 1.0.31
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/lib/docker/manager.js +7 -19
- package/package.json +1 -1
package/lib/docker/manager.js
CHANGED
|
@@ -1202,9 +1202,11 @@ class DockerManager {
|
|
|
1202
1202
|
//construct full repo name
|
|
1203
1203
|
let repoName;
|
|
1204
1204
|
if(!tagByAgent){
|
|
1205
|
-
|
|
1206
|
-
|
|
1205
|
+
// Per-agent repository: {registry}/{namespace}/{agent-name}
|
|
1206
|
+
const agentRepoName = agent.name.toLowerCase().replace(/[^a-z0-9_.-]/g, '-');
|
|
1207
|
+
repoName = `${registry?`${registry}/`:''}${namespace?`${namespace}/`:''}${agentRepoName}`;
|
|
1207
1208
|
}else{
|
|
1209
|
+
// Common repository: {registry}/{namespace}:agent-name
|
|
1208
1210
|
repoName = `${registry?`${registry}/`:''}${namespace?`${namespace}/`:''}`;
|
|
1209
1211
|
}
|
|
1210
1212
|
|
|
@@ -1245,11 +1247,9 @@ class DockerManager {
|
|
|
1245
1247
|
// Clean up build context
|
|
1246
1248
|
await fs.remove(buildContext);
|
|
1247
1249
|
|
|
1248
|
-
const pushed = push;
|
|
1249
|
-
|
|
1250
1250
|
return {
|
|
1251
1251
|
imageName,
|
|
1252
|
-
pushed,
|
|
1252
|
+
pushed: push,
|
|
1253
1253
|
};
|
|
1254
1254
|
} catch (error) {
|
|
1255
1255
|
throw new Error(`Failed to build production image: ${error.message}`);
|
|
@@ -1611,20 +1611,8 @@ module.exports = {
|
|
|
1611
1611
|
|
|
1612
1612
|
await fs.writeFile(path.join(agentCodeDir, "index.js"), agentCode);
|
|
1613
1613
|
|
|
1614
|
-
//
|
|
1615
|
-
|
|
1616
|
-
__dirname,
|
|
1617
|
-
`../../.agent-${agent.name}-context.tar`
|
|
1618
|
-
);
|
|
1619
|
-
await tar.create(
|
|
1620
|
-
{
|
|
1621
|
-
file: tarPath,
|
|
1622
|
-
cwd: contextDir,
|
|
1623
|
-
},
|
|
1624
|
-
["."]
|
|
1625
|
-
);
|
|
1626
|
-
|
|
1627
|
-
return tarPath;
|
|
1614
|
+
// Return directory path (CLI build commands work with directories directly)
|
|
1615
|
+
return contextDir;
|
|
1628
1616
|
}
|
|
1629
1617
|
|
|
1630
1618
|
/**
|