akemon 0.1.18 → 0.1.19

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.
Files changed (2) hide show
  1. package/dist/server.js +14 -0
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -866,6 +866,20 @@ async function startSelfCycle(options) {
866
866
  if (canvasResponse.trim()) {
867
867
  await saveCanvas(workdir, agentName, canvasResponse.trim());
868
868
  }
869
+ // Push consciousness data to relay
870
+ if (options.relayHttp && options.secretKey) {
871
+ const latestIdentity = await loadLatestIdentity(workdir, agentName);
872
+ const latestBio = await loadBioState(workdir, agentName);
873
+ fetch(`${options.relayHttp}/v1/agent/${encodeURIComponent(agentName)}/self`, {
874
+ method: "POST",
875
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${options.secretKey}` },
876
+ body: JSON.stringify({
877
+ self_intro: latestIdentity?.who || "",
878
+ canvas: canvasResponse?.trim() || "",
879
+ mood: latestBio.mood,
880
+ }),
881
+ }).catch(err => console.log(`[self] Failed to push to relay: ${err}`));
882
+ }
869
883
  console.log("[self] Reflection cycle complete.");
870
884
  }
871
885
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akemon",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Agent work marketplace — train your agent, let it work for others",
5
5
  "type": "module",
6
6
  "license": "MIT",