@timurproko/a1 0.2.2 → 0.2.3-dev.655

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 (85) hide show
  1. package/dist/app/session-shell/session-shell.js +9 -2
  2. package/dist/composition/owned-ui.js +3 -3
  3. package/dist/contracts/owned-ui/model.d.ts +5 -0
  4. package/dist/foundation/startup/startup-descriptor.js +2 -2
  5. package/dist/integrations/pi/components/resources/builtin-themes.d.ts +114 -126
  6. package/dist/integrations/pi/components/resources/builtin-themes.js +145 -157
  7. package/dist/integrations/pi/components/shell-footer-status.js +12 -8
  8. package/dist/integrations/pi/components/shell-presenters-info.js +1 -1
  9. package/dist/integrations/pi/components/shell-selectors-dialogs.js +1 -0
  10. package/dist/integrations/pi/components/shell-shared-facade.js +1 -2
  11. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
  12. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +2 -2
  13. package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
  14. package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +1 -1
  15. package/dist/integrations/pi/components/upstream/components/daxnuts.d.ts +1 -1
  16. package/dist/integrations/pi/components/upstream/components/daxnuts.js +1 -1
  17. package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +1 -1
  18. package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +1 -1
  19. package/dist/integrations/pi/components/upstream/components/extension-editor.js +1 -1
  20. package/dist/integrations/pi/components/upstream/components/extension-input.js +1 -1
  21. package/dist/integrations/pi/components/upstream/components/extension-selector.js +1 -1
  22. package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
  23. package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +1 -1
  24. package/dist/integrations/pi/components/upstream/components/owned-editor.js +1 -1
  25. package/dist/integrations/pi/components/upstream/components/pi-logo.d.ts +2 -0
  26. package/dist/integrations/pi/components/upstream/components/pi-logo.js +21 -0
  27. package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
  28. package/dist/integrations/pi/components/upstream/components/session-footer.js +13 -6
  29. package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
  30. package/dist/integrations/pi/components/upstream/components/session-selector.js +1 -1
  31. package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +1 -1
  32. package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +1 -1
  33. package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +1 -1
  34. package/dist/integrations/pi/components/upstream/components/status-indicator.js +1 -1
  35. package/dist/integrations/pi/components/upstream/components/themed-text.d.ts +16 -0
  36. package/dist/integrations/pi/components/upstream/components/themed-text.js +28 -0
  37. package/dist/integrations/pi/components/upstream/components/thinking-selector.d.ts +1 -1
  38. package/dist/integrations/pi/components/upstream/components/thinking-selector.js +1 -1
  39. package/dist/integrations/pi/components/upstream/components/tool-execution.js +25 -3
  40. package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +1 -1
  41. package/dist/integrations/pi/components/upstream/components/tree-selector.js +1 -1
  42. package/dist/integrations/pi/components/upstream/components/trust-selector.js +1 -1
  43. package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
  44. package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +1 -1
  45. package/dist/integrations/pi/components/upstream/history/editor-core.js +5 -3
  46. package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +1 -1
  47. package/dist/integrations/pi/components/upstream/history/kill-ring.js +1 -1
  48. package/dist/integrations/pi/components/upstream/history/printable-key.js +1 -1
  49. package/dist/integrations/pi/components/upstream/history/text-helpers.js +1 -1
  50. package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +1 -1
  51. package/dist/integrations/pi/components/upstream/history/undo-stack.js +1 -1
  52. package/dist/integrations/pi/components/upstream/history/word-navigation.js +1 -1
  53. package/dist/integrations/pi/components/upstream/model-search.d.ts +1 -1
  54. package/dist/integrations/pi/components/upstream/theme/system-theme.d.ts +60 -0
  55. package/dist/integrations/pi/components/upstream/theme/system-theme.js +695 -0
  56. package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +1 -1
  57. package/dist/integrations/pi/components/upstream/theme/theme.d.ts +6 -2
  58. package/dist/integrations/pi/components/upstream/theme/theme.js +22 -7
  59. package/dist/integrations/pi/engine/adapter.js +6 -0
  60. package/dist/integrations/pi/engine/pi-settings-metadata.json +10 -0
  61. package/dist/integrations/pi/engine/resources/changelog.json +4 -4
  62. package/dist/integrations/pi/engine/session-integration.d.ts +2 -2
  63. package/dist/integrations/pi/engine/session-integration.js +1 -1
  64. package/dist/integrations/pi/engine/settings-bridge.d.ts +1 -1
  65. package/dist/integrations/pi/engine/settings-bridge.js +9 -0
  66. package/dist/integrations/pi/engine/settings-port.js +4 -1
  67. package/dist/integrations/pi/engine/workflows.d.ts +2 -1
  68. package/dist/integrations/pi/engine/workflows.js +1 -0
  69. package/dist/integrations/pi/startup-public.js +1925 -1309
  70. package/dist/integrations/pi/startup-public.manifest.json +1611 -929
  71. package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -0
  72. package/dist/integrations/pi/tui-runtime/adapter.js +5 -0
  73. package/dist/integrations/pi/tui-runtime/contracts.d.ts +2 -1
  74. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
  75. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +1 -1
  76. package/dist/native/darwin-arm64/manifest.json +3 -3
  77. package/dist/native/darwin-arm64/process-guardian +0 -0
  78. package/dist/native/linux-x64/manifest.json +3 -3
  79. package/dist/native/linux-x64/process-guardian +0 -0
  80. package/dist/native/win32-x64/manifest.json +3 -3
  81. package/dist/native/win32-x64/process-guardian.exe +0 -0
  82. package/dist/runtime-payload-inventory.json +40622 -27400
  83. package/docs/architecture/toolchain.md +1 -1
  84. package/docs/ci-release-runbook.md +19 -11
  85. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
- import { Theme } from "@earendil-works/pi-coding-agent";
1
+ import { Theme, type ThemeColor } from "@earendil-works/pi-coding-agent";
2
+ export type { ThemeColor } from "@earendil-works/pi-coding-agent";
2
3
  import { type RgbColor } from "@earendil-works/pi-tui";
3
4
  export declare const PINNED_PI_LAYOUT: Readonly<{
4
5
  readonly editorPaddingX: 0;
@@ -10,7 +11,10 @@ export declare const PINNED_PI_LAYOUT: Readonly<{
10
11
  readonly selectorMaxVisible: 10;
11
12
  }>;
12
13
  export type PiTerminalTheme = "dark" | "light";
13
- export type PiThemeBackground = "selectedBg" | "userMessageBg" | "customMessageBg" | "toolPendingBg" | "toolSuccessBg" | "toolErrorBg";
14
+ export type ThemeAppearance = PiTerminalTheme;
15
+ export type PiThemeBackground = "selectedBg" | "searchMatchBg" | "userMessageBg" | "customMessageBg" | "toolPendingBg" | "toolSuccessBg" | "toolErrorBg";
16
+ export type ThemeBg = PiThemeBackground;
17
+ export type ThemeToken = ThemeColor | ThemeBg;
14
18
  export type PiColorMode = "truecolor" | "256color";
15
19
  export interface PiThemeResult {
16
20
  readonly success: boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.87.1 (MIT), commit f07218c4d4bbc12bef056a7058c3dd49dfe41abe,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.99.2 (MIT), commit 005af57d88ee23b33778f343a9595b32e67ff788,
3
3
  * packages/coding-agent/src/modes/interactive/theme/theme.ts.
4
4
  * Modifications: Source-synchronized theme port: retain pinned theme schema, variable/color
5
5
  * resolution, built-in and custom loading, terminal detection, and layout defaults while constructing
@@ -21,7 +21,7 @@ export const PINNED_PI_LAYOUT = Object.freeze({
21
21
  selectorMaxVisible: 10,
22
22
  });
23
23
  const FOREGROUND_COLORS = [
24
- "accent", "border", "borderAccent", "borderMuted", "success", "error", "warning", "muted", "dim", "text", "scrollbarTrack", "scrollbarThumb",
24
+ "accent", "border", "borderAccent", "borderMuted", "success", "error", "warning", "muted", "dim", "text", "scrollbarTrack", "scrollbarThumb", "searchMatchText",
25
25
  "thinkingText", "userMessageText", "customMessageText", "customMessageLabel", "toolTitle", "toolOutput",
26
26
  "mdHeading", "mdLink", "mdLinkUrl", "mdCode", "mdCodeBlock", "mdCodeBlockBorder", "mdQuote", "mdQuoteBorder",
27
27
  "mdHr", "mdListBullet", "toolDiffAdded", "toolDiffRemoved", "toolDiffContext", "syntaxComment", "syntaxKeyword",
@@ -29,7 +29,7 @@ const FOREGROUND_COLORS = [
29
29
  "thinkingOff", "thinkingMinimal", "thinkingLow", "thinkingMedium", "thinkingHigh", "thinkingXhigh", "thinkingMax", "bashMode",
30
30
  ];
31
31
  const BACKGROUND_COLORS = [
32
- "selectedBg", "userMessageBg", "customMessageBg", "toolPendingBg", "toolSuccessBg", "toolErrorBg",
32
+ "selectedBg", "searchMatchBg", "userMessageBg", "customMessageBg", "toolPendingBg", "toolSuccessBg", "toolErrorBg",
33
33
  ];
34
34
  let activeTheme;
35
35
  let activeThemeName;
@@ -115,18 +115,25 @@ export function loadPiTheme(name, mode) {
115
115
  const thinkingMax = colors.thinkingMax ?? colors.thinkingXhigh;
116
116
  const scrollbarThumb = colors.scrollbarThumb ?? colors.text;
117
117
  const scrollbarTrack = colors.scrollbarTrack ?? colors.muted;
118
+ const searchMatchBg = colors.searchMatchBg ?? colors.selectedBg;
119
+ const searchMatchText = colors.searchMatchText ?? colors.text;
118
120
  if (thinkingMax !== undefined)
119
121
  colors.thinkingMax = thinkingMax;
120
122
  if (scrollbarThumb !== undefined)
121
123
  colors.scrollbarThumb = scrollbarThumb;
122
124
  if (scrollbarTrack !== undefined)
123
125
  colors.scrollbarTrack = scrollbarTrack;
126
+ if (searchMatchBg !== undefined)
127
+ colors.searchMatchBg = searchMatchBg;
128
+ if (searchMatchText !== undefined)
129
+ colors.searchMatchText = searchMatchText;
124
130
  const resolved = Object.fromEntries(Object.entries(colors).map(([key, value]) => [key, resolveVariable(value, vars)]));
125
131
  const foreground = Object.fromEntries(FOREGROUND_COLORS.map(key => [key, requiredColor(resolved, key, path)]));
126
132
  const backgrounds = Object.fromEntries(BACKGROUND_COLORS.map(key => [key, requiredColor(resolved, key, path)]));
127
133
  return new Theme(foreground, backgrounds, mode ?? (getCapabilities().trueColor ? "truecolor" : "256color"), {
128
134
  name: themeJson.name,
129
135
  sourcePath: path,
136
+ ...(themeJson.appearance === undefined ? {} : { appearance: themeJson.appearance }),
130
137
  });
131
138
  }
132
139
  export function getAvailablePiThemes() {
@@ -251,12 +258,15 @@ function validateThemeJson(label, value) {
251
258
  }
252
259
  if (value.name.includes("/"))
253
260
  throw new Error(`Invalid theme name "${value.name}"`);
261
+ if (value.appearance !== undefined && value.appearance !== "dark" && value.appearance !== "light") {
262
+ throw new Error(`Invalid theme "${label}": appearance must be dark or light`);
263
+ }
254
264
  for (const key of FOREGROUND_COLORS) {
255
- if (key !== "thinkingMax" && key !== "scrollbarThumb" && key !== "scrollbarTrack" && value.colors[key] === undefined)
265
+ if (key !== "thinkingMax" && key !== "scrollbarThumb" && key !== "scrollbarTrack" && key !== "searchMatchText" && value.colors[key] === undefined)
256
266
  throw new Error(`Invalid theme "${label}": missing required color ${key}`);
257
267
  }
258
268
  for (const key of BACKGROUND_COLORS) {
259
- if (value.colors[key] === undefined)
269
+ if (key !== "searchMatchBg" && value.colors[key] === undefined)
260
270
  throw new Error(`Invalid theme "${label}": missing required color ${key}`);
261
271
  }
262
272
  const colors = {};
@@ -269,7 +279,12 @@ function validateThemeJson(label, value) {
269
279
  validateColor(color, `${label}.vars.${key}`);
270
280
  vars[key] = color;
271
281
  }
272
- return { name: value.name, colors, ...(Object.keys(vars).length === 0 ? {} : { vars }) };
282
+ return {
283
+ name: value.name,
284
+ colors,
285
+ ...(value.appearance === undefined ? {} : { appearance: value.appearance }),
286
+ ...(Object.keys(vars).length === 0 ? {} : { vars }),
287
+ };
273
288
  }
274
289
  function validateColor(value, label) {
275
290
  if (typeof value === "string")
@@ -279,7 +294,7 @@ function validateColor(value, label) {
279
294
  throw new Error(`Invalid theme color: ${label}`);
280
295
  }
281
296
  function resolveVariable(value, vars, visited = new Set()) {
282
- if (typeof value === "number" || value === "" || value.startsWith("#"))
297
+ if (typeof value === "number" || value === "" || value.startsWith("#") || /^ok(lch|hsl)\(/i.test(value))
283
298
  return value;
284
299
  if (visited.has(value))
285
300
  throw new Error(`Circular variable reference detected: ${value}`);
@@ -432,6 +432,8 @@ export class PiEngineAdapter {
432
432
  return [...readStringArray(result.steering), ...readStringArray(result.followUp)];
433
433
  }
434
434
  view() {
435
+ const routed = this.#engine.session?.routedModel;
436
+ const routedModel = routed === undefined ? null : readModel(routed.model);
435
437
  return {
436
438
  contractVersion: 1,
437
439
  sessionId: this.#sessionId,
@@ -455,6 +457,10 @@ export class PiEngineAdapter {
455
457
  },
456
458
  terminal: { ...this.#terminal },
457
459
  activeModel: this.#activeModel === null ? null : { ...this.#activeModel },
460
+ routedModel: routedModel === null ? null : {
461
+ model: routedModel,
462
+ ...(routed?.thinkingLevel === undefined ? {} : { thinkingLevel: readThinkingLevel(routed.thinkingLevel) }),
463
+ },
458
464
  thinkingLevel: this.#thinkingLevel,
459
465
  activeCommandIds: [...this.#commands.activeCommandIds],
460
466
  dialog: null,
@@ -32,6 +32,7 @@
32
32
  "fullscreenExitOutput",
33
33
  "fullscreenScrollbar",
34
34
  "fullscreenCopyOnSelect",
35
+ "fullscreenWheelScrollLines",
35
36
  "theme"
36
37
  ],
37
38
  "order": [
@@ -67,6 +68,7 @@
67
68
  "fullscreenExitOutput",
68
69
  "fullscreenScrollbar",
69
70
  "fullscreenCopyOnSelect",
71
+ "fullscreenWheelScrollLines",
70
72
  "theme"
71
73
  ],
72
74
  "settings": {
@@ -364,6 +366,14 @@
364
366
  "false"
365
367
  ]
366
368
  },
369
+ "fullscreenWheelScrollLines": {
370
+ "label": "Fullscreen wheel scrolling",
371
+ "description": "Lines per mouse-wheel event in fullscreen mode; 'auto' speeds up fast wheel spins where the terminal does not",
372
+ "opensDialog": false,
373
+ "values": [
374
+ "auto"
375
+ ]
376
+ },
367
377
  "theme": {
368
378
  "label": "Theme",
369
379
  "description": "Color theme for the interface",