@timurproko/a1 0.1.8-dev.528 → 0.1.8-dev.544

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 (108) hide show
  1. package/bin/update-recovery.js +25 -3
  2. package/dist/app/session-shell/session-shell-root.d.ts +1 -0
  3. package/dist/app/session-shell/session-shell-root.js +3 -1
  4. package/dist/app/session-shell/session-shell.d.ts +1 -1
  5. package/dist/app/session-shell/session-shell.js +10 -4
  6. package/dist/composition/owned-ui.js +4 -3
  7. package/dist/composition/settings-route-host.d.ts +5 -9
  8. package/dist/composition/settings-route-host.js +2 -2
  9. package/dist/contracts/owned-ui/model.d.ts +4 -0
  10. package/dist/contracts/owned-ui/validation.js +25 -0
  11. package/dist/features/owned-ui/index.d.ts +1 -1
  12. package/dist/features/owned-ui/reference-screen-app.d.ts +9 -3
  13. package/dist/features/owned-ui/reference-screen-app.js +68 -20
  14. package/dist/features/owned-ui/settings-app.js +69 -24
  15. package/dist/foundation/release/index.d.ts +2 -2
  16. package/dist/foundation/release/index.js +1 -1
  17. package/dist/foundation/release/update-recovery.d.ts +7 -1
  18. package/dist/foundation/release/update-recovery.js +39 -9
  19. package/dist/foundation/release/update.d.ts +7 -0
  20. package/dist/foundation/release/update.js +115 -24
  21. package/dist/foundation/startup/startup-descriptor.js +2 -2
  22. package/dist/integrations/pi/components/index.d.ts +3 -1
  23. package/dist/integrations/pi/components/index.js +2 -1
  24. package/dist/integrations/pi/components/shell-editor-autocomplete.d.ts +9 -1
  25. package/dist/integrations/pi/components/shell-editor-autocomplete.js +10 -9
  26. package/dist/integrations/pi/components/shell-footer-status.d.ts +1 -1
  27. package/dist/integrations/pi/components/shell-footer-status.js +2 -2
  28. package/dist/integrations/pi/components/shell-hotkey-sections.d.ts +7 -0
  29. package/dist/integrations/pi/components/shell-hotkey-sections.js +29 -0
  30. package/dist/integrations/pi/components/shell-presenters-info.d.ts +1 -0
  31. package/dist/integrations/pi/components/shell-presenters-info.js +1 -1
  32. package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +0 -1
  33. package/dist/integrations/pi/components/shell-selectors-dialogs.js +1 -7
  34. package/dist/integrations/pi/components/thinking-selector-dialog.d.ts +8 -0
  35. package/dist/integrations/pi/components/thinking-selector-dialog.js +22 -0
  36. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +1 -1
  37. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +1 -1
  38. package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
  39. package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +1 -1
  40. package/dist/integrations/pi/components/upstream/components/daxnuts.d.ts +1 -1
  41. package/dist/integrations/pi/components/upstream/components/daxnuts.js +1 -1
  42. package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +1 -1
  43. package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +2 -1
  44. package/dist/integrations/pi/components/upstream/components/extension-editor.js +7 -2
  45. package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
  46. package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +1 -1
  47. package/dist/integrations/pi/components/upstream/components/owned-editor.js +1 -1
  48. package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
  49. package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +2 -1
  50. package/dist/integrations/pi/components/upstream/components/session-footer.js +22 -11
  51. package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
  52. package/dist/integrations/pi/components/upstream/components/session-selector.js +1 -1
  53. package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +1 -1
  54. package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +1 -1
  55. package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +1 -1
  56. package/dist/integrations/pi/components/upstream/components/status-indicator.js +1 -1
  57. package/dist/integrations/pi/components/upstream/components/thinking-selector.d.ts +33 -0
  58. package/dist/integrations/pi/components/upstream/components/thinking-selector.js +140 -0
  59. package/dist/integrations/pi/components/upstream/components/tool-execution.js +1 -1
  60. package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +1 -1
  61. package/dist/integrations/pi/components/upstream/components/tree-selector.js +8 -1
  62. package/dist/integrations/pi/components/upstream/components/trust-selector.js +1 -1
  63. package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
  64. package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +1 -1
  65. package/dist/integrations/pi/components/upstream/history/editor-core.js +1 -1
  66. package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +1 -1
  67. package/dist/integrations/pi/components/upstream/history/kill-ring.js +1 -1
  68. package/dist/integrations/pi/components/upstream/history/printable-key.js +1 -1
  69. package/dist/integrations/pi/components/upstream/history/text-helpers.js +1 -1
  70. package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +1 -1
  71. package/dist/integrations/pi/components/upstream/history/undo-stack.js +1 -1
  72. package/dist/integrations/pi/components/upstream/history/word-navigation.js +1 -1
  73. package/dist/integrations/pi/components/upstream/model-search.d.ts +1 -1
  74. package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +1 -1
  75. package/dist/integrations/pi/components/upstream/theme/theme.js +1 -1
  76. package/dist/integrations/pi/engine/adapter.js +1 -0
  77. package/dist/integrations/pi/engine/repository-pr.d.ts +8 -0
  78. package/dist/integrations/pi/engine/repository-pr.js +62 -0
  79. package/dist/integrations/pi/engine/resources/changelog.json +4 -4
  80. package/dist/integrations/pi/engine/session-runtime.d.ts +5 -0
  81. package/dist/integrations/pi/engine/session-runtime.js +60 -1
  82. package/dist/integrations/pi/engine/workflow-support.js +3 -1
  83. package/dist/integrations/pi/engine/workflows.d.ts +1 -1
  84. package/dist/integrations/pi/engine/workflows.js +4 -2
  85. package/dist/integrations/pi/startup-public.js +63 -56
  86. package/dist/integrations/pi/startup-public.manifest.json +200 -169
  87. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
  88. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +1 -1
  89. package/dist/native/darwin-arm64/manifest.json +1 -1
  90. package/dist/native/linux-x64/manifest.json +1 -1
  91. package/dist/native/win32-x64/manifest.json +2 -2
  92. package/dist/native/win32-x64/process-guardian.exe +0 -0
  93. package/dist/product-identity.d.ts +1 -1
  94. package/dist/product-identity.js +1 -1
  95. package/dist/product-identity.json +1 -0
  96. package/dist/runtime-payload-inventory.json +2948 -2646
  97. package/dist/ui/components/index.d.ts +1 -1
  98. package/dist/ui/components/list-block.d.ts +10 -6
  99. package/dist/ui/components/list-block.js +28 -15
  100. package/dist/ui/components/list-view.d.ts +1 -1
  101. package/dist/ui/components/list-view.js +4 -2
  102. package/dist/ui/components/mouse.js +4 -2
  103. package/dist/ui/components/theme.d.ts +1 -5
  104. package/dist/ui/components/theme.js +0 -4
  105. package/dist/ui/components/value-menu.d.ts +3 -1
  106. package/dist/ui/components/value-menu.js +13 -5
  107. package/docs/local-worktree-cleanup.md +1 -1
  108. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.86.0 (MIT), commit ecac0a9c4edad3dac5d9f8b40e0c7db7a56471fc,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.87.0 (MIT), commit 16787ad5b2dc748047f314ca1bfe7708f30f54f3,
3
3
  * packages/coding-agent/src/modes/interactive/model-search.ts.
4
4
  * Modifications: Mechanical source-synchronized port preserving pinned model search terms for stateful
5
5
  * scoped-model filtering.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.86.0 (MIT), commit ecac0a9c4edad3dac5d9f8b40e0c7db7a56471fc,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.87.0 (MIT), commit 16787ad5b2dc748047f314ca1bfe7708f30f54f3,
3
3
  * packages/coding-agent/src/modes/interactive/theme/theme-controller.ts.
4
4
  * Modifications: Source-synchronized controller port: renamed owner class, injected dependency-free
5
5
  * settings/runtime ports, remapped private theme helpers to the public-backed A1 theme adapter, and
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.86.0 (MIT), commit ecac0a9c4edad3dac5d9f8b40e0c7db7a56471fc,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.87.0 (MIT), commit 16787ad5b2dc748047f314ca1bfe7708f30f54f3,
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
@@ -428,6 +428,7 @@ export class PiEngineAdapter {
428
428
  usage: this.#usageCache ??= readUsageView(this.#engine.session, this.#engine.runtime, this.#activeModel),
429
429
  footer: {
430
430
  branch: this.#engine.gitBranch,
431
+ pullRequest: this.#engine.pullRequest,
431
432
  sessionName: this.#engine.session?.sessionManager?.getSessionName() ?? null,
432
433
  availableProviderCount: new Set(this.#engine.runtime?.services.modelRuntime.getAvailableSnapshot?.().map(model => model.provider).filter(provider => provider !== undefined) ?? []).size,
433
434
  extensionStatuses: [],
@@ -0,0 +1,8 @@
1
+ export interface PiPullRequestIdentity {
2
+ readonly number: number;
3
+ readonly url: string;
4
+ }
5
+ export type PiPullRequestProbe = (cwd: string, branch: string, signal: AbortSignal) => Promise<PiPullRequestIdentity | null>;
6
+ /** Read the open GitHub pull request associated with one exact local branch. */
7
+ export declare function readOpenPullRequest(cwd: string, branch: string, signal: AbortSignal, environment?: NodeJS.ProcessEnv): Promise<PiPullRequestIdentity | null>;
8
+ export declare function parseOpenPullRequest(stdout: string, branch: string): PiPullRequestIdentity | null;
@@ -0,0 +1,62 @@
1
+ import { execFile } from "node:child_process";
2
+ import { PRODUCT_IDENTITY } from "../../../product-identity.js";
3
+ const GH_TIMEOUT_MS = 5_000;
4
+ const GH_MAX_BUFFER_BYTES = 64 * 1024;
5
+ /** Read the open GitHub pull request associated with one exact local branch. */
6
+ export async function readOpenPullRequest(cwd, branch, signal, environment = process.env) {
7
+ if (branch.length === 0 || signal.aborted)
8
+ return null;
9
+ const preview = environment[PRODUCT_IDENTITY.environment.prFooterPreview];
10
+ if (preview !== undefined)
11
+ return parseOpenPullRequest(preview, branch);
12
+ const stdout = await executeGh(cwd, signal);
13
+ if (stdout === null)
14
+ return null;
15
+ return parseOpenPullRequest(stdout, branch);
16
+ }
17
+ export function parseOpenPullRequest(stdout, branch) {
18
+ let value;
19
+ try {
20
+ value = JSON.parse(stdout);
21
+ }
22
+ catch {
23
+ return null;
24
+ }
25
+ if (!isRecord(value)
26
+ || !Number.isSafeInteger(value.number)
27
+ || value.number <= 0
28
+ || value.state !== "OPEN"
29
+ || value.headRefName !== branch
30
+ || typeof value.url !== "string")
31
+ return null;
32
+ const number = value.number;
33
+ try {
34
+ const url = new URL(value.url);
35
+ if (url.protocol !== "https:"
36
+ || url.hostname.toLowerCase() !== "github.com"
37
+ || url.username !== ""
38
+ || url.password !== ""
39
+ || url.port !== ""
40
+ || url.search !== ""
41
+ || url.hash !== ""
42
+ || !new RegExp(`^/[^/]+/[^/]+/pull/${number}/?$`, "u").test(url.pathname))
43
+ return null;
44
+ return { number, url: url.href.replace(/\/$/u, "") };
45
+ }
46
+ catch {
47
+ return null;
48
+ }
49
+ }
50
+ function executeGh(cwd, signal) {
51
+ return new Promise(resolve => {
52
+ try {
53
+ execFile("gh", ["pr", "view", "--json", "number,url,state,headRefName"], { cwd, windowsHide: true, timeout: GH_TIMEOUT_MS, maxBuffer: GH_MAX_BUFFER_BYTES, signal, encoding: "utf8" }, (error, stdout) => { resolve(error === null && typeof stdout === "string" ? stdout : null); });
54
+ }
55
+ catch {
56
+ resolve(null);
57
+ }
58
+ });
59
+ }
60
+ function isRecord(value) {
61
+ return typeof value === "object" && value !== null && !Array.isArray(value);
62
+ }