@t4dhg/mcp-factorial 10.2.0 → 11.0.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.
Files changed (66) hide show
  1. package/README.md +54 -43
  2. package/dist/api/attendance.d.ts +17 -1
  3. package/dist/api/attendance.d.ts.map +1 -1
  4. package/dist/api/attendance.js +38 -1
  5. package/dist/api/attendance.js.map +1 -1
  6. package/dist/api/index.d.ts +1 -1
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/index.js +1 -1
  9. package/dist/api/index.js.map +1 -1
  10. package/dist/attendance/backfill.d.ts +18 -3
  11. package/dist/attendance/backfill.d.ts.map +1 -1
  12. package/dist/attendance/backfill.js +51 -9
  13. package/dist/attendance/backfill.js.map +1 -1
  14. package/dist/attendance/planner.d.ts +64 -4
  15. package/dist/attendance/planner.d.ts.map +1 -1
  16. package/dist/attendance/planner.js +145 -16
  17. package/dist/attendance/planner.js.map +1 -1
  18. package/dist/attendance/report.d.ts +3 -0
  19. package/dist/attendance/report.d.ts.map +1 -1
  20. package/dist/attendance/report.js +92 -12
  21. package/dist/attendance/report.js.map +1 -1
  22. package/dist/endpoints.d.ts +2 -0
  23. package/dist/endpoints.d.ts.map +1 -1
  24. package/dist/endpoints.js +2 -0
  25. package/dist/endpoints.js.map +1 -1
  26. package/dist/errors.d.ts +6 -1
  27. package/dist/errors.d.ts.map +1 -1
  28. package/dist/errors.js +10 -5
  29. package/dist/errors.js.map +1 -1
  30. package/dist/http-client.d.ts +6 -0
  31. package/dist/http-client.d.ts.map +1 -1
  32. package/dist/http-client.js +28 -4
  33. package/dist/http-client.js.map +1 -1
  34. package/dist/prompts/attendance.d.ts +19 -2
  35. package/dist/prompts/attendance.d.ts.map +1 -1
  36. package/dist/prompts/attendance.js +297 -40
  37. package/dist/prompts/attendance.js.map +1 -1
  38. package/dist/schemas/attendance.d.ts +123 -0
  39. package/dist/schemas/attendance.d.ts.map +1 -1
  40. package/dist/schemas/attendance.js +58 -0
  41. package/dist/schemas/attendance.js.map +1 -1
  42. package/dist/schemas/documents.d.ts +2 -2
  43. package/dist/schemas/index.d.ts +1 -1
  44. package/dist/schemas/index.d.ts.map +1 -1
  45. package/dist/schemas/index.js +1 -1
  46. package/dist/schemas/index.js.map +1 -1
  47. package/dist/schemas/projects.d.ts +2 -2
  48. package/dist/tools/attendance.d.ts.map +1 -1
  49. package/dist/tools/attendance.js +325 -50
  50. package/dist/tools/attendance.js.map +1 -1
  51. package/dist/tools/index.d.ts.map +1 -1
  52. package/dist/tools/index.js +3 -7
  53. package/dist/tools/index.js.map +1 -1
  54. package/dist/tools/shared.d.ts +10 -1
  55. package/dist/tools/shared.d.ts.map +1 -1
  56. package/dist/tools/shared.js +33 -0
  57. package/dist/tools/shared.js.map +1 -1
  58. package/dist/tools/time-off.d.ts.map +1 -1
  59. package/dist/tools/time-off.js +9 -1
  60. package/dist/tools/time-off.js.map +1 -1
  61. package/dist/write-safety.d.ts +6 -0
  62. package/dist/write-safety.d.ts.map +1 -1
  63. package/dist/write-safety.js +7 -0
  64. package/dist/write-safety.js.map +1 -1
  65. package/llms.txt +11 -6
  66. package/package.json +1 -1
@@ -9,6 +9,13 @@
9
9
  * Nothing is written by a prompt itself; writes happen only through the
10
10
  * factorial_attendance tool and its confirmation gate.
11
11
  *
12
+ * A prompt is invisible to the model in some clients: Claude Code surfaces
13
+ * it to the human only, as a slash command, with no way for the model to
14
+ * read it. Each prompt's numbered procedure is lifted into a module-level
15
+ * constant and published as a resource at factorial://prompts/<name>, as
16
+ * well as spliced into the prompt message itself, so the two can never
17
+ * drift apart.
18
+ *
12
19
  * The guide resource (factorial://guides/registro-horario) is the same
13
20
  * knowledge for a model that discovers resources on its own.
14
21
  */
@@ -16,10 +23,11 @@ import * as z from 'zod';
16
23
  import { localToday } from '../api/attendance.js';
17
24
  import { buildLedger, findGaps } from '../attendance/backfill.js';
18
25
  import { resolveEmployeeName, resolveTargetEmployeeId } from '../attendance/identity.js';
19
- import { DEFAULT_TOLERANCE_MINUTES, hours, validateSegments, } from '../attendance/planner.js';
26
+ import { DEFAULT_TOLERANCE_MINUTES, formatCoverage, hours, validateSegments, } from '../attendance/planner.js';
20
27
  import { formatAudit, formatGaps, ledgerRow } from '../attendance/report.js';
21
28
  export const GUIDE_URI = 'factorial://guides/registro-horario';
22
29
  const SEGMENT = /^([01]\d|2[0-3]):[0-5]\d-([01]\d|2[0-3]):[0-5]\d$/;
30
+ const DATE = /^\d{4}-\d{2}-\d{2}$/;
23
31
  /**
24
32
  * Parse the `segments` prompt argument. Prompt arguments are strings, so the
25
33
  * daily pattern arrives as "09:00-14:00, 15:00-18:00" (comma, semicolon or
@@ -61,6 +69,40 @@ export function parseSegmentsArg(text) {
61
69
  validateSegments(segments);
62
70
  return segments;
63
71
  }
72
+ /**
73
+ * Parse the `days` argument of `attendance_fill_days`: a JSON array of
74
+ * explicit dates, each with its own daily pattern as a `segments` string
75
+ * in the same shape `parseSegmentsArg` takes.
76
+ */
77
+ export function parseDaysArg(text) {
78
+ const trimmed = text.trim();
79
+ if (trimmed === '') {
80
+ throw new Error('days is required, for example [{"date":"2026-03-02","segments":"09:00-14:00"}]');
81
+ }
82
+ let parsed;
83
+ try {
84
+ parsed = JSON.parse(trimmed);
85
+ }
86
+ catch {
87
+ throw new Error('days must be valid JSON, for example [{"date":"2026-03-02","segments":"09:00-14:00"}]');
88
+ }
89
+ if (!Array.isArray(parsed) || parsed.length === 0) {
90
+ throw new Error('days must be a non-empty JSON array of {date, segments}');
91
+ }
92
+ return parsed.map((item) => {
93
+ if (item === null ||
94
+ typeof item !== 'object' ||
95
+ typeof item.date !== 'string' ||
96
+ typeof item.segments !== 'string') {
97
+ throw new Error('each day needs a date ("YYYY-MM-DD" string) and a segments string');
98
+ }
99
+ const { date, segments } = item;
100
+ if (!DATE.test(date)) {
101
+ throw new Error(`date "${date}" must be YYYY-MM-DD`);
102
+ }
103
+ return { date, segments: parseSegmentsArg(segments) };
104
+ });
105
+ }
64
106
  /** Sum of a daily pattern in minutes */
65
107
  function patternMinutes(segments) {
66
108
  return segments.reduce((sum, s) => {
@@ -106,12 +148,80 @@ async function preRead(label, read) {
106
148
  }
107
149
  }
108
150
  const STATUS_LEGEND = [
109
- 'Statuses: complete (tracked within tolerance of expected), missing (hours short), over (hours in',
110
- 'excess), weekend, bank_holiday, on_leave (approved full-day leave), half_day_leave (approved half',
111
- 'day; the other half may be missing), not_workable (the contract expects 0 minutes), no_contract_data',
151
+ 'Statuses: complete (tracked within tolerance of expected), missing (nothing on record at all),',
152
+ 'short (hours tracked but under expected by more than the tolerance), over (hours in excess),',
153
+ 'weekend, bank_holiday, on_leave (approved full-day leave), half_day_leave (approved half day; the',
154
+ 'other half may be missing), not_workable (the contract expects 0 minutes), no_contract_data',
112
155
  '(Factorial returned nothing for the date; usually before the start of employment, never a fact about',
113
- 'hours), future (after today, never written).',
156
+ 'hours), future (after today, never written). Separately, a day may be marked signed off, meaning its',
157
+ 'timesheet has been reviewed and is closed for writing whatever its status says.',
114
158
  ].join(' ');
159
+ /**
160
+ * Procedure text per prompt: the numbered steps a model follows. Each is
161
+ * spliced verbatim into its prompt's message and, unmodified, into the
162
+ * resource at factorial://prompts/<name>, so the two can never drift apart.
163
+ * `missing` and `short` are distinct statuses (nothing on record at all,
164
+ * versus some hours tracked but under expected by more than the tolerance),
165
+ * so every procedure below that reports on a window covers them separately
166
+ * rather than under one combined "missing" label.
167
+ */
168
+ const AUDIT_PROCEDURE = [
169
+ 'Do this:',
170
+ '1. Read the Data read line. If it names days without contract data that are not before the start of employment, say so first and treat the audit as unreliable.',
171
+ '2. Report expected vs workday expected vs tracked hours for the window and the count of days per status.',
172
+ '3. List every missing day (nothing on record) separately from every short day (some hours, not enough), with the hours involved, grouped by month. List over days. Mention half_day_leave days whose worked half has no record.',
173
+ '4. Name any day marked signed off; those cannot be corrected by writing hours, only through create_edit_request.',
174
+ '5. If nothing needs attention, say so in one line.',
175
+ '6. Write nothing. This is a read-only report.',
176
+ ].join('\n');
177
+ const FILL_PROCEDURE = [
178
+ 'Do this, in order:',
179
+ '1. Read the Data read line. If it names days without contract data that are not before the start of employment, stop and report; do not write.',
180
+ '2. Tell the person which days are short (some hours tracked, not enough) and which are missing (nothing on record), and ask whether any of them were not worked (illness without a leave record, a day off). Put such days in exclude_dates, which keeps the whole range as one call and shows the exclusions in the preview; prefer this to narrowing the range or running it on sub-ranges. Never invent hours.',
181
+ '3. Preview the write with log_range. Nothing is written by this call.',
182
+ '4. Show the person the preview: how many days and records, the hours, and every skipped day with its reason. Ask them to confirm.',
183
+ '5. Only after they confirm, repeat exactly the same call adding the confirmation_token from the preview. The token lasts 15 minutes and matches only that plan. If it expired, run the preview again.',
184
+ '6. If the result says the write stopped part way, re-run the identical call; the planner writes only what is still missing.',
185
+ '7. Verify with audit and report what changed. Every workday should read complete.',
186
+ ].join('\n');
187
+ const TODAY_PROCEDURE = [
188
+ 'Decide as follows:',
189
+ '1. Check status. If the employee is clocked in (an open shift), write nothing and report that a shift is open.',
190
+ '2. If the status is complete, weekend, bank_holiday, on_leave, not_workable or future, write nothing and report in one line why.',
191
+ '3. If the status is no_contract_data, write nothing and report that Factorial has no contract data for today.',
192
+ '4. If the status is half_day_leave, write nothing and report it; the worked half needs a person to say which half it was.',
193
+ '5. If the status is short (some hours already tracked, not enough), write nothing and report the partial day; a person decides how to complete it.',
194
+ '6. If the status is missing and no shift is on record, preview the write with log_days. Then, in this same session, repeat the identical call adding the confirmation_token from the preview. This unattended confirmation is allowed only when the employee is the configured identity (FACTORIAL_EMPLOYEE_ID).',
195
+ '7. If the status is missing but a shift is already on record for today, write nothing and report the partial day; a person decides how to complete it.',
196
+ '8. Verify with audit and report in one line what was written or why nothing was.',
197
+ ].join('\n');
198
+ const RECONCILE_PROCEDURE = [
199
+ 'Do this:',
200
+ '1. Read the Data read line. If it names days without contract data that are not before the start of employment, say so first and treat the audit as unreliable.',
201
+ '2. Match each missing day (nothing on record) and each short day (some hours, not enough) against the known absences above.',
202
+ '3. Report only the days that disagree: a day with no hours that the person did not say was an absence, and an absence they did state that shows as complete or over.',
203
+ '4. Say explicitly which known absences have no matching leave record in Factorial, since those are the ones that need a leave request rather than hours.',
204
+ '5. Write nothing. This is a read-only reconciliation.',
205
+ ].join('\n');
206
+ const FILL_DAYS_PROCEDURE = [
207
+ 'Do this, in order:',
208
+ '1. Read the status of each requested day above. If any is signed off, its shift cannot be written; tell the person to use create_edit_request for it instead.',
209
+ '2. If any requested day already shows complete or over, ask the person before writing over it; log_days refuses a segment that overlaps an existing shift, so drop days that do not need one.',
210
+ '3. Preview the write with log_days. Nothing is written by this call.',
211
+ '4. Show the person the preview: how many days and records, the hours, and every skipped day with its reason. Ask them to confirm.',
212
+ '5. Only after they confirm, repeat exactly the same call adding the confirmation_token from the preview. The token lasts 15 minutes and matches only that plan. If it expired, run the preview again.',
213
+ '6. If the result says the write stopped part way, re-run the identical call; the planner writes only what is still missing.',
214
+ '7. Verify with audit over the same dates and report what changed.',
215
+ '8. Write nothing for a day not listed. Never invent hours.',
216
+ ].join('\n');
217
+ /** Procedure text per prompt, published as a resource as well as embedded in the prompt */
218
+ const PROMPT_BODIES = new Map([
219
+ ['attendance_audit', AUDIT_PROCEDURE],
220
+ ['attendance_fill', FILL_PROCEDURE],
221
+ ['attendance_today', TODAY_PROCEDURE],
222
+ ['attendance_reconcile', RECONCILE_PROCEDURE],
223
+ ['attendance_fill_days', FILL_DAYS_PROCEDURE],
224
+ ]);
115
225
  export const REGISTRO_HORARIO_GUIDE = `# Registro horario with factorial_attendance
116
226
 
117
227
  This guide is for the model driving the tool. Every step below is a call to the \`factorial_attendance\` tool with an \`action\`. Times are HH:MM in company local time. Dates are YYYY-MM-DD.
@@ -123,52 +233,80 @@ This guide is for the model driving the tool. Every step below is a call to the
123
233
  - **Day type** and bank holidays come from the company calendar in Factorial (\`worked_times.day_type\`).
124
234
  - **Leave** comes from approved \`timeoff/leaves\` records. Pending or rejected leave does not count.
125
235
  - ${STATUS_LEGEND}
126
- - Every \`gaps\`, \`audit\` and bulk preview starts with a **Data read** line saying how many days of the window have contract data and how many leave and shift records were read. If it reports uncovered days that do not precede the start of employment, stop and report; do not write.
236
+ - **Signed off** days have had their timesheet reviewed in Factorial. They are closed for writing: a shift POST on one is refused with a 403. The server reads them, marks them in an audit, and skips them in a plan, so a preview never queues a write that cannot succeed. To correct one, use \`create_edit_request\`, which files a request for a person to approve; filing it notifies whoever approves timesheets. Do not try to write the hours directly.
237
+ - **Times are applied by Factorial in the company zone.** HH:MM goes in and comes back as the same wall-clock time. The server never converts between zones, so there is nothing to compensate for.
238
+ - An audit covers **one employee**. The day counts in its header sum to the number of days in the window, which is the cheapest check that you are reading the whole range.
239
+ - \`list\` returns one employee's shifts by default (the configured identity). Pass \`employee_ids: []\` for the whole company, which is rarely what you want.
240
+ - **\`over\` means the tracked minutes exceed expected by more than the tolerance**, so it is never merely rounding: a forgotten clock-out or a shift entered twice are the common causes. Report every \`over\` day with the size of the excess; never delete or overwrite records to correct one on your own initiative, ask the person whose record it is instead.
241
+ - Every \`gaps\`, \`audit\` and bulk preview starts with a **Data read** line saying how many days of the window have contract data and how many leave, shift and signed-off records were read. If it reports uncovered days that do not precede the start of employment, stop and report; do not write. If it reports fewer leave records than you expect for the window, say so before reasoning about leave; a leave the server did not read is a leave the planner will happily write over.
127
242
  - The server reads every page of every list, so a window of any length is read completely. There is no need to split a range into chunks unless the result is too large to read; if it is, use \`format: "summary"\` on \`audit\` or split by month.
128
243
 
129
244
  ## Workflow A: audit and report
130
245
 
131
246
  1. \`audit\` with \`start_on\`, \`end_on\` (default \`format\` is \`summary\`: only the days needing attention).
132
- 2. Read the Data read line first. Then report: expected vs tracked for the window, the list of \`missing\` days with how much is missing on each, any \`over\` days, any \`half_day_leave\` days whose worked half is untracked, and any \`no_contract_data\` days with the warning above.
247
+ 2. Read the Data read line first. Then report: expected vs workday expected vs tracked for the window, the \`missing\` days (nothing on record) separately from the \`short\` days (some hours, not enough), any \`over\` days, any \`half_day_leave\` days whose worked half is untracked, any \`no_contract_data\` days with the warning above, and any days marked signed off.
248
+
249
+ Example report, which is the shape to copy:
250
+
251
+ > 1 January to 6 September 2026, 249 days. Expected 1416h, of which 1272h on workdays; tracked 1243h15.
252
+ > 143 days complete, 14 bank holidays, 72 weekend days, 4 on leave.
253
+ > 3 days missing entirely: 12 March, 3 June, 14 August (24h).
254
+ > 6 days short, tracked but under expected by more than the tolerance: 15 March, 2 April, 9 April, 20 May, 4 July, 11 August (10h short across them).
255
+ > 7 days over by more than the tolerance, 5h15 in excess in total: 6 February, 13 February, ... A forgotten clock-out or a duplicated shift are the likely causes; ask before treating them as settled.
256
+ > Nothing is signed off, so any of the above can still be corrected.
257
+
133
258
  3. Write nothing. An audit is read-only.
134
259
 
135
260
  ## Workflow B: fill what is missing
136
261
 
137
262
  1. \`gaps\` for the window to see which workdays are short and by how much.
138
263
  2. Ask the person for their usual daily pattern if you do not have it, as segments such as \`[{"clock_in":"09:00","clock_out":"14:00"},{"clock_in":"15:00","clock_out":"18:00"}]\`. Never invent hours; the record is a legal document of time actually worked.
139
- 3. \`log_range\` with \`start_on\`, \`end_on\`, \`segments\`, and usually \`jitter_minutes\` (5 to 10) and an \`observations\` note saying why the records are being entered now. The first call returns a **preview** and a \`confirmation_token\`; nothing is written. The preview skips weekends, bank holidays, approved leave, days the contract does not expect work, future dates, days without contract data, and any segment overlapping an existing shift.
264
+ 3. \`log_range\` with \`start_on\`, \`end_on\`, \`segments\`, and usually \`jitter_minutes\` (5 to 10) and an \`observations\` note saying why the records are being entered now. The first call returns a **preview** and a \`confirmation_token\`; nothing is written. The preview skips weekends, bank holidays, approved leave, days the contract does not expect work, future dates, days without contract data, signed-off days, and any segment overlapping an existing shift. Backfilled records show the real working day and hours on the attendance sheet; Factorial's activity log separately shows they were entered later through the API. Both are correct, and neither can be altered.
140
265
  4. Show the preview to the person and ask them to confirm. Only then repeat the identical call with \`confirmation_token\`. The token lasts 15 minutes and matches exactly that plan. A bulk write always needs this step; there is no way around it and you must not look for one.
141
- 5. Days the person did not work in the range (sick without a leave record, a day off) must be excluded: either narrow the range, or run \`log_range\` on the sub-ranges around them. Days worked outside the pattern (a Saturday, a half day) are written one by one with \`log_days\`, which takes explicit dates and segments and skips only future dates, approved leave and overlaps.
266
+ 5. Days the person did not work in the range (sick without a leave record, a day off) go in \`exclude_dates\`, which keeps the whole range as one call and shows the exclusions in the preview. Prefer this to narrowing the range or running sub-ranges. Days worked outside the pattern (a Saturday, a half day) are written with \`log_days\`, which takes explicit dates and segments.
142
267
  6. If the write stops part way, the result says where. Re-running the identical call is safe: the planner re-reads existing shifts and writes only what is still missing.
143
- 7. \`audit\` the same window again and report what changed. Every workday should now read \`complete\`.
268
+ 7. \`audit\` the same window again and report what changed. Every workday should now read \`complete\`. A day already signed off still reads whatever it read before; that is corrected only through \`create_edit_request\`, not by re-running the write.
144
269
 
145
270
  ## Workflow C: today's record (for a daily routine)
146
271
 
147
272
  1. \`status\` to see whether the employee is clocked in. If a shift is open, do not write; report it.
148
273
  2. \`audit\` with \`start_on\` and \`end_on\` both set to today. If the status for today is \`complete\`, \`weekend\`, \`bank_holiday\`, \`on_leave\` or \`not_workable\`, there is nothing to do; report in one line.
149
274
  3. If today is \`missing\`, \`log_days\` with \`days: [{"date": today, "segments": [...]}]\`, the person's stated pattern, and \`jitter_minutes\`. Then repeat the same call with the returned \`confirmation_token\` in the same session, only if the target is the configured identity (\`FACTORIAL_EMPLOYEE_ID\`). For anyone else, stop and ask.
150
- 4. Report in one line what was written or why nothing was.
275
+ 4. If today is \`short\` rather than \`missing\` (some hours are already on record, just not enough), write nothing; a person decides how to complete a partial day.
276
+ 5. Report in one line what was written or why nothing was.
151
277
 
152
278
  MCP has no scheduler. To run this daily, schedule it in the client: in Claude Code, \`/schedule\` creates a routine that invokes the \`attendance_today\` prompt, and \`/loop\` repeats it while a session is open; any cron can run \`claude -p\` with the prompt as its input.
153
279
 
280
+ ## Workflow D: reconcile against what you already know
281
+
282
+ 1. Gather the known absences the person can state from memory (days off, sick days, trips), as free text.
283
+ 2. \`attendance_reconcile\` runs the audit and reports only the days that disagree with that statement: a day with no hours the person did not mention, or a stated absence that shows as complete or over instead. Read-only.
284
+
285
+ ## Workflow E: log specific days out of pattern
286
+
287
+ 1. For dates that do not follow the regular daily pattern (a Saturday worked, a half day), state each date and its own segments.
288
+ 2. \`attendance_fill_days\` (or \`log_days\` directly) builds one call for the whole list, previewed and confirmed the same way as Workflow B.
289
+
154
290
  ## Rules that always apply
155
291
 
156
292
  - Never write hours for someone other than the person asking unless they name that employee explicitly; the tool requires a confirmation token for it, and so should you.
157
293
  - Never pass a \`confirmation_token\` without the person having seen the preview it belongs to, except in Workflow C for the configured identity.
158
294
  - Never delete or overwrite records to make an audit look right. Report discrepancies instead.
159
- - Prefer \`jitter_minutes\` when reconstructing approximate hours, so a month does not read 09:00 on every line. Records still carry \`source: "api"\`.
295
+ - \`jitter_minutes\` and \`variation_minutes\` exist to stop reconstructed records reading as a machine wrote them: identical timestamps on 40 consecutive days are obviously not a record of anything. They vary the minutes of hours the person tells you they worked. They are not a licence to invent days, or to guess at hours nobody stated. If you do not know what someone worked, ask; do not smooth it over with jitter.
296
+ - \`jitter_minutes\` varies segments within a day and cannot make the start time drift across days. \`variation_minutes\` moves a whole day together, which is what produces day-to-day drift. Use both when reconstructing a long stretch.
160
297
  - The records carry the \`observations\` note; write in it why they were entered (for example "Entered from calendar records on 2026-09-06").
161
298
  `;
162
299
  /**
163
- * Register the three attendance prompts and the guide resource on a server.
164
- * `deps.now` exists for tests; the server uses the wall clock.
300
+ * Register the five attendance prompts, the guide resource, and a resource
301
+ * per prompt publishing its procedure text, on a server. `deps.now` exists
302
+ * for tests; the server uses the wall clock.
165
303
  */
166
304
  export function registerAttendancePrompts(server, deps = {}) {
167
305
  const today = () => localToday((deps.now ?? (() => new Date()))());
168
306
  server.registerResource('registro_horario_guide', GUIDE_URI, {
169
307
  title: 'Registro horario guide',
170
308
  description: "How to audit, fill and maintain an employee's registro horario (attendance record) with " +
171
- 'the factorial_attendance tool: what the data means, the three workflows, and the rules.',
309
+ 'the factorial_attendance tool: what the data means, the five workflows, and the rules.',
172
310
  mimeType: 'text/markdown',
173
311
  }, uri => ({
174
312
  contents: [{ uri: uri.href, mimeType: 'text/markdown', text: REGISTRO_HORARIO_GUIDE }],
@@ -209,12 +347,9 @@ export function registerAttendancePrompts(server, deps = {}) {
209
347
  '',
210
348
  report,
211
349
  '',
212
- 'Do this:',
213
- '1. Read the Data read line. If it names days without contract data that are not before the start of employment, say so first and treat the audit as unreliable.',
214
- '2. Report expected vs tracked hours for the window and the count of days per status.',
215
- '3. List every missing day with the hours missing on it, grouped by month. List over days. Mention half_day_leave days whose worked half has no record.',
216
- '4. If nothing needs attention, say so in one line.',
217
- '5. Write nothing. This is a read-only report. If the person then wants to fill the gaps, use the attendance_fill prompt or follow Workflow B in the guide (' +
350
+ AUDIT_PROCEDURE,
351
+ '',
352
+ 'If the person then wants to fill the gaps, use the attendance_fill prompt or follow Workflow B in the guide (' +
218
353
  GUIDE_URI +
219
354
  ').',
220
355
  '',
@@ -244,14 +379,23 @@ export function registerAttendancePrompts(server, deps = {}) {
244
379
  jitter_minutes: z
245
380
  .string()
246
381
  .optional()
247
- .describe('Vary each time by up to this many minutes (default 8, 0 for exact times)'),
382
+ .describe('Vary each time within a day by up to this many minutes (default 8, 0 for exact ' +
383
+ 'times). Varies segments within a day; it cannot make the start time drift across ' +
384
+ 'days, which is what variation_minutes is for.'),
385
+ variation_minutes: z
386
+ .string()
387
+ .optional()
388
+ .describe('Shift each whole day by up to this many minutes, so the start time drifts from day ' +
389
+ 'to day (default 0, no drift). Use together with jitter_minutes when reconstructing ' +
390
+ 'a long stretch: jitter varies segments within a day, this varies the day as a whole.'),
248
391
  },
249
- }, async ({ segments, start_on, end_on, employee_id, observations, jitter_minutes }) => {
392
+ }, async ({ segments, start_on, end_on, employee_id, observations, jitter_minutes, variation_minutes, }) => {
250
393
  const employeeId = resolveTargetEmployeeId(parseOptionalInt(employee_id, 'employee_id'));
251
394
  const name = await resolveEmployeeName(employeeId);
252
395
  const window = resolveWindow(start_on, end_on, today());
253
396
  const pattern = parseSegmentsArg(segments);
254
397
  const jitter = parseOptionalInt(jitter_minutes, 'jitter_minutes') ?? 8;
398
+ const variation = parseOptionalInt(variation_minutes, 'variation_minutes') ?? 0;
255
399
  const note = observations && observations.trim() !== ''
256
400
  ? observations.trim()
257
401
  : `Entered with the daily pattern on ${today()}`;
@@ -272,6 +416,7 @@ export function registerAttendancePrompts(server, deps = {}) {
272
416
  end_on: window.end_on,
273
417
  segments: pattern,
274
418
  jitter_minutes: jitter,
419
+ variation_minutes: variation,
275
420
  observations: note,
276
421
  };
277
422
  return userMessage([
@@ -281,14 +426,10 @@ export function registerAttendancePrompts(server, deps = {}) {
281
426
  '',
282
427
  gapsReport,
283
428
  '',
284
- 'Do this, in order:',
285
- '1. Read the Data read line. If it names days without contract data that are not before the start of employment, stop and report; do not write.',
286
- '2. Tell the person which days are short and ask whether any of them were not worked (illness without a leave record, a day off). Exclude such days by narrowing the range or by running the call on the sub-ranges around them. Never invent hours.',
287
- `3. Preview the write. Nothing is written by this call: ${toolCall(rangeCall)}`,
288
- '4. Show the person the preview: how many days and records, the hours, and every skipped day with its reason. Ask them to confirm.',
289
- '5. Only after they confirm, repeat exactly the same call adding the confirmation_token from the preview. The token lasts 15 minutes and matches only that plan. If it expired, run the preview again.',
290
- '6. If the result says the write stopped part way, re-run the identical call; the planner writes only what is still missing.',
291
- `7. Verify: ${toolCall({ action: 'audit', employee_id: employeeId, start_on: window.start_on, end_on: window.end_on })} and report what changed. Every workday should read complete.`,
429
+ FILL_PROCEDURE,
430
+ '',
431
+ `Preview call: ${toolCall(rangeCall)}`,
432
+ `Verify call: ${toolCall({ action: 'audit', employee_id: employeeId, start_on: window.start_on, end_on: window.end_on })}`,
292
433
  '',
293
434
  'For days worked outside the pattern (a Saturday, a half day next to half-day leave), write them one by one with action log_days, for example ' +
294
435
  toolCall({
@@ -334,7 +475,7 @@ export function registerAttendancePrompts(server, deps = {}) {
334
475
  ? `, shifts on record ${row.shifts.map(s => `${s.clock_in}-${s.clock_out ?? 'open'}`).join(' ')}`
335
476
  : ', no shifts on record') +
336
477
  `.\n${ledgerRow(row)}\n` +
337
- `Data read: contract data for ${coverage.days_with_contract_data} of 1 day, ${coverage.leave_records} leave records, ${coverage.shift_records} shift records.`);
478
+ formatCoverage(coverage));
338
479
  });
339
480
  const daysCall = {
340
481
  action: 'log_days',
@@ -350,17 +491,133 @@ export function registerAttendancePrompts(server, deps = {}) {
350
491
  '',
351
492
  todayReport,
352
493
  '',
353
- 'Decide as follows:',
354
- `1. ${toolCall({ action: 'status', employee_id: employeeId })}. If the employee is clocked in (an open shift), write nothing and report that a shift is open.`,
355
- '2. If the status above is complete, weekend, bank_holiday, on_leave, not_workable or future, write nothing and report in one line why.',
356
- '3. If the status is no_contract_data, write nothing and report that Factorial has no contract data for today.',
357
- '4. If the status is half_day_leave, write nothing and report it; the worked half needs a person to say which half it was.',
358
- `5. If the status is missing and no shift is on record, preview the write: ${toolCall(daysCall)}. Then, in this same session, repeat the identical call adding the confirmation_token from the preview. This unattended confirmation is allowed only when the employee is the configured identity (FACTORIAL_EMPLOYEE_ID)${explicit !== undefined ? '; an explicit employee_id was given, so confirm that it is the configured identity before proceeding, and otherwise stop and ask' : ''}.`,
359
- '6. If the status is missing but a shift is already on record for today, write nothing and report the partial day; a person decides how to complete it.',
360
- `7. Verify with ${toolCall({ action: 'audit', employee_id: employeeId, start_on: date, end_on: date })} and report in one line what was written or why nothing was.`,
494
+ TODAY_PROCEDURE,
495
+ '',
496
+ `Status call: ${toolCall({ action: 'status', employee_id: employeeId })}`,
497
+ `Preview call for a missing day with no shift on record: ${toolCall(daysCall)}. The confirmation_token from that preview is reused in the identical call, in this same session, only when the employee is the configured identity (FACTORIAL_EMPLOYEE_ID)${explicit !== undefined ? '; an explicit employee_id was given, so confirm that it is the configured identity before proceeding, and otherwise stop and ask' : ''}.`,
498
+ `Verify call: ${toolCall({ action: 'audit', employee_id: employeeId, start_on: date, end_on: date })}`,
361
499
  '',
362
500
  `Full guide: ${GUIDE_URI}`,
363
501
  ].join('\n'));
364
502
  });
503
+ server.registerPrompt('attendance_reconcile', {
504
+ title: 'Reconcile registro horario against known absences',
505
+ description: "Audit an employee's registro horario for a window and list only the days that disagree " +
506
+ 'with a stated list of known absences. Read-only.',
507
+ argsSchema: {
508
+ known_absences: z
509
+ .string()
510
+ .describe('Free text: the days off, sick days and trips you already know about'),
511
+ start_on: z
512
+ .string()
513
+ .optional()
514
+ .describe('Start date YYYY-MM-DD (default: 1st of this month)'),
515
+ end_on: z.string().optional().describe('End date YYYY-MM-DD (default: today)'),
516
+ employee_id: z.string().optional().describe('Employee ID (default: FACTORIAL_EMPLOYEE_ID)'),
517
+ },
518
+ }, async ({ known_absences, start_on, end_on, employee_id }) => {
519
+ const employeeId = resolveTargetEmployeeId(parseOptionalInt(employee_id, 'employee_id'));
520
+ const name = await resolveEmployeeName(employeeId);
521
+ const window = resolveWindow(start_on, end_on, today());
522
+ const report = await preRead('the audit', async () => {
523
+ const { ledger, coverage } = await buildLedger(employeeId, window.start_on, window.end_on);
524
+ return formatAudit({
525
+ employee: { id: employeeId, name },
526
+ startOn: window.start_on,
527
+ endOn: window.end_on,
528
+ ledger,
529
+ coverage,
530
+ toleranceMinutes: DEFAULT_TOLERANCE_MINUTES,
531
+ format: 'summary',
532
+ });
533
+ });
534
+ return userMessage([
535
+ `Reconcile the registro horario of ${name} (${employeeId}) from ${window.start_on} to ${window.end_on} against what is already known.`,
536
+ '',
537
+ 'Known absences, as stated by the person:',
538
+ known_absences,
539
+ '',
540
+ 'The audit has already been run for you:',
541
+ '',
542
+ report,
543
+ '',
544
+ RECONCILE_PROCEDURE,
545
+ '',
546
+ STATUS_LEGEND,
547
+ ].join('\n'));
548
+ });
549
+ server.registerPrompt('attendance_fill_days', {
550
+ title: 'Log specific registro horario days',
551
+ description: 'Enter registro horario for a list of explicit dates, each with its own daily pattern (a ' +
552
+ 'Saturday worked, a half day), as one log_days call through a preview the person confirms. ' +
553
+ 'Defaults to FACTORIAL_EMPLOYEE_ID.',
554
+ argsSchema: {
555
+ days: z
556
+ .string()
557
+ .describe('JSON array of explicit days: [{"date":"2026-03-02","segments":"09:00-14:00, 15:00-18:00"}, ...]'),
558
+ employee_id: z.string().optional().describe('Employee ID (default: FACTORIAL_EMPLOYEE_ID)'),
559
+ observations: z
560
+ .string()
561
+ .optional()
562
+ .describe('Note stored on every record, e.g. why the hours are being entered now'),
563
+ jitter_minutes: z
564
+ .string()
565
+ .optional()
566
+ .describe('Vary each time by up to this many minutes (default 8, 0 for exact times)'),
567
+ },
568
+ }, async ({ days, employee_id, observations, jitter_minutes }) => {
569
+ const entries = parseDaysArg(days);
570
+ const employeeId = resolveTargetEmployeeId(parseOptionalInt(employee_id, 'employee_id'));
571
+ const name = await resolveEmployeeName(employeeId);
572
+ const jitter = parseOptionalInt(jitter_minutes, 'jitter_minutes') ?? 8;
573
+ const note = observations && observations.trim() !== ''
574
+ ? observations.trim()
575
+ : `Entered from explicit days on ${today()}`;
576
+ const dates = entries.map(e => e.date).sort();
577
+ const rangeStart = dates[0];
578
+ const rangeEnd = dates[dates.length - 1];
579
+ const report = await preRead('the requested days', async () => {
580
+ const { ledger, coverage } = await buildLedger(employeeId, rangeStart, rangeEnd);
581
+ const rows = ledger
582
+ .filter(d => dates.includes(d.date))
583
+ .map(ledgerRow)
584
+ .join('\n');
585
+ return `${formatCoverage(coverage)}\n${rows}`;
586
+ });
587
+ const daysCall = {
588
+ action: 'log_days',
589
+ employee_id: employeeId,
590
+ days: entries.map(e => ({ date: e.date, segments: e.segments })),
591
+ jitter_minutes: jitter,
592
+ observations: note,
593
+ };
594
+ return userMessage([
595
+ `Log explicit registro horario days for ${name} (${employeeId}): ${dates.join(', ')}.`,
596
+ '',
597
+ 'The status of each requested day has already been read for you:',
598
+ '',
599
+ report,
600
+ '',
601
+ FILL_DAYS_PROCEDURE,
602
+ '',
603
+ `Preview call: ${toolCall(daysCall)}`,
604
+ `Verify call: ${toolCall({ action: 'audit', employee_id: employeeId, start_on: rangeStart, end_on: rangeEnd })}`,
605
+ '',
606
+ STATUS_LEGEND,
607
+ '',
608
+ `Full guide: ${GUIDE_URI}`,
609
+ ].join('\n'));
610
+ });
611
+ // A prompt is invisible to the model in some clients: Claude Code surfaces
612
+ // them to the human as slash commands only, and offers no way to read one.
613
+ // The same procedure as a resource is readable by the party that has to
614
+ // follow it.
615
+ for (const [name, body] of PROMPT_BODIES) {
616
+ server.registerResource(`prompt_${name}`, `factorial://prompts/${name}`, {
617
+ title: `Procedure: ${name}`,
618
+ description: `The steps the ${name} prompt lays out, readable without invoking it.`,
619
+ mimeType: 'text/markdown',
620
+ }, uri => ({ contents: [{ uri: uri.href, mimeType: 'text/markdown', text: body }] }));
621
+ }
365
622
  }
366
623
  //# sourceMappingURL=attendance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"attendance.js","sourceRoot":"","sources":["../../src/prompts/attendance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EACL,yBAAyB,EACzB,KAAK,EACL,gBAAgB,GAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE7E,MAAM,CAAC,MAAM,SAAS,GAAG,qCAAqC,CAAC;AAE/D,MAAM,OAAO,GAAG,mDAAmD,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,I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