@lightcone-ai/daemon 0.14.5 → 0.14.7
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/package.json +1 -1
- package/src/agent-manager.js +13 -2
package/package.json
CHANGED
package/src/agent-manager.js
CHANGED
|
@@ -1025,7 +1025,7 @@ export class AgentManager {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
1027
|
async _postInternalPublishJobComplete({ jobId, ok, result, error }) {
|
|
1028
|
-
const url = `${this.serverUrl.replace(/\/$/, '')}/internal/publish-jobs/${encodeURIComponent(jobId)}/complete`;
|
|
1028
|
+
const url = `${this.serverUrl.replace(/\/$/, '')}/internal/agent/publish-jobs/${encodeURIComponent(jobId)}/complete`;
|
|
1029
1029
|
const res = await fetch(url, {
|
|
1030
1030
|
method: 'POST',
|
|
1031
1031
|
headers: {
|
|
@@ -1041,6 +1041,10 @@ export class AgentManager {
|
|
|
1041
1041
|
return res.json();
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
|
+
async _runPublishJob(args) {
|
|
1045
|
+
return runPublishJob(args);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1044
1048
|
async _handlePublishJob(msg, connection) {
|
|
1045
1049
|
const job = normalizeObject(msg.job);
|
|
1046
1050
|
const jobId = String(job.id ?? '').trim();
|
|
@@ -1053,6 +1057,13 @@ export class AgentManager {
|
|
|
1053
1057
|
return;
|
|
1054
1058
|
}
|
|
1055
1059
|
|
|
1060
|
+
connection.send({
|
|
1061
|
+
type: 'publish:job_received',
|
|
1062
|
+
job_id: jobId,
|
|
1063
|
+
action_id: actionId,
|
|
1064
|
+
received_at: new Date().toISOString(),
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1056
1067
|
connection.send({
|
|
1057
1068
|
type: 'publish:job_status',
|
|
1058
1069
|
job_id: jobId,
|
|
@@ -1063,7 +1074,7 @@ export class AgentManager {
|
|
|
1063
1074
|
|
|
1064
1075
|
try {
|
|
1065
1076
|
const workspaceDir = this._workspaceDir(agentId, workspaceId);
|
|
1066
|
-
const publishResult = await
|
|
1077
|
+
const publishResult = await this._runPublishJob({
|
|
1067
1078
|
serverUrl: this.serverUrl,
|
|
1068
1079
|
machineApiKey: this.machineApiKey,
|
|
1069
1080
|
agentId,
|