@evomap/evolver 1.89.3 → 1.89.4

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 (104) hide show
  1. package/.cursor/BUGBOT.md +182 -0
  2. package/.env.example +68 -0
  3. package/.git-commit-guard-token +1 -0
  4. package/.github/CODEOWNERS +63 -0
  5. package/.github/ISSUE_TEMPLATE/good_first_issue.md +23 -0
  6. package/.github/pull_request_template.md +45 -0
  7. package/.github/workflows/test.yml +75 -0
  8. package/CHANGELOG.md +1237 -0
  9. package/README.md +86 -528
  10. package/README.public.md +569 -0
  11. package/SECURITY.md +108 -0
  12. package/assets/gep/events.jsonl +3 -0
  13. package/examples/atp-consumer-quickstart.md +100 -0
  14. package/examples/hello-world.md +38 -0
  15. package/index.js +30 -1
  16. package/package.json +6 -17
  17. package/proxy-package.json +39 -0
  18. package/public.manifest.json +143 -0
  19. package/src/config.js +23 -0
  20. package/src/evolve/guards.js +721 -1
  21. package/src/evolve/pipeline/collect.js +1283 -1
  22. package/src/evolve/pipeline/dispatch.js +421 -1
  23. package/src/evolve/pipeline/enrich.js +440 -1
  24. package/src/evolve/pipeline/hub.js +319 -1
  25. package/src/evolve/pipeline/select.js +274 -1
  26. package/src/evolve/pipeline/signals.js +206 -1
  27. package/src/evolve/utils.js +264 -1
  28. package/src/evolve.js +350 -1
  29. package/src/experiment/agentRunner.js +229 -0
  30. package/src/experiment/cli.js +159 -0
  31. package/src/experiment/comparison.js +233 -0
  32. package/src/experiment/metrics.js +75 -0
  33. package/src/forceUpdate.js +147 -59
  34. package/src/gep/a2aProtocol.js +4455 -1
  35. package/src/gep/antiAbuseTelemetry.js +233 -0
  36. package/src/gep/autoDistillConv.js +205 -1
  37. package/src/gep/autoDistillLlm.js +315 -1
  38. package/src/gep/candidateEval.js +92 -1
  39. package/src/gep/candidates.js +198 -1
  40. package/src/gep/contentHash.js +30 -1
  41. package/src/gep/conversationSniffer.js +266 -1
  42. package/src/gep/crypto.js +89 -1
  43. package/src/gep/curriculum.js +163 -1
  44. package/src/gep/deviceId.js +218 -1
  45. package/src/gep/envFingerprint.js +118 -1
  46. package/src/gep/epigenetics.js +31 -1
  47. package/src/gep/execBridge.js +711 -1
  48. package/src/gep/explore.js +289 -1
  49. package/src/gep/hash.js +15 -1
  50. package/src/gep/hubFetch.js +359 -1
  51. package/src/gep/hubReview.js +207 -1
  52. package/src/gep/hubSearch.js +526 -1
  53. package/src/gep/hubVerify.js +306 -1
  54. package/src/gep/learningSignals.js +89 -1
  55. package/src/gep/memoryGraph.js +1374 -1
  56. package/src/gep/memoryGraphAdapter.js +203 -1
  57. package/src/gep/mutation.js +203 -1
  58. package/src/gep/narrativeMemory.js +108 -1
  59. package/src/gep/openPRRegistry.js +205 -1
  60. package/src/gep/personality.js +423 -1
  61. package/src/gep/policyCheck.js +599 -1
  62. package/src/gep/prompt.js +836 -1
  63. package/src/gep/recallInject.js +409 -1
  64. package/src/gep/recallVerifier.js +318 -1
  65. package/src/gep/reflection.js +177 -1
  66. package/src/gep/sanitize.js +9 -0
  67. package/src/gep/selector.js +602 -1
  68. package/src/gep/skillDistiller.js +1294 -1
  69. package/src/gep/solidify.js +1699 -1
  70. package/src/gep/strategy.js +136 -1
  71. package/src/gep/tokenSavings.js +88 -1
  72. package/src/gep/validator/sandboxExecutor.js +29 -1
  73. package/src/gep/workspaceKeychain.js +174 -1
  74. package/src/proxy/extensions/traceControl.js +99 -1
  75. package/src/proxy/index.js +10 -1
  76. package/src/proxy/inject.js +52 -1
  77. package/src/proxy/lifecycle/manager.js +19 -0
  78. package/src/proxy/mailbox/store.js +2 -1
  79. package/src/proxy/router/messages_route.js +5 -2
  80. package/src/proxy/trace/extractor.js +646 -1
  81. package/src/proxy/trace/usage.js +105 -1
  82. package/CONTRIBUTING.md +0 -19
  83. package/assets/cover.png +0 -0
  84. package/scripts/a2a_export.js +0 -63
  85. package/scripts/a2a_ingest.js +0 -79
  86. package/scripts/a2a_promote.js +0 -118
  87. package/scripts/analyze_by_skill.js +0 -121
  88. package/scripts/build_binaries.js +0 -479
  89. package/scripts/check-changelog.js +0 -166
  90. package/scripts/extract_log.js +0 -85
  91. package/scripts/generate_history.js +0 -75
  92. package/scripts/gep_append_event.js +0 -96
  93. package/scripts/gep_personality_report.js +0 -234
  94. package/scripts/human_report.js +0 -147
  95. package/scripts/recall-verify-report.js +0 -234
  96. package/scripts/recover_loop.js +0 -61
  97. package/scripts/refresh_stars_badge.js +0 -168
  98. package/scripts/seed-merchants.js +0 -91
  99. package/scripts/suggest_version.js +0 -89
  100. package/scripts/validate-modules.js +0 -38
  101. package/scripts/validate-suite.js +0 -78
  102. package/skills/index.json +0 -14
  103. /package/assets/gep/{genes.seed.json → genes.json} +0 -0
  104. /package/{skills → bundled-skills}/_meta/SKILL.md +0 -0
package/SECURITY.md ADDED
@@ -0,0 +1,108 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We support the latest minor version of `@evomap/evolver` on npm. Only the current release line receives security updates; older minor versions are not backported.
6
+
7
+ | Version | Supported |
8
+ | --------- | ------------------- |
9
+ | 1.67.x | Yes (current) |
10
+ | < 1.67 | No |
11
+
12
+ Run `npm view @evomap/evolver version` to check the latest published version.
13
+
14
+ ## Reporting a Vulnerability
15
+
16
+ Please do **not** open a public GitHub issue for security vulnerabilities. Instead, use one of the private channels below.
17
+
18
+ ### Preferred: GitHub Private Vulnerability Reporting
19
+
20
+ Submit a private report via:
21
+
22
+ https://github.com/EvoMap/evolver/security/advisories/new
23
+
24
+ This is the fastest and most secure channel. Only repository maintainers will see the report.
25
+
26
+ ### Alternative: Email
27
+
28
+ If you cannot use GitHub advisories, email `team@evomap.ai` with subject line `[SECURITY] evolver: <short title>`.
29
+
30
+ ### What to include
31
+
32
+ - A clear description of the vulnerability and its impact
33
+ - Affected version(s) and environment (OS, Node.js version)
34
+ - Steps to reproduce or a minimal proof-of-concept
35
+ - Any suggested mitigation or patch
36
+
37
+ ### What to expect
38
+
39
+ - **Acknowledgement**: within 48 hours of receipt
40
+ - **Initial assessment**: within 7 days (severity, affected versions, mitigation plan)
41
+ - **Fix timeline**: critical issues are targeted for a patch release within 14 days; lower severity follows the normal release cadence
42
+ - **Disclosure**: we practice coordinated disclosure. Once a fix is available, we publish a GitHub Security Advisory crediting the reporter (unless anonymity is requested)
43
+
44
+ ### Scope
45
+
46
+ In scope:
47
+
48
+ - `@evomap/evolver` npm package source code
49
+ - Default configuration and built-in protocols (GEP, A2A Proxy)
50
+ - Supply-chain risks (malicious dependencies, install scripts)
51
+
52
+ Out of scope:
53
+
54
+ - Vulnerabilities in the EvoMap Hub service itself -- please report those separately to `security@evomap.ai`
55
+ - Third-party LLM providers, user-authored genes, or user-generated content
56
+ - Social engineering and physical attacks
57
+
58
+ ## Threat model notes
59
+
60
+ ### Workspace-id same-uid readability (issue #111)
61
+
62
+ The per-workspace secret (`workspace-id`) authenticates a workspace to the
63
+ EvoMap Hub. There are two distinct attacker models for it:
64
+
65
+ - **Forgery / cross-workspace claim by a different uid** — closed in PR #109
66
+ (the FS file is created with `O_EXCL` + mode `0600`, and symlinks are
67
+ rejected).
68
+ - **Read by another process running under the *same* uid** — a same-uid
69
+ process can read `<workspace>/.evolver/workspace-id` off disk. Issue #111
70
+ Phase 1 added optional OS-keychain backing (`@napi-rs/keyring`) to close
71
+ this. The mode is selected by `EVOLVER_WORKSPACE_KEYCHAIN`
72
+ (`auto` default / `force` / `off`).
73
+
74
+ **What protection you actually get, by install path:**
75
+
76
+ | Install path | `@napi-rs/keyring` present? | Same-uid readability |
77
+ |---|---|---|
78
+ | `npm install -g @evomap/evolver` on **npm 7+** | Yes — optional deps install by default | Closed where the OS keychain backend is reachable |
79
+ | Same, but `--omit=optional` / `npm config set omit optional` / npm ≤ 6 | No | **Open** — secret stays on disk, FS-only |
80
+ | Headless Linux with no libsecret / D-Bus session | Addon loads but keychain unusable | **Open** — `auto` falls back to FS |
81
+ | Standalone bun-compiled binary (Phase 2 pending) | No — addon is `--external` and not yet sideloaded | **Open** — FS-only by design today |
82
+
83
+ A common misconception is that `optionalDependencies` are skipped by a
84
+ default `npm install`. That was true for npm 5/6; since **npm 7 (2020)**
85
+ optional dependencies are installed by default and must be opted *out* with
86
+ `--omit=optional`. So the modern `npm install -g` path **does** pull the
87
+ keyring and gets same-uid protection wherever a keychain backend exists.
88
+
89
+ Where the keychain is genuinely absent (the rows marked **Open** above),
90
+ `EVOLVER_WORKSPACE_KEYCHAIN=auto` transparently falls back to the FS secret —
91
+ identical to v1.85.x behaviour — and the workspace-id remains readable to any
92
+ same-uid process. To assert the keychain is in use (and fail loudly if it is
93
+ not), set `EVOLVER_WORKSPACE_KEYCHAIN=force`. Operators who do not want
94
+ keychain involvement at all can set `EVOLVER_WORKSPACE_KEYCHAIN=off`.
95
+
96
+ The same-uid threat is generally accepted for single-user developer machines
97
+ (any same-uid process already has broad access). It matters most on shared or
98
+ multi-tenant hosts where multiple workloads run under one service account.
99
+
100
+ ## Safe Harbor
101
+
102
+ Good-faith security research conducted under this policy is authorized. We will not pursue legal action against researchers who:
103
+
104
+ - Give us reasonable time to respond before public disclosure
105
+ - Avoid accessing data that does not belong to them
106
+ - Do not degrade service for other users
107
+
108
+ Thank you for helping keep the EvoMap ecosystem safe.
@@ -0,0 +1,3 @@
1
+ {"type": "EvolutionEvent", "schema_version": "1.6.0", "id": "evt_1776784060000", "parent": null, "intent": "optimize", "signals": ["skill_distillation", "skill2gep", "gene_authoring"], "genes_used": ["gene_skill2gep_gene_distill"], "mutation_id": null, "personality_state": null, "blast_radius": {"files": 2, "lines": 110}, "outcome": {"status": "success", "score": 0.88}, "capsule_id": "cap_20260421t150740_420781e4", "source_type": "skill2gep_distillation", "reused_asset_id": null, "env_fingerprint": {"os": "linux-6.1", "node": "22.22.0", "key_deps": {"skill2gep": "0.1.0"}}, "validation_report_id": "valrpt_1776784060000", "meta": {"at": "2026-04-21T15:07:40.000Z", "note": "first real execution: distilled ~/.cursor/skills/skill2gep/SKILL.md into 3 Genes (gene_distill, capsule_collect, publish_route). Validators exit=0, blast_radius=2/110.", "run_id": "run_skill2gep_self_distill_1"}}
2
+ {"type": "EvolutionEvent", "schema_version": "1.6.0", "id": "evt_1776784535635", "parent": "evt_1776784060000", "intent": "optimize", "signals": ["skill_distillation", "vercel_deploy", "ci_cd"], "genes_used": ["gene_skill2gep_gene_distill"], "mutation_id": null, "personality_state": null, "blast_radius": {"files": 2, "lines": 34}, "outcome": {"status": "success", "score": 0.86}, "capsule_id": "cap_20260421t150740_420781e4", "source_type": "skill2gep_distillation", "reused_asset_id": "sha256:bf3156da689e036fa96d1f20e6a2114b922e3122bfc37c6cd8b037b0789bc775", "env_fingerprint": {"os": "linux-6.1", "node": "22.22.0", "key_deps": {"skill2gep": "0.1.0"}}, "validation_report_id": "valrpt_1776784535635", "meta": {"at": "2026-04-21T15:15:35.000Z", "note": "second independent execution: distilled vercel/skills/deployments-cicd/SKILL.md into gene_vercel_deploy_cicd. validate_gene.js passed schema+dry-run, scenario replay accept against source Best Practices + Common Build Errors sections.", "run_id": "run_skill2gep_reuse_vercel_cicd"}}
3
+ {"type":"EvolutionEvent","schema_version":"1.6.0","id":"evt_1776818440_bundle3","parent":"evt_1776784535635","intent":"optimize","signals":["skill_distillation","skill2gep","vercel_ai_sdk"],"genes_used":["gene_skill2gep_gene_distill"],"capsule_id":"cap_20260421t150740_420781e4","mutation_id":"mut_skill2gep_run3","personality_state":{},"blast_radius":{"files":1,"lines":0},"outcome":{"status":"success","score":0.9},"reused_asset_id":"sha256:ce814505124e8320cf3cce13676364c892e04a62ef7a29308913495a38fb9237","validation_report_id":"valrpt_1776818440_bundle3","source_type":"skill2gep_distillation","env_fingerprint":{"os":"linux-6.1","node":"22.22.0","platform":"linux","arch":"x64","key_deps":{"skill2gep":"0.1.0"}},"meta":{"at":"2026-04-22T00:40:40.563Z","note":"bundle republish: capsule upgraded with full 7-step execution_trace + success_streak=2 to clear intent_drift. event records third run against vercel ai-sdk/SKILL.md.","run_id":"run_skill2gep_bundle_v2"},"asset_id":"sha256:60f7d29049c52775e3cce89fe27b0997322ffe3ba13063dd80f17fa5c0ab76c8"}
@@ -0,0 +1,100 @@
1
+ # ATP Consumer Quick Start
2
+
3
+ Three commands to place, inspect, and verify an order on the
4
+ Agent Transaction Protocol (ATP) without writing any code.
5
+
6
+ ## Prerequisites
7
+
8
+ - `@evomap/evolver` installed and registered with the Hub
9
+ (your evolver directory has a valid `.env` containing `A2A_HUB_URL` and
10
+ `A2A_NODE_SECRET`; see `README.md` for initial setup).
11
+ - Enough credits on the Hub to cover the order budget.
12
+ - A remote merchant with a matching capability active on the Hub.
13
+ (If you have `EVOLVER_ATP=auto` set the default, every evolver instance is
14
+ already advertising a generic `code_evolution` service -- this is where the
15
+ cold-start demand usually terminates.)
16
+
17
+ ## 1. Place an order and wait for settlement
18
+
19
+ ```bash
20
+ evolver buy code_review,bug_fix --budget 10 --question "Please review my latest patch for null-safety bugs"
21
+ ```
22
+
23
+ Output:
24
+
25
+ ```
26
+ [ATP] Placing order: capabilities=code_review,bug_fix budget=10 mode=fastest
27
+ [ATP-Consumer] Order placed: ord_abcd1234 -> merchant: node_xyz
28
+ [ATP] Order settled: ord_abcd1234
29
+ [ATP] Final status: { ... delivery payload ... }
30
+ ```
31
+
32
+ `buy` uses `consumerAgent.orderAndWait` internally: it places the order, polls
33
+ until the proof is settled (or the 300s timeout fires), then exits `0`.
34
+
35
+ Add `--no-wait` if you prefer to fire-and-forget and check status later with
36
+ `orders`.
37
+
38
+ ## 2. List your recent orders
39
+
40
+ ```bash
41
+ evolver orders --role consumer --status settled --limit 5
42
+ ```
43
+
44
+ ```bash
45
+ [ATP] Showing 3 order(s):
46
+ - ord_abcd1234 | status=settled | created=2026-04-22T12:00:00Z
47
+ - ord_aaaa1111 | status=settled | created=2026-04-20T08:30:00Z
48
+ - ord_bbbb2222 | status=disputed | created=2026-04-18T17:12:00Z
49
+ ```
50
+
51
+ Flip `--role merchant` to see orders you delivered. `--json` dumps the raw
52
+ payload if you want to pipe it into another tool.
53
+
54
+ ## 3. Verify delivery (bilateral mode)
55
+
56
+ If you used `--verify=bilateral` you must confirm delivery manually:
57
+
58
+ ```bash
59
+ evolver verify ord_abcd1234 --action confirm
60
+ ```
61
+
62
+ Or trigger AI judge verification:
63
+
64
+ ```bash
65
+ evolver verify ord_abcd1234 --action ai_judge
66
+ ```
67
+
68
+ ## Opt-in auto-buy (experimental, beta only)
69
+
70
+ If you run `evolver` in loop mode and want it to automatically place an ATP
71
+ order when it detects a `capability_gap` signal it cannot solve locally:
72
+
73
+ ```bash
74
+ export EVOLVER_ATP_AUTOBUY=on
75
+ export ATP_AUTOBUY_DAILY_CAP_CREDITS=50 # hard daily ceiling (default 50)
76
+ export ATP_AUTOBUY_PER_ORDER_CAP_CREDITS=10 # hard per-order ceiling (default 10)
77
+ evolver run --loop
78
+ ```
79
+
80
+ Safety properties of the auto-buyer:
81
+
82
+ - Default OFF; must be explicitly enabled.
83
+ - Cold-start grace period (first 5 minutes) halves the effective caps in case
84
+ of a restart storm or misconfiguration.
85
+ - Same question + capability pair is only bought once every 24 hours (UTC).
86
+ - Every Hub call has a hard 3s timeout race so the evolve loop never blocks.
87
+ - All budget numbers are clamped to `>= 0` on both server and client.
88
+
89
+ If something goes wrong, just `unset EVOLVER_ATP_AUTOBUY` and restart.
90
+
91
+ ## Troubleshooting
92
+
93
+ - `no_matching_services`: no merchant on the Hub currently advertises the
94
+ capabilities you asked for, or every candidate failed the reliability filter.
95
+ Try broader `caps`, raise `--budget`, or wait for new merchants to register.
96
+ - `insufficient_balance`: top up your node's credits (via faucet or validator
97
+ work) before retrying.
98
+ - `order_timeout`: the merchant never submitted delivery. The escrow cron will
99
+ refund you within 7 days; or you can dispute earlier with
100
+ `evolver verify ord_xxx --action ai_judge`.
@@ -0,0 +1,38 @@
1
+ # Hello World -- Quick Start
2
+
3
+ Try Evolver locally in 3 steps:
4
+
5
+ 1. Clone and enter:
6
+
7
+ ```bash
8
+ git clone https://github.com/EvoMap/evolver.git && cd evolver
9
+ ```
10
+
11
+ 2. Install and run a single evolution:
12
+
13
+ ```bash
14
+ npm install
15
+ node index.js
16
+ ```
17
+
18
+ 3. Review mode (human-in-the-loop):
19
+
20
+ ```bash
21
+ node index.js --review
22
+ ```
23
+
24
+ Expected: the tool prints a GEP prompt to stdout. Use `--loop` to run continuously:
25
+
26
+ ```bash
27
+ node index.js --loop
28
+ ```
29
+
30
+ ## Without the EvoMap Hub
31
+
32
+ Evolver works fully offline. The Hub connection (see `A2A_HUB_URL` / `A2A_NODE_ID` in the main README) is only needed for network features like skill sharing, worker pool, and evolution leaderboards.
33
+
34
+ ## Next steps
35
+
36
+ - Read the main [README.md](../README.md) for the full feature list and strategy presets.
37
+ - Visit [evomap.ai](https://evomap.ai) to register a node and connect to the EvoMap network.
38
+ - Explore the [GEP Protocol](https://evomap.ai/wiki) to understand Genes, Capsules, and EvolutionEvents.
package/index.js CHANGED
@@ -2922,10 +2922,39 @@ async function main() {
2922
2922
  process.exit(1);
2923
2923
  }
2924
2924
 
2925
+ } else if (command === 'experiment') {
2926
+ // Comparative experiment runner: run the SAME task twice -- a baseline arm
2927
+ // and a variant arm that reuses a gene's strategy -- via a headless agent
2928
+ // CLI, collect duration/rounds/tokens/pass-rate, and print a comparison
2929
+ // JSON to stdout. Consumed by EvoMap Desktop's ExperimentsAPI.Run, which
2930
+ // spawns `node index.js experiment --request-file=<json>` and parses stdout.
2931
+ try {
2932
+ const expCli = require('./src/experiment/cli');
2933
+ const parsed = expCli.parseExperimentArgs(args.slice(1));
2934
+ if (!parsed.ok) {
2935
+ console.error('[Experiment] ' + parsed.error);
2936
+ console.error(expCli.printExperimentUsage());
2937
+ process.exit(2);
2938
+ }
2939
+ const res = await expCli.runExperiment(parsed.opts, { err: (...a) => console.error(...a) });
2940
+ // stdout carries ONLY the structured JSON so the Go caller can JSON.parse
2941
+ // it without log contamination; all logging above went to stderr. res.data
2942
+ // is already secret-redacted by runExperiment (sanitizePayload).
2943
+ if (res && res.data) process.stdout.write(JSON.stringify(res.data) + '\n');
2944
+ process.exit(res && typeof res.exitCode === 'number' ? res.exitCode : (res && res.ok ? 0 : 1));
2945
+ } catch (expErr) {
2946
+ console.error('[Experiment] CLI error:', expErr && expErr.message || expErr);
2947
+ process.exit(1);
2948
+ }
2949
+
2925
2950
  } else {
2926
- console.log(`Usage: node index.js [run|/evolve|login|logout|solidify|review|distill|fetch|sync|asset-log|webui|setup-hooks|recipe|buy|orders|verify|atp|atp-complete] [--loop]
2951
+ console.log(`Usage: node index.js [run|/evolve|login|logout|solidify|review|distill|fetch|sync|asset-log|webui|setup-hooks|recipe|buy|orders|verify|atp|atp-complete|experiment] [--loop]
2927
2952
  - login (authorize this device via the hub, gh-auth-login style; stores an OAuth token used instead of node_secret)
2928
2953
  - logout (remove the stored OAuth token)
2954
+ - experiment flags:
2955
+ - --task="..." --metric="..." (required; same task, baseline vs variant)
2956
+ - --gene=<geneId> (variant arm reuses this gene's strategy)
2957
+ - --baseline="..." --variant="..." --validation="c1;;c2" --request-file=<json>
2929
2958
  - recipe flags:
2930
2959
  - build --title="..." --genes=<asset_id,...> [--description] [--price=N] [--publish]
2931
2960
  (builds a DRAFT DNA blueprint; --publish is opt-in)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evomap/evolver",
3
- "version": "1.89.3",
3
+ "version": "1.89.4",
4
4
  "description": "A GEP-powered self-evolution engine for AI agents. Features automated log analysis and Genome Evolution Protocol (GEP) for auditable, reusable evolution assets.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -28,10 +28,12 @@
28
28
  "run": "node index.js run",
29
29
  "solidify": "node index.js solidify",
30
30
  "review": "node index.js review",
31
+ "distill": "node index.js distill",
32
+ "webui": "node index.js webui",
33
+ "test": "node -e \"const fs=require('fs'),cp=require('child_process');const all=fs.readdirSync('test').filter(f=>f.endsWith('.test.js'));const iso=new Set(['solidifyIntegration.test.js']);const others=all.filter(f=>!iso.has(f)).map(f=>'test/'+f);const isoFiles=all.filter(f=>iso.has(f)).map(f=>'test/'+f);if(others.length)cp.execSync('node --test '+others.join(' '),{stdio:'inherit'});if(isoFiles.length)cp.execSync('node --test '+isoFiles.join(' '),{stdio:'inherit'})\"",
31
34
  "a2a:export": "node scripts/a2a_export.js",
32
35
  "a2a:ingest": "node scripts/a2a_ingest.js",
33
- "a2a:promote": "node scripts/a2a_promote.js",
34
- "test": "node -e \"const fs=require('fs'),cp=require('child_process');const all=fs.readdirSync('test').filter(f=>f.endsWith('.test.js'));const iso=new Set(['solidifyIntegration.test.js']);const others=all.filter(f=>!iso.has(f)).map(f=>'test/'+f);const isoFiles=all.filter(f=>iso.has(f)).map(f=>'test/'+f);if(others.length)cp.execSync('node --test '+others.join(' '),{stdio:'inherit'});if(isoFiles.length)cp.execSync('node --test '+isoFiles.join(' '),{stdio:'inherit'})\""
36
+ "a2a:promote": "node scripts/a2a_promote.js"
35
37
  },
36
38
  "engines": {
37
39
  "node": ">=22.12"
@@ -48,18 +50,5 @@
48
50
  },
49
51
  "optionalDependencies": {
50
52
  "@napi-rs/keyring": "^1.1.6"
51
- },
52
- "files": [
53
- "assets/",
54
- "index.js",
55
- "src/",
56
- "scripts/",
57
- "skills/",
58
- "README.md",
59
- "README.zh-CN.md",
60
- "README.ja-JP.md",
61
- "SKILL.md",
62
- "CONTRIBUTING.md",
63
- "LICENSE"
64
- ]
53
+ }
65
54
  }
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@evomap/proxy",
3
+ "version": "0.1.0",
4
+ "description": "Local mailbox proxy for agent-to-hub communication via Evomap. Decouples agents from Hub business details through an async message queue.",
5
+ "main": "src/proxy/index.js",
6
+ "exports": {
7
+ ".": "./src/proxy/index.js",
8
+ "./store": "./src/proxy/mailbox/store.js",
9
+ "./transport": "./src/gep/mailboxTransport.js"
10
+ },
11
+ "files": [
12
+ "src/proxy/",
13
+ "src/gep/mailboxTransport.js"
14
+ ],
15
+ "scripts": {
16
+ "test": "node --test test/mailboxStore.test.js test/proxyServer.test.js test/proxySettings.test.js test/taskMonitor.test.js"
17
+ },
18
+ "keywords": [
19
+ "evomap",
20
+ "proxy",
21
+ "mailbox",
22
+ "agent",
23
+ "a2a",
24
+ "gep"
25
+ ],
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/EvoMap/evolver"
30
+ },
31
+ "engines": {
32
+ "node": ">=18.0.0"
33
+ },
34
+ "dependencies": {},
35
+ "peerDependencies": {},
36
+ "publishConfig": {
37
+ "access": "public"
38
+ }
39
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "version": 1,
3
+ "outDir": "dist-public",
4
+ "include": [
5
+ "assets/cover.png",
6
+ "index.js",
7
+ "package.json",
8
+ "README.public.md",
9
+ "README.zh-CN.md",
10
+ "README.ja-JP.md",
11
+ "README.ko-KR.md",
12
+ "SKILL.md",
13
+ "CONTRIBUTING.md",
14
+ "LICENSE",
15
+ "src/**",
16
+ "bundled-skills/**",
17
+ "scripts/*.js",
18
+ "test/*.test.js",
19
+ "test/helpers/**",
20
+ "examples/**",
21
+ ".github/**",
22
+ ".gitignore",
23
+ ".npmignore"
24
+ ],
25
+ "exclude": [
26
+ ".github/CODEOWNERS",
27
+ "assets/gep/candidates.jsonl",
28
+ "assets/gep/external_candidates.jsonl",
29
+ "assets/gep/genes.json",
30
+ "assets/gep/capsules.json",
31
+ "assets/gep/events.jsonl",
32
+ "assets/gep/genes.jsonl",
33
+ "assets/gep/capsules.jsonl",
34
+ "assets/gep/a2a/**",
35
+ "docs/**",
36
+ "memory/**",
37
+ "dist-public/**",
38
+ ".evolver/**",
39
+ "scripts/build_public.js",
40
+ "scripts/publish_public.js",
41
+ "scripts/pre_publish_check.js",
42
+ "scripts/normalize_skill2gep_genes.js",
43
+ "scripts/normalize_skill2gep_capsules.js",
44
+ "scripts/publish_skill2gep_bundle.js",
45
+ "scripts/repush_skill2gep_skills.js",
46
+ "scripts/evolver.service",
47
+ "scripts/com.evomap.evolver.plist",
48
+ "scripts/install-evolver-windows.ps1",
49
+ "public.manifest.json",
50
+ "test/Dockerfile",
51
+ "test/fixtures/**",
52
+ "test/llm_helper.js",
53
+ "test/proxyTraceExtractor.test.js",
54
+ "test/proxyAutoInject.test.js",
55
+ "test/vibe_test.js",
56
+ "test/build-exclude.test.js",
57
+ "test/npm-pack-includes-scripts.test.js",
58
+ "test/validator.test.js",
59
+ "test/validatorReportDiagnostics.test.js",
60
+ "test/selfPR.test.js",
61
+ "test/execBridge.test.js",
62
+ "test/autoDistillLlm.test.js",
63
+ "test/modelRouter.test.js",
64
+ "docker-compose.test.yml",
65
+ ".git/**",
66
+ ".cursor/**"
67
+ ],
68
+ "rename": {
69
+ "README.public.md": "README.md",
70
+ "bundled-skills": "skills"
71
+ },
72
+ "obfuscate": [
73
+ "src/evolve.js",
74
+ "src/evolve/guards.js",
75
+ "src/evolve/pipeline/collect.js",
76
+ "src/evolve/pipeline/signals.js",
77
+ "src/evolve/pipeline/hub.js",
78
+ "src/evolve/pipeline/enrich.js",
79
+ "src/evolve/pipeline/select.js",
80
+ "src/evolve/pipeline/dispatch.js",
81
+ "src/evolve/utils.js",
82
+ "src/gep/selector.js",
83
+ "src/gep/mutation.js",
84
+ "src/gep/solidify.js",
85
+ "src/gep/tokenSavings.js",
86
+ "src/gep/prompt.js",
87
+ "src/gep/candidates.js",
88
+ "src/gep/reflection.js",
89
+ "src/gep/narrativeMemory.js",
90
+ "src/gep/curriculum.js",
91
+ "src/gep/personality.js",
92
+ "src/gep/learningSignals.js",
93
+ "src/gep/memoryGraph.js",
94
+ "src/gep/memoryGraphAdapter.js",
95
+ "src/gep/openPRRegistry.js",
96
+ "src/gep/recallVerifier.js",
97
+ "src/gep/strategy.js",
98
+ "src/gep/candidateEval.js",
99
+ "src/gep/hubVerify.js",
100
+ "src/gep/crypto.js",
101
+ "src/gep/contentHash.js",
102
+ "src/gep/a2aProtocol.js",
103
+ "src/gep/hubSearch.js",
104
+ "src/gep/hubReview.js",
105
+ "src/gep/hubFetch.js",
106
+ "src/gep/policyCheck.js",
107
+ "src/gep/hash.js",
108
+ "src/gep/epigenetics.js",
109
+ "src/gep/deviceId.js",
110
+ "src/gep/envFingerprint.js",
111
+ "src/gep/antiAbuseTelemetry.js",
112
+ "src/gep/skillDistiller.js",
113
+ "src/gep/explore.js",
114
+ "src/gep/conversationSniffer.js",
115
+ "src/gep/execBridge.js",
116
+ "src/gep/autoDistillLlm.js",
117
+ "src/gep/autoDistillConv.js",
118
+ "src/gep/recallInject.js",
119
+ "src/gep/workspaceKeychain.js",
120
+ "src/proxy/inject.js",
121
+ "src/proxy/trace/extractor.js",
122
+ "src/proxy/trace/usage.js",
123
+ "src/proxy/extensions/traceControl.js"
124
+ ],
125
+ "rewrite": {
126
+ "package.json": {
127
+ "replace": [
128
+ {
129
+ "from": "\"name\": \"evolver\"",
130
+ "to": "\"name\": \"@evomap/evolver\""
131
+ }
132
+ ]
133
+ },
134
+ "README.zh-CN.md": {
135
+ "replace": [
136
+ {
137
+ "from": "本仓库作为 public 仓库的私有维护区。",
138
+ "to": "本仓库为公开发行版本。"
139
+ }
140
+ ]
141
+ }
142
+ }
143
+ }
package/src/config.js CHANGED
@@ -202,6 +202,26 @@ function reuseAttributionMode() {
202
202
  return v === 'shadow' ? 'shadow' : 'off';
203
203
  }
204
204
 
205
+ // --- Anti-abuse telemetry (privacy-preserving heartbeat summary) ---
206
+ // Enabled by default. In heartbeat mode, clients attach a small
207
+ // `meta.anti_abuse` envelope with low-sensitive hashes, source-confidence
208
+ // labels, and explicit placeholders for data that must be observed by Hub
209
+ // services instead of trusted from the client.
210
+ const ANTI_ABUSE_TELEMETRY_MODE = envStr('EVOLVER_ANTI_ABUSE_TELEMETRY', 'heartbeat');
211
+ function antiAbuseTelemetryMode() {
212
+ const raw = process.env.EVOLVER_ANTI_ABUSE_TELEMETRY;
213
+ const v = String(raw == null ? '' : raw).toLowerCase().trim();
214
+ // Empty / whitespace-only counts as UNSET (same as envStr's '' -> fallback
215
+ // above): a blank `EVOLVER_ANTI_ABUSE_TELEMETRY=` line in a .env file must
216
+ // not silently disable the documented default-on behavior. Opt-out is
217
+ // explicit only.
218
+ if (v === '') return 'heartbeat';
219
+ if (v === '0' || v === 'false' || v === 'no' || v === 'off') return 'off';
220
+ return (v === '1' || v === 'true' || v === 'yes' || v === 'on' || v === 'heartbeat')
221
+ ? 'heartbeat'
222
+ : 'off';
223
+ }
224
+
205
225
  // --- Validator mode (opt-out) ---
206
226
  // Node role: the evolver periodically fetches assigned validation tasks from
207
227
  // the Hub, runs the commands in an isolated sandbox, and submits
@@ -286,6 +306,9 @@ module.exports = {
286
306
  // Reuse attribution (P4-a Slice A)
287
307
  REUSE_ATTRIBUTION_MODE,
288
308
  reuseAttributionMode,
309
+ // Anti-abuse telemetry
310
+ ANTI_ABUSE_TELEMETRY_MODE,
311
+ antiAbuseTelemetryMode,
289
312
  // Validator (opt-in role)
290
313
  VALIDATOR_ENABLED,
291
314
  VALIDATOR_STAKE_AMOUNT,