@evo-dev/core 0.0.1-alpha.2 → 0.0.1-alpha.20

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 (79) hide show
  1. package/assets/skills/coding/knowledge-distillation/SKILL.md +5 -3
  2. package/assets/team/agents/code-reviewer.md +48 -0
  3. package/assets/team/agents/docs-maintainer.md +51 -0
  4. package/assets/team/agents/implementation-engineer.md +51 -0
  5. package/assets/team/agents/product-scope-analyst.md +58 -0
  6. package/assets/team/agents/release-engineer.md +55 -0
  7. package/assets/team/agents/security-boundary-reviewer.md +50 -0
  8. package/assets/team/agents/solution-architect.md +51 -0
  9. package/assets/team/agents/verification-engineer.md +51 -0
  10. package/assets/team/team.md +102 -0
  11. package/dist/assets/index.js +5 -5
  12. package/dist/config/index.js +793 -241
  13. package/dist/index.js +20840 -12908
  14. package/dist/plugins/index.js +13 -13
  15. package/package.json +1 -1
  16. package/src/agents/index.ts +1 -265
  17. package/src/code-agent-traces/index.ts +11 -12
  18. package/src/config/index.ts +2 -0
  19. package/src/config/settings.ts +116 -7
  20. package/src/config/store.ts +1 -1
  21. package/src/daemon/index.ts +1 -41
  22. package/src/evolution/candidates/index.ts +730 -0
  23. package/src/evolution/control/index.ts +20 -0
  24. package/src/evolution/evidence/analysis.ts +533 -0
  25. package/src/evolution/evidence/index.ts +3 -0
  26. package/src/evolution/evidence/session-memory/analysis.ts +287 -0
  27. package/src/evolution/evidence/session-memory/constants.ts +9 -0
  28. package/src/evolution/evidence/session-memory/index.ts +9 -0
  29. package/src/evolution/evidence/session-memory/paths.ts +29 -0
  30. package/src/evolution/evidence/session-memory/policy.ts +39 -0
  31. package/src/evolution/evidence/session-memory/retention.ts +643 -0
  32. package/src/evolution/evidence/session-memory/segment.ts +216 -0
  33. package/src/evolution/evidence/session-memory/semantic-packet.ts +408 -0
  34. package/src/evolution/evidence/session-memory/sensitivity.ts +335 -0
  35. package/src/evolution/evidence/session-memory/state-machine.ts +249 -0
  36. package/src/evolution/evidence/session-memory/storage.ts +744 -0
  37. package/src/evolution/evidence/session-memory/types.ts +296 -0
  38. package/src/evolution/evidence/session-memory/updater.ts +199 -0
  39. package/src/evolution/formatters.ts +169 -0
  40. package/src/evolution/imports/apply.ts +435 -0
  41. package/src/evolution/imports/diff.ts +472 -0
  42. package/src/evolution/imports/index.ts +7 -0
  43. package/src/evolution/imports/materialize.ts +640 -0
  44. package/src/evolution/imports/paths.ts +129 -0
  45. package/src/evolution/imports/stage.ts +414 -0
  46. package/src/evolution/imports/storage.ts +952 -0
  47. package/src/evolution/imports/types.ts +226 -0
  48. package/src/evolution/index.ts +19 -2827
  49. package/src/evolution/knowledge/change-store.ts +558 -0
  50. package/src/evolution/knowledge/changes.ts +459 -0
  51. package/src/evolution/knowledge/freshness.ts +69 -0
  52. package/src/{knowledge → evolution/knowledge}/index.ts +1532 -206
  53. package/src/evolution/knowledge/review.ts +446 -0
  54. package/src/evolution/knowledge/support.ts +135 -0
  55. package/src/evolution/paths.ts +44 -0
  56. package/src/evolution/processor/distillation.ts +518 -0
  57. package/src/evolution/processor/index.ts +3 -0
  58. package/src/evolution/processor/process.ts +594 -0
  59. package/src/{learning → evolution/review}/index.ts +10 -14
  60. package/src/evolution/schema.ts +639 -0
  61. package/src/evolution/shared.ts +1053 -0
  62. package/src/evolution/triggers/classification.ts +102 -0
  63. package/src/evolution/triggers/index.ts +295 -0
  64. package/src/hooks/index.ts +281 -197
  65. package/src/index.ts +15 -4
  66. package/src/projects/index.ts +934 -0
  67. package/src/runtime-logs/index.ts +100 -13
  68. package/src/team/index.ts +582 -3
  69. package/src/utils/errors.ts +13 -0
  70. package/src/utils/fs.ts +40 -0
  71. package/src/utils/hash.ts +9 -0
  72. package/src/utils/ids.ts +12 -0
  73. package/src/utils/index.ts +7 -0
  74. package/src/utils/parsing.ts +11 -0
  75. package/src/utils/text.ts +18 -0
  76. package/src/utils/time.ts +5 -0
  77. package/src/workflow/index.ts +3 -21
  78. package/src/project/index.ts +0 -507
  79. package/src/task/index.ts +0 -840
@@ -0,0 +1,226 @@
1
+ export const TRAJECTORY_IMPORT_PREVIEW_SCHEMA_VERSION = 1 as const;
2
+ export const TRAJECTORY_IMPORT_DIAGNOSTIC_POLICY_VERSION = 1 as const;
3
+
4
+ export type TrajectoryImportSource =
5
+ | "claude-code"
6
+ | "codex"
7
+ | "hermes"
8
+ | "letta-code"
9
+ | "openclaw"
10
+ | "openhands";
11
+
12
+ export type CanonicalImportRecordType =
13
+ | "meta"
14
+ | "user"
15
+ | "reasoning"
16
+ | "assistant"
17
+ | "assistant-tool-call"
18
+ | "tool";
19
+
20
+ export type CanonicalImportSourceIdentityKind = "native" | "location" | "content" | "synthetic";
21
+
22
+ export interface CanonicalImportSnapshot {
23
+ source: TrajectoryImportSource;
24
+ explicitSourceId: string | null;
25
+ inputBytes: number;
26
+ inputFingerprint: string;
27
+ normalizer: {
28
+ package: "@letta-ai/trajectory";
29
+ version: string;
30
+ canonicalSchemaVersion: number;
31
+ canonicalConfigHash: string;
32
+ };
33
+ groups: Array<{
34
+ sourceGroupId: string;
35
+ records: Array<{
36
+ recordId: string;
37
+ contentHash: string;
38
+ sourceOrderId: string;
39
+ componentIndex: number;
40
+ sourceIdentityKind: CanonicalImportSourceIdentityKind;
41
+ recordType: CanonicalImportRecordType;
42
+ recordJson: string;
43
+ }>;
44
+ }>;
45
+ diagnostics: Array<{ code: string }>;
46
+ }
47
+
48
+ export type TrajectoryImportDiagnosticSeverity = "info" | "warning" | "blocker";
49
+
50
+ export interface TrajectoryImportIndexRecordV1 {
51
+ schemaVersion: 1;
52
+ kind: "trajectory-import-index-record";
53
+ stableRecordKeyHash: string;
54
+ contentDigest: string;
55
+ ordinal: number;
56
+ sourceIdentityKind: CanonicalImportSourceIdentityKind;
57
+ recordType: CanonicalImportRecordType;
58
+ }
59
+
60
+ export interface TrajectoryImportGenerationContractV1 {
61
+ normalizerVersion: string;
62
+ canonicalSchemaVersion: number;
63
+ canonicalConfigHash: string;
64
+ }
65
+
66
+ export interface TrajectoryImportPreviousSnapshotV1 {
67
+ sourceKey: string;
68
+ generationId: string;
69
+ initialInputFingerprint: string;
70
+ generationContract: TrajectoryImportGenerationContractV1;
71
+ snapshotId: string;
72
+ records: TrajectoryImportIndexRecordV1[];
73
+ }
74
+
75
+ export interface TrajectoryImportMaterializationPreviewV1 {
76
+ selectedRecords: number;
77
+ estimatedSegments: number;
78
+ truncatedSegments: number;
79
+ credentialRedactions: number;
80
+ estimatedTriggers: number;
81
+ retentionDays: number;
82
+ }
83
+
84
+ export interface TrajectoryImportDownstreamPreviewV1 {
85
+ semanticProcessing: "queue-only" | "automation-eligible";
86
+ automationKnowledge: boolean;
87
+ automationSemanticKnowledge: boolean;
88
+ mayInvokeConfiguredProviderAfterApply: boolean;
89
+ }
90
+
91
+ export interface TrajectoryImportPreviewV1 {
92
+ schemaVersion: 1;
93
+ kind: "trajectory-import-preview";
94
+ id: string;
95
+ source: TrajectoryImportSource;
96
+ sourceKey: string;
97
+ projectKey: string | null;
98
+ scope: {
99
+ roleId: string | null;
100
+ };
101
+ input: {
102
+ bytes: number;
103
+ fingerprint: string;
104
+ pathHash: string;
105
+ };
106
+ normalizer: {
107
+ version: string;
108
+ canonicalSchemaVersion: number;
109
+ canonicalConfigHash: string;
110
+ };
111
+ contracts: {
112
+ diagnosticPolicyVersion: number;
113
+ materializerVersion: number;
114
+ materializerConfigHash: string;
115
+ };
116
+ generationId: string;
117
+ snapshotId: string;
118
+ previousSnapshotId: string | null;
119
+ records: {
120
+ total: number;
121
+ new: number;
122
+ unchanged: number;
123
+ changed: number;
124
+ missing: number;
125
+ recordTypes: Record<CanonicalImportRecordType, number>;
126
+ identityKinds: Record<CanonicalImportSourceIdentityKind, number>;
127
+ };
128
+ diagnostics: Array<{
129
+ code: string;
130
+ severity: TrajectoryImportDiagnosticSeverity;
131
+ count: number;
132
+ }>;
133
+ materialization: TrajectoryImportMaterializationPreviewV1 | null;
134
+ downstream: TrajectoryImportDownstreamPreviewV1;
135
+ blockers: string[];
136
+ canApply: boolean;
137
+ rawContentStored: false;
138
+ }
139
+
140
+ export interface CreateTrajectoryImportPreviewInput {
141
+ snapshot: CanonicalImportSnapshot;
142
+ projectKey?: string | null;
143
+ roleId?: string | null;
144
+ pathHash: string;
145
+ previous?: TrajectoryImportPreviousSnapshotV1 | null;
146
+ }
147
+
148
+ export interface TrajectoryImportPreviewBuildResult {
149
+ preview: TrajectoryImportPreviewV1;
150
+ comparisonSnapshot: TrajectoryImportPreviousSnapshotV1;
151
+ }
152
+
153
+ export type TrajectoryImportApplyState = "staged" | "materializing" | "completed";
154
+
155
+ export interface TrajectoryImportManifestV1 {
156
+ schemaVersion: 1;
157
+ kind: "trajectory-import-manifest";
158
+ source: TrajectoryImportSource;
159
+ sourceKey: string;
160
+ projectKey: string;
161
+ scope: {
162
+ roleId: string | null;
163
+ };
164
+ currentGenerationId: string;
165
+ initialInputFingerprint: string;
166
+ generationContract: TrajectoryImportGenerationContractV1;
167
+ currentSnapshotId: string;
168
+ previousSnapshotId: string | null;
169
+ currentPreviewId: string;
170
+ currentInputFingerprint: string;
171
+ currentInputBytes: number;
172
+ currentIndexDigest: string;
173
+ stagedAt: string;
174
+ applyState: TrajectoryImportApplyState;
175
+ latestMaterializedSnapshotId: string | null;
176
+ rawContentStored: false;
177
+ }
178
+
179
+ export interface TrajectoryImportReceiptV1 {
180
+ schemaVersion: 1;
181
+ kind: "trajectory-import-receipt";
182
+ previewId: string;
183
+ sourceKey: string;
184
+ generationId: string;
185
+ snapshotId: string;
186
+ operation: "stage" | "materialize";
187
+ outcome: "staged" | "completed";
188
+ counts: {
189
+ total: number;
190
+ new: number;
191
+ unchanged: number;
192
+ changed: number;
193
+ missing: number;
194
+ };
195
+ createdAt: string;
196
+ rawContentStored: false;
197
+ }
198
+
199
+ export interface StageTrajectoryImportInput {
200
+ homeDir: string;
201
+ preview: TrajectoryImportPreviewV1;
202
+ comparisonSnapshot: TrajectoryImportPreviousSnapshotV1;
203
+ now?: string;
204
+ }
205
+
206
+ export interface StageTrajectoryImportResult {
207
+ status: "staged" | "unchanged";
208
+ manifest: TrajectoryImportManifestV1;
209
+ receipt: TrajectoryImportReceiptV1;
210
+ stateWrites: string[];
211
+ }
212
+
213
+ export interface TrajectoryImportMaterializationProgressV1 {
214
+ schemaVersion: 1;
215
+ kind: "trajectory-import-materialization-progress";
216
+ previewId: string;
217
+ sourceKey: string;
218
+ generationId: string;
219
+ snapshotId: string;
220
+ expectedSegmentIds: string[];
221
+ completedSegmentIds: string[];
222
+ expectedTriggerIds: string[];
223
+ completedTriggerIds: string[];
224
+ updatedAt: string;
225
+ rawContentStored: false;
226
+ }