@evo-dev/core 0.0.1-alpha → 0.0.1-alpha.10

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 (85) hide show
  1. package/assets/agents/review/code-reviewer/examples.md +1 -1
  2. package/assets/agents/review/code-reviewer/prompt.md +1 -1
  3. package/assets/agents/review/code-reviewer/verification.md +1 -1
  4. package/assets/skills/coding/knowledge-distillation/SKILL.md +251 -0
  5. package/assets/skills/coding/knowledge-distillation/manifest.json +10 -0
  6. package/assets/skills/coding/knowledge-distillation/references/knowledge-distillation-methods.md +126 -0
  7. package/assets/team/agents/code-reviewer.md +48 -0
  8. package/assets/team/agents/docs-maintainer.md +51 -0
  9. package/assets/team/agents/implementation-engineer.md +51 -0
  10. package/assets/team/agents/product-scope-analyst.md +58 -0
  11. package/assets/team/agents/release-engineer.md +55 -0
  12. package/assets/team/agents/security-boundary-reviewer.md +50 -0
  13. package/assets/team/agents/solution-architect.md +51 -0
  14. package/assets/team/agents/verification-engineer.md +51 -0
  15. package/assets/team/team.md +102 -0
  16. package/assets/workflows/rd-bug-fix/WORKFLOW.json +1 -1
  17. package/assets/workflows/rd-code-review/WORKFLOW.json +1 -1
  18. package/assets/workflows/rd-docs-update/WORKFLOW.json +1 -1
  19. package/assets/workflows/rd-feature-implementation/WORKFLOW.json +1 -1
  20. package/assets/workflows/rd-refactor/WORKFLOW.json +1 -1
  21. package/assets/workflows/rd-release-readiness/WORKFLOW.json +1 -1
  22. package/assets/workflows/rd-security-boundary-review/WORKFLOW.json +2 -2
  23. package/assets/workflows/rd-test-generation/WORKFLOW.json +1 -1
  24. package/dist/config/index.js +1115 -81
  25. package/dist/index.js +13796 -2196
  26. package/dist/plugins/index.js +32 -32
  27. package/package.json +5 -1
  28. package/src/agents/index.ts +63 -292
  29. package/src/code-agent-traces/index.ts +520 -0
  30. package/src/config/index.ts +7 -0
  31. package/src/config/paths.ts +30 -0
  32. package/src/config/settings.ts +201 -0
  33. package/src/config/store.ts +152 -0
  34. package/src/daemon/index.ts +462 -40
  35. package/src/evolution/candidates/index.ts +564 -0
  36. package/src/evolution/control/index.ts +20 -0
  37. package/src/evolution/evidence/analysis.ts +533 -0
  38. package/src/evolution/evidence/index.ts +3 -0
  39. package/src/evolution/evidence/session-memory/analysis.ts +281 -0
  40. package/src/evolution/evidence/session-memory/constants.ts +9 -0
  41. package/src/evolution/evidence/session-memory/index.ts +7 -0
  42. package/src/evolution/evidence/session-memory/paths.ts +29 -0
  43. package/src/evolution/evidence/session-memory/policy.ts +39 -0
  44. package/src/evolution/evidence/session-memory/segment.ts +202 -0
  45. package/src/evolution/evidence/session-memory/sensitivity.ts +335 -0
  46. package/src/evolution/evidence/session-memory/state-machine.ts +249 -0
  47. package/src/evolution/evidence/session-memory/storage.ts +379 -0
  48. package/src/evolution/evidence/session-memory/types.ts +221 -0
  49. package/src/evolution/evidence/session-memory/updater.ts +191 -0
  50. package/src/evolution/formatters.ts +169 -0
  51. package/src/evolution/index.ts +16 -0
  52. package/src/evolution/knowledge/index.ts +5427 -0
  53. package/src/evolution/paths.ts +44 -0
  54. package/src/evolution/processor/distillation.ts +518 -0
  55. package/src/evolution/processor/index.ts +3 -0
  56. package/src/evolution/processor/process.ts +528 -0
  57. package/src/{learning → evolution/review}/index.ts +10 -14
  58. package/src/evolution/schema.ts +568 -0
  59. package/src/evolution/shared.ts +758 -0
  60. package/src/evolution/triggers/classification.ts +102 -0
  61. package/src/evolution/triggers/index.ts +295 -0
  62. package/src/hooks/index.ts +652 -376
  63. package/src/index.ts +16 -3
  64. package/src/pack/index.ts +13 -13
  65. package/src/plugins/capabilities.ts +40 -42
  66. package/src/plugins/index.ts +0 -1
  67. package/src/plugins/types.ts +4 -0
  68. package/src/projects/index.ts +453 -0
  69. package/src/protected-zones/index.ts +29 -11
  70. package/src/runtime-logs/index.ts +790 -0
  71. package/src/sync/orchestrator.ts +6 -0
  72. package/src/team/index.ts +3642 -0
  73. package/src/team/mcp.ts +405 -0
  74. package/src/team/prompts.ts +141 -0
  75. package/src/utils/errors.ts +13 -0
  76. package/src/utils/fs.ts +40 -0
  77. package/src/utils/hash.ts +9 -0
  78. package/src/utils/ids.ts +12 -0
  79. package/src/utils/index.ts +7 -0
  80. package/src/utils/parsing.ts +11 -0
  81. package/src/utils/text.ts +18 -0
  82. package/src/utils/time.ts +5 -0
  83. package/src/workflow/index.ts +6 -24
  84. package/src/project/index.ts +0 -507
  85. package/src/task/index.ts +0 -840
package/src/index.ts CHANGED
@@ -1,14 +1,27 @@
1
1
  export * from "./agents/index.ts";
2
2
  export * from "./assets/index.ts";
3
+ export * from "./code-agent-traces/index.ts";
3
4
  export * from "./config/index.ts";
4
5
  export * from "./daemon/index.ts";
6
+ export * from "./evolution/index.ts";
7
+ export * as evolutionCandidates from "./evolution/candidates/index.ts";
8
+ export * as evolutionControl from "./evolution/control/index.ts";
9
+ export * as evolutionEvidence from "./evolution/evidence/index.ts";
10
+ export * from "./evolution/evidence/session-memory/index.ts";
11
+ export * from "./evolution/knowledge/index.ts";
12
+ export * as evolutionKnowledge from "./evolution/knowledge/index.ts";
13
+ export * as evolutionProcessor from "./evolution/processor/index.ts";
14
+ export * from "./evolution/review/index.ts";
15
+ export * as evolutionReview from "./evolution/review/index.ts";
16
+ export * as evolutionTriggers from "./evolution/triggers/index.ts";
5
17
  export * from "./hooks/index.ts";
6
- export * from "./learning/index.ts";
7
18
  export * from "./observability/index.ts";
8
19
  export * from "./pack/index.ts";
9
20
  export * from "./plugins/index.ts";
10
- export * from "./project/index.ts";
11
21
  export * from "./protected-zones/index.ts";
22
+ export * from "./projects/index.ts";
23
+ export * from "./runtime-logs/index.ts";
12
24
  export * from "./sync/index.ts";
13
- export * from "./task/index.ts";
25
+ export * from "./team/index.ts";
26
+ export * from "./team/mcp.ts";
14
27
  export * from "./workflow/index.ts";
package/src/pack/index.ts CHANGED
@@ -107,7 +107,7 @@ export interface PackInstallDryRunPlan {
107
107
  riskyCapabilities: string[];
108
108
  verificationPlan: string[];
109
109
  uninstallPlan: string[];
110
- blockers: string[];
110
+ advisories: string[];
111
111
  warnings: string[];
112
112
  }
113
113
 
@@ -125,7 +125,7 @@ const RISKY_PERMISSION_LABELS: Record<keyof PackPermissions, string> = {
125
125
  readsSourceContent: "reads source content",
126
126
  readsProjectMetadata: "reads project metadata",
127
127
  };
128
- const FIRST_SLICE_DENIED_PERMISSIONS: Array<keyof PackPermissions> = [
128
+ const FIRST_SLICE_OUT_OF_SCOPE_PERMISSIONS: Array<keyof PackPermissions> = [
129
129
  "writesProjectFiles",
130
130
  "usesHooks",
131
131
  "usesNetwork",
@@ -203,14 +203,14 @@ export async function planPackInstallDryRun(
203
203
  const manifest = validation.manifest;
204
204
  const plannedWrites: PackInstallAction[] = [];
205
205
  const warnings: string[] = [];
206
- const blockers = validation.findings
206
+ const advisories = validation.findings
207
207
  .filter((finding) => finding.severity === "error")
208
208
  .map(
209
209
  (finding) => `${finding.code}${finding.path ? ` ${finding.path}` : ""}: ${finding.message}`,
210
210
  );
211
211
 
212
212
  if (manifest === undefined) {
213
- blockers.push("Cannot plan install because PACK.json is invalid or missing.");
213
+ advisories.push("Cannot plan install because PACK.json is invalid or missing.");
214
214
  } else {
215
215
  const permissions = normalizePackPermissions(manifest.permissions);
216
216
  if (!permissions.writesUserConfig) {
@@ -249,7 +249,7 @@ export async function planPackInstallDryRun(
249
249
  "confirmation required before future uninstall",
250
250
  "deleteUserContent=false; customizations and user content must be preserved",
251
251
  ],
252
- blockers,
252
+ advisories,
253
253
  warnings,
254
254
  };
255
255
  }
@@ -359,7 +359,7 @@ export function formatPackValidation(result: PackValidationResult): string {
359
359
  : `Pack: ${manifest.id}@${manifest.version} (${manifest.name})`,
360
360
  `Assets: ${result.assets.length}`,
361
361
  `Scanned paths: ${result.scannedPaths.length}`,
362
- `Protected-zone blockers: ${result.protectedZoneFindings.length}`,
362
+ `Protected-zone advisories: ${result.protectedZoneFindings.length}`,
363
363
  "",
364
364
  "Findings:",
365
365
  ...(result.findings.length === 0
@@ -380,7 +380,7 @@ export function formatPackInstallDryRun(plan: PackInstallDryRunPlan): string {
380
380
  ? "Pack: unknown"
381
381
  : `Pack: ${manifest.id}@${manifest.version} (${manifest.name})`,
382
382
  "Mode: dry-run (no writes)",
383
- `Status: ${plan.blockers.length === 0 ? "PASS" : "FAIL"}`,
383
+ `Status: ${plan.advisories.length === 0 ? "PASS" : "ADVISORY"}`,
384
384
  "",
385
385
  `Source: ${plan.validation.source}`,
386
386
  "",
@@ -417,7 +417,7 @@ export function formatPackInstallDryRun(plan: PackInstallDryRunPlan): string {
417
417
  ...(plan.validation.protectedZoneFindings.length === 0
418
418
  ? [" - PASS"]
419
419
  : plan.validation.protectedZoneFindings.map(
420
- (finding) => ` - BLOCKER ${finding.ruleId} ${finding.path}: ${finding.reason}`,
420
+ (finding) => ` - ADVISORY ${finding.ruleId} ${finding.path}: ${finding.reason}`,
421
421
  )),
422
422
  "",
423
423
  "Verification plan:",
@@ -435,10 +435,10 @@ export function formatPackInstallDryRun(plan: PackInstallDryRunPlan): string {
435
435
  ? [" - none"]
436
436
  : plan.warnings.map((warning) => ` - ${warning}`)),
437
437
  "",
438
- "Blockers:",
439
- ...(plan.blockers.length === 0
438
+ "Advisories:",
439
+ ...(plan.advisories.length === 0
440
440
  ? [" - none"]
441
- : plan.blockers.map((blocker) => ` - ${blocker}`)),
441
+ : plan.advisories.map((advisory) => ` - ${advisory}`)),
442
442
  ].join("\n");
443
443
  }
444
444
 
@@ -502,11 +502,11 @@ function validatePermissionBoundaries(
502
502
  findings: PackValidationFinding[],
503
503
  ): void {
504
504
  const permissions = normalizePackPermissions(manifest.permissions);
505
- for (const permission of FIRST_SLICE_DENIED_PERMISSIONS) {
505
+ for (const permission of FIRST_SLICE_OUT_OF_SCOPE_PERMISSIONS) {
506
506
  if (permissions[permission]) {
507
507
  findings.push({
508
508
  severity: "error",
509
- code: "permission-denied-first-slice",
509
+ code: "permission-out-of-scope-first-slice",
510
510
  message: `${permission} is outside I6 local validate/install dry-run scope.`,
511
511
  });
512
512
  }
@@ -11,7 +11,7 @@ export interface PluginCapabilityNegotiation {
11
11
  hooks: CapabilityState;
12
12
  canPlanWrites: boolean;
13
13
  warnings: string[];
14
- blockers: string[];
14
+ advisories: string[];
15
15
  }
16
16
 
17
17
  export interface CodexCapabilityVerificationArtifact {
@@ -34,9 +34,9 @@ export interface CodexCapabilityVerificationArtifact {
34
34
  version: string | null;
35
35
  };
36
36
  capabilities: {
37
- skills: "unverified";
38
- agents: "unverified";
39
- hooks: "unverified";
37
+ skills: "plugin-bundled";
38
+ agents: "user-level-toml-sync";
39
+ hooks: "plugin-manifest-hooks";
40
40
  };
41
41
  writeBoundary: {
42
42
  writesAllowed: false;
@@ -55,7 +55,7 @@ export interface CodexCapabilityVerificationArtifact {
55
55
  secretsStored: false;
56
56
  externalUpload: false;
57
57
  };
58
- blockers: string[];
58
+ advisories: string[];
59
59
  diagnostics: string[];
60
60
  evidenceRefs: string[];
61
61
  evidence: {
@@ -74,7 +74,7 @@ export function createUnknownNegotiatedCapabilities(pluginId: string): PluginCap
74
74
  hooks: "unsupported",
75
75
  canPlanWrites: false,
76
76
  warnings: [],
77
- blockers: [`Plugin ${pluginId} capabilities are unknown and unsupported.`],
77
+ advisories: [`Plugin ${pluginId} capabilities are unknown and unsupported.`],
78
78
  };
79
79
  }
80
80
 
@@ -82,12 +82,6 @@ export function isCapabilityUsable(state: CapabilityState): boolean {
82
82
  return state === "enabled";
83
83
  }
84
84
 
85
- export function assertNoUnverifiedWrites(negotiation: PluginCapabilityNegotiation): void {
86
- if (!negotiation.canPlanWrites) {
87
- throw new Error(`Plugin ${negotiation.pluginId} has no verified enabled write capabilities.`);
88
- }
89
- }
90
-
91
85
  export function negotiatePluginCapabilities(input: {
92
86
  pluginId: string;
93
87
  declared: CodeAgentCapabilities;
@@ -95,29 +89,27 @@ export function negotiatePluginCapabilities(input: {
95
89
  enabled: boolean;
96
90
  }): PluginCapabilityNegotiation {
97
91
  if (input.pluginId === "codex") {
98
- const declaredSupport = [
99
- input.declared.skills.supported ? "skills" : null,
100
- input.declared.agents.supported ? "agents" : null,
101
- input.declared.hooks.supported ? "hooks" : null,
102
- ].filter(Boolean);
103
- const blockers = ["Codex capabilities are unverified; writes are unsupported in I10."];
92
+ const advisories: string[] = [];
104
93
  const warnings = [
105
94
  input.verified
106
- ? "Codex readonly verification artifact exists; sync remains no-write until formats are verified."
95
+ ? "Codex metadata-only verification artifact exists; implemented Codex skill/agent distribution remains governed by adapter tests."
96
+ : null,
97
+ input.declared.skills.supported
98
+ ? "Codex skills are distributed through the EvoDev Codex plugin bundle, not direct user-directory skill sync."
107
99
  : null,
108
- declaredSupport.length > 0
109
- ? `Codex declares ${declaredSupport.join(", ")} support, but declared support alone cannot authorize writes.`
100
+ input.declared.agents.supported
101
+ ? "Codex agents can sync to user-level TOML files with no-overwrite semantics."
110
102
  : null,
111
103
  ].filter((warning): warning is string => warning !== null);
112
104
 
113
105
  return {
114
106
  pluginId: input.pluginId,
115
- skills: input.declared.skills.supported ? "unverified" : "unsupported",
116
- agents: input.declared.agents.supported ? "unverified" : "unsupported",
117
- hooks: input.declared.hooks.supported ? "unverified" : "unsupported",
118
- canPlanWrites: false,
107
+ skills: resolveNonCodexCapabilityState(input.declared.skills.supported, input.enabled),
108
+ agents: resolveNonCodexCapabilityState(input.declared.agents.supported, input.enabled),
109
+ hooks: resolveNonCodexCapabilityState(input.declared.hooks.supported, input.enabled),
110
+ canPlanWrites: input.enabled && input.declared.agents.supported,
119
111
  warnings,
120
- blockers,
112
+ advisories,
121
113
  };
122
114
  }
123
115
  return {
@@ -130,9 +122,9 @@ export function negotiatePluginCapabilities(input: {
130
122
  warnings: input.enabled
131
123
  ? []
132
124
  : [
133
- `Plugin ${input.pluginId} has declared capabilities but is not enabled; writes are not authorized.`,
125
+ `Plugin ${input.pluginId} has declared capabilities but is not enabled for write planning.`,
134
126
  ],
135
- blockers: [],
127
+ advisories: [],
136
128
  };
137
129
  }
138
130
 
@@ -148,7 +140,9 @@ export async function createCodexCapabilityVerificationArtifact(input: {
148
140
  const timestamp = input.createdAt ?? new Date().toISOString();
149
141
  const detectionMessage = sanitizeText(input.detection.message);
150
142
  const diagnostics = [
151
- "Codex remains no-write until concrete user-level paths and formats are verified.",
143
+ "Codex skills are packaged in the EvoDev Codex plugin payload.",
144
+ "Codex agents sync to user-level TOML files under ~/.codex/agents.",
145
+ "Codex hooks are supplied by the EvoDev Codex plugin manifest and enabled through Codex plugin hooks.",
152
146
  ];
153
147
  return {
154
148
  version: 1,
@@ -165,7 +159,11 @@ export async function createCodexCapabilityVerificationArtifact(input: {
165
159
  externalUpload: false,
166
160
  networkUsed: false,
167
161
  toolSummary: { tool: "codex", detectionStatus: input.detection.status, version: null },
168
- capabilities: { skills: "unverified", agents: "unverified", hooks: "unverified" },
162
+ capabilities: {
163
+ skills: "plugin-bundled",
164
+ agents: "user-level-toml-sync",
165
+ hooks: "plugin-manifest-hooks",
166
+ },
169
167
  writeBoundary: {
170
168
  writesAllowed: false,
171
169
  allowedPaths: [],
@@ -183,7 +181,7 @@ export async function createCodexCapabilityVerificationArtifact(input: {
183
181
  secretsStored: false,
184
182
  externalUpload: false,
185
183
  },
186
- blockers: ["Codex asset capabilities are unverified and unsupported for writes in I10."],
184
+ advisories: [],
187
185
  diagnostics,
188
186
  evidenceRefs: [],
189
187
  evidence: {
@@ -191,7 +189,8 @@ export async function createCodexCapabilityVerificationArtifact(input: {
191
189
  detectionMessage,
192
190
  writesAllowed: false,
193
191
  notes: [
194
- "Metadata-only readonly artifact; no Codex paths, formats, hooks, or writes verified.",
192
+ "Metadata-only verification artifact; it does not probe or write Code Agent directories.",
193
+ "Implemented Codex asset distribution is covered by adapter tests: plugin-bundled skills and user-level TOML agents.",
195
194
  ],
196
195
  },
197
196
  };
@@ -275,12 +274,12 @@ export function formatCodexCapabilityVerificationArtifact(
275
274
  `Status: ${artifact.status}`,
276
275
  `Artifact: ${path ?? "dry-run only"}`,
277
276
  `Verified at: ${artifact.verifiedAt}`,
278
- "Capabilities: skills=unverified agents=unverified hooks=unverified",
279
- "Writes allowed: false",
277
+ `Capabilities: skills=${artifact.capabilities.skills} agents=${artifact.capabilities.agents} hooks=${artifact.capabilities.hooks}`,
278
+ "Verification writes allowed: false",
280
279
  "Allowed paths: none",
281
- "User-level write paths verified: false",
280
+ "User-level agent sync path: ~/.codex/agents",
282
281
  "Project writes allowed: false",
283
- "No-overwrite verified: false",
282
+ "No-overwrite policy: skip existing files unless force refresh is requested",
284
283
  `External upload: ${artifact.externalUpload}`,
285
284
  `Detection: ${artifact.evidence.detectionStatus}`,
286
285
  ...artifact.evidence.notes.map((note) => `Note: ${note}`),
@@ -301,12 +300,11 @@ export async function runPluginConformance(
301
300
  }
302
301
  if (plugin.id === "codex") {
303
302
  const capabilities = await plugin.getCapabilities();
304
- if (
305
- capabilities.skills.supported ||
306
- capabilities.agents.supported ||
307
- capabilities.hooks.supported
308
- ) {
309
- findings.push("Codex must not declare verified runtime support in I10.");
303
+ if (!capabilities.skills.supported || !capabilities.agents.supported) {
304
+ findings.push("Codex must declare plugin-bundled skills and user-level TOML agents.");
305
+ }
306
+ if (!capabilities.hooks.supported || capabilities.hooks.events.length === 0) {
307
+ findings.push("Codex must declare plugin-manifest hook support.");
310
308
  }
311
309
  }
312
310
  return { ok: findings.length === 0, findings };
@@ -2,7 +2,6 @@ export {
2
2
  type CapabilityState,
3
3
  type CodexCapabilityVerificationArtifact,
4
4
  type PluginCapabilityNegotiation,
5
- assertNoUnverifiedWrites,
6
5
  createCodexCapabilityVerificationArtifact,
7
6
  createUnknownNegotiatedCapabilities,
8
7
  formatCodexCapabilityVerificationArtifact,
@@ -70,16 +70,19 @@ export interface SyncSkillsInput {
70
70
  targetPlugin: PluginId;
71
71
  skills: ScannedAsset<SkillManifest>[];
72
72
  dryRun: boolean;
73
+ force?: boolean;
73
74
  }
74
75
 
75
76
  export interface SyncAgentsInput {
76
77
  targetPlugin: PluginId;
77
78
  agents: ScannedAsset<AgentManifest>[];
78
79
  dryRun: boolean;
80
+ force?: boolean;
79
81
  }
80
82
 
81
83
  export interface PluginInstallInput {
82
84
  targetPlugin: PluginId;
85
+ force?: boolean;
83
86
  }
84
87
 
85
88
  export type PluginInstallStatus = "installed" | "already-installed" | "skipped" | "failed";
@@ -108,6 +111,7 @@ export interface SyncPlan {
108
111
  skills: ScannedAsset<SkillManifest>[];
109
112
  agents: ScannedAsset<AgentManifest>[];
110
113
  dryRun: boolean;
114
+ force: boolean;
111
115
  }
112
116
 
113
117
  export interface CodeAgentPlugin {