@evo-dev/core 0.0.1-alpha.16 → 0.0.1-alpha.18

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.
@@ -1486,6 +1486,9 @@ function createDefaultMemorySettings() {
1486
1486
  }
1487
1487
  function createDefaultEvolutionSettings() {
1488
1488
  return {
1489
+ schedule: {
1490
+ dailyTime: "02:00"
1491
+ },
1489
1492
  automation: {
1490
1493
  knowledge: true,
1491
1494
  semanticKnowledge: false,
@@ -1537,6 +1540,10 @@ function mergeSettings(existing, defaults = createDefaultSettings()) {
1537
1540
  evolution: {
1538
1541
  ...defaults.evolution,
1539
1542
  ...existing.evolution,
1543
+ schedule: {
1544
+ ...defaults.evolution.schedule,
1545
+ ...existing.evolution?.schedule
1546
+ },
1540
1547
  automation: {
1541
1548
  ...defaults.evolution.automation,
1542
1549
  ...existing.evolution?.automation
@@ -1595,8 +1602,12 @@ function parseSettings(value) {
1595
1602
  function parseEvolutionSettings(value, path) {
1596
1603
  const input = expectRecord2(value, path);
1597
1604
  const defaults = createDefaultEvolutionSettings();
1605
+ const schedule = expectRecord2(input.schedule ?? defaults.schedule, `${path}.schedule`);
1598
1606
  const automation = expectRecord2(input.automation ?? defaults.automation, `${path}.automation`);
1599
1607
  return {
1608
+ schedule: {
1609
+ dailyTime: parseDailyTime(schedule.dailyTime ?? defaults.schedule.dailyTime, `${path}.schedule.dailyTime`)
1610
+ },
1600
1611
  automation: {
1601
1612
  knowledge: automation.knowledge === undefined ? defaults.automation.knowledge : expectBoolean(automation.knowledge, `${path}.automation.knowledge`),
1602
1613
  semanticKnowledge: automation.semanticKnowledge === undefined ? defaults.automation.semanticKnowledge : expectBoolean(automation.semanticKnowledge, `${path}.automation.semanticKnowledge`),
@@ -1604,6 +1615,14 @@ function parseEvolutionSettings(value, path) {
1604
1615
  }
1605
1616
  };
1606
1617
  }
1618
+ function parseDailyTime(value, path) {
1619
+ const dailyTime = expectString2(value, path);
1620
+ const match = /^(\d{2}):(\d{2})$/u.exec(dailyTime);
1621
+ if (match === null || Number(match[1]) > 23 || Number(match[2]) > 59) {
1622
+ throw new EvoDevConfigError(`Invalid ${path}; expected a 24-hour HH:MM time`);
1623
+ }
1624
+ return dailyTime;
1625
+ }
1607
1626
  function parseMemorySettings(value, path) {
1608
1627
  const input = expectRecord2(value, path);
1609
1628
  const defaults = createDefaultMemorySettings();
package/dist/index.js CHANGED
@@ -6873,6 +6873,9 @@ function buildCodexArgs(role, startupPrompt) {
6873
6873
  const args = ["--no-alt-screen"];
6874
6874
  if (role.model !== null)
6875
6875
  args.push("--model", role.model);
6876
+ if (role.thinkingLevel !== null) {
6877
+ args.push("--config", `model_reasoning_effort=${JSON.stringify(role.thinkingLevel)}`);
6878
+ }
6876
6879
  if (shouldPassVisibleStartupPrompt(role))
6877
6880
  args.push(startupPrompt);
6878
6881
  return args;
@@ -6881,6 +6884,9 @@ function buildCodexResumeArgs(role, startupPrompt, mode) {
6881
6884
  const args = ["--no-alt-screen"];
6882
6885
  if (role.model !== null)
6883
6886
  args.push("--model", role.model);
6887
+ if (role.thinkingLevel !== null) {
6888
+ args.push("--config", `model_reasoning_effort=${JSON.stringify(role.thinkingLevel)}`);
6889
+ }
6884
6890
  args.push("resume");
6885
6891
  if (mode.type === "resume") {
6886
6892
  args.push(mode.sessionId);
@@ -8464,6 +8470,9 @@ function createDefaultMemorySettings() {
8464
8470
  }
8465
8471
  function createDefaultEvolutionSettings() {
8466
8472
  return {
8473
+ schedule: {
8474
+ dailyTime: "02:00"
8475
+ },
8467
8476
  automation: {
8468
8477
  knowledge: true,
8469
8478
  semanticKnowledge: false,
@@ -8515,6 +8524,10 @@ function mergeSettings(existing, defaults = createDefaultSettings()) {
8515
8524
  evolution: {
8516
8525
  ...defaults.evolution,
8517
8526
  ...existing.evolution,
8527
+ schedule: {
8528
+ ...defaults.evolution.schedule,
8529
+ ...existing.evolution?.schedule
8530
+ },
8518
8531
  automation: {
8519
8532
  ...defaults.evolution.automation,
8520
8533
  ...existing.evolution?.automation
@@ -8573,8 +8586,12 @@ function parseSettings(value) {
8573
8586
  function parseEvolutionSettings(value, path) {
8574
8587
  const input = expectRecord(value, path);
8575
8588
  const defaults = createDefaultEvolutionSettings();
8589
+ const schedule = expectRecord(input.schedule ?? defaults.schedule, `${path}.schedule`);
8576
8590
  const automation = expectRecord(input.automation ?? defaults.automation, `${path}.automation`);
8577
8591
  return {
8592
+ schedule: {
8593
+ dailyTime: parseDailyTime(schedule.dailyTime ?? defaults.schedule.dailyTime, `${path}.schedule.dailyTime`)
8594
+ },
8578
8595
  automation: {
8579
8596
  knowledge: automation.knowledge === undefined ? defaults.automation.knowledge : expectBoolean(automation.knowledge, `${path}.automation.knowledge`),
8580
8597
  semanticKnowledge: automation.semanticKnowledge === undefined ? defaults.automation.semanticKnowledge : expectBoolean(automation.semanticKnowledge, `${path}.automation.semanticKnowledge`),
@@ -8582,6 +8599,14 @@ function parseEvolutionSettings(value, path) {
8582
8599
  }
8583
8600
  };
8584
8601
  }
8602
+ function parseDailyTime(value, path) {
8603
+ const dailyTime = expectString(value, path);
8604
+ const match = /^(\d{2}):(\d{2})$/u.exec(dailyTime);
8605
+ if (match === null || Number(match[1]) > 23 || Number(match[2]) > 59) {
8606
+ throw new EvoDevConfigError(`Invalid ${path}; expected a 24-hour HH:MM time`);
8607
+ }
8608
+ return dailyTime;
8609
+ }
8585
8610
  function parseMemorySettings(value, path) {
8586
8611
  const input = expectRecord(value, path);
8587
8612
  const defaults = createDefaultMemorySettings();
@@ -15511,6 +15536,7 @@ async function processEvolutionTriggers(input) {
15511
15536
  pending: 0,
15512
15537
  triggerIds: [],
15513
15538
  batchIds: [],
15539
+ pendingChangeIds: [],
15514
15540
  warnings,
15515
15541
  dryRun
15516
15542
  };
@@ -15546,6 +15572,7 @@ async function processEvolutionTriggers(input) {
15546
15572
  ...pending.map((trigger) => trigger.id)
15547
15573
  ],
15548
15574
  batchIds: [],
15575
+ pendingChangeIds: [],
15549
15576
  warnings,
15550
15577
  dryRun
15551
15578
  };
@@ -15651,6 +15678,7 @@ async function processEvolutionTriggers(input) {
15651
15678
  });
15652
15679
  result.consumed += 1;
15653
15680
  result.batchIds.push(batch.id);
15681
+ result.pendingChangeIds.push(...curated.activation.okf.pendingChangeIds);
15654
15682
  await updateSegmentTriggers(input.homeDir, [attemptedTrigger], {
15655
15683
  status: "consumed",
15656
15684
  updatedAt: now,
@@ -15734,13 +15762,14 @@ async function processEvolutionTriggers(input) {
15734
15762
  });
15735
15763
  if (lock !== null)
15736
15764
  await assertEvolutionProcessLockOwned(lock);
15737
- await activateEvolutionDistillationBatch({
15765
+ const activation = await activateEvolutionDistillationBatch({
15738
15766
  homeDir: input.homeDir,
15739
15767
  batch,
15740
15768
  overwrite: true
15741
15769
  });
15742
15770
  result.consumed += triggers.length;
15743
15771
  result.batchIds.push(batch.id);
15772
+ result.pendingChangeIds.push(...activation.okf.pendingChangeIds);
15744
15773
  await updateTriggers(input.homeDir, attemptedTriggers, {
15745
15774
  status: "consumed",
15746
15775
  updatedAt: now,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evo-dev/core",
3
- "version": "0.0.1-alpha.16",
3
+ "version": "0.0.1-alpha.18",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,6 +31,9 @@ type LegacyMemorySettingsInput = Partial<MemorySettings> & {
31
31
  };
32
32
 
33
33
  export interface EvolutionSettings {
34
+ schedule: {
35
+ dailyTime: string;
36
+ };
34
37
  automation: {
35
38
  knowledge: boolean;
36
39
  semanticKnowledge: boolean;
@@ -80,6 +83,7 @@ export type SettingsInput = Partial<{
80
83
  teamRuntime: Partial<TeamRuntimeSettings>;
81
84
  memory: LegacyMemorySettingsInput;
82
85
  evolution: Partial<{
86
+ schedule: Partial<EvolutionSettings["schedule"]>;
83
87
  automation: Partial<EvolutionSettings["automation"]>;
84
88
  }>;
85
89
  }>;
@@ -148,6 +152,9 @@ export function createDefaultMemorySettings(): MemorySettings {
148
152
 
149
153
  export function createDefaultEvolutionSettings(): EvolutionSettings {
150
154
  return {
155
+ schedule: {
156
+ dailyTime: "02:00",
157
+ },
151
158
  automation: {
152
159
  knowledge: true,
153
160
  semanticKnowledge: false,
@@ -203,6 +210,10 @@ export function mergeSettings(
203
210
  evolution: {
204
211
  ...defaults.evolution,
205
212
  ...existing.evolution,
213
+ schedule: {
214
+ ...defaults.evolution.schedule,
215
+ ...existing.evolution?.schedule,
216
+ },
206
217
  automation: {
207
218
  ...defaults.evolution.automation,
208
219
  ...existing.evolution?.automation,
@@ -280,8 +291,15 @@ export function parseSettings(value: unknown): EvoDevSettings {
280
291
  function parseEvolutionSettings(value: unknown, path: string): EvolutionSettings {
281
292
  const input = expectRecord(value, path);
282
293
  const defaults = createDefaultEvolutionSettings();
294
+ const schedule = expectRecord(input.schedule ?? defaults.schedule, `${path}.schedule`);
283
295
  const automation = expectRecord(input.automation ?? defaults.automation, `${path}.automation`);
284
296
  return {
297
+ schedule: {
298
+ dailyTime: parseDailyTime(
299
+ schedule.dailyTime ?? defaults.schedule.dailyTime,
300
+ `${path}.schedule.dailyTime`,
301
+ ),
302
+ },
285
303
  automation: {
286
304
  knowledge:
287
305
  automation.knowledge === undefined
@@ -299,6 +317,15 @@ function parseEvolutionSettings(value: unknown, path: string): EvolutionSettings
299
317
  };
300
318
  }
301
319
 
320
+ function parseDailyTime(value: unknown, path: string): string {
321
+ const dailyTime = expectString(value, path);
322
+ const match = /^(\d{2}):(\d{2})$/u.exec(dailyTime);
323
+ if (match === null || Number(match[1]) > 23 || Number(match[2]) > 59) {
324
+ throw new EvoDevConfigError(`Invalid ${path}; expected a 24-hour HH:MM time`);
325
+ }
326
+ return dailyTime;
327
+ }
328
+
302
329
  function parseMemorySettings(value: unknown, path: string): MemorySettings {
303
330
  const input = expectRecord(value, path);
304
331
  const defaults = createDefaultMemorySettings();
@@ -62,6 +62,7 @@ export async function processEvolutionTriggers(
62
62
  pending: 0,
63
63
  triggerIds: [],
64
64
  batchIds: [],
65
+ pendingChangeIds: [],
65
66
  warnings,
66
67
  dryRun,
67
68
  };
@@ -108,6 +109,7 @@ export async function processEvolutionTriggers(
108
109
  ...pending.map((trigger) => trigger.id),
109
110
  ],
110
111
  batchIds: [],
112
+ pendingChangeIds: [],
111
113
  warnings,
112
114
  dryRun,
113
115
  };
@@ -215,6 +217,7 @@ export async function processEvolutionTriggers(
215
217
  });
216
218
  result.consumed += 1;
217
219
  result.batchIds.push(batch.id);
220
+ result.pendingChangeIds.push(...curated.activation.okf.pendingChangeIds);
218
221
  await updateSegmentTriggers(input.homeDir, [attemptedTrigger], {
219
222
  status: "consumed",
220
223
  updatedAt: now,
@@ -303,13 +306,14 @@ export async function processEvolutionTriggers(
303
306
  now,
304
307
  });
305
308
  if (lock !== null) await assertEvolutionProcessLockOwned(lock);
306
- await activateEvolutionDistillationBatch({
309
+ const activation = await activateEvolutionDistillationBatch({
307
310
  homeDir: input.homeDir,
308
311
  batch,
309
312
  overwrite: true,
310
313
  });
311
314
  result.consumed += triggers.length;
312
315
  result.batchIds.push(batch.id);
316
+ result.pendingChangeIds.push(...activation.okf.pendingChangeIds);
313
317
  await updateTriggers(input.homeDir, attemptedTriggers, {
314
318
  status: "consumed",
315
319
  updatedAt: now,
@@ -633,6 +633,7 @@ export interface EvolutionProcessResult {
633
633
  pending: number;
634
634
  triggerIds: string[];
635
635
  batchIds: string[];
636
+ pendingChangeIds: string[];
636
637
  warnings: string[];
637
638
  dryRun: boolean;
638
639
  }
package/src/team/index.ts CHANGED
@@ -2844,6 +2844,9 @@ function resolveRuntimeCommand(
2844
2844
  function buildCodexArgs(role: ResolvedTeamRole, startupPrompt: string): string[] {
2845
2845
  const args = ["--no-alt-screen"];
2846
2846
  if (role.model !== null) args.push("--model", role.model);
2847
+ if (role.thinkingLevel !== null) {
2848
+ args.push("--config", `model_reasoning_effort=${JSON.stringify(role.thinkingLevel)}`);
2849
+ }
2847
2850
  if (shouldPassVisibleStartupPrompt(role)) args.push(startupPrompt);
2848
2851
  return args;
2849
2852
  }
@@ -2855,6 +2858,9 @@ function buildCodexResumeArgs(
2855
2858
  ): string[] {
2856
2859
  const args = ["--no-alt-screen"];
2857
2860
  if (role.model !== null) args.push("--model", role.model);
2861
+ if (role.thinkingLevel !== null) {
2862
+ args.push("--config", `model_reasoning_effort=${JSON.stringify(role.thinkingLevel)}`);
2863
+ }
2858
2864
  args.push("resume");
2859
2865
  if (mode.type === "resume") {
2860
2866
  args.push(mode.sessionId);