@knpkv/jcf-web 0.2.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 (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +315 -0
  3. package/dist/client/assets/AgentSettingsPanel-NhTzwiq6.js +1 -0
  4. package/dist/client/assets/Schema-DUFTUil2.js +2 -0
  5. package/dist/client/assets/UrlParams-ZN2s8OM_.js +6 -0
  6. package/dist/client/assets/agentSettings-nw9lCgBQ.js +1 -0
  7. package/dist/client/assets/api-BQCWhiKV.js +4 -0
  8. package/dist/client/assets/decoding-CebF86HD.js +1 -0
  9. package/dist/client/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  10. package/dist/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  11. package/dist/client/assets/index-Ch0W9DhA.css +1 -0
  12. package/dist/client/assets/index-N2vhoKYl.js +51 -0
  13. package/dist/client/assets/rolldown-runtime-hePW80VL.js +1 -0
  14. package/dist/client/assets/transport-AcByYfLh.js +1 -0
  15. package/dist/client/index.html +19 -0
  16. package/dist/index.d.ts +11 -0
  17. package/dist/index.js +12 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/main.d.ts +2 -0
  20. package/dist/main.js +32 -0
  21. package/dist/main.js.map +1 -0
  22. package/dist/server/Api.d.ts +789 -0
  23. package/dist/server/Api.js +98 -0
  24. package/dist/server/Api.js.map +1 -0
  25. package/dist/server/Confirm.d.ts +94 -0
  26. package/dist/server/Confirm.js +243 -0
  27. package/dist/server/Confirm.js.map +1 -0
  28. package/dist/server/Handlers.d.ts +14 -0
  29. package/dist/server/Handlers.js +157 -0
  30. package/dist/server/Handlers.js.map +1 -0
  31. package/dist/server/HttpApplication.d.ts +7 -0
  32. package/dist/server/HttpApplication.js +62 -0
  33. package/dist/server/HttpApplication.js.map +1 -0
  34. package/dist/server/OwnerSession.d.ts +62 -0
  35. package/dist/server/OwnerSession.js +219 -0
  36. package/dist/server/OwnerSession.js.map +1 -0
  37. package/dist/server/RowDescriptions.d.ts +19 -0
  38. package/dist/server/RowDescriptions.js +42 -0
  39. package/dist/server/RowDescriptions.js.map +1 -0
  40. package/dist/server/SavedEntryOperations.d.ts +27 -0
  41. package/dist/server/SavedEntryOperations.js +171 -0
  42. package/dist/server/SavedEntryOperations.js.map +1 -0
  43. package/dist/server/Server.d.ts +13 -0
  44. package/dist/server/Server.js +29 -0
  45. package/dist/server/Server.js.map +1 -0
  46. package/dist/server/WeekPlan.d.ts +110 -0
  47. package/dist/server/WeekPlan.js +258 -0
  48. package/dist/server/WeekPlan.js.map +1 -0
  49. package/dist/server/WeekPlans.d.ts +30 -0
  50. package/dist/server/WeekPlans.js +190 -0
  51. package/dist/server/WeekPlans.js.map +1 -0
  52. package/dist/server/WeekRead.d.ts +435 -0
  53. package/dist/server/WeekRead.js +189 -0
  54. package/dist/server/WeekRead.js.map +1 -0
  55. package/dist/shared/contracts.d.ts +901 -0
  56. package/dist/shared/contracts.js +365 -0
  57. package/dist/shared/contracts.js.map +1 -0
  58. package/dist/shared/writePlanning.d.ts +6 -0
  59. package/dist/shared/writePlanning.js +19 -0
  60. package/dist/shared/writePlanning.js.map +1 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -0
  62. package/package.json +60 -0
@@ -0,0 +1,901 @@
1
+ /**
2
+ * The HTTP contract of the week view.
3
+ *
4
+ * **Mental model**
5
+ *
6
+ * - **Reads and reviewed writes.** `week` shows what each system holds, what the sessions say is
7
+ * missing, and what could not be placed. Description suggestions reuse that scan's evidence;
8
+ * confirmation, manual entry and saved-entry update requests write provider time.
9
+ * - **The server owns expected state.** Confirmations name retained row evidence. Saved-entry edits
10
+ * name a retained provider entry; the engine rechecks that snapshot before updating it.
11
+ * - **Edits are explicit.** Confirmations may override amount, Issue Key and note. Saved-entry edits
12
+ * change time and exact description. Generating a description never saves it.
13
+ *
14
+ * @module
15
+ */
16
+ import { Schema } from "effect";
17
+ /** A local calendar day, `YYYY-MM-DD` — the unit every bucket in jcf is keyed by. */
18
+ export declare const Day: Schema.String;
19
+ /**
20
+ * An Issue Key as Jira writes them. Checked here as well as in the engine so a malformed override
21
+ * is refused at the boundary, before it can become a Clockify description nothing can read back.
22
+ */
23
+ export declare const TicketKey: Schema.String;
24
+ /** Seconds of work: whole, positive, and under a day. */
25
+ export declare const WorkSeconds: Schema.Number;
26
+ /** Free text a person typed, bounded so a description cannot be used to write a novel into Jira. */
27
+ export declare const Note: Schema.String;
28
+ /** Request a row-level note from the scan's retained evidence, without reading sessions again. */
29
+ export declare const DescribeRowRequest: Schema.Struct<{
30
+ readonly planId: Schema.String;
31
+ readonly rowId: Schema.String;
32
+ }>;
33
+ export interface DescribeRowRequest extends Schema.Schema.Type<typeof DescribeRowRequest> {
34
+ }
35
+ /** A suggestion for review, never an instruction to write it to a provider. */
36
+ export declare const DescribeRowResponse: Schema.Struct<{
37
+ readonly planId: Schema.String;
38
+ readonly rowId: Schema.String;
39
+ readonly note: Schema.NullOr<Schema.String>;
40
+ }>;
41
+ export interface DescribeRowResponse extends Schema.Schema.Type<typeof DescribeRowResponse> {
42
+ }
43
+ /** Whole provider entry, retained on every visible slice. Description includes provider prefixes. */
44
+ export declare const SavedEntry: Schema.Struct<{
45
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
46
+ readonly revision: Schema.String;
47
+ readonly id: Schema.String;
48
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
49
+ readonly ticketKey: Schema.NullOr<Schema.String>;
50
+ readonly startMs: Schema.Number;
51
+ readonly endMs: Schema.Number;
52
+ readonly description: Schema.NullOr<Schema.String>;
53
+ }>;
54
+ export interface SavedEntry extends Schema.Schema.Type<typeof SavedEntry> {
55
+ }
56
+ export declare const DescribeSavedEntryRequest: Schema.Struct<{
57
+ readonly planId: Schema.String;
58
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
59
+ readonly entryId: Schema.String;
60
+ }>;
61
+ export interface DescribeSavedEntryRequest extends Schema.Schema.Type<typeof DescribeSavedEntryRequest> {
62
+ }
63
+ export declare const DescribeSavedEntryResponse: Schema.Struct<{
64
+ readonly planId: Schema.String;
65
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
66
+ readonly entryId: Schema.String;
67
+ readonly note: Schema.NullOr<Schema.String>;
68
+ readonly sessionCount: Schema.Number;
69
+ }>;
70
+ export interface DescribeSavedEntryResponse extends Schema.Schema.Type<typeof DescribeSavedEntryResponse> {
71
+ }
72
+ /** Server resolves the expected entry; the client can change only its interval and exact description. */
73
+ export declare const UpdateSavedEntryRequest: Schema.Struct<{
74
+ readonly planId: Schema.String;
75
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
76
+ readonly entryId: Schema.String;
77
+ readonly revision: Schema.String;
78
+ readonly startMs: Schema.Number;
79
+ readonly endMs: Schema.Number;
80
+ readonly description: Schema.String;
81
+ }>;
82
+ export interface UpdateSavedEntryRequest extends Schema.Schema.Type<typeof UpdateSavedEntryRequest> {
83
+ }
84
+ export declare const UpdateSavedEntryResponse: Schema.Struct<{
85
+ readonly planId: Schema.String;
86
+ readonly entry: Schema.Struct<{
87
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
88
+ readonly revision: Schema.String;
89
+ readonly id: Schema.String;
90
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
91
+ readonly ticketKey: Schema.NullOr<Schema.String>;
92
+ readonly startMs: Schema.Number;
93
+ readonly endMs: Schema.Number;
94
+ readonly description: Schema.NullOr<Schema.String>;
95
+ }>;
96
+ }>;
97
+ export interface UpdateSavedEntryResponse extends Schema.Schema.Type<typeof UpdateSavedEntryResponse> {
98
+ }
99
+ declare const ApiError_base: Schema.Class<ApiError, Schema.TaggedStruct<"ApiError", {
100
+ readonly message: Schema.String;
101
+ }>, import("effect/Cause").YieldableError>;
102
+ export declare class ApiError extends ApiError_base {
103
+ }
104
+ declare const UnauthorizedApiError_base: Schema.Class<UnauthorizedApiError, Schema.TaggedStruct<"UnauthorizedApiError", {
105
+ readonly message: Schema.String;
106
+ }>, import("effect/Cause").YieldableError>;
107
+ export declare class UnauthorizedApiError extends UnauthorizedApiError_base {
108
+ }
109
+ declare const ForbiddenApiError_base: Schema.Class<ForbiddenApiError, Schema.TaggedStruct<"ForbiddenApiError", {
110
+ readonly message: Schema.String;
111
+ }>, import("effect/Cause").YieldableError>;
112
+ export declare class ForbiddenApiError extends ForbiddenApiError_base {
113
+ }
114
+ declare const PlanExpiredError_base: Schema.Class<PlanExpiredError, Schema.TaggedStruct<"PlanExpiredError", {
115
+ readonly message: Schema.String;
116
+ }>, import("effect/Cause").YieldableError>;
117
+ /**
118
+ * The plan a confirmation names is gone, or the row in it is.
119
+ *
120
+ * Separate from a rejected write because the repair is different and the browser can do it without
121
+ * asking anyone: re-read the week and offer the row again.
122
+ */
123
+ export declare class PlanExpiredError extends PlanExpiredError_base {
124
+ }
125
+ declare const ProposalRejectedError_base: Schema.Class<ProposalRejectedError, Schema.TaggedStruct<"ProposalRejectedError", {
126
+ readonly message: Schema.String;
127
+ readonly maxSeconds: Schema.optional<Schema.Number>;
128
+ }>, import("effect/Cause").YieldableError>;
129
+ /**
130
+ * The write was refused on its own terms — an amount past what the evidence supports, an Issue Key
131
+ * the engine will not write. `maxSeconds` is present when a cap is what refused it, so the browser
132
+ * can say what the ceiling is rather than only that there is one.
133
+ */
134
+ export declare class ProposalRejectedError extends ProposalRejectedError_base {
135
+ }
136
+ /**
137
+ * One stretch of credited work: when it happened, and what it is worth.
138
+ *
139
+ * Epoch milliseconds because the browser draws these on a grid, and `seconds` because a block is
140
+ * what a person accepts on its own — `seconds` is its share of the row, which on time worked in
141
+ * parallel is less than the interval it spans.
142
+ */
143
+ export declare const ProposalBlock: Schema.Struct<{
144
+ /** Normalized seconds this source block already supplied to each provider, including corrected-ticket writes. */
145
+ readonly consumed: Schema.Struct<{
146
+ readonly clockify: Schema.Number;
147
+ readonly jira: Schema.Number;
148
+ }>;
149
+ /** A provider-specific safety hold, never a consumed-seconds estimate. */
150
+ readonly clockifyRefusal: Schema.optionalKey<Schema.Literal<"unlinked-overlap">>;
151
+ readonly endMs: Schema.Number;
152
+ readonly seconds: Schema.Number;
153
+ readonly startMs: Schema.Number;
154
+ /** Stable source-cluster identity; rendered starts may move as overlapping work grows. */
155
+ readonly sourceStartMs: Schema.optional<Schema.Number>;
156
+ }>;
157
+ /** Which evidence placed a row on its Issue Key. */
158
+ export declare const AttributionSignal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
159
+ /**
160
+ * Which systems a week is about.
161
+ *
162
+ * One name rather than two booleans in the query string, because "neither" is not a week anyone
163
+ * asked for. A side that is out is not read, not proposed for, and not written to — so a week with
164
+ * `only=jira` never touches Clockify at all.
165
+ */
166
+ export declare const WeekScope: Schema.Literals<readonly ["both", "clockify", "jira"]>;
167
+ /** Which systems a single write may touch. Defaults to the scope the week was read under. */
168
+ export declare const WriteTargets: Schema.Struct<{
169
+ readonly clockify: Schema.Boolean;
170
+ readonly jira: Schema.Boolean;
171
+ }>;
172
+ /** When recorded time happened, and which system says so. */
173
+ export declare const RecordedInterval: Schema.Struct<{
174
+ readonly entry: Schema.optionalKey<Schema.Struct<{
175
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
176
+ readonly revision: Schema.String;
177
+ readonly id: Schema.String;
178
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
179
+ readonly ticketKey: Schema.NullOr<Schema.String>;
180
+ readonly startMs: Schema.Number;
181
+ readonly endMs: Schema.Number;
182
+ readonly description: Schema.NullOr<Schema.String>;
183
+ }>>;
184
+ readonly endMs: Schema.Number;
185
+ readonly source: Schema.Literals<readonly ["clockify", "jira"]>;
186
+ readonly startMs: Schema.Number;
187
+ }>;
188
+ /**
189
+ * What a row's sessions say, and what accepting it would write.
190
+ *
191
+ * `maxSeconds` is the credited evidence: the ceiling on an edited amount. Editing below it is a
192
+ * person saying the evidence overstates the work; editing above it would be the tool inventing
193
+ * hours, which is the one thing every rule here exists to prevent.
194
+ */
195
+ export declare const RowProposal: Schema.Struct<{
196
+ readonly activeSeconds: Schema.Number;
197
+ /**
198
+ * The stretches behind this row, ascending. They sum to `maxSeconds`, and a confirmation may name
199
+ * a subset of them by position — which is how a morning gets written without the afternoon.
200
+ */
201
+ readonly blocks: Schema.$Array<Schema.Struct<{
202
+ /** Normalized seconds this source block already supplied to each provider, including corrected-ticket writes. */
203
+ readonly consumed: Schema.Struct<{
204
+ readonly clockify: Schema.Number;
205
+ readonly jira: Schema.Number;
206
+ }>;
207
+ /** A provider-specific safety hold, never a consumed-seconds estimate. */
208
+ readonly clockifyRefusal: Schema.optionalKey<Schema.Literal<"unlinked-overlap">>;
209
+ readonly endMs: Schema.Number;
210
+ readonly seconds: Schema.Number;
211
+ readonly startMs: Schema.Number;
212
+ /** Stable source-cluster identity; rendered starts may move as overlapping work grows. */
213
+ readonly sourceStartMs: Schema.optional<Schema.Number>;
214
+ }>>;
215
+ readonly clockifyDelta: Schema.Number;
216
+ readonly confidence: Schema.NullOr<Schema.Number>;
217
+ readonly jiraDelta: Schema.Number;
218
+ readonly maxSeconds: Schema.Number;
219
+ readonly sessionCount: Schema.Number;
220
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
221
+ }>;
222
+ /**
223
+ * One `(Issue Key, day)` cell of the week.
224
+ *
225
+ * Rows exist for time that is only recorded, only evidenced, or both — a day tracked with a Timer
226
+ * has no proposal, and a day nobody logged has no allocated seconds. Which is the point of showing
227
+ * them together.
228
+ */
229
+ export declare const WeekRow: Schema.Struct<{
230
+ readonly clockifyDescription: Schema.NullOr<Schema.String>;
231
+ readonly clockifySeconds: Schema.Number;
232
+ readonly day: Schema.String;
233
+ /**
234
+ * When the recorded time happened — the entries behind the totals, so a week can be drawn as a
235
+ * calendar. Empty when the systems reported no usable interval, never fabricated from the total.
236
+ */
237
+ readonly intervals: Schema.$Array<Schema.Struct<{
238
+ readonly entry: Schema.optionalKey<Schema.Struct<{
239
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
240
+ readonly revision: Schema.String;
241
+ readonly id: Schema.String;
242
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
243
+ readonly ticketKey: Schema.NullOr<Schema.String>;
244
+ readonly startMs: Schema.Number;
245
+ readonly endMs: Schema.Number;
246
+ readonly description: Schema.NullOr<Schema.String>;
247
+ }>>;
248
+ readonly endMs: Schema.Number;
249
+ readonly source: Schema.Literals<readonly ["clockify", "jira"]>;
250
+ readonly startMs: Schema.Number;
251
+ }>>;
252
+ readonly jiraSeconds: Schema.Number;
253
+ readonly proposal: Schema.optional<Schema.Struct<{
254
+ readonly activeSeconds: Schema.Number;
255
+ /**
256
+ * The stretches behind this row, ascending. They sum to `maxSeconds`, and a confirmation may name
257
+ * a subset of them by position — which is how a morning gets written without the afternoon.
258
+ */
259
+ readonly blocks: Schema.$Array<Schema.Struct<{
260
+ /** Normalized seconds this source block already supplied to each provider, including corrected-ticket writes. */
261
+ readonly consumed: Schema.Struct<{
262
+ readonly clockify: Schema.Number;
263
+ readonly jira: Schema.Number;
264
+ }>;
265
+ /** A provider-specific safety hold, never a consumed-seconds estimate. */
266
+ readonly clockifyRefusal: Schema.optionalKey<Schema.Literal<"unlinked-overlap">>;
267
+ readonly endMs: Schema.Number;
268
+ readonly seconds: Schema.Number;
269
+ readonly startMs: Schema.Number;
270
+ /** Stable source-cluster identity; rendered starts may move as overlapping work grows. */
271
+ readonly sourceStartMs: Schema.optional<Schema.Number>;
272
+ }>>;
273
+ readonly clockifyDelta: Schema.Number;
274
+ readonly confidence: Schema.NullOr<Schema.Number>;
275
+ readonly jiraDelta: Schema.Number;
276
+ readonly maxSeconds: Schema.Number;
277
+ readonly sessionCount: Schema.Number;
278
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
279
+ }>>;
280
+ readonly rowId: Schema.String;
281
+ readonly ticketKey: Schema.String;
282
+ /**
283
+ * The issue title, or null when Jira could not be asked — logged out, unreachable, or out of
284
+ * scope for this week. Null is "unknown", never "untitled": an Issue Key alone is a lookup nobody
285
+ * can do six months later, so it is worth saying when it is missing.
286
+ */
287
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
288
+ }>;
289
+ /** Hours that happened on a day and no signal could place, with the directories behind them. */
290
+ export declare const UnattributedDay: Schema.Struct<{
291
+ readonly cwds: Schema.$Array<Schema.String>;
292
+ readonly day: Schema.String;
293
+ readonly seconds: Schema.Number;
294
+ readonly sessionCount: Schema.Number;
295
+ }>;
296
+ /** Attributed by a Coding Agent below the confidence floor: shown so the hours stay visible. */
297
+ export declare const WithheldRow: Schema.Struct<{
298
+ readonly confidence: Schema.NullOr<Schema.Number>;
299
+ readonly day: Schema.String;
300
+ readonly seconds: Schema.Number;
301
+ readonly ticketKey: Schema.String;
302
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
303
+ }>;
304
+ /**
305
+ * Hours a signal placed on a ticket Jira says belongs to somebody else.
306
+ *
307
+ * Reported rather than proposed, and reported rather than dropped: a branch cannot tell authoring
308
+ * from reviewing, so this is usually a pull request you read — and occasionally your own work on a
309
+ * colleague's ticket, which is what `assignee` and the override are for.
310
+ */
311
+ export declare const NotMineRow: Schema.Struct<{
312
+ /** Who Jira says owns it, or null when it is unassigned. */
313
+ readonly assignee: Schema.NullOr<Schema.String>;
314
+ readonly day: Schema.String;
315
+ readonly seconds: Schema.Number;
316
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
317
+ readonly ticketKey: Schema.String;
318
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
319
+ }>;
320
+ /** A day withheld from proposals, with the reason, so it never reads as "nothing to log". */
321
+ export declare const ExcludedDay: Schema.Struct<{
322
+ readonly day: Schema.String;
323
+ readonly reason: Schema.String;
324
+ }>;
325
+ export declare const WeekPlan: Schema.Struct<{
326
+ /**
327
+ * True when a Coding Agent was needed and could not be reached. The deterministic rows are still
328
+ * complete; what is missing is only the placement of sessions no branch or path could place.
329
+ */
330
+ readonly attributorAvailable: Schema.Boolean;
331
+ readonly attributorCalls: Schema.Number;
332
+ readonly days: Schema.$Array<Schema.String>;
333
+ readonly excludedDays: Schema.$Array<Schema.Struct<{
334
+ readonly day: Schema.String;
335
+ readonly reason: Schema.String;
336
+ }>>;
337
+ readonly monday: Schema.String;
338
+ /** Names the server-held evidence a confirmation refers to. */
339
+ readonly planId: Schema.String;
340
+ readonly rows: Schema.$Array<Schema.Struct<{
341
+ readonly clockifyDescription: Schema.NullOr<Schema.String>;
342
+ readonly clockifySeconds: Schema.Number;
343
+ readonly day: Schema.String;
344
+ /**
345
+ * When the recorded time happened — the entries behind the totals, so a week can be drawn as a
346
+ * calendar. Empty when the systems reported no usable interval, never fabricated from the total.
347
+ */
348
+ readonly intervals: Schema.$Array<Schema.Struct<{
349
+ readonly entry: Schema.optionalKey<Schema.Struct<{
350
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
351
+ readonly revision: Schema.String;
352
+ readonly id: Schema.String;
353
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
354
+ readonly ticketKey: Schema.NullOr<Schema.String>;
355
+ readonly startMs: Schema.Number;
356
+ readonly endMs: Schema.Number;
357
+ readonly description: Schema.NullOr<Schema.String>;
358
+ }>>;
359
+ readonly endMs: Schema.Number;
360
+ readonly source: Schema.Literals<readonly ["clockify", "jira"]>;
361
+ readonly startMs: Schema.Number;
362
+ }>>;
363
+ readonly jiraSeconds: Schema.Number;
364
+ readonly proposal: Schema.optional<Schema.Struct<{
365
+ readonly activeSeconds: Schema.Number;
366
+ /**
367
+ * The stretches behind this row, ascending. They sum to `maxSeconds`, and a confirmation may name
368
+ * a subset of them by position — which is how a morning gets written without the afternoon.
369
+ */
370
+ readonly blocks: Schema.$Array<Schema.Struct<{
371
+ /** Normalized seconds this source block already supplied to each provider, including corrected-ticket writes. */
372
+ readonly consumed: Schema.Struct<{
373
+ readonly clockify: Schema.Number;
374
+ readonly jira: Schema.Number;
375
+ }>;
376
+ /** A provider-specific safety hold, never a consumed-seconds estimate. */
377
+ readonly clockifyRefusal: Schema.optionalKey<Schema.Literal<"unlinked-overlap">>;
378
+ readonly endMs: Schema.Number;
379
+ readonly seconds: Schema.Number;
380
+ readonly startMs: Schema.Number;
381
+ /** Stable source-cluster identity; rendered starts may move as overlapping work grows. */
382
+ readonly sourceStartMs: Schema.optional<Schema.Number>;
383
+ }>>;
384
+ readonly clockifyDelta: Schema.Number;
385
+ readonly confidence: Schema.NullOr<Schema.Number>;
386
+ readonly jiraDelta: Schema.Number;
387
+ readonly maxSeconds: Schema.Number;
388
+ readonly sessionCount: Schema.Number;
389
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
390
+ }>>;
391
+ readonly rowId: Schema.String;
392
+ readonly ticketKey: Schema.String;
393
+ /**
394
+ * The issue title, or null when Jira could not be asked — logged out, unreachable, or out of
395
+ * scope for this week. Null is "unknown", never "untitled": an Issue Key alone is a lookup nobody
396
+ * can do six months later, so it is worth saying when it is missing.
397
+ */
398
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
399
+ }>>;
400
+ /** Closed Clockify entries without a ticket, excluded from ticket reconciliation. */
401
+ readonly unlinkedClockify: Schema.$Array<Schema.Struct<{
402
+ readonly entry: Schema.optionalKey<Schema.Struct<{
403
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
404
+ readonly revision: Schema.String;
405
+ readonly id: Schema.String;
406
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
407
+ readonly ticketKey: Schema.NullOr<Schema.String>;
408
+ readonly startMs: Schema.Number;
409
+ readonly endMs: Schema.Number;
410
+ readonly description: Schema.NullOr<Schema.String>;
411
+ }>>;
412
+ readonly day: Schema.String;
413
+ readonly seconds: Schema.Number;
414
+ readonly description: Schema.NullOr<Schema.String>;
415
+ readonly startMs: Schema.Number;
416
+ readonly endMs: Schema.Number;
417
+ }>>;
418
+ readonly sessionCount: Schema.Number;
419
+ /** False for recorded-only weeks. Omitted by older servers means a session scan is available. */
420
+ readonly sessionScanAvailable: Schema.optional<Schema.Boolean>;
421
+ /** Which systems this week was read from. A side that is out reports zero because nobody asked. */
422
+ readonly scope: Schema.Literals<readonly ["both", "clockify", "jira"]>;
423
+ /** Zero means nothing is opted in, which is the usual reason for an empty week. */
424
+ readonly sessionRootCount: Schema.Number;
425
+ /** Hours on tickets assigned to somebody else. Empty when ownership is not being enforced. */
426
+ readonly notMine: Schema.$Array<Schema.Struct<{
427
+ /** Who Jira says owns it, or null when it is unassigned. */
428
+ readonly assignee: Schema.NullOr<Schema.String>;
429
+ readonly day: Schema.String;
430
+ readonly seconds: Schema.Number;
431
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
432
+ readonly ticketKey: Schema.String;
433
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
434
+ }>>;
435
+ /**
436
+ * True when Jira actually answered about who owns these tickets.
437
+ *
438
+ * False means nothing was filtered on ownership, whatever the setting says — a week that quietly
439
+ * hid rows because Jira was unreachable would be a week missing hours with nothing to explain it.
440
+ */
441
+ readonly ownershipChecked: Schema.Boolean;
442
+ /** Whether this week withheld tickets assigned to other people. */
443
+ readonly ownership: Schema.Literals<readonly ["assigned", "any"]>;
444
+ readonly unattributed: Schema.$Array<Schema.Struct<{
445
+ readonly cwds: Schema.$Array<Schema.String>;
446
+ readonly day: Schema.String;
447
+ readonly seconds: Schema.Number;
448
+ readonly sessionCount: Schema.Number;
449
+ }>>;
450
+ readonly withheld: Schema.$Array<Schema.Struct<{
451
+ readonly confidence: Schema.NullOr<Schema.Number>;
452
+ readonly day: Schema.String;
453
+ readonly seconds: Schema.Number;
454
+ readonly ticketKey: Schema.String;
455
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
456
+ }>>;
457
+ }>;
458
+ /** Authenticated cached view. Missing evidence allows provider-only reads; suggestions require an explicit scan. */
459
+ export declare const SavedWeek: Schema.Struct<{
460
+ readonly monday: Schema.String;
461
+ readonly scope: Schema.Literals<readonly ["both", "clockify", "jira"]>;
462
+ readonly plan: Schema.NullOr<Schema.Struct<{
463
+ /**
464
+ * True when a Coding Agent was needed and could not be reached. The deterministic rows are still
465
+ * complete; what is missing is only the placement of sessions no branch or path could place.
466
+ */
467
+ readonly attributorAvailable: Schema.Boolean;
468
+ readonly attributorCalls: Schema.Number;
469
+ readonly days: Schema.$Array<Schema.String>;
470
+ readonly excludedDays: Schema.$Array<Schema.Struct<{
471
+ readonly day: Schema.String;
472
+ readonly reason: Schema.String;
473
+ }>>;
474
+ readonly monday: Schema.String;
475
+ /** Names the server-held evidence a confirmation refers to. */
476
+ readonly planId: Schema.String;
477
+ readonly rows: Schema.$Array<Schema.Struct<{
478
+ readonly clockifyDescription: Schema.NullOr<Schema.String>;
479
+ readonly clockifySeconds: Schema.Number;
480
+ readonly day: Schema.String;
481
+ /**
482
+ * When the recorded time happened — the entries behind the totals, so a week can be drawn as a
483
+ * calendar. Empty when the systems reported no usable interval, never fabricated from the total.
484
+ */
485
+ readonly intervals: Schema.$Array<Schema.Struct<{
486
+ readonly entry: Schema.optionalKey<Schema.Struct<{
487
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
488
+ readonly revision: Schema.String;
489
+ readonly id: Schema.String;
490
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
491
+ readonly ticketKey: Schema.NullOr<Schema.String>;
492
+ readonly startMs: Schema.Number;
493
+ readonly endMs: Schema.Number;
494
+ readonly description: Schema.NullOr<Schema.String>;
495
+ }>>;
496
+ readonly endMs: Schema.Number;
497
+ readonly source: Schema.Literals<readonly ["clockify", "jira"]>;
498
+ readonly startMs: Schema.Number;
499
+ }>>;
500
+ readonly jiraSeconds: Schema.Number;
501
+ readonly proposal: Schema.optional<Schema.Struct<{
502
+ readonly activeSeconds: Schema.Number;
503
+ /**
504
+ * The stretches behind this row, ascending. They sum to `maxSeconds`, and a confirmation may name
505
+ * a subset of them by position — which is how a morning gets written without the afternoon.
506
+ */
507
+ readonly blocks: Schema.$Array<Schema.Struct<{
508
+ /** Normalized seconds this source block already supplied to each provider, including corrected-ticket writes. */
509
+ readonly consumed: Schema.Struct<{
510
+ readonly clockify: Schema.Number;
511
+ readonly jira: Schema.Number;
512
+ }>;
513
+ /** A provider-specific safety hold, never a consumed-seconds estimate. */
514
+ readonly clockifyRefusal: Schema.optionalKey<Schema.Literal<"unlinked-overlap">>;
515
+ readonly endMs: Schema.Number;
516
+ readonly seconds: Schema.Number;
517
+ readonly startMs: Schema.Number;
518
+ /** Stable source-cluster identity; rendered starts may move as overlapping work grows. */
519
+ readonly sourceStartMs: Schema.optional<Schema.Number>;
520
+ }>>;
521
+ readonly clockifyDelta: Schema.Number;
522
+ readonly confidence: Schema.NullOr<Schema.Number>;
523
+ readonly jiraDelta: Schema.Number;
524
+ readonly maxSeconds: Schema.Number;
525
+ readonly sessionCount: Schema.Number;
526
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
527
+ }>>;
528
+ readonly rowId: Schema.String;
529
+ readonly ticketKey: Schema.String;
530
+ /**
531
+ * The issue title, or null when Jira could not be asked — logged out, unreachable, or out of
532
+ * scope for this week. Null is "unknown", never "untitled": an Issue Key alone is a lookup nobody
533
+ * can do six months later, so it is worth saying when it is missing.
534
+ */
535
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
536
+ }>>;
537
+ /** Closed Clockify entries without a ticket, excluded from ticket reconciliation. */
538
+ readonly unlinkedClockify: Schema.$Array<Schema.Struct<{
539
+ readonly entry: Schema.optionalKey<Schema.Struct<{
540
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
541
+ readonly revision: Schema.String;
542
+ readonly id: Schema.String;
543
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
544
+ readonly ticketKey: Schema.NullOr<Schema.String>;
545
+ readonly startMs: Schema.Number;
546
+ readonly endMs: Schema.Number;
547
+ readonly description: Schema.NullOr<Schema.String>;
548
+ }>>;
549
+ readonly day: Schema.String;
550
+ readonly seconds: Schema.Number;
551
+ readonly description: Schema.NullOr<Schema.String>;
552
+ readonly startMs: Schema.Number;
553
+ readonly endMs: Schema.Number;
554
+ }>>;
555
+ readonly sessionCount: Schema.Number;
556
+ /** False for recorded-only weeks. Omitted by older servers means a session scan is available. */
557
+ readonly sessionScanAvailable: Schema.optional<Schema.Boolean>;
558
+ /** Which systems this week was read from. A side that is out reports zero because nobody asked. */
559
+ readonly scope: Schema.Literals<readonly ["both", "clockify", "jira"]>;
560
+ /** Zero means nothing is opted in, which is the usual reason for an empty week. */
561
+ readonly sessionRootCount: Schema.Number;
562
+ /** Hours on tickets assigned to somebody else. Empty when ownership is not being enforced. */
563
+ readonly notMine: Schema.$Array<Schema.Struct<{
564
+ /** Who Jira says owns it, or null when it is unassigned. */
565
+ readonly assignee: Schema.NullOr<Schema.String>;
566
+ readonly day: Schema.String;
567
+ readonly seconds: Schema.Number;
568
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
569
+ readonly ticketKey: Schema.String;
570
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
571
+ }>>;
572
+ /**
573
+ * True when Jira actually answered about who owns these tickets.
574
+ *
575
+ * False means nothing was filtered on ownership, whatever the setting says — a week that quietly
576
+ * hid rows because Jira was unreachable would be a week missing hours with nothing to explain it.
577
+ */
578
+ readonly ownershipChecked: Schema.Boolean;
579
+ /** Whether this week withheld tickets assigned to other people. */
580
+ readonly ownership: Schema.Literals<readonly ["assigned", "any"]>;
581
+ readonly unattributed: Schema.$Array<Schema.Struct<{
582
+ readonly cwds: Schema.$Array<Schema.String>;
583
+ readonly day: Schema.String;
584
+ readonly seconds: Schema.Number;
585
+ readonly sessionCount: Schema.Number;
586
+ }>>;
587
+ readonly withheld: Schema.$Array<Schema.Struct<{
588
+ readonly confidence: Schema.NullOr<Schema.Number>;
589
+ readonly day: Schema.String;
590
+ readonly seconds: Schema.Number;
591
+ readonly ticketKey: Schema.String;
592
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
593
+ }>>;
594
+ }>>;
595
+ }>;
596
+ /** What one side of a write did. Mirrors `SideOutcome` in the engine. */
597
+ export declare const SideOutcome: Schema.Union<readonly [Schema.TaggedStruct<"Written", {
598
+ readonly seconds: Schema.Number;
599
+ readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
600
+ readonly startMs: Schema.Number;
601
+ readonly endMs: Schema.Number;
602
+ }>>>;
603
+ }>, Schema.TaggedStruct<"PartiallyWritten", {
604
+ readonly seconds: Schema.Number;
605
+ readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
606
+ readonly startMs: Schema.Number;
607
+ readonly endMs: Schema.Number;
608
+ }>>>;
609
+ readonly failure: Schema.Union<readonly [Schema.TaggedStruct<"Refused", {
610
+ readonly message: Schema.String;
611
+ }>, Schema.TaggedStruct<"NotLoggedIn", {}>]>;
612
+ }>, Schema.TaggedStruct<"NothingOwed", {}>, Schema.TaggedStruct<"Skipped", {}>, Schema.TaggedStruct<"Refused", {
613
+ readonly message: Schema.String;
614
+ }>, Schema.TaggedStruct<"NotLoggedIn", {}>]>;
615
+ /**
616
+ * What a write actually did, in the engine's own words.
617
+ *
618
+ * `lines` is rendered by the engine rather than the browser so a terminal and a page cannot describe
619
+ * the same write differently. `description` is what landed in both systems, returned because it is
620
+ * the text other people will read.
621
+ */
622
+ export declare const WriteResult: Schema.Struct<{
623
+ readonly clockify: Schema.Union<readonly [Schema.TaggedStruct<"Written", {
624
+ readonly seconds: Schema.Number;
625
+ readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
626
+ readonly startMs: Schema.Number;
627
+ readonly endMs: Schema.Number;
628
+ }>>>;
629
+ }>, Schema.TaggedStruct<"PartiallyWritten", {
630
+ readonly seconds: Schema.Number;
631
+ readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
632
+ readonly startMs: Schema.Number;
633
+ readonly endMs: Schema.Number;
634
+ }>>>;
635
+ readonly failure: Schema.Union<readonly [Schema.TaggedStruct<"Refused", {
636
+ readonly message: Schema.String;
637
+ }>, Schema.TaggedStruct<"NotLoggedIn", {}>]>;
638
+ }>, Schema.TaggedStruct<"NothingOwed", {}>, Schema.TaggedStruct<"Skipped", {}>, Schema.TaggedStruct<"Refused", {
639
+ readonly message: Schema.String;
640
+ }>, Schema.TaggedStruct<"NotLoggedIn", {}>]>;
641
+ readonly description: Schema.String;
642
+ readonly jira: Schema.Union<readonly [Schema.TaggedStruct<"Written", {
643
+ readonly seconds: Schema.Number;
644
+ readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
645
+ readonly startMs: Schema.Number;
646
+ readonly endMs: Schema.Number;
647
+ }>>>;
648
+ }>, Schema.TaggedStruct<"PartiallyWritten", {
649
+ readonly seconds: Schema.Number;
650
+ readonly segments: Schema.optional<Schema.$Array<Schema.Struct<{
651
+ readonly startMs: Schema.Number;
652
+ readonly endMs: Schema.Number;
653
+ }>>>;
654
+ readonly failure: Schema.Union<readonly [Schema.TaggedStruct<"Refused", {
655
+ readonly message: Schema.String;
656
+ }>, Schema.TaggedStruct<"NotLoggedIn", {}>]>;
657
+ }>, Schema.TaggedStruct<"NothingOwed", {}>, Schema.TaggedStruct<"Skipped", {}>, Schema.TaggedStruct<"Refused", {
658
+ readonly message: Schema.String;
659
+ }>, Schema.TaggedStruct<"NotLoggedIn", {}>]>;
660
+ readonly lines: Schema.$Array<Schema.String>;
661
+ }>;
662
+ /**
663
+ * Accept one proposed row, optionally with the amount or the Issue Key overruled.
664
+ *
665
+ * No spans, no credited seconds, no deltas: the server holds the evidence this row was built from
666
+ * and re-reads both systems before writing, so the only numbers a browser can influence are the ones
667
+ * a person is allowed to choose.
668
+ */
669
+ export declare const ConfirmPayload: Schema.Struct<{
670
+ /**
671
+ * Which of the row's blocks to write, by position. Absent means all of them.
672
+ *
673
+ * Positions rather than times or durations, so the server still owns every number: naming block
674
+ * two of a row it built is not the same kind of claim as sending "40 minutes at 20:52".
675
+ */
676
+ readonly blocks: Schema.optional<Schema.$Array<Schema.Number>>;
677
+ readonly note: Schema.optional<Schema.String>;
678
+ readonly planId: Schema.String;
679
+ readonly rowId: Schema.String;
680
+ /** Absent means the systems the week was read under. Neither is a usage error, not a write. */
681
+ readonly targets: Schema.optional<Schema.Struct<{
682
+ readonly clockify: Schema.Boolean;
683
+ readonly jira: Schema.Boolean;
684
+ }>>;
685
+ /** Absent means "as proposed". Present must not exceed the row's `maxSeconds`. */
686
+ readonly seconds: Schema.optional<Schema.Number>;
687
+ /** Absent means the Issue Key the evidence placed it on. */
688
+ readonly ticketKey: Schema.optional<Schema.String>;
689
+ }>;
690
+ /**
691
+ * Log time no session evidences — a meeting, a whiteboard, a review away from the keyboard.
692
+ *
693
+ * Deliberately an *addition* rather than a top-up: a person typing 30 minutes means add 30 minutes,
694
+ * which is what `jcf timer log` has always done. Nothing is subtracted, so running it twice logs
695
+ * twice, exactly as typing it twice would.
696
+ */
697
+ export declare const ManualPayload: Schema.Struct<{
698
+ readonly day: Schema.String;
699
+ readonly note: Schema.optional<Schema.String>;
700
+ readonly seconds: Schema.Number;
701
+ readonly targets: Schema.optional<Schema.Struct<{
702
+ readonly clockify: Schema.Boolean;
703
+ readonly jira: Schema.Boolean;
704
+ }>>;
705
+ /** Local `HH:MM` the work began. Absent lets the engine place it at local noon. */
706
+ readonly startClock: Schema.optional<Schema.String>;
707
+ readonly ticketKey: Schema.String;
708
+ }>;
709
+ /** Treat one ticket as yours whatever Jira says its assignee is. Sticks, in `~/.jcf/config.json`. */
710
+ export declare const OwnershipPayload: Schema.Struct<{
711
+ readonly ticketKey: Schema.String;
712
+ }>;
713
+ export declare const OwnershipResult: Schema.Struct<{
714
+ readonly ownershipOverrides: Schema.$Array<Schema.String>;
715
+ }>;
716
+ /** Map a directory prefix to an Issue Key, so recurring ticket-less work stops being unplaced. */
717
+ export declare const StandingPayload: Schema.Struct<{
718
+ readonly cwd: Schema.String;
719
+ readonly ticketKey: Schema.String;
720
+ }>;
721
+ export declare const StandingResult: Schema.Struct<{
722
+ readonly sessionTicketMap: Schema.$Record<Schema.String, Schema.String>;
723
+ }>;
724
+ export type WeekPlanResponse = Schema.Schema.Type<typeof WeekPlan>;
725
+ export type WeekRowResponse = Schema.Schema.Type<typeof WeekRow>;
726
+ export type RowProposalResponse = Schema.Schema.Type<typeof RowProposal>;
727
+ export type UnattributedDayResponse = Schema.Schema.Type<typeof UnattributedDay>;
728
+ export type WriteResultResponse = Schema.Schema.Type<typeof WriteResult>;
729
+ export type WeekScopeName = Schema.Schema.Type<typeof WeekScope>;
730
+ export type WriteTargetsRequest = Schema.Schema.Type<typeof WriteTargets>;
731
+ export type RecordedIntervalResponse = Schema.Schema.Type<typeof RecordedInterval>;
732
+ export type ProposalBlockResponse = Schema.Schema.Type<typeof ProposalBlock>;
733
+ export type NotMineRowResponse = Schema.Schema.Type<typeof NotMineRow>;
734
+ export type OwnershipMode = "assigned" | "any";
735
+ /** Actual server stages. Counts describe completed attribution work, never estimated percentages. */
736
+ export declare const ReadProgress: Schema.Struct<{
737
+ readonly activity: Schema.optional<Schema.Struct<{
738
+ readonly batch: Schema.Number;
739
+ readonly batches: Schema.Number;
740
+ readonly kind: Schema.Literals<readonly ["status", "text", "request", "response"]>;
741
+ readonly text: Schema.String;
742
+ }>>;
743
+ readonly stage: Schema.Literals<readonly ["sessions", "attribution", "recorded", "issues", "calendar"]>;
744
+ readonly message: Schema.String;
745
+ readonly completed: Schema.optional<Schema.Number>;
746
+ readonly total: Schema.optional<Schema.Number>;
747
+ }>;
748
+ export type ReadProgress = typeof ReadProgress.Type;
749
+ /** One authenticated read stream, ending in exactly one plan or failure. */
750
+ export declare const WeekReadEvent: Schema.Union<readonly [Schema.TaggedStruct<"Progress", {
751
+ readonly progress: Schema.Struct<{
752
+ readonly activity: Schema.optional<Schema.Struct<{
753
+ readonly batch: Schema.Number;
754
+ readonly batches: Schema.Number;
755
+ readonly kind: Schema.Literals<readonly ["status", "text", "request", "response"]>;
756
+ readonly text: Schema.String;
757
+ }>>;
758
+ readonly stage: Schema.Literals<readonly ["sessions", "attribution", "recorded", "issues", "calendar"]>;
759
+ readonly message: Schema.String;
760
+ readonly completed: Schema.optional<Schema.Number>;
761
+ readonly total: Schema.optional<Schema.Number>;
762
+ }>;
763
+ }>, Schema.TaggedStruct<"Complete", {
764
+ readonly plan: Schema.Struct<{
765
+ /**
766
+ * True when a Coding Agent was needed and could not be reached. The deterministic rows are still
767
+ * complete; what is missing is only the placement of sessions no branch or path could place.
768
+ */
769
+ readonly attributorAvailable: Schema.Boolean;
770
+ readonly attributorCalls: Schema.Number;
771
+ readonly days: Schema.$Array<Schema.String>;
772
+ readonly excludedDays: Schema.$Array<Schema.Struct<{
773
+ readonly day: Schema.String;
774
+ readonly reason: Schema.String;
775
+ }>>;
776
+ readonly monday: Schema.String;
777
+ /** Names the server-held evidence a confirmation refers to. */
778
+ readonly planId: Schema.String;
779
+ readonly rows: Schema.$Array<Schema.Struct<{
780
+ readonly clockifyDescription: Schema.NullOr<Schema.String>;
781
+ readonly clockifySeconds: Schema.Number;
782
+ readonly day: Schema.String;
783
+ /**
784
+ * When the recorded time happened — the entries behind the totals, so a week can be drawn as a
785
+ * calendar. Empty when the systems reported no usable interval, never fabricated from the total.
786
+ */
787
+ readonly intervals: Schema.$Array<Schema.Struct<{
788
+ readonly entry: Schema.optionalKey<Schema.Struct<{
789
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
790
+ readonly revision: Schema.String;
791
+ readonly id: Schema.String;
792
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
793
+ readonly ticketKey: Schema.NullOr<Schema.String>;
794
+ readonly startMs: Schema.Number;
795
+ readonly endMs: Schema.Number;
796
+ readonly description: Schema.NullOr<Schema.String>;
797
+ }>>;
798
+ readonly endMs: Schema.Number;
799
+ readonly source: Schema.Literals<readonly ["clockify", "jira"]>;
800
+ readonly startMs: Schema.Number;
801
+ }>>;
802
+ readonly jiraSeconds: Schema.Number;
803
+ readonly proposal: Schema.optional<Schema.Struct<{
804
+ readonly activeSeconds: Schema.Number;
805
+ /**
806
+ * The stretches behind this row, ascending. They sum to `maxSeconds`, and a confirmation may name
807
+ * a subset of them by position — which is how a morning gets written without the afternoon.
808
+ */
809
+ readonly blocks: Schema.$Array<Schema.Struct<{
810
+ /** Normalized seconds this source block already supplied to each provider, including corrected-ticket writes. */
811
+ readonly consumed: Schema.Struct<{
812
+ readonly clockify: Schema.Number;
813
+ readonly jira: Schema.Number;
814
+ }>;
815
+ /** A provider-specific safety hold, never a consumed-seconds estimate. */
816
+ readonly clockifyRefusal: Schema.optionalKey<Schema.Literal<"unlinked-overlap">>;
817
+ readonly endMs: Schema.Number;
818
+ readonly seconds: Schema.Number;
819
+ readonly startMs: Schema.Number;
820
+ /** Stable source-cluster identity; rendered starts may move as overlapping work grows. */
821
+ readonly sourceStartMs: Schema.optional<Schema.Number>;
822
+ }>>;
823
+ readonly clockifyDelta: Schema.Number;
824
+ readonly confidence: Schema.NullOr<Schema.Number>;
825
+ readonly jiraDelta: Schema.Number;
826
+ readonly maxSeconds: Schema.Number;
827
+ readonly sessionCount: Schema.Number;
828
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
829
+ }>>;
830
+ readonly rowId: Schema.String;
831
+ readonly ticketKey: Schema.String;
832
+ /**
833
+ * The issue title, or null when Jira could not be asked — logged out, unreachable, or out of
834
+ * scope for this week. Null is "unknown", never "untitled": an Issue Key alone is a lookup nobody
835
+ * can do six months later, so it is worth saying when it is missing.
836
+ */
837
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
838
+ }>>;
839
+ /** Closed Clockify entries without a ticket, excluded from ticket reconciliation. */
840
+ readonly unlinkedClockify: Schema.$Array<Schema.Struct<{
841
+ readonly entry: Schema.optionalKey<Schema.Struct<{
842
+ /** Opaque retained snapshot handle. Send unchanged when saving; use the returned handle afterward. */
843
+ readonly revision: Schema.String;
844
+ readonly id: Schema.String;
845
+ readonly source: Schema.Literals<readonly ["jira", "clockify"]>;
846
+ readonly ticketKey: Schema.NullOr<Schema.String>;
847
+ readonly startMs: Schema.Number;
848
+ readonly endMs: Schema.Number;
849
+ readonly description: Schema.NullOr<Schema.String>;
850
+ }>>;
851
+ readonly day: Schema.String;
852
+ readonly seconds: Schema.Number;
853
+ readonly description: Schema.NullOr<Schema.String>;
854
+ readonly startMs: Schema.Number;
855
+ readonly endMs: Schema.Number;
856
+ }>>;
857
+ readonly sessionCount: Schema.Number;
858
+ /** False for recorded-only weeks. Omitted by older servers means a session scan is available. */
859
+ readonly sessionScanAvailable: Schema.optional<Schema.Boolean>;
860
+ /** Which systems this week was read from. A side that is out reports zero because nobody asked. */
861
+ readonly scope: Schema.Literals<readonly ["both", "clockify", "jira"]>;
862
+ /** Zero means nothing is opted in, which is the usual reason for an empty week. */
863
+ readonly sessionRootCount: Schema.Number;
864
+ /** Hours on tickets assigned to somebody else. Empty when ownership is not being enforced. */
865
+ readonly notMine: Schema.$Array<Schema.Struct<{
866
+ /** Who Jira says owns it, or null when it is unassigned. */
867
+ readonly assignee: Schema.NullOr<Schema.String>;
868
+ readonly day: Schema.String;
869
+ readonly seconds: Schema.Number;
870
+ readonly signal: Schema.Literals<readonly ["branch", "path", "standing", "agent", "none"]>;
871
+ readonly ticketKey: Schema.String;
872
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
873
+ }>>;
874
+ /**
875
+ * True when Jira actually answered about who owns these tickets.
876
+ *
877
+ * False means nothing was filtered on ownership, whatever the setting says — a week that quietly
878
+ * hid rows because Jira was unreachable would be a week missing hours with nothing to explain it.
879
+ */
880
+ readonly ownershipChecked: Schema.Boolean;
881
+ /** Whether this week withheld tickets assigned to other people. */
882
+ readonly ownership: Schema.Literals<readonly ["assigned", "any"]>;
883
+ readonly unattributed: Schema.$Array<Schema.Struct<{
884
+ readonly cwds: Schema.$Array<Schema.String>;
885
+ readonly day: Schema.String;
886
+ readonly seconds: Schema.Number;
887
+ readonly sessionCount: Schema.Number;
888
+ }>>;
889
+ readonly withheld: Schema.$Array<Schema.Struct<{
890
+ readonly confidence: Schema.NullOr<Schema.Number>;
891
+ readonly day: Schema.String;
892
+ readonly seconds: Schema.Number;
893
+ readonly ticketKey: Schema.String;
894
+ readonly ticketTitle: Schema.NullOr<Schema.String>;
895
+ }>>;
896
+ }>;
897
+ }>, Schema.TaggedStruct<"Failed", {
898
+ readonly message: Schema.String;
899
+ }>]>;
900
+ export type WeekReadEvent = typeof WeekReadEvent.Type;
901
+ export {};