@vitos-pizza/vitos-pizza 0.4.0 → 0.4.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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: worker
3
3
  description: Implementation agent for approved plans and focused tasks
4
- tools: read, grep, find, ls, hypa_read, hypa_grep, hypa_find, hypa_ls, bash, edit, write
4
+ tools: hypa_read, hypa_grep, hypa_find, hypa_ls, bash, edit, write
5
5
  thinking: high
6
6
  systemPromptMode: replace
7
7
  ---
@@ -10,7 +10,7 @@ You are worker: the single writer thread. Execute the assigned task or approved
10
10
 
11
11
  Rules:
12
12
  - Read inherited context/plan first; validate against the actual code.
13
- - Prefer `hypa_read` / `hypa_grep` / `hypa_find` / `hypa_ls` when available; fall back to read/grep/find/ls.
13
+ - Use `hypa_read` / `hypa_grep` / `hypa_find` / `hypa_ls` for codebase exploration.
14
14
  - Prefer the smallest correct change; follow existing patterns.
15
15
  - No speculative scaffolding, placeholders, TODOs, or silent scope changes.
16
16
  - Use `bash` for inspection, validation, and relevant tests (Hypa may rewrite bash for compressed output — keep using `bash`, not `hypa_shell`).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/subagents",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Subagent delegation for Vito's Pizzeria Pi distribution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/todoist",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "In-memory task management with TUI widget and optional Todoist MCP sync for Vito's Pizzeria Pi distribution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/ui-enhancements",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "TUI and UI enhancements for Vito's Pizzeria Pi distribution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,12 @@
1
1
  /** Debounce window after the last resize event before forcing a full redraw. */
2
2
  export const RESIZE_RECOVERY_DEBOUNCE_MS = 150;
3
3
 
4
+ /** Interval between recovery retries when size/target is not yet ready. */
5
+ export const RESIZE_RECOVERY_RETRY_MS = 50;
6
+
7
+ /** Max time to keep retrying after debounce settles. */
8
+ export const RESIZE_RECOVERY_RETRY_WINDOW_MS = 1000;
9
+
4
10
  export type ResizeRecoveryTarget = {
5
11
  invalidate(): void;
6
12
  requestRender(force?: boolean): void;
@@ -8,6 +14,8 @@ export type ResizeRecoveryTarget = {
8
14
 
9
15
  export type ResizeRecoveryOptions = {
10
16
  debounceMs?: number;
17
+ retryMs?: number;
18
+ retryWindowMs?: number;
11
19
  getColumns?: () => number | undefined;
12
20
  getRows?: () => number | undefined;
13
21
  getTarget?: () => ResizeRecoveryTarget | undefined;
@@ -17,12 +25,17 @@ export type ResizeRecoveryOptions = {
17
25
 
18
26
  /**
19
27
  * After terminal resize settles, force a full TUI invalidate+redraw.
20
- * Skips frames where columns/rows are falsy (Windows can briefly report 0).
28
+ * When columns/rows are briefly falsy (Windows) or the TUI target is not
29
+ * ready yet, retries until dimensions/target are available or the retry
30
+ * window elapses.
21
31
  */
22
32
  export function attachResizeRecovery(
23
33
  options: ResizeRecoveryOptions = {},
24
34
  ): () => void {
25
35
  const debounceMs = options.debounceMs ?? RESIZE_RECOVERY_DEBOUNCE_MS;
36
+ const retryMs = options.retryMs ?? RESIZE_RECOVERY_RETRY_MS;
37
+ const retryWindowMs =
38
+ options.retryWindowMs ?? RESIZE_RECOVERY_RETRY_WINDOW_MS;
26
39
  const getColumns = options.getColumns ?? (() => process.stdout.columns);
27
40
  const getRows = options.getRows ?? (() => process.stdout.rows);
28
41
  const getTarget = options.getTarget ?? (() => undefined);
@@ -37,27 +50,71 @@ export function attachResizeRecovery(
37
50
  process.stdout.off(event, listener);
38
51
  });
39
52
 
40
- let timer: ReturnType<typeof setTimeout> | undefined;
53
+ let debounceTimer: ReturnType<typeof setTimeout> | undefined;
54
+ let retryTimer: ReturnType<typeof setTimeout> | undefined;
55
+ let retryDeadline = 0;
56
+
57
+ const clearDebounce = () => {
58
+ if (debounceTimer) clearTimeout(debounceTimer);
59
+ debounceTimer = undefined;
60
+ };
61
+
62
+ const clearRetry = () => {
63
+ if (retryTimer) clearTimeout(retryTimer);
64
+ retryTimer = undefined;
65
+ retryDeadline = 0;
66
+ };
67
+
68
+ const tryRecover = (): boolean => {
69
+ const cols = getColumns();
70
+ const rows = getRows();
71
+ if (!cols || !rows) return false;
72
+ const target = getTarget();
73
+ if (!target) return false;
74
+ target.invalidate();
75
+ target.requestRender(true);
76
+ return true;
77
+ };
78
+
79
+ const scheduleRetry = () => {
80
+ if (retryTimer) return;
81
+ retryTimer = setTimeout(() => {
82
+ retryTimer = undefined;
83
+ if (tryRecover()) {
84
+ clearRetry();
85
+ return;
86
+ }
87
+ if (Date.now() >= retryDeadline) {
88
+ retryDeadline = 0;
89
+ return;
90
+ }
91
+ scheduleRetry();
92
+ }, retryMs);
93
+ };
94
+
95
+ const startRecovery = () => {
96
+ if (tryRecover()) {
97
+ clearRetry();
98
+ return;
99
+ }
100
+ retryDeadline = Date.now() + retryWindowMs;
101
+ scheduleRetry();
102
+ };
41
103
 
42
104
  const onResize = () => {
43
- if (timer) clearTimeout(timer);
44
- timer = setTimeout(() => {
45
- timer = undefined;
46
- const cols = getColumns();
47
- const rows = getRows();
48
- if (!cols || !rows) return;
49
- const target = getTarget();
50
- if (!target) return;
51
- target.invalidate();
52
- target.requestRender(true);
105
+ clearDebounce();
106
+ clearRetry();
107
+ debounceTimer = setTimeout(() => {
108
+ debounceTimer = undefined;
109
+ startRecovery();
53
110
  }, debounceMs);
54
111
  };
55
112
 
56
113
  on("resize", onResize);
57
114
 
58
115
  return () => {
59
- if (timer) clearTimeout(timer);
60
- timer = undefined;
116
+ clearDebounce();
117
+ clearRetry();
61
118
  off("resize", onResize);
62
119
  };
63
120
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/websearch",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Web search and URL reading for Vito's Pizzeria Pi distribution",
5
5
  "type": "module",
6
6
  "license": "MIT",