life-pulse 2.0.0 → 2.1.0
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/dist/cli.js +5 -4
- package/dist/tui.d.ts +26 -28
- package/dist/tui.js +207 -386
- package/dist/tunnel.d.ts +0 -1
- package/dist/tunnel.js +0 -1
- package/dist/ui/app.d.ts +62 -0
- package/dist/ui/app.js +315 -0
- package/dist/ui/progress.d.ts +26 -0
- package/dist/ui/progress.js +119 -0
- package/dist/ui/theme.d.ts +35 -0
- package/dist/ui/theme.js +55 -0
- package/package.json +6 -2
package/dist/cli.js
CHANGED
|
@@ -3,11 +3,11 @@ import { collectAll } from './index.js';
|
|
|
3
3
|
import { runAgent } from './agent.js';
|
|
4
4
|
import { analyzeWithLLM } from './analyze.js';
|
|
5
5
|
import { saveState, saveDecisions } from './state.js';
|
|
6
|
-
import {
|
|
6
|
+
import { InkProgress } from './ui/progress.js';
|
|
7
7
|
import { addTodo, resolveTodos, pruneOld } from './todo.js';
|
|
8
|
-
import { renderGreeting, renderContextLine, renderCRMList, pickCard, renderSection, renderSectionHeader, renderHandled, renderDivider, renderBrief, Spinner, fetchWeather, GRN, MAG, CYN, RED, AMB, MID } from './tui.js';
|
|
8
|
+
import { renderGreeting, renderContextLine, renderCRMList, pickCard, renderSection, renderSectionHeader, renderHandled, renderDivider, renderBrief, renderArchetype, Spinner, fetchWeather, destroyUI, GRN, MAG, CYN, RED, AMB, MID } from './tui.js';
|
|
9
9
|
import { needsDiscovery, discoverPlatforms, savePlatforms } from './platforms.js';
|
|
10
|
-
import { generateArchetype
|
|
10
|
+
import { generateArchetype } from './archetype.js';
|
|
11
11
|
import { runPermissionFlow, getMissingPermissions } from './permissions.js';
|
|
12
12
|
import { buildCRM, streamEnrichedCRM } from './crm.js';
|
|
13
13
|
import { saveContactSummaries } from './intelligence.js';
|
|
@@ -254,6 +254,7 @@ async function main() {
|
|
|
254
254
|
const pendingFollowUps = [];
|
|
255
255
|
// Graceful shutdown handler
|
|
256
256
|
const gracefulShutdown = () => {
|
|
257
|
+
destroyUI();
|
|
257
258
|
endSession({
|
|
258
259
|
activeContacts,
|
|
259
260
|
pendingFollowUps,
|
|
@@ -483,7 +484,7 @@ async function main() {
|
|
|
483
484
|
const calCtx = await calendarP;
|
|
484
485
|
await showCRM(ANTHROPIC_KEY, { calendarContext: calCtx, spinner });
|
|
485
486
|
}
|
|
486
|
-
const renderer = interactive ? new
|
|
487
|
+
const renderer = interactive ? new InkProgress() : undefined;
|
|
487
488
|
renderer?.start();
|
|
488
489
|
// Track streamed cards so we don't double-show from final output
|
|
489
490
|
const streamedTitles = new Set();
|
package/dist/tui.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TUI — premium terminal interface.
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* React + Ink when interactive (TTY), plain console.log otherwise.
|
|
5
|
+
* Re-exports from ui/app.tsx for the Ink path.
|
|
4
6
|
*/
|
|
5
7
|
export declare const B: import("chalk").ChalkInstance;
|
|
6
8
|
export declare const DIM: import("chalk").ChalkInstance;
|
|
@@ -17,12 +19,14 @@ export interface Weather {
|
|
|
17
19
|
temp: string;
|
|
18
20
|
}
|
|
19
21
|
export declare function fetchWeather(): Promise<Weather | null>;
|
|
20
|
-
/** Clears screen → shows greeting INSTANTLY → returns so boot animation can start */
|
|
21
22
|
export declare function renderGreeting(name?: string): void;
|
|
22
|
-
/** Typewriters day · time immediately — appends weather if the promise already resolved */
|
|
23
23
|
export declare function renderContextLine(weatherP?: Promise<Weather | null>): Promise<void>;
|
|
24
|
-
export declare function
|
|
25
|
-
|
|
24
|
+
export declare function renderCRMList(contacts: {
|
|
25
|
+
name: string;
|
|
26
|
+
lastMsg: {
|
|
27
|
+
ago: string;
|
|
28
|
+
} | null;
|
|
29
|
+
}[]): void;
|
|
26
30
|
export interface CardOpt {
|
|
27
31
|
label: string;
|
|
28
32
|
description?: string;
|
|
@@ -36,9 +40,23 @@ export interface Card {
|
|
|
36
40
|
category?: string;
|
|
37
41
|
who?: string;
|
|
38
42
|
}
|
|
39
|
-
export declare function pickCard(card: Card, num: number,
|
|
43
|
+
export declare function pickCard(card: Card, num: number, _total?: number): Promise<string>;
|
|
44
|
+
export declare function renderSectionHeader(label: string, color: (s: string) => string): void;
|
|
40
45
|
export declare function renderSection(title: string, items: string[], bullet: string, colorBold: (s: string) => string, colorNorm: (s: string) => string): void;
|
|
41
46
|
export declare function renderHandled(items: string[], max?: number): void;
|
|
47
|
+
export declare function renderBrief(text: string): Promise<void>;
|
|
48
|
+
export declare function renderArchetype(title: string, reading: string, stats: {
|
|
49
|
+
platforms: number;
|
|
50
|
+
apps: number;
|
|
51
|
+
tools: number;
|
|
52
|
+
}): void;
|
|
53
|
+
export declare function renderDivider(): void;
|
|
54
|
+
export declare class Spinner {
|
|
55
|
+
start(msg: string): void;
|
|
56
|
+
update(msg: string): void;
|
|
57
|
+
stop(doneMsg?: string): void;
|
|
58
|
+
}
|
|
59
|
+
export declare function renderFYI(title: string, context?: string): void;
|
|
42
60
|
interface CRMThread {
|
|
43
61
|
name: string;
|
|
44
62
|
avgResponseSec: number | null;
|
|
@@ -49,27 +67,7 @@ interface CRMThread {
|
|
|
49
67
|
} | null;
|
|
50
68
|
relationship?: string;
|
|
51
69
|
}
|
|
52
|
-
/** Render contact names instantly — no API, just DB data */
|
|
53
|
-
export declare function renderCRMList(contacts: {
|
|
54
|
-
name: string;
|
|
55
|
-
lastMsg: {
|
|
56
|
-
ago: string;
|
|
57
|
-
} | null;
|
|
58
|
-
}[]): void;
|
|
59
|
-
/** Render a single contact — name + summary typewriter */
|
|
60
|
-
export declare function renderCRMContact(t: CRMThread): Promise<void>;
|
|
61
|
-
/** Stream-render CRM: stops spinner on first contact, thin divider, contacts drip in */
|
|
62
70
|
export declare function renderCRMStream(source: AsyncIterable<CRMThread>, spinner?: Spinner): Promise<CRMThread[]>;
|
|
63
|
-
|
|
64
|
-
export declare function
|
|
65
|
-
export declare class Spinner {
|
|
66
|
-
private timer;
|
|
67
|
-
private frame;
|
|
68
|
-
private msg;
|
|
69
|
-
start(msg: string): void;
|
|
70
|
-
update(msg: string): void;
|
|
71
|
-
private paint;
|
|
72
|
-
stop(doneMsg?: string): void;
|
|
73
|
-
}
|
|
74
|
-
export declare function renderDivider(): void;
|
|
71
|
+
export declare function renderCRMContact(t: CRMThread): Promise<void>;
|
|
72
|
+
export declare function destroyUI(): void;
|
|
75
73
|
export {};
|