@project-ava-supernova/core 0.2.198 → 0.2.200
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.map +1 -1
- package/dist/agent/agent.js +5 -2
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/system-prompt.js +2 -2
- package/dist/audit/cost.d.ts.map +1 -1
- package/dist/audit/cost.js +2 -1
- package/dist/audit/cost.js.map +1 -1
- package/dist/creative/library-folders.d.ts.map +1 -1
- package/dist/creative/library-folders.js +1 -0
- package/dist/creative/library-folders.js.map +1 -1
- package/dist/desktop/learned-steps.js +1 -1
- package/dist/desktop/learned-steps.js.map +1 -1
- package/dist/docs/content/concepts.d.ts.map +1 -1
- package/dist/docs/content/concepts.js +11 -0
- package/dist/docs/content/concepts.js.map +1 -1
- package/dist/docs/data/providers.d.ts.map +1 -1
- package/dist/docs/data/providers.js +1 -0
- package/dist/docs/data/providers.js.map +1 -1
- package/dist/docs/data/tools.d.ts.map +1 -1
- package/dist/docs/data/tools.js +1 -0
- package/dist/docs/data/tools.js.map +1 -1
- package/dist/docs/i18n/translations.d.ts.map +1 -1
- package/dist/docs/i18n/translations.js +1 -1
- package/dist/docs/i18n/translations.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +28 -1
- 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 +29 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +26 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- 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 +28 -1
- package/dist/i18n/locales/zh-TW.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/connection.js +1 -1
- package/dist/mcp/connection.js.map +1 -1
- package/dist/mcp/oauth.d.ts.map +1 -1
- package/dist/mcp/oauth.js +1 -2
- package/dist/mcp/oauth.js.map +1 -1
- package/dist/mcp/risk.js +1 -1
- package/dist/mcp/risk.js.map +1 -1
- package/dist/mcp/servers-config.js +2 -2
- package/dist/mcp/servers-config.js.map +1 -1
- package/dist/mcp/unreal-install.js +1 -1
- package/dist/mcp/unreal-install.js.map +1 -1
- package/dist/memory/project-brain.js +1 -1
- package/dist/memory/project-brain.js.map +1 -1
- package/dist/memory-v4/fact-file.js +1 -1
- package/dist/memory-v4/fact-file.js.map +1 -1
- package/dist/memory-v4/files.js +1 -1
- package/dist/memory-v4/files.js.map +1 -1
- package/dist/memory-v4/projects.d.ts.map +1 -1
- package/dist/memory-v4/projects.js +4 -2
- package/dist/memory-v4/projects.js.map +1 -1
- package/dist/memory-v4/reader.d.ts +15 -0
- package/dist/memory-v4/reader.d.ts.map +1 -1
- package/dist/memory-v4/reader.js +54 -2
- package/dist/memory-v4/reader.js.map +1 -1
- package/dist/profile/health-text.d.ts +38 -0
- package/dist/profile/health-text.d.ts.map +1 -0
- package/dist/profile/health-text.js +165 -0
- package/dist/profile/health-text.js.map +1 -0
- package/dist/profile/index-builder.d.ts +48 -0
- package/dist/profile/index-builder.d.ts.map +1 -0
- package/dist/profile/index-builder.js +246 -0
- package/dist/profile/index-builder.js.map +1 -0
- package/dist/profile/index.d.ts +5 -0
- package/dist/profile/index.d.ts.map +1 -0
- package/dist/profile/index.js +5 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/profile/sources.d.ts +39 -0
- package/dist/profile/sources.d.ts.map +1 -0
- package/dist/profile/sources.js +103 -0
- package/dist/profile/sources.js.map +1 -0
- package/dist/profile/types.d.ts +33 -0
- package/dist/profile/types.d.ts.map +1 -0
- package/dist/profile/types.js +3 -0
- package/dist/profile/types.js.map +1 -0
- package/dist/providers/nvidia/models.d.ts.map +1 -1
- package/dist/providers/nvidia/models.js +28 -0
- package/dist/providers/nvidia/models.js.map +1 -1
- package/dist/providers/qwen/models.d.ts.map +1 -1
- package/dist/providers/qwen/models.js +12 -5
- package/dist/providers/qwen/models.js.map +1 -1
- package/dist/providers/request-shaping/model-ids.d.ts.map +1 -1
- package/dist/providers/request-shaping/model-ids.js +3 -0
- package/dist/providers/request-shaping/model-ids.js.map +1 -1
- package/dist/tools/create-project.d.ts.map +1 -1
- package/dist/tools/create-project.js +1 -0
- package/dist/tools/create-project.js.map +1 -1
- package/dist/tools/design-docs.js +2 -2
- package/dist/tools/design-docs.js.map +1 -1
- package/dist/tools/gimp/find-gimp.js +1 -1
- package/dist/tools/gimp/find-gimp.js.map +1 -1
- package/dist/tools/profile-lookup.d.ts +26 -0
- package/dist/tools/profile-lookup.d.ts.map +1 -0
- package/dist/tools/profile-lookup.js +64 -0
- package/dist/tools/profile-lookup.js.map +1 -0
- package/dist/tools/suggest-beats.js +2 -2
- package/dist/tools/suggest-beats.js.map +1 -1
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/tools/tool-registry.js +2 -0
- package/dist/tools/tool-registry.js.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The profile index and the lookup's detail (plan: Decisions/plans/2026-11-27-profile-index.md).
|
|
3
|
+
*
|
|
4
|
+
* His idea, 27 Nov 2026: "think of the human brain … we only call on certain
|
|
5
|
+
* things that are relevant to what we are doing". So Ava keeps a SHORT index
|
|
6
|
+
* of the person in view everywhere, about one line per area, and pulls the
|
|
7
|
+
* detail with profile_lookup only when the conversation makes it relevant.
|
|
8
|
+
*
|
|
9
|
+
* Built from the rooms' own data each time, never remembered, so it cannot
|
|
10
|
+
* miss anything or go stale, and it costs no model call. Pure: no node
|
|
11
|
+
* built-ins (sources.ts reads the files).
|
|
12
|
+
*/
|
|
13
|
+
import { formatLearnerContext } from '../learning/learner-context.js';
|
|
14
|
+
import { deriveProgression } from '../learning/progression.js';
|
|
15
|
+
import { summariseTrainingLog } from '../health/session-summary.js';
|
|
16
|
+
import { planDayDate } from '../health/for-you.js';
|
|
17
|
+
import { healthPlansSummary, healthProfileLines } from './health-text.js';
|
|
18
|
+
import { PROFILE_SECTIONS } from './types.js';
|
|
19
|
+
/** A hard ceiling per index line, so one long course title can't swell the prompt. */
|
|
20
|
+
const LINE_MAX = 220;
|
|
21
|
+
const clip = (s) => (s.length > LINE_MAX ? `${s.slice(0, LINE_MAX - 1)}…` : s);
|
|
22
|
+
const pretty = (s) => String(s ?? '').replace(/_/g, ' ').trim();
|
|
23
|
+
/** "today", "yesterday", "3 days ago", or the date. */
|
|
24
|
+
export function relativeDay(date, today) {
|
|
25
|
+
const d = Math.round((Date.parse(`${today}T12:00:00Z`) - Date.parse(`${date}T12:00:00Z`)) / 86_400_000);
|
|
26
|
+
if (Number.isNaN(d))
|
|
27
|
+
return date;
|
|
28
|
+
if (d === 0)
|
|
29
|
+
return 'today';
|
|
30
|
+
if (d === 1)
|
|
31
|
+
return 'yesterday';
|
|
32
|
+
if (d > 1 && d < 14)
|
|
33
|
+
return `${d} days ago`;
|
|
34
|
+
return date;
|
|
35
|
+
}
|
|
36
|
+
function addDays(day, n) {
|
|
37
|
+
const d = new Date(`${day}T12:00:00`);
|
|
38
|
+
d.setDate(d.getDate() + n);
|
|
39
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
|
40
|
+
}
|
|
41
|
+
/** Each running plan's day for a date, if it has one. */
|
|
42
|
+
function planDaysOn(plans, date) {
|
|
43
|
+
const out = [];
|
|
44
|
+
for (const plan of plans) {
|
|
45
|
+
if (!plan.start_date || plan.status === 'archived' || !Array.isArray(plan.days))
|
|
46
|
+
continue;
|
|
47
|
+
const day = plan.days.find((d) => planDayDate(plan.start_date, d.day_index) === date);
|
|
48
|
+
if (day)
|
|
49
|
+
out.push({ plan, day });
|
|
50
|
+
}
|
|
51
|
+
return out;
|
|
52
|
+
}
|
|
53
|
+
const sessionOn = (plans, date) => planDaysOn(plans, date).find((x) => x.day.training?.length);
|
|
54
|
+
const mealsOn = (plans, date) => planDaysOn(plans, date).find((x) => x.day.meals?.length);
|
|
55
|
+
// ── The index ────────────────────────────────────────────────────────────────
|
|
56
|
+
function learningLine(s) {
|
|
57
|
+
const store = s.learning.store;
|
|
58
|
+
if (!store?.curriculums?.length)
|
|
59
|
+
return null;
|
|
60
|
+
const active = store.curriculums.find((c) => c.status === 'active');
|
|
61
|
+
const done = store.curriculums.filter((c) => c.status === 'completed').length;
|
|
62
|
+
const bits = [];
|
|
63
|
+
if (active) {
|
|
64
|
+
const mod = active.modules?.find((m) => m.status === 'in_progress' || m.status === 'available');
|
|
65
|
+
bits.push(`${active.title}${mod ? `, on "${mod.title}"` : ''} (${Math.round(active.progress_percent ?? 0)}% done)`);
|
|
66
|
+
}
|
|
67
|
+
if (done)
|
|
68
|
+
bits.push(`${done} course${done === 1 ? '' : 's'} finished`);
|
|
69
|
+
const { skills } = deriveProgression(store);
|
|
70
|
+
// Earned skills only (graded lessons), with their level: "strongest" would
|
|
71
|
+
// overclaim for someone one course in.
|
|
72
|
+
const top = skills.filter((k) => k.level === 'mastered' || k.level === 'proficient').slice(0, 2).map((k) => `${k.name} (${k.level})`);
|
|
73
|
+
if (top.length)
|
|
74
|
+
bits.push(`skills: ${top.join(', ')}`);
|
|
75
|
+
return bits.length ? `Studying: ${bits.join('; ')}` : null;
|
|
76
|
+
}
|
|
77
|
+
function trainingLine(s, today) {
|
|
78
|
+
const p = s.health;
|
|
79
|
+
const bits = [];
|
|
80
|
+
if (p?.goals?.primary)
|
|
81
|
+
bits.push(pretty(p.goals.primary));
|
|
82
|
+
const tr = p?.training;
|
|
83
|
+
if (tr?.days_per_week)
|
|
84
|
+
bits.push(`${tr.days_per_week} days a week${tr.training_days?.length ? ` (${tr.training_days.join(', ')})` : ''}`);
|
|
85
|
+
const now = sessionOn(s.plans, today);
|
|
86
|
+
const next = sessionOn(s.plans, addDays(today, 1));
|
|
87
|
+
if (now)
|
|
88
|
+
bits.push(`today: ${now.day.title || 'training'}`);
|
|
89
|
+
if (next)
|
|
90
|
+
bits.push(`tomorrow: ${next.day.title || 'training'}`);
|
|
91
|
+
if (p?.constraints?.injuries?.length)
|
|
92
|
+
bits.push('injury notes on file');
|
|
93
|
+
const last = s.sessions[0];
|
|
94
|
+
if (last?.date)
|
|
95
|
+
bits.push(`last logged session ${relativeDay(String(last.date).slice(0, 10), today)}`);
|
|
96
|
+
return bits.length ? `Training: ${bits.join('; ')}` : null;
|
|
97
|
+
}
|
|
98
|
+
function eatingLine(s, today) {
|
|
99
|
+
const p = s.health;
|
|
100
|
+
const bits = [];
|
|
101
|
+
if (p?.constraints?.dietary?.length)
|
|
102
|
+
bits.push(p.constraints.dietary.map(pretty).join(', '));
|
|
103
|
+
if (p?.constraints?.allergens?.length)
|
|
104
|
+
bits.push('allergies on file');
|
|
105
|
+
const meals = mealsOn(s.plans, today);
|
|
106
|
+
if (meals) {
|
|
107
|
+
bits.push(`plan "${meals.plan.title}" running`);
|
|
108
|
+
const dinner = meals.day.meals.find((m) => m.slot === 'dinner');
|
|
109
|
+
if (dinner)
|
|
110
|
+
bits.push(`tonight: ${dinner.name}`);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const mealPlan = s.plans.find((x) => (x.type === 'meal' || x.type === 'combined') && x.status === 'active');
|
|
114
|
+
if (mealPlan)
|
|
115
|
+
bits.push(`plan "${mealPlan.title}"`);
|
|
116
|
+
}
|
|
117
|
+
if (p?.food?.dislikes?.length)
|
|
118
|
+
bits.push('dislikes on file');
|
|
119
|
+
return bits.length ? `Eating: ${bits.join('; ')}` : null;
|
|
120
|
+
}
|
|
121
|
+
function projectsLine(s, today) {
|
|
122
|
+
if (!s.projects.length)
|
|
123
|
+
return null;
|
|
124
|
+
return `Building: ${s.projects.slice(0, 4).map((p) => `${p.name} (${relativeDay(p.date, today)})`).join(', ')}`;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The index: one line per area that has anything, and only for areas the
|
|
128
|
+
* person lets Ava see everywhere. Undefined when there is nothing to say.
|
|
129
|
+
*/
|
|
130
|
+
export function buildProfileIndex(s, today) {
|
|
131
|
+
const lines = profileIndexLines(s, today);
|
|
132
|
+
const shown = PROFILE_SECTIONS.filter((sec) => lines[sec] && s.visibility[sec] !== 'room').map((sec) => lines[sec]);
|
|
133
|
+
return shown.length ? shown.join('\n') : undefined;
|
|
134
|
+
}
|
|
135
|
+
/** Each area's index line (null when nothing is recorded), whatever its visibility. */
|
|
136
|
+
export function profileIndexLines(s, today) {
|
|
137
|
+
const c = (l) => (l ? clip(l) : null);
|
|
138
|
+
return {
|
|
139
|
+
learning: c(learningLine(s)),
|
|
140
|
+
training: c(trainingLine(s, today)),
|
|
141
|
+
eating: c(eatingLine(s, today)),
|
|
142
|
+
projects: c(projectsLine(s, today)),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The Profile page's read-out: exactly what Ava sees, so nothing she knows is
|
|
147
|
+
* hidden from the person. The detail ignores the switch on purpose, so the
|
|
148
|
+
* page can show what turning a section back on would share.
|
|
149
|
+
*/
|
|
150
|
+
export function profileOverview(s, today) {
|
|
151
|
+
const lines = profileIndexLines(s, today);
|
|
152
|
+
const open = { ...s, visibility: { learning: 'everywhere', training: 'everywhere', eating: 'everywhere', projects: 'everywhere' } };
|
|
153
|
+
return PROFILE_SECTIONS.map((section) => ({
|
|
154
|
+
section,
|
|
155
|
+
line: lines[section],
|
|
156
|
+
detail: profileSectionText(section, open, today),
|
|
157
|
+
visibility: s.visibility[section],
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The index as it sits in the system prompt, with how to use it. `lookup`
|
|
162
|
+
* false is for a surface that has no profile_lookup yet (the hub, until its
|
|
163
|
+
* round trip is built): the index is then all there is, used as background.
|
|
164
|
+
*/
|
|
165
|
+
export function profileIndexBlock(index, opts = {}) {
|
|
166
|
+
if (opts.lookup === false) {
|
|
167
|
+
return `<profile-index>\n${index}\n</profile-index>\n` +
|
|
168
|
+
'That is a short index of their life. It is background, not a topic. Use it when the conversation touches ' +
|
|
169
|
+
'one of these areas (food or cooking, training, energy or rest, what they are learning, a project they name). ' +
|
|
170
|
+
'Otherwise leave it alone: do not bring it up in a task that has nothing to do with it.';
|
|
171
|
+
}
|
|
172
|
+
// Spelled out per area, 28 Nov: smaller models (Mistral Small 4, Qwen3 Coder
|
|
173
|
+
// Flash, Nemotron Lightning) read the general wording as optional, then asked
|
|
174
|
+
// the person for what the lookup holds or answered from the headline alone.
|
|
175
|
+
return `<profile-index>\n${index}\n</profile-index>\n` +
|
|
176
|
+
'Those are headlines only; the detail is in profile_lookup. Call it BEFORE you answer when the message is about:\n' +
|
|
177
|
+
'- eating: food, meals, cooking, snacks, groceries, a shopping list\n' +
|
|
178
|
+
'- training: workouts, exercise, being tired or low on energy, soreness, pain or an injury\n' +
|
|
179
|
+
'- learning: their course, a lesson, what to study next\n' +
|
|
180
|
+
'- projects: a project they name, or what they were working on\n' +
|
|
181
|
+
'Look before you ask them anything it could answer, and answer from what it returns. ' +
|
|
182
|
+
'For anything else, do not call it and do not mention the index.';
|
|
183
|
+
}
|
|
184
|
+
// ── The detail, for profile_lookup ──────────────────────────────────────────
|
|
185
|
+
function exerciseText(x) {
|
|
186
|
+
const dose = [x.sets != null && x.reps ? `${x.sets}×${x.reps}` : x.reps || (x.sets != null ? `${x.sets} sets` : null), x.weight].filter(Boolean).join(' at ');
|
|
187
|
+
return `${x.name}${dose ? `: ${dose}` : ''}${x.notes ? ` (${x.notes})` : ''}`;
|
|
188
|
+
}
|
|
189
|
+
function mealText(m) {
|
|
190
|
+
const facts = [m.calories != null ? `${m.calories} kcal` : null, m.protein_g != null ? `${m.protein_g} g protein` : null, m.cook_time_minutes != null ? `${m.cook_time_minutes} min` : null].filter(Boolean);
|
|
191
|
+
const logged = m.logged ? `; logged: ${m.logged.state}${m.logged.note ? `, ${m.logged.note}` : ''}` : '';
|
|
192
|
+
return `${m.slot}: ${m.name}${facts.length ? ` (${facts.join(', ')})` : ''}${logged}`;
|
|
193
|
+
}
|
|
194
|
+
function trainingDetail(s, today) {
|
|
195
|
+
const parts = [];
|
|
196
|
+
const lines = healthProfileLines(s.health, s.general).filter((l) => l.tag !== 'eating').map((l) => l.text);
|
|
197
|
+
if (lines.length)
|
|
198
|
+
parts.push(`Profile:\n${lines.join('\n')}`);
|
|
199
|
+
for (const [label, date] of [['Today', today], ['Tomorrow', addDays(today, 1)]]) {
|
|
200
|
+
const x = sessionOn(s.plans, date);
|
|
201
|
+
if (x)
|
|
202
|
+
parts.push(`${label} (${date}), from "${x.plan.title}": ${x.day.title || 'training'}\n${x.day.training.map((e) => `- ${exerciseText(e)}`).join('\n')}${x.day.notes ? `\nNotes: ${x.day.notes}` : ''}`);
|
|
203
|
+
}
|
|
204
|
+
const plans = healthPlansSummary(s.plans.filter((p) => p.type !== 'meal'));
|
|
205
|
+
if (plans)
|
|
206
|
+
parts.push(`Plans:\n${plans}`);
|
|
207
|
+
const log = summariseTrainingLog(s.sessions, today);
|
|
208
|
+
if (log)
|
|
209
|
+
parts.push(`What they actually did (training log):\n${log}`);
|
|
210
|
+
return parts.length ? parts.join('\n\n') : 'Nothing about training is recorded yet.';
|
|
211
|
+
}
|
|
212
|
+
function eatingDetail(s, today) {
|
|
213
|
+
const parts = [];
|
|
214
|
+
const lines = healthProfileLines(s.health, s.general).filter((l) => l.tag === 'eating' || l.tag === 'goal').map((l) => l.text);
|
|
215
|
+
if (lines.length)
|
|
216
|
+
parts.push(`Profile:\n${lines.join('\n')}`);
|
|
217
|
+
for (const [label, date] of [['Today', today], ['Tomorrow', addDays(today, 1)]]) {
|
|
218
|
+
const x = mealsOn(s.plans, date);
|
|
219
|
+
if (x)
|
|
220
|
+
parts.push(`${label} (${date}), from "${x.plan.title}":\n${x.day.meals.map((m) => `- ${mealText(m)}`).join('\n')}`);
|
|
221
|
+
}
|
|
222
|
+
const plans = healthPlansSummary(s.plans.filter((p) => p.type !== 'fitness'));
|
|
223
|
+
if (plans)
|
|
224
|
+
parts.push(`Plans:\n${plans}`);
|
|
225
|
+
return parts.length ? parts.join('\n\n') : 'Nothing about eating is recorded yet.';
|
|
226
|
+
}
|
|
227
|
+
function projectsDetail(s, today) {
|
|
228
|
+
if (!s.projects.length)
|
|
229
|
+
return 'No project work is recorded in memory yet.';
|
|
230
|
+
return s.projects.map((p) => `${p.name}, last worked on ${relativeDay(p.date, today)} (${p.date}):\n${p.lines.slice(0, 6).map((l) => `- ${l.replace(/^[-*]\s*/, '')}`).join('\n') || '- (nothing noted)'}`).join('\n\n');
|
|
231
|
+
}
|
|
232
|
+
/** The full picture for one section, as profile_lookup returns it. */
|
|
233
|
+
export function profileSectionText(section, s, today) {
|
|
234
|
+
if (!PROFILE_SECTIONS.includes(section))
|
|
235
|
+
return `Unknown section "${section}". Use one of: ${PROFILE_SECTIONS.join(', ')}.`;
|
|
236
|
+
if (s.visibility[section] === 'room') {
|
|
237
|
+
return `They keep their ${section} to its own room, so it is not shown here. If it matters, suggest they open that room.`;
|
|
238
|
+
}
|
|
239
|
+
switch (section) {
|
|
240
|
+
case 'learning': return formatLearnerContext(s.learning.store ?? { curriculums: [], streaks: { current: 0, longest: 0, lastActiveDate: null } }, s.learning.selfSkills) ?? 'No courses or skills are recorded yet.';
|
|
241
|
+
case 'training': return trainingDetail(s, today);
|
|
242
|
+
case 'eating': return eatingDetail(s, today);
|
|
243
|
+
case 'projects': return projectsDetail(s, today);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=index-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-builder.js","sourceRoot":"","sources":["../../src/profile/index-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAA4C,MAAM,YAAY,CAAC;AAExF,sFAAsF;AACtF,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvF,MAAM,MAAM,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAEzE,uDAAuD;AACvD,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,KAAa;IACrD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,YAAY,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,YAAY,CAAC,CAAC,GAAG,UAAU,CAAC,C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C,UAAU,CAAC,IAAI,wCAAwC,CAAC;QACpN,KAAK,UAAU,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACjD,KAAK,QAAQ,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the profile off disk, for Node hosts (extension host, IDE sidecar,
|
|
3
|
+
* hub sidecar). Every file is optional; a missing or unreadable one is simply
|
|
4
|
+
* absent. Files from a future schema are skipped rather than half-read.
|
|
5
|
+
*
|
|
6
|
+
* <home>/general.json identity + body basics
|
|
7
|
+
* <home>/health/profile.json goals, constraints, schedule, training, kitchen, food
|
|
8
|
+
* <home>/health/plans/*.json multi-week plans
|
|
9
|
+
* <home>/health/sessions/*.json the training log
|
|
10
|
+
* <home>/learning.json courses + streaks
|
|
11
|
+
* <home>/learner.json self-listed skills
|
|
12
|
+
* <home>/profile-settings.json which sections Ava sees everywhere
|
|
13
|
+
*/
|
|
14
|
+
import type { HealthPlanRecord } from '../health/types.js';
|
|
15
|
+
import type { GymSession } from '../health/session-types.js';
|
|
16
|
+
import type { LearningStore } from '../tools/learning.js';
|
|
17
|
+
import { type ProfileFiles, type ProfileSection, type ProfileVisibility } from './types.js';
|
|
18
|
+
export declare function readGeneralProfileFile(home?: string): any;
|
|
19
|
+
export declare function readHealthProfileFile(home?: string): any;
|
|
20
|
+
/** Current plans: schema 1, not archived. */
|
|
21
|
+
export declare function readHealthPlanFiles(home?: string): HealthPlanRecord[];
|
|
22
|
+
/** The training log, newest first. */
|
|
23
|
+
export declare function readTrainingSessionFiles(home?: string): GymSession[];
|
|
24
|
+
export declare function readLearningFiles(home?: string): {
|
|
25
|
+
store: LearningStore | null;
|
|
26
|
+
selfSkills: string[];
|
|
27
|
+
};
|
|
28
|
+
/** Everywhere unless the person limited a section to its room. */
|
|
29
|
+
export declare function readProfileVisibility(home?: string): ProfileVisibility;
|
|
30
|
+
/**
|
|
31
|
+
* Set one section to 'everywhere' or 'room' (the Profile page's switch).
|
|
32
|
+
* Keeps whatever else the file holds; written to a temp file and renamed so a
|
|
33
|
+
* crash can't leave half a file. Returns the visibility now in force.
|
|
34
|
+
*/
|
|
35
|
+
export declare function writeProfileVisibility(section: ProfileSection, value: 'everywhere' | 'room', home?: string): ProfileVisibility;
|
|
36
|
+
/** Every profile file, read once. Projects come from memory, not from here. */
|
|
37
|
+
export declare function readProfileFiles(home?: string): ProfileFiles;
|
|
38
|
+
export type { ProfileSection };
|
|
39
|
+
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../src/profile/sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAiB9G,wBAAgB,sBAAsB,CAAC,IAAI,GAAE,MAAiB,GAAG,GAAG,CAGnE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,MAAiB,GAAG,GAAG,CAGlE;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAAiB,GAAG,gBAAgB,EAAE,CAE/E;AAED,sCAAsC;AACtC,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,MAAiB,GAAG,UAAU,EAAE,CAG9E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,MAAiB,GAAG;IAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAKhH;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,MAAiB,GAAG,iBAAiB,CAKhF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,EAAE,IAAI,GAAE,MAAiB,GAAG,iBAAiB,CAWxI;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,MAAiB,GAAG,YAAY,CAStE;AAED,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the profile off disk, for Node hosts (extension host, IDE sidecar,
|
|
3
|
+
* hub sidecar). Every file is optional; a missing or unreadable one is simply
|
|
4
|
+
* absent. Files from a future schema are skipped rather than half-read.
|
|
5
|
+
*
|
|
6
|
+
* <home>/general.json identity + body basics
|
|
7
|
+
* <home>/health/profile.json goals, constraints, schedule, training, kitchen, food
|
|
8
|
+
* <home>/health/plans/*.json multi-week plans
|
|
9
|
+
* <home>/health/sessions/*.json the training log
|
|
10
|
+
* <home>/learning.json courses + streaks
|
|
11
|
+
* <home>/learner.json self-listed skills
|
|
12
|
+
* <home>/profile-settings.json which sections Ava sees everywhere
|
|
13
|
+
*/
|
|
14
|
+
import { mkdirSync, readFileSync, readdirSync, renameSync, writeFileSync } from 'node:fs';
|
|
15
|
+
import { join } from 'node:path';
|
|
16
|
+
import { AVA_HOME } from '../core/constants.js';
|
|
17
|
+
import { normaliseHealthProfile } from './health-text.js';
|
|
18
|
+
import { PROFILE_SECTIONS } from './types.js';
|
|
19
|
+
function readJson(path) {
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function readDir(dir, keep) {
|
|
28
|
+
let files;
|
|
29
|
+
try {
|
|
30
|
+
files = readdirSync(dir).filter((f) => f.endsWith('.json'));
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const f of files) {
|
|
37
|
+
const x = readJson(join(dir, f));
|
|
38
|
+
if (x && keep(x))
|
|
39
|
+
out.push(x);
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
export function readGeneralProfileFile(home = AVA_HOME) {
|
|
44
|
+
const g = readJson(join(home, 'general.json'));
|
|
45
|
+
return g && g.schema_version === 1 ? g : null;
|
|
46
|
+
}
|
|
47
|
+
export function readHealthProfileFile(home = AVA_HOME) {
|
|
48
|
+
const p = readJson(join(home, 'health', 'profile.json'));
|
|
49
|
+
return p && p.schema_version === 1 ? normaliseHealthProfile(p) : null;
|
|
50
|
+
}
|
|
51
|
+
/** Current plans: schema 1, not archived. */
|
|
52
|
+
export function readHealthPlanFiles(home = AVA_HOME) {
|
|
53
|
+
return readDir(join(home, 'health', 'plans'), (p) => p.schema_version === 1 && p.status !== 'archived');
|
|
54
|
+
}
|
|
55
|
+
/** The training log, newest first. */
|
|
56
|
+
export function readTrainingSessionFiles(home = AVA_HOME) {
|
|
57
|
+
return readDir(join(home, 'health', 'sessions'), (s) => s.schema_version === 1)
|
|
58
|
+
.sort((a, b) => String(b.date).localeCompare(String(a.date)));
|
|
59
|
+
}
|
|
60
|
+
export function readLearningFiles(home = AVA_HOME) {
|
|
61
|
+
const store = readJson(join(home, 'learning.json'));
|
|
62
|
+
const learner = readJson(join(home, 'learner.json'));
|
|
63
|
+
const selfSkills = Array.isArray(learner?.self?.skills) ? learner.self.skills : [];
|
|
64
|
+
return { store: store && Array.isArray(store.curriculums) ? store : null, selfSkills };
|
|
65
|
+
}
|
|
66
|
+
/** Everywhere unless the person limited a section to its room. */
|
|
67
|
+
export function readProfileVisibility(home = AVA_HOME) {
|
|
68
|
+
const raw = readJson(join(home, 'profile-settings.json'))?.visibility ?? {};
|
|
69
|
+
const out = {};
|
|
70
|
+
for (const s of PROFILE_SECTIONS)
|
|
71
|
+
out[s] = raw[s] === 'room' ? 'room' : 'everywhere';
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Set one section to 'everywhere' or 'room' (the Profile page's switch).
|
|
76
|
+
* Keeps whatever else the file holds; written to a temp file and renamed so a
|
|
77
|
+
* crash can't leave half a file. Returns the visibility now in force.
|
|
78
|
+
*/
|
|
79
|
+
export function writeProfileVisibility(section, value, home = AVA_HOME) {
|
|
80
|
+
if (!PROFILE_SECTIONS.includes(section))
|
|
81
|
+
throw new Error(`Unknown profile section: ${section}`);
|
|
82
|
+
const file = join(home, 'profile-settings.json');
|
|
83
|
+
const current = readJson(file);
|
|
84
|
+
const next = { ...(current && typeof current === 'object' ? current : {}) };
|
|
85
|
+
next.visibility = { ...(next.visibility ?? {}), [section]: value === 'room' ? 'room' : 'everywhere' };
|
|
86
|
+
mkdirSync(home, { recursive: true });
|
|
87
|
+
const tmp = `${file}.${process.pid}.tmp`;
|
|
88
|
+
writeFileSync(tmp, JSON.stringify(next, null, 2), 'utf-8');
|
|
89
|
+
renameSync(tmp, file);
|
|
90
|
+
return readProfileVisibility(home);
|
|
91
|
+
}
|
|
92
|
+
/** Every profile file, read once. Projects come from memory, not from here. */
|
|
93
|
+
export function readProfileFiles(home = AVA_HOME) {
|
|
94
|
+
return {
|
|
95
|
+
general: readGeneralProfileFile(home),
|
|
96
|
+
health: readHealthProfileFile(home),
|
|
97
|
+
plans: readHealthPlanFiles(home),
|
|
98
|
+
sessions: readTrainingSessionFiles(home),
|
|
99
|
+
learning: readLearningFiles(home),
|
|
100
|
+
visibility: readProfileVisibility(home),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/profile/sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAkE,MAAM,YAAY,CAAC;AAE9G,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QAAC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AAChF,CAAC;AAED,SAAS,OAAO,CAAI,GAAW,EAAE,IAAyB;IACxD,IAAI,KAAe,CAAC;IACpB,IAAI,CAAC;QAAC,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAA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AQ;IACtD,OAAO;QACL,OAAO,EAAE,sBAAsB,CAAC,IAAI,CAAC;QACrC,MAAM,EAAE,qBAAqB,CAAC,IAAI,CAAC;QACnC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QAChC,QAAQ,EAAE,wBAAwB,CAAC,IAAI,CAAC;QACxC,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC;QACjC,UAAU,EAAE,qBAAqB,CAAC,IAAI,CAAC;KACxC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { HealthPlanRecord } from '../health/types.js';
|
|
2
|
+
import type { GymSession } from '../health/session-types.js';
|
|
3
|
+
import type { LearningStore } from '../tools/learning.js';
|
|
4
|
+
/** The four areas of a person Ava keeps in view (his call, 27 Nov 2026). */
|
|
5
|
+
export declare const PROFILE_SECTIONS: readonly ["learning", "training", "eating", "projects"];
|
|
6
|
+
export type ProfileSection = typeof PROFILE_SECTIONS[number];
|
|
7
|
+
/** 'everywhere' (the default) or only inside the section's own room. */
|
|
8
|
+
export type ProfileVisibility = Record<ProfileSection, 'everywhere' | 'room'>;
|
|
9
|
+
/** A project and what was last done in it, from memory's episodes. */
|
|
10
|
+
export interface ProjectWork {
|
|
11
|
+
name: string;
|
|
12
|
+
/** YYYY-MM-DD of the last day anything was recorded for it. */
|
|
13
|
+
date: string;
|
|
14
|
+
/** That day's lines for the project, as memory recorded them. */
|
|
15
|
+
lines: string[];
|
|
16
|
+
}
|
|
17
|
+
/** What the profile files hold, as read from disk. */
|
|
18
|
+
export interface ProfileFiles {
|
|
19
|
+
general: any;
|
|
20
|
+
health: any;
|
|
21
|
+
plans: HealthPlanRecord[];
|
|
22
|
+
sessions: GymSession[];
|
|
23
|
+
learning: {
|
|
24
|
+
store: LearningStore | null;
|
|
25
|
+
selfSkills: string[];
|
|
26
|
+
};
|
|
27
|
+
visibility: ProfileVisibility;
|
|
28
|
+
}
|
|
29
|
+
/** Everything the index and the lookup are built from. */
|
|
30
|
+
export interface ProfileSources extends ProfileFiles {
|
|
31
|
+
projects: ProjectWork[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/profile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,yDAA0D,CAAC;AACxF,MAAM,MAAM,cAAc,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAE7D,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,cAAc,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC;AAE9E,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;IACZ,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,QAAQ,EAAE;QAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChE,UAAU,EAAE,iBAAiB,CAAC;CAC/B;AAED,0DAA0D;AAC1D,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/profile/types.ts"],"names":[],"mappings":"AAIA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/nvidia/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,aAAa,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/nvidia/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,aAAa,EAAE,eAAe,EAkF1C,CAAC"}
|
|
@@ -52,5 +52,33 @@ export const NVIDIA_MODELS = [
|
|
|
52
52
|
desktopCapable: true,
|
|
53
53
|
pricing: { inputPerMillion: 0.05, outputPerMillion: 0.20 },
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
// Nemotron 3.5 Super VL (NVIDIA, 2026) — 120B total / 12B active, the
|
|
57
|
+
// middle of the family between Lightning and Ultra, and the first
|
|
58
|
+
// Nemotron here that SEES: image input on NVIDIA's own endpoint.
|
|
59
|
+
//
|
|
60
|
+
// Tested live on integrate.api.nvidia.com before adding (28 Nov 2026, his
|
|
61
|
+
// call): it answers, reads an image correctly, makes a proper tool call,
|
|
62
|
+
// and keeps its reasoning in reasoning tokens rather than leaking it into
|
|
63
|
+
// the answer — so it is NOT in CONTENT_LEAKING_REASONERS.
|
|
64
|
+
//
|
|
65
|
+
// Context: hosts disagree (256K at Together, ~1M elsewhere) and NVIDIA's
|
|
66
|
+
// own endpoint publishes no figure, so this records the smaller one rather
|
|
67
|
+
// than promise a window a long request might not get.
|
|
68
|
+
//
|
|
69
|
+
// Pricing is the most widely published paid rate (Baseten $0.20/$0.50);
|
|
70
|
+
// other hosts charge more. BYOK-only.
|
|
71
|
+
id: 'nvidia/nemotron-3.5-super-vl-120b-a12b',
|
|
72
|
+
name: 'Nemotron 3.5 Super VL',
|
|
73
|
+
provider: 'nvidia',
|
|
74
|
+
contextWindow: 262144,
|
|
75
|
+
maxOutputTokens: 16384,
|
|
76
|
+
supportsToolCalls: true,
|
|
77
|
+
supportsStreaming: true,
|
|
78
|
+
supportsThinking: true,
|
|
79
|
+
supportsVision: true,
|
|
80
|
+
desktopCapable: true,
|
|
81
|
+
pricing: { inputPerMillion: 0.20, outputPerMillion: 0.50 },
|
|
82
|
+
},
|
|
55
83
|
];
|
|
56
84
|
//# sourceMappingURL=models.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/providers/nvidia/models.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C;QACE,sEAAsE;QACtE,+DAA+D;QAC/D,wEAAwE;QACxE,4EAA4E;QAC5E,yDAAyD;QACzD,EAAE,EAAE,mCAAmC;QACvC,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE,OAAO;QACtB,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,IAAI;QACvB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE;KAC3D;IACD;QACE,uEAAuE;QACvE,mEAAmE;QACnE,0DAA0D;QAC1D,EAAE;QACF,0EAA0E;QAC1E,4EAA4E;QAC5E,yEAAyE;QACzE,0CAA0C;QAC1C,EAAE;QACF,yEAAyE;QACzE,oEAAoE;QACpE,0EAA0E;QAC1E,2EAA2E;QAC3E,4EAA4E;QAC5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,kDAAkD;QAClD,EAAE;QACF,0EAA0E;QAC1E,4EAA4E;QAC5E,wEAAwE;QACxE,wEAAwE;QACxE,gCAAgC;QAChC,EAAE,EAAE,uCAAuC;QAC3C,IAAI,EAAE,wBAAwB;QAC9B,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE,OAAO;QACtB,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,IAAI;QACvB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,KAAK;QACvB,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE;KAC3D;IACD;QACE,sEAAsE;QACtE,kEAAkE;QAClE,iEAAiE;QACjE,EAAE;QACF,0EAA0E;QAC1E,yEAAyE;QACzE,0EAA0E;QAC1E,0DAA0D;QAC1D,EAAE;QACF,yEAAyE;QACzE,2EAA2E;QAC3E,sDAAsD;QACtD,EAAE;QACF,wEAAwE;QACxE,sCAAsC;QACtC,EAAE,EAAE,wCAAwC;QAC5C,IAAI,EAAE,uBAAuB;QAC7B,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,IAAI;QACvB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE;KAC3D;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/qwen/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,WAAW,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/qwen/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,WAAW,EAAE,eAAe,EAqNxC,CAAC"}
|
|
@@ -175,16 +175,23 @@ export const QWEN_MODELS = [
|
|
|
175
175
|
// Verified live before shipping: it answers, and it does NOT burn reasoning
|
|
176
176
|
// tokens on trivial replies (2 completion tokens for "ok", where Qwen 3.7
|
|
177
177
|
// Flash spent 167).
|
|
178
|
+
//
|
|
179
|
+
// RETIRED upstream (found 28 Nov 2026: Alibaba answers 404 "Model not
|
|
180
|
+
// exist" and it is gone from the model list). Hidden from the pickers; a
|
|
181
|
+
// saved choice rolls forward to Qwen 3.7 Plus, Maestro's own coding seat
|
|
182
|
+
// (MODEL_API_NAMES, his call 28 Nov 2026).
|
|
178
183
|
id: 'qwen3-coder-next',
|
|
179
|
-
name: 'Qwen3 Coder Next',
|
|
184
|
+
name: 'Qwen3 Coder Next (now Qwen 3.7 Plus)',
|
|
180
185
|
provider: 'qwen',
|
|
181
|
-
|
|
186
|
+
// Priced and described as what is actually called (the qwen3.8-max rule).
|
|
187
|
+
contextWindow: 1000000,
|
|
182
188
|
maxOutputTokens: 65536,
|
|
183
189
|
supportsToolCalls: true,
|
|
184
190
|
supportsStreaming: true,
|
|
185
|
-
supportsThinking:
|
|
186
|
-
supportsVision:
|
|
187
|
-
|
|
191
|
+
supportsThinking: true,
|
|
192
|
+
supportsVision: true,
|
|
193
|
+
hiddenFromPicker: true,
|
|
194
|
+
pricing: { inputPerMillion: 0.40, outputPerMillion: 1.60 },
|
|
188
195
|
},
|
|
189
196
|
{
|
|
190
197
|
// Qwen3 Coder Flash — 1M context, tool-calling coder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/providers/qwen/models.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,4EAA4E;IAC5E,4E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AAE;QACF,sEAAsE;QACtE,yEAAyE;QACzE,yEAAyE;QACzE,2CAA2C;QAC3C,EAAE,EAAE,kBAAkB;QACtB,IAAI,EAAE,sCAAsC;QAC5C,QAAQ,EAAE,MAAM;QAChB,0EAA0E;QAC1E,aAAa,EAAE,OAAO;QACtB,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,IAAI;QACvB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE;KAC3D;IACD;QACE,sDAAsD;QACtD,EAAE;QACF,4EAA4E;QAC5E,yEAAyE;QACzE,0EAA0E;QAC1E,yEAAyE;QACzE,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,MAAM;QAChB,aAAa,EAAE,OAAO;QACtB,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,IAAI;QACvB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,KAAK;QACvB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE;KAC7D;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-ids.d.ts","sourceRoot":"","sources":["../../../src/providers/request-shaping/model-ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"model-ids.d.ts","sourceRoot":"","sources":["../../../src/providers/request-shaping/model-ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6DlD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEjD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,MAAM,CAMxE;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,OAAO,CAM5F"}
|
|
@@ -38,6 +38,9 @@ export const MODEL_API_NAMES = {
|
|
|
38
38
|
// than removed: a saved selection keeps working, and the person holding it
|
|
39
39
|
// gets a better model for less money without being asked to do anything.
|
|
40
40
|
'qwen3.7-max': 'qwen4-max',
|
|
41
|
+
// Qwen3 Coder Next retired upstream (404 "Model not exist", found 28 Nov
|
|
42
|
+
// 2026): rolled forward to Qwen 3.7 Plus, Maestro's coding seat (his call).
|
|
43
|
+
'qwen3-coder-next': 'qwen3.7-plus',
|
|
41
44
|
// MiniMax M2.7 (+ Highspeed) retired upstream 2026-11-18 (closed to new
|
|
42
45
|
// users 2026-10-19). MiniMax routes them to M3.1 Flash on its plans; we do
|
|
43
46
|
// the same for own-key calls, so a saved choice survives the shutdown.
|