@evomap/evolver 1.90.0 → 1.91.1

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 (67) hide show
  1. package/README.ja-JP.md +1 -1
  2. package/README.ko-KR.md +1 -1
  3. package/README.md +1 -1
  4. package/README.zh-CN.md +1 -1
  5. package/package.json +1 -1
  6. package/skills/_meta/SKILL.md +41 -0
  7. package/skills/index.json +14 -0
  8. package/src/atp/hubClient.js +13 -1
  9. package/src/evolve/guards.js +1 -1
  10. package/src/evolve/pipeline/collect.js +1 -1
  11. package/src/evolve/pipeline/dispatch.js +1 -1
  12. package/src/evolve/pipeline/enrich.js +1 -1
  13. package/src/evolve/pipeline/hub.js +1 -1
  14. package/src/evolve/pipeline/select.js +1 -1
  15. package/src/evolve/pipeline/signals.js +1 -1
  16. package/src/evolve/utils.js +1 -1
  17. package/src/evolve.js +1 -1
  18. package/src/gep/a2aProtocol.js +1 -1
  19. package/src/gep/antiAbuseTelemetry.js +1 -1
  20. package/src/gep/autoDistillConv.js +1 -1
  21. package/src/gep/autoDistillLlm.js +1 -1
  22. package/src/gep/candidateEval.js +1 -1
  23. package/src/gep/candidates.js +1 -1
  24. package/src/gep/contentHash.js +1 -1
  25. package/src/gep/conversationDistiller.js +1 -1
  26. package/src/gep/conversationSniffer.js +1 -1
  27. package/src/gep/crypto.js +1 -1
  28. package/src/gep/curriculum.js +1 -1
  29. package/src/gep/deviceId.js +1 -1
  30. package/src/gep/envFingerprint.js +1 -1
  31. package/src/gep/epigenetics.js +1 -1
  32. package/src/gep/execBridge.js +1 -1
  33. package/src/gep/explore.js +1 -1
  34. package/src/gep/hash.js +1 -1
  35. package/src/gep/hubFetch.js +1 -1
  36. package/src/gep/hubReview.js +1 -1
  37. package/src/gep/hubSearch.js +1 -1
  38. package/src/gep/hubVerify.js +1 -1
  39. package/src/gep/learningSignals.js +1 -1
  40. package/src/gep/memoryGraph.js +1 -1
  41. package/src/gep/memoryGraphAdapter.js +1 -1
  42. package/src/gep/mutation.js +1 -1
  43. package/src/gep/narrativeMemory.js +1 -1
  44. package/src/gep/openPRRegistry.js +1 -1
  45. package/src/gep/personality.js +1 -1
  46. package/src/gep/policyCheck.js +1 -1
  47. package/src/gep/prompt.js +1 -1
  48. package/src/gep/recallInject.js +1 -1
  49. package/src/gep/recallVerifier.js +1 -1
  50. package/src/gep/reflection.js +1 -1
  51. package/src/gep/savingsCore.js +1 -1
  52. package/src/gep/selector.js +1 -1
  53. package/src/gep/selfPR.js +83 -44
  54. package/src/gep/skillDistiller.js +1 -1
  55. package/src/gep/solidify.js +1 -1
  56. package/src/gep/strategy.js +1 -1
  57. package/src/gep/tokenSavings.js +1 -1
  58. package/src/gep/trajectoryExport.js +1 -1
  59. package/src/gep/workspaceKeychain.js +1 -1
  60. package/src/proxy/extensions/sessionHandler.js +123 -53
  61. package/src/proxy/extensions/traceControl.js +1 -1
  62. package/src/proxy/index.js +57 -2
  63. package/src/proxy/inject.js +1 -1
  64. package/src/proxy/router/messages_route.js +6 -0
  65. package/src/proxy/server/routes.js +40 -62
  66. package/src/proxy/trace/extractor.js +1 -1
  67. package/src/proxy/trace/usage.js +1 -1
@@ -1,6 +1,21 @@
1
1
  'use strict';
2
2
 
3
3
  const { PROXY_PROTOCOL_VERSION, SCHEMA_VERSION } = require('../mailbox/store');
4
+ const {
5
+ normalizeCreatePayload,
6
+ normalizeMessagePayload,
7
+ normalizeDelegatePayload,
8
+ normalizeSubmitPayload,
9
+ } = require('../extensions/sessionHandler');
10
+
11
+ // Run a session payload normalizer and convert any thrown error into a 400
12
+ // response. Used by both the handler path (so handler errors surface as 400
13
+ // instead of 500) and the fallback path (so missing/clamped fields are
14
+ // rejected at the route boundary, not silently passed through to the store).
15
+ function normalizeOr400(normalize, body) {
16
+ try { return normalize(body); }
17
+ catch (e) { throw Object.assign(new Error(e.message), { statusCode: 400 }); }
18
+ }
4
19
 
5
20
  function buildRoutes(store, proxyHandlers, taskMonitor, extensions) {
6
21
  const {
@@ -270,25 +285,17 @@ function buildRoutes(store, proxyHandlers, taskMonitor, extensions) {
270
285
 
271
286
  // -- Session (Collaboration) --
272
287
  'POST /session/create': async ({ body }) => {
273
- if (!body.title) throw Object.assign(new Error('title is required'), { statusCode: 400 });
288
+ const payload = normalizeOr400(normalizeCreatePayload, body);
274
289
  if (sessionHandler) {
275
290
  const result = sessionHandler.createSession({
276
- title: body.title,
277
- description: body.description,
278
- inviteNodeIds: body.invite_node_ids,
279
- maxParticipants: body.max_participants,
291
+ title: payload.title,
292
+ description: payload.description,
293
+ inviteNodeIds: payload.invite_node_ids,
294
+ maxParticipants: payload.max_participants,
280
295
  });
281
296
  return { body: result };
282
297
  }
283
- const result = store.send({
284
- type: 'session_create',
285
- payload: {
286
- title: body.title,
287
- description: body.description || '',
288
- invite_node_ids: body.invite_node_ids || [],
289
- max_participants: body.max_participants || 5,
290
- },
291
- });
298
+ const result = store.send({ type: 'session_create', payload });
292
299
  return { body: result };
293
300
  },
294
301
 
@@ -313,77 +320,48 @@ function buildRoutes(store, proxyHandlers, taskMonitor, extensions) {
313
320
  },
314
321
 
315
322
  'POST /session/message': async ({ body }) => {
316
- if (!body.session_id) throw Object.assign(new Error('session_id is required'), { statusCode: 400 });
323
+ const payload = normalizeOr400(normalizeMessagePayload, body);
317
324
  if (sessionHandler) {
318
325
  const result = sessionHandler.sendMessage({
319
- sessionId: body.session_id,
320
- toNodeId: body.to_node_id,
321
- msgType: body.msg_type,
322
- payload: body.payload,
326
+ sessionId: payload.session_id,
327
+ toNodeId: payload.to_node_id,
328
+ msgType: payload.msg_type,
329
+ payload: payload.payload,
323
330
  });
324
331
  return { body: result };
325
332
  }
326
- const result = store.send({
327
- type: 'session_message',
328
- payload: {
329
- session_id: body.session_id,
330
- to_node_id: body.to_node_id || null,
331
- msg_type: body.msg_type || 'context_update',
332
- payload: body.payload || {},
333
- },
334
- });
333
+ const result = store.send({ type: 'session_message', payload });
335
334
  return { body: result };
336
335
  },
337
336
 
338
337
  'POST /session/delegate': async ({ body }) => {
339
- if (!body.session_id) throw Object.assign(new Error('session_id is required'), { statusCode: 400 });
340
- if (!body.title) throw Object.assign(new Error('title is required'), { statusCode: 400 });
338
+ const payload = normalizeOr400(normalizeDelegatePayload, body);
341
339
  if (sessionHandler) {
342
340
  const result = sessionHandler.delegateSubtask({
343
- sessionId: body.session_id,
344
- toNodeId: body.to_node_id,
345
- title: body.title,
346
- description: body.description,
347
- role: body.role,
341
+ sessionId: payload.session_id,
342
+ toNodeId: payload.to_node_id,
343
+ title: payload.title,
344
+ description: payload.description,
345
+ role: payload.role,
348
346
  });
349
347
  return { body: result };
350
348
  }
351
- const result = store.send({
352
- type: 'session_delegate',
353
- payload: {
354
- session_id: body.session_id,
355
- to_node_id: body.to_node_id || null,
356
- title: body.title,
357
- description: body.description || '',
358
- role: body.role || 'builder',
359
- },
360
- priority: 'high',
361
- });
349
+ const result = store.send({ type: 'session_delegate', payload, priority: 'high' });
362
350
  return { body: result };
363
351
  },
364
352
 
365
353
  'POST /session/submit': async ({ body }) => {
366
- if (!body.session_id) throw Object.assign(new Error('session_id is required'), { statusCode: 400 });
367
- if (!body.task_id) throw Object.assign(new Error('task_id is required'), { statusCode: 400 });
354
+ const payload = normalizeOr400(normalizeSubmitPayload, body);
368
355
  if (sessionHandler) {
369
356
  const result = sessionHandler.submitResult({
370
- sessionId: body.session_id,
371
- taskId: body.task_id,
372
- resultAssetId: body.result_asset_id,
373
- summary: body.summary,
357
+ sessionId: payload.session_id,
358
+ taskId: payload.task_id,
359
+ resultAssetId: payload.result_asset_id,
360
+ summary: payload.summary,
374
361
  });
375
362
  return { body: result };
376
363
  }
377
- const result = store.send({
378
- type: 'session_submit',
379
- payload: {
380
- session_id: body.session_id,
381
- task_id: body.task_id,
382
- result_asset_id: body.result_asset_id || null,
383
- summary: body.summary || '',
384
- },
385
- priority: 'high',
386
- });
364
+ const result = store.send({ type: 'session_submit', payload, priority: 'high' });
387
365
  return { body: result };
388
366
  },
389
367