@evomap/evolver 1.92.0 → 1.94.0
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/CONTRIBUTING.md +12 -0
- package/README.ja-JP.md +1 -1
- package/README.ko-KR.md +1 -1
- package/README.md +17 -9
- package/README.zh-CN.md +1 -1
- package/SKILL.md +8 -8
- package/assets/gep/genes.seed.json +312 -0
- package/assets/logo.png +0 -0
- package/cli-options.js +73 -0
- package/index.js +30 -0
- package/package.json +2 -1
- package/scripts/harness-governance-check.js +147 -0
- package/src/adapters/scripts/_runtimePaths.js +10 -1
- package/src/adapters/scripts/evolver-session-end.js +10 -1
- package/src/evolve/guards.js +1 -1
- package/src/evolve/pipeline/collect.js +1 -1
- package/src/evolve/pipeline/dispatch.js +1 -1
- package/src/evolve/pipeline/enrich.js +1 -1
- package/src/evolve/pipeline/hub.js +1 -1
- package/src/evolve/pipeline/select.js +1 -1
- package/src/evolve/pipeline/signals.js +1 -1
- package/src/evolve/utils.js +1 -1
- package/src/evolve.js +1 -1
- package/src/experiment/triggerShift.js +132 -0
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/antiAbuseTelemetry.js +1 -1
- package/src/gep/assetStore.js +67 -9
- package/src/gep/autoDistillConv.js +1 -1
- package/src/gep/autoDistillLlm.js +1 -1
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/contextRoutingGene.js +1 -0
- package/src/gep/conversationDistiller.js +1 -1
- package/src/gep/conversationSniffer.js +1 -1
- package/src/gep/crypto.js +1 -1
- package/src/gep/curriculum.js +1 -1
- package/src/gep/deviceId.js +1 -1
- package/src/gep/envFingerprint.js +1 -1
- package/src/gep/epigenetics.js +1 -1
- package/src/gep/execBridge.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/feedbackEnvelope.js +1 -0
- package/src/gep/hash.js +1 -1
- package/src/gep/hubFetch.js +1 -1
- package/src/gep/hubReview.js +1 -1
- package/src/gep/hubSearch.js +1 -1
- package/src/gep/hubVerify.js +1 -1
- package/src/gep/learningSignals.js +1 -1
- package/src/gep/memoryGraph.js +1 -1
- package/src/gep/memoryGraphAdapter.js +1 -1
- package/src/gep/mutation.js +1 -1
- package/src/gep/narrativeMemory.js +1 -1
- package/src/gep/openPRRegistry.js +1 -1
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/prompt.js +1 -1
- package/src/gep/recallInject.js +1 -1
- package/src/gep/recallVerifier.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/savingsCore.js +1 -1
- package/src/gep/selector.js +1 -1
- package/src/gep/signals.js +35 -0
- package/src/gep/skillDistiller.js +1 -1
- package/src/gep/solidify.js +1 -1
- package/src/gep/strategy.js +1 -1
- package/src/gep/syncAsset.js +1 -1
- package/src/gep/tokenSavings.js +1 -1
- package/src/gep/trajectoryExport.js +1 -1
- package/src/gep/validator/sandboxExecutor.js +28 -1
- package/src/gep/workspaceKeychain.js +1 -1
- package/src/proxy/extensions/traceControl.js +1 -1
- package/src/proxy/index.js +66 -6
- package/src/proxy/inject.js +1 -1
- package/src/proxy/server/settings.js +6 -0
- package/src/proxy/trace/extractor.js +1 -1
- package/src/proxy/trace/usage.js +1 -1
- package/assets/cover.png +0 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -11,6 +11,18 @@ Submit PRs with clear intent and scope.
|
|
|
11
11
|
|
|
12
12
|
### Engineering conventions
|
|
13
13
|
|
|
14
|
+
- **Evolver is the upstream governance source for EvoX harness/evolver behavior.**
|
|
15
|
+
Any PR that changes harness/evaluator/self-evolution surfaces (GEP schemas,
|
|
16
|
+
prompt/selector/mutation/solidify/candidate/evaluator logic, evolve pipeline,
|
|
17
|
+
adapter execution bridge, proxy routing/trace, bundled GEP assets, or the EvoX
|
|
18
|
+
bridge contract) must fill the `## Harness/evaluator governance` PR-template
|
|
19
|
+
packet. The required packet documents the whitelisted surface, downstream EvoX
|
|
20
|
+
impact, rollout-local scope, promotion boundary, evaluator mismatch sets,
|
|
21
|
+
non-regression evidence, fix severity, owner approval, security boundary,
|
|
22
|
+
rollback, and the two hard denials: `Live promotion: no` and
|
|
23
|
+
`Autonomous evaluator self-editing: no`. `scripts/harness-governance-check.js`
|
|
24
|
+
enforces this on PRs.
|
|
25
|
+
|
|
14
26
|
- **Spawn child CLIs as `node <entry.js>` — never via a `.cmd` shim, npm symlink, or bare command name.** When launching a harness/tool subprocess (claude-code, openclaw, codex, ...), resolve the JS entry behind the launcher and hand it to `node` directly. Two reasons:
|
|
15
27
|
1. On Windows, `child_process.spawn` without `shell:true` on a `.cmd`/`.bat` throws `EINVAL` since the CVE-2024-27980 fix (Node >=18.20.2 / 20.12.2 / 21.7.3) — this silently broke the auto-exec bridge on Windows.
|
|
16
28
|
2. Across platforms, shims/wrappers can emit warnings or silently exit on some machines. `node <entry>` is zero-shell, deterministic, and passes args via argv (no shell-injection surface).
|
package/README.ja-JP.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🧬 Evolver
|
|
2
2
|
|
|
3
|
-
[](https://github.com/EvoMap/evolver/stargazers)
|
|
4
4
|
[](https://opensource.org/licenses/GPL-3.0)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://www.npmjs.com/package/@evomap/evolver)
|
package/README.ko-KR.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🧬 Evolver
|
|
2
2
|
|
|
3
|
-
[](https://github.com/EvoMap/evolver/stargazers)
|
|
4
4
|
[](https://opensource.org/licenses/GPL-3.0)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://www.npmjs.com/package/@evomap/evolver)
|
package/README.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.png" alt="Evolver" width="96" height="96" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Evolver — Agent Self-Evolving Engine</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://trendshift.io/repositories/26015?utm_source=repository-badge&utm_medium=badge&utm_campaign=badge-repository-26015" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/26015" alt="EvoMap%2Fevolver | Trendshift" width="250" height="55"/></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/EvoMap/evolver/stargazers"><img src="https://img.shields.io/badge/Stars-9k-2b3137?logo=github&logoColor=white" alt="GitHub stars"/></a>
|
|
13
|
+
<a href="https://opensource.org/licenses/GPL-3.0"><img src="https://img.shields.io/badge/License-GPL--3.0-blue.svg" alt="License: GPL-3.0"/></a>
|
|
14
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%3E%3D%2018-green.svg" alt="Node.js >= 18"/></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/@evomap/evolver"><img src="https://img.shields.io/npm/dm/@evomap/evolver.svg" alt="npm downloads"/></a>
|
|
16
|
+
<a href="https://arxiv.org/abs/2604.15097"><img src="https://img.shields.io/badge/arXiv-2604.15097-b31b1b.svg" alt="arXiv"/></a>
|
|
17
|
+
</p>
|
|
10
18
|
|
|
11
19
|
**[evomap.ai](https://evomap.ai)** | [Documentation](https://evomap.ai/wiki) | [Chinese / 中文文档](README.zh-CN.md) | [Japanese / 日本語ドキュメント](README.ja-JP.md) | [Korean / 한국어 문서](README.ko-KR.md) | [GitHub](https://github.com/EvoMap/evolver) | [Releases](https://github.com/EvoMap/evolver/releases)
|
|
12
20
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🧬 Evolver
|
|
2
2
|
|
|
3
|
-
[](https://github.com/EvoMap/evolver/stargazers)
|
|
4
4
|
[](https://opensource.org/licenses/GPL-3.0)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://www.npmjs.com/package/@evomap/evolver)
|
package/SKILL.md
CHANGED
|
@@ -66,11 +66,11 @@ metadata:
|
|
|
66
66
|
reads:
|
|
67
67
|
- "~/.evolver/settings.json (Proxy address discovery)"
|
|
68
68
|
- "~/.evomap/node_id (node identity)"
|
|
69
|
-
- "
|
|
70
|
-
- "memory/* (evolution memory)"
|
|
69
|
+
- "$EVOLVER_HOME/gep/* (runtime GEP assets)"
|
|
70
|
+
- "$EVOLVER_HOME/memory/* (runtime evolution memory)"
|
|
71
71
|
writes:
|
|
72
|
-
- "
|
|
73
|
-
- "memory/* (memory graph, narrative, reflection)"
|
|
72
|
+
- "$EVOLVER_HOME/gep/* (runtime genes, capsules, events)"
|
|
73
|
+
- "$EVOLVER_HOME/memory/* (runtime memory graph, narrative, reflection)"
|
|
74
74
|
- "src/** (evolved code, only during solidify)"
|
|
75
75
|
---
|
|
76
76
|
|
|
@@ -346,10 +346,10 @@ node index.js --review
|
|
|
346
346
|
|
|
347
347
|
## GEP Protocol (Auditable Evolution)
|
|
348
348
|
|
|
349
|
-
Local asset store:
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
349
|
+
Local runtime asset store (created and maintained by Evolver; these mutable runtime files are not bundled in the published Skill package):
|
|
350
|
+
- `$EVOLVER_HOME/gep/genes.json` -- reusable Gene definitions
|
|
351
|
+
- `$EVOLVER_HOME/gep/capsules.json` -- success capsules
|
|
352
|
+
- `$EVOLVER_HOME/gep/events.jsonl` -- append-only evolution events
|
|
353
353
|
|
|
354
354
|
---
|
|
355
355
|
|
|
@@ -491,6 +491,318 @@
|
|
|
491
491
|
"execing or deserializing anything from the payload"
|
|
492
492
|
],
|
|
493
493
|
"asset_id": "sha256:ac2a2f185390aef37996651ef21355f4beb437049e52a6ca3898619a8d648084"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"type": "Gene",
|
|
497
|
+
"category": "optimize",
|
|
498
|
+
"schema_version": "1.8.0",
|
|
499
|
+
"epigenetic_marks": [],
|
|
500
|
+
"learning_history": [],
|
|
501
|
+
"anti_patterns": [],
|
|
502
|
+
"routing_hint": {
|
|
503
|
+
"tier": "mid",
|
|
504
|
+
"reasoning_level": "medium"
|
|
505
|
+
},
|
|
506
|
+
"tool_policy": null,
|
|
507
|
+
"id": "gene_claude_prompt_budget_ledger",
|
|
508
|
+
"signals_match": [
|
|
509
|
+
"prompt_budget_measurement",
|
|
510
|
+
"token_budget_overflow",
|
|
511
|
+
"context_explosion",
|
|
512
|
+
"上下文爆了",
|
|
513
|
+
"token 超限",
|
|
514
|
+
"context budget"
|
|
515
|
+
],
|
|
516
|
+
"preconditions": [
|
|
517
|
+
"A context-limit failure needs attribution before changing prompts, tools, memory, or handoff format",
|
|
518
|
+
"At least one local prompt/context source can be measured or estimated independently"
|
|
519
|
+
],
|
|
520
|
+
"strategy": [
|
|
521
|
+
"Create a budget ledger before editing: fixed system/harness text, user/project instructions, memory index, recalled memories, tool schemas, MCP instructions, skill manuals, agent descriptions, and user-pasted payload",
|
|
522
|
+
"Rank sources by marginal savings and risk; prefer lazy-loading low-relevance tool/manual detail before compressing high-priority policy",
|
|
523
|
+
"Record both absolute tokens and percentage of the total so regressions can be caught when new tools or skills are added",
|
|
524
|
+
"Attach each compression to a verification target: selected tool still callable, selected skill still loadable, safety rule still present, or handoff still sufficient",
|
|
525
|
+
"After changes, re-run the same ledger measurement and report the before/after delta with any residual irreducible context cost"
|
|
526
|
+
],
|
|
527
|
+
"validation": [
|
|
528
|
+
"node --test test/contextSchemaRoutingGene.test.js",
|
|
529
|
+
"node scripts/validate-modules.js ./src/gep/signals ./src/gep/contextRoutingGene"
|
|
530
|
+
],
|
|
531
|
+
"constraints": {
|
|
532
|
+
"max_files": 8,
|
|
533
|
+
"forbidden_paths": [
|
|
534
|
+
".git",
|
|
535
|
+
"node_modules"
|
|
536
|
+
]
|
|
537
|
+
},
|
|
538
|
+
"summary": "Diagnose context explosions with a prompt-budget ledger before deciding whether to compress tools, skills, memory, policy, or pasted transcripts.",
|
|
539
|
+
"avoid": [
|
|
540
|
+
"guessing the largest source without measuring it",
|
|
541
|
+
"optimizing a small memory index while ignoring much larger always-on tool schemas",
|
|
542
|
+
"reporting a context fix without before/after numbers and a runtime verification target"
|
|
543
|
+
],
|
|
544
|
+
"asset_id": "sha256:d5f2bffabeac6076ed455b057d0de57c197f2d257bff4ce1c4efa0ad7f16b48a"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"type": "Gene",
|
|
548
|
+
"category": "optimize",
|
|
549
|
+
"schema_version": "1.8.0",
|
|
550
|
+
"epigenetic_marks": [],
|
|
551
|
+
"learning_history": [],
|
|
552
|
+
"anti_patterns": [],
|
|
553
|
+
"routing_hint": {
|
|
554
|
+
"tier": "mid",
|
|
555
|
+
"reasoning_level": "medium"
|
|
556
|
+
},
|
|
557
|
+
"tool_policy": null,
|
|
558
|
+
"id": "gene_claude_context_schema_routing",
|
|
559
|
+
"signals_match": [
|
|
560
|
+
"claude_code_context_bloat",
|
|
561
|
+
"schema_routing_gene_request",
|
|
562
|
+
"蒸馏成基因",
|
|
563
|
+
"Claude Code context",
|
|
564
|
+
"Available agent types",
|
|
565
|
+
"MCP Server Instructions"
|
|
566
|
+
],
|
|
567
|
+
"preconditions": [
|
|
568
|
+
"Claude Code or another harness injects large tool/MCP/skill instructions before the user task",
|
|
569
|
+
"The failure mode is prompt/context size or duplicated capability guidance, while runtime approval gates and parameter validation remain enforced"
|
|
570
|
+
],
|
|
571
|
+
"strategy": [
|
|
572
|
+
"Classify the bloat source first: user/project policy, memory index, recalled memory bodies, tool schemas, MCP server instructions, skill descriptions, agent-type descriptions, or pasted transcript payloads",
|
|
573
|
+
"Route the task to the most specific compression Gene instead of applying one generic shortening pass; keep this Gene as a compliance-first dispatcher and decision record",
|
|
574
|
+
"Preserve complete delivery: retain user-preference, approval-gate, validation, and signature requirements while compressing their wording into stable policy references",
|
|
575
|
+
"Keep exact tool schemas available through the authorized runtime loader; routing Genes select a capability family and the runtime loader supplies authoritative parameters and validation",
|
|
576
|
+
"Validate the routed path by proving the selected Gene appears through selector or recall injection, the rendered hint stays under the injection ceiling, and an approved runtime loader can still provide the exact schema when needed"
|
|
577
|
+
],
|
|
578
|
+
"validation": [
|
|
579
|
+
"node --test test/contextSchemaRoutingGene.test.js test/recallInject.test.js test/selector.test.js",
|
|
580
|
+
"node scripts/validate-modules.js ./src/gep/assetStore ./src/gep/recallInject ./src/gep/selector ./src/gep/signals ./src/gep/contextRoutingGene ./src/gep/schemas/gene",
|
|
581
|
+
"node scripts/validate-suite.js"
|
|
582
|
+
],
|
|
583
|
+
"constraints": {
|
|
584
|
+
"max_files": 8,
|
|
585
|
+
"forbidden_paths": [
|
|
586
|
+
".git",
|
|
587
|
+
"node_modules"
|
|
588
|
+
]
|
|
589
|
+
},
|
|
590
|
+
"summary": "Dispatch Claude Code context-bloat work to specialized Genes while retaining approval gates and requiring exact schemas from authorized runtime loaders.",
|
|
591
|
+
"avoid": [
|
|
592
|
+
"using one broad summary when a narrower tool-schema, skill-manual, memory, or transcript compression Gene applies",
|
|
593
|
+
"summarizing away exact tool JSON schemas at the moment a real tool call needs runtime validation",
|
|
594
|
+
"removing user-preference, approval-gate, validation, or signature requirements merely to save tokens",
|
|
595
|
+
"treating lazy loading as a substitute for the runtime loader and its authoritative parameter contract"
|
|
596
|
+
],
|
|
597
|
+
"asset_id": "sha256:6a74dc27cf91a6c3ac802851a974a7dd86d658bb34fa9b1647a7756a797e3161"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"type": "Gene",
|
|
601
|
+
"category": "optimize",
|
|
602
|
+
"schema_version": "1.8.0",
|
|
603
|
+
"epigenetic_marks": [],
|
|
604
|
+
"learning_history": [],
|
|
605
|
+
"anti_patterns": [],
|
|
606
|
+
"routing_hint": {
|
|
607
|
+
"tier": "mid",
|
|
608
|
+
"reasoning_level": "medium"
|
|
609
|
+
},
|
|
610
|
+
"tool_policy": null,
|
|
611
|
+
"id": "gene_claude_tool_schema_lazy_load",
|
|
612
|
+
"signals_match": [
|
|
613
|
+
"tool_schema_bloat",
|
|
614
|
+
"mcp_tool_schema",
|
|
615
|
+
"lazy_load_schema",
|
|
616
|
+
"工具 schema 太大",
|
|
617
|
+
"tool schema too large",
|
|
618
|
+
"MCP tool schema"
|
|
619
|
+
],
|
|
620
|
+
"preconditions": [
|
|
621
|
+
"The fixed context includes full tool or MCP JSON schemas before the task has selected a tool family",
|
|
622
|
+
"The goal is to reduce always-on prompt load without weakening the exact schema available at call time"
|
|
623
|
+
],
|
|
624
|
+
"strategy": [
|
|
625
|
+
"Replace always-on full schemas with a compact tool-family card: capability name, trigger words, risk class, and a pointer to the authoritative schema loader",
|
|
626
|
+
"Delay expansion of exact parameter schemas until the planner selects that tool family or the model is about to emit a tool call",
|
|
627
|
+
"Keep schema validation at the tool boundary, not in the compressed prompt; invalid parameters must still be rejected by the runtime schema",
|
|
628
|
+
"Measure before and after: count always-on schema bytes/tokens, selected schema bytes/tokens, and total prompt size for a representative task",
|
|
629
|
+
"Regression-test at least one real tool call per lazy-loaded family so the compression cannot pass by merely hiding unavailable tools"
|
|
630
|
+
],
|
|
631
|
+
"validation": [
|
|
632
|
+
"node --test test/contextSchemaRoutingGene.test.js test/recallInject.test.js",
|
|
633
|
+
"node scripts/validate-modules.js ./src/gep/signals ./src/gep/recallInject ./src/gep/contextRoutingGene"
|
|
634
|
+
],
|
|
635
|
+
"constraints": {
|
|
636
|
+
"max_files": 12,
|
|
637
|
+
"forbidden_paths": [
|
|
638
|
+
".git",
|
|
639
|
+
"node_modules"
|
|
640
|
+
]
|
|
641
|
+
},
|
|
642
|
+
"summary": "Shrink always-on tool/MCP schema context by routing through compact tool-family cards and loading exact JSON schemas just in time.",
|
|
643
|
+
"avoid": [
|
|
644
|
+
"replacing exact schemas with natural-language guesses at call time",
|
|
645
|
+
"dropping enum constraints, required fields, or permission prompts from the runtime boundary",
|
|
646
|
+
"claiming savings without a before/after token measurement and one real tool-call regression"
|
|
647
|
+
],
|
|
648
|
+
"asset_id": "sha256:84fe72cb104f2806d68c0289663350252ee4ce5c1c752468eddc43ef95bbf326"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"type": "Gene",
|
|
652
|
+
"category": "optimize",
|
|
653
|
+
"schema_version": "1.8.0",
|
|
654
|
+
"epigenetic_marks": [],
|
|
655
|
+
"learning_history": [],
|
|
656
|
+
"anti_patterns": [],
|
|
657
|
+
"routing_hint": {
|
|
658
|
+
"tier": "mid",
|
|
659
|
+
"reasoning_level": "medium"
|
|
660
|
+
},
|
|
661
|
+
"tool_policy": null,
|
|
662
|
+
"id": "gene_claude_skill_manual_routing",
|
|
663
|
+
"signals_match": [
|
|
664
|
+
"skill_list_bloat",
|
|
665
|
+
"skill_manual_bloat",
|
|
666
|
+
"Available agent types",
|
|
667
|
+
"MCP Server Instructions",
|
|
668
|
+
"skill 列表太长",
|
|
669
|
+
"技能列表太长"
|
|
670
|
+
],
|
|
671
|
+
"preconditions": [
|
|
672
|
+
"The prompt includes many skill descriptions, agent type descriptions, or MCP server instructions unrelated to the current task",
|
|
673
|
+
"The harness can load a skill or manual after a routing decision is made"
|
|
674
|
+
],
|
|
675
|
+
"strategy": [
|
|
676
|
+
"Convert each long skill/manual into a short route card containing name, one-line capability, hard trigger, skip trigger, and safety class",
|
|
677
|
+
"Select at most the relevant skill/manual before loading its full instructions; do not inject every skill body on every turn",
|
|
678
|
+
"Keep slash-command and user-invocable skill names exact so the router never invents unavailable skills",
|
|
679
|
+
"Preserve mandatory global policy outside skill manuals when the policy applies across all tools, but move skill-local details behind the skill loader",
|
|
680
|
+
"Add tests that route a representative Lark/Pencil/Browser/Claude-API task to the right card while unrelated cards remain compressed"
|
|
681
|
+
],
|
|
682
|
+
"validation": [
|
|
683
|
+
"node --test test/contextSchemaRoutingGene.test.js",
|
|
684
|
+
"node scripts/validate-modules.js ./src/gep/signals ./src/gep/contextRoutingGene"
|
|
685
|
+
],
|
|
686
|
+
"constraints": {
|
|
687
|
+
"max_files": 12,
|
|
688
|
+
"forbidden_paths": [
|
|
689
|
+
".git",
|
|
690
|
+
"node_modules"
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
"summary": "Compress large skill, agent-type, and MCP instruction lists into route cards, loading full manuals only after the route is selected.",
|
|
694
|
+
"avoid": [
|
|
695
|
+
"embedding every skill manual because one task might need one of them",
|
|
696
|
+
"inventing skill names or aliases not present in the runtime registry",
|
|
697
|
+
"moving cross-cutting safety policy behind an optional skill loader"
|
|
698
|
+
],
|
|
699
|
+
"asset_id": "sha256:5d698cd132f4a9b32cc2e042de6131d8d175766acda50e8455d12358f1a5760c"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"type": "Gene",
|
|
703
|
+
"category": "optimize",
|
|
704
|
+
"schema_version": "1.8.0",
|
|
705
|
+
"epigenetic_marks": [],
|
|
706
|
+
"learning_history": [],
|
|
707
|
+
"anti_patterns": [],
|
|
708
|
+
"routing_hint": {
|
|
709
|
+
"tier": "mid",
|
|
710
|
+
"reasoning_level": "medium"
|
|
711
|
+
},
|
|
712
|
+
"tool_policy": null,
|
|
713
|
+
"id": "gene_claude_transcript_handoff_compression",
|
|
714
|
+
"signals_match": [
|
|
715
|
+
"transcript_context_bloat",
|
|
716
|
+
"conversation_handoff_bloat",
|
|
717
|
+
"pasted_transcript_bloat",
|
|
718
|
+
"随便传一个会话上下文就爆了",
|
|
719
|
+
"会话上下文就爆了",
|
|
720
|
+
"full transcript too large"
|
|
721
|
+
],
|
|
722
|
+
"preconditions": [
|
|
723
|
+
"A user or agent is transferring conversation context, logs, or transcript history into a new session",
|
|
724
|
+
"The receiving session needs task continuity, not every raw tool schema or every previous token"
|
|
725
|
+
],
|
|
726
|
+
"strategy": [
|
|
727
|
+
"Extract a handoff packet with: objective, current branch/worktree, changed files, decisions made, commands already run, failing/passing evidence, blockers, and next irreversible action",
|
|
728
|
+
"Drop raw tool schemas, repeated system prompts, screenshots already summarized, and low-level logs unless they are direct evidence for a current failure",
|
|
729
|
+
"Keep clickable file paths and exact failing command output snippets; preserve unresolved errors verbatim enough to reproduce them",
|
|
730
|
+
"Separate durable project memory from ephemeral transcript detail; save durable facts to memory only when they are non-obvious and future-relevant",
|
|
731
|
+
"Verify the handoff by asking whether an isolated agent can continue from the packet without reading the original full transcript"
|
|
732
|
+
],
|
|
733
|
+
"validation": [
|
|
734
|
+
"node --test test/contextSchemaRoutingGene.test.js",
|
|
735
|
+
"node scripts/validate-modules.js ./src/gep/signals ./src/gep/contextRoutingGene"
|
|
736
|
+
],
|
|
737
|
+
"constraints": {
|
|
738
|
+
"max_files": 8,
|
|
739
|
+
"forbidden_paths": [
|
|
740
|
+
".git",
|
|
741
|
+
"node_modules"
|
|
742
|
+
]
|
|
743
|
+
},
|
|
744
|
+
"summary": "Turn bulky pasted transcripts into compact handoff packets that preserve decisions, evidence, files, validation, and next actions.",
|
|
745
|
+
"avoid": [
|
|
746
|
+
"copying full transcripts, system prompts, or tool schemas into the next session by default",
|
|
747
|
+
"dropping exact failing output or branch/worktree state needed to continue safely",
|
|
748
|
+
"saving ephemeral conversation detail as durable memory"
|
|
749
|
+
],
|
|
750
|
+
"asset_id": "sha256:32903bb5e4813856091738d4bd99c1579843b5eccaa7661ab028ce010423cfcc"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"type": "Gene",
|
|
754
|
+
"category": "optimize",
|
|
755
|
+
"schema_version": "1.8.0",
|
|
756
|
+
"epigenetic_marks": [],
|
|
757
|
+
"learning_history": [],
|
|
758
|
+
"anti_patterns": [],
|
|
759
|
+
"routing_hint": {
|
|
760
|
+
"tier": "mid",
|
|
761
|
+
"reasoning_level": "medium"
|
|
762
|
+
},
|
|
763
|
+
"tool_policy": null,
|
|
764
|
+
"id": "gene_claude_memory_index_budget",
|
|
765
|
+
"signals_match": [
|
|
766
|
+
"memory_index_budget",
|
|
767
|
+
"memory_recall_budget",
|
|
768
|
+
"memory_index_bloat",
|
|
769
|
+
"memory_recall_bloat",
|
|
770
|
+
"memory index",
|
|
771
|
+
"memory recall",
|
|
772
|
+
"memory.md too large",
|
|
773
|
+
"memory 索引",
|
|
774
|
+
"memory 全量",
|
|
775
|
+
"MEMORY.md"
|
|
776
|
+
],
|
|
777
|
+
"preconditions": [
|
|
778
|
+
"Memory index or recalled memory bodies are suspected of consuming too much context",
|
|
779
|
+
"The system has a retrieval path that can inject only top relevant memories instead of the full memory store"
|
|
780
|
+
],
|
|
781
|
+
"strategy": [
|
|
782
|
+
"Measure the memory index separately from recalled memory bodies and from unrelated tool/MCP schema overhead",
|
|
783
|
+
"Keep the index as one-line hooks with links; move detailed facts into individual memory files retrieved by relevance",
|
|
784
|
+
"Set guardrails: index under roughly 5k tokens is usually acceptable, around 10k needs pruning, and full memory-body injection must be replaced by retrieval",
|
|
785
|
+
"When pruning, merge duplicate memories and delete stale wrong facts rather than deleting high-value durable constraints",
|
|
786
|
+
"Validate recall quality with representative prompts before and after pruning so context savings do not hide important project constraints"
|
|
787
|
+
],
|
|
788
|
+
"validation": [
|
|
789
|
+
"node --test test/contextSchemaRoutingGene.test.js",
|
|
790
|
+
"node scripts/validate-modules.js ./src/gep/signals ./src/gep/contextRoutingGene"
|
|
791
|
+
],
|
|
792
|
+
"constraints": {
|
|
793
|
+
"max_files": 8,
|
|
794
|
+
"forbidden_paths": [
|
|
795
|
+
".git",
|
|
796
|
+
"node_modules"
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
"summary": "Control memory context cost by keeping MEMORY.md as a lean index and relying on relevance-based recall for detailed memory bodies.",
|
|
800
|
+
"avoid": [
|
|
801
|
+
"blaming memory before measuring tool/MCP/skill schema overhead separately",
|
|
802
|
+
"injecting every memory body into every session",
|
|
803
|
+
"deleting durable user/project constraints just to make the index look smaller"
|
|
804
|
+
],
|
|
805
|
+
"asset_id": "sha256:c85f323d8e5f982c5d551409a9f9782a235e3e23ad16d035329b0a7446dd1884"
|
|
494
806
|
}
|
|
495
807
|
]
|
|
496
808
|
}
|
package/assets/logo.png
ADDED
|
Binary file
|
package/cli-options.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const PROXY_PATH_FLAGS = new Map([
|
|
6
|
+
['--home', 'home'],
|
|
7
|
+
['--store', 'store'],
|
|
8
|
+
['--settings', 'settings'],
|
|
9
|
+
['--env-file', 'envFile'],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
function expandHomePath(value, env = process.env) {
|
|
13
|
+
if (value === '~') return env.HOME || require('os').homedir();
|
|
14
|
+
if (value.startsWith('~/') || value.startsWith('~\\')) {
|
|
15
|
+
return path.join(env.HOME || require('os').homedir(), value.slice(2));
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function parseProxyCliPathOptions(argv, env = process.env) {
|
|
21
|
+
const options = {};
|
|
22
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
23
|
+
const arg = String(argv[index]);
|
|
24
|
+
const equalsIndex = arg.indexOf('=');
|
|
25
|
+
const flag = equalsIndex >= 0 ? arg.slice(0, equalsIndex) : arg;
|
|
26
|
+
const key = PROXY_PATH_FLAGS.get(flag);
|
|
27
|
+
if (!key) continue;
|
|
28
|
+
|
|
29
|
+
const value = equalsIndex >= 0 ? arg.slice(equalsIndex + 1) : argv[++index];
|
|
30
|
+
if (!value || !String(value).trim() || (equalsIndex < 0 && String(value).startsWith('-'))) {
|
|
31
|
+
throw new Error(flag + ' requires a path');
|
|
32
|
+
}
|
|
33
|
+
options[key] = path.resolve(expandHomePath(String(value).trim(), env));
|
|
34
|
+
}
|
|
35
|
+
return options;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function applyProxyCliPathOptions(options, env = process.env) {
|
|
39
|
+
if (options.envFile) env.EVOLVER_ENV_FILE = options.envFile;
|
|
40
|
+
if (options.home) {
|
|
41
|
+
env.EVOMAP_DIR = options.home;
|
|
42
|
+
env.EVOLVER_HOME = options.home;
|
|
43
|
+
env.EVOMAP_HOME = options.home;
|
|
44
|
+
env.EVOLVER_SETTINGS_DIR = options.home;
|
|
45
|
+
env.EVOLVER_PROXY_STORE = path.join(options.home, 'mailbox');
|
|
46
|
+
env.EVOLVER_PROXY_SETTINGS_FILE = path.join(options.home, 'settings.json');
|
|
47
|
+
env.EVOMAP_PROXY_TRACE_FILE = path.join(options.home, 'proxy', 'traces', 'proxy-traces.jsonl');
|
|
48
|
+
}
|
|
49
|
+
if (options.store) env.EVOLVER_PROXY_STORE = options.store;
|
|
50
|
+
if (options.settings) env.EVOLVER_PROXY_SETTINGS_FILE = options.settings;
|
|
51
|
+
return options;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function prepareProxyCliEnvironment(argv, env = process.env, dotenv = require('dotenv')) {
|
|
55
|
+
const options = parseProxyCliPathOptions(argv, env);
|
|
56
|
+
let envFile = { loaded: false, error: null };
|
|
57
|
+
const selectedEnvFile = options.envFile || env.EVOLVER_ENV_FILE;
|
|
58
|
+
if (selectedEnvFile) {
|
|
59
|
+
const resolvedEnvFile = path.resolve(expandHomePath(String(selectedEnvFile).trim(), env));
|
|
60
|
+
env.EVOLVER_ENV_FILE = resolvedEnvFile;
|
|
61
|
+
const result = dotenv.config({ path: resolvedEnvFile, processEnv: env });
|
|
62
|
+
envFile = { loaded: !result.error, error: result.error || null };
|
|
63
|
+
}
|
|
64
|
+
applyProxyCliPathOptions(options, env);
|
|
65
|
+
return { options, envFile };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = {
|
|
69
|
+
applyProxyCliPathOptions,
|
|
70
|
+
expandHomePath,
|
|
71
|
+
parseProxyCliPathOptions,
|
|
72
|
+
prepareProxyCliEnvironment,
|
|
73
|
+
};
|
package/index.js
CHANGED
|
@@ -206,6 +206,19 @@ if (process.argv[2] === 'proxy-token') {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
const {
|
|
210
|
+
applyProxyCliPathOptions,
|
|
211
|
+
prepareProxyCliEnvironment,
|
|
212
|
+
} = require('./cli-options');
|
|
213
|
+
|
|
214
|
+
let _proxyCliBootstrap = { options: {}, envFile: { loaded: false, error: null } };
|
|
215
|
+
let _proxyCliBootstrapError = null;
|
|
216
|
+
try {
|
|
217
|
+
_proxyCliBootstrap = prepareProxyCliEnvironment(process.argv.slice(2), process.env);
|
|
218
|
+
} catch (error) {
|
|
219
|
+
_proxyCliBootstrapError = error;
|
|
220
|
+
}
|
|
221
|
+
|
|
209
222
|
// Load .env BEFORE any internal require so that a2aProtocol and ATP
|
|
210
223
|
// modules see A2A_NODE_SECRET / A2A_NODE_ID / A2A_HUB_URL at first
|
|
211
224
|
// access and never fall back to a stale persisted/cached secret.
|
|
@@ -242,6 +255,9 @@ try {
|
|
|
242
255
|
if (_root && _root !== process.cwd()) {
|
|
243
256
|
require('dotenv').config({ path: _path.join(_root, '.env') });
|
|
244
257
|
}
|
|
258
|
+
// CLI paths have the highest priority, including over values loaded from
|
|
259
|
+
// either the selected env file or the repository defaults.
|
|
260
|
+
applyProxyCliPathOptions(_proxyCliBootstrap.options, process.env);
|
|
245
261
|
if (_prevQuiet === undefined) delete process.env.EVOLVER_QUIET_PARENT_GIT;
|
|
246
262
|
else process.env.EVOLVER_QUIET_PARENT_GIT = _prevQuiet;
|
|
247
263
|
} catch (e) { /* dotenv is optional */ }
|
|
@@ -831,6 +847,14 @@ function refuseHelloIfDaemonRunning(toolLabel) {
|
|
|
831
847
|
}
|
|
832
848
|
|
|
833
849
|
async function main() {
|
|
850
|
+
if (_proxyCliBootstrapError) {
|
|
851
|
+
console.error('[evolver] ' + _proxyCliBootstrapError.message);
|
|
852
|
+
process.exitCode = 1;
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
if (_proxyCliBootstrap.envFile.error) {
|
|
856
|
+
console.warn('[evolver] Failed to load --env-file: ' + _proxyCliBootstrap.envFile.error.message);
|
|
857
|
+
}
|
|
834
858
|
const args = process.argv.slice(2);
|
|
835
859
|
const command = args[0];
|
|
836
860
|
// Solo mode (--solo): the "constrained wild" profile. Implies loop (a solo
|
|
@@ -1450,6 +1474,7 @@ async function main() {
|
|
|
1450
1474
|
const { startProxy } = require('./src/proxy');
|
|
1451
1475
|
const proxyInfo = await startProxy({
|
|
1452
1476
|
hubUrl: process.env.A2A_HUB_URL,
|
|
1477
|
+
dataDir: process.env.EVOLVER_PROXY_STORE,
|
|
1453
1478
|
clientSettings: {},
|
|
1454
1479
|
});
|
|
1455
1480
|
console.log('[Proxy] Started on ' + proxyInfo.url);
|
|
@@ -3690,6 +3715,11 @@ async function main() {
|
|
|
3690
3715
|
(read versioned node secrets from a JSON file)
|
|
3691
3716
|
- --hub-private-key=<path>|--hub-private-key <path>
|
|
3692
3717
|
(decrypt hub_key_envelope trace rows with a local private key)
|
|
3718
|
+
- run path flags (CLI overrides environment variables):
|
|
3719
|
+
- --home=<dir> (root for assets, mailbox, settings, and traces)
|
|
3720
|
+
- --store=<dir> (mailbox store directory; EVOLVER_PROXY_STORE)
|
|
3721
|
+
- --settings=<path> (proxy settings file; EVOLVER_PROXY_SETTINGS_FILE)
|
|
3722
|
+
- --env-file=<path> (environment file; EVOLVER_ENV_FILE)
|
|
3693
3723
|
- webui flags:
|
|
3694
3724
|
- --port=<N> (local Web UI port, default 19821)
|
|
3695
3725
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evomap/evolver",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.94.0",
|
|
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": {
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"files": [
|
|
59
59
|
"assets/",
|
|
60
|
+
"cli-options.js",
|
|
60
61
|
"index.js",
|
|
61
62
|
"src/",
|
|
62
63
|
"scripts/",
|