ei-tui 1.2.0 → 1.3.1
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/README.md +16 -0
- package/package.json +1 -1
- package/src/cli/README.md +12 -2
- package/src/cli/mcp.ts +12 -4
- package/src/cli/retrieval.ts +162 -0
- package/src/cli.ts +7 -1
- package/src/core/handlers/document-segmentation.ts +3 -4
- package/src/core/handlers/knowledge-synthesis.ts +1 -3
- package/src/core/heartbeat-manager.ts +10 -0
- package/src/core/orchestrators/ceremony.ts +1 -9
- package/src/core/processor.ts +122 -9
- package/src/core/tools/builtin/fetch-message.ts +11 -1
- package/src/core/tools/builtin/find-memory.ts +11 -3
- package/src/core/tools/index.ts +2 -2
- package/src/core/types/llm.ts +0 -9
- package/src/core/utils/message-id.ts +114 -0
- package/src/integrations/claude-code/importer.ts +6 -5
- package/src/integrations/cursor/importer.ts +6 -5
- package/src/integrations/document/importer.ts +1 -1
- package/src/integrations/document/unsource.ts +6 -11
- package/src/integrations/opencode/importer.ts +6 -5
- package/src/integrations/opencode/json-reader.ts +65 -0
- package/src/integrations/opencode/sqlite-reader.ts +33 -0
- package/src/integrations/opencode/types.ts +8 -0
- package/src/prompts/heartbeat/check.ts +5 -2
- package/src/prompts/heartbeat/ei.ts +7 -0
- package/src/prompts/heartbeat/types.ts +5 -0
- package/src/prompts/response/sections.ts +30 -16
- package/src/prompts/room/sections.ts +28 -6
- package/src/prompts/trait-utils.ts +33 -0
- package/tui/README.md +2 -0
- package/tui/src/util/help-content.ts +11 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PersonaTrait } from "../core/types.js";
|
|
2
|
+
|
|
3
|
+
export interface TraitBucket {
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
header: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface PartitionedTraits {
|
|
10
|
+
guardrails: PersonaTrait[];
|
|
11
|
+
active: PersonaTrait[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Special-case: .filter() is intentional here. This file is the designated home
|
|
15
|
+
// for trait partitioning logic that prompt builders need for rendering. Keeping it
|
|
16
|
+
// here (rather than inline in each builder) is what lets the structural check
|
|
17
|
+
// enforce "no .filter() in prompt builders" elsewhere.
|
|
18
|
+
export function partitionTraits(traits: PersonaTrait[]): PartitionedTraits {
|
|
19
|
+
return {
|
|
20
|
+
guardrails: traits.filter(t => (t.strength ?? 0.5) === 0),
|
|
21
|
+
active: traits.filter(t => (t.strength ?? 0.5) > 0),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function bucketTraits(active: PersonaTrait[], buckets: readonly TraitBucket[]): Array<{ bucket: TraitBucket; traits: PersonaTrait[] }> {
|
|
26
|
+
return buckets.map(bucket => ({
|
|
27
|
+
bucket,
|
|
28
|
+
traits: active.filter(t => {
|
|
29
|
+
const pct = Math.round((t.strength ?? 0.5) * 100);
|
|
30
|
+
return pct >= bucket.min && pct <= bucket.max;
|
|
31
|
+
}),
|
|
32
|
+
}));
|
|
33
|
+
}
|
package/tui/README.md
CHANGED
|
@@ -132,6 +132,8 @@ Rooms have three modes, set at creation time:
|
|
|
132
132
|
| `/me <type>` | | Edit one type: `facts`, `topics`, or `people` |
|
|
133
133
|
| `/import <path>` | | Import a document (txt, md, pdf, etc.) into Ei — extracted knowledge is attributed to the "Emmett" persona |
|
|
134
134
|
| `/unsource <source_tag>` | | Remove all knowledge extracted from a previously imported document |
|
|
135
|
+
| `/generate <subject>` | | Synthesize everything Ei knows about a subject into a markdown document — lands in `$EI_DATA_PATH/docs/` automatically |
|
|
136
|
+
| `/generate` | | (no args) Manage your generated documents — re-run, re-export, or delete |
|
|
135
137
|
| `/dedupe <person\|topic> <term> [term2 ...]` | | Fuzzy-search and merge duplicate people or topics in `$EDITOR`. Unquoted words are individual OR terms; quoted strings match as exact phrases: `/dedupe person Flare "Jeremy Scherer"` finds records matching `Flare` OR `Jeremy Scherer` |
|
|
136
138
|
| `/settings` | `/set` | Edit your global settings in `$EDITOR` |
|
|
137
139
|
| `/setsync <user> <pass>` | `/ss` | Set sync credentials (triggers restart) |
|
|
@@ -109,6 +109,17 @@ EXTENDED COMMANDS
|
|
|
109
109
|
document. Use the source tag shown when the import completed.
|
|
110
110
|
/unsource my-journal-2024
|
|
111
111
|
|
|
112
|
+
/generate <subject>
|
|
113
|
+
Synthesize everything Ei knows about a subject into a clean markdown
|
|
114
|
+
document. Uses your rewrite_model (Opus-class recommended). The file
|
|
115
|
+
lands in $EI_DATA_PATH/docs/ automatically.
|
|
116
|
+
/generate everything about the Uniform project
|
|
117
|
+
/generate comprehensive runbook for the IDP deployment issues
|
|
118
|
+
|
|
119
|
+
/generate
|
|
120
|
+
(no args) — Open your generated documents. Re-run, re-export, or
|
|
121
|
+
delete from here.
|
|
122
|
+
|
|
112
123
|
/tools
|
|
113
124
|
Manage tool providers — enable or disable tools per persona.
|
|
114
125
|
|