@ascenda-one/history-import 0.1.18 → 0.1.20

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.
@@ -0,0 +1,84 @@
1
+ import { ASCENDA_ELAPSED_QUANTITIES } from "@ascenda-one/tool-contract";
2
+ /**
3
+ * Which quantity each active-time figure in the handoff reports.
4
+ *
5
+ * **Keyed on `Interface.field`, never on the field name alone**, because in this
6
+ * file a bare name is genuinely ambiguous: `handsOnMinutes` is summed across
7
+ * sessions on {@link HandoffProjectDigest} and unioned on
8
+ * {@link ProjectElapsedActive}, one nesting level apart under one spelling. Both
9
+ * are deliberate — the sums are kept because agent-hours is a real quantity and
10
+ * because removing them would silently change every existing reader — and until
11
+ * this table nothing mechanical told them apart. That is the asc-core-be#194
12
+ * shape: two figures sharing a name with nothing on either distinguishing them.
13
+ *
14
+ * The vocabulary itself is vendored in
15
+ * `packages/tool-contract/contracts/active-time-quantities.v1.json`, so a name
16
+ * used here that the backend does not own fails a build rather than a dashboard.
17
+ *
18
+ * **The assignments are not vendored — three repos keep three of these by hand,
19
+ * and changing one means reading the other two.** See asc-core-be
20
+ * `docs/ACTIVE_TIME.md`, "The vocabulary is shared; the assignments are three
21
+ * hand-kept registries", for the sibling paths and the one-line test.
22
+ */
23
+ export const ACTIVE_TIME_FIGURES = {
24
+ // One session cannot overlap itself, so its figures are already elapsed.
25
+ // `activeMinutes` is gap-split minutes at the 5-minute rule; hands-on and
26
+ // supervising are its two halves and must never be rendered as one.
27
+ "HandoffSession.activeMinutes": "coverage",
28
+ "HandoffSession.handsOnMinutes": "hands_on",
29
+ "HandoffSession.agentSupervisingMinutes": "supervising",
30
+ "CodexHandoffSession.activeMinutes": "coverage",
31
+ "CodexHandoffSession.handsOnMinutes": "hands_on",
32
+ "CodexHandoffSession.agentSupervisingMinutes": "supervising",
33
+ // Summed over sessions, from the sessions' own minute figures. On the
34
+ // reference machine these came to 4.2x the wall clock of the period they
35
+ // described, which is why they are agent-hours and not time.
36
+ "HandoffProjectDigest.handsOnMinutes": "hands_on_agent_hours",
37
+ "HandoffProjectDigest.agentSupervisingMinutes": "supervising_agent_hours",
38
+ // The same time unioned instead of added up. This is the figure to render as
39
+ // time, and the reason the pair above needed a different name rather than a
40
+ // warning comment.
41
+ "ProjectElapsedActive.handsOnMinutes": "hands_on",
42
+ "ProjectElapsedActive.agentSupervisingMinutes": "supervising",
43
+ // Per local day, both readings side by side so a window can state its own
44
+ // concurrency instead of borrowing a corpus-wide ratio.
45
+ "ProjectElapsedDay.handsOnMinutes": "hands_on",
46
+ "ProjectElapsedDay.agentSupervisingMinutes": "supervising",
47
+ "ProjectElapsedDay.summedHandsOnMinutes": "hands_on_agent_hours",
48
+ "ProjectElapsedDay.summedAgentSupervisingMinutes": "supervising_agent_hours",
49
+ // One local day of one session — the day's share of that session's own split.
50
+ // A session cannot overlap itself, so these are elapsed. They sat in
51
+ // daySlice.ts unlabelled while the scan read only localHandoff.ts; the app
52
+ // workspace registers a class of the same name with the same three
53
+ // quantities, so the two rails already agreed and one could not see its own
54
+ // copy.
55
+ "SessionDaySlice.activeMinutes": "coverage",
56
+ "SessionDaySlice.handsOnMinutes": "hands_on",
57
+ "SessionDaySlice.agentSupervisingMinutes": "supervising"
58
+ };
59
+ /**
60
+ * Fields whose names are figure-shaped but which are not figures, with reasons.
61
+ *
62
+ * `activeGapMinutes` is the label saying how the figures were cut — the second
63
+ * third of the `{quantity, gapMinutes, basis}` triple, not a quantity of its
64
+ * own. Registering it would claim the gap is a measurement of something.
65
+ */
66
+ export const NOT_ACTIVE_TIME_FIGURES = {
67
+ "HandoffFile.activeGapMinutes": "the gap rule these figures were cut by, not a figure",
68
+ "CodexHandoffFile.activeGapMinutes": "the gap rule these figures were cut by, not a figure",
69
+ "CrossStoreElapsedFile.activeGapMinutes": "the gap rule these figures were cut by, not a figure"
70
+ };
71
+ /** The quantity a figure reports, or undefined when it is not registered. */
72
+ export function quantityOf(iface, field) {
73
+ return ACTIVE_TIME_FIGURES[`${iface}.${field}`];
74
+ }
75
+ /**
76
+ * Whether a figure may be rendered as elapsed time — "where your week went".
77
+ *
78
+ * A summed figure quoted as elapsed time is the specific defect the
79
+ * elapsed/summed split exists to prevent.
80
+ */
81
+ export function isElapsed(quantity) {
82
+ return ASCENDA_ELAPSED_QUANTITIES[quantity];
83
+ }
84
+ //# sourceMappingURL=activeTimeFigures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activeTimeFigures.js","sourceRoot":"","sources":["../src/activeTimeFigures.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAE3B,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwD;IACtF,yEAAyE;IACzE,0EAA0E;IAC1E,oEAAoE;IACpE,8BAA8B,EAAE,UAAU;IAC1C,+BAA+B,EAAE,UAAU;IAC3C,wCAAwC,EAAE,aAAa;IAEvD,mCAAmC,EAAE,UAAU;IAC/C,oCAAoC,EAAE,UAAU;IAChD,6CAA6C,EAAE,aAAa;IAE5D,sEAAsE;IACtE,yEAAyE;IACzE,6DAA6D;IAC7D,qCAAqC,EAAE,sBAAsB;IAC7D,8CAA8C,EAAE,yBAAyB;IAEzE,6EAA6E;IAC7E,4EAA4E;IAC5E,mBAAmB;IACnB,qCAAqC,EAAE,UAAU;IACjD,8CAA8C,EAAE,aAAa;IAE7D,0EAA0E;IAC1E,wDAAwD;IACxD,kCAAkC,EAAE,UAAU;IAC9C,2CAA2C,EAAE,aAAa;IAC1D,wCAAwC,EAAE,sBAAsB;IAChE,iDAAiD,EAAE,yBAAyB;IAE5E,8EAA8E;IAC9E,qEAAqE;IACrE,2EAA2E;IAC3E,mEAAmE;IACnE,4EAA4E;IAC5E,QAAQ;IACR,+BAA+B,EAAE,UAAU;IAC3C,gCAAgC,EAAE,UAAU;IAC5C,yCAAyC,EAAE,aAAa;CACzD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAqC;IACvE,8BAA8B,EAAE,sDAAsD;IACtF,mCAAmC,EAAE,sDAAsD;IAC3F,wCAAwC,EAAE,sDAAsD;CACjG,CAAC;AAEF,6EAA6E;AAC7E,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAa;IACrD,OAAO,mBAAmB,CAAC,GAAG,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,QAAmC;IAC3D,OAAO,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC"}