pum-agent 0.2.34-beta.2 → 0.2.36-beta.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 (49) hide show
  1. package/README.md +12 -4
  2. package/package.json +3 -4
  3. package/src/animation.tsx +20 -7
  4. package/src/app.tsx +786 -40
  5. package/src/check-mode-prompt.ts +13 -13
  6. package/src/check-mode.ts +105 -10
  7. package/src/cli.ts +36 -1
  8. package/src/commands.ts +37 -1
  9. package/src/context-estimate.ts +55 -0
  10. package/src/context-guidance.ts +5 -5
  11. package/src/context-recovery.ts +22 -0
  12. package/src/context-window.ts +197 -80
  13. package/src/conversation-branch-popup.tsx +46 -0
  14. package/src/conversation-branch.ts +227 -0
  15. package/src/file-checkpoints.ts +337 -0
  16. package/src/file-mutation-guard.ts +224 -0
  17. package/src/filesystem-sandbox.ts +5 -2
  18. package/src/headless.ts +87 -11
  19. package/src/help-popup.tsx +6 -0
  20. package/src/index.tsx +2 -0
  21. package/src/lsp-files.ts +102 -0
  22. package/src/lsp-protocol.ts +275 -0
  23. package/src/lsp.ts +203 -0
  24. package/src/main.tsx +154 -18
  25. package/src/mcp-config.ts +100 -0
  26. package/src/mcp-process.ts +244 -0
  27. package/src/mcp-protocol.ts +385 -0
  28. package/src/mcp.ts +230 -0
  29. package/src/memory-context.ts +91 -0
  30. package/src/memory.ts +25 -23
  31. package/src/operational-context.ts +91 -0
  32. package/src/plan-mode.ts +139 -0
  33. package/src/project-validation.ts +316 -0
  34. package/src/replay.ts +6 -0
  35. package/src/request-diagnostics-access.ts +25 -0
  36. package/src/request-diagnostics.ts +210 -0
  37. package/src/runtime-settings.ts +363 -0
  38. package/src/sandbox/linux.ts +31 -6
  39. package/src/sandbox/types.ts +5 -0
  40. package/src/session-lock-runtime.ts +332 -25
  41. package/src/status-bar.tsx +2 -0
  42. package/src/status-metadata.ts +8 -1
  43. package/src/subagents/manager.ts +137 -23
  44. package/src/subagents/readonly.ts +34 -11
  45. package/src/theme.ts +10 -9
  46. package/src/tool-groups.ts +85 -27
  47. package/src/transcript-history.ts +93 -18
  48. package/src/web-search.ts +228 -33
  49. package/src/model-catalog.ts +0 -47
package/README.md CHANGED
@@ -23,8 +23,8 @@ pum
23
23
  PUM opens the login panel automatically on the first start. Press `?` on an
24
24
  empty prompt to see every control.
25
25
 
26
- Select a model in `Ctrl+P`. GPT-6 Astra is listed for OpenAI and Codex;
27
- using it requires access on your provider account. Press `r` in the model
26
+ Select a model in `Ctrl+P`. GPT-6 Astra, Luna and Sol are listed for OpenAI
27
+ and Codex. To use them, your provider account must have access. Press `r` in the model
28
28
  list to refresh providers that support catalog discovery.
29
29
 
30
30
  Use `/model <name or provider/model-id> [effort]` to change the main-agent model.
@@ -88,6 +88,7 @@ PUM uses [pi](https://github.com/earendil-works/pi) for the agent loop and
88
88
  | [Safety](docs/security.md) | Filesystem sandbox, Check mode, native sandbox, outer sandbox |
89
89
  | [Appearance](docs/appearance.md) | Transcript detail, themes, Markdown, animation, title |
90
90
  | [Configuration](docs/configuration.md) | Where PUM stores things, and what |
91
+ | [Request diagnostics](docs/request-diagnostics.md) | Opt-in safe request reports; transport signals are not server cache hits |
91
92
 
92
93
  ## Requirements
93
94
 
@@ -119,6 +120,10 @@ bun run start
119
120
  Use `bun run start -r` to resume the latest session for the current directory,
120
121
  and `/login` to add or update a provider later.
121
122
  Inside the TUI, `/history` or its alias `/resume` opens the saved-session browser.
123
+ For local request debugging, start with `PUM_REQUEST_DIAGNOSTICS=1 bun run start`
124
+ and use `/diagnostics` in the selected transcript. Headless runs emit the safe
125
+ report on stderr only. Diagnostics stay in bounded process memory, not session
126
+ files, and do not establish provider cache hits. See [Request diagnostics](docs/request-diagnostics.md).
122
127
 
123
128
  Agents have separate context tools: `history` searches and reads the active session
124
129
  transcript. `get_context_remaining` reports the context budget. `new_context`
@@ -159,8 +164,11 @@ git diff --check
159
164
  Run the TUI from the repository root with `bun run start`, and refresh the
160
165
  README images with `bun run scripts/capture-screenshots.tsx`. Use a throwaway
161
166
  `PUM_DIR` for local integration tests, and capture TUI output through `tmux`
162
- rather than piping standard output. [AGENTS.md](AGENTS.md) holds the
163
- architecture, the locked decisions, and the TUI test guidance.
167
+ rather than piping standard output. [AGENTS.md](AGENTS.md) holds the mandatory
168
+ security/workflow core and routes to the [indexed current contracts](docs/agent-guidance/README.md),
169
+ [source layout](docs/agent-guidance/layout.md), and [TUI test guidance](docs/agent-guidance/testing.md).
170
+ Detailed rules remain mandatory; [historical research](docs/agent-guidance/historical-references.md)
171
+ is clearly separated from current authority.
164
172
 
165
173
  ## Release status
166
174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pum-agent",
3
- "version": "0.2.34-beta.2",
3
+ "version": "0.2.36-beta.1",
4
4
  "description": "A compact terminal coding agent powered by pi and OpenTUI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -50,9 +50,8 @@
50
50
  "pack:check": "bun run scripts/validate-pack.ts"
51
51
  },
52
52
  "dependencies": {
53
- "@earendil-works/pi-ai": "^0.85.0",
54
- "@earendil-works/pi-coding-agent": "^0.85.0",
55
- "@earendil-works/pi-server": "^0.85.0",
53
+ "@earendil-works/pi-ai": "^0.87.1",
54
+ "@earendil-works/pi-coding-agent": "^0.87.1",
56
55
  "@opentui/core": "^0.5.1",
57
56
  "@opentui/react": "^0.5.1",
58
57
  "react": "^19.2.8",
package/src/animation.tsx CHANGED
@@ -60,9 +60,9 @@ export const CARET_FADE_STEPS = 16;
60
60
  const ease = (t: number) => (1 - Math.cos(Math.max(0, Math.min(1, t)) * Math.PI)) / 2;
61
61
 
62
62
  /**
63
- * The caret dissolves into the background instead of switching off. The block
64
- * glyph stays in place for the whole cycle, so the row's width never changes
65
- * and no glyph swap can rewrite the text underneath it.
63
+ * The caret's brightness envelope. Opaque backgrounds use a smooth fade;
64
+ * unknown (transparent) backgrounds use its midpoint as a blink threshold.
65
+ * Both keep one cell occupied so the row's width never changes.
66
66
  */
67
67
  export function caretAlpha(elapsedMs: number): number {
68
68
  const phase = (((elapsedMs % CARET_PERIOD_MS) + CARET_PERIOD_MS) % CARET_PERIOD_MS)
@@ -504,7 +504,7 @@ export function useShimmerText(opts: {
504
504
  const stop = subscribe((elapsedMs) => {
505
505
  if (!ref.current) return;
506
506
  const styled = shimmer(latest.current, base, hi, elapsedMs);
507
- if (caret) styled.chunks.push(fg(mixLight(behind, hi, caretAlpha(elapsedMs)))(CARET));
507
+ if (caret) styled.chunks.push(caretChunk(behind, hi, caretAlpha(elapsedMs)));
508
508
  ref.current.content = styled;
509
509
  });
510
510
  return () => {
@@ -521,7 +521,18 @@ export function useShimmerText(opts: {
521
521
  return ref;
522
522
  }
523
523
 
524
- /** Own styled text and append a width-stable fading caret while active. */
524
+ /**
525
+ * Transparent has no RGB background to fade toward. Its zero RGB channels are
526
+ * not the terminal's colour, and terminal foreground alpha is not a portable
527
+ * way to recover that colour. Blink a width-stable space instead. Opaque custom
528
+ * backgrounds retain the smooth linear-light fade; neither path paints a bg.
529
+ */
530
+ export function caretChunk(background: RGBA, lit: RGBA, strength: number): TextChunk {
531
+ if (background.a < 1) return fg(lit)(strength >= 0.5 ? CARET : " ");
532
+ return fg(mixLight(background, lit, strength))(CARET);
533
+ }
534
+
535
+ /** Own styled text and append a width-stable caret while active. */
525
536
  export function useBlinkingText(opts: {
526
537
  chunks: TextChunk[];
527
538
  contentKey: string;
@@ -543,8 +554,10 @@ export function useBlinkingText(opts: {
543
554
 
544
555
  const paint = useCallback(() => {
545
556
  if (!ref.current) return;
546
- const color = mixLight(behind, lit, caretStep.current / CARET_FADE_STEPS);
547
- ref.current.content = new StyledText([...latest.current, fg(color)(CARET)]);
557
+ ref.current.content = new StyledText([
558
+ ...latest.current,
559
+ caretChunk(behind, lit, caretStep.current / CARET_FADE_STEPS),
560
+ ]);
548
561
  }, [behind, lit]);
549
562
 
550
563
  useEffect(() => {