@bismawy/pi-arnative 0.3.10 → 0.5.1

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.
@@ -87,6 +87,8 @@ interface UsageModelStats {
87
87
  cacheRead: number;
88
88
  totalTokens: number;
89
89
  cost: number;
90
+ /** Cost reconstructed from the price table, only when `cost` is 0. Never folded into `cost`. */
91
+ estimatedCost: number;
90
92
  }
91
93
 
92
94
  interface UsageProviderStats {
@@ -98,6 +100,8 @@ interface UsageProviderStats {
98
100
  cacheRead: number;
99
101
  totalTokens: number;
100
102
  cost: number;
103
+ /** Sum of the models' `estimatedCost`, for the same rows this provider could not price. */
104
+ estimatedCost: number;
101
105
  models: UsageModelStats[];
102
106
  }
103
107
 
@@ -111,9 +115,82 @@ export interface UsageSummary {
111
115
  cacheRead: number;
112
116
  totalTokens: number;
113
117
  cost: number;
118
+ /** Provider-reported cost only (never includes the estimate). */
119
+ reportedCost: number;
120
+ /** Cost reconstructed from `prices.json`. Shown with a `~`, never folded into `cost`. */
121
+ estimatedCost: number;
114
122
  };
115
123
  }
116
124
 
125
+ export type ModelPrices = Record<string, { input?: number; output?: number; cacheRead?: number }>;
126
+ export type PriceTable = Record<string, ModelPrices>;
127
+
128
+ const modelsFilePath = (): string => join(getAgentDir(), "models.json");
129
+
130
+ type ModelsJsonCost = { input?: number; output?: number; cacheRead?: number };
131
+
132
+ /**
133
+ * Rates declared automatically in pi's `models.json` (`providers.<name>.models[].cost`).
134
+ * Keyed by provider to reconstruct estimates for historical or 0-cost rows.
135
+ */
136
+ export function loadPriceTable(): PriceTable {
137
+ const table: PriceTable = {};
138
+ try {
139
+ const raw = JSON.parse(readFileSync(modelsFilePath(), "utf8")) as {
140
+ providers?: Record<string, { models?: { id?: string; cost?: ModelsJsonCost }[] }>;
141
+ };
142
+ for (const [provider, cfg] of Object.entries(raw.providers ?? {})) {
143
+ const models: ModelPrices = {};
144
+ for (const m of cfg?.models ?? []) {
145
+ const c = m?.cost;
146
+ if (!m?.id || !c || typeof c.input !== "number" || typeof c.output !== "number") continue;
147
+ models[m.id] = { input: c.input, output: c.output, cacheRead: typeof c.cacheRead === "number" ? c.cacheRead : 0 };
148
+ }
149
+ if (Object.keys(models).length > 0) table[provider] = models;
150
+ }
151
+ } catch {
152
+ // Malformed or absent models.json means no declared rates.
153
+ }
154
+ return table;
155
+ }
156
+
157
+ /** True when this provider+model has a usable input+output price (cacheRead is optional). */
158
+ export function hasPrice(provider: string, modelId: string, table: PriceTable = loadPriceTable()): boolean {
159
+ return findPrice(provider, modelId, table) !== null;
160
+ }
161
+
162
+ /** Rates for one provider+model. The provider's own entry wins over the `*` fallback. */
163
+ function findPrice(provider: string, modelId: string, table: PriceTable): { input: number; output: number; cacheRead: number } | null {
164
+ return rateFor(table[provider], modelId) ?? rateFor(table["*"], modelId);
165
+ }
166
+
167
+ function rateFor(entries: ModelPrices | undefined, modelId: string): { input: number; output: number; cacheRead: number } | null {
168
+ if (!entries || typeof entries !== "object") return null;
169
+ const lower = modelId.toLowerCase();
170
+ const keys = Object.keys(entries).filter((k) => !k.startsWith("_"));
171
+ const key =
172
+ keys.find((k) => k.toLowerCase() === lower) ??
173
+ keys.find((k) => lower.endsWith("/" + k.toLowerCase()) || k.toLowerCase().endsWith("/" + lower));
174
+ if (!key) return null;
175
+ const p = entries[key]!;
176
+ if (typeof p.input !== "number" || typeof p.output !== "number") return null;
177
+ return { input: p.input, output: p.output, cacheRead: typeof p.cacheRead === "number" ? p.cacheRead : 0 };
178
+ }
179
+
180
+ /** Cost of one provider+model's token counts from the price table, or null when unpriced. */
181
+ export function estimateCost(
182
+ input: number,
183
+ output: number,
184
+ cacheRead: number,
185
+ modelId: string,
186
+ provider: string,
187
+ table: PriceTable = loadPriceTable(),
188
+ ): number | null {
189
+ const p = findPrice(provider, modelId, table);
190
+ if (!p) return null;
191
+ return (input / 1e6) * p.input + (output / 1e6) * p.output + (cacheRead / 1e6) * p.cacheRead;
192
+ }
193
+
117
194
  /** Scaled value with 1 decimal ("2.5k"); a value that rounds up to the next unit is promoted (999,999 -> "1M", not "1000k"). */
118
195
  const fmtUnit = (v: number, unit: string, next: string): string => {
119
196
  const s = v.toFixed(1).replace(/\.0$/, "");
@@ -208,10 +285,9 @@ function entryOfLine(line: string): UsageEntry | null {
208
285
  }
209
286
 
210
287
  /**
211
- * Parse newline-terminated lines from a buffer. Byte granularity, so the returned offset can be
212
- * fed back to `readSync`. A trailing segment with no newline is parsed (the last record of a file
213
- * not ending in `\n`) but only consumed when it is valid JSON — a write caught mid-flight is left
214
- * for the next scan instead of being dropped or truncated into a bad entry.
288
+ * Parse newline-terminated lines from a buffer. The returned offset is byte-granular, so it can
289
+ * be fed back to `readSync`; a trailing segment without a newline counts only when it parses, so
290
+ * a write caught mid-flight is left for the next scan rather than dropped.
215
291
  */
216
292
  function parseBuffer(buf: Buffer): { entries: UsageEntry[]; consumed: number } {
217
293
  const entries: UsageEntry[] = [];
@@ -428,6 +504,20 @@ export function collectUsageSummary(forceScan = false): UsageSummary {
428
504
 
429
505
  providers.sort((a, b) => b.totalTokens - a.totalTokens);
430
506
 
507
+ // Estimate unpriced pairs from price table. Kept separate in estimatedCost.
508
+ const priceTable = loadPriceTable();
509
+ let estimatedCost = 0;
510
+ for (const p of providers) {
511
+ let providerEstimate = 0;
512
+ for (const m of p.models) {
513
+ const est = m.cost > 0 ? null : estimateCost(m.input, m.output, m.cacheRead, m.name, p.name, priceTable);
514
+ m.estimatedCost = est ?? 0;
515
+ providerEstimate += m.estimatedCost;
516
+ }
517
+ p.estimatedCost = providerEstimate;
518
+ estimatedCost += providerEstimate;
519
+ }
520
+
431
521
  cachedSummary = {
432
522
  providers,
433
523
  totals: {
@@ -438,6 +528,8 @@ export function collectUsageSummary(forceScan = false): UsageSummary {
438
528
  cacheRead: totalCache,
439
529
  totalTokens: totalInp + totalOut,
440
530
  cost: totalCost,
531
+ reportedCost: totalCost,
532
+ estimatedCost,
441
533
  },
442
534
  };
443
535
  lastScanMs = now;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bismawy/pi-arnative",
3
- "version": "0.3.10",
3
+ "version": "0.5.1",
4
4
  "description": "Refined aesthetics. Cohesive tools. Built for Pi. Warm themes, rounded tool boxes, tabbed header, compact footer and a /usage dashboard.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -40,8 +40,9 @@
40
40
  "@earendil-works/pi-tui": "*"
41
41
  },
42
42
  "scripts": {
43
- "dev": "pi --extension ./extensions/tools.ts --extension ./extensions/section-headers.ts --extension ./extensions/footer.ts --extension ./extensions/timestamps.ts --extension ./extensions/ui-render-tweaks.ts --extension ./extensions/usage.ts --extension ./extensions/arnative.ts",
44
- "test": "node lib/box.ts && node lib/ansi.ts && node lib/color.ts && node lib/shortcuts.ts && node lib/preset-store.ts && node themes/gen-themes.mjs --check && node extensions/tools.ts && node extensions/footer.ts && node extensions/timestamps.ts && node extensions/ui-render-tweaks.ts && node extensions/usage.ts && node extensions/arnative.ts && node --test",
43
+ "dev": "pi --extension ./extensions/tools.ts --extension ./extensions/section-headers.ts --extension ./extensions/footer.ts --extension ./extensions/timestamps.ts --extension ./extensions/ui-render-tweaks.ts --extension ./extensions/usage.ts --extension ./extensions/animations.ts --extension ./extensions/arnative.ts",
44
+ "test": "node lib/box.ts && node lib/ansi.ts && node lib/color.ts && node lib/shortcuts.ts && node lib/preset-store.ts && node lib/spinner.ts && node themes/gen-themes.mjs --check && node extensions/tools.ts && node extensions/footer.ts && node extensions/timestamps.ts && node extensions/ui-render-tweaks.ts && node extensions/usage.ts && node extensions/animations.ts && node extensions/arnative.ts && node --test",
45
+ "preview": "node scripts/preview.mjs",
45
46
  "themes": "node themes/gen-themes.mjs",
46
47
  "release:check": "node scripts/release-check.mjs pre-tag",
47
48
  "prepublishOnly": "npm test && node scripts/release-check.mjs pre-publish"
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
3
  "name": "arnative-cyberpunk",
4
4
  "appearance": "dark",
5
5
  "vars": {
@@ -7,19 +7,20 @@
7
7
  "fgMuted": "oklch(72% 0.02 275)",
8
8
  "fgDim": "oklch(61% 0.02 275)",
9
9
  "fgFaint": "oklch(49% 0.02 275)",
10
- "accent": "oklch(78% 0.144 357)",
11
- "accentSoft": "oklch(82% 0.036 357)",
12
- "accentBorder": "oklch(82% 0.113 357)",
10
+ "primary": "oklch(88% 0.18 95)",
11
+ "secondary": "oklch(82% 0.139 200)",
12
+ "accent": "oklch(78% 0.146 355)",
13
+ "accentSoft": "oklch(82% 0.026 355)",
14
+ "accentBorder": "oklch(82% 0.114 355)",
13
15
  "success": "oklch(78% 0.15 145)",
14
16
  "error": "oklch(76% 0.143 25)",
15
17
  "warning": "oklch(86% 0.14 85)",
16
- "surfaceMsg": "oklch(16% 0.01 275)"
18
+ "surfaceMsg": "oklch(24% 0.035 200)"
17
19
  },
18
20
  "colors": {
19
21
  "accent": "accent",
20
- "accentSoft": "accentSoft",
21
- "border": "oklch(55% 0.07 357)",
22
- "borderAccent": "accentBorder",
22
+ "border": "oklch(55% 0.07 200)",
23
+ "borderAccent": "secondary",
23
24
  "borderMuted": "fgFaint",
24
25
  "success": "success",
25
26
  "error": "error",
@@ -29,58 +30,58 @@
29
30
  "text": "fg",
30
31
 
31
32
  "thinkingText": "fgMuted",
32
- "selectedBg": "oklch(23% 0.05 357)",
33
+ "selectedBg": "oklch(31% 0.05 200)",
33
34
  "scrollbarTrack": "fgFaint",
34
35
  "scrollbarThumb": "accentSoft",
35
- "searchMatchBg": "oklch(30% 0.09 357)",
36
+ "searchMatchBg": "oklch(38% 0.078 95)",
36
37
  "searchMatchText": "fg",
37
38
  "userMessageBg": "surfaceMsg",
38
39
  "userMessageText": "fg",
39
- "customMessageBg": "oklch(17% 0.03 190)",
40
+ "customMessageBg": "oklch(25% 0.043 200)",
40
41
  "customMessageText": "fg",
41
- "customMessageLabel": "oklch(78% 0.135 190)",
42
- "toolPendingBg": "oklch(14% 0.059 357)",
43
- "toolSuccessBg": "oklch(13% 0.043 145)",
44
- "toolErrorBg": "oklch(13% 0.055 25)",
42
+ "customMessageLabel": "oklch(78% 0.133 200)",
43
+ "toolPendingBg": "oklch(22% 0.05 355)",
44
+ "toolSuccessBg": "oklch(21% 0.06 145)",
45
+ "toolErrorBg": "oklch(21% 0.06 25)",
45
46
  "toolTitle": "fg",
46
47
 
47
48
  "toolOutput": "fgMuted",
48
- "mdHeading": "oklch(88% 0.079 60)",
49
- "mdLink": "oklch(80% 0.138 190)",
49
+ "mdHeading": "primary",
50
+ "mdLink": "oklch(80% 0.136 200)",
50
51
  "mdLinkUrl": "fgDim",
51
- "mdCode": "oklch(80% 0.128 357)",
52
+ "mdCode": "secondary",
52
53
  "mdCodeBlock": "success",
53
54
  "mdCodeBlockBorder": "fgMuted",
54
55
  "mdQuote": "fgMuted",
55
56
  "mdQuoteBorder": "fgMuted",
56
57
  "mdHr": "fgFaint",
57
58
 
58
- "mdListBullet": "oklch(80% 0.128 357)",
59
+ "mdListBullet": "primary",
59
60
  "toolDiffAdded": "success",
60
61
  "toolDiffRemoved": "error",
61
62
  "toolDiffContext": "fgMuted",
62
63
  "syntaxComment": "fgDim",
63
- "syntaxKeyword": "oklch(80% 0.128 357)",
64
- "syntaxFunction": "oklch(86% 0.094 60)",
65
- "syntaxVariable": "oklch(84% 0.11 320)",
66
- "syntaxString": "oklch(82% 0.14 320)",
67
- "syntaxNumber": "oklch(80% 0.115 30)",
68
- "syntaxType": "oklch(80% 0.16 150)",
64
+ "syntaxKeyword": "secondary",
65
+ "syntaxFunction": "oklch(86% 0.16 95)",
66
+ "syntaxVariable": "oklch(84% 0.1 355)",
67
+ "syntaxString": "oklch(82% 0.14 140)",
68
+ "syntaxNumber": "oklch(80% 0.122 45)",
69
+ "syntaxType": "oklch(80% 0.136 200)",
69
70
  "syntaxOperator": "fg",
70
71
 
71
72
  "syntaxPunctuation": "fgMuted",
72
73
  "thinkingOff": "oklch(40% 0.02 275)",
73
- "thinkingMinimal": "oklch(47% 0.05 357)",
74
- "thinkingLow": "oklch(55% 0.08 357)",
75
- "thinkingMedium": "oklch(63% 0.12 357)",
76
- "thinkingHigh": "oklch(71% 0.16 357)",
77
- "thinkingXhigh": "oklch(79% 0.136 357)",
74
+ "thinkingMinimal": "oklch(47% 0.05 355)",
75
+ "thinkingLow": "oklch(55% 0.08 355)",
76
+ "thinkingMedium": "oklch(63% 0.12 355)",
77
+ "thinkingHigh": "oklch(71% 0.16 355)",
78
+ "thinkingXhigh": "oklch(79% 0.138 355)",
78
79
  "thinkingMax": "accent",
79
80
  "bashMode": "success"
80
81
  },
81
82
  "export": {
82
- "pageBg": "oklch(10% 0.02 275)",
83
- "cardBg": "oklch(13% 0.02 275)",
84
- "infoBg": "oklch(21% 0.05 357)"
83
+ "pageBg": "oklch(18% 0.02 275)",
84
+ "cardBg": "oklch(21% 0.02 275)",
85
+ "infoBg": "oklch(29% 0.05 355)"
85
86
  }
86
87
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
3
  "name": "arnative-dracula",
4
4
  "appearance": "dark",
5
5
  "vars": {
@@ -7,9 +7,11 @@
7
7
  "fgMuted": "oklch(72% 0.012 285)",
8
8
  "fgDim": "oklch(61% 0.012 285)",
9
9
  "fgFaint": "oklch(49% 0.012 285)",
10
- "accent": "oklch(78% 0.135 302)",
11
- "accentSoft": "oklch(82% 0.025 302)",
12
- "accentBorder": "oklch(82% 0.084 302)",
10
+ "primary": "oklch(78% 0.125 295)",
11
+ "secondary": "oklch(82% 0.13 190)",
12
+ "accent": "oklch(78% 0.14 330)",
13
+ "accentSoft": "oklch(82% 0.025 330)",
14
+ "accentBorder": "oklch(82% 0.084 330)",
13
15
  "success": "oklch(78% 0.14 145)",
14
16
  "error": "oklch(76% 0.14 25)",
15
17
  "warning": "oklch(86% 0.14 85)",
@@ -17,9 +19,8 @@
17
19
  },
18
20
  "colors": {
19
21
  "accent": "accent",
20
- "accentSoft": "accentSoft",
21
- "border": "oklch(55% 0.049 302)",
22
- "borderAccent": "accentBorder",
22
+ "border": "oklch(55% 0.049 295)",
23
+ "borderAccent": "secondary",
23
24
  "borderMuted": "fgFaint",
24
25
  "success": "success",
25
26
  "error": "error",
@@ -29,58 +30,58 @@
29
30
  "text": "fg",
30
31
 
31
32
  "thinkingText": "fgMuted",
32
- "selectedBg": "oklch(36% 0.035 302)",
33
+ "selectedBg": "oklch(36% 0.035 295)",
33
34
  "scrollbarTrack": "fgFaint",
34
35
  "scrollbarThumb": "accentSoft",
35
- "searchMatchBg": "oklch(43% 0.063 302)",
36
+ "searchMatchBg": "oklch(43% 0.063 85)",
36
37
  "searchMatchText": "fg",
37
38
  "userMessageBg": "surfaceMsg",
38
39
  "userMessageText": "fg",
39
- "customMessageBg": "oklch(30% 0.056 330)",
40
+ "customMessageBg": "oklch(30% 0.05 190)",
40
41
  "customMessageText": "fg",
41
- "customMessageLabel": "oklch(78% 0.098 330)",
42
- "toolPendingBg": "oklch(27% 0.042 302)",
42
+ "customMessageLabel": "oklch(78% 0.098 190)",
43
+ "toolPendingBg": "oklch(27% 0.042 330)",
43
44
  "toolSuccessBg": "oklch(26% 0.056 145)",
44
45
  "toolErrorBg": "oklch(26% 0.056 25)",
45
46
  "toolTitle": "fg",
46
47
 
47
48
  "toolOutput": "fgMuted",
48
- "mdHeading": "oklch(88% 0.079 60)",
49
+ "mdHeading": "oklch(88% 0.084 85)",
49
50
  "mdLink": "oklch(80% 0.098 190)",
50
51
  "mdLinkUrl": "fgDim",
51
- "mdCode": "oklch(80% 0.098 302)",
52
+ "mdCode": "secondary",
52
53
  "mdCodeBlock": "success",
53
54
  "mdCodeBlockBorder": "fgMuted",
54
55
  "mdQuote": "fgMuted",
55
56
  "mdQuoteBorder": "fgMuted",
56
57
  "mdHr": "fgFaint",
57
58
 
58
- "mdListBullet": "oklch(80% 0.098 302)",
59
+ "mdListBullet": "accent",
59
60
  "toolDiffAdded": "success",
60
61
  "toolDiffRemoved": "error",
61
62
  "toolDiffContext": "fgMuted",
62
63
  "syntaxComment": "fgDim",
63
- "syntaxKeyword": "oklch(80% 0.098 302)",
64
- "syntaxFunction": "oklch(86% 0.112 135)",
64
+ "syntaxKeyword": "oklch(80% 0.098 330)",
65
+ "syntaxFunction": "oklch(86% 0.112 140)",
65
66
  "syntaxVariable": "oklch(84% 0.077 190)",
66
- "syntaxString": "oklch(82% 0.098 60)",
67
- "syntaxNumber": "oklch(80% 0.098 265)",
67
+ "syntaxString": "oklch(82% 0.098 85)",
68
+ "syntaxNumber": "oklch(80% 0.098 295)",
68
69
  "syntaxType": "oklch(80% 0.112 190)",
69
70
  "syntaxOperator": "fg",
70
71
 
71
72
  "syntaxPunctuation": "fgMuted",
72
73
  "thinkingOff": "oklch(40% 0.012 285)",
73
- "thinkingMinimal": "oklch(47% 0.035 302)",
74
- "thinkingLow": "oklch(55% 0.056 302)",
75
- "thinkingMedium": "oklch(63% 0.084 302)",
76
- "thinkingHigh": "oklch(71% 0.112 302)",
77
- "thinkingXhigh": "oklch(79% 0.128 302)",
74
+ "thinkingMinimal": "oklch(47% 0.035 330)",
75
+ "thinkingLow": "oklch(55% 0.056 330)",
76
+ "thinkingMedium": "oklch(63% 0.084 330)",
77
+ "thinkingHigh": "oklch(71% 0.112 330)",
78
+ "thinkingXhigh": "oklch(79% 0.14 330)",
78
79
  "thinkingMax": "accent",
79
80
  "bashMode": "success"
80
81
  },
81
82
  "export": {
82
83
  "pageBg": "oklch(23% 0.012 285)",
83
84
  "cardBg": "oklch(26% 0.012 285)",
84
- "infoBg": "oklch(34% 0.035 302)"
85
+ "infoBg": "oklch(34% 0.035 330)"
85
86
  }
86
87
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
3
  "name": "arnative-emerald",
4
4
  "appearance": "dark",
5
5
  "vars": {
@@ -7,6 +7,8 @@
7
7
  "fgMuted": "oklch(72% 0.012 165)",
8
8
  "fgDim": "oklch(61% 0.012 165)",
9
9
  "fgFaint": "oklch(49% 0.012 165)",
10
+ "primary": "oklch(84% 0.13 165)",
11
+ "secondary": "oklch(78% 0.1 195)",
10
12
  "accent": "oklch(78% 0.12 165)",
11
13
  "accentSoft": "oklch(82% 0.022 165)",
12
14
  "accentBorder": "oklch(82% 0.072 165)",
@@ -17,8 +19,7 @@
17
19
  },
18
20
  "colors": {
19
21
  "accent": "accent",
20
- "accentSoft": "accentSoft",
21
- "border": "oklch(55% 0.042 165)",
22
+ "border": "oklch(55% 0.042 0)",
22
23
  "borderAccent": "accentBorder",
23
24
  "borderMuted": "fgFaint",
24
25
  "success": "success",
@@ -29,10 +30,10 @@
29
30
  "text": "fg",
30
31
 
31
32
  "thinkingText": "fgMuted",
32
- "selectedBg": "oklch(34% 0.03 165)",
33
+ "selectedBg": "oklch(34% 0.03 0)",
33
34
  "scrollbarTrack": "fgFaint",
34
35
  "scrollbarThumb": "accentSoft",
35
- "searchMatchBg": "oklch(41% 0.054 165)",
36
+ "searchMatchBg": "oklch(41% 0.054 0)",
36
37
  "searchMatchText": "fg",
37
38
  "userMessageBg": "surfaceMsg",
38
39
  "userMessageText": "fg",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
3
  "name": "arnative-gruvbox",
4
4
  "appearance": "dark",
5
5
  "vars": {
@@ -7,9 +7,11 @@
7
7
  "fgMuted": "oklch(72% 0.015 70)",
8
8
  "fgDim": "oklch(61% 0.015 70)",
9
9
  "fgFaint": "oklch(49% 0.015 70)",
10
- "accent": "oklch(78% 0.14 83)",
11
- "accentSoft": "oklch(82% 0.025 83)",
12
- "accentBorder": "oklch(82% 0.084 83)",
10
+ "primary": "oklch(84% 0.14 83)",
11
+ "secondary": "oklch(78% 0.1 175)",
12
+ "accent": "oklch(78% 0.137 45)",
13
+ "accentSoft": "oklch(82% 0.025 45)",
14
+ "accentBorder": "oklch(82% 0.084 45)",
13
15
  "success": "oklch(78% 0.14 145)",
14
16
  "error": "oklch(76% 0.14 25)",
15
17
  "warning": "oklch(86% 0.14 85)",
@@ -17,9 +19,8 @@
17
19
  },
18
20
  "colors": {
19
21
  "accent": "accent",
20
- "accentSoft": "accentSoft",
21
22
  "border": "oklch(55% 0.049 83)",
22
- "borderAccent": "accentBorder",
23
+ "borderAccent": "secondary",
23
24
  "borderMuted": "fgFaint",
24
25
  "success": "success",
25
26
  "error": "error",
@@ -36,51 +37,51 @@
36
37
  "searchMatchText": "fg",
37
38
  "userMessageBg": "surfaceMsg",
38
39
  "userMessageText": "fg",
39
- "customMessageBg": "oklch(25% 0.056 330)",
40
+ "customMessageBg": "oklch(25% 0.047 175)",
40
41
  "customMessageText": "fg",
41
- "customMessageLabel": "oklch(78% 0.098 330)",
42
- "toolPendingBg": "oklch(22% 0.042 83)",
42
+ "customMessageLabel": "oklch(78% 0.098 175)",
43
+ "toolPendingBg": "oklch(22% 0.042 45)",
43
44
  "toolSuccessBg": "oklch(21% 0.056 145)",
44
45
  "toolErrorBg": "oklch(21% 0.056 25)",
45
46
  "toolTitle": "fg",
46
47
 
47
48
  "toolOutput": "fgMuted",
48
- "mdHeading": "oklch(88% 0.068 45)",
49
- "mdLink": "oklch(80% 0.098 200)",
49
+ "mdHeading": "primary",
50
+ "mdLink": "oklch(80% 0.098 175)",
50
51
  "mdLinkUrl": "fgDim",
51
- "mdCode": "oklch(80% 0.098 83)",
52
+ "mdCode": "secondary",
52
53
  "mdCodeBlock": "success",
53
54
  "mdCodeBlockBorder": "fgMuted",
54
55
  "mdQuote": "fgMuted",
55
56
  "mdQuoteBorder": "fgMuted",
56
57
  "mdHr": "fgFaint",
57
58
 
58
- "mdListBullet": "oklch(80% 0.098 83)",
59
+ "mdListBullet": "accent",
59
60
  "toolDiffAdded": "success",
60
61
  "toolDiffRemoved": "error",
61
62
  "toolDiffContext": "fgMuted",
62
63
  "syntaxComment": "fgDim",
63
- "syntaxKeyword": "oklch(80% 0.098 83)",
64
- "syntaxFunction": "oklch(86% 0.109 70)",
65
- "syntaxVariable": "oklch(84% 0.077 200)",
66
- "syntaxString": "oklch(82% 0.098 70)",
67
- "syntaxNumber": "oklch(80% 0.098 330)",
68
- "syntaxType": "oklch(80% 0.112 45)",
64
+ "syntaxKeyword": "oklch(80% 0.098 45)",
65
+ "syntaxFunction": "oklch(86% 0.112 83)",
66
+ "syntaxVariable": "oklch(84% 0.077 175)",
67
+ "syntaxString": "oklch(82% 0.098 145)",
68
+ "syntaxNumber": "oklch(80% 0.098 45)",
69
+ "syntaxType": "oklch(80% 0.112 83)",
69
70
  "syntaxOperator": "fg",
70
71
 
71
72
  "syntaxPunctuation": "fgMuted",
72
73
  "thinkingOff": "oklch(40% 0.015 70)",
73
- "thinkingMinimal": "oklch(47% 0.035 83)",
74
- "thinkingLow": "oklch(55% 0.056 83)",
75
- "thinkingMedium": "oklch(63% 0.084 83)",
76
- "thinkingHigh": "oklch(71% 0.112 83)",
77
- "thinkingXhigh": "oklch(79% 0.14 83)",
74
+ "thinkingMinimal": "oklch(47% 0.035 45)",
75
+ "thinkingLow": "oklch(55% 0.056 45)",
76
+ "thinkingMedium": "oklch(63% 0.084 45)",
77
+ "thinkingHigh": "oklch(71% 0.112 45)",
78
+ "thinkingXhigh": "oklch(79% 0.13 45)",
78
79
  "thinkingMax": "accent",
79
80
  "bashMode": "success"
80
81
  },
81
82
  "export": {
82
83
  "pageBg": "oklch(18% 0.015 70)",
83
84
  "cardBg": "oklch(21% 0.015 70)",
84
- "infoBg": "oklch(29% 0.035 83)"
85
+ "infoBg": "oklch(29% 0.035 45)"
85
86
  }
86
87
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
2
+ "$schema": "https://pi.dev/schemas/theme.schema.json",
3
3
  "name": "arnative-matrix",
4
4
  "appearance": "dark",
5
5
  "vars": {
@@ -7,18 +7,19 @@
7
7
  "fgMuted": "oklch(72% 0.02 145)",
8
8
  "fgDim": "oklch(61% 0.02 145)",
9
9
  "fgFaint": "oklch(49% 0.02 145)",
10
+ "primary": "oklch(88% 0.24 145)",
11
+ "secondary": "oklch(76% 0.16 165)",
10
12
  "accent": "oklch(78% 0.22 144)",
11
13
  "accentSoft": "oklch(82% 0.04 144)",
12
14
  "accentBorder": "oklch(82% 0.132 144)",
13
15
  "success": "oklch(78% 0.15 145)",
14
16
  "error": "oklch(76% 0.143 25)",
15
17
  "warning": "oklch(86% 0.14 85)",
16
- "surfaceMsg": "oklch(15% 0.01 145)"
18
+ "surfaceMsg": "oklch(24% 0.035 145)"
17
19
  },
18
20
  "colors": {
19
21
  "accent": "accent",
20
- "accentSoft": "accentSoft",
21
- "border": "oklch(55% 0.077 144)",
22
+ "border": "oklch(55% 0.077 0)",
22
23
  "borderAccent": "accentBorder",
23
24
  "borderMuted": "fgFaint",
24
25
  "success": "success",
@@ -29,43 +30,43 @@
29
30
  "text": "fg",
30
31
 
31
32
  "thinkingText": "fgMuted",
32
- "selectedBg": "oklch(22% 0.055 144)",
33
+ "selectedBg": "oklch(31% 0.055 0)",
33
34
  "scrollbarTrack": "fgFaint",
34
35
  "scrollbarThumb": "accentSoft",
35
- "searchMatchBg": "oklch(29% 0.093 144)",
36
+ "searchMatchBg": "oklch(38% 0.099 0)",
36
37
  "searchMatchText": "fg",
37
38
  "userMessageBg": "surfaceMsg",
38
39
  "userMessageText": "fg",
39
- "customMessageBg": "oklch(16% 0.052 145)",
40
+ "customMessageBg": "oklch(25% 0.05 145)",
40
41
  "customMessageText": "fg",
41
- "customMessageLabel": "oklch(78% 0.154 145)",
42
- "toolPendingBg": "oklch(13% 0.044 144)",
43
- "toolSuccessBg": "oklch(12% 0.04 145)",
44
- "toolErrorBg": "oklch(12% 0.051 25)",
42
+ "customMessageLabel": "oklch(78% 0.14 145)",
43
+ "toolPendingBg": "oklch(22% 0.05 144)",
44
+ "toolSuccessBg": "oklch(21% 0.06 145)",
45
+ "toolErrorBg": "oklch(21% 0.06 25)",
45
46
  "toolTitle": "fg",
46
47
 
47
48
  "toolOutput": "fgMuted",
48
49
  "mdHeading": "oklch(88% 0.132 145)",
49
- "mdLink": "oklch(80% 0.154 145)",
50
+ "mdLink": "oklch(80% 0.14 145)",
50
51
  "mdLinkUrl": "fgDim",
51
- "mdCode": "oklch(80% 0.154 144)",
52
+ "mdCode": "oklch(80% 0.14 144)",
52
53
  "mdCodeBlock": "success",
53
54
  "mdCodeBlockBorder": "fgMuted",
54
55
  "mdQuote": "fgMuted",
55
56
  "mdQuoteBorder": "fgMuted",
56
57
  "mdHr": "fgFaint",
57
58
 
58
- "mdListBullet": "oklch(80% 0.154 144)",
59
+ "mdListBullet": "oklch(80% 0.14 144)",
59
60
  "toolDiffAdded": "success",
60
61
  "toolDiffRemoved": "error",
61
62
  "toolDiffContext": "fgMuted",
62
63
  "syntaxComment": "fgDim",
63
- "syntaxKeyword": "oklch(80% 0.154 144)",
64
- "syntaxFunction": "oklch(86% 0.176 145)",
64
+ "syntaxKeyword": "oklch(80% 0.14 144)",
65
+ "syntaxFunction": "oklch(86% 0.16 145)",
65
66
  "syntaxVariable": "oklch(84% 0.121 145)",
66
67
  "syntaxString": "oklch(82% 0.154 145)",
67
- "syntaxNumber": "oklch(80% 0.154 145)",
68
- "syntaxType": "oklch(80% 0.176 145)",
68
+ "syntaxNumber": "oklch(80% 0.15 145)",
69
+ "syntaxType": "oklch(80% 0.16 145)",
69
70
  "syntaxOperator": "fg",
70
71
 
71
72
  "syntaxPunctuation": "fgMuted",
@@ -79,8 +80,8 @@
79
80
  "bashMode": "success"
80
81
  },
81
82
  "export": {
82
- "pageBg": "oklch(9% 0.02 145)",
83
- "cardBg": "oklch(12% 0.02 145)",
84
- "infoBg": "oklch(20% 0.055 144)"
83
+ "pageBg": "oklch(18% 0.02 145)",
84
+ "cardBg": "oklch(21% 0.02 145)",
85
+ "infoBg": "oklch(29% 0.055 144)"
85
86
  }
86
87
  }