@jossuealcala/madre 1.0.5 → 1.1.1
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/ADDITIONAL-TERMS.md +7 -2
- package/CHANGELOG.en.md +62 -1
- package/CHANGELOG.md +62 -1
- package/CONTRIBUTING.md +2 -2
- package/LICENSE +111 -661
- package/NOTICE +28 -23
- package/README.en.md +27 -102
- package/README.md +27 -104
- package/SECURITY.md +1 -0
- package/TRADEMARKS.en.md +13 -14
- package/TRADEMARKS.md +24 -26
- package/bin/madre.cjs +2 -2
- package/bin/madre.mjs +111 -40
- package/docs/REFERENCE.md +52 -5
- package/docs/SDK.md +21 -3
- package/docs/en/REFERENCE.md +52 -5
- package/docs/en/SDK.md +22 -3
- package/docs/sdk/hello-module.mjs +3 -0
- package/package.json +3 -2
- package/public/abduction.js +6 -6
- package/public/activity.js +425 -0
- package/public/app.js +2477 -438
- package/public/assets/abduction-cat-blink.webp +0 -0
- package/public/assets/abduction-cat-control-left.webp +0 -0
- package/public/assets/abduction-cat-control-right.webp +0 -0
- package/public/assets/abduction-cat.webp +0 -0
- package/public/assets/manual/shots/en-agents.webp +0 -0
- package/public/assets/manual/shots/en-chats.webp +0 -0
- package/public/assets/manual/shots/en-code.webp +0 -0
- package/public/assets/manual/shots/en-composer.webp +0 -0
- package/public/assets/manual/shots/en-connectors.webp +0 -0
- package/public/assets/manual/shots/en-continuity.webp +0 -0
- package/public/assets/manual/shots/en-coordinator.webp +0 -0
- package/public/assets/manual/shots/en-copilot.webp +0 -0
- package/public/assets/manual/shots/en-diagnostics.webp +0 -0
- package/public/assets/manual/shots/en-home.webp +0 -0
- package/public/assets/manual/shots/en-local.webp +0 -0
- package/public/assets/manual/shots/en-market.webp +0 -0
- package/public/assets/manual/shots/en-memory.webp +0 -0
- package/public/assets/manual/shots/en-modes.webp +0 -0
- package/public/assets/manual/shots/en-notes.webp +0 -0
- package/public/assets/manual/shots/en-settings.webp +0 -0
- package/public/assets/manual/shots/en-welcome.webp +0 -0
- package/public/assets/manual/shots/en-windows.webp +0 -0
- package/public/assets/manual/shots/es-agents.webp +0 -0
- package/public/assets/manual/shots/es-chats.webp +0 -0
- package/public/assets/manual/shots/es-code.webp +0 -0
- package/public/assets/manual/shots/es-composer.webp +0 -0
- package/public/assets/manual/shots/es-connectors.webp +0 -0
- package/public/assets/manual/shots/es-continuity.webp +0 -0
- package/public/assets/manual/shots/es-coordinator.webp +0 -0
- package/public/assets/manual/shots/es-copilot.webp +0 -0
- package/public/assets/manual/shots/es-diagnostics.webp +0 -0
- package/public/assets/manual/shots/es-home.webp +0 -0
- package/public/assets/manual/shots/es-local.webp +0 -0
- package/public/assets/manual/shots/es-market.webp +0 -0
- package/public/assets/manual/shots/es-memory.webp +0 -0
- package/public/assets/manual/shots/es-modes.webp +0 -0
- package/public/assets/manual/shots/es-notes.webp +0 -0
- package/public/assets/manual/shots/es-settings.webp +0 -0
- package/public/assets/manual/shots/es-welcome.webp +0 -0
- package/public/assets/manual/shots/es-windows.webp +0 -0
- package/public/assets/news/1.1/en/chats.webp +0 -0
- package/public/assets/news/1.1/en/home.webp +0 -0
- package/public/assets/news/1.1/en/maps.webp +0 -0
- package/public/assets/news/1.1/en/market.webp +0 -0
- package/public/assets/news/1.1/en/permissions.webp +0 -0
- package/public/assets/news/1.1/en/privacy.webp +0 -0
- package/public/assets/news/1.1/en/welcome.webp +0 -0
- package/public/assets/news/1.1/es/chats.webp +0 -0
- package/public/assets/news/1.1/es/home.webp +0 -0
- package/public/assets/news/1.1/es/maps.webp +0 -0
- package/public/assets/news/1.1/es/market.webp +0 -0
- package/public/assets/news/1.1/es/permissions.webp +0 -0
- package/public/assets/news/1.1/es/privacy.webp +0 -0
- package/public/assets/news/1.1/es/welcome.webp +0 -0
- package/public/attribution.js +15 -16
- package/public/brands.js +2 -2
- package/public/code-tools.js +2 -2
- package/public/editor.js +13 -13
- package/public/en.js +413 -4
- package/public/es.js +1354 -483
- package/public/hardware.js +2 -2
- package/public/i18n.js +2 -2
- package/public/icons.js +158 -0
- package/public/index.html +66 -48
- package/public/inquiry.js +2 -2
- package/public/loader.js +271 -2
- package/public/macroverso.js +64 -22
- package/public/manual-content.js +416 -169
- package/public/manual-shots.js +38 -34
- package/public/manual.css +20 -2
- package/public/manual.html +1 -1
- package/public/manual.js +54 -25
- package/public/market-art.js +47 -45
- package/public/market-view.js +111 -33
- package/public/market.js +132 -30
- package/public/mcp-catalog.js +2 -2
- package/public/neural.js +64 -8
- package/public/nostromo-engine.js +709 -40
- package/public/page-errors.js +31 -0
- package/public/power.js +350 -11
- package/public/remedy.js +89 -0
- package/public/resay.js +3 -2
- package/public/review-ask.js +12 -7
- package/public/routing.js +3 -3
- package/public/salas-mac.css +703 -24
- package/public/salas-mac.html +26 -14
- package/public/salas-mac.js +1261 -291
- package/public/salas.css +2 -2
- package/public/salas.html +3 -3
- package/public/salas.js +3 -3
- package/public/styles.css +2404 -291
- package/public/syntax.js +2 -2
- package/public/terms.js +152 -0
- package/public/touch.js +2 -2
- package/public/tour-chapters.js +10 -10
- package/public/tour.js +56 -8
- package/public/troubleshooting.js +200 -13
- package/public/wallpaper.js +4 -3
- package/public/welcome.js +923 -0
- package/src/activity.mjs +85 -0
- package/src/adapters/claude.mjs +61 -35
- package/src/adapters/codex.mjs +18 -5
- package/src/adapters/cursor.mjs +5 -3
- package/src/adapters/gemini.mjs +5 -3
- package/src/adapters/madre.mjs +3 -3
- package/src/adapters/opencode.mjs +73 -10
- package/src/adapters/process.mjs +14 -13
- package/src/adapters/subagents.mjs +159 -0
- package/src/asking.mjs +8 -2
- package/src/auth-probe.mjs +27 -10
- package/src/bridge/devices.mjs +2 -2
- package/src/bridge/handoff.mjs +2 -2
- package/src/bridge/host.mjs +2 -2
- package/src/bridge/network.mjs +2 -2
- package/src/bridge/policy.mjs +3 -3
- package/src/bridge/qr.mjs +2 -2
- package/src/bridge/server.mjs +2 -2
- package/src/builtin-updates.mjs +87 -0
- package/src/capabilities.mjs +2 -2
- package/src/chats.mjs +51 -2
- package/src/checkpoint.mjs +67 -9
- package/src/choices.mjs +2 -2
- package/src/cli-args.mjs +2 -2
- package/src/cold.mjs +2 -2
- package/src/commands.mjs +2 -2
- package/src/config.mjs +2 -2
- package/src/conversation-context.mjs +2 -2
- package/src/credentials.mjs +56 -16
- package/src/dataset.mjs +2 -2
- package/src/directives.mjs +2 -2
- package/src/distiller.mjs +2 -2
- package/src/embeddings.mjs +2 -2
- package/src/enlaces.mjs +2 -2
- package/src/environment.mjs +147 -0
- package/src/event-store.mjs +2 -2
- package/src/exam.mjs +2 -2
- package/src/extensions.mjs +2 -2
- package/src/eyecat-watch.mjs +2 -2
- package/src/eyecat.mjs +2 -2
- package/src/file-ops.mjs +2 -2
- package/src/files.mjs +2 -2
- package/src/github.mjs +2 -2
- package/src/heartbeat.mjs +2 -2
- package/src/history.mjs +2 -2
- package/src/i18n.mjs +9 -2
- package/src/image-studio.mjs +2 -2
- package/src/install-metrics.mjs +109 -0
- package/src/json-file.mjs +2 -2
- package/src/launch.mjs +2 -2
- package/src/lease.mjs +15 -4
- package/src/lobby-work.mjs +11 -4
- package/src/local-ai.mjs +2 -2
- package/src/looks.mjs +2 -2
- package/src/market-check.mjs +165 -0
- package/src/market-key.mjs +10 -2
- package/src/market-license.mjs +4 -4
- package/src/market-remote.mjs +54 -12
- package/src/maturity.mjs +2 -2
- package/src/mcp/connect.mjs +2 -2
- package/src/mcp/github-server.mjs +2 -2
- package/src/mcp/image-server.mjs +2 -2
- package/src/mcp/memory-server.mjs +2 -2
- package/src/mcp/proxy.mjs +2 -2
- package/src/mcp/smtp-server.mjs +2 -2
- package/src/memory-dashboard.mjs +2 -2
- package/src/memory-tools.mjs +2 -2
- package/src/memory.mjs +2 -2
- package/src/models.mjs +33 -3
- package/src/module-scope.mjs +2 -2
- package/src/modules/ahp.mjs +2 -2
- package/src/modules/ash-policy.mjs +2 -2
- package/src/modules/ash.mjs +2 -2
- package/src/modules/bishop-exam.mjs +2 -2
- package/src/modules/bishop-plan.mjs +2 -2
- package/src/modules/bishop.mjs +9 -3
- package/src/modules/choices.mjs +2 -2
- package/src/modules/correo.mjs +2 -2
- package/src/modules/enlaces.mjs +2 -2
- package/src/modules/git-pulse.mjs +2 -2
- package/src/modules/github.mjs +2 -2
- package/src/modules/helpers.mjs +2 -2
- package/src/modules/image-studio.mjs +2 -2
- package/src/modules/index.mjs +90 -5
- package/src/modules/intents-calibration.mjs +2 -2
- package/src/modules/intents-desk.mjs +4 -3
- package/src/modules/intents-observe.mjs +2 -2
- package/src/modules/intents-policy.mjs +2 -2
- package/src/modules/intents-try.mjs +2 -2
- package/src/modules/intents.mjs +2 -2
- package/src/modules/local-models.mjs +14 -11
- package/src/modules/mcp-connect.mjs +2 -2
- package/src/modules/notes.mjs +159 -20
- package/src/modules/ollama.mjs +23 -11
- package/src/modules/playwright.mjs +2 -2
- package/src/modules/reminders.mjs +356 -37
- package/src/modules/ripley.mjs +3 -3
- package/src/modules/runs.mjs +2 -2
- package/src/modules/sdk.mjs +38 -6
- package/src/modules/updates.mjs +2 -2
- package/src/mother.mjs +2 -2
- package/src/npm-launch.mjs +2 -2
- package/src/ollama.mjs +6 -4
- package/src/opencode-health.mjs +26 -6
- package/src/outbound.mjs +10 -2
- package/src/override.mjs +27 -22
- package/src/ports.mjs +2 -2
- package/src/prices.mjs +2 -2
- package/src/privacy.mjs +2 -2
- package/src/quota-monitor.mjs +2 -2
- package/src/quota-sources.mjs +2 -2
- package/src/request-guard.mjs +2 -2
- package/src/review-ask.mjs +4 -3
- package/src/room/archivist.mjs +2 -2
- package/src/room/attachments.mjs +2 -2
- package/src/room/budget.mjs +2 -2
- package/src/room/context.mjs +2 -2
- package/src/room/control.mjs +2 -2
- package/src/room/copilot.mjs +2 -2
- package/src/room/economy.mjs +2 -2
- package/src/room/escalation.mjs +2 -2
- package/src/room/ghost.mjs +2 -2
- package/src/room/guard.mjs +6 -4
- package/src/room/prompt.mjs +3 -3
- package/src/room/returns.mjs +2 -2
- package/src/room/runs.mjs +6 -4
- package/src/room/vectors.mjs +2 -2
- package/src/room.mjs +127 -31
- package/src/router.mjs +2 -2
- package/src/runs.mjs +2 -2
- package/src/runtime-detection.mjs +31 -5
- package/src/salas.mjs +31 -6
- package/src/sentinel-errors.mjs +17 -5
- package/src/server-sentinel.mjs +2 -2
- package/src/server.mjs +706 -84
- package/src/setup-trouble.mjs +35 -0
- package/src/setup.mjs +4 -4
- package/src/smtp.mjs +2 -2
- package/src/telemetry.mjs +266 -0
- package/src/terms.mjs +43 -0
- package/src/tour.mjs +39 -5
- package/src/uninstall.mjs +225 -0
- package/src/updates.mjs +2 -2
- package/src/usage-sentinel.mjs +2 -2
- package/src/vault.mjs +2 -2
- package/src/verdict.mjs +13 -10
- package/src/whats-new.mjs +97 -3
- package/public/assets/abduction-cat-blink.png +0 -0
- package/public/assets/abduction-cat-control-left.png +0 -0
- package/public/assets/abduction-cat-control-right.png +0 -0
- package/public/assets/abduction-cat.png +0 -0
- package/public/assets/manual/madre-manual-en.pdf +0 -0
- package/public/assets/manual/madre-manual-es.pdf +0 -0
- package/public/assets/manual/shots/en-modules.webp +0 -0
- package/public/assets/manual/shots/es-modules.webp +0 -0
- package/src/mcp/notes-server.mjs +0 -120
- package/src/reminder-time.mjs +0 -127
package/src/reminder-time.mjs
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
-
// MADRE · © 2026 Jossue Alcalá · GNU AGPL v3 with additional terms (Section 7): ADDITIONAL-TERMS.md
|
|
3
|
-
// When a reminder is due, read from a person's own words (Reminders, 2026-10-20).
|
|
4
|
-
//
|
|
5
|
-
// «mañana a las 5», «el lunes», «en 2 horas», «cada día», «tomorrow at 9am», «every monday»: what
|
|
6
|
-
// people write when they say when, in Spanish or in English. Read here, without a model, so the
|
|
7
|
-
// same words always give the same hour and a reminder never depends on a model being awake. What
|
|
8
|
-
// is not said is filled the way a person would: a day without an hour is at 9:00, an hour without
|
|
9
|
-
// a day is the next time that hour comes, and «a las 5» with nothing else is in the afternoon.
|
|
10
|
-
|
|
11
|
-
const fold = (text) => String(text ?? '').normalize('NFD').replace(/\p{M}/gu, '').toLowerCase();
|
|
12
|
-
export const REPEATS = ['daily', 'weekdays', 'weekly'];
|
|
13
|
-
const DAYS = [
|
|
14
|
-
['domingo', 'sunday'], ['lunes', 'monday'], ['martes', 'tuesday'], ['miercoles', 'wednesday'],
|
|
15
|
-
['jueves', 'thursday'], ['viernes', 'friday'], ['sabado', 'saturday'],
|
|
16
|
-
];
|
|
17
|
-
const dayIndex = (word) => DAYS.findIndex((names) => names.includes(word));
|
|
18
|
-
const DAY_WORDS = DAYS.flat().join('|');
|
|
19
|
-
const NUMBERS = { un: 1, una: 1, uno: 1, a: 1, an: 1, one: 1, dos: 2, two: 2, tres: 3, three: 3, cuatro: 4, four: 4, cinco: 5, five: 5, diez: 10, ten: 10, quince: 15, fifteen: 15, veinte: 20, twenty: 20, treinta: 30, thirty: 30 };
|
|
20
|
-
const UNIT_MS = { min: 60000, hor: 3600000, hou: 3600000, dia: 86400000, day: 86400000, sem: 7 * 86400000, wee: 7 * 86400000 };
|
|
21
|
-
export const DEFAULT_HOUR = 9;
|
|
22
|
-
|
|
23
|
-
const at = (base, hour, minute = 0) => { const next = new Date(base); next.setHours(hour, minute, 0, 0); return next; };
|
|
24
|
-
const plusDays = (base, days) => { const next = new Date(base); next.setDate(next.getDate() + days); return next; };
|
|
25
|
-
|
|
26
|
-
// The hour said, if any: «a las 5», «a las 17:30», «at 9am», «5 pm», «10:15».
|
|
27
|
-
function hourOf(text) {
|
|
28
|
-
const match = text.match(/\b(?:a las|a la|at)\s+(\d{1,2})(?::(\d{2}))?\s*(am|pm|a\.m\.|p\.m\.|de la manana|de la tarde|de la noche|hrs|h)?\b/)
|
|
29
|
-
?? text.match(/\b(\d{1,2}):(\d{2})\s*(am|pm|a\.m\.|p\.m\.)?/)
|
|
30
|
-
?? text.match(/\b(\d{1,2})()\s*(am|pm|a\.m\.|p\.m\.)(?![a-z])/);
|
|
31
|
-
if (!match) return null;
|
|
32
|
-
let hour = Number(match[1]);
|
|
33
|
-
const minute = Number(match[2] || 0);
|
|
34
|
-
const tag = match[3] ?? '';
|
|
35
|
-
if (hour > 23 || minute > 59) return null;
|
|
36
|
-
if (/pm|p\.m\.|tarde|noche/.test(tag) && hour < 12) hour += 12;
|
|
37
|
-
else if (/am|a\.m\.|manana/.test(tag) && hour === 12) hour = 0;
|
|
38
|
-
// «a las 5» with nothing else: a person at work means the afternoon, not dawn.
|
|
39
|
-
else if (!tag && hour >= 1 && hour <= 7) hour += 12;
|
|
40
|
-
return { hour, minute };
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// The part of the day said in words, when no hour was.
|
|
44
|
-
function partOfDay(text) {
|
|
45
|
-
if (/\b(esta noche|en la noche|por la noche|tonight|in the evening)\b/.test(text)) return { hour: 20, minute: 0 };
|
|
46
|
-
if (/\b(esta tarde|en la tarde|por la tarde|this afternoon|in the afternoon)\b/.test(text)) return { hour: 17, minute: 0 };
|
|
47
|
-
if (/\b(en la manana|por la manana|in the morning)\b/.test(text)) return { hour: 9, minute: 0 };
|
|
48
|
-
if (/\b(al mediodia|a mediodia|at noon|noon)\b/.test(text)) return { hour: 12, minute: 0 };
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// What repeats, and on which day for a weekly one.
|
|
53
|
-
function repeatOf(text) {
|
|
54
|
-
const weekly = text.match(new RegExp(`\\b(?:cada|todos los|every)\\s+(${DAY_WORDS})s?\\b`));
|
|
55
|
-
if (weekly) return { repeat: 'weekly', day: dayIndex(weekly[1]) };
|
|
56
|
-
if (/\b(entre semana|de lunes a viernes|every weekday|weekdays)\b/.test(text)) return { repeat: 'weekdays' };
|
|
57
|
-
if (/\b(cada dia|todos los dias|diario|diariamente|cada manana|todas las mananas|every day|everyday|daily|each day|every morning)\b/.test(text)) return { repeat: 'daily' };
|
|
58
|
-
if (/\b(cada semana|semanal(mente)?|every week|weekly)\b/.test(text)) return { repeat: 'weekly' };
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// The next time a repeating reminder comes after `after`.
|
|
63
|
-
export function nextOccurrence(due, repeat, after = new Date()) {
|
|
64
|
-
let next = new Date(due);
|
|
65
|
-
if (!REPEATS.includes(repeat)) return next;
|
|
66
|
-
const step = () => {
|
|
67
|
-
if (repeat === 'weekly') next = plusDays(next, 7);
|
|
68
|
-
else {
|
|
69
|
-
next = plusDays(next, 1);
|
|
70
|
-
if (repeat === 'weekdays') while (next.getDay() === 0 || next.getDay() === 6) next = plusDays(next, 1);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
for (let guard = 0; next <= after && guard < 4000; guard += 1) step();
|
|
74
|
-
return next;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// { due, repeat, said } for the words, or null when they say no time at all.
|
|
78
|
-
export function parseWhen(words, now = new Date(), { hour: dayHour = DEFAULT_HOUR } = {}) {
|
|
79
|
-
const text = fold(words);
|
|
80
|
-
const base = new Date(now);
|
|
81
|
-
const repeated = repeatOf(text);
|
|
82
|
-
const hour = hourOf(text) ?? partOfDay(text);
|
|
83
|
-
const said = [];
|
|
84
|
-
|
|
85
|
-
// «en 2 horas», «en media hora», «in 20 minutes»: a moment from now, the hour does not apply.
|
|
86
|
-
const relative = text.match(/\b(?:en|in|dentro de)\s+(\d+|media|half an?|un|una|uno|a|an|one|dos|two|tres|three|cuatro|four|cinco|five|diez|ten|quince|fifteen|veinte|twenty|treinta|thirty)\s+(min\w*|hor\w*|hou\w*|dia\w*|day\w*|sem\w*|wee\w*)/);
|
|
87
|
-
if (relative && !repeated) {
|
|
88
|
-
const amount = /^(media|half)/.test(relative[1]) ? 0.5 : Number(relative[1]) || NUMBERS[relative[1]] || 1;
|
|
89
|
-
const unit = UNIT_MS[relative[2].slice(0, 3)] ?? 3600000;
|
|
90
|
-
return { due: new Date(base.getTime() + amount * unit), repeat: null, said: relative[0] };
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
let day = null;
|
|
94
|
-
if (/\bpasado manana\b|\bday after tomorrow\b/.test(text)) { day = plusDays(base, 2); said.push('pasado mañana'); }
|
|
95
|
-
// «mañana» is tomorrow unless it is the morning: «la mañana», «de la mañana», «por la mañana».
|
|
96
|
-
else if (/(^|[^a-z])(manana)(?![a-z])/.test(text.replace(/\b(la|las|en la|por la|de la|cada|todas las)\s+manana(s)?\b/g, ' ')) || /\btomorrow\b/.test(text)) { day = plusDays(base, 1); said.push('mañana'); }
|
|
97
|
-
else if (/\b(hoy|today|tonight|esta tarde|esta noche|this afternoon)\b/.test(text)) { day = new Date(base); said.push('hoy'); }
|
|
98
|
-
else if (/\b(la proxima semana|la semana que viene|next week)\b/.test(text)) {
|
|
99
|
-
day = plusDays(base, ((8 - base.getDay()) % 7) || 7);
|
|
100
|
-
said.push('la próxima semana');
|
|
101
|
-
} else {
|
|
102
|
-
const named = text.match(new RegExp(`\\b(?:el|este|el proximo|on|next|this)?\\s*(${DAY_WORDS})\\b`));
|
|
103
|
-
if (named && !repeated) {
|
|
104
|
-
const target = dayIndex(named[1]);
|
|
105
|
-
const ahead = (target - base.getDay() + 7) % 7;
|
|
106
|
-
day = plusDays(base, ahead || 7);
|
|
107
|
-
said.push(named[1]);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (repeated) {
|
|
112
|
-
let first = at(base, hour?.hour ?? dayHour, hour?.minute ?? 0);
|
|
113
|
-
if (repeated.repeat === 'weekly' && Number.isInteger(repeated.day)) first = plusDays(first, (repeated.day - base.getDay() + 7) % 7);
|
|
114
|
-
if (repeated.repeat === 'weekdays') while (first.getDay() === 0 || first.getDay() === 6) first = plusDays(first, 1);
|
|
115
|
-
const due = first > base ? first : nextOccurrence(first, repeated.repeat, base);
|
|
116
|
-
return { due, repeat: repeated.repeat, said: 'repeat' };
|
|
117
|
-
}
|
|
118
|
-
if (day) return { due: at(day, hour?.hour ?? dayHour, hour?.minute ?? 0), repeat: null, said: said.join(' ') };
|
|
119
|
-
if (hour) {
|
|
120
|
-
const today = at(base, hour.hour, hour.minute);
|
|
121
|
-
return { due: today > base ? today : plusDays(today, 1), repeat: null, said: 'hour' };
|
|
122
|
-
}
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// When nothing was said: tomorrow, at the start of the day (the person's own start, from Reminders' settings).
|
|
127
|
-
export const tomorrowMorning = (now = new Date(), hour = DEFAULT_HOUR) => at(plusDays(now, 1), hour);
|