@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.
- package/AGENTS.md +68 -0
- package/CHANGELOG.md +724 -0
- package/CONTRIBUTING.md +37 -0
- package/README.md +648 -0
- package/RELEASE.md +117 -0
- package/ROADMAP.md +52 -0
- package/bash-mode/completion-providers.ts +269 -0
- package/bash-mode/completion.ts +416 -0
- package/bash-mode/editor-ghost.ts +40 -0
- package/bash-mode/editor-input.ts +80 -0
- package/bash-mode/editor.ts +437 -0
- package/bash-mode/history.ts +263 -0
- package/bash-mode/shell-session.ts +286 -0
- package/bash-mode/transcript.ts +108 -0
- package/bash-mode/types.ts +80 -0
- package/index.ts +6 -0
- package/package.json +55 -0
- package/queue/store.ts +443 -0
- package/queue/types.ts +54 -0
- package/src/config/custom-items.ts +182 -0
- package/src/config/extension-statuses.ts +51 -0
- package/src/config/layout.ts +60 -0
- package/src/config/parse.ts +127 -0
- package/src/config/powerline-config.ts +18 -0
- package/src/config/presets.ts +245 -0
- package/src/config/primitives.ts +117 -0
- package/src/config/segment-ids.ts +114 -0
- package/src/config/segment-options.ts +128 -0
- package/src/config/settings-patch.ts +26 -0
- package/src/config/types.ts +277 -0
- package/src/core/frontmatter.ts +40 -0
- package/src/editor/autocomplete-chain.ts +41 -0
- package/src/extension/activate.ts +28 -0
- package/src/extension/bash-mode-actions.ts +104 -0
- package/src/extension/commands.ts +268 -0
- package/src/extension/constants.ts +46 -0
- package/src/extension/custom-editor.ts +406 -0
- package/src/extension/git-invalidation.ts +40 -0
- package/src/extension/layout.ts +160 -0
- package/src/extension/menu-views.ts +393 -0
- package/src/extension/powerline-widgets.ts +95 -0
- package/src/extension/prompt-history.ts +219 -0
- package/src/extension/queue-commands.ts +245 -0
- package/src/extension/queue-context.ts +12 -0
- package/src/extension/queue-integration.ts +434 -0
- package/src/extension/segment-context.ts +212 -0
- package/src/extension/session-lifecycle.ts +373 -0
- package/src/extension/settings-io.ts +202 -0
- package/src/extension/shortcuts-config.ts +357 -0
- package/src/extension/shortcuts-router.ts +383 -0
- package/src/extension/skills/inline-invocation.ts +174 -0
- package/src/extension/skills/ook.md +6 -0
- package/src/extension/skills/test.md +6 -0
- package/src/extension/stale-context.ts +10 -0
- package/src/extension/stash-history.ts +103 -0
- package/src/extension/state.ts +159 -0
- package/src/extension/status-line-renderers.ts +222 -0
- package/src/extension/types.ts +97 -0
- package/src/extension/vibe-command.ts +160 -0
- package/src/extension/welcome-control.ts +27 -0
- package/src/extension/welcome-integration.ts +153 -0
- package/src/git/status.ts +332 -0
- package/src/paths/agent-dirs.ts +67 -0
- package/src/render/timer.ts +46 -0
- package/src/segments/core.ts +256 -0
- package/src/segments/custom.ts +114 -0
- package/src/segments/index.ts +3 -0
- package/src/segments/registry.ts +87 -0
- package/src/segments/shared.ts +36 -0
- package/src/segments/system.ts +235 -0
- package/src/segments/usage.ts +178 -0
- package/src/shell/cd-command.ts +190 -0
- package/src/shortcuts/matching.ts +61 -0
- package/src/theme/colors.ts +60 -0
- package/src/theme/icons.ts +175 -0
- package/src/theme/separators.ts +41 -0
- package/src/theme/theme.ts +211 -0
- package/src/tools/graph.ts +75 -0
- package/src/tools/patch.ts +179 -0
- package/src/tools/ripgrep.ts +104 -0
- package/src/usage/context.ts +97 -0
- package/src/usage/ledger.ts +293 -0
- package/src/usage/rates.ts +155 -0
- package/src/welcome/auto-dismiss.ts +43 -0
- package/src/welcome/banner.ts +68 -0
- package/src/welcome/discover.ts +234 -0
- package/src/welcome/format.ts +18 -0
- package/src/welcome/index.ts +5 -0
- package/src/welcome/layout.ts +36 -0
- package/src/welcome/overlay.ts +80 -0
- package/src/welcome/renderer.ts +157 -0
- package/src/welcome/sessions.ts +107 -0
- package/src/welcome/types.ts +41 -0
- package/src/welcome/widgets/graph-widget.ts +25 -0
- package/src/welcome/widgets/index.ts +20 -0
- package/src/welcome/widgets/queue-widget.ts +26 -0
- package/src/welcome/widgets/sessions-widget.ts +23 -0
- package/src/welcome/widgets/shortcuts-widget.ts +17 -0
- package/src/welcome/widgets/system-widget.ts +29 -0
- package/src/working-vibes/generate.ts +144 -0
- package/src/working-vibes/index.ts +24 -0
- package/src/working-vibes/manager.ts +198 -0
- package/src/working-vibes/provider.ts +163 -0
- package/src/working-vibes/storage.ts +357 -0
- package/theme.example.json +24 -0
- 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.
|