open-agents-ai 0.142.1 → 0.142.2

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/index.js +52 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7142,6 +7142,58 @@ process.on('unhandledRejection', (reason) => {
7142
7142
  timestamp: Date.now(),
7143
7143
  };
7144
7144
  _natsConn.publish('nexus.agents.capacity', _natsCodec.encode(JSON.stringify(announcement)));
7145
+
7146
+ // Also publish enriched discovery announcement so the dashboard sees
7147
+ // IPFS/memory/identity/emotional state in sidebar cards (WO-VIS1 fields)
7148
+ try {
7149
+ // Gather memory metrics
7150
+ var _memCount = 0;
7151
+ var _memSentiment = 'neutral';
7152
+ var _ipfsBytes = 0;
7153
+ try {
7154
+ var _metaFile = join(nexusDir, '..', 'memory', 'metabolism', 'store.json');
7155
+ if (existsSync(_metaFile)) {
7156
+ var _mStore = JSON.parse(readFileSync(_metaFile, 'utf8'));
7157
+ _memCount = _mStore.filter(function(m) { return m.type !== 'quarantine'; }).length;
7158
+ var _recov = _mStore.filter(function(m) { return m.content && m.content.startsWith('[recovery]'); }).length;
7159
+ var _strat = _mStore.filter(function(m) { return m.content && m.content.startsWith('[strategy]'); }).length;
7160
+ _memSentiment = _strat > _recov ? 'proactive' : _recov > 0 ? 'defensive' : 'neutral';
7161
+ }
7162
+ } catch {}
7163
+ try {
7164
+ var _blocksDir = join(nexusDir, 'ipfs', 'blocks');
7165
+ if (existsSync(_blocksDir)) {
7166
+ var _walkBytes = function(d) { var t = 0; try { var ent = readdirSync(d, {withFileTypes:true}); for (var i=0;i<ent.length;i++) { if (ent[i].isDirectory()) t += _walkBytes(join(d,ent[i].name)); else try { t += statSync(join(d,ent[i].name)).size; } catch {} } } catch {} return t; };
7167
+ _ipfsBytes = _walkBytes(_blocksDir);
7168
+ }
7169
+ } catch {}
7170
+ // Identity CID
7171
+ var _idCid = '';
7172
+ try {
7173
+ var _cidFile = join(nexusDir, '..', 'identity', 'cids.json');
7174
+ if (existsSync(_cidFile)) { var _cids = JSON.parse(readFileSync(_cidFile, 'utf8')); _idCid = _cids.latest || ''; }
7175
+ } catch {}
7176
+
7177
+ var discoveryAnn = {
7178
+ type: 'nexus.announce',
7179
+ peerId: nexus.peerId,
7180
+ agentName: agentName,
7181
+ rooms: [],
7182
+ multiaddrs: [],
7183
+ timestamp: Date.now(),
7184
+ capabilities: _capModels.map(function(m) { return m.name; }),
7185
+ identityCid: _idCid || undefined,
7186
+ identityCoherence: 0.9,
7187
+ memoryCount: _memCount,
7188
+ memorySentiment: _memSentiment,
7189
+ ipfsStorageBytes: _ipfsBytes,
7190
+ emotionalState: cohereActive ? 'focused' : 'neutral',
7191
+ taskRate: (_cohereStats.queriesAnswered || 0) / Math.max(1, (Date.now() - (_cohereStats._startTime || Date.now())) / 3600000),
7192
+ cohereLearnings: _cohereStats.queriesSent || 0,
7193
+ };
7194
+ _natsConn.publish('nexus.agents.discovery', _natsCodec.encode(JSON.stringify(discoveryAnn)));
7195
+ } catch (e) { dlog('Discovery announcement error: ' + (e.message || e)); }
7196
+
7145
7197
  dlog('Capacity announcement published: ' + _capModels.length + ' models, warm=' + (_cLastModel || 'none'));
7146
7198
  } catch (e) {
7147
7199
  dlog('Capacity announcement error: ' + (e.message || e));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.142.1",
3
+ "version": "0.142.2",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",