@project-ava-supernova/core 0.2.151 → 0.2.152
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/agent/agent.d.ts +23 -18
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +38 -24
- package/dist/agent/agent.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +47 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +47 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +47 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +47 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +47 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +47 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +47 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/id.d.ts.map +1 -1
- package/dist/i18n/locales/id.js +47 -0
- package/dist/i18n/locales/id.js.map +1 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +47 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +47 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/ko.d.ts.map +1 -1
- package/dist/i18n/locales/ko.js +47 -0
- package/dist/i18n/locales/ko.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +47 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +47 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +47 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +47 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/th.d.ts.map +1 -1
- package/dist/i18n/locales/th.js +47 -0
- package/dist/i18n/locales/th.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +47 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/uk.d.ts.map +1 -1
- package/dist/i18n/locales/uk.js +47 -0
- package/dist/i18n/locales/uk.js.map +1 -1
- package/dist/i18n/locales/vi.d.ts.map +1 -1
- package/dist/i18n/locales/vi.js +47 -0
- package/dist/i18n/locales/vi.js.map +1 -1
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN.js +47 -0
- package/dist/i18n/locales/zh-CN.js.map +1 -1
- package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/i18n/locales/zh-TW.js +47 -0
- package/dist/i18n/locales/zh-TW.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/portability/factory-reset.d.ts +136 -0
- package/dist/portability/factory-reset.d.ts.map +1 -0
- package/dist/portability/factory-reset.js +360 -0
- package/dist/portability/factory-reset.js.map +1 -0
- package/dist/portability/index.d.ts +1 -0
- package/dist/portability/index.d.ts.map +1 -1
- package/dist/portability/index.js +2 -0
- package/dist/portability/index.js.map +1 -1
- package/dist/social/index.d.ts +16 -0
- package/dist/social/index.d.ts.map +1 -1
- package/dist/tools/suggest-beats.d.ts.map +1 -1
- package/dist/tools/suggest-beats.js +27 -2
- package/dist/tools/suggest-beats.js.map +1 -1
- package/dist/tools/write-video-post.d.ts.map +1 -1
- package/dist/tools/write-video-post.js +58 -2
- package/dist/tools/write-video-post.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory reset — put Ava back to day one.
|
|
3
|
+
*
|
|
4
|
+
* Asked for as "restore a PC to factory settings", and the analogy is exact:
|
|
5
|
+
* it has to clear the things that make a first run feel like a first run
|
|
6
|
+
* (onboarding, consent, sign-in), or it is a memory wipe wearing a bigger name.
|
|
7
|
+
*
|
|
8
|
+
* It lives beside the backup bundle on purpose. `bundle.ts` already answers
|
|
9
|
+
* "what counts as this user's data?", and a reset that kept its own second
|
|
10
|
+
* answer would drift from it — deleting something backup never saved, or
|
|
11
|
+
* sparing something backup always did. One question, one list: this module
|
|
12
|
+
* imports ACCOUNT_DATA_PATHS and GLOBAL_DATA_PATHS rather than restating them.
|
|
13
|
+
*
|
|
14
|
+
* THREE RULES, and they matter more than the deleting does.
|
|
15
|
+
*
|
|
16
|
+
* 1. NOTHING LEAVES WITHOUT BEING ASKED FOR. Every category is opt-in and
|
|
17
|
+
* named in the user's terms. `projects/` holds their actual source code —
|
|
18
|
+
* 19GB and four real projects on the machine this was written on — so it
|
|
19
|
+
* ships unticked and needs a typed confirmation. The difference between a
|
|
20
|
+
* reset and a catastrophe is one checkbox nobody read.
|
|
21
|
+
*
|
|
22
|
+
* 2. SAY WHAT IT COSTS BEFORE IT COSTS IT. Each category reports its real
|
|
23
|
+
* size first. "Projects (19.0 GB)" stops a hand that "Projects" would not.
|
|
24
|
+
*
|
|
25
|
+
* 3. A RESET THAT UN-RESETS ITSELF IS WORSE THAN NONE. Cloud sync is disabled
|
|
26
|
+
* BEFORE anything local goes; otherwise the next sync pulls the history
|
|
27
|
+
* back down and the user believes they started fresh when they did not.
|
|
28
|
+
*
|
|
29
|
+
* THE TRAP THIS MODULE EXISTS TO AVOID: account data is NOT at the Ava home.
|
|
30
|
+
* It is under `users/<account-id>/`, which is why bundle.ts carries two roots.
|
|
31
|
+
* A reset that deletes `~/.ava/memory` for a signed-in user deletes nothing
|
|
32
|
+
* they own, and a reset that calls `users/` a cache deletes everything they
|
|
33
|
+
* own under a label that says it is safe. Both were in this file's first
|
|
34
|
+
* draft. See `scopedRoot`.
|
|
35
|
+
*/
|
|
36
|
+
/** How dangerous a category is, which drives the UI's treatment of it. */
|
|
37
|
+
export type ResetSeverity =
|
|
38
|
+
/** Re-earned by using the product again. */
|
|
39
|
+
'ordinary'
|
|
40
|
+
/** Gone for good, but only ours to lose — keys, settings, history. */
|
|
41
|
+
| 'permanent'
|
|
42
|
+
/** The user's own work, or other devices. Typed confirmation required. */
|
|
43
|
+
| 'irreversible';
|
|
44
|
+
export interface ResetCategory {
|
|
45
|
+
id: string;
|
|
46
|
+
/** i18n key; the English fallback is supplied at the call site. */
|
|
47
|
+
labelKey: string;
|
|
48
|
+
severity: ResetSeverity;
|
|
49
|
+
/** Ticked when the dialog opens. Never true for `irreversible`. */
|
|
50
|
+
defaultSelected: boolean;
|
|
51
|
+
/** Paths relative to the ACCOUNT root (`users/<id>/`, or home when signed out). */
|
|
52
|
+
accountPaths?: readonly string[];
|
|
53
|
+
/** Paths relative to the Ava home, always. */
|
|
54
|
+
globalPaths?: readonly string[];
|
|
55
|
+
/** Host secret keys to delete. */
|
|
56
|
+
secrets?: readonly string[];
|
|
57
|
+
/** Host setting keys to clear. */
|
|
58
|
+
stateKeys?: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
export declare const PROVIDER_SECRETS: readonly ["ava-supernova.platformKey", "ava-supernova.secretVault", "ava-supernova.provider.deepseek.apiKey", "ava-supernova.provider.kimi.apiKey", "ava-supernova.provider.qwen.apiKey", "ava-supernova.provider.mistral.apiKey", "ava-supernova.provider.minimax.apiKey", "ava-supernova.provider.local.apiKey"];
|
|
61
|
+
/**
|
|
62
|
+
* Clearing these is what actually produces "day one" — onboarding and the
|
|
63
|
+
* consent screen come back. Without them a reset yields a cleaned install,
|
|
64
|
+
* not a fresh one, and the user can tell the difference immediately.
|
|
65
|
+
*/
|
|
66
|
+
export declare const DAY_ONE_STATE_KEYS: readonly ["ava.onboardedV1", "ava.consentAccepted", "ava.syncPrefs", "ava.categoryPermissions", "ava.workingHours", "ava.lastAccountId", "ava.dashboardPageAfterOpen", "ava.platformKey", "ava-supernova.provider.local.baseUrl", "ava-supernova.provider.local.modelLabel", "ava-supernova.provider.local.modelName", "ava-supernova.provider.local.models"];
|
|
67
|
+
/**
|
|
68
|
+
* The categories, in the order the dialog shows them: cheapest to lose first,
|
|
69
|
+
* the user's own work last. Ordering is a safety feature — a list that opens
|
|
70
|
+
* on "delete my source code" invites a reflexive tick-everything.
|
|
71
|
+
*/
|
|
72
|
+
export declare function resetCategories(): ResetCategory[];
|
|
73
|
+
/**
|
|
74
|
+
* Every category path, resolved absolutely.
|
|
75
|
+
*
|
|
76
|
+
* `scopedDir` is the signed-in account's folder (`users/<id>/`). When absent —
|
|
77
|
+
* a BYOK user who never signed in — account data sits at the home root, which
|
|
78
|
+
* is why the fallback is `avaHome` and not an error.
|
|
79
|
+
*
|
|
80
|
+
* ACCOUNT PATHS ARE SWEPT AT BOTH ROOTS, and that is deliberate. Found by the
|
|
81
|
+
* operator on 19 Oct 2026, testing a full wipe on his own machine: every box
|
|
82
|
+
* ticked, projects deleted — and `~/.ava/memory.json` was still there
|
|
83
|
+
* afterwards with 199 entries, current to two hours earlier, because memory is
|
|
84
|
+
* an account path and only `users/<id>/memory.json` was in scope. Something
|
|
85
|
+
* still writes to the unscoped copy, so a signed-in user could erase
|
|
86
|
+
* everything, believe they were at day one, and find Ava still knew them.
|
|
87
|
+
*
|
|
88
|
+
* Reading from two homes is the bug behind that; reset is simply the one
|
|
89
|
+
* operation where sweeping the stale duplicate is unambiguously correct.
|
|
90
|
+
* Everywhere else, guessing which copy is live is how data goes missing — see
|
|
91
|
+
* `gatherBundle`, which deliberately reads ONE root per path and must keep
|
|
92
|
+
* doing so.
|
|
93
|
+
*/
|
|
94
|
+
export declare function categoryPaths(cat: ResetCategory, avaHome: string, scopedDir?: string | null): string[];
|
|
95
|
+
/** Sanity net: every known data path, for tests and for the "select all" label. */
|
|
96
|
+
export declare function allKnownDataPaths(avaHome: string, scopedDir?: string | null): string[];
|
|
97
|
+
export interface CategorySize {
|
|
98
|
+
id: string;
|
|
99
|
+
bytes: number;
|
|
100
|
+
/** True when the walk hit its time budget and stopped counting. */
|
|
101
|
+
approximate: boolean;
|
|
102
|
+
/** Nothing to delete — the UI greys the row out rather than offering it. */
|
|
103
|
+
empty: boolean;
|
|
104
|
+
}
|
|
105
|
+
/** Measure every category so the dialog can show what each one costs. */
|
|
106
|
+
export declare function scanCategories(avaHome: string, scopedDir?: string | null, budgetMs?: number): Promise<CategorySize[]>;
|
|
107
|
+
export interface ResetReport {
|
|
108
|
+
removed: string[];
|
|
109
|
+
failed: {
|
|
110
|
+
path: string;
|
|
111
|
+
reason: string;
|
|
112
|
+
}[];
|
|
113
|
+
secretsCleared: number;
|
|
114
|
+
stateKeysCleared: number;
|
|
115
|
+
bytesFreed: number;
|
|
116
|
+
}
|
|
117
|
+
/** Host capabilities the reset needs, injected so this module stays testable. */
|
|
118
|
+
export interface ResetHost {
|
|
119
|
+
deleteSecret(key: string): Promise<void>;
|
|
120
|
+
clearStateKey(key: string): Promise<void>;
|
|
121
|
+
/** Turn cloud sync off BEFORE anything is deleted. See rule 3. */
|
|
122
|
+
disableSyncFirst(): Promise<void>;
|
|
123
|
+
log(msg: string): void;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Remove the selected categories.
|
|
127
|
+
*
|
|
128
|
+
* Deliberately keeps going when one path fails. On Windows a file held open by
|
|
129
|
+
* another process throws EBUSY, and stopping at the first one would leave the
|
|
130
|
+
* user half-reset with no idea which half — worse than either finishing or
|
|
131
|
+
* not starting. Every failure is collected and reported instead.
|
|
132
|
+
*/
|
|
133
|
+
export declare function executeReset(selectedIds: readonly string[], host: ResetHost, avaHome: string, scopedDir?: string | null): Promise<ResetReport>;
|
|
134
|
+
/** Human-readable size, for the dialog. */
|
|
135
|
+
export declare function formatBytes(n: number): string;
|
|
136
|
+
//# sourceMappingURL=factory-reset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory-reset.d.ts","sourceRoot":"","sources":["../../src/portability/factory-reset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAMH,0EAA0E;AAC1E,MAAM,MAAM,aAAa;AACvB,4CAA4C;AAC1C,UAAU;AACZ,sEAAsE;GACpE,WAAW;AACb,0EAA0E;GACxE,cAAc,CAAC;AAEnB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,aAAa,CAAC;IACxB,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,kCAAkC;IAClC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,kCAAkC;IAClC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,oTASnB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+VAarB,CAAC;AAYX;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,aAAa,EAAE,CAuFjD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GACxB,MAAM,EAAE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,CA2DtB;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAM7C"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory reset — put Ava back to day one.
|
|
3
|
+
*
|
|
4
|
+
* Asked for as "restore a PC to factory settings", and the analogy is exact:
|
|
5
|
+
* it has to clear the things that make a first run feel like a first run
|
|
6
|
+
* (onboarding, consent, sign-in), or it is a memory wipe wearing a bigger name.
|
|
7
|
+
*
|
|
8
|
+
* It lives beside the backup bundle on purpose. `bundle.ts` already answers
|
|
9
|
+
* "what counts as this user's data?", and a reset that kept its own second
|
|
10
|
+
* answer would drift from it — deleting something backup never saved, or
|
|
11
|
+
* sparing something backup always did. One question, one list: this module
|
|
12
|
+
* imports ACCOUNT_DATA_PATHS and GLOBAL_DATA_PATHS rather than restating them.
|
|
13
|
+
*
|
|
14
|
+
* THREE RULES, and they matter more than the deleting does.
|
|
15
|
+
*
|
|
16
|
+
* 1. NOTHING LEAVES WITHOUT BEING ASKED FOR. Every category is opt-in and
|
|
17
|
+
* named in the user's terms. `projects/` holds their actual source code —
|
|
18
|
+
* 19GB and four real projects on the machine this was written on — so it
|
|
19
|
+
* ships unticked and needs a typed confirmation. The difference between a
|
|
20
|
+
* reset and a catastrophe is one checkbox nobody read.
|
|
21
|
+
*
|
|
22
|
+
* 2. SAY WHAT IT COSTS BEFORE IT COSTS IT. Each category reports its real
|
|
23
|
+
* size first. "Projects (19.0 GB)" stops a hand that "Projects" would not.
|
|
24
|
+
*
|
|
25
|
+
* 3. A RESET THAT UN-RESETS ITSELF IS WORSE THAN NONE. Cloud sync is disabled
|
|
26
|
+
* BEFORE anything local goes; otherwise the next sync pulls the history
|
|
27
|
+
* back down and the user believes they started fresh when they did not.
|
|
28
|
+
*
|
|
29
|
+
* THE TRAP THIS MODULE EXISTS TO AVOID: account data is NOT at the Ava home.
|
|
30
|
+
* It is under `users/<account-id>/`, which is why bundle.ts carries two roots.
|
|
31
|
+
* A reset that deletes `~/.ava/memory` for a signed-in user deletes nothing
|
|
32
|
+
* they own, and a reset that calls `users/` a cache deletes everything they
|
|
33
|
+
* own under a label that says it is safe. Both were in this file's first
|
|
34
|
+
* draft. See `scopedRoot`.
|
|
35
|
+
*/
|
|
36
|
+
import { rm, lstat, readdir } from 'node:fs/promises';
|
|
37
|
+
import { join, resolve, sep } from 'node:path';
|
|
38
|
+
import { ACCOUNT_DATA_PATHS, GLOBAL_DATA_PATHS } from './bundle.js';
|
|
39
|
+
export const PROVIDER_SECRETS = [
|
|
40
|
+
'ava-supernova.platformKey',
|
|
41
|
+
'ava-supernova.secretVault',
|
|
42
|
+
'ava-supernova.provider.deepseek.apiKey',
|
|
43
|
+
'ava-supernova.provider.kimi.apiKey',
|
|
44
|
+
'ava-supernova.provider.qwen.apiKey',
|
|
45
|
+
'ava-supernova.provider.mistral.apiKey',
|
|
46
|
+
'ava-supernova.provider.minimax.apiKey',
|
|
47
|
+
'ava-supernova.provider.local.apiKey',
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Clearing these is what actually produces "day one" — onboarding and the
|
|
51
|
+
* consent screen come back. Without them a reset yields a cleaned install,
|
|
52
|
+
* not a fresh one, and the user can tell the difference immediately.
|
|
53
|
+
*/
|
|
54
|
+
export const DAY_ONE_STATE_KEYS = [
|
|
55
|
+
'ava.onboardedV1',
|
|
56
|
+
'ava.consentAccepted',
|
|
57
|
+
'ava.syncPrefs',
|
|
58
|
+
'ava.categoryPermissions',
|
|
59
|
+
'ava.workingHours',
|
|
60
|
+
'ava.lastAccountId',
|
|
61
|
+
'ava.dashboardPageAfterOpen',
|
|
62
|
+
'ava.platformKey',
|
|
63
|
+
'ava-supernova.provider.local.baseUrl',
|
|
64
|
+
'ava-supernova.provider.local.modelLabel',
|
|
65
|
+
'ava-supernova.provider.local.modelName',
|
|
66
|
+
'ava-supernova.provider.local.models',
|
|
67
|
+
];
|
|
68
|
+
/** Memory and the learned layer: everything Ava knows about this person. */
|
|
69
|
+
const MEMORY_ACCOUNT = ['memory', 'memory.json', 'memory.md', 'memory-v2-backup.json'];
|
|
70
|
+
const MEMORY_GLOBAL = ['procedures.json', 'self-improvement.json'];
|
|
71
|
+
/** Conversations and the life data that accumulates alongside them. */
|
|
72
|
+
const HISTORY_ACCOUNT = ['history', 'journal', 'tasks', 'learning.json', 'health'];
|
|
73
|
+
/** Personalisation — who Ava thinks you are, and who she is. */
|
|
74
|
+
const PROFILE_ACCOUNT = ['personality.json', 'general.json', 'config', 'creative/metadata.json'];
|
|
75
|
+
/**
|
|
76
|
+
* The categories, in the order the dialog shows them: cheapest to lose first,
|
|
77
|
+
* the user's own work last. Ordering is a safety feature — a list that opens
|
|
78
|
+
* on "delete my source code" invites a reflexive tick-everything.
|
|
79
|
+
*/
|
|
80
|
+
export function resetCategories() {
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
id: 'logs',
|
|
84
|
+
labelKey: 'reset.cat.logs',
|
|
85
|
+
severity: 'ordinary',
|
|
86
|
+
defaultSelected: true,
|
|
87
|
+
globalPaths: [
|
|
88
|
+
'audit-log.jsonl', 'desktop-conductor.log', 'uia-debug.log',
|
|
89
|
+
'cc-auditlog-probe.log', 'briefing-state.json', 'deploy-state.json',
|
|
90
|
+
'sync-state.json', 'generation-jobs.json', 'desktop-forkpoints.json',
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'caches',
|
|
95
|
+
labelKey: 'reset.cat.caches',
|
|
96
|
+
severity: 'ordinary',
|
|
97
|
+
defaultSelected: true,
|
|
98
|
+
// `bin` and `models` are downloaded artefacts, not the user's. `users`
|
|
99
|
+
// is NOT here, however much its size suggests it belongs — see the
|
|
100
|
+
// header. It holds account data and is covered by the categories below.
|
|
101
|
+
globalPaths: ['models', 'bin'],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 'memory',
|
|
105
|
+
labelKey: 'reset.cat.memory',
|
|
106
|
+
severity: 'permanent',
|
|
107
|
+
defaultSelected: true,
|
|
108
|
+
accountPaths: MEMORY_ACCOUNT,
|
|
109
|
+
globalPaths: MEMORY_GLOBAL,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 'conversations',
|
|
113
|
+
labelKey: 'reset.cat.conversations',
|
|
114
|
+
severity: 'permanent',
|
|
115
|
+
defaultSelected: true,
|
|
116
|
+
accountPaths: HISTORY_ACCOUNT,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 'profile',
|
|
120
|
+
labelKey: 'reset.cat.profile',
|
|
121
|
+
severity: 'permanent',
|
|
122
|
+
defaultSelected: true,
|
|
123
|
+
accountPaths: PROFILE_ACCOUNT,
|
|
124
|
+
globalPaths: ['avatar.dat', 'config.json', 'feedback.json'],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 'datasets',
|
|
128
|
+
labelKey: 'reset.cat.datasets',
|
|
129
|
+
severity: 'permanent',
|
|
130
|
+
// Generated FROM the user, so it leaves WITH them — but it is also the
|
|
131
|
+
// only copy of captured training data, so it is never swept silently.
|
|
132
|
+
defaultSelected: false,
|
|
133
|
+
globalPaths: ['datasets'],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'project_data',
|
|
137
|
+
labelKey: 'reset.cat.project_data',
|
|
138
|
+
severity: 'permanent',
|
|
139
|
+
defaultSelected: true,
|
|
140
|
+
// What Ava knows ABOUT the projects. NOT the projects. Conflating the
|
|
141
|
+
// two is exactly how somebody loses a year of work.
|
|
142
|
+
accountPaths: ['projects.json'],
|
|
143
|
+
globalPaths: ['project-index.json', 'projects-usage.json', 'project-notes'],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'credentials',
|
|
147
|
+
labelKey: 'reset.cat.credentials',
|
|
148
|
+
severity: 'permanent',
|
|
149
|
+
defaultSelected: true,
|
|
150
|
+
secrets: PROVIDER_SECRETS,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: 'settings',
|
|
154
|
+
labelKey: 'reset.cat.settings',
|
|
155
|
+
severity: 'permanent',
|
|
156
|
+
defaultSelected: true,
|
|
157
|
+
stateKeys: DAY_ONE_STATE_KEYS,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'projects',
|
|
161
|
+
labelKey: 'reset.cat.projects',
|
|
162
|
+
severity: 'irreversible',
|
|
163
|
+
defaultSelected: false,
|
|
164
|
+
globalPaths: ['projects'],
|
|
165
|
+
},
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Every category path, resolved absolutely.
|
|
170
|
+
*
|
|
171
|
+
* `scopedDir` is the signed-in account's folder (`users/<id>/`). When absent —
|
|
172
|
+
* a BYOK user who never signed in — account data sits at the home root, which
|
|
173
|
+
* is why the fallback is `avaHome` and not an error.
|
|
174
|
+
*
|
|
175
|
+
* ACCOUNT PATHS ARE SWEPT AT BOTH ROOTS, and that is deliberate. Found by the
|
|
176
|
+
* operator on 19 Oct 2026, testing a full wipe on his own machine: every box
|
|
177
|
+
* ticked, projects deleted — and `~/.ava/memory.json` was still there
|
|
178
|
+
* afterwards with 199 entries, current to two hours earlier, because memory is
|
|
179
|
+
* an account path and only `users/<id>/memory.json` was in scope. Something
|
|
180
|
+
* still writes to the unscoped copy, so a signed-in user could erase
|
|
181
|
+
* everything, believe they were at day one, and find Ava still knew them.
|
|
182
|
+
*
|
|
183
|
+
* Reading from two homes is the bug behind that; reset is simply the one
|
|
184
|
+
* operation where sweeping the stale duplicate is unambiguously correct.
|
|
185
|
+
* Everywhere else, guessing which copy is live is how data goes missing — see
|
|
186
|
+
* `gatherBundle`, which deliberately reads ONE root per path and must keep
|
|
187
|
+
* doing so.
|
|
188
|
+
*/
|
|
189
|
+
export function categoryPaths(cat, avaHome, scopedDir) {
|
|
190
|
+
const roots = scopedDir && resolve(scopedDir) !== resolve(avaHome)
|
|
191
|
+
? [scopedDir, avaHome]
|
|
192
|
+
: [avaHome];
|
|
193
|
+
const out = [];
|
|
194
|
+
for (const p of cat.accountPaths ?? []) {
|
|
195
|
+
for (const r of roots)
|
|
196
|
+
out.push(join(r, p));
|
|
197
|
+
}
|
|
198
|
+
for (const p of cat.globalPaths ?? [])
|
|
199
|
+
out.push(join(avaHome, p));
|
|
200
|
+
return [...new Set(out)];
|
|
201
|
+
}
|
|
202
|
+
/** Sanity net: every known data path, for tests and for the "select all" label. */
|
|
203
|
+
export function allKnownDataPaths(avaHome, scopedDir) {
|
|
204
|
+
const accountRoot = scopedDir || avaHome;
|
|
205
|
+
return [
|
|
206
|
+
...ACCOUNT_DATA_PATHS.map(p => join(accountRoot, p)),
|
|
207
|
+
...GLOBAL_DATA_PATHS.map(p => join(avaHome, p)),
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Size a path, with a time budget.
|
|
212
|
+
*
|
|
213
|
+
* `projects` was 19GB across four trees when this was written and an
|
|
214
|
+
* exhaustive walk took over two minutes — far too long to hold a dialog open.
|
|
215
|
+
* So the walk stops when the budget runs out and SAYS so, because a number
|
|
216
|
+
* labelled "at least" is honest and a spinner that never resolves is not.
|
|
217
|
+
*/
|
|
218
|
+
async function sizeOf(target, deadline) {
|
|
219
|
+
let bytes = 0;
|
|
220
|
+
const stack = [target];
|
|
221
|
+
while (stack.length) {
|
|
222
|
+
if (Date.now() > deadline)
|
|
223
|
+
return { bytes, done: false };
|
|
224
|
+
const cur = stack.pop();
|
|
225
|
+
let st;
|
|
226
|
+
try {
|
|
227
|
+
st = await lstat(cur);
|
|
228
|
+
}
|
|
229
|
+
catch {
|
|
230
|
+
continue; // absent or unreadable — nothing to count and nothing to fix
|
|
231
|
+
}
|
|
232
|
+
if (st.isSymbolicLink())
|
|
233
|
+
continue; // never follow: a link out of the tree is not ours
|
|
234
|
+
if (st.isFile()) {
|
|
235
|
+
bytes += st.size;
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
if (!st.isDirectory())
|
|
239
|
+
continue;
|
|
240
|
+
let entries;
|
|
241
|
+
try {
|
|
242
|
+
entries = await readdir(cur);
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
for (const e of entries)
|
|
248
|
+
stack.push(join(cur, e));
|
|
249
|
+
}
|
|
250
|
+
return { bytes, done: true };
|
|
251
|
+
}
|
|
252
|
+
/** Measure every category so the dialog can show what each one costs. */
|
|
253
|
+
export async function scanCategories(avaHome, scopedDir, budgetMs = 5000) {
|
|
254
|
+
const cats = resetCategories();
|
|
255
|
+
// Budget is spent per-category so one enormous tree cannot starve the rest
|
|
256
|
+
// of the list of a number.
|
|
257
|
+
const per = Math.max(250, Math.floor(budgetMs / cats.length));
|
|
258
|
+
const out = [];
|
|
259
|
+
for (const c of cats) {
|
|
260
|
+
let bytes = 0;
|
|
261
|
+
let done = true;
|
|
262
|
+
const deadline = Date.now() + per;
|
|
263
|
+
for (const p of categoryPaths(c, avaHome, scopedDir)) {
|
|
264
|
+
const r = await sizeOf(p, deadline);
|
|
265
|
+
bytes += r.bytes;
|
|
266
|
+
if (!r.done)
|
|
267
|
+
done = false;
|
|
268
|
+
}
|
|
269
|
+
const hasKeys = (c.secrets?.length ?? 0) > 0 || (c.stateKeys?.length ?? 0) > 0;
|
|
270
|
+
out.push({ id: c.id, bytes, approximate: !done, empty: bytes === 0 && !hasKeys });
|
|
271
|
+
}
|
|
272
|
+
return out;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Remove the selected categories.
|
|
276
|
+
*
|
|
277
|
+
* Deliberately keeps going when one path fails. On Windows a file held open by
|
|
278
|
+
* another process throws EBUSY, and stopping at the first one would leave the
|
|
279
|
+
* user half-reset with no idea which half — worse than either finishing or
|
|
280
|
+
* not starting. Every failure is collected and reported instead.
|
|
281
|
+
*/
|
|
282
|
+
export async function executeReset(selectedIds, host, avaHome, scopedDir) {
|
|
283
|
+
const report = {
|
|
284
|
+
removed: [], failed: [], secretsCleared: 0, stateKeysCleared: 0, bytesFreed: 0,
|
|
285
|
+
};
|
|
286
|
+
const cats = resetCategories().filter(c => selectedIds.includes(c.id));
|
|
287
|
+
if (cats.length === 0)
|
|
288
|
+
return report;
|
|
289
|
+
// Rule 3, and it must happen first.
|
|
290
|
+
try {
|
|
291
|
+
await host.disableSyncFirst();
|
|
292
|
+
}
|
|
293
|
+
catch (e) {
|
|
294
|
+
host.log(`[factory-reset] could not disable sync first: ${e instanceof Error ? e.message : String(e)}`);
|
|
295
|
+
}
|
|
296
|
+
const root = resolve(avaHome);
|
|
297
|
+
for (const c of cats) {
|
|
298
|
+
for (const p of categoryPaths(c, avaHome, scopedDir)) {
|
|
299
|
+
const abs = resolve(p);
|
|
300
|
+
// Belt and braces: never delete outside the Ava home, whatever the
|
|
301
|
+
// category table says. A bug up there should not reach the disk, and
|
|
302
|
+
// `users/<id>/` is itself under the home so scoped paths still pass.
|
|
303
|
+
if (abs !== root && !abs.startsWith(root + sep)) {
|
|
304
|
+
report.failed.push({ path: abs, reason: 'outside the Ava folder — refused' });
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
// Refuse to delete the home itself. No category asks for it, but the
|
|
308
|
+
// one that someday does by accident would take everything at once.
|
|
309
|
+
if (abs === root) {
|
|
310
|
+
report.failed.push({ path: abs, reason: 'refused to delete the Ava folder itself' });
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
let size = 0;
|
|
314
|
+
try {
|
|
315
|
+
size = (await sizeOf(abs, Date.now() + 2000)).bytes;
|
|
316
|
+
}
|
|
317
|
+
catch { /* a size is a nicety, not a reason to stop */ }
|
|
318
|
+
try {
|
|
319
|
+
await rm(abs, { recursive: true, force: true });
|
|
320
|
+
report.removed.push(abs);
|
|
321
|
+
report.bytesFreed += size;
|
|
322
|
+
}
|
|
323
|
+
catch (e) {
|
|
324
|
+
report.failed.push({ path: abs, reason: e instanceof Error ? e.message : String(e) });
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
for (const s of c.secrets ?? []) {
|
|
328
|
+
try {
|
|
329
|
+
await host.deleteSecret(s);
|
|
330
|
+
report.secretsCleared++;
|
|
331
|
+
}
|
|
332
|
+
catch (e) {
|
|
333
|
+
report.failed.push({ path: s, reason: e instanceof Error ? e.message : String(e) });
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
for (const k of c.stateKeys ?? []) {
|
|
337
|
+
try {
|
|
338
|
+
await host.clearStateKey(k);
|
|
339
|
+
report.stateKeysCleared++;
|
|
340
|
+
}
|
|
341
|
+
catch (e) {
|
|
342
|
+
report.failed.push({ path: k, reason: e instanceof Error ? e.message : String(e) });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
host.log(`[factory-reset] removed ${report.removed.length} path(s), `
|
|
347
|
+
+ `${report.secretsCleared} secret(s), ${report.stateKeysCleared} setting(s), `
|
|
348
|
+
+ `${report.failed.length} failure(s), ${report.bytesFreed} byte(s) freed`);
|
|
349
|
+
return report;
|
|
350
|
+
}
|
|
351
|
+
/** Human-readable size, for the dialog. */
|
|
352
|
+
export function formatBytes(n) {
|
|
353
|
+
if (n <= 0)
|
|
354
|
+
return '0 B';
|
|
355
|
+
const u = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
356
|
+
const i = Math.min(u.length - 1, Math.floor(Math.log(n) / Math.log(1024)));
|
|
357
|
+
const v = n / Math.pow(1024, i);
|
|
358
|
+
return `${v >= 100 || i === 0 ? Math.round(v) : v.toFixed(1)} ${u[i]}`;
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=factory-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory-reset.js","sourceRoot":"","sources":["../../src/portability/factory-reset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE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GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3E,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAChC,OAAO,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
export { seal, open, isSealedEnvelope, type SealedEnvelope } from './crypto.js';
|
|
12
12
|
export { gatherBundle, restoreBundle, USER_DATA_PATHS, ACCOUNT_DATA_PATHS, GLOBAL_DATA_PATHS, BUNDLE_VERSION, type DataBundle, type RestoreResult, } from './bundle.js';
|
|
13
13
|
export { exportDataType, importDataType, isCoreDataType, NotImportableError, CORE_DATA_TYPES, type CoreDataType, type ExportedFile, type DataRoots, } from './data-types.js';
|
|
14
|
+
export { resetCategories, categoryPaths, allKnownDataPaths, scanCategories, executeReset, formatBytes, PROVIDER_SECRETS, DAY_ONE_STATE_KEYS, type ResetCategory, type ResetSeverity, type CategorySize, type ResetReport, type ResetHost, } from './factory-reset.js';
|
|
14
15
|
import { type DataBundle, type RestoreResult } from './bundle.js';
|
|
15
16
|
/**
|
|
16
17
|
* Export everything under `avaHome` as an encrypted backup. Returns the sealed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/portability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/portability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAC/E,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EACjD,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,GAC5F,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAA+B,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAE/F;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/D,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACjD,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC,CAUxD"}
|
|
@@ -12,6 +12,8 @@ export { seal, open, isSealedEnvelope } from './crypto.js';
|
|
|
12
12
|
export { gatherBundle, restoreBundle, USER_DATA_PATHS, ACCOUNT_DATA_PATHS, GLOBAL_DATA_PATHS, BUNDLE_VERSION, } from './bundle.js';
|
|
13
13
|
// Per-type export/import, shared by every surface so they cannot drift.
|
|
14
14
|
export { exportDataType, importDataType, isCoreDataType, NotImportableError, CORE_DATA_TYPES, } from './data-types.js';
|
|
15
|
+
// Factory reset — the other end of portability: take it all away.
|
|
16
|
+
export { resetCategories, categoryPaths, allKnownDataPaths, scanCategories, executeReset, formatBytes, PROVIDER_SECRETS, DAY_ONE_STATE_KEYS, } from './factory-reset.js';
|
|
15
17
|
import { seal, open } from './crypto.js';
|
|
16
18
|
import { gatherBundle, restoreBundle } from './bundle.js';
|
|
17
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/portability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAuB,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,GAGf,MAAM,aAAa,CAAC;AACrB,wEAAwE;AACxE,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,GAIhB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/portability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAuB,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,GAGf,MAAM,aAAa,CAAC;AACrB,wEAAwE;AACxE,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,GAIhB,MAAM,iBAAiB,CAAC;AACzB,kEAAkE;AAClE,OAAO,EACL,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAC/E,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,GAElD,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAuC,MAAM,aAAa,CAAC;AAE/F;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAe,EACf,UAAkB,EAClB,IAAgE;IAEhE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAe,EACf,YAAoB,EACpB,UAAkB,EAClB,IAAkD;IAElD,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC5C,IAAI,MAAkB,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAe,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
|
package/dist/social/index.d.ts
CHANGED
|
@@ -353,6 +353,22 @@ export interface Beat {
|
|
|
353
353
|
* either and should leave this alone.
|
|
354
354
|
*/
|
|
355
355
|
format?: string;
|
|
356
|
+
/**
|
|
357
|
+
* Is this beat anchored to something currently IN THE NEWS?
|
|
358
|
+
*
|
|
359
|
+
* At least one of the day's beats must be, and the day refuses without it
|
|
360
|
+
* (19 Oct 2026, operator's call). The reason is reach rather than variety:
|
|
361
|
+
* a post about our own release only reaches people already looking at us,
|
|
362
|
+
* while a post about a thing the whole field is discussing today reaches
|
|
363
|
+
* people who have never heard of us — and that is the only kind of post
|
|
364
|
+
* that grows anything.
|
|
365
|
+
*
|
|
366
|
+
* It means a REAL story from today or the last day or two, found with
|
|
367
|
+
* web_search or the news desk and named specifically. "AI is moving fast"
|
|
368
|
+
* is not news; a named model release, a named outage, a named policy change
|
|
369
|
+
* is. An invented one is far worse than none.
|
|
370
|
+
*/
|
|
371
|
+
is_news?: boolean;
|
|
356
372
|
}
|
|
357
373
|
/**
|
|
358
374
|
* Surface-injected sink for the day's suggested beats. The web/hub
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/social/index.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,WAAW,IAAI,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAA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AAY,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;;;;GAKG;AACH,qBAAa,gBAAiB,YAAW,IAAI;IAC3C,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,2NACiM;IACrN,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAU;IAC3C,QAAQ,CAAC,oBAAoB,SAAS;IAEtC,QAAQ,CAAC,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"suggest-beats.d.ts","sourceRoot":"","sources":["../../src/tools/suggest-beats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;;;;GAKG;AACH,qBAAa,gBAAiB,YAAW,IAAI;IAC3C,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,2NACiM;IACrN,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAU;IAC3C,QAAQ,CAAC,oBAAoB,SAAS;IAEtC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAwB7B;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAgEjG"}
|