@burdenoff/microfe-timecampus 2026.1031.7 → 2026.1031.8
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sustainedLoad.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/work-patterns/sustainedLoad.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"sustainedLoad.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/work-patterns/sustainedLoad.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAmCjE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAEvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAExD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,SAAS,CAAC;CACvB;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAa9D;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAQ1E;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAEpE"}
|
|
@@ -21,7 +21,8 @@ var e = {
|
|
|
21
21
|
INSUFFICIENT_DATA: "There is not enough tracked time for AI reasoning.",
|
|
22
22
|
PROVIDER_FAILED: "The AI model was unavailable, so the rules decided.",
|
|
23
23
|
INVALID_REPLY: "The AI answer did not pass our checks, so the rules decided.",
|
|
24
|
-
LOW_CONFIDENCE: "The AI model was unsure, so the rules decided."
|
|
24
|
+
LOW_CONFIDENCE: "The AI model was unsure, so the rules decided.",
|
|
25
|
+
CREDITS_EXHAUSTED: "This workspace has no AI credits left, so the rules decided."
|
|
25
26
|
};
|
|
26
27
|
function i(t) {
|
|
27
28
|
return e[t] ?? t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sustainedLoad.js","names":[],"sources":["../../../../src/timecampus/pages/work-patterns/sustainedLoad.ts"],"sourcesContent":["/**\n * Sustained-load signal presentation helpers (BOFF-10427).\n * =========================================================================\n *\n * `mySustainedLoad` returns a level, a rationale and evidence tied to weeks.\n * These helpers only map the service's closed enums to copy and badge tones;\n * they never compute a level of their own, so the card can only show what the\n * service decided.\n *\n * @module timecampus\n */\n\nexport type LoadLevel = \"INSUFFICIENT_DATA\" | \"LOW\" | \"ELEVATED\" | \"HIGH\";\nexport type LoadTone = \"success\" | \"warning\" | \"error\" | \"muted\";\n\nconst LEVEL_LABEL: Record<LoadLevel, string> = {\n INSUFFICIENT_DATA: \"Not enough data\",\n LOW: \"Sustainable\",\n ELEVATED: \"Elevated\",\n HIGH: \"High\",\n};\n\nconst LEVEL_TONE: Record<LoadLevel, LoadTone> = {\n INSUFFICIENT_DATA: \"muted\",\n LOW: \"success\",\n ELEVATED: \"warning\",\n HIGH: \"error\",\n};\n\nconst EVIDENCE_LABEL: Record<string, string> = {\n LONG_HOURS: \"Long hours\",\n AFTER_HOURS: \"After hours\",\n NO_RECOVERY: \"No recovery day\",\n FRAGMENTATION: \"Fragmented days\",\n WITHIN_RANGE: \"Sustainable week\",\n};\n\nconst FALLBACK_COPY: Record<string, string> = {\n AI_NOT_ENABLED: \"AI reasoning is off for this workspace.\",\n PROVIDER_NOT_CONFIGURED: \"AI reasoning is not available here.\",\n INSUFFICIENT_DATA: \"There is not enough tracked time for AI reasoning.\",\n PROVIDER_FAILED: \"The AI model was unavailable, so the rules decided.\",\n INVALID_REPLY: \"The AI answer did not pass our checks, so the rules decided.\",\n LOW_CONFIDENCE: \"The AI model was unsure, so the rules decided.\",\n};\n\nexport function loadLevelLabel(level: LoadLevel): string {\n return LEVEL_LABEL[level] ?? level;\n}\n\nexport function loadLevelTone(level: LoadLevel): LoadTone {\n return LEVEL_TONE[level] ?? \"muted\";\n}\n\nexport function evidenceKindLabel(kind: string): string {\n return EVIDENCE_LABEL[kind] ?? kind;\n}\n\nexport interface ProvenanceInput {\n method: \"RULES\" | \"MODEL\";\n model?: string | null;\n confidence?: number | null;\n fallbackReason?: string | null;\n rulesLevel: LoadLevel;\n}\n\n/** One sentence saying how the level was reached. */\nexport function loadProvenance(signal: ProvenanceInput): string {\n if (signal.method === \"MODEL\") {\n const confidence =\n signal.confidence != null\n ? `, ${Math.round(signal.confidence * 100)}% confident`\n : \"\";\n const model = signal.model ? ` (${signal.model}${confidence})` : \"\";\n return `Read by an AI model${model} from your weekly numbers. The built-in rules read: ${loadLevelLabel(signal.rulesLevel)}.`;\n }\n const reason = signal.fallbackReason\n ? FALLBACK_COPY[signal.fallbackReason]\n : undefined;\n return `Read by the built-in weekly rules.${reason ? ` ${reason}` : \"\"}`;\n}\n\n/** \"Oct 3 – Oct 9\" for two YYYY-MM-DD calendar days, read as local dates. */\nexport function formatWeekRange(weekStart: string, weekEnd: string): string {\n const fmt = (day: string) => {\n const d = new Date(`${day}T12:00:00`);\n return Number.isNaN(d.getTime())\n ? day\n : d.toLocaleDateString(undefined, { month: \"short\", day: \"numeric\" });\n };\n return `${fmt(weekStart)} – ${fmt(weekEnd)}`;\n}\n\n/** A 0..1 share as a whole percentage, or an em dash when unknown. */\nexport function formatShare(share: number | null | undefined): string {\n return share == null ? \"—\" : `${Math.round(share * 100)}%`;\n}\n"],"mappings":";AAeA,IAAM,IAAyC;CAC7C,mBAAmB;CACnB,KAAK;CACL,UAAU;CACV,MAAM;AACR,GAEM,IAA0C;CAC9C,mBAAmB;CACnB,KAAK;CACL,UAAU;CACV,MAAM;AACR,GAEM,IAAyC;CAC7C,YAAY;CACZ,aAAa;CACb,aAAa;CACb,eAAe;CACf,cAAc;AAChB,GAEM,IAAwC;CAC5C,gBAAgB;CAChB,yBAAyB;CACzB,mBAAmB;CACnB,iBAAiB;CACjB,eAAe;CACf,gBAAgB;
|
|
1
|
+
{"version":3,"file":"sustainedLoad.js","names":[],"sources":["../../../../src/timecampus/pages/work-patterns/sustainedLoad.ts"],"sourcesContent":["/**\n * Sustained-load signal presentation helpers (BOFF-10427).\n * =========================================================================\n *\n * `mySustainedLoad` returns a level, a rationale and evidence tied to weeks.\n * These helpers only map the service's closed enums to copy and badge tones;\n * they never compute a level of their own, so the card can only show what the\n * service decided.\n *\n * @module timecampus\n */\n\nexport type LoadLevel = \"INSUFFICIENT_DATA\" | \"LOW\" | \"ELEVATED\" | \"HIGH\";\nexport type LoadTone = \"success\" | \"warning\" | \"error\" | \"muted\";\n\nconst LEVEL_LABEL: Record<LoadLevel, string> = {\n INSUFFICIENT_DATA: \"Not enough data\",\n LOW: \"Sustainable\",\n ELEVATED: \"Elevated\",\n HIGH: \"High\",\n};\n\nconst LEVEL_TONE: Record<LoadLevel, LoadTone> = {\n INSUFFICIENT_DATA: \"muted\",\n LOW: \"success\",\n ELEVATED: \"warning\",\n HIGH: \"error\",\n};\n\nconst EVIDENCE_LABEL: Record<string, string> = {\n LONG_HOURS: \"Long hours\",\n AFTER_HOURS: \"After hours\",\n NO_RECOVERY: \"No recovery day\",\n FRAGMENTATION: \"Fragmented days\",\n WITHIN_RANGE: \"Sustainable week\",\n};\n\nconst FALLBACK_COPY: Record<string, string> = {\n AI_NOT_ENABLED: \"AI reasoning is off for this workspace.\",\n PROVIDER_NOT_CONFIGURED: \"AI reasoning is not available here.\",\n INSUFFICIENT_DATA: \"There is not enough tracked time for AI reasoning.\",\n PROVIDER_FAILED: \"The AI model was unavailable, so the rules decided.\",\n INVALID_REPLY: \"The AI answer did not pass our checks, so the rules decided.\",\n LOW_CONFIDENCE: \"The AI model was unsure, so the rules decided.\",\n CREDITS_EXHAUSTED:\n \"This workspace has no AI credits left, so the rules decided.\",\n};\n\nexport function loadLevelLabel(level: LoadLevel): string {\n return LEVEL_LABEL[level] ?? level;\n}\n\nexport function loadLevelTone(level: LoadLevel): LoadTone {\n return LEVEL_TONE[level] ?? \"muted\";\n}\n\nexport function evidenceKindLabel(kind: string): string {\n return EVIDENCE_LABEL[kind] ?? kind;\n}\n\nexport interface ProvenanceInput {\n method: \"RULES\" | \"MODEL\";\n model?: string | null;\n confidence?: number | null;\n fallbackReason?: string | null;\n rulesLevel: LoadLevel;\n}\n\n/** One sentence saying how the level was reached. */\nexport function loadProvenance(signal: ProvenanceInput): string {\n if (signal.method === \"MODEL\") {\n const confidence =\n signal.confidence != null\n ? `, ${Math.round(signal.confidence * 100)}% confident`\n : \"\";\n const model = signal.model ? ` (${signal.model}${confidence})` : \"\";\n return `Read by an AI model${model} from your weekly numbers. The built-in rules read: ${loadLevelLabel(signal.rulesLevel)}.`;\n }\n const reason = signal.fallbackReason\n ? FALLBACK_COPY[signal.fallbackReason]\n : undefined;\n return `Read by the built-in weekly rules.${reason ? ` ${reason}` : \"\"}`;\n}\n\n/** \"Oct 3 – Oct 9\" for two YYYY-MM-DD calendar days, read as local dates. */\nexport function formatWeekRange(weekStart: string, weekEnd: string): string {\n const fmt = (day: string) => {\n const d = new Date(`${day}T12:00:00`);\n return Number.isNaN(d.getTime())\n ? day\n : d.toLocaleDateString(undefined, { month: \"short\", day: \"numeric\" });\n };\n return `${fmt(weekStart)} – ${fmt(weekEnd)}`;\n}\n\n/** A 0..1 share as a whole percentage, or an em dash when unknown. */\nexport function formatShare(share: number | null | undefined): string {\n return share == null ? \"—\" : `${Math.round(share * 100)}%`;\n}\n"],"mappings":";AAeA,IAAM,IAAyC;CAC7C,mBAAmB;CACnB,KAAK;CACL,UAAU;CACV,MAAM;AACR,GAEM,IAA0C;CAC9C,mBAAmB;CACnB,KAAK;CACL,UAAU;CACV,MAAM;AACR,GAEM,IAAyC;CAC7C,YAAY;CACZ,aAAa;CACb,aAAa;CACb,eAAe;CACf,cAAc;AAChB,GAEM,IAAwC;CAC5C,gBAAgB;CAChB,yBAAyB;CACzB,mBAAmB;CACnB,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,mBACE;AACJ;AAEA,SAAgB,EAAe,GAA0B;CACvD,OAAO,EAAY,MAAU;AAC/B;AAEA,SAAgB,EAAc,GAA4B;CACxD,OAAO,EAAW,MAAU;AAC9B;AAEA,SAAgB,EAAkB,GAAsB;CACtD,OAAO,EAAe,MAAS;AACjC;AAWA,SAAgB,EAAe,GAAiC;CAC9D,IAAI,EAAO,WAAW,SAAS;EAC7B,IAAM,IACJ,EAAO,cAAc,OAEjB,KADA,KAAK,KAAK,MAAM,EAAO,aAAa,GAAG,EAAE;EAG/C,OAAO,sBADO,EAAO,QAAQ,KAAK,EAAO,QAAQ,EAAW,KAAK,GAC9B,sDAAsD,EAAe,EAAO,UAAU,EAAE;CAC7H;CACA,IAAM,IAAS,EAAO,iBAClB,EAAc,EAAO,kBACrB,KAAA;CACJ,OAAO,qCAAqC,IAAS,IAAI,MAAW;AACtE;AAGA,SAAgB,EAAgB,GAAmB,GAAyB;CAC1E,IAAM,KAAO,MAAgB;EAC3B,IAAM,oBAAI,IAAI,KAAK,GAAG,EAAI,UAAU;EACpC,OAAO,OAAO,MAAM,EAAE,QAAQ,CAAC,IAC3B,IACA,EAAE,mBAAmB,KAAA,GAAW;GAAE,OAAO;GAAS,KAAK;EAAU,CAAC;CACxE;CACA,OAAO,GAAG,EAAI,CAAS,EAAE,KAAK,EAAI,CAAO;AAC3C;AAGA,SAAgB,EAAY,GAA0C;CACpE,OAAO,KAAS,OAAO,MAAM,GAAG,KAAK,MAAM,IAAQ,GAAG,EAAE;AAC1D"}
|
package/package.json
CHANGED