@pi-unipi/unipi 2.0.13 → 2.1.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.
Files changed (168) hide show
  1. package/LICENSE +0 -0
  2. package/package.json +28 -28
  3. package/packages/ask-user/handoff.ts +0 -0
  4. package/packages/ask-user/index.ts +3 -1
  5. package/packages/ask-user/launcher-ui.ts +0 -0
  6. package/packages/ask-user/package.json +5 -5
  7. package/packages/ask-user/tools.ts +20 -11
  8. package/packages/autocomplete/README.md +0 -0
  9. package/packages/autocomplete/package.json +4 -4
  10. package/packages/autocomplete/src/__tests__/command-registry.audit.test.ts +0 -0
  11. package/packages/autocomplete/src/__tests__/provider.sorting.test.ts +0 -0
  12. package/packages/autocomplete/src/constants.ts +0 -0
  13. package/packages/autocomplete/src/provider.ts +0 -0
  14. package/packages/autocomplete/src/sorting.ts +0 -0
  15. package/packages/btw/package.json +6 -6
  16. package/packages/cocoindex/README.md +0 -0
  17. package/packages/cocoindex/bridge.ts +0 -0
  18. package/packages/cocoindex/commands.ts +0 -0
  19. package/packages/cocoindex/index.ts +0 -0
  20. package/packages/cocoindex/installer.ts +0 -0
  21. package/packages/cocoindex/package.json +6 -6
  22. package/packages/cocoindex/skills/cocoindex/SKILL.md +0 -0
  23. package/packages/cocoindex/tools.ts +0 -0
  24. package/packages/compactor/package.json +7 -7
  25. package/packages/compactor/src/commands/index.ts +0 -0
  26. package/packages/compactor/src/compaction/auto-trigger.ts +0 -0
  27. package/packages/compactor/src/compaction/hooks.ts +0 -0
  28. package/packages/compactor/src/config/manager.ts +0 -0
  29. package/packages/compactor/src/config/presets.ts +0 -0
  30. package/packages/compactor/src/config/schema.ts +0 -0
  31. package/packages/compactor/src/display/diff-presentation.ts +0 -0
  32. package/packages/compactor/src/display/diff-renderer.ts +0 -0
  33. package/packages/compactor/src/display/diff-width-safety.ts +0 -0
  34. package/packages/compactor/src/display/line-width-safety.ts +0 -0
  35. package/packages/compactor/src/index.ts +0 -0
  36. package/packages/compactor/src/info-screen.ts +0 -0
  37. package/packages/compactor/src/session/analytics.ts +0 -0
  38. package/packages/compactor/src/session/db.ts +0 -0
  39. package/packages/compactor/src/session/recall-blocks.ts +0 -0
  40. package/packages/compactor/src/tools/ctx-batch-execute.ts +0 -0
  41. package/packages/compactor/src/tools/ctx-doctor.ts +0 -0
  42. package/packages/compactor/src/tools/ctx-stats.ts +0 -0
  43. package/packages/compactor/src/tools/register.ts +0 -0
  44. package/packages/compactor/src/tui/settings-overlay.ts +0 -0
  45. package/packages/compactor/src/types.ts +0 -0
  46. package/packages/core/constants.ts +0 -0
  47. package/packages/core/events.ts +0 -0
  48. package/packages/core/global-types.ts +0 -0
  49. package/packages/core/global.d.ts +0 -0
  50. package/packages/core/package.json +3 -3
  51. package/packages/core/sandbox.ts +0 -0
  52. package/packages/core/utils.ts +26 -0
  53. package/packages/footer/README.md +0 -0
  54. package/packages/footer/index.ts +0 -0
  55. package/packages/footer/package.json +5 -5
  56. package/packages/footer/src/commands.ts +0 -0
  57. package/packages/footer/src/config.ts +0 -0
  58. package/packages/footer/src/events.ts +0 -0
  59. package/packages/footer/src/help.ts +0 -0
  60. package/packages/footer/src/index.ts +71 -4
  61. package/packages/footer/src/presets.ts +0 -0
  62. package/packages/footer/src/registry/index.ts +0 -0
  63. package/packages/footer/src/rendering/icons.ts +0 -0
  64. package/packages/footer/src/rendering/renderer.ts +0 -0
  65. package/packages/footer/src/rendering/separators.ts +0 -0
  66. package/packages/footer/src/rendering/theme.ts +0 -0
  67. package/packages/footer/src/segments/compactor.ts +0 -0
  68. package/packages/footer/src/segments/core.ts +0 -0
  69. package/packages/footer/src/segments/kanboard.ts +0 -0
  70. package/packages/footer/src/segments/mcp.ts +0 -0
  71. package/packages/footer/src/segments/memory.ts +0 -0
  72. package/packages/footer/src/segments/notify.ts +0 -0
  73. package/packages/footer/src/segments/ralph.ts +0 -0
  74. package/packages/footer/src/segments/status-ext.ts +0 -0
  75. package/packages/footer/src/segments/workflow.ts +0 -0
  76. package/packages/footer/src/tps-tracker.ts +109 -33
  77. package/packages/footer/src/tui/settings-tui.ts +0 -0
  78. package/packages/footer/src/types.ts +0 -0
  79. package/packages/footer/types.ts +0 -0
  80. package/packages/info-screen/index.ts +3 -1
  81. package/packages/info-screen/package.json +5 -5
  82. package/packages/info-screen/tui/info-overlay.ts +16 -7
  83. package/packages/input-shortcuts/README.md +0 -0
  84. package/packages/input-shortcuts/index.ts +0 -0
  85. package/packages/input-shortcuts/package.json +5 -5
  86. package/packages/input-shortcuts/src/chord-overlay.ts +0 -0
  87. package/packages/input-shortcuts/src/clipboard.ts +0 -0
  88. package/packages/input-shortcuts/src/index.ts +0 -0
  89. package/packages/input-shortcuts/src/registers.ts +0 -0
  90. package/packages/input-shortcuts/src/settings-overlay.ts +0 -0
  91. package/packages/input-shortcuts/src/status.ts +0 -0
  92. package/packages/input-shortcuts/src/types.ts +0 -0
  93. package/packages/input-shortcuts/src/undo-redo.ts +0 -0
  94. package/packages/kanboard/index.ts +0 -0
  95. package/packages/kanboard/package.json +5 -5
  96. package/packages/mcp/package.json +5 -5
  97. package/packages/mcp/src/index.ts +3 -1
  98. package/packages/mcp/src/tui/settings-overlay.ts +0 -0
  99. package/packages/memory/README.md +51 -7
  100. package/packages/memory/index.ts +7 -4
  101. package/packages/memory/mempalace.ts +260 -0
  102. package/packages/memory/package.json +8 -5
  103. package/packages/memory/storage.ts +253 -22
  104. package/packages/memory/tools.ts +0 -0
  105. package/packages/milestone/commands.ts +3 -2
  106. package/packages/milestone/package.json +5 -5
  107. package/packages/notify/ask-user-prompt-message.ts +0 -0
  108. package/packages/notify/commands.ts +0 -0
  109. package/packages/notify/events.ts +0 -0
  110. package/packages/notify/index.ts +3 -1
  111. package/packages/notify/ntfy-config.ts +0 -0
  112. package/packages/notify/package.json +8 -6
  113. package/packages/notify/platforms/focus-win.ts +0 -0
  114. package/packages/notify/platforms/focus.ts +0 -0
  115. package/packages/notify/platforms/native.ts +0 -0
  116. package/packages/notify/settings.ts +0 -0
  117. package/packages/notify/src/__tests__/ask-user-prompt-message.test.ts +0 -0
  118. package/packages/notify/src/__tests__/event-bus.test.ts +0 -0
  119. package/packages/notify/tui/settings-overlay.ts +0 -0
  120. package/packages/notify/types.ts +0 -0
  121. package/packages/ralph/index.ts +3 -1
  122. package/packages/ralph/package.json +6 -6
  123. package/packages/subagents/package.json +8 -8
  124. package/packages/subagents/src/index.ts +27 -23
  125. package/packages/unipi/index.ts +0 -0
  126. package/packages/updater/README.md +0 -0
  127. package/packages/updater/index.ts +0 -0
  128. package/packages/updater/package.json +5 -5
  129. package/packages/updater/skills/configure-updater/SKILL.md +0 -0
  130. package/packages/updater/src/cache.ts +0 -0
  131. package/packages/updater/src/changelog.ts +0 -0
  132. package/packages/updater/src/checker.ts +0 -0
  133. package/packages/updater/src/commands.ts +0 -0
  134. package/packages/updater/src/installer.ts +0 -0
  135. package/packages/updater/src/markdown.ts +0 -0
  136. package/packages/updater/src/readme.ts +3 -1
  137. package/packages/updater/src/settings.ts +0 -0
  138. package/packages/updater/src/tui/changelog-overlay.ts +0 -0
  139. package/packages/updater/src/tui/readme-overlay.ts +0 -0
  140. package/packages/updater/src/tui/settings-overlay.ts +0 -0
  141. package/packages/updater/src/tui/update-overlay.ts +0 -0
  142. package/packages/updater/src/version.ts +0 -0
  143. package/packages/updater/types.ts +0 -0
  144. package/packages/utility/package.json +4 -4
  145. package/packages/utility/src/diff/renderer.ts +0 -0
  146. package/packages/utility/src/diff/theme.ts +0 -0
  147. package/packages/utility/src/diff/wrapper.ts +0 -0
  148. package/packages/utility/src/display/capabilities.ts +0 -0
  149. package/packages/utility/src/index.ts +3 -1
  150. package/packages/web-api/package.json +4 -4
  151. package/packages/web-api/skills/web/SKILL.md +0 -0
  152. package/packages/web-api/src/engine/constants.ts +0 -0
  153. package/packages/web-api/src/engine/dependencies.ts +0 -0
  154. package/packages/web-api/src/engine/dom.ts +0 -0
  155. package/packages/web-api/src/engine/extract.ts +0 -0
  156. package/packages/web-api/src/engine/format.ts +0 -0
  157. package/packages/web-api/src/engine/profiles.ts +0 -0
  158. package/packages/web-api/src/engine/types.ts +0 -0
  159. package/packages/web-api/src/index.ts +3 -1
  160. package/packages/web-api/src/providers/base.ts +0 -0
  161. package/packages/web-api/src/settings.ts +0 -0
  162. package/packages/web-api/src/tools.ts +0 -0
  163. package/packages/web-api/src/tui/progress.ts +0 -0
  164. package/packages/web-api/src/tui/result.ts +0 -0
  165. package/packages/web-api/src/tui/settings-dialog.ts +0 -0
  166. package/packages/workflow/commands.ts +0 -0
  167. package/packages/workflow/index.ts +3 -1
  168. package/packages/workflow/package.json +5 -5
@@ -12,7 +12,7 @@ import { Type } from "typebox";
12
12
  import { existsSync, readdirSync } from "node:fs";
13
13
  import { join } from "node:path";
14
14
  import { homedir } from "node:os";
15
- import { emitEvent, MODULES, UNIPI_EVENTS, type UnipiBadgeGenerateRequestEvent } from "@pi-unipi/core";
15
+ import { emitEvent, MODULES, UNIPI_EVENTS, withHerdrBlocked, type UnipiBadgeGenerateRequestEvent } from "@pi-unipi/core";
16
16
  import { AgentManager } from "./agent-manager.js";
17
17
  import { initConfig } from "./config.js";
18
18
  import { type AgentActivity, type NotificationDetails, BUILTIN_TYPES } from "./types.js";
@@ -758,28 +758,32 @@ Guidelines:
758
758
  // Open conversation viewer overlay if requested
759
759
  if (params.view && record.session) {
760
760
  const activity = agentActivity.get(record.id);
761
- await ctx.ui.custom<undefined>(
762
- (tui, theme, _keybindings, done) => {
763
- return new ConversationViewer(
764
- tui,
765
- record.session!,
766
- {
767
- type: record.type,
768
- description: record.description,
769
- status: record.status,
770
- toolUses: record.toolUses,
771
- startedAt: record.startedAt,
772
- completedAt: record.completedAt,
773
- },
774
- activity,
775
- theme,
776
- done,
777
- );
778
- },
779
- {
780
- overlay: true,
781
- overlayOptions: { anchor: "center", width: "90%" },
782
- },
761
+ await withHerdrBlocked(
762
+ pi,
763
+ "helper viewer",
764
+ () => ctx.ui.custom<undefined>(
765
+ (tui, theme, _keybindings, done) => {
766
+ return new ConversationViewer(
767
+ tui,
768
+ record.session!,
769
+ {
770
+ type: record.type,
771
+ description: record.description,
772
+ status: record.status,
773
+ toolUses: record.toolUses,
774
+ startedAt: record.startedAt,
775
+ completedAt: record.completedAt,
776
+ },
777
+ activity,
778
+ theme,
779
+ done,
780
+ );
781
+ },
782
+ {
783
+ overlay: true,
784
+ overlayOptions: { anchor: "center", width: "90%" },
785
+ },
786
+ ),
783
787
  );
784
788
  }
785
789
 
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/updater",
3
- "version": "2.0.13",
4
- "description": "Auto-updater, changelog browser, and readme browser for Unipi \u2014 checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
3
+ "version": "2.1.1",
4
+ "description": "Auto-updater, changelog browser, and readme browser for Unipi — checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "license": "MIT",
@@ -33,11 +33,11 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@pi-unipi/core": "2.0.13"
36
+ "@pi-unipi/core": "2.1.1"
37
37
  },
38
38
  "peerDependencies": {
39
- "@earendil-works/pi-coding-agent": "^0.78.0",
40
- "@earendil-works/pi-tui": "^0.78.0"
39
+ "@earendil-works/pi-coding-agent": "^0.80.0",
40
+ "@earendil-works/pi-tui": "^0.80.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^25.6.0",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -6,6 +6,8 @@
6
6
  * node_modules/@pi-unipi/{name}/README.md.
7
7
  */
8
8
 
9
+ import { dirname } from "node:path";
10
+ import { fileURLToPath } from "node:url";
9
11
  import { existsSync, readFileSync } from "fs";
10
12
  import { join } from "path";
11
13
  import { findPackageRoot } from "@pi-unipi/core";
@@ -39,7 +41,7 @@ const PACKAGE_MAP: Record<string, string> = {
39
41
  /** Resolve the unipi package root directory */
40
42
  function resolveUnipiRoot(): string {
41
43
  // Walk up from this file to find @pi-unipi/unipi by name
42
- const dir = new URL(".", import.meta.url).pathname;
44
+ const dir = dirname(fileURLToPath(import.meta.url));
43
45
  const root = findPackageRoot(dir, "@pi-unipi/unipi");
44
46
  return root ?? join(dir, ".."); // fallback to parent
45
47
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/utility",
3
- "version": "2.0.13",
4
- "description": "Utility commands and tools for Pi coding agent \u2014 lifecycle, diagnostics, cache, analytics, display, batch execution",
3
+ "version": "2.1.1",
4
+ "description": "Utility commands and tools for Pi coding agent — lifecycle, diagnostics, cache, analytics, display, batch execution",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@pi-unipi/core": "2.0.13",
37
+ "@pi-unipi/core": "2.1.1",
38
38
  "diff": "^7.0.0",
39
39
  "@shikijs/cli": "^4.0.2"
40
40
  },
@@ -42,7 +42,7 @@
42
42
  "@types/diff": "^7.0.2"
43
43
  },
44
44
  "peerDependencies": {
45
- "@earendil-works/pi-coding-agent": "^0.78.0",
45
+ "@earendil-works/pi-coding-agent": "^0.80.0",
46
46
  "typebox": "^1.1.38"
47
47
  },
48
48
  "scripts": {
File without changes
File without changes
File without changes
File without changes
@@ -12,6 +12,8 @@
12
12
  * - TUI: settings inspector pattern, name badge
13
13
  */
14
14
 
15
+ import { dirname } from "node:path";
16
+ import { fileURLToPath } from "node:url";
15
17
  import type { ExtensionAPI, InputEvent, AgentEndEvent } from "@earendil-works/pi-coding-agent";
16
18
  import {
17
19
  UNIPI_EVENTS,
@@ -35,7 +37,7 @@ import { registerInfoScreen } from "./info-screen.js";
35
37
  export { readBadgeSettings } from "./tui/badge-settings.js";
36
38
 
37
39
  /** Package version */
38
- const VERSION = getPackageVersion(new URL(".", import.meta.url).pathname);
40
+ const VERSION = getPackageVersion(dirname(fileURLToPath(import.meta.url)));
39
41
 
40
42
  /** Whether we've seen the first user message (for auto badge generation) */
41
43
  let firstMessageSeen = false;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/web-api",
3
- "version": "2.0.13",
3
+ "version": "2.1.1",
4
4
  "description": "Web search, read, and summarize tools with provider-based backend selection for Pi coding agent",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -31,7 +31,7 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@pi-unipi/core": "2.0.13",
34
+ "@pi-unipi/core": "2.1.1",
35
35
  "defuddle": "^0.18.1",
36
36
  "linkedom": "^0.18.12",
37
37
  "lodash": "^4.17.21",
@@ -39,8 +39,8 @@
39
39
  "wreq-js": "^2.3.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@earendil-works/pi-coding-agent": "^0.78.0",
43
- "@earendil-works/pi-tui": "^0.78.0",
42
+ "@earendil-works/pi-coding-agent": "^0.80.0",
43
+ "@earendil-works/pi-tui": "^0.80.0",
44
44
  "typebox": "^1.1.38"
45
45
  },
46
46
  "devDependencies": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -5,6 +5,8 @@
5
5
  * Provides agent tools: web-search, multi-web-content-read, web-llm-summarize
6
6
  */
7
7
 
8
+ import { dirname } from "node:path";
9
+ import { fileURLToPath } from "node:url";
8
10
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
11
  import {
10
12
  UNIPI_EVENTS,
@@ -27,7 +29,7 @@ import "./providers/perplexity.js";
27
29
  import "./providers/llm-summarize.js";
28
30
 
29
31
  /** Package version */
30
- const VERSION = getPackageVersion(new URL(".", import.meta.url).pathname);
32
+ const VERSION = getPackageVersion(dirname(fileURLToPath(import.meta.url)));
31
33
 
32
34
  // Get info registry from global (avoids direct import issues with pi's extension loading)
33
35
  function getInfoRegistry() {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,6 +7,8 @@
7
7
  * Applies sandbox (tool filtering) per command.
8
8
  */
9
9
 
10
+ import { dirname } from "node:path";
11
+ import { fileURLToPath } from "node:url";
10
12
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
11
13
  import {
12
14
  UNIPI_EVENTS,
@@ -21,7 +23,7 @@ import {
21
23
  import { registerWorkflowCommands } from "./commands.js";
22
24
 
23
25
  /** Package version (read from package.json at load time) */
24
- const VERSION = getPackageVersion(new URL(".", import.meta.url).pathname);
26
+ const VERSION = getPackageVersion(dirname(fileURLToPath(import.meta.url)));
25
27
 
26
28
  /** Whether ralph module is detected */
27
29
  let ralphDetected = false;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/workflow",
3
- "version": "2.0.13",
3
+ "version": "2.1.1",
4
4
  "description": "Structured development workflow commands for Pi coding agent",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -26,12 +26,12 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@pi-unipi/core": "2.0.13"
29
+ "@pi-unipi/core": "2.1.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@earendil-works/pi-ai": "^0.78.0",
33
- "@earendil-works/pi-coding-agent": "^0.78.0",
34
- "@earendil-works/pi-tui": "^0.78.0",
32
+ "@earendil-works/pi-ai": "^0.80.0",
33
+ "@earendil-works/pi-coding-agent": "^0.80.0",
34
+ "@earendil-works/pi-tui": "^0.80.0",
35
35
  "typebox": "^1.1.38"
36
36
  },
37
37
  "pi": {