@narumitw/pi-notes 0.2.3 → 0.2.5

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # @narumitw/pi-notes
2
+
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 54f2700: Preserve fullscreen viewport capture through custom list wrappers so default and configured paging keys reach the focused list. Keep native transcript search, unrelated overlays, free-text modes, paste, and hard cancellation unchanged. Filter Kit key hints according to each screen's capture policy.
8
+
9
+ Update Recall and File Context to the current Kit dependency range. The selected consumer releases require the fixed Kit patch through Changesets dependency-floor updates.
10
+ - 6c76ef1: Report inline Plan questions, Notes template editing, and Progress settings as waiting for user input on supported Pi hosts and terminals. Add optional consumer-owned blocked metadata to Kit custom interactions and questionnaires without marking loaders or changing RPC and print behavior. Settle host-disposed interactions and drain their work without interrupting native reset or restoring stale editor drafts.
11
+ - e484010: Include the existing package-root CHANGELOG.md in extension tarballs so Pi can show native update notices. Keep Changesets version headings and Pi's first-observation and collapseChangelog behavior unchanged.
12
+ - 5120d4d: Preserve TypeBox enum inference for direct imports and Pi's extension loader without changing provider-visible schemas or validation rules. Import Notes schemas from TypeBox, declare its host-provided peer, and complete Worktree's command result contract for the updated Pi APIs.
13
+ - Updated dependencies [54f2700]
14
+ - Updated dependencies [6c76ef1]
15
+ - @narumitw/pi-tui-kit@0.69.0
16
+
17
+ ## 0.2.4
18
+
19
+ ### Patch Changes
20
+
21
+ - 9d3e0d7: Prevent passive UI timers from keeping Node alive while preserving status expiry, settings reloads, paste handling, and cleanup.
22
+ - Updated dependencies [9d3e0d7]
23
+ - @narumitw/pi-tui-kit@0.68.1
24
+
25
+ ## 0.2.3
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [a21d39b]
30
+ - Updated dependencies [f68aa54]
31
+ - Updated dependencies [b062d21]
32
+ - @narumitw/pi-tui-kit@0.68.0
33
+
34
+ ## 0.2.2
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [57eeae7]
39
+ - @narumitw/pi-tui-kit@0.67.0
40
+
41
+ ## 0.2.1
42
+
43
+ ### Patch Changes
44
+
45
+ - 168248c: Reuse published TUI Kit frame metadata, masked input, configured-key syntax, and interaction ownership while retaining extension-owned settings and cancellation policy. Keep malformed Ticker key strings from suppressing valid reorder shortcuts, and drain Usage settings saves after cancellation.
46
+
47
+ ## 0.2.0
48
+
49
+ ### Minor Changes
50
+
51
+ - 648b8c3: Delete the highlighted note from the Open a note picker with confirmation, stale-revision protection, and configurable Pi keybindings.
52
+
53
+ ## 0.1.0
54
+
55
+ ### Minor Changes
56
+
57
+ - e2794e8: Publish the agent-assisted Markdown notes workspace with direct note opening, control-safe canonical path insertion into the parent draft, and raw-preserving, stale-safe template editing that preserves Pi's tmux paste decoding and focused-editor key precedence.
58
+ - c26ea75: Create notes under collision-safe temporary names without a filename prompt, and let the embedded note agent rename the current note through a revision-checked tool.
package/README.md CHANGED
@@ -92,6 +92,8 @@ The manager rescans notes and templates when each screen opens. Its first level
92
92
 
93
93
  **Manage templates…** opens an existing template in a Pi-style multiline editor. The editor preserves leading and trailing whitespace and hides terminal controls as spaces without changing their raw values. It rejects pasted text containing an ambiguous bracketed-paste terminator rather than silently reordering it. Because terminal paste framing cannot represent a literal terminator unambiguously, the first save after a paste asks you to review the content and press save again. Cancelling or submitting unchanged content returns to the manager without writing. A changed template is published atomically only if its revision is still current; if another process changed it, Pi Notes preserves that external content, reports the conflict, and refreshes the manager.
94
94
 
95
+ On Pi 1.5 or later, the inline template editor reports `question` waiting status to supported terminals until it closes. Older hosts keep the same editor without this terminal status. The embedded assistant and its generation state are unchanged.
96
+
95
97
  Creating a note copies the selected template exactly once and does not ask for a path. Pi Notes tries `untitled.md`, `untitled-2.md`, and further numbered variants before using a generated fallback, without overwriting an existing note or reusing a temporary path that has child-session history. Later template changes do not classify or alter the created note.
96
98
 
97
99
  ## Embedded assistant
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-notes",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Pi extension for managing global Markdown notes with an isolated embedded agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,6 +16,7 @@
16
16
  "files": [
17
17
  "src",
18
18
  "README.md",
19
+ "CHANGELOG.md",
19
20
  "LICENSE"
20
21
  ],
21
22
  "pi": {
@@ -29,17 +30,18 @@
29
30
  "typecheck": "tsc --noEmit"
30
31
  },
31
32
  "dependencies": {
32
- "@narumitw/pi-tui-kit": "^0.68.0"
33
+ "@narumitw/pi-tui-kit": "^0.69.0"
33
34
  },
34
35
  "peerDependencies": {
35
36
  "@earendil-works/pi-ai": "*",
36
37
  "@earendil-works/pi-coding-agent": "*",
37
- "@earendil-works/pi-tui": "*"
38
+ "@earendil-works/pi-tui": "*",
39
+ "typebox": "*"
38
40
  },
39
41
  "devDependencies": {
40
- "@earendil-works/pi-ai": "1.4.0",
41
- "@earendil-works/pi-coding-agent": "1.4.0",
42
- "@earendil-works/pi-tui": "1.4.0",
42
+ "@earendil-works/pi-ai": "1.5.0",
43
+ "@earendil-works/pi-coding-agent": "1.5.0",
44
+ "@earendil-works/pi-tui": "1.5.0",
43
45
  "typescript": "7.0.2"
44
46
  },
45
47
  "repository": {
@@ -1,7 +1,7 @@
1
1
  import type { Dir } from "node:fs";
2
2
  import { lstat, mkdir, opendir, realpath } from "node:fs/promises";
3
3
  import { isAbsolute, join, relative, sep } from "node:path";
4
- import { type Api, type Model, Type } from "@earendil-works/pi-ai";
4
+ import type { Api, Model } from "@earendil-works/pi-ai";
5
5
  import {
6
6
  type AgentSession,
7
7
  type CreateAgentSessionOptions,
@@ -13,6 +13,7 @@ import {
13
13
  SettingsManager,
14
14
  } from "@earendil-works/pi-coding-agent";
15
15
  import { sanitizeTerminalText } from "@narumitw/pi-tui-kit/terminal-text";
16
+ import { Type } from "typebox";
16
17
  import { CHILD_TOOL_NAMES, MAX_SCAN_DEPTH, MAX_SESSION_FILES_PER_NOTE, NOTES_SYSTEM_PROMPT } from "./constants.js";
17
18
  import { type NoteSnapshot, type NotesStorage, noteSessionKey } from "./storage.js";
18
19
 
@@ -123,6 +123,7 @@ interface MouseLayout {
123
123
  }
124
124
 
125
125
  export class NotePicker implements Component, Focusable {
126
+ readonly capturesViewportInput = true;
126
127
  private readonly searchInput = new Input();
127
128
  private readonly searchEnabled: boolean;
128
129
  private filteredNotes: MarkdownEntry[];
@@ -408,6 +409,7 @@ export class NotePicker implements Component, Focusable {
408
409
  this.pasteStartBuffer = "";
409
410
  if (!this.disposed && !this.completed && pending) this.handleNonPasteInput(pending);
410
411
  }, INPUT_PREFIX_TIMEOUT_MS);
412
+ this.pasteStartTimer.unref?.();
411
413
  }
412
414
 
413
415
  private flushPasteBuffer(): void {
@@ -85,6 +85,7 @@ export async function showTemplateEditor(
85
85
  ownership: TemplateEditorOwnership,
86
86
  ): Promise<string | undefined> {
87
87
  const result = await runCustomInteraction<string | undefined>(ctx, {
88
+ blocked: { kind: "question", message: "Edit Notes template" },
88
89
  signal: ownership.signal,
89
90
  isCurrent: ownership.isCurrent,
90
91
  create: ({ tui, theme, keybindings, complete }) =>
@@ -278,6 +279,7 @@ class TemplateEditor implements Component, Focusable {
278
279
  }
279
280
  if (this.pasteTailTimer) clearTimeout(this.pasteTailTimer);
280
281
  this.pasteTailTimer = setTimeout(() => this.flushPendingPasteInputs(), PASTE_TAIL_GUARD_MS);
282
+ this.pasteTailTimer.unref?.();
281
283
  }
282
284
 
283
285
  private flushPendingPasteInputs(): void {