@evo-dev/core 0.0.1-alpha.2 → 0.0.1-alpha.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 (54) hide show
  1. package/assets/team/agents/code-reviewer.md +48 -0
  2. package/assets/team/agents/docs-maintainer.md +51 -0
  3. package/assets/team/agents/implementation-engineer.md +51 -0
  4. package/assets/team/agents/product-scope-analyst.md +58 -0
  5. package/assets/team/agents/release-engineer.md +55 -0
  6. package/assets/team/agents/security-boundary-reviewer.md +50 -0
  7. package/assets/team/agents/solution-architect.md +51 -0
  8. package/assets/team/agents/verification-engineer.md +51 -0
  9. package/assets/team/team.md +102 -0
  10. package/dist/config/index.js +181 -125
  11. package/dist/index.js +10971 -9455
  12. package/package.json +1 -1
  13. package/src/agents/index.ts +1 -1
  14. package/src/code-agent-traces/index.ts +3 -10
  15. package/src/config/settings.ts +14 -0
  16. package/src/config/store.ts +1 -1
  17. package/src/daemon/index.ts +1 -1
  18. package/src/evolution/candidates/index.ts +235 -0
  19. package/src/evolution/control/index.ts +19 -0
  20. package/src/evolution/evidence/analysis.ts +529 -0
  21. package/src/evolution/evidence/index.ts +3 -0
  22. package/src/evolution/evidence/session-memory/constants.ts +12 -0
  23. package/src/evolution/evidence/session-memory/index.ts +4 -0
  24. package/src/evolution/evidence/session-memory/paths.ts +29 -0
  25. package/src/evolution/evidence/session-memory/policy.ts +39 -0
  26. package/src/evolution/evidence/session-memory/segment.ts +192 -0
  27. package/src/evolution/evidence/session-memory/state-machine.ts +249 -0
  28. package/src/evolution/evidence/session-memory/storage.ts +145 -0
  29. package/src/evolution/evidence/session-memory/types.ts +207 -0
  30. package/src/evolution/evidence/session-memory/updater.ts +184 -0
  31. package/src/evolution/formatters.ts +169 -0
  32. package/src/evolution/index.ts +12 -2827
  33. package/src/{knowledge → evolution/knowledge}/index.ts +7 -7
  34. package/src/evolution/paths.ts +41 -0
  35. package/src/evolution/processor/distillation.ts +436 -0
  36. package/src/evolution/processor/index.ts +3 -0
  37. package/src/evolution/processor/process.ts +306 -0
  38. package/src/evolution/schema.ts +522 -0
  39. package/src/evolution/shared.ts +677 -0
  40. package/src/evolution/triggers/classification.ts +102 -0
  41. package/src/evolution/triggers/index.ts +295 -0
  42. package/src/hooks/index.ts +56 -9
  43. package/src/index.ts +10 -2
  44. package/src/runtime-logs/index.ts +4 -12
  45. package/src/team/index.ts +576 -3
  46. package/src/utils/errors.ts +13 -0
  47. package/src/utils/fs.ts +40 -0
  48. package/src/utils/hash.ts +9 -0
  49. package/src/utils/ids.ts +12 -0
  50. package/src/utils/index.ts +7 -0
  51. package/src/utils/parsing.ts +11 -0
  52. package/src/utils/text.ts +18 -0
  53. package/src/utils/time.ts +5 -0
  54. /package/src/{learning → evolution/review}/index.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import { createHash } from "node:crypto";
2
+
3
+ export function sha256Hex(value: string): string {
4
+ return createHash("sha256").update(value).digest("hex");
5
+ }
6
+
7
+ export function sha256Short(value: string, length = 16): string {
8
+ return sha256Hex(value).slice(0, length);
9
+ }
@@ -0,0 +1,12 @@
1
+ import { sha256Short } from "./hash.ts";
2
+
3
+ export function createStableId(prefix: string, parts: string[]): string {
4
+ return `${prefix}-${sha256Short(parts.join("\0"))}`;
5
+ }
6
+
7
+ export function sanitizeStorageId(value: string, fallbackPrefix: string): string {
8
+ const sanitized = value.replace(/[^a-zA-Z0-9._-]/g, "-").slice(0, 120);
9
+ return sanitized === "" || sanitized === "." || sanitized === ".."
10
+ ? `${fallbackPrefix}-local`
11
+ : sanitized;
12
+ }
@@ -0,0 +1,7 @@
1
+ export * from "./errors.ts";
2
+ export * from "./fs.ts";
3
+ export * from "./hash.ts";
4
+ export * from "./ids.ts";
5
+ export * from "./parsing.ts";
6
+ export * from "./text.ts";
7
+ export * from "./time.ts";
@@ -0,0 +1,11 @@
1
+ export function optionalString(value: unknown): string | null {
2
+ return typeof value === "string" && value.trim() !== "" ? value : null;
3
+ }
4
+
5
+ export function optionalBoolean(value: unknown, fallback: boolean): boolean {
6
+ return typeof value === "boolean" ? value : fallback;
7
+ }
8
+
9
+ export function positiveInteger(value: unknown, fallback: number): number {
10
+ return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : fallback;
11
+ }
@@ -0,0 +1,18 @@
1
+ export function sanitizeSummary(value: string): string {
2
+ const trimmed = value.replace(/\s+/g, " ").trim();
3
+ return trimmed.length === 0 ? "Session memory event observed." : trimmed.slice(0, 600);
4
+ }
5
+
6
+ export function truncateUtf8Tail(
7
+ value: string,
8
+ maxBytes: number,
9
+ ): { content: string; truncated: boolean } {
10
+ if (Buffer.byteLength(value, "utf8") <= maxBytes) {
11
+ return { content: value, truncated: false };
12
+ }
13
+ let content = value.slice(Math.max(0, value.length - maxBytes));
14
+ while (Buffer.byteLength(content, "utf8") > maxBytes && content.length > 0) {
15
+ content = content.slice(1);
16
+ }
17
+ return { content, truncated: true };
18
+ }
@@ -0,0 +1,5 @@
1
+ export function normalizeTimestamp(value?: string | Date): string {
2
+ if (value instanceof Date) return value.toISOString();
3
+ if (typeof value === "string" && value.trim() !== "") return new Date(value).toISOString();
4
+ return new Date().toISOString();
5
+ }
File without changes