@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.
- package/assets/team/agents/code-reviewer.md +48 -0
- package/assets/team/agents/docs-maintainer.md +51 -0
- package/assets/team/agents/implementation-engineer.md +51 -0
- package/assets/team/agents/product-scope-analyst.md +58 -0
- package/assets/team/agents/release-engineer.md +55 -0
- package/assets/team/agents/security-boundary-reviewer.md +50 -0
- package/assets/team/agents/solution-architect.md +51 -0
- package/assets/team/agents/verification-engineer.md +51 -0
- package/assets/team/team.md +102 -0
- package/dist/config/index.js +181 -125
- package/dist/index.js +10971 -9455
- package/package.json +1 -1
- package/src/agents/index.ts +1 -1
- package/src/code-agent-traces/index.ts +3 -10
- package/src/config/settings.ts +14 -0
- package/src/config/store.ts +1 -1
- package/src/daemon/index.ts +1 -1
- package/src/evolution/candidates/index.ts +235 -0
- package/src/evolution/control/index.ts +19 -0
- package/src/evolution/evidence/analysis.ts +529 -0
- package/src/evolution/evidence/index.ts +3 -0
- package/src/evolution/evidence/session-memory/constants.ts +12 -0
- package/src/evolution/evidence/session-memory/index.ts +4 -0
- package/src/evolution/evidence/session-memory/paths.ts +29 -0
- package/src/evolution/evidence/session-memory/policy.ts +39 -0
- package/src/evolution/evidence/session-memory/segment.ts +192 -0
- package/src/evolution/evidence/session-memory/state-machine.ts +249 -0
- package/src/evolution/evidence/session-memory/storage.ts +145 -0
- package/src/evolution/evidence/session-memory/types.ts +207 -0
- package/src/evolution/evidence/session-memory/updater.ts +184 -0
- package/src/evolution/formatters.ts +169 -0
- package/src/evolution/index.ts +12 -2827
- package/src/{knowledge → evolution/knowledge}/index.ts +7 -7
- package/src/evolution/paths.ts +41 -0
- package/src/evolution/processor/distillation.ts +436 -0
- package/src/evolution/processor/index.ts +3 -0
- package/src/evolution/processor/process.ts +306 -0
- package/src/evolution/schema.ts +522 -0
- package/src/evolution/shared.ts +677 -0
- package/src/evolution/triggers/classification.ts +102 -0
- package/src/evolution/triggers/index.ts +295 -0
- package/src/hooks/index.ts +56 -9
- package/src/index.ts +10 -2
- package/src/runtime-logs/index.ts +4 -12
- package/src/team/index.ts +576 -3
- package/src/utils/errors.ts +13 -0
- package/src/utils/fs.ts +40 -0
- package/src/utils/hash.ts +9 -0
- package/src/utils/ids.ts +12 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/parsing.ts +11 -0
- package/src/utils/text.ts +18 -0
- package/src/utils/time.ts +5 -0
- /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
|
+
}
|
package/src/utils/ids.ts
ADDED
|
@@ -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,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
|
+
}
|
|
File without changes
|