@groeponline/pi-wishcraft 0.17.3

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 (106) hide show
  1. package/AGENTS.md +68 -0
  2. package/CHANGELOG.md +724 -0
  3. package/CONTRIBUTING.md +37 -0
  4. package/README.md +648 -0
  5. package/RELEASE.md +117 -0
  6. package/ROADMAP.md +52 -0
  7. package/bash-mode/completion-providers.ts +269 -0
  8. package/bash-mode/completion.ts +416 -0
  9. package/bash-mode/editor-ghost.ts +40 -0
  10. package/bash-mode/editor-input.ts +80 -0
  11. package/bash-mode/editor.ts +437 -0
  12. package/bash-mode/history.ts +263 -0
  13. package/bash-mode/shell-session.ts +286 -0
  14. package/bash-mode/transcript.ts +108 -0
  15. package/bash-mode/types.ts +80 -0
  16. package/index.ts +6 -0
  17. package/package.json +55 -0
  18. package/queue/store.ts +443 -0
  19. package/queue/types.ts +54 -0
  20. package/src/config/custom-items.ts +182 -0
  21. package/src/config/extension-statuses.ts +51 -0
  22. package/src/config/layout.ts +60 -0
  23. package/src/config/parse.ts +127 -0
  24. package/src/config/powerline-config.ts +18 -0
  25. package/src/config/presets.ts +245 -0
  26. package/src/config/primitives.ts +117 -0
  27. package/src/config/segment-ids.ts +114 -0
  28. package/src/config/segment-options.ts +128 -0
  29. package/src/config/settings-patch.ts +26 -0
  30. package/src/config/types.ts +277 -0
  31. package/src/core/frontmatter.ts +40 -0
  32. package/src/editor/autocomplete-chain.ts +41 -0
  33. package/src/extension/activate.ts +28 -0
  34. package/src/extension/bash-mode-actions.ts +104 -0
  35. package/src/extension/commands.ts +268 -0
  36. package/src/extension/constants.ts +46 -0
  37. package/src/extension/custom-editor.ts +406 -0
  38. package/src/extension/git-invalidation.ts +40 -0
  39. package/src/extension/layout.ts +160 -0
  40. package/src/extension/menu-views.ts +393 -0
  41. package/src/extension/powerline-widgets.ts +95 -0
  42. package/src/extension/prompt-history.ts +219 -0
  43. package/src/extension/queue-commands.ts +245 -0
  44. package/src/extension/queue-context.ts +12 -0
  45. package/src/extension/queue-integration.ts +434 -0
  46. package/src/extension/segment-context.ts +212 -0
  47. package/src/extension/session-lifecycle.ts +373 -0
  48. package/src/extension/settings-io.ts +202 -0
  49. package/src/extension/shortcuts-config.ts +357 -0
  50. package/src/extension/shortcuts-router.ts +383 -0
  51. package/src/extension/skills/inline-invocation.ts +174 -0
  52. package/src/extension/skills/ook.md +6 -0
  53. package/src/extension/skills/test.md +6 -0
  54. package/src/extension/stale-context.ts +10 -0
  55. package/src/extension/stash-history.ts +103 -0
  56. package/src/extension/state.ts +159 -0
  57. package/src/extension/status-line-renderers.ts +222 -0
  58. package/src/extension/types.ts +97 -0
  59. package/src/extension/vibe-command.ts +160 -0
  60. package/src/extension/welcome-control.ts +27 -0
  61. package/src/extension/welcome-integration.ts +153 -0
  62. package/src/git/status.ts +332 -0
  63. package/src/paths/agent-dirs.ts +67 -0
  64. package/src/render/timer.ts +46 -0
  65. package/src/segments/core.ts +256 -0
  66. package/src/segments/custom.ts +114 -0
  67. package/src/segments/index.ts +3 -0
  68. package/src/segments/registry.ts +87 -0
  69. package/src/segments/shared.ts +36 -0
  70. package/src/segments/system.ts +235 -0
  71. package/src/segments/usage.ts +178 -0
  72. package/src/shell/cd-command.ts +190 -0
  73. package/src/shortcuts/matching.ts +61 -0
  74. package/src/theme/colors.ts +60 -0
  75. package/src/theme/icons.ts +175 -0
  76. package/src/theme/separators.ts +41 -0
  77. package/src/theme/theme.ts +211 -0
  78. package/src/tools/graph.ts +75 -0
  79. package/src/tools/patch.ts +179 -0
  80. package/src/tools/ripgrep.ts +104 -0
  81. package/src/usage/context.ts +97 -0
  82. package/src/usage/ledger.ts +293 -0
  83. package/src/usage/rates.ts +155 -0
  84. package/src/welcome/auto-dismiss.ts +43 -0
  85. package/src/welcome/banner.ts +68 -0
  86. package/src/welcome/discover.ts +234 -0
  87. package/src/welcome/format.ts +18 -0
  88. package/src/welcome/index.ts +5 -0
  89. package/src/welcome/layout.ts +36 -0
  90. package/src/welcome/overlay.ts +80 -0
  91. package/src/welcome/renderer.ts +157 -0
  92. package/src/welcome/sessions.ts +107 -0
  93. package/src/welcome/types.ts +41 -0
  94. package/src/welcome/widgets/graph-widget.ts +25 -0
  95. package/src/welcome/widgets/index.ts +20 -0
  96. package/src/welcome/widgets/queue-widget.ts +26 -0
  97. package/src/welcome/widgets/sessions-widget.ts +23 -0
  98. package/src/welcome/widgets/shortcuts-widget.ts +17 -0
  99. package/src/welcome/widgets/system-widget.ts +29 -0
  100. package/src/working-vibes/generate.ts +144 -0
  101. package/src/working-vibes/index.ts +24 -0
  102. package/src/working-vibes/manager.ts +198 -0
  103. package/src/working-vibes/provider.ts +163 -0
  104. package/src/working-vibes/storage.ts +357 -0
  105. package/theme.example.json +24 -0
  106. package/tsconfig.json +13 -0
package/AGENTS.md ADDED
@@ -0,0 +1,68 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI agents (and humans) working on this repository.
4
+
5
+ ## What this project is
6
+
7
+ pi-wishcraft is a powerline-style status bar and wishcraft interaction layer for the `pi`
8
+ coding agent: status segments, welcome overlay/header, working "vibes" loading
9
+ messages, a queue + idea inbox, bash mode, prompt/stash history, and full
10
+ user customization.
11
+
12
+ ## Repository layout
13
+
14
+ - `index.ts` — package entry: the public barrel. It re-exports the default
15
+ activation function and the documented public API (`resolveShortcutConfig`,
16
+ `parseBashModeSettings`, `PowerlineShortcuts`). Keep it a barrel; no
17
+ implementation lives here.
18
+ - `src/` — the proxy-free extension runtime, organized by domain:
19
+ - `src/extension/` — activation, command handlers, session lifecycle,
20
+ custom editor wiring, shortcut routing, settings IO, queue and menu views.
21
+ Leaf modules (`types.ts`, `constants.ts`, `queue-context.ts`,
22
+ `welcome-control.ts`, `settings-io.ts`, `prompt-history.ts`,
23
+ `stash-history.ts`, `shortcuts-config.ts`) keep the dependency graph
24
+ acyclic: shared types and constants live in leaves, queue/welcome
25
+ callbacks are wired through leaves or `RuntimeState`, and `state.ts` is
26
+ the hub that only has inbound edges. Verify with `npx madge --circular
27
+ src index.ts bash-mode queue`.
28
+ - `src/config/` — powerline config parsing, presets, types, segment ids/options.
29
+ - `src/segments/` — segment registry and the segment renderers.
30
+ - `src/theme/` — colors, icons, separators, theme loading.
31
+ - `src/usage/` — token stats, context usage, currency rates.
32
+ - `src/welcome/` — welcome header/overlay rendering and discovery.
33
+ - `src/working-vibes/` — vibe theme storage, generation, manager.
34
+ - `src/git/`, `src/shell/`, `src/editor/`, `src/render/`, `src/paths/`,
35
+ `src/shortcuts/`, `src/lifecycle/` — small single-purpose domains.
36
+ - `bash-mode/` — managed shell session, transcript store, completion engine.
37
+ - `queue/` — file-backed queue/inbox store and types.
38
+ - `tests/` — flat `node:test` suite (`tests/*.test.ts`); structural tests read
39
+ the module under test from `src/`, never from `index.ts` source text.
40
+ - `scripts/release.mjs` — zero-dep release helper (bump, CHANGELOG, tag).
41
+
42
+ ## Rules
43
+
44
+ - **No root-level monofiles.** Implementation lives under `src/` organized by
45
+ domain; `index.ts` is only a barrel. Import implementation via
46
+ `src/**` paths (or `bash-mode/`, `queue/`).
47
+ - **Module size:** when a file exceeds ~450 lines, split it along domain
48
+ boundaries (e.g. command handlers out of `commands.ts`, git invalidation
49
+ out of `session-lifecycle.ts`). Prefer many cohesive small modules.
50
+ - **No circular imports.** Domain modules must not import back into
51
+ `src/extension/state.ts` for callbacks; move the callback into a leaf module
52
+ (e.g. `welcome-control.ts`) or wire it through `RuntimeState`.
53
+ - **Bun/Node-native TS:** `import` paths carry `.ts` extensions
54
+ (`allowImportingTsExtensions`), `node:`-prefixed builtins, `node --test`
55
+ with type stripping. No build step.
56
+ - **Tests:** behavior changes in `src/` need a focused regression test near
57
+ the existing tests for that subsystem; structural tests assert on module
58
+ files in `src/` (never `index.ts`).
59
+
60
+ ## Commands
61
+
62
+ ```bash
63
+ npm ci
64
+ npm run typecheck # tsc --noEmit (strict)
65
+ npm test # node --experimental-strip-types --test tests/**/*.test.ts
66
+ ```
67
+
68
+ Run both before proposing any non-trivial change.