theme-schema.json 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "Pi Coding Agent Theme",
  4. "description": "Theme schema for Pi coding agent",
  5. "type": "object",
  6. "required": ["name", "colors"],
  7. "properties": {
  8. "$schema": {
  9. "type": "string",
  10. "description": "JSON schema reference"
  11. },
  12. "name": {
  13. "type": "string",
  14. "description": "Theme name"
  15. },
  16. "vars": {
  17. "type": "object",
  18. "description": "Reusable color variables",
  19. "additionalProperties": {
  20. "oneOf": [
  21. {
  22. "type": "string",
  23. "description": "Hex color (#RRGGBB), variable reference, or empty string for terminal default"
  24. },
  25. {
  26. "type": "integer",
  27. "minimum": 0,
  28. "maximum": 255,
  29. "description": "256-color palette index (0-255)"
  30. }
  31. ]
  32. }
  33. },
  34. "colors": {
  35. "type": "object",
  36. "description": "Theme color definitions (all required)",
  37. "required": [
  38. "accent",
  39. "border",
  40. "borderAccent",
  41. "borderMuted",
  42. "success",
  43. "error",
  44. "warning",
  45. "muted",
  46. "dim",
  47. "text",
  48. "thinkingText",
  49. "selectedBg",
  50. "userMessageBg",
  51. "userMessageText",
  52. "customMessageBg",
  53. "customMessageText",
  54. "customMessageLabel",
  55. "toolPendingBg",
  56. "toolSuccessBg",
  57. "toolErrorBg",
  58. "toolTitle",
  59. "toolOutput",
  60. "mdHeading",
  61. "mdLink",
  62. "mdLinkUrl",
  63. "mdCode",
  64. "mdCodeBlock",
  65. "mdCodeBlockBorder",
  66. "mdQuote",
  67. "mdQuoteBorder",
  68. "mdHr",
  69. "mdListBullet",
  70. "toolDiffAdded",
  71. "toolDiffRemoved",
  72. "toolDiffContext",
  73. "syntaxComment",
  74. "syntaxKeyword",
  75. "syntaxFunction",
  76. "syntaxVariable",
  77. "syntaxString",
  78. "syntaxNumber",
  79. "syntaxType",
  80. "syntaxOperator",
  81. "syntaxPunctuation",
  82. "thinkingOff",
  83. "thinkingMinimal",
  84. "thinkingLow",
  85. "thinkingMedium",
  86. "thinkingHigh",
  87. "thinkingXhigh",
  88. "bashMode"
  89. ],
  90. "properties": {
  91. "accent": {
  92. "$ref": "#/$defs/colorValue",
  93. "description": "Primary accent color (logo, selected items, cursor)"
  94. },
  95. "border": {
  96. "$ref": "#/$defs/colorValue",
  97. "description": "Normal borders"
  98. },
  99. "borderAccent": {
  100. "$ref": "#/$defs/colorValue",
  101. "description": "Highlighted borders"
  102. },
  103. "borderMuted": {
  104. "$ref": "#/$defs/colorValue",
  105. "description": "Subtle borders"
  106. },
  107. "success": {
  108. "$ref": "#/$defs/colorValue",
  109. "description": "Success states"
  110. },
  111. "error": {
  112. "$ref": "#/$defs/colorValue",
  113. "description": "Error states"
  114. },
  115. "warning": {
  116. "$ref": "#/$defs/colorValue",
  117. "description": "Warning states"
  118. },
  119. "muted": {
  120. "$ref": "#/$defs/colorValue",
  121. "description": "Secondary/dimmed text"
  122. },
  123. "dim": {
  124. "$ref": "#/$defs/colorValue",
  125. "description": "Very dimmed text (more subtle than muted)"
  126. },
  127. "text": {
  128. "$ref": "#/$defs/colorValue",
  129. "description": "Default text color (usually empty string)"
  130. },
  131. "thinkingText": {
  132. "$ref": "#/$defs/colorValue",
  133. "description": "Thinking block text color"
  134. },
  135. "selectedBg": {
  136. "$ref": "#/$defs/colorValue",
  137. "description": "Selected item background"
  138. },
  139. "userMessageBg": {
  140. "$ref": "#/$defs/colorValue",
  141. "description": "User message background"
  142. },
  143. "userMessageText": {
  144. "$ref": "#/$defs/colorValue",
  145. "description": "User message text color"
  146. },
  147. "customMessageBg": {
  148. "$ref": "#/$defs/colorValue",
  149. "description": "Custom message background (hook-injected messages)"
  150. },
  151. "customMessageText": {
  152. "$ref": "#/$defs/colorValue",
  153. "description": "Custom message text color"
  154. },
  155. "customMessageLabel": {
  156. "$ref": "#/$defs/colorValue",
  157. "description": "Custom message type label color"
  158. },
  159. "toolPendingBg": {
  160. "$ref": "#/$defs/colorValue",
  161. "description": "Tool execution box (pending state)"
  162. },
  163. "toolSuccessBg": {
  164. "$ref": "#/$defs/colorValue",
  165. "description": "Tool execution box (success state)"
  166. },
  167. "toolErrorBg": {
  168. "$ref": "#/$defs/colorValue",
  169. "description": "Tool execution box (error state)"
  170. },
  171. "toolTitle": {
  172. "$ref": "#/$defs/colorValue",
  173. "description": "Tool execution box title color"
  174. },
  175. "toolOutput": {
  176. "$ref": "#/$defs/colorValue",
  177. "description": "Tool execution box output text color"
  178. },
  179. "mdHeading": {
  180. "$ref": "#/$defs/colorValue",
  181. "description": "Markdown heading text"
  182. },
  183. "mdLink": {
  184. "$ref": "#/$defs/colorValue",
  185. "description": "Markdown link text"
  186. },
  187. "mdLinkUrl": {
  188. "$ref": "#/$defs/colorValue",
  189. "description": "Markdown link URL"
  190. },
  191. "mdCode": {
  192. "$ref": "#/$defs/colorValue",
  193. "description": "Markdown inline code"
  194. },
  195. "mdCodeBlock": {
  196. "$ref": "#/$defs/colorValue",
  197. "description": "Markdown code block content"
  198. },
  199. "mdCodeBlockBorder": {
  200. "$ref": "#/$defs/colorValue",
  201. "description": "Markdown code block fences"
  202. },
  203. "mdQuote": {
  204. "$ref": "#/$defs/colorValue",
  205. "description": "Markdown blockquote text"
  206. },
  207. "mdQuoteBorder": {
  208. "$ref": "#/$defs/colorValue",
  209. "description": "Markdown blockquote border"
  210. },
  211. "mdHr": {
  212. "$ref": "#/$defs/colorValue",
  213. "description": "Markdown horizontal rule"
  214. },
  215. "mdListBullet": {
  216. "$ref": "#/$defs/colorValue",
  217. "description": "Markdown list bullets/numbers"
  218. },
  219. "toolDiffAdded": {
  220. "$ref": "#/$defs/colorValue",
  221. "description": "Added lines in tool diffs"
  222. },
  223. "toolDiffRemoved": {
  224. "$ref": "#/$defs/colorValue",
  225. "description": "Removed lines in tool diffs"
  226. },
  227. "toolDiffContext": {
  228. "$ref": "#/$defs/colorValue",
  229. "description": "Context lines in tool diffs"
  230. },
  231. "syntaxComment": {
  232. "$ref": "#/$defs/colorValue",
  233. "description": "Syntax highlighting: comments"
  234. },
  235. "syntaxKeyword": {
  236. "$ref": "#/$defs/colorValue",
  237. "description": "Syntax highlighting: keywords"
  238. },
  239. "syntaxFunction": {
  240. "$ref": "#/$defs/colorValue",
  241. "description": "Syntax highlighting: function names"
  242. },
  243. "syntaxVariable": {
  244. "$ref": "#/$defs/colorValue",
  245. "description": "Syntax highlighting: variable names"
  246. },
  247. "syntaxString": {
  248. "$ref": "#/$defs/colorValue",
  249. "description": "Syntax highlighting: string literals"
  250. },
  251. "syntaxNumber": {
  252. "$ref": "#/$defs/colorValue",
  253. "description": "Syntax highlighting: number literals"
  254. },
  255. "syntaxType": {
  256. "$ref": "#/$defs/colorValue",
  257. "description": "Syntax highlighting: type names"
  258. },
  259. "syntaxOperator": {
  260. "$ref": "#/$defs/colorValue",
  261. "description": "Syntax highlighting: operators"
  262. },
  263. "syntaxPunctuation": {
  264. "$ref": "#/$defs/colorValue",
  265. "description": "Syntax highlighting: punctuation"
  266. },
  267. "thinkingOff": {
  268. "$ref": "#/$defs/colorValue",
  269. "description": "Thinking level border: off"
  270. },
  271. "thinkingMinimal": {
  272. "$ref": "#/$defs/colorValue",
  273. "description": "Thinking level border: minimal"
  274. },
  275. "thinkingLow": {
  276. "$ref": "#/$defs/colorValue",
  277. "description": "Thinking level border: low"
  278. },
  279. "thinkingMedium": {
  280. "$ref": "#/$defs/colorValue",
  281. "description": "Thinking level border: medium"
  282. },
  283. "thinkingHigh": {
  284. "$ref": "#/$defs/colorValue",
  285. "description": "Thinking level border: high"
  286. },
  287. "thinkingXhigh": {
  288. "$ref": "#/$defs/colorValue",
  289. "description": "Thinking level border: xhigh (OpenAI codex-max only)"
  290. },
  291. "bashMode": {
  292. "$ref": "#/$defs/colorValue",
  293. "description": "Editor border color in bash mode"
  294. }
  295. },
  296. "additionalProperties": false
  297. },
  298. "export": {
  299. "type": "object",
  300. "description": "Optional colors for HTML export (defaults derived from userMessageBg if not specified)",
  301. "properties": {
  302. "pageBg": {
  303. "$ref": "#/$defs/colorValue",
  304. "description": "Page background color"
  305. },
  306. "cardBg": {
  307. "$ref": "#/$defs/colorValue",
  308. "description": "Card/container background color"
  309. },
  310. "infoBg": {
  311. "$ref": "#/$defs/colorValue",
  312. "description": "Info sections background (system prompt, notices)"
  313. }
  314. },
  315. "additionalProperties": false
  316. }
  317. },
  318. "additionalProperties": false,
  319. "$defs": {
  320. "colorValue": {
  321. "oneOf": [
  322. {
  323. "type": "string",
  324. "description": "Hex color (#RRGGBB), variable reference, or empty string for terminal default"
  325. },
  326. {
  327. "type": "integer",
  328. "minimum": 0,
  329. "maximum": 255,
  330. "description": "256-color palette index (0-255)"
  331. }
  332. ]
  333. }
  334. }
  335. }