ei-tui 0.1.10 → 0.1.13
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/package.json +1 -1
- package/src/cli.ts +58 -0
- package/src/core/handlers/index.ts +76 -21
- package/src/core/llm-client.ts +13 -2
- package/src/core/processor.ts +116 -4
- package/src/core/queue-processor.ts +4 -3
- package/src/core/types.ts +11 -1
- package/src/integrations/claude-code/importer.ts +323 -0
- package/src/integrations/claude-code/index.ts +10 -0
- package/src/integrations/claude-code/reader.ts +238 -0
- package/src/integrations/claude-code/types.ts +163 -0
- package/src/integrations/opencode/importer.ts +10 -3
- package/src/prompts/generation/persona.ts +5 -3
- package/src/prompts/generation/types.ts +1 -1
- package/src/prompts/human/fact-scan.ts +6 -6
- package/src/prompts/human/person-scan.ts +6 -6
- package/src/prompts/human/topic-scan.ts +4 -4
- package/src/prompts/human/trait-scan.ts +6 -6
- package/src/prompts/persona/traits.ts +2 -2
- package/src/prompts/response/sections.ts +15 -0
- package/src/storage/interface.ts +2 -0
- package/src/storage/local.ts +5 -0
- package/tui/README.md +13 -0
- package/tui/src/index.tsx +20 -0
- package/tui/src/storage/file.ts +39 -2
- package/tui/src/util/instance-lock.ts +92 -0
- package/tui/src/util/logger.ts +0 -2
- package/tui/src/util/yaml-serializers.ts +49 -3
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
HumanSettings,
|
|
6
6
|
CeremonyConfig,
|
|
7
7
|
OpenCodeSettings,
|
|
8
|
+
BackupConfig,
|
|
8
9
|
Fact,
|
|
9
10
|
Trait,
|
|
10
11
|
Topic,
|
|
@@ -17,8 +18,9 @@ import type {
|
|
|
17
18
|
LLMRequest,
|
|
18
19
|
LLMRequestState,
|
|
19
20
|
LLMPriority,
|
|
20
|
-
} from "../../../src/core/types.js";
|
|
21
|
+
} from "../../../src/core/types.js";
|
|
21
22
|
import { ContextStatus } from "../../../src/core/types.js";
|
|
23
|
+
import type { ClaudeCodeSettings } from "../../../src/integrations/claude-code/types.js";
|
|
22
24
|
|
|
23
25
|
// =============================================================================
|
|
24
26
|
// TYPES FOR YAML EDITING
|
|
@@ -444,11 +446,21 @@ interface EditableSettingsData {
|
|
|
444
446
|
time: string;
|
|
445
447
|
decay_rate?: number | null;
|
|
446
448
|
explore_threshold?: number | null;
|
|
449
|
+
dedup_threshold?: number | null;
|
|
447
450
|
};
|
|
448
451
|
opencode?: {
|
|
449
452
|
integration?: boolean | null;
|
|
450
453
|
polling_interval_ms?: number | null;
|
|
451
454
|
};
|
|
455
|
+
claudeCode?: {
|
|
456
|
+
integration?: boolean | null;
|
|
457
|
+
polling_interval_ms?: number | null;
|
|
458
|
+
};
|
|
459
|
+
backup?: {
|
|
460
|
+
enabled?: boolean | null;
|
|
461
|
+
max_backups?: number | null;
|
|
462
|
+
interval_ms?: number | null;
|
|
463
|
+
};
|
|
452
464
|
}
|
|
453
465
|
|
|
454
466
|
export function settingsToYAML(settings: HumanSettings | undefined): string {
|
|
@@ -461,10 +473,20 @@ export function settingsToYAML(settings: HumanSettings | undefined): string {
|
|
|
461
473
|
time: settings?.ceremony?.time ?? "09:00",
|
|
462
474
|
decay_rate: settings?.ceremony?.decay_rate ?? null,
|
|
463
475
|
explore_threshold: settings?.ceremony?.explore_threshold ?? null,
|
|
476
|
+
dedup_threshold: settings?.ceremony?.dedup_threshold ?? null,
|
|
464
477
|
},
|
|
465
478
|
opencode: {
|
|
466
|
-
integration: settings?.opencode?.integration ??
|
|
467
|
-
polling_interval_ms: settings?.opencode?.polling_interval_ms ??
|
|
479
|
+
integration: settings?.opencode?.integration ?? false,
|
|
480
|
+
polling_interval_ms: settings?.opencode?.polling_interval_ms ?? 1800000,
|
|
481
|
+
},
|
|
482
|
+
claudeCode: {
|
|
483
|
+
integration: settings?.claudeCode?.integration ?? false,
|
|
484
|
+
polling_interval_ms: settings?.claudeCode?.polling_interval_ms ?? 1800000,
|
|
485
|
+
},
|
|
486
|
+
backup: {
|
|
487
|
+
enabled: settings?.backup?.enabled ?? false,
|
|
488
|
+
max_backups: settings?.backup?.max_backups ?? 24,
|
|
489
|
+
interval_ms: settings?.backup?.interval_ms ?? 3600000,
|
|
468
490
|
},
|
|
469
491
|
};
|
|
470
492
|
|
|
@@ -485,6 +507,7 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
485
507
|
time: data.ceremony.time,
|
|
486
508
|
decay_rate: nullToUndefined(data.ceremony.decay_rate),
|
|
487
509
|
explore_threshold: nullToUndefined(data.ceremony.explore_threshold),
|
|
510
|
+
dedup_threshold: nullToUndefined(data.ceremony.dedup_threshold),
|
|
488
511
|
last_ceremony: original?.ceremony?.last_ceremony,
|
|
489
512
|
};
|
|
490
513
|
}
|
|
@@ -496,6 +519,27 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
496
519
|
polling_interval_ms: nullToUndefined(data.opencode.polling_interval_ms),
|
|
497
520
|
last_sync: original?.opencode?.last_sync,
|
|
498
521
|
extraction_point: original?.opencode?.extraction_point,
|
|
522
|
+
processed_sessions: original?.opencode?.processed_sessions,
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
let claudeCode: ClaudeCodeSettings | undefined;
|
|
527
|
+
if (data.claudeCode) {
|
|
528
|
+
claudeCode = {
|
|
529
|
+
integration: nullToUndefined(data.claudeCode.integration),
|
|
530
|
+
polling_interval_ms: nullToUndefined(data.claudeCode.polling_interval_ms),
|
|
531
|
+
last_sync: original?.claudeCode?.last_sync,
|
|
532
|
+
processed_sessions: original?.claudeCode?.processed_sessions,
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
let backup: BackupConfig | undefined;
|
|
537
|
+
if (data.backup) {
|
|
538
|
+
backup = {
|
|
539
|
+
enabled: nullToUndefined(data.backup.enabled),
|
|
540
|
+
max_backups: nullToUndefined(data.backup.max_backups),
|
|
541
|
+
interval_ms: nullToUndefined(data.backup.interval_ms),
|
|
542
|
+
last_backup: original?.backup?.last_backup,
|
|
499
543
|
};
|
|
500
544
|
}
|
|
501
545
|
|
|
@@ -506,6 +550,8 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
506
550
|
name_display: nullToUndefined(data.name_display),
|
|
507
551
|
ceremony,
|
|
508
552
|
opencode,
|
|
553
|
+
claudeCode,
|
|
554
|
+
backup,
|
|
509
555
|
};
|
|
510
556
|
}
|
|
511
557
|
|