@osovv/vv-opencode 1.3.5 → 1.3.6-rc.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/CHANGELOG.md +26 -0
- package/README.md +61 -1
- package/dist/commands/analytics.js +2 -0
- package/dist/commands/analytics.js.map +1 -1
- package/dist/commands/upgrade.d.ts +13 -6
- package/dist/commands/upgrade.js +31 -25
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/opencode.js +3 -2
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/peak-hours.d.ts +53 -0
- package/dist/lib/peak-hours.js +389 -0
- package/dist/lib/peak-hours.js.map +1 -0
- package/dist/lib/plugin-toggle-config.d.ts +71 -1
- package/dist/lib/plugin-toggle-config.js +77 -3
- package/dist/lib/plugin-toggle-config.js.map +1 -1
- package/dist/lib/vvoc-config.d.ts +84 -0
- package/dist/lib/vvoc-config.js +42 -1
- package/dist/lib/vvoc-config.js.map +1 -1
- package/dist/plugins/peak-hours/index.d.ts +31 -0
- package/dist/plugins/peak-hours/index.js +299 -0
- package/dist/plugins/peak-hours/index.js.map +1 -0
- package/dist/tui/analytics/indicator.js.map +1 -1
- package/dist/tui/peak-hours/banner.d.ts +26 -0
- package/dist/tui/peak-hours/banner.js +126 -0
- package/dist/tui/peak-hours/banner.js.map +1 -0
- package/dist/tui.js +13 -6
- package/dist/tui.js.map +1 -1
- package/package.json +6 -2
- package/schemas/vvoc/v3.json +326 -57
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
// FILE: src/lib/peak-hours.ts
|
|
2
|
+
// VERSION: 1.0.0
|
|
3
|
+
// START_MODULE_CONTRACT
|
|
4
|
+
// PURPOSE: Pure provider-level peak-hours schedule evaluation shared by the peak-hours server plugin and TUI banner.
|
|
5
|
+
// SCOPE: Window parsing with explicit timezones, cross-midnight and weekday handling, provider id normalization and aliases, active-window lookup with end boundaries, connected-provider suggestion filtering, plugin entry parsing, and bounded display formatting.
|
|
6
|
+
// DEPENDS: [none]
|
|
7
|
+
// LINKS: [M-PEAK-HOURS-SCHEDULES, M-PLUGIN-PEAK-HOURS, M-TUI-PEAK-HOURS-BANNER]
|
|
8
|
+
// ROLE: RUNTIME
|
|
9
|
+
// MAP_MODE: EXPORTS
|
|
10
|
+
// END_MODULE_CONTRACT
|
|
11
|
+
//
|
|
12
|
+
// START_MODULE_MAP
|
|
13
|
+
// PeakWindowSpec - Raw window shape from configuration with start, end, optional tz, and optional days.
|
|
14
|
+
// PeakProviderSchedule - Per-provider schedule with optional mode override and windows.
|
|
15
|
+
// PeakSchedules - Provider-keyed schedule map.
|
|
16
|
+
// ParsedPeakWindow - Validated window with minute offsets, timezone, sorted days, and cross-midnight flag.
|
|
17
|
+
// PeakHoursClock - Injectable clock returning the current Date.
|
|
18
|
+
// PeakHoursMode - Soft or hard enforcement mode.
|
|
19
|
+
// PeakHoursEntryConfig - Fully seeded plugin entry shape used by the server plugin and banner.
|
|
20
|
+
// ActivePeak - Active window hit with provider ids, boundary dates, and remaining minutes.
|
|
21
|
+
// DEFAULT_PEAK_TIMEZONE - Default window timezone (UTC).
|
|
22
|
+
// DEFAULT_PEAK_HOURS_MODE - Default enforcement mode (hard).
|
|
23
|
+
// ALL_WEEKDAYS - All seven weekday indexes.
|
|
24
|
+
// PROVIDER_KEY_ALIASES - Known provider id spellings mapped onto canonical schedule keys.
|
|
25
|
+
// normalizeProviderId - Lowercases, trims, and canonicalizes separators in a provider id.
|
|
26
|
+
// resolveProviderKey - Maps a provider id onto a schedule key through exact and alias matching.
|
|
27
|
+
// parseTimeOfDay - Parses HH:MM into minutes past midnight.
|
|
28
|
+
// parsePeakWindow - Validates one raw window and returns it with a warning on malformed input.
|
|
29
|
+
// findActivePeak - Returns the active window hit for a provider at a time, if any.
|
|
30
|
+
// suggestOffPeakProviders - Filters connected provider ids down to those outside active peak windows.
|
|
31
|
+
// formatWaitMinutes - Renders remaining minutes as a bounded human string.
|
|
32
|
+
// formatPeakEndTime - Renders a window end instant as a deterministic HH:MM UTC label.
|
|
33
|
+
// parsePeakHoursEntry - Normalizes a plugins["peak-hours"] value into a seeded entry with warnings.
|
|
34
|
+
// END_MODULE_MAP
|
|
35
|
+
//
|
|
36
|
+
// START_CHANGE_SUMMARY
|
|
37
|
+
// LAST_CHANGE: [C-PLUGIN-PEAK-HOURS - Added the pure peak-hours schedule library shared by the server plugin and TUI banner.]
|
|
38
|
+
// END_CHANGE_SUMMARY
|
|
39
|
+
export const DEFAULT_PEAK_TIMEZONE = "UTC";
|
|
40
|
+
export const DEFAULT_PEAK_HOURS_MODE = "hard";
|
|
41
|
+
export const ALL_WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];
|
|
42
|
+
const MINUTES_PER_DAY = 1_440;
|
|
43
|
+
const WEEKDAY_INDEX = {
|
|
44
|
+
Sun: 0,
|
|
45
|
+
Mon: 1,
|
|
46
|
+
Tue: 2,
|
|
47
|
+
Wed: 3,
|
|
48
|
+
Thu: 4,
|
|
49
|
+
Fri: 5,
|
|
50
|
+
Sat: 6,
|
|
51
|
+
};
|
|
52
|
+
// Known alternate spellings of schedule-owned provider ids observed across
|
|
53
|
+
// OpenCode provider catalogs. Canonical keys: deepseek, z-ai, qwen.
|
|
54
|
+
export const PROVIDER_KEY_ALIASES = {
|
|
55
|
+
zai: "z-ai",
|
|
56
|
+
z_ai: "z-ai",
|
|
57
|
+
zhipu: "z-ai",
|
|
58
|
+
bigmodel: "z-ai",
|
|
59
|
+
glm: "z-ai",
|
|
60
|
+
"qwen-cloud": "qwen",
|
|
61
|
+
"qwen-coder": "qwen",
|
|
62
|
+
alibaba: "qwen",
|
|
63
|
+
"alibaba-cloud": "qwen",
|
|
64
|
+
alibabacloud: "qwen",
|
|
65
|
+
dashscope: "qwen",
|
|
66
|
+
modelstudio: "qwen",
|
|
67
|
+
};
|
|
68
|
+
// START_CONTRACT: normalizeProviderId
|
|
69
|
+
// PURPOSE: Canonicalize a provider id for schedule matching.
|
|
70
|
+
// INPUTS: { id: string - provider id as observed from OpenCode surfaces }
|
|
71
|
+
// OUTPUTS: { string - lowercased id with whitespace and underscores folded to single hyphens }
|
|
72
|
+
// SIDE_EFFECTS: none
|
|
73
|
+
// LINKS: resolveProviderKey
|
|
74
|
+
// END_CONTRACT: normalizeProviderId
|
|
75
|
+
export function normalizeProviderId(id) {
|
|
76
|
+
return id
|
|
77
|
+
.trim()
|
|
78
|
+
.toLowerCase()
|
|
79
|
+
.replace(/[\s_]+/g, "-");
|
|
80
|
+
}
|
|
81
|
+
// START_CONTRACT: resolveProviderKey
|
|
82
|
+
// PURPOSE: Map an observed provider id onto a schedule key via exact then alias matching.
|
|
83
|
+
// INPUTS: { providerID: string - observed provider id; schedules: PeakSchedules - loaded schedule map }
|
|
84
|
+
// OUTPUTS: { string | undefined - matching schedule key, or undefined when the provider owns no schedule }
|
|
85
|
+
// SIDE_EFFECTS: none
|
|
86
|
+
// LINKS: normalizeProviderId, PROVIDER_KEY_ALIASES
|
|
87
|
+
// END_CONTRACT: resolveProviderKey
|
|
88
|
+
export function resolveProviderKey(providerID, schedules) {
|
|
89
|
+
const normalized = normalizeProviderId(providerID);
|
|
90
|
+
if (normalized && schedules[normalized]) {
|
|
91
|
+
return normalized;
|
|
92
|
+
}
|
|
93
|
+
const aliased = PROVIDER_KEY_ALIASES[normalized];
|
|
94
|
+
if (aliased && schedules[aliased]) {
|
|
95
|
+
return aliased;
|
|
96
|
+
}
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
// START_CONTRACT: parseTimeOfDay
|
|
100
|
+
// PURPOSE: Parse an HH:MM string into minutes past midnight.
|
|
101
|
+
// INPUTS: { value: string - candidate time-of-day string }
|
|
102
|
+
// OUTPUTS: { number | undefined - minutes 0 through 1439, or undefined for malformed input }
|
|
103
|
+
// SIDE_EFFECTS: none
|
|
104
|
+
// LINKS: parsePeakWindow
|
|
105
|
+
// END_CONTRACT: parseTimeOfDay
|
|
106
|
+
export function parseTimeOfDay(value) {
|
|
107
|
+
const match = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(value.trim());
|
|
108
|
+
if (!match)
|
|
109
|
+
return undefined;
|
|
110
|
+
return Number(match[1]) * 60 + Number(match[2]);
|
|
111
|
+
}
|
|
112
|
+
function isValidTimezone(timeZone) {
|
|
113
|
+
try {
|
|
114
|
+
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// START_CONTRACT: parsePeakWindow
|
|
122
|
+
// PURPOSE: Validate one raw window spec and return the parsed window, failing open with a warning.
|
|
123
|
+
// INPUTS: { spec: unknown - raw window value from configuration }
|
|
124
|
+
// OUTPUTS: { { window?: ParsedPeakWindow; warning?: string } - parsed window when valid, or a warning string when malformed }
|
|
125
|
+
// SIDE_EFFECTS: none
|
|
126
|
+
// LINKS: parseTimeOfDay
|
|
127
|
+
// END_CONTRACT: parsePeakWindow
|
|
128
|
+
export function parsePeakWindow(spec) {
|
|
129
|
+
if (!spec || typeof spec !== "object" || Array.isArray(spec)) {
|
|
130
|
+
return { warning: "window must be an object" };
|
|
131
|
+
}
|
|
132
|
+
const record = spec;
|
|
133
|
+
const start = typeof record.start === "string" ? record.start.trim() : "";
|
|
134
|
+
const end = typeof record.end === "string" ? record.end.trim() : "";
|
|
135
|
+
const startMinutes = start ? parseTimeOfDay(start) : undefined;
|
|
136
|
+
const endMinutes = end ? parseTimeOfDay(end) : undefined;
|
|
137
|
+
if (startMinutes === undefined || endMinutes === undefined) {
|
|
138
|
+
return { warning: `window has invalid start or end time (${start}..${end})` };
|
|
139
|
+
}
|
|
140
|
+
if (startMinutes === endMinutes) {
|
|
141
|
+
return { warning: `window start and end must differ (${start}..${end})` };
|
|
142
|
+
}
|
|
143
|
+
const tz = typeof record.tz === "string" && record.tz.trim() ? record.tz.trim() : DEFAULT_PEAK_TIMEZONE;
|
|
144
|
+
if (!isValidTimezone(tz)) {
|
|
145
|
+
return { warning: `window has invalid tz (${tz})` };
|
|
146
|
+
}
|
|
147
|
+
let days = [...ALL_WEEKDAYS];
|
|
148
|
+
if (record.days !== undefined) {
|
|
149
|
+
if (!Array.isArray(record.days) || record.days.length === 0) {
|
|
150
|
+
return { warning: "window days must be a non-empty array of integers 0 through 6" };
|
|
151
|
+
}
|
|
152
|
+
const parsedDays = [...new Set(record.days)].map((day) => Number(day));
|
|
153
|
+
if (parsedDays.some((day) => !Number.isInteger(day) || day < 0 || day > 6)) {
|
|
154
|
+
return { warning: "window days must be integers 0 through 6" };
|
|
155
|
+
}
|
|
156
|
+
days = parsedDays.sort((left, right) => left - right);
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
window: {
|
|
160
|
+
startMinutes,
|
|
161
|
+
endMinutes,
|
|
162
|
+
crossMidnight: endMinutes < startMinutes,
|
|
163
|
+
tz,
|
|
164
|
+
days,
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function zonedParts(date, timeZone) {
|
|
169
|
+
const formatter = new Intl.DateTimeFormat("en-US", {
|
|
170
|
+
timeZone,
|
|
171
|
+
hour12: false,
|
|
172
|
+
weekday: "short",
|
|
173
|
+
hour: "2-digit",
|
|
174
|
+
minute: "2-digit",
|
|
175
|
+
});
|
|
176
|
+
const parts = formatter.formatToParts(date);
|
|
177
|
+
const weekdayName = parts.find((part) => part.type === "weekday")?.value ?? "";
|
|
178
|
+
const rawHour = Number(parts.find((part) => part.type === "hour")?.value);
|
|
179
|
+
const minute = Number(parts.find((part) => part.type === "minute")?.value);
|
|
180
|
+
const weekday = WEEKDAY_INDEX[weekdayName] ?? -1;
|
|
181
|
+
// Some ICU builds render midnight as hour 24 with hour12: false.
|
|
182
|
+
const hour = rawHour === 24 ? 0 : rawHour;
|
|
183
|
+
if (weekday < 0 || !Number.isFinite(hour) || !Number.isFinite(minute)) {
|
|
184
|
+
return { weekday: -1, minutes: 0 };
|
|
185
|
+
}
|
|
186
|
+
return { weekday, minutes: hour * 60 + minute };
|
|
187
|
+
}
|
|
188
|
+
function evaluateWindow(window, now) {
|
|
189
|
+
const { weekday, minutes } = zonedParts(now, window.tz);
|
|
190
|
+
if (weekday < 0)
|
|
191
|
+
return { active: false, minutesRemaining: 0 };
|
|
192
|
+
const previousWeekday = (weekday + 6) % 7;
|
|
193
|
+
if (!window.crossMidnight) {
|
|
194
|
+
const active = window.days.includes(weekday) &&
|
|
195
|
+
minutes >= window.startMinutes &&
|
|
196
|
+
minutes < window.endMinutes;
|
|
197
|
+
return { active, minutesRemaining: active ? window.endMinutes - minutes : 0 };
|
|
198
|
+
}
|
|
199
|
+
// Cross-midnight windows open on a listed day and run into the next day.
|
|
200
|
+
if (window.days.includes(weekday) && minutes >= window.startMinutes) {
|
|
201
|
+
return { active: true, minutesRemaining: MINUTES_PER_DAY - minutes + window.endMinutes };
|
|
202
|
+
}
|
|
203
|
+
if (window.days.includes(previousWeekday) && minutes < window.endMinutes) {
|
|
204
|
+
return { active: true, minutesRemaining: window.endMinutes - minutes };
|
|
205
|
+
}
|
|
206
|
+
return { active: false, minutesRemaining: 0 };
|
|
207
|
+
}
|
|
208
|
+
function windowDurationMinutes(window) {
|
|
209
|
+
return window.crossMidnight
|
|
210
|
+
? MINUTES_PER_DAY - window.startMinutes + window.endMinutes
|
|
211
|
+
: window.endMinutes - window.startMinutes;
|
|
212
|
+
}
|
|
213
|
+
// START_CONTRACT: findActivePeak
|
|
214
|
+
// PURPOSE: Find the active peak window hit for a provider at a given time.
|
|
215
|
+
// INPUTS: { now: Date - evaluation instant; schedules: PeakSchedules - loaded schedule map; providerID: string - observed provider id }
|
|
216
|
+
// OUTPUTS: { ActivePeak | undefined - hit with boundaries and remaining minutes, or undefined when not in peak or unscheduled }
|
|
217
|
+
// SIDE_EFFECTS: none
|
|
218
|
+
// LINKS: resolveProviderKey, parsePeakWindow
|
|
219
|
+
// END_CONTRACT: findActivePeak
|
|
220
|
+
export function findActivePeak(now, schedules, providerID) {
|
|
221
|
+
const providerKey = resolveProviderKey(providerID, schedules);
|
|
222
|
+
if (!providerKey)
|
|
223
|
+
return undefined;
|
|
224
|
+
const schedule = schedules[providerKey];
|
|
225
|
+
if (!schedule || !Array.isArray(schedule.windows))
|
|
226
|
+
return undefined;
|
|
227
|
+
let best;
|
|
228
|
+
for (const rawWindow of schedule.windows) {
|
|
229
|
+
const { window } = parsePeakWindow(rawWindow);
|
|
230
|
+
if (!window)
|
|
231
|
+
continue;
|
|
232
|
+
const result = evaluateWindow(window, now);
|
|
233
|
+
if (result.active && (!best || result.minutesRemaining > best.minutesRemaining)) {
|
|
234
|
+
best = { window, minutesRemaining: result.minutesRemaining };
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (!best)
|
|
238
|
+
return undefined;
|
|
239
|
+
const durationMinutes = windowDurationMinutes(best.window);
|
|
240
|
+
const endsAtMs = now.getTime() + best.minutesRemaining * 60_000;
|
|
241
|
+
return {
|
|
242
|
+
providerKey,
|
|
243
|
+
providerID,
|
|
244
|
+
window: best.window,
|
|
245
|
+
endsAt: new Date(endsAtMs),
|
|
246
|
+
startedAt: new Date(endsAtMs - durationMinutes * 60_000),
|
|
247
|
+
minutesRemaining: best.minutesRemaining,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
// START_CONTRACT: suggestOffPeakProviders
|
|
251
|
+
// PURPOSE: Filter connected provider ids down to those currently outside any active peak window.
|
|
252
|
+
// INPUTS: { now: Date - evaluation instant; schedules: PeakSchedules - loaded schedule map; connectedProviderIDs: readonly string[] - observed connected provider ids in display order }
|
|
253
|
+
// OUTPUTS: { string[] - original provider ids not currently in peak, deduplicated, preserving input order }
|
|
254
|
+
// SIDE_EFFECTS: none
|
|
255
|
+
// LINKS: findActivePeak, normalizeProviderId
|
|
256
|
+
// END_CONTRACT: suggestOffPeakProviders
|
|
257
|
+
export function suggestOffPeakProviders(now, schedules, connectedProviderIDs) {
|
|
258
|
+
const seen = new Set();
|
|
259
|
+
const suggestions = [];
|
|
260
|
+
for (const providerID of connectedProviderIDs) {
|
|
261
|
+
if (typeof providerID !== "string" || !providerID.trim())
|
|
262
|
+
continue;
|
|
263
|
+
const normalized = normalizeProviderId(providerID);
|
|
264
|
+
if (seen.has(normalized))
|
|
265
|
+
continue;
|
|
266
|
+
seen.add(normalized);
|
|
267
|
+
if (!findActivePeak(now, schedules, providerID)) {
|
|
268
|
+
suggestions.push(providerID);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return suggestions;
|
|
272
|
+
}
|
|
273
|
+
// START_CONTRACT: formatWaitMinutes
|
|
274
|
+
// PURPOSE: Render remaining minutes as a bounded human-readable string.
|
|
275
|
+
// INPUTS: { minutes: number - remaining whole minutes }
|
|
276
|
+
// OUTPUTS: { string - "N min" below an hour, otherwise "H h M min" }
|
|
277
|
+
// SIDE_EFFECTS: none
|
|
278
|
+
// LINKS: none
|
|
279
|
+
// END_CONTRACT: formatWaitMinutes
|
|
280
|
+
export function formatWaitMinutes(minutes) {
|
|
281
|
+
const bounded = Math.max(0, Math.round(minutes));
|
|
282
|
+
if (bounded < 60)
|
|
283
|
+
return `${bounded} min`;
|
|
284
|
+
const hours = Math.floor(bounded / 60);
|
|
285
|
+
const remainder = bounded % 60;
|
|
286
|
+
return remainder === 0 ? `${hours} h` : `${hours} h ${remainder} min`;
|
|
287
|
+
}
|
|
288
|
+
// START_CONTRACT: formatPeakEndTime
|
|
289
|
+
// PURPOSE: Render a window end instant as a deterministic UTC label.
|
|
290
|
+
// INPUTS: { date: Date - window end instant }
|
|
291
|
+
// OUTPUTS: { string - "HH:MM UTC" label }
|
|
292
|
+
// SIDE_EFFECTS: none
|
|
293
|
+
// LINKS: none
|
|
294
|
+
// END_CONTRACT: formatPeakEndTime
|
|
295
|
+
export function formatPeakEndTime(date) {
|
|
296
|
+
return `${date.toISOString().slice(11, 16)} UTC`;
|
|
297
|
+
}
|
|
298
|
+
// START_CONTRACT: parsePeakHoursEntry
|
|
299
|
+
// PURPOSE: Normalize a plugins["peak-hours"] value into a seeded entry, failing open on malformed pieces.
|
|
300
|
+
// INPUTS: { value: unknown - boolean, object, or undefined plugin entry value from the vvoc config }
|
|
301
|
+
// OUTPUTS: { { entry: PeakHoursEntryConfig; warnings: string[] } - seeded entry plus warnings for skipped malformed pieces }
|
|
302
|
+
// SIDE_EFFECTS: none
|
|
303
|
+
// LINKS: parsePeakWindow, DEFAULT_PEAK_HOURS_MODE
|
|
304
|
+
// END_CONTRACT: parsePeakHoursEntry
|
|
305
|
+
export function parsePeakHoursEntry(value) {
|
|
306
|
+
const warnings = [];
|
|
307
|
+
const entry = {
|
|
308
|
+
enabled: true,
|
|
309
|
+
mode: DEFAULT_PEAK_HOURS_MODE,
|
|
310
|
+
graceActiveSessions: true,
|
|
311
|
+
schedules: {},
|
|
312
|
+
};
|
|
313
|
+
if (value === undefined || typeof value === "boolean") {
|
|
314
|
+
if (value === false)
|
|
315
|
+
entry.enabled = false;
|
|
316
|
+
return { entry, warnings };
|
|
317
|
+
}
|
|
318
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
319
|
+
warnings.push("plugins[peak-hours] must be a boolean or an object; using defaults");
|
|
320
|
+
return { entry, warnings };
|
|
321
|
+
}
|
|
322
|
+
const record = value;
|
|
323
|
+
if (record.enabled !== undefined) {
|
|
324
|
+
if (typeof record.enabled === "boolean") {
|
|
325
|
+
entry.enabled = record.enabled;
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
warnings.push("plugins[peak-hours].enabled must be a boolean; using default");
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if (record.mode !== undefined) {
|
|
332
|
+
if (record.mode === "soft" || record.mode === "hard") {
|
|
333
|
+
entry.mode = record.mode;
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
warnings.push(`plugins[peak-hours].mode must be "soft" or "hard"; using ${entry.mode}`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (record.graceActiveSessions !== undefined) {
|
|
340
|
+
if (typeof record.graceActiveSessions === "boolean") {
|
|
341
|
+
entry.graceActiveSessions = record.graceActiveSessions;
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
warnings.push("plugins[peak-hours].graceActiveSessions must be a boolean; using default");
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (record.schedules !== undefined) {
|
|
348
|
+
if (!record.schedules ||
|
|
349
|
+
typeof record.schedules !== "object" ||
|
|
350
|
+
Array.isArray(record.schedules)) {
|
|
351
|
+
warnings.push("plugins[peak-hours].schedules must be an object; ignoring schedules");
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
for (const [providerKey, providerValue] of Object.entries(record.schedules)) {
|
|
355
|
+
if (!providerValue || typeof providerValue !== "object" || Array.isArray(providerValue)) {
|
|
356
|
+
warnings.push(`schedules["${providerKey}"] must be an object; skipped`);
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
const providerRecord = providerValue;
|
|
360
|
+
if (providerRecord.windows !== undefined && !Array.isArray(providerRecord.windows)) {
|
|
361
|
+
warnings.push(`schedules["${providerKey}"].windows must be an array; skipped`);
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
const windows = [];
|
|
365
|
+
if (Array.isArray(providerRecord.windows)) {
|
|
366
|
+
for (const rawWindow of providerRecord.windows) {
|
|
367
|
+
const parsed = parsePeakWindow(rawWindow);
|
|
368
|
+
if (parsed.window && typeof rawWindow === "object" && rawWindow !== null) {
|
|
369
|
+
windows.push(rawWindow);
|
|
370
|
+
}
|
|
371
|
+
else if (parsed.warning) {
|
|
372
|
+
warnings.push(`schedules["${providerKey}"]: ${parsed.warning}`);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
const providerSchedule = { windows };
|
|
377
|
+
if (providerRecord.mode === "soft" || providerRecord.mode === "hard") {
|
|
378
|
+
providerSchedule.mode = providerRecord.mode;
|
|
379
|
+
}
|
|
380
|
+
else if (providerRecord.mode !== undefined) {
|
|
381
|
+
warnings.push(`schedules["${providerKey}"].mode must be "soft" or "hard"; ignored`);
|
|
382
|
+
}
|
|
383
|
+
entry.schedules[providerKey] = providerSchedule;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return { entry, warnings };
|
|
388
|
+
}
|
|
389
|
+
//# sourceMappingURL=peak-hours.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peak-hours.js","sourceRoot":"","sources":["../../src/lib/peak-hours.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,iBAAiB;AACjB,wBAAwB;AACxB,uHAAuH;AACvH,wQAAwQ;AACxQ,oBAAoB;AACpB,kFAAkF;AAClF,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,0GAA0G;AAC1G,0FAA0F;AAC1F,iDAAiD;AACjD,6GAA6G;AAC7G,kEAAkE;AAClE,mDAAmD;AACnD,iGAAiG;AACjG,6FAA6F;AAC7F,2DAA2D;AAC3D,+DAA+D;AAC/D,8CAA8C;AAC9C,4FAA4F;AAC5F,4FAA4F;AAC5F,kGAAkG;AAClG,8DAA8D;AAC9D,iGAAiG;AACjG,qFAAqF;AACrF,wGAAwG;AACxG,6EAA6E;AAC7E,yFAAyF;AACzF,sGAAsG;AACtG,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,gIAAgI;AAChI,qBAAqB;AA4CrB,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAC3C,MAAM,CAAC,MAAM,uBAAuB,GAAkB,MAAM,CAAC;AAC7D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CA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C;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PLUGIN_TOGGLE_NAMES: readonly ["guardian", "hashline-edit", "model-roles", "system-context-injection", "workflow", "secrets-redaction", "context", "web-tools", "tool-history-compaction", "analytics"];
|
|
1
|
+
export declare const PLUGIN_TOGGLE_NAMES: readonly ["guardian", "hashline-edit", "model-roles", "system-context-injection", "workflow", "secrets-redaction", "context", "web-tools", "tool-history-compaction", "analytics", "peak-hours"];
|
|
2
2
|
export type VvocPluginEntryConfig = {
|
|
3
3
|
enabled?: boolean;
|
|
4
4
|
routing?: Record<string, unknown>;
|
|
@@ -28,6 +28,68 @@ export declare const DEFAULT_TOOL_HISTORY_COMPACTION_ENTRY: {
|
|
|
28
28
|
readonly readSlim: true;
|
|
29
29
|
readonly retainTools: readonly ["webfetch", "web_fetch", "web-reader", "webreader", "search", "brave", "skill", "task", "agent"];
|
|
30
30
|
};
|
|
31
|
+
export declare const DEFAULT_PEAK_HOURS_SCHEDULES_REVISION = "2026-08-21";
|
|
32
|
+
export declare const DEFAULT_PEAK_HOURS_SCHEDULES: {
|
|
33
|
+
readonly deepseek: {
|
|
34
|
+
readonly windows: readonly [{
|
|
35
|
+
readonly start: "01:00";
|
|
36
|
+
readonly end: "04:00";
|
|
37
|
+
readonly tz: "UTC";
|
|
38
|
+
}, {
|
|
39
|
+
readonly start: "06:00";
|
|
40
|
+
readonly end: "10:00";
|
|
41
|
+
readonly tz: "UTC";
|
|
42
|
+
}];
|
|
43
|
+
};
|
|
44
|
+
readonly "z-ai": {
|
|
45
|
+
readonly windows: readonly [{
|
|
46
|
+
readonly start: "06:00";
|
|
47
|
+
readonly end: "10:00";
|
|
48
|
+
readonly tz: "UTC";
|
|
49
|
+
readonly days: readonly [1, 2, 3, 4, 5];
|
|
50
|
+
}];
|
|
51
|
+
};
|
|
52
|
+
readonly qwen: {
|
|
53
|
+
readonly windows: readonly [{
|
|
54
|
+
readonly start: "00:00";
|
|
55
|
+
readonly end: "14:00";
|
|
56
|
+
readonly tz: "UTC";
|
|
57
|
+
}];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare const DEFAULT_PEAK_HOURS_ENTRY: {
|
|
61
|
+
readonly enabled: true;
|
|
62
|
+
readonly mode: "hard";
|
|
63
|
+
readonly graceActiveSessions: true;
|
|
64
|
+
readonly schedules: {
|
|
65
|
+
readonly deepseek: {
|
|
66
|
+
readonly windows: readonly [{
|
|
67
|
+
readonly start: "01:00";
|
|
68
|
+
readonly end: "04:00";
|
|
69
|
+
readonly tz: "UTC";
|
|
70
|
+
}, {
|
|
71
|
+
readonly start: "06:00";
|
|
72
|
+
readonly end: "10:00";
|
|
73
|
+
readonly tz: "UTC";
|
|
74
|
+
}];
|
|
75
|
+
};
|
|
76
|
+
readonly "z-ai": {
|
|
77
|
+
readonly windows: readonly [{
|
|
78
|
+
readonly start: "06:00";
|
|
79
|
+
readonly end: "10:00";
|
|
80
|
+
readonly tz: "UTC";
|
|
81
|
+
readonly days: readonly [1, 2, 3, 4, 5];
|
|
82
|
+
}];
|
|
83
|
+
};
|
|
84
|
+
readonly qwen: {
|
|
85
|
+
readonly windows: readonly [{
|
|
86
|
+
readonly start: "00:00";
|
|
87
|
+
readonly end: "14:00";
|
|
88
|
+
readonly tz: "UTC";
|
|
89
|
+
}];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
31
93
|
export declare function createDefaultPluginToggleConfig(): VvocPluginToggleConfig;
|
|
32
94
|
/**
|
|
33
95
|
* Materialize the hashline-edit plugin entry so the edit-routing table is always
|
|
@@ -45,6 +107,14 @@ export declare function materializeHashlineEditEntry(current: boolean | VvocPlug
|
|
|
45
107
|
* with defaults.
|
|
46
108
|
*/
|
|
47
109
|
export declare function materializeToolHistoryCompactionEntry(current: boolean | VvocPluginEntryConfig | undefined): VvocPluginEntryConfig;
|
|
110
|
+
/**
|
|
111
|
+
* Materialize the peak-hours plugin entry so defaults are always present in
|
|
112
|
+
* vvoc.json. Conservative: user values are never overwritten. Boolean or
|
|
113
|
+
* missing entries expand to the full default entry with the revision-dated
|
|
114
|
+
* schedules; object entries keep their enabled flag, mode, grace flag, and any
|
|
115
|
+
* user-provided schedules object, filling only absent keys with defaults.
|
|
116
|
+
*/
|
|
117
|
+
export declare function materializePeakHoursEntry(current: boolean | VvocPluginEntryConfig | undefined): VvocPluginEntryConfig;
|
|
48
118
|
export declare function isPluginEnabled(config: {
|
|
49
119
|
plugins?: VvocPluginToggleConfig;
|
|
50
120
|
}, pluginName: string): boolean;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// VERSION: 1.4.0
|
|
3
3
|
// START_MODULE_CONTRACT
|
|
4
4
|
// PURPOSE: Define canonical plugin toggle names, default-all-true values, and a pure plugin-enabled helper for loaded vvoc config snapshots.
|
|
5
|
-
// SCOPE: Plugin name constants, default config builder, default hashline edit-routing table, default tool-history-compaction entry, conservative plugin entry materialization, pure toggle checks, and the toggle config type.
|
|
5
|
+
// SCOPE: Plugin name constants, default config builder, default hashline edit-routing table, default tool-history-compaction entry, revision-dated default peak-hours schedules and entry, conservative plugin entry materialization, pure toggle checks, and the toggle config type.
|
|
6
6
|
// DEPENDS: [none]
|
|
7
|
-
// LINKS: [M-PLUGIN-TOGGLE-CONFIG, M-CLI-CONFIG]
|
|
7
|
+
// LINKS: [M-PLUGIN-TOGGLE-CONFIG, M-CLI-CONFIG, M-PEAK-HOURS-SCHEDULES]
|
|
8
8
|
// ROLE: RUNTIME
|
|
9
9
|
// MAP_MODE: EXPORTS
|
|
10
10
|
// END_MODULE_CONTRACT
|
|
@@ -17,14 +17,18 @@
|
|
|
17
17
|
// DEFAULT_HASHLINE_EDIT_ROUTING - Default edit-routing table materialized into vvoc.json for the hashline-edit plugin.
|
|
18
18
|
// DEFAULT_TOOL_HISTORY_COMPACTION_RETAIN_TOOLS - Default knowledge-tool retention substrings for tool-history-compaction.
|
|
19
19
|
// DEFAULT_TOOL_HISTORY_COMPACTION_ENTRY - Default materializable config entry for tool-history-compaction.
|
|
20
|
+
// DEFAULT_PEAK_HOURS_SCHEDULES_REVISION - Revision date of the built-in peak-hours schedule data.
|
|
21
|
+
// DEFAULT_PEAK_HOURS_SCHEDULES - Revision-dated built-in provider peak windows for the peak-hours plugin.
|
|
22
|
+
// DEFAULT_PEAK_HOURS_ENTRY - Default materializable config entry for the peak-hours plugin.
|
|
20
23
|
// materializeHashlineEditEntry - Expand the hashline-edit entry so the routing table is present without overwriting user values.
|
|
21
24
|
// materializeToolHistoryCompactionEntry - Expand the tool-history-compaction entry so the compaction config is present without overwriting user values.
|
|
25
|
+
// materializePeakHoursEntry - Expand the peak-hours entry so defaults are present without overwriting user values.
|
|
22
26
|
// isPluginEnabled - Returns whether the named plugin is enabled in a loaded vvoc config object.
|
|
23
27
|
// isVvocPluginEnabled - Alias for isPluginEnabled with explicit vvoc naming.
|
|
24
28
|
// END_MODULE_MAP
|
|
25
29
|
//
|
|
26
30
|
// START_CHANGE_SUMMARY
|
|
27
|
-
// LAST_CHANGE: [
|
|
31
|
+
// LAST_CHANGE: [C-PLUGIN-PEAK-HOURS - Added the peak-hours toggle name, revision-dated default schedules, and conservative entry materialization.]
|
|
28
32
|
// END_CHANGE_SUMMARY
|
|
29
33
|
// START_BLOCK_CONSTANTS
|
|
30
34
|
export const PLUGIN_TOGGLE_NAMES = [
|
|
@@ -38,6 +42,7 @@ export const PLUGIN_TOGGLE_NAMES = [
|
|
|
38
42
|
"web-tools",
|
|
39
43
|
"tool-history-compaction",
|
|
40
44
|
"analytics",
|
|
45
|
+
"peak-hours",
|
|
41
46
|
];
|
|
42
47
|
// Default edit-routing table for the hashline-edit plugin. Materialized into vvoc.json
|
|
43
48
|
// on sync/init so it is visible and editable; kept as a plain config-shape object
|
|
@@ -80,6 +85,35 @@ export const DEFAULT_TOOL_HISTORY_COMPACTION_ENTRY = {
|
|
|
80
85
|
retainTools: [...DEFAULT_TOOL_HISTORY_COMPACTION_RETAIN_TOOLS],
|
|
81
86
|
};
|
|
82
87
|
// END_BLOCK_TOOL_HISTORY_DEFAULTS
|
|
88
|
+
// START_BLOCK_PEAK_HOURS_DEFAULTS
|
|
89
|
+
// Revision-dated best-effort peak windows verified on 2026-08-21 from provider
|
|
90
|
+
// documentation; users own their copy after materialization and providers move
|
|
91
|
+
// these clocks. deepseek: x2 surcharge windows effective 2026-08-16
|
|
92
|
+
// (api-docs.deepseek.com). z-ai: GLM Coding Plan weekday clock, 14:00-18:00
|
|
93
|
+
// UTC+8 (docs.z.ai). qwen: 22:00-08:00 UTC+8 off-peak, i.e. peak 00:00-14:00
|
|
94
|
+
// UTC daily (Alibaba Model Studio token plan).
|
|
95
|
+
export const DEFAULT_PEAK_HOURS_SCHEDULES_REVISION = "2026-08-21";
|
|
96
|
+
export const DEFAULT_PEAK_HOURS_SCHEDULES = {
|
|
97
|
+
deepseek: {
|
|
98
|
+
windows: [
|
|
99
|
+
{ start: "01:00", end: "04:00", tz: "UTC" },
|
|
100
|
+
{ start: "06:00", end: "10:00", tz: "UTC" },
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
"z-ai": {
|
|
104
|
+
windows: [{ start: "06:00", end: "10:00", tz: "UTC", days: [1, 2, 3, 4, 5] }],
|
|
105
|
+
},
|
|
106
|
+
qwen: {
|
|
107
|
+
windows: [{ start: "00:00", end: "14:00", tz: "UTC" }],
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
export const DEFAULT_PEAK_HOURS_ENTRY = {
|
|
111
|
+
enabled: true,
|
|
112
|
+
mode: "hard",
|
|
113
|
+
graceActiveSessions: true,
|
|
114
|
+
schedules: DEFAULT_PEAK_HOURS_SCHEDULES,
|
|
115
|
+
};
|
|
116
|
+
// END_BLOCK_PEAK_HOURS_DEFAULTS
|
|
83
117
|
// START_BLOCK_DEFAULT_CONFIG
|
|
84
118
|
export function createDefaultPluginToggleConfig() {
|
|
85
119
|
const config = {};
|
|
@@ -163,6 +197,46 @@ export function materializeToolHistoryCompactionEntry(current) {
|
|
|
163
197
|
return materialized;
|
|
164
198
|
}
|
|
165
199
|
// END_BLOCK_TOOL_HISTORY_MATERIALIZE
|
|
200
|
+
// START_BLOCK_PEAK_HOURS_MATERIALIZE
|
|
201
|
+
function defaultPeakHoursSchedulesCopy() {
|
|
202
|
+
return {
|
|
203
|
+
deepseek: {
|
|
204
|
+
windows: DEFAULT_PEAK_HOURS_SCHEDULES.deepseek.windows.map((window) => ({ ...window })),
|
|
205
|
+
},
|
|
206
|
+
"z-ai": {
|
|
207
|
+
windows: DEFAULT_PEAK_HOURS_SCHEDULES["z-ai"].windows.map((window) => ({ ...window })),
|
|
208
|
+
},
|
|
209
|
+
qwen: {
|
|
210
|
+
windows: DEFAULT_PEAK_HOURS_SCHEDULES.qwen.windows.map((window) => ({ ...window })),
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Materialize the peak-hours plugin entry so defaults are always present in
|
|
216
|
+
* vvoc.json. Conservative: user values are never overwritten. Boolean or
|
|
217
|
+
* missing entries expand to the full default entry with the revision-dated
|
|
218
|
+
* schedules; object entries keep their enabled flag, mode, grace flag, and any
|
|
219
|
+
* user-provided schedules object, filling only absent keys with defaults.
|
|
220
|
+
*/
|
|
221
|
+
export function materializePeakHoursEntry(current) {
|
|
222
|
+
if (current === undefined || typeof current === "boolean") {
|
|
223
|
+
return {
|
|
224
|
+
enabled: current === undefined ? true : current,
|
|
225
|
+
mode: DEFAULT_PEAK_HOURS_ENTRY.mode,
|
|
226
|
+
graceActiveSessions: DEFAULT_PEAK_HOURS_ENTRY.graceActiveSessions,
|
|
227
|
+
schedules: defaultPeakHoursSchedulesCopy(),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
enabled: current.enabled ?? true,
|
|
232
|
+
mode: current.mode ?? DEFAULT_PEAK_HOURS_ENTRY.mode,
|
|
233
|
+
graceActiveSessions: current.graceActiveSessions ?? DEFAULT_PEAK_HOURS_ENTRY.graceActiveSessions,
|
|
234
|
+
schedules: isPlainRecord(current.schedules)
|
|
235
|
+
? current.schedules
|
|
236
|
+
: defaultPeakHoursSchedulesCopy(),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// END_BLOCK_PEAK_HOURS_MATERIALIZE
|
|
166
240
|
// START_CONTRACT: isPluginEnabled
|
|
167
241
|
// PURPOSE: Return whether the named plugin is enabled in an already-loaded vvoc config.
|
|
168
242
|
// INPUTS: { config: { plugins?: VvocPluginToggleConfig } - loaded vvoc config or compatible plugin toggle holder; pluginName: string - one of PLUGIN_TOGGLE_NAMES }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-toggle-config.js","sourceRoot":"","sources":["../../src/lib/plugin-toggle-config.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,iBAAiB;AACjB,wBAAwB;AACxB,+IAA+I;AAC/I,
|
|
1
|
+
{"version":3,"file":"plugin-toggle-config.js","sourceRoot":"","sources":["../../src/lib/plugin-toggle-config.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,iBAAiB;AACjB,wBAAwB;AACxB,+IAA+I;AAC/I,wRAAwR;AACxR,oBAAoB;AACpB,0EAA0E;AAC1E,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,uEAAuE;AACvE,mGAAmG;AACnG,iHAAiH;AACjH,2FAA2F;AAC3F,yHAAyH;AACzH,4HAA4H;AAC5H,6GAA6G;AAC7G,oGAAoG;AACpG,4GAA4G;AAC5G,8FAA8F;AAC9F,mIAAmI;AACnI,0JAA0J;AAC1J,qHAAqH;AACrH,kGAAkG;AAClG,+EAA+E;AAC/E,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,qJAAqJ;AACrJ,qBAAqB;AAErB,wBAAwB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