@dayzehq/cli 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +305 -2
- package/dist/add.d.ts +6 -0
- package/dist/add.js +72 -0
- package/dist/admin.d.ts +110 -0
- package/dist/admin.js +408 -0
- package/dist/agent-bridge.d.ts +50 -0
- package/dist/agent-bridge.js +146 -0
- package/dist/agent-mcp.d.ts +4 -0
- package/dist/agent-mcp.js +36 -0
- package/dist/ai-consent.d.ts +18 -0
- package/dist/ai-consent.js +93 -0
- package/dist/args.d.ts +5 -0
- package/dist/args.js +127 -0
- package/dist/auth.d.ts +20 -0
- package/dist/auth.js +198 -0
- package/dist/channel.d.ts +55 -0
- package/dist/channel.js +250 -0
- package/dist/chat.d.ts +67 -0
- package/dist/chat.js +170 -0
- package/dist/cli-errors.d.ts +13 -0
- package/dist/cli-errors.js +30 -0
- package/dist/coding-context.d.ts +12 -0
- package/dist/coding-context.js +130 -0
- package/dist/coding.d.ts +35 -0
- package/dist/coding.js +283 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.js +149 -0
- package/dist/day.d.ts +22 -0
- package/dist/day.js +54 -0
- package/dist/dayze-cli-runtime +0 -0
- package/dist/dayze-days.d.ts +56 -0
- package/dist/dayze-days.js +276 -0
- package/dist/doctor.d.ts +32 -0
- package/dist/doctor.js +225 -0
- package/dist/focus.d.ts +9 -0
- package/dist/focus.js +163 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +675 -0
- package/dist/inventory.d.ts +73 -0
- package/dist/inventory.js +1272 -0
- package/dist/life.d.ts +48 -0
- package/dist/life.js +146 -0
- package/dist/me.d.ts +94 -0
- package/dist/me.js +789 -0
- package/dist/people.d.ts +232 -0
- package/dist/people.js +2034 -0
- package/dist/projects.d.ts +21 -0
- package/dist/projects.js +132 -0
- package/dist/request-deadline.d.ts +11 -0
- package/dist/request-deadline.js +34 -0
- package/dist/runtime-build.json +1 -0
- package/dist/ui.d.ts +37 -0
- package/dist/ui.js +219 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +16 -0
- package/package.json +54 -4
package/dist/people.d.ts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Industry-standard contact directory for Dayze CLI.
|
|
3
|
+
*
|
|
4
|
+
* Patterns borrowed from khard / abook / fzf:
|
|
5
|
+
* - Load full address book once (typical CRM size is fine in memory)
|
|
6
|
+
* - Live type-ahead filter (no modal search)
|
|
7
|
+
* - Vim keys + arrows, letter sections, detail pane on Enter
|
|
8
|
+
* - Plain `list` / `show` for scripts and piping
|
|
9
|
+
*/
|
|
10
|
+
import { type DayzeCredentials } from './config.js';
|
|
11
|
+
export type PeopleCommandOptions = {
|
|
12
|
+
json?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Industry: letters filter; Ctrl+S cycles sort (shown in chrome). */
|
|
15
|
+
export type PeopleSort = 'name' | 'day-desc' | 'day-asc' | 'birthday' | 'last';
|
|
16
|
+
export declare const PEOPLE_SORT_CYCLE: PeopleSort[];
|
|
17
|
+
export declare function parsePeopleSort(raw: string | undefined | null): PeopleSort | null;
|
|
18
|
+
export declare function peopleSortLabel(sort: PeopleSort): string;
|
|
19
|
+
export declare function sortPeople(people: PersonListItem[], sort: PeopleSort): PersonListItem[];
|
|
20
|
+
export type PersonListItem = {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
relationship?: string | null;
|
|
24
|
+
occupation?: string | null;
|
|
25
|
+
company?: string | null;
|
|
26
|
+
email?: string | null;
|
|
27
|
+
phone?: string | null;
|
|
28
|
+
birthday?: string | null;
|
|
29
|
+
birthday_precision?: 'day' | 'month' | 'year' | string | null;
|
|
30
|
+
birth_time?: string | null;
|
|
31
|
+
notes?: string | null;
|
|
32
|
+
address?: string | null;
|
|
33
|
+
tier?: string | null;
|
|
34
|
+
last_interaction_at?: string | null;
|
|
35
|
+
updated_at?: string | null;
|
|
36
|
+
slug?: string | null;
|
|
37
|
+
instagram?: string | null;
|
|
38
|
+
interaction_count?: number | null;
|
|
39
|
+
financial_context?: {
|
|
40
|
+
netWorth?: {
|
|
41
|
+
amount?: number | null;
|
|
42
|
+
currency?: string | null;
|
|
43
|
+
} | null;
|
|
44
|
+
} | null;
|
|
45
|
+
};
|
|
46
|
+
export type PersonLocationEntry = {
|
|
47
|
+
id?: string;
|
|
48
|
+
street?: string;
|
|
49
|
+
city?: string;
|
|
50
|
+
stateRegion?: string;
|
|
51
|
+
postalCode?: string;
|
|
52
|
+
country?: string;
|
|
53
|
+
approximate?: string;
|
|
54
|
+
label?: string;
|
|
55
|
+
isPrimary?: boolean;
|
|
56
|
+
};
|
|
57
|
+
export type PersonLifestyle = {
|
|
58
|
+
smoking?: string | null;
|
|
59
|
+
drinking?: string | null;
|
|
60
|
+
substances?: string[];
|
|
61
|
+
notes?: string | null;
|
|
62
|
+
};
|
|
63
|
+
export type PersonConversationContext = {
|
|
64
|
+
hobbies?: string[];
|
|
65
|
+
interests?: string[];
|
|
66
|
+
religion?: string | null;
|
|
67
|
+
lifestyle?: PersonLifestyle | null;
|
|
68
|
+
topics?: Array<{
|
|
69
|
+
label?: string;
|
|
70
|
+
detail?: string;
|
|
71
|
+
}>;
|
|
72
|
+
strengths?: string[];
|
|
73
|
+
frictions?: string[];
|
|
74
|
+
boundaries?: string[];
|
|
75
|
+
};
|
|
76
|
+
export type PersonDetail = PersonListItem & {
|
|
77
|
+
linkedin?: string | null;
|
|
78
|
+
twitter?: string | null;
|
|
79
|
+
website?: string | null;
|
|
80
|
+
gender?: string | null;
|
|
81
|
+
pronouns?: string | null;
|
|
82
|
+
created_at?: string | null;
|
|
83
|
+
first_met?: string | null;
|
|
84
|
+
first_met_location?: string | null;
|
|
85
|
+
locations?: PersonLocationEntry[] | null;
|
|
86
|
+
conversation_context?: PersonConversationContext | null;
|
|
87
|
+
discovery_source?: string | null;
|
|
88
|
+
preferred_channel?: string | null;
|
|
89
|
+
};
|
|
90
|
+
export declare function fetchPeoplePage(creds: DayzeCredentials, opts?: {
|
|
91
|
+
q?: string;
|
|
92
|
+
letter?: string;
|
|
93
|
+
limit?: number;
|
|
94
|
+
offset?: number;
|
|
95
|
+
}): Promise<{
|
|
96
|
+
people: PersonListItem[];
|
|
97
|
+
total: number;
|
|
98
|
+
hasMore: boolean;
|
|
99
|
+
limit: number;
|
|
100
|
+
offset: number;
|
|
101
|
+
}>;
|
|
102
|
+
export declare function fetchAllPeople(creds: DayzeCredentials, opts?: {
|
|
103
|
+
q?: string;
|
|
104
|
+
letter?: string;
|
|
105
|
+
}): Promise<PersonListItem[]>;
|
|
106
|
+
export declare function fetchPersonDetail(creds: DayzeCredentials, id: string): Promise<PersonDetail>;
|
|
107
|
+
export declare function patchPerson(creds: DayzeCredentials, id: string, updates: Record<string, string | null>, opts?: {
|
|
108
|
+
appendNotes?: boolean;
|
|
109
|
+
}): Promise<PersonDetail>;
|
|
110
|
+
export type PersonMoneyDirection = 'to' | 'from';
|
|
111
|
+
export type PersonMoneyEntry = {
|
|
112
|
+
id: string;
|
|
113
|
+
direction: PersonMoneyDirection;
|
|
114
|
+
amount: number;
|
|
115
|
+
currency: string;
|
|
116
|
+
date: string;
|
|
117
|
+
merchant: string | null;
|
|
118
|
+
description: string | null;
|
|
119
|
+
category: string | null;
|
|
120
|
+
};
|
|
121
|
+
export type PersonMoneyTotals = {
|
|
122
|
+
currency: string;
|
|
123
|
+
sent: number;
|
|
124
|
+
received: number;
|
|
125
|
+
net: number;
|
|
126
|
+
sentCount: number;
|
|
127
|
+
receivedCount: number;
|
|
128
|
+
};
|
|
129
|
+
export type PersonMoneyLedger = {
|
|
130
|
+
person: {
|
|
131
|
+
id: string;
|
|
132
|
+
name: string;
|
|
133
|
+
};
|
|
134
|
+
entries: PersonMoneyEntry[];
|
|
135
|
+
totals: PersonMoneyTotals[];
|
|
136
|
+
};
|
|
137
|
+
export declare function fetchPersonMoney(creds: DayzeCredentials, personId: string, limit?: number): Promise<PersonMoneyLedger>;
|
|
138
|
+
/** PHI-2097 / PHI-788: what a contact paid for on your behalf (not an IOU). */
|
|
139
|
+
export type PaidForYouSourceKind = 'food' | 'expense';
|
|
140
|
+
export type PaidForYouEntry = {
|
|
141
|
+
source_kind: PaidForYouSourceKind;
|
|
142
|
+
id: string;
|
|
143
|
+
amount: number;
|
|
144
|
+
currency: string;
|
|
145
|
+
date: string;
|
|
146
|
+
label: string;
|
|
147
|
+
};
|
|
148
|
+
export type PaidForYouCurrencyTotal = {
|
|
149
|
+
currency: string;
|
|
150
|
+
total: number;
|
|
151
|
+
count: number;
|
|
152
|
+
};
|
|
153
|
+
export type PaidForYouMonthTotal = {
|
|
154
|
+
month: string;
|
|
155
|
+
currency: string;
|
|
156
|
+
total: number;
|
|
157
|
+
count: number;
|
|
158
|
+
};
|
|
159
|
+
export type PaidForYouLedger = {
|
|
160
|
+
person: {
|
|
161
|
+
id: string;
|
|
162
|
+
name: string;
|
|
163
|
+
};
|
|
164
|
+
personId?: string;
|
|
165
|
+
entries: PaidForYouEntry[];
|
|
166
|
+
totals: PaidForYouCurrencyTotal[];
|
|
167
|
+
by_month?: PaidForYouMonthTotal[];
|
|
168
|
+
};
|
|
169
|
+
export declare function fetchPaidForYou(creds: DayzeCredentials, personId: string, limit?: number): Promise<PaidForYouLedger>;
|
|
170
|
+
export declare function printPaidForYou(ledger: PaidForYouLedger, personName?: string): void;
|
|
171
|
+
export declare function logPersonMoney(creds: DayzeCredentials, input: {
|
|
172
|
+
personId: string;
|
|
173
|
+
direction: PersonMoneyDirection;
|
|
174
|
+
amount: number;
|
|
175
|
+
currency?: string;
|
|
176
|
+
date?: string;
|
|
177
|
+
note?: string;
|
|
178
|
+
}): Promise<PersonMoneyEntry>;
|
|
179
|
+
export declare function printPersonMoney(ledger: PersonMoneyLedger, personName?: string): void;
|
|
180
|
+
/** Token filter (fzf-ish): every whitespace-separated token must match somewhere. */
|
|
181
|
+
export declare function filterPeople(people: PersonListItem[], query: string): PersonListItem[];
|
|
182
|
+
export declare function printPeopleTable(people: PersonListItem[], title?: string, sort?: PeopleSort): void;
|
|
183
|
+
export declare function printPersonDetail(p: PersonDetail, footerHint?: boolean, money?: PersonMoneyLedger | null): void;
|
|
184
|
+
export declare function resolvePersonByQuery(creds: DayzeCredentials, query: string): Promise<PersonDetail | null>;
|
|
185
|
+
/**
|
|
186
|
+
* Interactive address book — fzf filter + Ctrl+S sort cycle.
|
|
187
|
+
*/
|
|
188
|
+
export declare function runPeopleBrowser(creds: DayzeCredentials, initialQuery?: string, initialSort?: PeopleSort): Promise<void>;
|
|
189
|
+
export type PeopleCommand = {
|
|
190
|
+
kind: 'add';
|
|
191
|
+
fields: Record<string, string>;
|
|
192
|
+
} | {
|
|
193
|
+
kind: 'browse';
|
|
194
|
+
query?: string;
|
|
195
|
+
sort?: PeopleSort;
|
|
196
|
+
} | {
|
|
197
|
+
kind: 'list';
|
|
198
|
+
query?: string;
|
|
199
|
+
letter?: string;
|
|
200
|
+
sort?: PeopleSort;
|
|
201
|
+
} | {
|
|
202
|
+
kind: 'show';
|
|
203
|
+
query: string;
|
|
204
|
+
} | {
|
|
205
|
+
kind: 'log';
|
|
206
|
+
query: string;
|
|
207
|
+
type: string;
|
|
208
|
+
summary?: string;
|
|
209
|
+
} | {
|
|
210
|
+
kind: 'alias';
|
|
211
|
+
query: string;
|
|
212
|
+
alias: string;
|
|
213
|
+
} | {
|
|
214
|
+
kind: 'merge';
|
|
215
|
+
keepQuery: string;
|
|
216
|
+
dropQueries: string[];
|
|
217
|
+
} | {
|
|
218
|
+
kind: 'money';
|
|
219
|
+
query: string;
|
|
220
|
+
direction?: PersonMoneyDirection;
|
|
221
|
+
amount?: number;
|
|
222
|
+
currency?: string;
|
|
223
|
+
note?: string;
|
|
224
|
+
} | {
|
|
225
|
+
kind: 'paid-for';
|
|
226
|
+
query: string;
|
|
227
|
+
} | {
|
|
228
|
+
kind: 'help';
|
|
229
|
+
};
|
|
230
|
+
export declare function parsePeopleArgs(positional: string[]): PeopleCommand;
|
|
231
|
+
export declare function printPeopleHelp(): void;
|
|
232
|
+
export declare function runPeopleCommand(creds: DayzeCredentials, positional: string[], options?: PeopleCommandOptions): Promise<void>;
|