sidekick-agent-hub 0.19.0 → 0.19.2

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 (2) hide show
  1. package/dist/sidekick-cli.mjs +689 -20
  2. package/package.json +1 -1
@@ -6264,7 +6264,7 @@ var require_modelContext = __commonJS({
6264
6264
  return exports.DEFAULT_CONTEXT_WINDOW;
6265
6265
  if (/\[1m\]/i.test(modelId))
6266
6266
  return 1e6;
6267
- const normalized = modelId.replace(/\[1m\]/gi, "");
6267
+ const normalized = modelId.replace(/\[1m\]/gi, "").trim().toLowerCase();
6268
6268
  if (MODEL_CONTEXT_SIZES[normalized] !== void 0) {
6269
6269
  return MODEL_CONTEXT_SIZES[normalized];
6270
6270
  }
@@ -6504,7 +6504,7 @@ var require_modelInfo = __commonJS({
6504
6504
  function parseModelId(modelId) {
6505
6505
  if (!modelId)
6506
6506
  return null;
6507
- const normalized = modelId.replace(/\[1m\]/gi, "");
6507
+ const normalized = modelId.replace(/\[1m\]/gi, "").trim().toLowerCase();
6508
6508
  const claude = normalized.match(CLAUDE_RE);
6509
6509
  if (claude) {
6510
6510
  return { provider: "anthropic", family: claude[1].toLowerCase(), version: claude[2] };
@@ -6539,22 +6539,29 @@ var require_modelInfo = __commonJS({
6539
6539
  }
6540
6540
  return null;
6541
6541
  }
6542
- function getModelPricing(modelId) {
6543
- if (!modelId)
6544
- return null;
6545
- const normalized = modelId.replace(/\[1m\]/gi, "");
6546
- if (overrideTable[normalized])
6547
- return overrideTable[normalized];
6548
- const overridePrefix = findLongestPrefix(overrideSortedKeys, normalized);
6542
+ function lookupPricing(modelId) {
6543
+ if (overrideTable[modelId])
6544
+ return overrideTable[modelId];
6545
+ const overridePrefix = findLongestPrefix(overrideSortedKeys, modelId);
6549
6546
  if (overridePrefix)
6550
6547
  return overrideTable[overridePrefix];
6551
- if (PRICING_TABLE[normalized])
6552
- return PRICING_TABLE[normalized];
6553
- const staticPrefix = findLongestPrefix(STATIC_SORTED_KEYS, normalized);
6548
+ if (PRICING_TABLE[modelId])
6549
+ return PRICING_TABLE[modelId];
6550
+ const staticPrefix = findLongestPrefix(STATIC_SORTED_KEYS, modelId);
6554
6551
  if (staticPrefix)
6555
6552
  return PRICING_TABLE[staticPrefix];
6556
6553
  return null;
6557
6554
  }
6555
+ function getModelPricing(modelId) {
6556
+ if (!modelId)
6557
+ return null;
6558
+ const stripped = modelId.replace(/\[1m\]/gi, "");
6559
+ const direct = lookupPricing(stripped);
6560
+ if (direct)
6561
+ return direct;
6562
+ const normalized = stripped.trim().toLowerCase();
6563
+ return normalized === stripped ? null : lookupPricing(normalized);
6564
+ }
6558
6565
  function getModelInfo2(modelId) {
6559
6566
  const parsed = parseModelId(modelId);
6560
6567
  return {
@@ -14660,6 +14667,322 @@ var require_composer = __commonJS({
14660
14667
  }
14661
14668
  });
14662
14669
 
14670
+ // ../sidekick-shared/dist/turns/assistantTurn.js
14671
+ var require_assistantTurn = __commonJS({
14672
+ "../sidekick-shared/dist/turns/assistantTurn.js"(exports) {
14673
+ "use strict";
14674
+ Object.defineProperty(exports, "__esModule", { value: true });
14675
+ exports.reasoningSummary = reasoningSummary;
14676
+ exports.isAssistantTurnSubagentTool = isAssistantTurnSubagentTool;
14677
+ exports.segmentAssistantTurn = segmentAssistantTurn;
14678
+ exports.assistantTurnEventsFromSessionEvents = assistantTurnEventsFromSessionEvents;
14679
+ exports.extractTurnSubagents = extractTurnSubagents;
14680
+ var toolSummary_1 = require_toolSummary();
14681
+ var DEFAULT_NARRATION_CHARS = 4e3;
14682
+ var DEFAULT_REASONING_CHARS = 8e3;
14683
+ var DEFAULT_PROCESS_STEPS = 60;
14684
+ var DEFAULT_REASONING_BLOCKS = 24;
14685
+ var DEFAULT_TOOL_INPUT_CHARS = 200;
14686
+ var SUBAGENT_TOOL_NAMES = /* @__PURE__ */ new Set(["Task"]);
14687
+ var LABEL_MAX = 80;
14688
+ var TITLE_RE = /^\s*\*\*([^*\n]+)\*\*[ \t]*(?:\n+([\s\S]*))?$/;
14689
+ var TITLE_MAX = 100;
14690
+ function reasoningSummary(text) {
14691
+ const normalized = text.replace(/\r\n/g, "\n");
14692
+ const trimmed = normalized.trim();
14693
+ if (trimmed === "")
14694
+ return { title: null, body: "" };
14695
+ const match = TITLE_RE.exec(normalized);
14696
+ if (match) {
14697
+ const title = match[1].trim();
14698
+ if (title !== "" && title.length <= TITLE_MAX) {
14699
+ return { title, body: (match[2] ?? "").trim() };
14700
+ }
14701
+ }
14702
+ return { title: null, body: trimmed };
14703
+ }
14704
+ function isAssistantTurnSubagentTool(toolName) {
14705
+ return toolName != null && SUBAGENT_TOOL_NAMES.has(toolName);
14706
+ }
14707
+ function segmentAssistantTurn(events, options = {}) {
14708
+ const maxNarrationChars = options.maxNarrationChars ?? DEFAULT_NARRATION_CHARS;
14709
+ const maxReasoningChars = options.maxReasoningChars ?? DEFAULT_REASONING_CHARS;
14710
+ const maxProcessSteps = options.maxProcessSteps ?? DEFAULT_PROCESS_STEPS;
14711
+ const maxReasoningBlocks = options.maxReasoningBlocks ?? DEFAULT_REASONING_BLOCKS;
14712
+ const subagentStatus = options.subagentStatus ?? "completed";
14713
+ const reasoningParts = [];
14714
+ const steps = [];
14715
+ let textBuffer = [];
14716
+ let toolGroup = null;
14717
+ function closeToolGroup() {
14718
+ if (toolGroup != null && toolGroup.tools.length > 0) {
14719
+ steps.push(toolGroup);
14720
+ }
14721
+ toolGroup = null;
14722
+ }
14723
+ function sealTextAsNarration() {
14724
+ const text = joinText(textBuffer);
14725
+ if (text !== "") {
14726
+ steps.push({ kind: "narration", text: capText(text, maxNarrationChars) });
14727
+ }
14728
+ textBuffer = [];
14729
+ }
14730
+ for (const event of events) {
14731
+ switch (event.eventType) {
14732
+ case "text": {
14733
+ if (event.content.trim() === "")
14734
+ break;
14735
+ closeToolGroup();
14736
+ textBuffer.push(event.content);
14737
+ break;
14738
+ }
14739
+ case "thinking": {
14740
+ if (event.content.trim() === "")
14741
+ break;
14742
+ sealTextAsNarration();
14743
+ closeToolGroup();
14744
+ reasoningParts.push(event.content);
14745
+ break;
14746
+ }
14747
+ case "tool_use": {
14748
+ sealTextAsNarration();
14749
+ if (toolGroup == null)
14750
+ toolGroup = { kind: "toolGroup", tools: [] };
14751
+ const toolName = event.toolName ?? "tool";
14752
+ const tool = { toolName };
14753
+ const toolInput = formatTurnToolInput(toolName, event.toolInput, event.toolUseId, options);
14754
+ if (toolInput != null && toolInput !== "")
14755
+ tool.toolInput = toolInput;
14756
+ if (event.toolUseId != null && event.toolUseId !== "")
14757
+ tool.toolUseId = event.toolUseId;
14758
+ toolGroup.tools.push(tool);
14759
+ break;
14760
+ }
14761
+ default:
14762
+ break;
14763
+ }
14764
+ }
14765
+ const answer = joinText(textBuffer);
14766
+ closeToolGroup();
14767
+ const reasoningBlocks = capReasoningBlocks(reasoningParts.filter((part) => part.trim() !== "").map((part) => capText(part, maxReasoningChars)), maxReasoningBlocks);
14768
+ const process14 = { steps: capProcessSteps(steps, maxProcessSteps) };
14769
+ return {
14770
+ schemaVersion: 1,
14771
+ answer,
14772
+ reasoning: capText(joinText(reasoningParts), maxReasoningChars),
14773
+ reasoningBlocks,
14774
+ process: process14,
14775
+ subagents: extractTurnSubagents(flattenProcessTools(process14), { status: subagentStatus })
14776
+ };
14777
+ }
14778
+ function assistantTurnEventsFromSessionEvents(events) {
14779
+ const result = [];
14780
+ for (const event of events) {
14781
+ if (event.type === "assistant") {
14782
+ appendMessageContentEvents(result, event.message.content);
14783
+ continue;
14784
+ }
14785
+ if (event.type === "tool_use" && event.tool != null) {
14786
+ result.push({
14787
+ eventType: "tool_use",
14788
+ content: "",
14789
+ toolName: event.tool.name,
14790
+ toolInput: event.tool.input
14791
+ });
14792
+ continue;
14793
+ }
14794
+ if (event.type === "tool_result") {
14795
+ result.push({
14796
+ eventType: "tool_result",
14797
+ content: stringifyValue(event.result?.output),
14798
+ toolUseId: event.result?.tool_use_id
14799
+ });
14800
+ }
14801
+ }
14802
+ return result;
14803
+ }
14804
+ function extractTurnSubagents(tools, options) {
14805
+ const result = [];
14806
+ for (const tool of tools) {
14807
+ if (!isAssistantTurnSubagentTool(tool.toolName))
14808
+ continue;
14809
+ const input = parseSubagentInput(tool.toolInput);
14810
+ const index = result.length;
14811
+ const label = capLabel(input.description ?? input.agentType ?? `Agent ${index + 1}`);
14812
+ const ref = {
14813
+ id: tool.toolUseId && tool.toolUseId !== "" ? tool.toolUseId : `subagent-${index}`,
14814
+ label,
14815
+ status: options.status
14816
+ };
14817
+ if (input.agentType != null)
14818
+ ref.agentType = input.agentType;
14819
+ result.push(ref);
14820
+ }
14821
+ return result;
14822
+ }
14823
+ function appendMessageContentEvents(result, content) {
14824
+ if (typeof content === "string") {
14825
+ if (content !== "")
14826
+ result.push({ eventType: "text", content });
14827
+ return;
14828
+ }
14829
+ if (!Array.isArray(content))
14830
+ return;
14831
+ for (const block of content) {
14832
+ if (!isRecord(block))
14833
+ continue;
14834
+ const type = stringValue(block.type);
14835
+ if (type === "text") {
14836
+ const text = stringValue(block.text) ?? stringValue(block.content);
14837
+ if (text != null)
14838
+ result.push({ eventType: "text", content: text });
14839
+ continue;
14840
+ }
14841
+ if (type === "thinking" || type === "reasoning") {
14842
+ const text = stringValue(block.thinking) ?? stringValue(block.text) ?? stringValue(block.content);
14843
+ if (text != null)
14844
+ result.push({ eventType: "thinking", content: text });
14845
+ continue;
14846
+ }
14847
+ if (type === "tool_use") {
14848
+ const toolName = stringValue(block.name) ?? "tool";
14849
+ const event = {
14850
+ eventType: "tool_use",
14851
+ content: "",
14852
+ toolName,
14853
+ toolInput: block.input
14854
+ };
14855
+ const toolUseId = stringValue(block.id);
14856
+ if (toolUseId != null)
14857
+ event.toolUseId = toolUseId;
14858
+ result.push(event);
14859
+ continue;
14860
+ }
14861
+ if (type === "tool_result") {
14862
+ const event = {
14863
+ eventType: "tool_result",
14864
+ content: stringifyValue(block.content)
14865
+ };
14866
+ const toolUseId = stringValue(block.tool_use_id);
14867
+ if (toolUseId != null)
14868
+ event.toolUseId = toolUseId;
14869
+ result.push(event);
14870
+ }
14871
+ }
14872
+ }
14873
+ function formatTurnToolInput(toolName, toolInput, toolUseId, options) {
14874
+ if (options.sanitizeToolInput != null) {
14875
+ return options.sanitizeToolInput({ toolName, toolInput, toolUseId });
14876
+ }
14877
+ if (toolInput == null)
14878
+ return void 0;
14879
+ const maxChars = options.toolInputMaxChars ?? DEFAULT_TOOL_INPUT_CHARS;
14880
+ if (isAssistantTurnSubagentTool(toolName)) {
14881
+ const input = parseSubagentInput(toolInput);
14882
+ const projection = {};
14883
+ if (input.agentType != null)
14884
+ projection.subagent_type = (0, toolSummary_1.truncate)(input.agentType, LABEL_MAX);
14885
+ if (input.description != null)
14886
+ projection.description = (0, toolSummary_1.truncate)(input.description, maxChars);
14887
+ return JSON.stringify(projection);
14888
+ }
14889
+ const record = coerceRecord(toolInput);
14890
+ if (record != null) {
14891
+ const summary = (0, toolSummary_1.formatToolSummary)(toolName, record);
14892
+ return summary === "" ? void 0 : (0, toolSummary_1.truncate)(summary, maxChars);
14893
+ }
14894
+ if (typeof toolInput === "string") {
14895
+ return (0, toolSummary_1.truncate)(toolInput, maxChars);
14896
+ }
14897
+ return (0, toolSummary_1.truncate)(stringifyValue(toolInput), maxChars);
14898
+ }
14899
+ function flattenProcessTools(process14) {
14900
+ const result = [];
14901
+ for (const step of process14.steps) {
14902
+ if (step.kind === "toolGroup")
14903
+ result.push(...step.tools);
14904
+ }
14905
+ return result;
14906
+ }
14907
+ function capProcessSteps(steps, maxRetainedSteps) {
14908
+ if (!Number.isFinite(maxRetainedSteps) || maxRetainedSteps < 0)
14909
+ return [];
14910
+ const retainedCount = Math.floor(maxRetainedSteps);
14911
+ if (steps.length <= retainedCount)
14912
+ return steps;
14913
+ const kept = retainedCount > 0 ? steps.slice(steps.length - retainedCount) : [];
14914
+ const omitted = steps.length - kept.length;
14915
+ return [{ kind: "narration", text: `... ${omitted} earlier process step${omitted === 1 ? "" : "s"} omitted` }, ...kept];
14916
+ }
14917
+ function capReasoningBlocks(blocks, maxRetainedBlocks) {
14918
+ if (!Number.isFinite(maxRetainedBlocks) || maxRetainedBlocks < 0)
14919
+ return [];
14920
+ const retainedCount = Math.floor(maxRetainedBlocks);
14921
+ if (blocks.length <= retainedCount)
14922
+ return blocks;
14923
+ const kept = retainedCount > 0 ? blocks.slice(0, retainedCount) : [];
14924
+ const omitted = blocks.length - kept.length;
14925
+ return [...kept, `... ${omitted} more reasoning block${omitted === 1 ? "" : "s"} omitted`];
14926
+ }
14927
+ function parseSubagentInput(input) {
14928
+ const record = coerceRecord(input);
14929
+ if (record == null)
14930
+ return {};
14931
+ const description = stringValue(record.description)?.trim();
14932
+ const agentType = (stringValue(record.subagent_type) ?? stringValue(record.subagentType))?.trim();
14933
+ return {
14934
+ ...description != null && description !== "" ? { description } : {},
14935
+ ...agentType != null && agentType !== "" ? { agentType } : {}
14936
+ };
14937
+ }
14938
+ function coerceRecord(value) {
14939
+ if (isRecord(value))
14940
+ return value;
14941
+ if (typeof value !== "string" || value.trim() === "")
14942
+ return null;
14943
+ try {
14944
+ const parsed = JSON.parse(value);
14945
+ return isRecord(parsed) ? parsed : null;
14946
+ } catch {
14947
+ return null;
14948
+ }
14949
+ }
14950
+ function capLabel(label) {
14951
+ return label.length <= LABEL_MAX ? label : `${label.slice(0, LABEL_MAX - 3).trimEnd()}...`;
14952
+ }
14953
+ function capText(text, maxChars) {
14954
+ if (!Number.isFinite(maxChars) || maxChars < 0)
14955
+ return "";
14956
+ const limit = Math.floor(maxChars);
14957
+ if (text.length <= limit)
14958
+ return text;
14959
+ if (limit <= 3)
14960
+ return ".".repeat(limit);
14961
+ return `${text.slice(0, limit - 3).trimEnd()}...`;
14962
+ }
14963
+ function joinText(parts) {
14964
+ return parts.filter((part) => part.trim() !== "").join("\n\n");
14965
+ }
14966
+ function stringifyValue(value) {
14967
+ if (value == null)
14968
+ return "";
14969
+ if (typeof value === "string")
14970
+ return value;
14971
+ try {
14972
+ return JSON.stringify(value, null, 2);
14973
+ } catch {
14974
+ return String(value);
14975
+ }
14976
+ }
14977
+ function stringValue(value) {
14978
+ return typeof value === "string" ? value : void 0;
14979
+ }
14980
+ function isRecord(value) {
14981
+ return value != null && typeof value === "object" && !Array.isArray(value);
14982
+ }
14983
+ }
14984
+ });
14985
+
14663
14986
  // ../sidekick-shared/dist/parsers/changelogParser.js
14664
14987
  var require_changelogParser = __commonJS({
14665
14988
  "../sidekick-shared/dist/parsers/changelogParser.js"(exports) {
@@ -37985,6 +38308,7 @@ var require_sessionEvent = __commonJS({
37985
38308
  "use strict";
37986
38309
  Object.defineProperty(exports, "__esModule", { value: true });
37987
38310
  exports.sessionEventSchema = exports.permissionModeSchema = exports.sessionMessageSchema = exports.messageUsageSchema = void 0;
38311
+ exports.extractSessionEvents = extractSessionEvents;
37988
38312
  var zod_1 = require_zod();
37989
38313
  exports.messageUsageSchema = zod_1.z.object({
37990
38314
  input_tokens: zod_1.z.number(),
@@ -38036,6 +38360,246 @@ var require_sessionEvent = __commonJS({
38036
38360
  is_error: zod_1.z.boolean().optional()
38037
38361
  }).optional()
38038
38362
  });
38363
+ var MAX_PROGRESS_DEPTH = 8;
38364
+ function extractSessionEvents(raw, depth = 0) {
38365
+ const direct = exports.sessionEventSchema.safeParse(raw);
38366
+ if (direct.success)
38367
+ return [direct.data];
38368
+ if (depth >= MAX_PROGRESS_DEPTH)
38369
+ return [];
38370
+ if (typeof raw === "object" && raw !== null && raw.type === "progress") {
38371
+ const data = raw.data;
38372
+ if (typeof data === "object" && data !== null) {
38373
+ const message = data.message;
38374
+ if (typeof message === "object" && message !== null) {
38375
+ return extractSessionEvents(message, depth + 1);
38376
+ }
38377
+ }
38378
+ }
38379
+ return [];
38380
+ }
38381
+ }
38382
+ });
38383
+
38384
+ // ../sidekick-shared/dist/schemas/quota.js
38385
+ var require_quota2 = __commonJS({
38386
+ "../sidekick-shared/dist/schemas/quota.js"(exports) {
38387
+ "use strict";
38388
+ Object.defineProperty(exports, "__esModule", { value: true });
38389
+ exports.providerQuotaMapSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaStateSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaWindowSchema = void 0;
38390
+ var zod_1 = require_zod();
38391
+ exports.quotaWindowSchema = zod_1.z.object({
38392
+ utilization: zod_1.z.number(),
38393
+ resetsAt: zod_1.z.string()
38394
+ });
38395
+ exports.quotaFailureKindSchema = zod_1.z.enum([
38396
+ "auth",
38397
+ "network",
38398
+ "rate_limit",
38399
+ "server",
38400
+ "unknown"
38401
+ ]);
38402
+ exports.quotaProviderIdSchema = zod_1.z.enum([
38403
+ "claude-code",
38404
+ "codex"
38405
+ ]);
38406
+ exports.quotaSourceSchema = zod_1.z.enum([
38407
+ "api",
38408
+ "session",
38409
+ "cache"
38410
+ ]);
38411
+ exports.quotaStateSchema = zod_1.z.object({
38412
+ fiveHour: exports.quotaWindowSchema,
38413
+ sevenDay: exports.quotaWindowSchema,
38414
+ available: zod_1.z.boolean(),
38415
+ error: zod_1.z.string().optional(),
38416
+ failureKind: exports.quotaFailureKindSchema.optional(),
38417
+ httpStatus: zod_1.z.number().optional(),
38418
+ retryAfterMs: zod_1.z.number().optional(),
38419
+ projectedFiveHour: zod_1.z.number().optional(),
38420
+ projectedSevenDay: zod_1.z.number().optional(),
38421
+ providerId: exports.quotaProviderIdSchema.optional(),
38422
+ source: exports.quotaSourceSchema.optional(),
38423
+ capturedAt: zod_1.z.string().optional(),
38424
+ stale: zod_1.z.boolean().optional(),
38425
+ fiveHourLabel: zod_1.z.string().optional(),
38426
+ sevenDayLabel: zod_1.z.string().optional(),
38427
+ limitId: zod_1.z.string().optional(),
38428
+ limitName: zod_1.z.string().optional(),
38429
+ credits: zod_1.z.unknown().optional(),
38430
+ planType: zod_1.z.string().optional(),
38431
+ rateLimitReachedType: zod_1.z.string().optional()
38432
+ });
38433
+ exports.peakHoursStateSchema = zod_1.z.object({
38434
+ status: zod_1.z.enum(["peak", "off_peak", "unknown"]),
38435
+ isPeak: zod_1.z.boolean(),
38436
+ sessionLimitSpeed: zod_1.z.enum(["normal", "faster", "unknown"]),
38437
+ label: zod_1.z.string(),
38438
+ peakHoursDescription: zod_1.z.string(),
38439
+ nextChange: zod_1.z.string().nullable(),
38440
+ minutesUntilChange: zod_1.z.number().nullable(),
38441
+ note: zod_1.z.string(),
38442
+ updatedAt: zod_1.z.string(),
38443
+ unavailable: zod_1.z.boolean(),
38444
+ notApplicable: zod_1.z.boolean().optional()
38445
+ });
38446
+ exports.quotaFailureDescriptorSchema = zod_1.z.object({
38447
+ severity: zod_1.z.enum(["info", "warning", "error"]),
38448
+ title: zod_1.z.string(),
38449
+ message: zod_1.z.string(),
38450
+ detail: zod_1.z.string().optional(),
38451
+ alertKey: zod_1.z.string(),
38452
+ isRetryable: zod_1.z.boolean()
38453
+ });
38454
+ exports.runtimeQuotaProviderSchema = zod_1.z.enum([
38455
+ "claude",
38456
+ "codex"
38457
+ ]);
38458
+ var providerQuotaExtensionShape = {
38459
+ accountLabel: zod_1.z.string().optional(),
38460
+ accountDetail: zod_1.z.string().optional(),
38461
+ peakHours: exports.peakHoursStateSchema.nullable().optional(),
38462
+ failure: exports.quotaFailureDescriptorSchema.nullable().optional()
38463
+ };
38464
+ exports.providerQuotaStateSchema = exports.quotaStateSchema.extend({
38465
+ runtimeProvider: exports.runtimeQuotaProviderSchema,
38466
+ ...providerQuotaExtensionShape
38467
+ });
38468
+ exports.claudeProviderQuotaStateSchema = exports.quotaStateSchema.extend({
38469
+ runtimeProvider: zod_1.z.literal("claude"),
38470
+ ...providerQuotaExtensionShape
38471
+ });
38472
+ exports.codexProviderQuotaStateSchema = exports.quotaStateSchema.extend({
38473
+ runtimeProvider: zod_1.z.literal("codex"),
38474
+ ...providerQuotaExtensionShape
38475
+ });
38476
+ exports.providerQuotaMapSchema = zod_1.z.object({
38477
+ claude: exports.claudeProviderQuotaStateSchema.optional(),
38478
+ codex: exports.codexProviderQuotaStateSchema.optional()
38479
+ });
38480
+ }
38481
+ });
38482
+
38483
+ // ../sidekick-shared/dist/schemas/quotaHistory.js
38484
+ var require_quotaHistory2 = __commonJS({
38485
+ "../sidekick-shared/dist/schemas/quotaHistory.js"(exports) {
38486
+ "use strict";
38487
+ Object.defineProperty(exports, "__esModule", { value: true });
38488
+ exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = exports.quotaHistoryRuntimeProviderSchema = void 0;
38489
+ var zod_1 = require_zod();
38490
+ exports.quotaHistoryRuntimeProviderSchema = zod_1.z.enum([
38491
+ "claude",
38492
+ "codex"
38493
+ ]);
38494
+ exports.quotaHistorySampleSchema = zod_1.z.object({
38495
+ timestamp: zod_1.z.string(),
38496
+ runtimeProvider: exports.quotaHistoryRuntimeProviderSchema,
38497
+ providerId: zod_1.z.string(),
38498
+ workspaceId: zod_1.z.string(),
38499
+ fiveHour: zod_1.z.object({ utilization: zod_1.z.number(), resetsAt: zod_1.z.string() }),
38500
+ sevenDay: zod_1.z.object({ utilization: zod_1.z.number(), resetsAt: zod_1.z.string() }),
38501
+ available: zod_1.z.boolean(),
38502
+ error: zod_1.z.string().optional(),
38503
+ source: zod_1.z.enum(["session", "cache", "api"]).optional(),
38504
+ stale: zod_1.z.boolean().optional()
38505
+ });
38506
+ exports.quotaHistoryDailyBucketSchema = zod_1.z.object({
38507
+ date: zod_1.z.string(),
38508
+ samples: zod_1.z.number(),
38509
+ maxUtilizationFiveHour: zod_1.z.number(),
38510
+ maxUtilizationSevenDay: zod_1.z.number(),
38511
+ avgUtilizationFiveHour: zod_1.z.number(),
38512
+ avgUtilizationSevenDay: zod_1.z.number(),
38513
+ anyUnavailable: zod_1.z.boolean()
38514
+ });
38515
+ }
38516
+ });
38517
+
38518
+ // ../sidekick-shared/dist/schemas/accountStatus.js
38519
+ var require_accountStatus2 = __commonJS({
38520
+ "../sidekick-shared/dist/schemas/accountStatus.js"(exports) {
38521
+ "use strict";
38522
+ Object.defineProperty(exports, "__esModule", { value: true });
38523
+ exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = void 0;
38524
+ var zod_1 = require_zod();
38525
+ exports.activeProviderAccountStatusSchema = zod_1.z.object({
38526
+ present: zod_1.z.boolean(),
38527
+ email: zod_1.z.string().optional(),
38528
+ label: zod_1.z.string().optional()
38529
+ });
38530
+ exports.activeAccountStatusSchema = zod_1.z.object({
38531
+ ok: zod_1.z.boolean(),
38532
+ claude: exports.activeProviderAccountStatusSchema,
38533
+ codex: exports.activeProviderAccountStatusSchema,
38534
+ error: zod_1.z.string().optional()
38535
+ });
38536
+ }
38537
+ });
38538
+
38539
+ // ../sidekick-shared/dist/schemas/assistantTurn.js
38540
+ var require_assistantTurn2 = __commonJS({
38541
+ "../sidekick-shared/dist/schemas/assistantTurn.js"(exports) {
38542
+ "use strict";
38543
+ Object.defineProperty(exports, "__esModule", { value: true });
38544
+ exports.assistantTurnProjectionSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnProcessSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnToolRefSchema = exports.assistantTurnEventSchema = exports.assistantTurnEventTypeSchema = void 0;
38545
+ var zod_1 = require_zod();
38546
+ exports.assistantTurnEventTypeSchema = zod_1.z.enum([
38547
+ "text",
38548
+ "thinking",
38549
+ "tool_use",
38550
+ "tool_result",
38551
+ "status",
38552
+ "error",
38553
+ "delta",
38554
+ "progress"
38555
+ ]);
38556
+ exports.assistantTurnEventSchema = zod_1.z.object({
38557
+ eventType: exports.assistantTurnEventTypeSchema,
38558
+ content: zod_1.z.string(),
38559
+ deltaKind: zod_1.z.enum(["text", "thinking", "tool_input"]).optional(),
38560
+ toolName: zod_1.z.string().optional(),
38561
+ toolInput: zod_1.z.unknown().optional(),
38562
+ toolUseId: zod_1.z.string().optional()
38563
+ });
38564
+ exports.assistantTurnToolRefSchema = zod_1.z.object({
38565
+ toolName: zod_1.z.string(),
38566
+ toolInput: zod_1.z.string().optional(),
38567
+ toolUseId: zod_1.z.string().optional()
38568
+ });
38569
+ exports.assistantTurnNarrationStepSchema = zod_1.z.object({
38570
+ kind: zod_1.z.literal("narration"),
38571
+ text: zod_1.z.string()
38572
+ });
38573
+ exports.assistantTurnToolGroupStepSchema = zod_1.z.object({
38574
+ kind: zod_1.z.literal("toolGroup"),
38575
+ tools: zod_1.z.array(exports.assistantTurnToolRefSchema)
38576
+ });
38577
+ exports.assistantTurnProcessStepSchema = zod_1.z.discriminatedUnion("kind", [
38578
+ exports.assistantTurnNarrationStepSchema,
38579
+ exports.assistantTurnToolGroupStepSchema
38580
+ ]);
38581
+ exports.assistantTurnProcessSchema = zod_1.z.object({
38582
+ steps: zod_1.z.array(exports.assistantTurnProcessStepSchema)
38583
+ });
38584
+ exports.assistantTurnSubagentStatusSchema = zod_1.z.enum([
38585
+ "running",
38586
+ "completed",
38587
+ "failed"
38588
+ ]);
38589
+ exports.assistantTurnSubagentSchema = zod_1.z.object({
38590
+ id: zod_1.z.string(),
38591
+ label: zod_1.z.string(),
38592
+ agentType: zod_1.z.string().optional(),
38593
+ status: exports.assistantTurnSubagentStatusSchema
38594
+ });
38595
+ exports.assistantTurnProjectionSchema = zod_1.z.object({
38596
+ schemaVersion: zod_1.z.literal(1),
38597
+ answer: zod_1.z.string(),
38598
+ reasoning: zod_1.z.string(),
38599
+ reasoningBlocks: zod_1.z.array(zod_1.z.string()),
38600
+ process: exports.assistantTurnProcessSchema,
38601
+ subagents: zod_1.z.array(exports.assistantTurnSubagentSchema)
38602
+ });
38039
38603
  }
38040
38604
  });
38041
38605
 
@@ -38102,9 +38666,10 @@ var require_dist = __commonJS({
38102
38666
  "use strict";
38103
38667
  Object.defineProperty(exports, "__esModule", { value: true });
38104
38668
  exports.findActiveClaudeSession = exports.discoverSessionDirectory = exports.getClaudeSessionDirectory = exports.encodeClaudeWorkspacePath = exports.detectSessionActivity = exports.extractTaskInfo = exports.scanSubagentDir = exports.normalizeCodexToolInput = exports.normalizeCodexToolName = exports.extractPatchFilePaths = exports.CodexRolloutParser = exports.parseDbPartData = exports.parseDbMessageData = exports.convertOpenCodeMessage = exports.detectPlanModeFromText = exports.normalizeToolInput = exports.normalizeToolName = exports.TRUNCATION_PATTERNS = exports.JsonlParser = exports.CodexProvider = exports.OpenCodeProvider = exports.ClaudeCodeProvider = exports.getAllDetectedProviders = exports.detectProvider = exports.readClaudeCodePlanFiles = exports.getPlanAnalytics = exports.writePlans = exports.getLatestPlan = exports.readPlans = exports.readLatestHandoff = exports.readHistory = exports.readNotes = exports.readDecisions = exports.readTasks = exports.getProjectSlugRaw = exports.getProjectSlug = exports.encodeWorkspacePath = exports.getGlobalDataPath = exports.getProjectDataPath = exports.getConfigDir = exports.MAX_PLANS_PER_PROJECT = exports.PLAN_SCHEMA_VERSION = exports.createEmptyTokenTotals = exports.HISTORICAL_DATA_SCHEMA_VERSION = exports.STALENESS_THRESHOLDS = exports.IMPORTANCE_DECAY_FACTORS = exports.KNOWLEDGE_NOTE_SCHEMA_VERSION = exports.DECISION_LOG_SCHEMA_VERSION = exports.normalizeTaskStatus = exports.TASK_PERSISTENCE_SCHEMA_VERSION = void 0;
38105
- exports.EventAggregator = exports.getRandomPhrase = exports.PHRASE_CATEGORIES = exports.ALL_PHRASES = exports.HIGHLIGHT_CSS = exports.clearHighlightCache = exports.highlightEvent = exports.formatSessionJson = exports.formatSessionMarkdown = exports.formatSessionText = exports.classifyNoise = exports.shouldMergeWithPrevious = exports.classifyFollowEvent = exports.classifyMessage = exports.getSoftNoiseReason = exports.isHardNoiseFollowEvent = exports.isHardNoise = exports.formatToolSummary = exports.formatTokenCount = exports.formatDurationMs = exports.createJsonlTail = exports.toFollowEvents = exports.createWatcher = exports.parseChangelog = exports.extractProposedPlanShared = exports.parsePlanMarkdownShared = exports.PlanExtractor = exports.readSessionContextSnapshot = exports.createSessionContextProjector = exports.calculateSessionContextPressure = exports.buildSessionContextSnapshot = exports.composeContext = exports.FilterEngine = exports.searchSessions = exports.CodexDatabase = exports.OpenCodeDatabase = exports.discoverDebugLogs = exports.collapseDuplicates = exports.filterByLevel = exports.parseDebugLog = exports.scanSubagentTraces = exports.findAllSessionsWithWorktrees = exports.discoverWorktreeSiblings = exports.resolveWorktreeMainRepo = exports.getAllClaudeProjectFolders = exports.decodeEncodedPath = exports.getMostRecentlyActiveSessionDir = exports.findSubdirectorySessionDirs = exports.findSessionsInDirectory = exports.findAllClaudeSessions = void 0;
38106
- exports.fetchQuota = exports.removeCodexAccount = exports.switchToCodexAccount = exports.finalizeCodexAccount = exports.prepareCodexAccount = exports.getCodexExecutionEnv = exports.resolveSidekickCodexHome = exports.getActiveCodexAccount = exports.listCodexAccounts = exports.getSystemCodexHome = exports.getCodexMonitoringHomes = exports.getCodexProfileHome = exports.getCodexProfilesDir = exports.getActiveAccountStatus = exports.removeSavedAccountProfile = exports.replaceSavedAccountProfiles = exports.setActiveSavedAccount = exports.upsertSavedAccountProfile = exports.getActiveSavedAccount = exports.listSavedAccountProfiles = exports.writeSavedAccountRegistry = exports.readSavedAccountRegistry = exports.getAccountsDir = exports.isMultiAccountEnabled = exports.getActiveAccount = exports.listAccounts = exports.removeAccount = exports.switchToAccount = exports.addCurrentAccount = exports.readActiveClaudeAccount = exports.writeAccountRegistry = exports.readAccountRegistry = exports.ensureDefaultAccounts = exports.readClaudeMaxAccessTokenSync = exports.readClaudeMaxCredentials = exports.writeActiveCredentials = exports.readActiveCredentials = exports.openInBrowser = exports.parseTranscriptFromEvents = exports.parseTranscript = exports.generateHtmlReport = exports.PatternExtractor = exports.HeatmapTracker = exports.FrequencyTracker = exports.getSnapshotPath = exports.isSnapshotValid = exports.deleteSnapshot = exports.loadSnapshot = exports.saveSnapshot = exports.parseTodoDependencies = void 0;
38107
- exports.scopePeakHoursToSessionProvider = exports.isClaudeCodeSessionProvider = exports.fetchPeakHoursStatus = exports.createPeakHoursNotApplicableState = exports.fetchOpenAIStatus = exports.fetchProviderStatus = exports.permissionModeSchema = exports.sessionEventSchema = exports.sessionMessageSchema = exports.messageUsageSchema = exports.extractToolCalls = exports.extractToolCall = exports.extractTokenUsage = exports.LITELLM_CATALOG_URL = exports.normalizeLiteLlmCatalog = exports.hydratePricingCatalog = exports.formatCost = exports.sortModelIds = exports.compareModelIds = exports.getModelDisplayInfo = exports.shortModelName = exports.mergeCostSources = exports.calculateCostWithProvenance = exports.calculateCostWithPricing = exports.calculateCost = exports.getModelInfo = exports.getModelPricing = exports.parseModelId = exports.DEFAULT_CONTEXT_WINDOW = exports.getModelContextWindowSize = exports.MultiProviderQuotaService = exports.CodexQuotaWatcher = exports.resolveCodexQuotaFromLocalSources = exports.resolveCodexQuota = exports.readLatestCodexQuotaFromRollouts = exports.quotaFromCodexRateLimits = exports.fetchCodexQuotaFromApi = exports.getWorkspaceIdFromPath = exports.pruneQuotaHistory = exports.readQuotaHistoryDailyBuckets = exports.readQuotaHistoryRange = exports.appendQuotaHistorySample = exports.writeQuotaSnapshot = exports.readQuotaSnapshot = exports.QuotaPoller = exports.describeQuotaFailure = void 0;
38669
+ exports.clearHighlightCache = exports.highlightEvent = exports.formatSessionJson = exports.formatSessionMarkdown = exports.formatSessionText = exports.classifyNoise = exports.shouldMergeWithPrevious = exports.classifyFollowEvent = exports.classifyMessage = exports.getSoftNoiseReason = exports.isHardNoiseFollowEvent = exports.isHardNoise = exports.formatToolSummary = exports.formatTokenCount = exports.formatDurationMs = exports.createJsonlTail = exports.toFollowEvents = exports.createWatcher = exports.parseChangelog = exports.extractProposedPlanShared = exports.parsePlanMarkdownShared = exports.PlanExtractor = exports.segmentAssistantTurn = exports.reasoningSummary = exports.isAssistantTurnSubagentTool = exports.extractTurnSubagents = exports.assistantTurnEventsFromSessionEvents = exports.readSessionContextSnapshot = exports.createSessionContextProjector = exports.calculateSessionContextPressure = exports.buildSessionContextSnapshot = exports.composeContext = exports.FilterEngine = exports.searchSessions = exports.CodexDatabase = exports.OpenCodeDatabase = exports.discoverDebugLogs = exports.collapseDuplicates = exports.filterByLevel = exports.parseDebugLog = exports.scanSubagentTraces = exports.findAllSessionsWithWorktrees = exports.discoverWorktreeSiblings = exports.resolveWorktreeMainRepo = exports.getAllClaudeProjectFolders = exports.decodeEncodedPath = exports.getMostRecentlyActiveSessionDir = exports.findSubdirectorySessionDirs = exports.findSessionsInDirectory = exports.findAllClaudeSessions = void 0;
38670
+ exports.getCodexExecutionEnv = exports.resolveSidekickCodexHome = exports.getActiveCodexAccount = exports.listCodexAccounts = exports.getSystemCodexHome = exports.getCodexMonitoringHomes = exports.getCodexProfileHome = exports.getCodexProfilesDir = exports.getActiveAccountStatus = exports.removeSavedAccountProfile = exports.replaceSavedAccountProfiles = exports.setActiveSavedAccount = exports.upsertSavedAccountProfile = exports.getActiveSavedAccount = exports.listSavedAccountProfiles = exports.writeSavedAccountRegistry = exports.readSavedAccountRegistry = exports.getAccountsDir = exports.isMultiAccountEnabled = exports.getActiveAccount = exports.listAccounts = exports.removeAccount = exports.switchToAccount = exports.addCurrentAccount = exports.readActiveClaudeAccount = exports.writeAccountRegistry = exports.readAccountRegistry = exports.ensureDefaultAccounts = exports.readClaudeMaxAccessTokenSync = exports.readClaudeMaxCredentials = exports.writeActiveCredentials = exports.readActiveCredentials = exports.openInBrowser = exports.parseTranscriptFromEvents = exports.parseTranscript = exports.generateHtmlReport = exports.PatternExtractor = exports.HeatmapTracker = exports.FrequencyTracker = exports.getSnapshotPath = exports.isSnapshotValid = exports.deleteSnapshot = exports.loadSnapshot = exports.saveSnapshot = exports.parseTodoDependencies = exports.EventAggregator = exports.getRandomPhrase = exports.PHRASE_CATEGORIES = exports.ALL_PHRASES = exports.HIGHLIGHT_CSS = void 0;
38671
+ exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaStateSchema = exports.quotaWindowSchema = exports.extractSessionEvents = exports.permissionModeSchema = exports.sessionEventSchema = exports.sessionMessageSchema = exports.messageUsageSchema = exports.extractToolCalls = exports.extractToolCall = exports.extractTokenUsage = exports.LITELLM_CATALOG_URL = exports.normalizeLiteLlmCatalog = exports.hydratePricingCatalog = exports.formatCost = exports.sortModelIds = exports.compareModelIds = exports.getModelDisplayInfo = exports.shortModelName = exports.mergeCostSources = exports.calculateCostWithProvenance = exports.calculateCostWithPricing = exports.calculateCost = exports.getModelInfo = exports.getModelPricing = exports.parseModelId = exports.DEFAULT_CONTEXT_WINDOW = exports.getModelContextWindowSize = exports.MultiProviderQuotaService = exports.CodexQuotaWatcher = exports.resolveCodexQuotaFromLocalSources = exports.resolveCodexQuota = exports.readLatestCodexQuotaFromRollouts = exports.quotaFromCodexRateLimits = exports.fetchCodexQuotaFromApi = exports.getWorkspaceIdFromPath = exports.pruneQuotaHistory = exports.readQuotaHistoryDailyBuckets = exports.readQuotaHistoryRange = exports.appendQuotaHistorySample = exports.writeQuotaSnapshot = exports.readQuotaSnapshot = exports.QuotaPoller = exports.describeQuotaFailure = exports.fetchQuota = exports.removeCodexAccount = exports.switchToCodexAccount = exports.finalizeCodexAccount = exports.prepareCodexAccount = void 0;
38672
+ exports.scopePeakHoursToSessionProvider = exports.isClaudeCodeSessionProvider = exports.fetchPeakHoursStatus = exports.createPeakHoursNotApplicableState = exports.fetchOpenAIStatus = exports.fetchProviderStatus = exports.assistantTurnToolRefSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnProjectionSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnProcessSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnEventTypeSchema = exports.assistantTurnEventSchema = exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = exports.quotaHistoryRuntimeProviderSchema = exports.providerQuotaMapSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaSourceSchema = void 0;
38108
38673
  var taskPersistence_1 = require_taskPersistence();
38109
38674
  Object.defineProperty(exports, "TASK_PERSISTENCE_SCHEMA_VERSION", { enumerable: true, get: function() {
38110
38675
  return taskPersistence_1.TASK_PERSISTENCE_SCHEMA_VERSION;
@@ -38354,6 +38919,22 @@ var require_dist = __commonJS({
38354
38919
  Object.defineProperty(exports, "readSessionContextSnapshot", { enumerable: true, get: function() {
38355
38920
  return sessionContext_1.readSessionContextSnapshot;
38356
38921
  } });
38922
+ var assistantTurn_1 = require_assistantTurn();
38923
+ Object.defineProperty(exports, "assistantTurnEventsFromSessionEvents", { enumerable: true, get: function() {
38924
+ return assistantTurn_1.assistantTurnEventsFromSessionEvents;
38925
+ } });
38926
+ Object.defineProperty(exports, "extractTurnSubagents", { enumerable: true, get: function() {
38927
+ return assistantTurn_1.extractTurnSubagents;
38928
+ } });
38929
+ Object.defineProperty(exports, "isAssistantTurnSubagentTool", { enumerable: true, get: function() {
38930
+ return assistantTurn_1.isAssistantTurnSubagentTool;
38931
+ } });
38932
+ Object.defineProperty(exports, "reasoningSummary", { enumerable: true, get: function() {
38933
+ return assistantTurn_1.reasoningSummary;
38934
+ } });
38935
+ Object.defineProperty(exports, "segmentAssistantTurn", { enumerable: true, get: function() {
38936
+ return assistantTurn_1.segmentAssistantTurn;
38937
+ } });
38357
38938
  var planExtractor_1 = require_planExtractor();
38358
38939
  Object.defineProperty(exports, "PlanExtractor", { enumerable: true, get: function() {
38359
38940
  return planExtractor_1.PlanExtractor;
@@ -38743,6 +39324,94 @@ var require_dist = __commonJS({
38743
39324
  Object.defineProperty(exports, "permissionModeSchema", { enumerable: true, get: function() {
38744
39325
  return sessionEvent_1.permissionModeSchema;
38745
39326
  } });
39327
+ Object.defineProperty(exports, "extractSessionEvents", { enumerable: true, get: function() {
39328
+ return sessionEvent_1.extractSessionEvents;
39329
+ } });
39330
+ var quota_2 = require_quota2();
39331
+ Object.defineProperty(exports, "quotaWindowSchema", { enumerable: true, get: function() {
39332
+ return quota_2.quotaWindowSchema;
39333
+ } });
39334
+ Object.defineProperty(exports, "quotaStateSchema", { enumerable: true, get: function() {
39335
+ return quota_2.quotaStateSchema;
39336
+ } });
39337
+ Object.defineProperty(exports, "quotaFailureKindSchema", { enumerable: true, get: function() {
39338
+ return quota_2.quotaFailureKindSchema;
39339
+ } });
39340
+ Object.defineProperty(exports, "quotaProviderIdSchema", { enumerable: true, get: function() {
39341
+ return quota_2.quotaProviderIdSchema;
39342
+ } });
39343
+ Object.defineProperty(exports, "quotaSourceSchema", { enumerable: true, get: function() {
39344
+ return quota_2.quotaSourceSchema;
39345
+ } });
39346
+ Object.defineProperty(exports, "peakHoursStateSchema", { enumerable: true, get: function() {
39347
+ return quota_2.peakHoursStateSchema;
39348
+ } });
39349
+ Object.defineProperty(exports, "quotaFailureDescriptorSchema", { enumerable: true, get: function() {
39350
+ return quota_2.quotaFailureDescriptorSchema;
39351
+ } });
39352
+ Object.defineProperty(exports, "runtimeQuotaProviderSchema", { enumerable: true, get: function() {
39353
+ return quota_2.runtimeQuotaProviderSchema;
39354
+ } });
39355
+ Object.defineProperty(exports, "providerQuotaStateSchema", { enumerable: true, get: function() {
39356
+ return quota_2.providerQuotaStateSchema;
39357
+ } });
39358
+ Object.defineProperty(exports, "claudeProviderQuotaStateSchema", { enumerable: true, get: function() {
39359
+ return quota_2.claudeProviderQuotaStateSchema;
39360
+ } });
39361
+ Object.defineProperty(exports, "codexProviderQuotaStateSchema", { enumerable: true, get: function() {
39362
+ return quota_2.codexProviderQuotaStateSchema;
39363
+ } });
39364
+ Object.defineProperty(exports, "providerQuotaMapSchema", { enumerable: true, get: function() {
39365
+ return quota_2.providerQuotaMapSchema;
39366
+ } });
39367
+ var quotaHistory_2 = require_quotaHistory2();
39368
+ Object.defineProperty(exports, "quotaHistoryRuntimeProviderSchema", { enumerable: true, get: function() {
39369
+ return quotaHistory_2.quotaHistoryRuntimeProviderSchema;
39370
+ } });
39371
+ Object.defineProperty(exports, "quotaHistorySampleSchema", { enumerable: true, get: function() {
39372
+ return quotaHistory_2.quotaHistorySampleSchema;
39373
+ } });
39374
+ Object.defineProperty(exports, "quotaHistoryDailyBucketSchema", { enumerable: true, get: function() {
39375
+ return quotaHistory_2.quotaHistoryDailyBucketSchema;
39376
+ } });
39377
+ var accountStatus_2 = require_accountStatus2();
39378
+ Object.defineProperty(exports, "activeProviderAccountStatusSchema", { enumerable: true, get: function() {
39379
+ return accountStatus_2.activeProviderAccountStatusSchema;
39380
+ } });
39381
+ Object.defineProperty(exports, "activeAccountStatusSchema", { enumerable: true, get: function() {
39382
+ return accountStatus_2.activeAccountStatusSchema;
39383
+ } });
39384
+ var assistantTurn_2 = require_assistantTurn2();
39385
+ Object.defineProperty(exports, "assistantTurnEventSchema", { enumerable: true, get: function() {
39386
+ return assistantTurn_2.assistantTurnEventSchema;
39387
+ } });
39388
+ Object.defineProperty(exports, "assistantTurnEventTypeSchema", { enumerable: true, get: function() {
39389
+ return assistantTurn_2.assistantTurnEventTypeSchema;
39390
+ } });
39391
+ Object.defineProperty(exports, "assistantTurnNarrationStepSchema", { enumerable: true, get: function() {
39392
+ return assistantTurn_2.assistantTurnNarrationStepSchema;
39393
+ } });
39394
+ Object.defineProperty(exports, "assistantTurnProcessSchema", { enumerable: true, get: function() {
39395
+ return assistantTurn_2.assistantTurnProcessSchema;
39396
+ } });
39397
+ Object.defineProperty(exports, "assistantTurnProcessStepSchema", { enumerable: true, get: function() {
39398
+ return assistantTurn_2.assistantTurnProcessStepSchema;
39399
+ } });
39400
+ Object.defineProperty(exports, "assistantTurnProjectionSchema", { enumerable: true, get: function() {
39401
+ return assistantTurn_2.assistantTurnProjectionSchema;
39402
+ } });
39403
+ Object.defineProperty(exports, "assistantTurnSubagentSchema", { enumerable: true, get: function() {
39404
+ return assistantTurn_2.assistantTurnSubagentSchema;
39405
+ } });
39406
+ Object.defineProperty(exports, "assistantTurnSubagentStatusSchema", { enumerable: true, get: function() {
39407
+ return assistantTurn_2.assistantTurnSubagentStatusSchema;
39408
+ } });
39409
+ Object.defineProperty(exports, "assistantTurnToolGroupStepSchema", { enumerable: true, get: function() {
39410
+ return assistantTurn_2.assistantTurnToolGroupStepSchema;
39411
+ } });
39412
+ Object.defineProperty(exports, "assistantTurnToolRefSchema", { enumerable: true, get: function() {
39413
+ return assistantTurn_2.assistantTurnToolRefSchema;
39414
+ } });
38746
39415
  var providerStatus_1 = require_providerStatus();
38747
39416
  Object.defineProperty(exports, "fetchProviderStatus", { enumerable: true, get: function() {
38748
39417
  return providerStatus_1.fetchProviderStatus;
@@ -40998,7 +41667,7 @@ var init_UpdateCheckService = __esm({
40998
41667
  /** Run the update check (one-shot). */
40999
41668
  async check() {
41000
41669
  try {
41001
- const current = "0.19.0";
41670
+ const current = "0.19.2";
41002
41671
  const cached = this.readCache();
41003
41672
  let latest;
41004
41673
  if (cached && Date.now() - cached.checkedAt < CACHE_TTL_MS) {
@@ -81615,7 +82284,7 @@ function StatusBar({
81615
82284
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { children: parseBlessedTags(BRAND_INLINE) }),
81616
82285
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, children: [
81617
82286
  " v",
81618
- "0.19.0"
82287
+ "0.19.2"
81619
82288
  ] }),
81620
82289
  updateInfo && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { color: "yellow", children: [
81621
82290
  " (v",
@@ -82005,7 +82674,7 @@ function ChangelogOverlay({ entries, scrollOffset }) {
82005
82674
  " ",
82006
82675
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { bold: true, color: "cyan", children: [
82007
82676
  "Terminal Dashboard v",
82008
- "0.19.0"
82677
+ "0.19.2"
82009
82678
  ] }),
82010
82679
  latestDate ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { color: "gray", children: [
82011
82680
  " \u2014 ",
@@ -82327,7 +82996,7 @@ var init_mouse = __esm({
82327
82996
  var CHANGELOG_default;
82328
82997
  var init_CHANGELOG = __esm({
82329
82998
  "CHANGELOG.md"() {
82330
- CHANGELOG_default = '# Changelog\n\nAll notable changes to the Sidekick Agent Hub CLI will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.19.0] - 2026-06-09\n\n### Added\n\n- **Claude Opus 4.8 & Fable 5 support**: The dashboard\'s context-window gauge and cost estimates recognize `claude-opus-4-8` and `claude-fable-5` (both 1M-token context; Opus 4.8: $5/$25 per MTok, Fable 5: $10/$50 per MTok) via the shared model catalog\n\n### Changed\n\n- **Codex account switching now swaps `~/.codex/auth.json`**: `sidekick account --provider codex --switch-to <id>` (and `--add`) activates the account by atomically swapping its backed-up credentials into the system `~/.codex/` home, mirroring the Claude switch pattern \u2014 codex terminals outside Sidekick pick up the switch. Profile directories become pure credential backups, with a one-time startup migration for installs created under the old `CODEX_HOME`-redirection model. The command surfaces swap warnings on add, switch, and remove: a running codex process that needs restarting, stale credentials, or OS-keyring credential storage that Sidekick cannot swap\n\n### Fixed\n\n- **Opus 4.6/4.7 cost over-estimation**: Dashed model IDs fell back to the Opus 4.0 pricing tier ($15/$75 instead of $5/$25), inflating estimated costs 3\xD7\n- **Haiku 4.5 unpriced under dashed IDs**: Costs for `claude-haiku-4-5-*` sessions could render as "\u2014" because no dashed static pricing key existed\n\n## [0.18.5] - 2026-06-04\n\n### Changed\n\n- **Consistent Codex transcripts**: `sidekick dashboard` and `sidekick report` now parse Codex sessions via `parseTranscriptFromEvents()`, matching the canonical `SessionEvent` pipeline used by the other providers\n- **Bundled `sidekick-shared` 0.18.5**: Picks up the new session context evidence snapshot API (`buildSessionContextSnapshot`, `readSessionContextSnapshot`, `SessionContextSnapshot` and related types) and the Codex session evidence gap closures \u2014 `system` audit events, normalized `token_count` rate limits, per-file `apply_patch` expansion, tool-emission dedupe, MCP server attribution, and the new `ProviderReaderSessionWatcher`\n\n## [0.18.4] - 2026-05-27\n\n### Added\n\n- **`sidekick peak --provider <id>`**: New flag gates peak-hours output on the session provider. When the resolved provider is not `claude-code`, the command prints a "not applicable" message instead of calling the upstream endpoint\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.18.4**: Picks up `scopePeakHoursToSessionProvider()`, `isClaudeCodeSessionProvider()`, `createPeakHoursNotApplicableState()` for peak-hours scoping, the improved Codex quota snapshot selection logic (`isPreferredQuotaHit`, `findAccountRolloutFiles`, `shouldKeepExistingSnapshot`), and the `notApplicable` field on `PeakHoursState`\n\n## [0.18.3] - 2026-05-19\n\n### Added\n\n- **`sidekick quota history`**: New subcommand that renders a 13-week GitHub-contributions-style heatmap of quota utilization for the current workspace. Flags: `--weeks <n>` (1-26, default 13), `--provider claude|codex` (default both), `--workspace <path>` (default cwd). Bucketed glyphs (`\xB7 \u2591 \u2592 \u2593 \u2588`) are color-coded by utilization band (\u22640 / <25 / <50 / <75 / \u226575), with per-provider rows and a peak / avg / unavailable-days / samples footer. Days that hit `available: false` render as a red `\xD7`. With `--json`, emits a `{ workspaceId, weeks, providers: { claude?, codex? }, generatedAt }` payload \u2014 the same shape consumed by the VS Code dashboard\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.18.3**: Picks up the new per-workspace quota history surface (`appendQuotaHistorySample`, `readQuotaHistoryRange`, `readQuotaHistoryDailyBuckets`, `pruneQuotaHistory`, `getWorkspaceIdFromPath`) and the optional `workspaceId` / `appendHistorySample` hooks on `CodexQuotaWatcher`\n\n## [0.18.2] - 2026-05-19\n\n### Added\n\n- **`sidekick quota --refresh`**: New flag on the `quota` command that, for Codex, explicitly refreshes from the ChatGPT usage API before falling back to local rollout data and cached snapshots. Without the flag, the Codex quota path stays fully local and makes no upstream network call\n\n### Changed\n\n- **Codex quota is local-only by default**: `sidekick quota --provider codex` now delegates to the new `resolveCodexQuota` orchestrator in `sidekick-shared`. It checks the current workspace\'s most recent rollout, then recent account-level rollouts under `CODEX_HOME/sessions`, then the active account\'s cached snapshot \u2014 no upstream network call unless `--refresh` is passed. Failure output continues to include structured `failureKind` / `httpStatus` / `retryAfterMs` fields under `--json`\n- **Bundled `sidekick-shared` 0.18.2**: Picks up the new Codex quota orchestrator (`resolveCodexQuota`, `resolveCodexQuotaFromLocalSources`, `readLatestCodexQuotaFromRollouts`, `fetchCodexQuotaFromApi`), the relaxed `CodexRateLimits` shape (nullable `resets_at` / `window_minutes`), the rate-limit-only `token_count` event emission in `JsonlSessionWatcher`, and `state_N.sqlite` discovery in `CodexDatabase` + provider auto-detect\n\n## [0.18.1] - 2026-05-08\n\n### Changed\n\n- **Shared dashboard formatting**: terminal dashboard `fmtNum()` and `formatDuration()` now delegate to `formatTokenCount()` and `formatDurationMs()` from `sidekick-shared`, keeping the existing CLI surface (uppercase `K`/`M` suffix, compact `1m5s` style) while removing forked rounding logic\n\n## [0.18.0] - 2026-05-08\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.18.0**: Picks up the new provider-aware quota orchestration surface \u2014 `MultiProviderQuotaService`, `CodexQuotaWatcher`, `getActiveAccountStatus()`, `extractToolCall()`, cost-provenance helpers (`calculateCostWithProvenance`, `mergeCostSources`), and model display helpers (`shortModelName`, `getModelDisplayInfo`, `compareModelIds`, `sortModelIds`). `parseModelId()` also now recognizes legacy Claude IDs such as `claude-3-opus-20240229` and `claude-3-5-sonnet-20241022`\n- **No CLI runtime changes**: This release ships the shared library upgrade for downstream tooling alignment; `sidekick quota`, `sidekick status`, and the live dashboard keep using the existing polling path. Wiring the new orchestrator into the CLI will land in a follow-up release\n\n## [0.17.7] - 2026-04-28\n\n### Fixed\n\n- **Quota snapshot write race**: Updated the bundled `sidekick-shared` snapshot writer so concurrent `sidekick quota` / Codex session updates no longer collide on `quota-snapshots.json.tmp` or throw `ENOENT`. Failed writes now also clean up their partial temp files instead of leaving orphans in `~/.config/sidekick/`\n\n## [0.17.6] - 2026-04-19\n\n### Added\n\n- **`sidekick peak` command**: One-shot check for Claude\'s current peak-hours state \u2014 weekdays 13:00\u201319:00 UTC, when session limits drain faster on Free/Pro/Max/Team subscriptions. Prints a color-coded status block with a countdown to the next transition. Data comes from the public `promoclock.co/api/status` endpoint (third-party, unaffiliated with Anthropic) with a graceful fallback when unreachable. `--json` emits the full raw state\n- **Peak-hours block in `sidekick status`**: When the active provider is `claude-code`, the Claude + OpenAI health blocks are now followed by a **Claude Peak Hours** block (off-peak or in-peak, with countdown). Gated on the provider so OpenCode / Codex users don\'t trigger an unnecessary third-party fetch. `--json` output includes the new `peak` field\n- **Peak-hours summary in `sidekick quota`**: Claude subscription quota output now shows a **Peak** line under the 5-hour / 7-day bars \u2014 green dot off-peak, orange dot during an active peak, with a countdown to the next transition. `--json` output includes the new `peak` field\n\n## [0.17.5] - 2026-04-18\n\n### Added\n\n- **Default account bootstrap at CLI startup**: The CLI now calls `ensureDefaultAccounts()` from `sidekick-shared` at module load and awaits the result inside a Commander `preAction` hook, so the first real subcommand blocks briefly on the bootstrap while `--version` and `--help` stay instant. When a system Claude Code or Codex credential exists and no saved account is active for that provider yet, the CLI registers it as "Default" \u2014 `sidekick quota`, `sidekick account`, and `sidekick stats` now reflect the active account on first run without requiring an explicit `sidekick account --add` first. Idempotent, never overwrites manually saved accounts, and all errors are swallowed so startup is never blocked\n\nThanks to [@B33pBeeps](https://github.com/B33pBeeps) (Juan Fourie) for contributing this feature in [#16](https://github.com/cesarandreslopez/sidekick-agent-hub/pull/16).\n\n## [0.17.4] - 2026-04-17\n\n### Changed\n\n- **Pricing hydration import migrated to `sidekick-shared/node`**: `cli.ts` now imports `hydratePricingCatalog` from the new Node-only subpath and keeps `detectProvider` on the package root. Runtime behavior is unchanged; the split makes the CLI\'s import surface self-documenting (hydration is explicitly a Node API) and aligns the CLI with the shared library\'s new versioned public API contract\n\n## [0.17.3] - 2026-04-17\n\n### Changed\n\n- **Version sync with the VS Code extension**: Republished to keep CLI, extension, and shared-library versions aligned after a cosmetic changelog fix in 0.17.3. No CLI code changes \u2014 functionally identical to 0.17.2\n\n## [0.17.2] - 2026-04-17\n\n### Added\n\n- **LiteLLM pricing hydration on startup**: The CLI now fetches the LiteLLM pricing catalog on startup and caches to `~/.config/sidekick/pricing-catalog.json` with a 24-hour TTL, 3s timeout, and stale-cache fallback \u2014 new model prices are picked up without a CLI upgrade\n- **Expanded pricing coverage**: GPT-4o, GPT-4.1, GPT-5.x, o1, o3, and o3-mini families are now priced alongside the existing Claude entries\n- **Real-dollar Codex / Claude Code costs**: `EventAggregator` computes cost from the pricing table when the session provider doesn\'t report one, so `sidekick` live dashboards now show actual dollars for Codex and Claude Code sessions\n- **`stats` footer lists unpriced models**: `sidekick stats` prints any models encountered with no pricing entry so missing coverage is visible\n\n### Fixed\n\n- **Context-gauge % wrong for Opus 4.7 (1M) and other new models**: The dashboard\'s context gauge was dividing by 200K for Claude Opus 4.7 (native 1M), inflating the displayed %. The shared model \u2192 context-window map now includes Opus/Sonnet 4.7 (1M), GPT-5.4 (1.05M), GPT-5.3-Codex (400K), and GPT-5.3-Codex-Spark (128K). Claude Code\'s `[1m]` suffix is now also honored as an explicit 1M marker\n- **Silent Sonnet-priced fallback for unknown models**: Codex, GPT-5.x, and o-series rows were being rendered at Sonnet rates. Unknown-model rows now render as `\u2014` in yellow instead of inventing a dollar figure\n\n### Changed\n\n- **`historical-data.json` schema v2**: reads `priced` flag and `unpricedModelIds` from records written by the latest VS Code extension; v1 records still read correctly\n\n## [0.17.1] - 2026-04-13\n\n### Fixed\n\n- **Codex multi-home session discovery**: Provider detection now scans all candidate Codex home directories, fixing missed sessions when the managed profile home is empty but the system `~/.codex/` has activity\n\n## [0.17.0] - 2026-04-13\n\n### Added\n\n- **Multi-provider account management**: `sidekick account` now supports `--provider codex` for Codex profile management alongside Claude Code accounts\n- **Codex account lifecycle**: `--add` prepares a profile and spawns `codex login`; `--switch-to` and `--remove` accept email, label, or profile ID\n- **Quota snapshot fallback**: `sidekick quota` for Codex shows cached rate-limit snapshots when no active session exists, with "cached from" timestamp\n\n### Fixed\n\n- **Email normalization**: Claude account lookup normalizes email case for reliable matching\n\n## [0.16.1] - 2026-03-27\n\n### Fixed\n\n- **Dashboard provider status scoping**: The TUI now shows degraded-service notices only for the monitored provider \u2014 Claude for Claude Code sessions, OpenAI for Codex sessions, and no status banner for OpenCode\n\n## [0.16.0] - 2026-03-23\n\n### Changed\n\n- **Consistent cost formatting**: All cost displays (`stats`, `context`, Sessions panel, narrative prompt) now use shared `formatCost()` with intelligent decimal precision (4 places for < $0.01, 2 otherwise)\n- **QuotaService**: Rewritten to wrap shared `QuotaPoller` with exponential backoff instead of manual polling loop\n- **modelContext**: Now re-exports `getModelInfo` from shared library alongside `getContextWindowSize`\n\n## [0.15.2] - 2026-03-18\n\n### Fixed\n\n- **CLI help descriptions**: Updated `quota` and `status` command descriptions to reflect provider-aware behavior\n- **`sidekick quota --provider`**: Added local `--provider` option so `sidekick quota --provider codex` works naturally\n\n## [0.15.0] - 2026-03-18\n\n### Added\n\n- **OpenAI status page monitoring**: CLI dashboard now shows OpenAI API status alongside Claude API status\n- **Codex rate limits in dashboard**: Sessions panel displays Codex rate-limit data with "Rate Limits" header instead of "Quota"\n- **Provider-aware `sidekick quota` command**: Detects active provider and shows Codex rate limits, Claude subscription quota, or an informational message for OpenCode\n\n### Fixed\n\n- **QuotaService polling for Codex**: Dashboard no longer starts Claude OAuth quota polling when the active provider is Codex\n\n## [0.14.2] - 2026-03-16\n\n### Fixed\n\n- **Quota polling interval**: Reduced quota refresh from every 30 seconds to every 5 minutes to avoid unnecessary API calls\n- **SessionsPanel `detailWidth()` call**: Removed unused parameter from `detailWidth()` in the Sessions panel quota rendering\n\n## [0.14.1] - 2026-03-14\n\n### Fixed\n\n- **Per-model context window sizes**: Dashboard context gauge now shows correct utilization for Claude Opus 4.6 (1M context) and other models with non-200K windows\n\n### Changed\n\n- **Shared model context lookup**: CLI dashboard now uses the centralized `getModelContextWindowSize()` from `sidekick-shared` instead of a local duplicate map\n\n## [0.14.0] - 2026-03-12\n\n### Added\n\n- **`sidekick account` Command**: Manage Claude Code accounts from the terminal \u2014 list saved accounts, add the current account with an optional label, switch to the next or a specific account, and remove accounts. Supports `--json` output for scripting\n- **Quota Account Label**: `sidekick quota` now shows the active account email and label above the quota bars when multi-account is enabled\n- **macOS Keychain Support**: `sidekick account` and `sidekick quota` now read and write credentials via the system Keychain on macOS, fixing account switching and quota checks on Mac\n\n## [0.13.8] - 2026-03-12\n\n### Changed\n\n- **Structured quota failure output**: `sidekick quota` now renders consistent auth, rate-limit, server, network, and unexpected-failure copy from shared quota failure descriptors while preserving `--json` machine-readable output\n- **Dashboard unavailable quota rendering**: The Sessions panel now shows Claude Code quota failures inline instead of hiding the quota section whenever subscription data is unavailable\n- **Quota transition toasts**: The Ink dashboard now fires low-noise toast notifications only when Claude Code quota failure state changes, avoiding repeated alerts every polling interval\n\n## [0.13.7] - 2026-03-11\n\n### Changed\n\n- **npm README sync**: Updated the published CLI package README to reflect current OpenCode monitoring behavior, platform-specific data directories, and the `sqlite3` runtime requirement\n- **README badge cleanup**: Removed the Ask DeepWiki badge from the published CLI package README; the repo root README still keeps it\n\n## [0.13.6] - 2026-03-11\n\n### Changed\n\n- **Refreshed CLI Dashboard Wordmark**: Updated the dashboard wordmark/header styling for a cleaner splash and dashboard identity\n\n### Fixed\n\n- **OpenCode dashboard startup**: OpenCode DB-backed session discovery now resolves projects by worktree, sandboxes, and session directory instead of quietly behaving like no session exists\n- **OpenCode runtime notices**: The CLI now prints an OpenCode-only actionable notice when `opencode.db` exists but `sqlite3` is missing, blocked, or otherwise unusable in the current shell environment\n\n## [0.13.5] - 2026-03-10\n\n### Added\n\n- **`sidekick status` Command**: One-shot Claude API status check with color-coded text output and `--json` mode\n- **Dashboard Status Banner**: Status bar shows a colored `\u25CF API minor/major/critical` indicator when Claude is degraded; Sessions panel Summary tab shows an "API Status" section with affected components and active incident details. Polls every 60s\n\n## [0.13.4] - 2026-03-08\n\n### Fixed\n\n- **Onboarding Phrase Spam**: Splash screen and detail pane motivational phrases memoized \u2014 no longer flicker every render tick (fixes [#13](https://github.com/cesarandreslopez/sidekick-agent-hub/issues/13))\n\n### Changed\n\n- **Simplified Logo**: Replaced 6-line ASCII robot art with compact text header in splash, help, and changelog overlays\n- **Removed Dead Code**: Removed unused `getSplashContent()` and `HELP_HEADER` exports from branding module\n\n## [0.13.3] - 2026-03-04\n\n_No CLI-specific changes in this release._\n\n## [0.13.2] - 2026-03-04\n\n_No CLI-specific changes in this release._\n\n## [0.13.1] - 2026-03-04\n\n### Added\n\n- **`sidekick quota` Command**: One-shot subscription quota check showing 5-hour and 7-day utilization with color-coded progress bars and reset countdowns \u2014 supports `--json` for machine-readable output\n- **Quota Projections**: Elapsed-time projections shown in `sidekick quota` output and TUI dashboard quota section \u2014 displays projected end-of-window utilization next to current value (e.g., `40% \u2192 100%`), included in `--json` output as `projectedFiveHour` / `projectedSevenDay`\n\n## [0.13.0] - 2026-03-03\n\n_No CLI-specific changes in this release._\n\n## [0.12.10] - 2026-03-01\n\n### Added\n\n- **Events Panel** (key 7): Scrollable live event stream with colored type badges (`[USR]`, `[AST]`, `[TOOL]`, `[RES]`), timestamps, and keyword-highlighted summaries; detail tabs for full event JSON and surrounding context\n- **Charts Panel** (key 8): Tool frequency horizontal bars, event type distribution, 60-minute activity heatmap using `\u2591\u2592\u2593\u2588` intensity characters, and pattern analysis with frequency bars and template text\n- **Multi-Mode Filter**: `/` filter overlay now supports four modes \u2014 substring, fuzzy, regex, and date range \u2014 Tab cycles modes, regex mode shows red validation errors\n- **Search Term Highlighting**: Active filter terms highlighted in blue within side list items\n- **Timeline Keyword Coloring**: Event summaries in the Sessions panel Timeline tab now use semantic keyword coloring \u2014 errors red, success green, tool names cyan, file paths magenta\n\n### Removed\n\n- **Search Panel**: Removed redundant Search panel (previously key 7) \u2014 the `/` filter with multi-mode support serves the same purpose\n\n## [0.12.9] - 2026-02-28\n\n### Added\n\n- **Standalone Data Commands**: `sidekick tasks`, `sidekick decisions`, `sidekick notes`, `sidekick stats`, `sidekick handoff` for accessing project data without launching the TUI\n- **`sidekick search <query>`**: Cross-session full-text search from the terminal\n- **`sidekick context`**: Composite output of tasks, decisions, notes, and handoff for piping into other tools\n- **`--list` flag on `sidekick dump`**: Discover available session IDs before requiring `--session <id>`\n- **Search Panel**: Search panel (panel 7) wired into the TUI dashboard\n\n### Changed\n\n- **`taskMerger` utility**: Duplicate `mergeTasks` logic extracted into shared `taskMerger` utility\n- **Model constants**: Hardcoded model IDs extracted to named constants\n\n### Fixed\n\n- **`convention` icon**: Notes panel icon replaced with valid `tip` type\n- **Linux clipboard**: Now supports Wayland (`wl-copy`) and `xsel` fallbacks, with error messages instead of silent failure\n- **`provider.dispose()`**: Added to `dump` and `report` commands (prevents SQLite connection leaks)\n\n## [0.12.8] - 2026-02-28\n\n### Changed\n\n- **Dashboard UI/UX Polish**: Visual overhaul for better hierarchy, consistency, and readability\n - Splash screen and help overlay now display the robot ASCII logo\n - Toast notifications show severity icons (\u2718 error, \u26A0 warning, \u25CF info) with inner padding\n - Focused pane uses double-border for clear focus indication\n - Section dividers (`\u2500\u2500 Title \u2500\u2500\u2500\u2500`) replace bare bold headers in summary, agents, and context attribution\n - Tab bar: active tab underlined in magenta, inactive tabs dimmed, bracket syntax removed\n - Status bar: segmented layout with `\u2502` separators; keys bold, labels dim\n - Summary metrics condensed: elapsed/events/compactions on one line, tokens on one line with cache rate and cost\n - Sparklines display peak metadata annotations\n - Progress bars use blessed color tags for consistent coloring\n - Help overlay uses dot-leader alignment for all keybinding rows\n - Empty state hints per panel (e.g. "Tasks appear as your agent works.")\n - Session picker groups sessions by provider with section headers when multiple providers are present\n\n## [0.12.7] - 2026-02-27\n\n### Added\n\n- **HTML Session Report**: `sidekick report` command generates a self-contained HTML report and opens it in the default browser\n - Options: `--session`, `--output`, `--theme` (dark/light), `--no-open`, `--no-thinking`\n - TUI Dashboard: press `r` to generate and open an HTML report for the current session\n\n## [0.12.6] - 2026-02-26\n\n### Added\n\n- **Session Dump Command**: `sidekick dump` exports session data in text, markdown, or JSON format with `--format`, `--width`, and `--expand` options\n- **Plans Panel Re-enabled**: Plans panel restored in CLI dashboard with plan file discovery from `~/.claude/plans/`\n- **Enhanced Status Bar**: Session info display improved with richer metadata\n\n### Fixed\n\n- **Old snapshot format migration**: Restoring pre-0.12.3 session snapshots no longer shows empty timeline entries\n\n### Changed\n\n- **Phrase library moved to shared**: CLI-specific phrase formatting kept local, all phrase content now from `sidekick-shared`\n\n## [0.12.5] - 2026-02-24\n\n### Fixed\n\n- **Update check too slow to notice new versions**: Reduced npm registry cache TTL from 24 hours to 4 hours so upgrade notices appear sooner after a new release\n\n## [0.12.4] - 2026-02-24\n\n### Fixed\n\n- **Session crash on upgrade**: Fixed `d.timestamp.getTime is not a function` error when restoring tool call data from session snapshots \u2014 `Date` objects were serialized to strings by JSON but not rehydrated on restore, causing the session monitor to crash on first run after upgrading from 0.12.2 to 0.12.3\n\n## [0.12.3] - 2026-02-24\n\n### Added\n\n- **Latest-node indicator**: The most recently added node in tree and boxed mind map views is now marked with a yellow indicator\n- **Plan analytics in mind map**: Tree and boxed views now display plan progress and per-step metrics\n - Tree view: plan header shows completion stats; steps show complexity, duration, tokens, tool calls, and errors in metadata brackets\n - Box view: progress bar with completion percentage; steps show right-aligned metrics; subtitle shows step count and total duration\n- **Cross-provider plan extraction**: Shared `PlanExtractor` now handles Claude Code (EnterPlanMode/ExitPlanMode) and OpenCode (`<proposed_plan>` XML) plans \u2014 previously only Codex plans were shown\n- **Enriched plan data model**: Plan steps include duration, token count, tool call count, and error messages\n- **Phase-grouped plan display**: When a plan has phase structure, tree and boxed views group steps under phase headers with context lines from the original plan markdown\n- **Node type filter**: Press `f` on the Mind Map tab to cycle through node type filters (file, tool, task, subagent, command, plan, knowledge-note) \u2014 non-matching sections render dimmed in grey\n\n### Fixed\n\n- **Kanban board regression**: Subagent and plan-step tasks now correctly appear in the kanban board\n\n### Changed\n\n- **Plans panel temporarily disabled**: The Plans panel in the CLI dashboard is disabled until plan-mode event capture is reliably working end-to-end. Plan nodes in the mind map remain active.\n- `DashboardState` now delegates to shared `EventAggregator` instead of maintaining its own aggregation logic\n\n## [0.12.2] - 2026-02-23\n\n### Added\n\n- **Update notifications**: The dashboard now checks the npm registry for newer versions on startup and shows a yellow banner in the status bar when an update is available (e.g., `v0.13.0 available \u2014 npm i -g sidekick-agent-hub`). Results are cached for 24 hours to avoid repeated network requests.\n\n## [0.12.1] - 2026-02-23\n\n### Fixed\n\n- **VS Code integration**: Fixed exit code 127 when the extension launches the CLI dashboard on systems using nvm or volta (node binary not found when shell init is bypassed)\n\n## [0.12.0] - 2026-02-22\n\n### Added\n\n- **"Open CLI Dashboard" VS Code Integration**: New VS Code command `Sidekick: Open CLI Dashboard` launches the TUI dashboard in an integrated terminal\n - Install the CLI with `npm install -g sidekick-agent-hub`\n\n## [0.11.0] - 2026-02-19\n\n### Added\n\n- **Initial Release**: Full-screen TUI dashboard for monitoring agent sessions from the terminal\n - Ink-based terminal UI with panels for sessions, tasks, kanban, mind map, notes, decisions, search, files, and git diff\n - Multi-provider support: auto-detects Claude Code, OpenCode, and Codex sessions\n - Reads from `~/.config/sidekick/` \u2014 the same data files the VS Code extension writes\n - Usage: `sidekick dashboard [--project <path>] [--provider <id>]`\n';
82999
+ CHANGELOG_default = '# Changelog\n\nAll notable changes to the Sidekick Agent Hub CLI will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.19.2] - 2026-06-15\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.19.2**: The shared library gains a browser-safe assistant-turn projection module (`segmentAssistantTurn()`, `assistantTurnEventsFromSessionEvents()`, and mirrored Zod schemas) that segments an assistant turn into a compact Process + Answer shape, with Claude `Task` subagent refs surfaced without leaking prompt text \u2014 internal additions that don\'t change CLI behavior\n\n## [0.19.1] - 2026-06-09\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.19.1**: Model-ID pricing and context-window lookups (behind the dashboard\'s cost and context gauges) now tolerate padded or mixed-case IDs. The shared library also gains Zod boundary schemas, an `extractSessionEvents()` progress-unwrapping helper, and a `/schemas` subpath export for downstream consumers \u2014 internal additions that don\'t change CLI behavior\n\n## [0.19.0] - 2026-06-09\n\n### Added\n\n- **Claude Opus 4.8 & Fable 5 support**: The dashboard\'s context-window gauge and cost estimates recognize `claude-opus-4-8` and `claude-fable-5` (both 1M-token context; Opus 4.8: $5/$25 per MTok, Fable 5: $10/$50 per MTok) via the shared model catalog\n\n### Changed\n\n- **Codex account switching now swaps `~/.codex/auth.json`**: `sidekick account --provider codex --switch-to <id>` (and `--add`) activates the account by atomically swapping its backed-up credentials into the system `~/.codex/` home, mirroring the Claude switch pattern \u2014 codex terminals outside Sidekick pick up the switch. Profile directories become pure credential backups, with a one-time startup migration for installs created under the old `CODEX_HOME`-redirection model. The command surfaces swap warnings on add, switch, and remove: a running codex process that needs restarting, stale credentials, or OS-keyring credential storage that Sidekick cannot swap\n\n### Fixed\n\n- **Opus 4.6/4.7 cost over-estimation**: Dashed model IDs fell back to the Opus 4.0 pricing tier ($15/$75 instead of $5/$25), inflating estimated costs 3\xD7\n- **Haiku 4.5 unpriced under dashed IDs**: Costs for `claude-haiku-4-5-*` sessions could render as "\u2014" because no dashed static pricing key existed\n\n## [0.18.5] - 2026-06-04\n\n### Changed\n\n- **Consistent Codex transcripts**: `sidekick dashboard` and `sidekick report` now parse Codex sessions via `parseTranscriptFromEvents()`, matching the canonical `SessionEvent` pipeline used by the other providers\n- **Bundled `sidekick-shared` 0.18.5**: Picks up the new session context evidence snapshot API (`buildSessionContextSnapshot`, `readSessionContextSnapshot`, `SessionContextSnapshot` and related types) and the Codex session evidence gap closures \u2014 `system` audit events, normalized `token_count` rate limits, per-file `apply_patch` expansion, tool-emission dedupe, MCP server attribution, and the new `ProviderReaderSessionWatcher`\n\n## [0.18.4] - 2026-05-27\n\n### Added\n\n- **`sidekick peak --provider <id>`**: New flag gates peak-hours output on the session provider. When the resolved provider is not `claude-code`, the command prints a "not applicable" message instead of calling the upstream endpoint\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.18.4**: Picks up `scopePeakHoursToSessionProvider()`, `isClaudeCodeSessionProvider()`, `createPeakHoursNotApplicableState()` for peak-hours scoping, the improved Codex quota snapshot selection logic (`isPreferredQuotaHit`, `findAccountRolloutFiles`, `shouldKeepExistingSnapshot`), and the `notApplicable` field on `PeakHoursState`\n\n## [0.18.3] - 2026-05-19\n\n### Added\n\n- **`sidekick quota history`**: New subcommand that renders a 13-week GitHub-contributions-style heatmap of quota utilization for the current workspace. Flags: `--weeks <n>` (1-26, default 13), `--provider claude|codex` (default both), `--workspace <path>` (default cwd). Bucketed glyphs (`\xB7 \u2591 \u2592 \u2593 \u2588`) are color-coded by utilization band (\u22640 / <25 / <50 / <75 / \u226575), with per-provider rows and a peak / avg / unavailable-days / samples footer. Days that hit `available: false` render as a red `\xD7`. With `--json`, emits a `{ workspaceId, weeks, providers: { claude?, codex? }, generatedAt }` payload \u2014 the same shape consumed by the VS Code dashboard\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.18.3**: Picks up the new per-workspace quota history surface (`appendQuotaHistorySample`, `readQuotaHistoryRange`, `readQuotaHistoryDailyBuckets`, `pruneQuotaHistory`, `getWorkspaceIdFromPath`) and the optional `workspaceId` / `appendHistorySample` hooks on `CodexQuotaWatcher`\n\n## [0.18.2] - 2026-05-19\n\n### Added\n\n- **`sidekick quota --refresh`**: New flag on the `quota` command that, for Codex, explicitly refreshes from the ChatGPT usage API before falling back to local rollout data and cached snapshots. Without the flag, the Codex quota path stays fully local and makes no upstream network call\n\n### Changed\n\n- **Codex quota is local-only by default**: `sidekick quota --provider codex` now delegates to the new `resolveCodexQuota` orchestrator in `sidekick-shared`. It checks the current workspace\'s most recent rollout, then recent account-level rollouts under `CODEX_HOME/sessions`, then the active account\'s cached snapshot \u2014 no upstream network call unless `--refresh` is passed. Failure output continues to include structured `failureKind` / `httpStatus` / `retryAfterMs` fields under `--json`\n- **Bundled `sidekick-shared` 0.18.2**: Picks up the new Codex quota orchestrator (`resolveCodexQuota`, `resolveCodexQuotaFromLocalSources`, `readLatestCodexQuotaFromRollouts`, `fetchCodexQuotaFromApi`), the relaxed `CodexRateLimits` shape (nullable `resets_at` / `window_minutes`), the rate-limit-only `token_count` event emission in `JsonlSessionWatcher`, and `state_N.sqlite` discovery in `CodexDatabase` + provider auto-detect\n\n## [0.18.1] - 2026-05-08\n\n### Changed\n\n- **Shared dashboard formatting**: terminal dashboard `fmtNum()` and `formatDuration()` now delegate to `formatTokenCount()` and `formatDurationMs()` from `sidekick-shared`, keeping the existing CLI surface (uppercase `K`/`M` suffix, compact `1m5s` style) while removing forked rounding logic\n\n## [0.18.0] - 2026-05-08\n\n### Changed\n\n- **Bundled `sidekick-shared` 0.18.0**: Picks up the new provider-aware quota orchestration surface \u2014 `MultiProviderQuotaService`, `CodexQuotaWatcher`, `getActiveAccountStatus()`, `extractToolCall()`, cost-provenance helpers (`calculateCostWithProvenance`, `mergeCostSources`), and model display helpers (`shortModelName`, `getModelDisplayInfo`, `compareModelIds`, `sortModelIds`). `parseModelId()` also now recognizes legacy Claude IDs such as `claude-3-opus-20240229` and `claude-3-5-sonnet-20241022`\n- **No CLI runtime changes**: This release ships the shared library upgrade for downstream tooling alignment; `sidekick quota`, `sidekick status`, and the live dashboard keep using the existing polling path. Wiring the new orchestrator into the CLI will land in a follow-up release\n\n## [0.17.7] - 2026-04-28\n\n### Fixed\n\n- **Quota snapshot write race**: Updated the bundled `sidekick-shared` snapshot writer so concurrent `sidekick quota` / Codex session updates no longer collide on `quota-snapshots.json.tmp` or throw `ENOENT`. Failed writes now also clean up their partial temp files instead of leaving orphans in `~/.config/sidekick/`\n\n## [0.17.6] - 2026-04-19\n\n### Added\n\n- **`sidekick peak` command**: One-shot check for Claude\'s current peak-hours state \u2014 weekdays 13:00\u201319:00 UTC, when session limits drain faster on Free/Pro/Max/Team subscriptions. Prints a color-coded status block with a countdown to the next transition. Data comes from the public `promoclock.co/api/status` endpoint (third-party, unaffiliated with Anthropic) with a graceful fallback when unreachable. `--json` emits the full raw state\n- **Peak-hours block in `sidekick status`**: When the active provider is `claude-code`, the Claude + OpenAI health blocks are now followed by a **Claude Peak Hours** block (off-peak or in-peak, with countdown). Gated on the provider so OpenCode / Codex users don\'t trigger an unnecessary third-party fetch. `--json` output includes the new `peak` field\n- **Peak-hours summary in `sidekick quota`**: Claude subscription quota output now shows a **Peak** line under the 5-hour / 7-day bars \u2014 green dot off-peak, orange dot during an active peak, with a countdown to the next transition. `--json` output includes the new `peak` field\n\n## [0.17.5] - 2026-04-18\n\n### Added\n\n- **Default account bootstrap at CLI startup**: The CLI now calls `ensureDefaultAccounts()` from `sidekick-shared` at module load and awaits the result inside a Commander `preAction` hook, so the first real subcommand blocks briefly on the bootstrap while `--version` and `--help` stay instant. When a system Claude Code or Codex credential exists and no saved account is active for that provider yet, the CLI registers it as "Default" \u2014 `sidekick quota`, `sidekick account`, and `sidekick stats` now reflect the active account on first run without requiring an explicit `sidekick account --add` first. Idempotent, never overwrites manually saved accounts, and all errors are swallowed so startup is never blocked\n\nThanks to [@B33pBeeps](https://github.com/B33pBeeps) (Juan Fourie) for contributing this feature in [#16](https://github.com/cesarandreslopez/sidekick-agent-hub/pull/16).\n\n## [0.17.4] - 2026-04-17\n\n### Changed\n\n- **Pricing hydration import migrated to `sidekick-shared/node`**: `cli.ts` now imports `hydratePricingCatalog` from the new Node-only subpath and keeps `detectProvider` on the package root. Runtime behavior is unchanged; the split makes the CLI\'s import surface self-documenting (hydration is explicitly a Node API) and aligns the CLI with the shared library\'s new versioned public API contract\n\n## [0.17.3] - 2026-04-17\n\n### Changed\n\n- **Version sync with the VS Code extension**: Republished to keep CLI, extension, and shared-library versions aligned after a cosmetic changelog fix in 0.17.3. No CLI code changes \u2014 functionally identical to 0.17.2\n\n## [0.17.2] - 2026-04-17\n\n### Added\n\n- **LiteLLM pricing hydration on startup**: The CLI now fetches the LiteLLM pricing catalog on startup and caches to `~/.config/sidekick/pricing-catalog.json` with a 24-hour TTL, 3s timeout, and stale-cache fallback \u2014 new model prices are picked up without a CLI upgrade\n- **Expanded pricing coverage**: GPT-4o, GPT-4.1, GPT-5.x, o1, o3, and o3-mini families are now priced alongside the existing Claude entries\n- **Real-dollar Codex / Claude Code costs**: `EventAggregator` computes cost from the pricing table when the session provider doesn\'t report one, so `sidekick` live dashboards now show actual dollars for Codex and Claude Code sessions\n- **`stats` footer lists unpriced models**: `sidekick stats` prints any models encountered with no pricing entry so missing coverage is visible\n\n### Fixed\n\n- **Context-gauge % wrong for Opus 4.7 (1M) and other new models**: The dashboard\'s context gauge was dividing by 200K for Claude Opus 4.7 (native 1M), inflating the displayed %. The shared model \u2192 context-window map now includes Opus/Sonnet 4.7 (1M), GPT-5.4 (1.05M), GPT-5.3-Codex (400K), and GPT-5.3-Codex-Spark (128K). Claude Code\'s `[1m]` suffix is now also honored as an explicit 1M marker\n- **Silent Sonnet-priced fallback for unknown models**: Codex, GPT-5.x, and o-series rows were being rendered at Sonnet rates. Unknown-model rows now render as `\u2014` in yellow instead of inventing a dollar figure\n\n### Changed\n\n- **`historical-data.json` schema v2**: reads `priced` flag and `unpricedModelIds` from records written by the latest VS Code extension; v1 records still read correctly\n\n## [0.17.1] - 2026-04-13\n\n### Fixed\n\n- **Codex multi-home session discovery**: Provider detection now scans all candidate Codex home directories, fixing missed sessions when the managed profile home is empty but the system `~/.codex/` has activity\n\n## [0.17.0] - 2026-04-13\n\n### Added\n\n- **Multi-provider account management**: `sidekick account` now supports `--provider codex` for Codex profile management alongside Claude Code accounts\n- **Codex account lifecycle**: `--add` prepares a profile and spawns `codex login`; `--switch-to` and `--remove` accept email, label, or profile ID\n- **Quota snapshot fallback**: `sidekick quota` for Codex shows cached rate-limit snapshots when no active session exists, with "cached from" timestamp\n\n### Fixed\n\n- **Email normalization**: Claude account lookup normalizes email case for reliable matching\n\n## [0.16.1] - 2026-03-27\n\n### Fixed\n\n- **Dashboard provider status scoping**: The TUI now shows degraded-service notices only for the monitored provider \u2014 Claude for Claude Code sessions, OpenAI for Codex sessions, and no status banner for OpenCode\n\n## [0.16.0] - 2026-03-23\n\n### Changed\n\n- **Consistent cost formatting**: All cost displays (`stats`, `context`, Sessions panel, narrative prompt) now use shared `formatCost()` with intelligent decimal precision (4 places for < $0.01, 2 otherwise)\n- **QuotaService**: Rewritten to wrap shared `QuotaPoller` with exponential backoff instead of manual polling loop\n- **modelContext**: Now re-exports `getModelInfo` from shared library alongside `getContextWindowSize`\n\n## [0.15.2] - 2026-03-18\n\n### Fixed\n\n- **CLI help descriptions**: Updated `quota` and `status` command descriptions to reflect provider-aware behavior\n- **`sidekick quota --provider`**: Added local `--provider` option so `sidekick quota --provider codex` works naturally\n\n## [0.15.0] - 2026-03-18\n\n### Added\n\n- **OpenAI status page monitoring**: CLI dashboard now shows OpenAI API status alongside Claude API status\n- **Codex rate limits in dashboard**: Sessions panel displays Codex rate-limit data with "Rate Limits" header instead of "Quota"\n- **Provider-aware `sidekick quota` command**: Detects active provider and shows Codex rate limits, Claude subscription quota, or an informational message for OpenCode\n\n### Fixed\n\n- **QuotaService polling for Codex**: Dashboard no longer starts Claude OAuth quota polling when the active provider is Codex\n\n## [0.14.2] - 2026-03-16\n\n### Fixed\n\n- **Quota polling interval**: Reduced quota refresh from every 30 seconds to every 5 minutes to avoid unnecessary API calls\n- **SessionsPanel `detailWidth()` call**: Removed unused parameter from `detailWidth()` in the Sessions panel quota rendering\n\n## [0.14.1] - 2026-03-14\n\n### Fixed\n\n- **Per-model context window sizes**: Dashboard context gauge now shows correct utilization for Claude Opus 4.6 (1M context) and other models with non-200K windows\n\n### Changed\n\n- **Shared model context lookup**: CLI dashboard now uses the centralized `getModelContextWindowSize()` from `sidekick-shared` instead of a local duplicate map\n\n## [0.14.0] - 2026-03-12\n\n### Added\n\n- **`sidekick account` Command**: Manage Claude Code accounts from the terminal \u2014 list saved accounts, add the current account with an optional label, switch to the next or a specific account, and remove accounts. Supports `--json` output for scripting\n- **Quota Account Label**: `sidekick quota` now shows the active account email and label above the quota bars when multi-account is enabled\n- **macOS Keychain Support**: `sidekick account` and `sidekick quota` now read and write credentials via the system Keychain on macOS, fixing account switching and quota checks on Mac\n\n## [0.13.8] - 2026-03-12\n\n### Changed\n\n- **Structured quota failure output**: `sidekick quota` now renders consistent auth, rate-limit, server, network, and unexpected-failure copy from shared quota failure descriptors while preserving `--json` machine-readable output\n- **Dashboard unavailable quota rendering**: The Sessions panel now shows Claude Code quota failures inline instead of hiding the quota section whenever subscription data is unavailable\n- **Quota transition toasts**: The Ink dashboard now fires low-noise toast notifications only when Claude Code quota failure state changes, avoiding repeated alerts every polling interval\n\n## [0.13.7] - 2026-03-11\n\n### Changed\n\n- **npm README sync**: Updated the published CLI package README to reflect current OpenCode monitoring behavior, platform-specific data directories, and the `sqlite3` runtime requirement\n- **README badge cleanup**: Removed the Ask DeepWiki badge from the published CLI package README; the repo root README still keeps it\n\n## [0.13.6] - 2026-03-11\n\n### Changed\n\n- **Refreshed CLI Dashboard Wordmark**: Updated the dashboard wordmark/header styling for a cleaner splash and dashboard identity\n\n### Fixed\n\n- **OpenCode dashboard startup**: OpenCode DB-backed session discovery now resolves projects by worktree, sandboxes, and session directory instead of quietly behaving like no session exists\n- **OpenCode runtime notices**: The CLI now prints an OpenCode-only actionable notice when `opencode.db` exists but `sqlite3` is missing, blocked, or otherwise unusable in the current shell environment\n\n## [0.13.5] - 2026-03-10\n\n### Added\n\n- **`sidekick status` Command**: One-shot Claude API status check with color-coded text output and `--json` mode\n- **Dashboard Status Banner**: Status bar shows a colored `\u25CF API minor/major/critical` indicator when Claude is degraded; Sessions panel Summary tab shows an "API Status" section with affected components and active incident details. Polls every 60s\n\n## [0.13.4] - 2026-03-08\n\n### Fixed\n\n- **Onboarding Phrase Spam**: Splash screen and detail pane motivational phrases memoized \u2014 no longer flicker every render tick (fixes [#13](https://github.com/cesarandreslopez/sidekick-agent-hub/issues/13))\n\n### Changed\n\n- **Simplified Logo**: Replaced 6-line ASCII robot art with compact text header in splash, help, and changelog overlays\n- **Removed Dead Code**: Removed unused `getSplashContent()` and `HELP_HEADER` exports from branding module\n\n## [0.13.3] - 2026-03-04\n\n_No CLI-specific changes in this release._\n\n## [0.13.2] - 2026-03-04\n\n_No CLI-specific changes in this release._\n\n## [0.13.1] - 2026-03-04\n\n### Added\n\n- **`sidekick quota` Command**: One-shot subscription quota check showing 5-hour and 7-day utilization with color-coded progress bars and reset countdowns \u2014 supports `--json` for machine-readable output\n- **Quota Projections**: Elapsed-time projections shown in `sidekick quota` output and TUI dashboard quota section \u2014 displays projected end-of-window utilization next to current value (e.g., `40% \u2192 100%`), included in `--json` output as `projectedFiveHour` / `projectedSevenDay`\n\n## [0.13.0] - 2026-03-03\n\n_No CLI-specific changes in this release._\n\n## [0.12.10] - 2026-03-01\n\n### Added\n\n- **Events Panel** (key 7): Scrollable live event stream with colored type badges (`[USR]`, `[AST]`, `[TOOL]`, `[RES]`), timestamps, and keyword-highlighted summaries; detail tabs for full event JSON and surrounding context\n- **Charts Panel** (key 8): Tool frequency horizontal bars, event type distribution, 60-minute activity heatmap using `\u2591\u2592\u2593\u2588` intensity characters, and pattern analysis with frequency bars and template text\n- **Multi-Mode Filter**: `/` filter overlay now supports four modes \u2014 substring, fuzzy, regex, and date range \u2014 Tab cycles modes, regex mode shows red validation errors\n- **Search Term Highlighting**: Active filter terms highlighted in blue within side list items\n- **Timeline Keyword Coloring**: Event summaries in the Sessions panel Timeline tab now use semantic keyword coloring \u2014 errors red, success green, tool names cyan, file paths magenta\n\n### Removed\n\n- **Search Panel**: Removed redundant Search panel (previously key 7) \u2014 the `/` filter with multi-mode support serves the same purpose\n\n## [0.12.9] - 2026-02-28\n\n### Added\n\n- **Standalone Data Commands**: `sidekick tasks`, `sidekick decisions`, `sidekick notes`, `sidekick stats`, `sidekick handoff` for accessing project data without launching the TUI\n- **`sidekick search <query>`**: Cross-session full-text search from the terminal\n- **`sidekick context`**: Composite output of tasks, decisions, notes, and handoff for piping into other tools\n- **`--list` flag on `sidekick dump`**: Discover available session IDs before requiring `--session <id>`\n- **Search Panel**: Search panel (panel 7) wired into the TUI dashboard\n\n### Changed\n\n- **`taskMerger` utility**: Duplicate `mergeTasks` logic extracted into shared `taskMerger` utility\n- **Model constants**: Hardcoded model IDs extracted to named constants\n\n### Fixed\n\n- **`convention` icon**: Notes panel icon replaced with valid `tip` type\n- **Linux clipboard**: Now supports Wayland (`wl-copy`) and `xsel` fallbacks, with error messages instead of silent failure\n- **`provider.dispose()`**: Added to `dump` and `report` commands (prevents SQLite connection leaks)\n\n## [0.12.8] - 2026-02-28\n\n### Changed\n\n- **Dashboard UI/UX Polish**: Visual overhaul for better hierarchy, consistency, and readability\n - Splash screen and help overlay now display the robot ASCII logo\n - Toast notifications show severity icons (\u2718 error, \u26A0 warning, \u25CF info) with inner padding\n - Focused pane uses double-border for clear focus indication\n - Section dividers (`\u2500\u2500 Title \u2500\u2500\u2500\u2500`) replace bare bold headers in summary, agents, and context attribution\n - Tab bar: active tab underlined in magenta, inactive tabs dimmed, bracket syntax removed\n - Status bar: segmented layout with `\u2502` separators; keys bold, labels dim\n - Summary metrics condensed: elapsed/events/compactions on one line, tokens on one line with cache rate and cost\n - Sparklines display peak metadata annotations\n - Progress bars use blessed color tags for consistent coloring\n - Help overlay uses dot-leader alignment for all keybinding rows\n - Empty state hints per panel (e.g. "Tasks appear as your agent works.")\n - Session picker groups sessions by provider with section headers when multiple providers are present\n\n## [0.12.7] - 2026-02-27\n\n### Added\n\n- **HTML Session Report**: `sidekick report` command generates a self-contained HTML report and opens it in the default browser\n - Options: `--session`, `--output`, `--theme` (dark/light), `--no-open`, `--no-thinking`\n - TUI Dashboard: press `r` to generate and open an HTML report for the current session\n\n## [0.12.6] - 2026-02-26\n\n### Added\n\n- **Session Dump Command**: `sidekick dump` exports session data in text, markdown, or JSON format with `--format`, `--width`, and `--expand` options\n- **Plans Panel Re-enabled**: Plans panel restored in CLI dashboard with plan file discovery from `~/.claude/plans/`\n- **Enhanced Status Bar**: Session info display improved with richer metadata\n\n### Fixed\n\n- **Old snapshot format migration**: Restoring pre-0.12.3 session snapshots no longer shows empty timeline entries\n\n### Changed\n\n- **Phrase library moved to shared**: CLI-specific phrase formatting kept local, all phrase content now from `sidekick-shared`\n\n## [0.12.5] - 2026-02-24\n\n### Fixed\n\n- **Update check too slow to notice new versions**: Reduced npm registry cache TTL from 24 hours to 4 hours so upgrade notices appear sooner after a new release\n\n## [0.12.4] - 2026-02-24\n\n### Fixed\n\n- **Session crash on upgrade**: Fixed `d.timestamp.getTime is not a function` error when restoring tool call data from session snapshots \u2014 `Date` objects were serialized to strings by JSON but not rehydrated on restore, causing the session monitor to crash on first run after upgrading from 0.12.2 to 0.12.3\n\n## [0.12.3] - 2026-02-24\n\n### Added\n\n- **Latest-node indicator**: The most recently added node in tree and boxed mind map views is now marked with a yellow indicator\n- **Plan analytics in mind map**: Tree and boxed views now display plan progress and per-step metrics\n - Tree view: plan header shows completion stats; steps show complexity, duration, tokens, tool calls, and errors in metadata brackets\n - Box view: progress bar with completion percentage; steps show right-aligned metrics; subtitle shows step count and total duration\n- **Cross-provider plan extraction**: Shared `PlanExtractor` now handles Claude Code (EnterPlanMode/ExitPlanMode) and OpenCode (`<proposed_plan>` XML) plans \u2014 previously only Codex plans were shown\n- **Enriched plan data model**: Plan steps include duration, token count, tool call count, and error messages\n- **Phase-grouped plan display**: When a plan has phase structure, tree and boxed views group steps under phase headers with context lines from the original plan markdown\n- **Node type filter**: Press `f` on the Mind Map tab to cycle through node type filters (file, tool, task, subagent, command, plan, knowledge-note) \u2014 non-matching sections render dimmed in grey\n\n### Fixed\n\n- **Kanban board regression**: Subagent and plan-step tasks now correctly appear in the kanban board\n\n### Changed\n\n- **Plans panel temporarily disabled**: The Plans panel in the CLI dashboard is disabled until plan-mode event capture is reliably working end-to-end. Plan nodes in the mind map remain active.\n- `DashboardState` now delegates to shared `EventAggregator` instead of maintaining its own aggregation logic\n\n## [0.12.2] - 2026-02-23\n\n### Added\n\n- **Update notifications**: The dashboard now checks the npm registry for newer versions on startup and shows a yellow banner in the status bar when an update is available (e.g., `v0.13.0 available \u2014 npm i -g sidekick-agent-hub`). Results are cached for 24 hours to avoid repeated network requests.\n\n## [0.12.1] - 2026-02-23\n\n### Fixed\n\n- **VS Code integration**: Fixed exit code 127 when the extension launches the CLI dashboard on systems using nvm or volta (node binary not found when shell init is bypassed)\n\n## [0.12.0] - 2026-02-22\n\n### Added\n\n- **"Open CLI Dashboard" VS Code Integration**: New VS Code command `Sidekick: Open CLI Dashboard` launches the TUI dashboard in an integrated terminal\n - Install the CLI with `npm install -g sidekick-agent-hub`\n\n## [0.11.0] - 2026-02-19\n\n### Added\n\n- **Initial Release**: Full-screen TUI dashboard for monitoring agent sessions from the terminal\n - Ink-based terminal UI with panels for sessions, tasks, kanban, mind map, notes, decisions, search, files, and git diff\n - Multi-provider support: auto-detects Claude Code, OpenCode, and Codex sessions\n - Reads from `~/.config/sidekick/` \u2014 the same data files the VS Code extension writes\n - Usage: `sidekick dashboard [--project <path>] [--provider <id>]`\n';
82331
83000
  }
82332
83001
  });
82333
83002
 
@@ -85354,7 +86023,7 @@ var init_cli = __esm({
85354
86023
  defaultAccountsReady = (0, import_sidekick_shared35.ensureDefaultAccounts)().catch(() => {
85355
86024
  });
85356
86025
  program2 = new Command();
85357
- program2.name("sidekick").description("Query Sidekick project intelligence from the command line").version("0.19.0").option("--json", "Output as JSON").option("--project <path>", "Override project path (default: cwd)").option("--provider <id>", "Provider: claude-code, opencode, codex, auto (default: auto)");
86026
+ program2.name("sidekick").description("Query Sidekick project intelligence from the command line").version("0.19.2").option("--json", "Output as JSON").option("--project <path>", "Override project path (default: cwd)").option("--provider <id>", "Provider: claude-code, opencode, codex, auto (default: auto)");
85358
86027
  program2.hook("preAction", async () => {
85359
86028
  await defaultAccountsReady;
85360
86029
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sidekick-agent-hub",
3
- "version": "0.19.0",
3
+ "version": "0.19.2",
4
4
  "description": "Terminal dashboard for monitoring AI coding agent sessions",
5
5
  "type": "module",
6
6
  "bin": {