@narumitw/pi-starship 0.28.0 β 0.29.0
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/NOTICES.md +18 -1
- package/README.md +189 -15
- package/package.json +3 -2
- package/src/commands.ts +405 -22
- package/src/config.ts +113 -11
- package/src/format/formatter.ts +26 -11
- package/src/format/style.ts +13 -1
- package/src/modules/catalog.ts +20 -0
- package/src/modules/cloud.ts +74 -0
- package/src/modules/deployment.ts +61 -0
- package/src/modules/development.ts +95 -0
- package/src/modules/execution.ts +73 -0
- package/src/modules/fill.ts +14 -0
- package/src/modules/git/branch.ts +7 -3
- package/src/modules/git/commit.ts +22 -0
- package/src/modules/git/metrics.ts +20 -0
- package/src/modules/git/runtime.ts +320 -41
- package/src/modules/git/state.ts +21 -0
- package/src/modules/git/status.ts +62 -11
- package/src/modules/index.ts +7 -1
- package/src/modules/languages.ts +87 -0
- package/src/modules/package.ts +17 -0
- package/src/modules/render.ts +97 -9
- package/src/modules/types.ts +65 -2
- package/src/modules/workspace-helpers.ts +10 -0
- package/src/pi-starship.ts +230 -104
- package/src/runtime/cloud.ts +166 -0
- package/src/runtime/command.ts +85 -0
- package/src/runtime/deployment.ts +201 -0
- package/src/runtime/development.ts +154 -0
- package/src/runtime/execution.ts +141 -0
- package/src/runtime/helpers.ts +273 -0
- package/src/runtime/languages.ts +205 -0
- package/src/runtime/package.ts +112 -0
- package/src/runtime/refresh-controller.ts +85 -0
- package/src/runtime/types.ts +59 -0
- package/src/runtime/workspace.ts +110 -0
package/NOTICES.md
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
# Notices
|
|
2
2
|
|
|
3
|
-
pi-starship's format and style behavior is based in part on Starship.
|
|
3
|
+
pi-starship's format and style behavior is based in part on Starship. It uses the `yaml`
|
|
4
|
+
package to parse kubeconfig and OpenStack metadata as inert local data.
|
|
5
|
+
|
|
6
|
+
## yaml
|
|
7
|
+
|
|
8
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
11
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
12
|
+
and this permission notice appear in all copies.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
15
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
16
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
17
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
18
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
19
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
20
|
+
THIS SOFTWARE.
|
|
4
21
|
|
|
5
22
|
## Starship
|
|
6
23
|
|
package/README.md
CHANGED
|
@@ -11,9 +11,12 @@ A native Pi footer configured with Starship-style TOML. It parses and renders fo
|
|
|
11
11
|
- Automatically creates a readable Tokyo Night configuration on first session start.
|
|
12
12
|
- Starship-style root/module formats, conditional groups, `$all`, styles, and palettes.
|
|
13
13
|
- Pi modules for model, thinking, activity, context, tokens, cost, turn, and extension statuses.
|
|
14
|
-
- Cached Git branch
|
|
14
|
+
- Cached Git branch, commit, operation state, line metrics, detailed status, and linked-worktree identity.
|
|
15
|
+
- Opt-in package, language, development-shell, deployment, cloud, and execution-context modules.
|
|
16
|
+
- Width-aware `$fill` alignment for native multiline left/right layouts.
|
|
17
|
+
- Footer rendering is pure: no subprocess, network, filesystem, timer, or environment work runs from `render()`.
|
|
15
18
|
- Multiline output wraps to the terminal width instead of truncating.
|
|
16
|
-
-
|
|
19
|
+
- Goal-oriented `/starship` menu with configuration health, preview, confirmation, and recovery.
|
|
17
20
|
|
|
18
21
|
## π¦ Install
|
|
19
22
|
|
|
@@ -41,13 +44,15 @@ On the first session start, the extension atomically creates this file from its
|
|
|
41
44
|
|
|
42
45
|
The extension does **not** read project overrides, `pi-statusline.json`, `PI_STATUSLINE_PRESET`, or `~/.config/starship.toml`, and does not migrate statusline settings.
|
|
43
46
|
|
|
44
|
-
Open the
|
|
47
|
+
Open the interactive menu in TUI mode:
|
|
45
48
|
|
|
46
49
|
```text
|
|
47
|
-
/starship
|
|
50
|
+
/starship
|
|
48
51
|
```
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
Choose **Customize footer** to edit the TOML. Closing the editor validates the draft and opens a width-aware preview; saving happens only after a separate confirmation. Confirmed changes are atomically saved and applied immediately. Editor cancellation, preview cancellation, invalid drafts, write failures, and runtime application failures preserve the previous file and effective footer.
|
|
54
|
+
|
|
55
|
+
The **Advanced** menu is one level deep and contains configuration details plus **Restore built-in**. Restore shows the concrete built-in preview and requires explicit overwrite confirmation.
|
|
51
56
|
|
|
52
57
|
### π Example
|
|
53
58
|
|
|
@@ -73,12 +78,28 @@ style = "fg:custom"
|
|
|
73
78
|
[git_branch]
|
|
74
79
|
format = "[ $symbol$branch$pr ]($style)"
|
|
75
80
|
|
|
81
|
+
[package]
|
|
82
|
+
version_format = "v$raw"
|
|
83
|
+
|
|
84
|
+
[nodejs]
|
|
85
|
+
detect_files = ["package.json", "!deno.json"]
|
|
86
|
+
detect_extensions = ["js", "ts"]
|
|
87
|
+
|
|
88
|
+
[hostname]
|
|
89
|
+
ssh_only = true
|
|
90
|
+
trim_at = "."
|
|
91
|
+
aliases = { "build.example.test" = "builder" }
|
|
92
|
+
|
|
76
93
|
[extension_status]
|
|
77
94
|
format = "([$statuses ]($style))"
|
|
78
95
|
icons = { "github-pr" = "PR", "foo:*" = "π§ͺ", "@narumitw/pi-goal" = "β", fallback = "β’" }
|
|
79
96
|
```
|
|
80
97
|
|
|
81
|
-
All module tables support `format`, `symbol`, `style`, and `disabled`.
|
|
98
|
+
All module tables support `format`, `symbol`, `style`, and `disabled`. Module-specific
|
|
99
|
+
options are catalog-owned, type-checked, and listed below; unknown options warn and stay inactive.
|
|
100
|
+
Version formats replace `$raw`. Detection arrays replace defaults when non-empty and inspect only one
|
|
101
|
+
listing of the current directory. A leading `!` is supported by language detection arrays and rejects
|
|
102
|
+
a matching project.
|
|
82
103
|
`[extension_status].icons` accepts arbitrary exact Pi status keys, explicit colon namespace
|
|
83
104
|
wildcards such as `foo:*`, and installed package IDs; `fallback` controls unmatched statuses. Icon
|
|
84
105
|
matching uses exact key, longest `:*` wildcard, unambiguous package alias, leading status emoji,
|
|
@@ -126,33 +147,184 @@ An invalid root format falls back to the built-in root format. An invalid module
|
|
|
126
147
|
| `thinking` | `$symbol`, `$level` | Thinking level |
|
|
127
148
|
| `directory` | `$symbol`, `$path`, `$full_path` | Current working directory |
|
|
128
149
|
| `git_worktree` | `$symbol`, `$name`, `$path` | Linked worktree name and top-level path |
|
|
129
|
-
| `git_branch` | `$symbol`, `$branch`, `$pr` |
|
|
130
|
-
| `
|
|
150
|
+
| `git_branch` | `$symbol`, `$branch`, `$remote_name`, `$remote_branch`, `$pr` | Branch, upstream, and actionable PR state |
|
|
151
|
+
| `git_commit` | `$symbol`, `$hash`, `$tag` | Seven-character HEAD hash and optional exact tag |
|
|
152
|
+
| `git_state` | `$symbol`, `$state`, `$progress_current`, `$progress_total` | Rebase, merge, revert, cherry-pick, bisect, or mail-apply state |
|
|
153
|
+
| `git_metrics` | `$symbol`, `$added`, `$deleted` | Added/deleted line totals from the working tree diff |
|
|
154
|
+
| `git_status` | `$symbol`, `$all_status`, `$ahead_behind`, `$ahead`, `$behind`, `$diverged`, `$up_to_date`, `$conflicted`, `$stashed`, `$deleted`, `$renamed`, `$modified`, `$typechanged`, `$staged`, `$untracked`, and detailed index/worktree counters | Cached porcelain-v2 counters |
|
|
131
155
|
| `activity` | `$symbol`, `$state`, `$tool`, `$count`, `$text` | Active tools, streaming, completion, or idle |
|
|
132
156
|
| `context` | `$symbol`, `$percentage`, `$tokens`, `$window` | Context-window use |
|
|
133
157
|
| `tokens` | `$symbol`, `$input`, `$output`, `$total` | Token totals |
|
|
134
158
|
| `cost` | `$symbol`, `$cost` | Session cost |
|
|
135
159
|
| `time` | `$symbol`, `$time` | Current local time |
|
|
136
160
|
| `turn` | `$symbol`, `$count` | User turn count |
|
|
161
|
+
| `package` | `$symbol`, `$version`, `$source` | Direct project manifest version |
|
|
162
|
+
| `nodejs` | `$symbol`, `$version`, `$engines_version` | Detected Node.js project/runtime |
|
|
163
|
+
| `python` | `$symbol`, `$version`, `$virtualenv`, `$pyenv_prefix` | Python runtime and allowlisted environment name |
|
|
164
|
+
| `rust` | `$symbol`, `$version`, `$numver`, `$toolchain` | Safe native `rustc` runtime and allowlisted toolchain name |
|
|
165
|
+
| `golang` | `$symbol`, `$version`, `$mod_version` | Go runtime (`$mod_version` is reserved and currently empty) |
|
|
166
|
+
| `bun` / `deno` | `$symbol`, `$version` | Bun or Deno runtime |
|
|
167
|
+
| `mise` | `$symbol`, `$health` | Bounded mise health result |
|
|
168
|
+
| `direnv` | `$symbol`, `$rc_path`, `$allowed`, `$loaded` | Inert direnv status; `.envrc` is never sourced |
|
|
169
|
+
| `conda` | `$symbol`, `$environment` | Active Conda environment name |
|
|
170
|
+
| `pixi` | `$symbol`, `$version`, `$environment`, `$project_name` | Pixi project and environment |
|
|
171
|
+
| `nix_shell` | `$symbol`, `$state`, `$name`, `$level` | Allowlisted Nix shell activation metadata |
|
|
172
|
+
| `guix_shell` | `$symbol`, `$state` | Guix shell activation marker |
|
|
173
|
+
| `docker_context` | `$symbol`, `$context` | Non-default local Docker context |
|
|
174
|
+
| `kubernetes` | `$symbol`, `$context`, `$namespace`, `$cluster`, `$user` | Current inert kubeconfig metadata |
|
|
175
|
+
| `terraform` | `$symbol`, `$workspace`, `$version` | Local Terraform/OpenTofu workspace and optional version |
|
|
176
|
+
| `aws` | `$symbol`, `$profile`, `$region` | AWS profile/region metadata, never credentials |
|
|
177
|
+
| `gcloud` | `$symbol`, `$active`, `$account`, `$domain`, `$project`, `$region` | Active gcloud configuration metadata |
|
|
178
|
+
| `azure` | `$symbol`, `$subscription`, `$username` | Default Azure subscription; username is separately enabled |
|
|
179
|
+
| `openstack` | `$symbol`, `$cloud`, `$project` | Selected OpenStack cloud/project metadata |
|
|
180
|
+
| `os` | `$symbol`, `$type`, `$name`, `$version`, `$edition`, `$codename` | Platform/OS metadata; disabled by default |
|
|
181
|
+
| `container` | `$symbol`, `$name`, `$type` | Known container, WSL, or Dev Container context |
|
|
182
|
+
| `hostname` | `$symbol`, `$hostname`, `$ssh_symbol` | Hostname, SSH-only by default |
|
|
183
|
+
| `username` | `$symbol`, `$user` | Contextual login identity |
|
|
184
|
+
| `fill` | `$symbol` | Flexible width-aware root-layout marker |
|
|
137
185
|
| `extension_status` | `$symbol`, `$statuses`, `$count` | Pi extension statuses |
|
|
138
186
|
|
|
139
187
|
`git_worktree` is empty in the primary worktree. In a linked worktree it defaults to the top-level directory name; use `$path` when the full absolute path is needed.
|
|
140
188
|
|
|
189
|
+
`git_commit`, `git_state`, and `git_metrics` are intentionally not present in the built-in root format. Add their variables to `format` to opt in; also set `[git_metrics].disabled = false`, matching Starship's opt-in metrics default. `$tag` resolves only an exact tag on HEAD and is queried only when the configured `git_commit` format references it.
|
|
190
|
+
|
|
141
191
|
If `$git_branch.$pr` is present in the module format, its selected PR token is removed from `extension_status` to avoid duplication.
|
|
142
192
|
|
|
193
|
+
### π¦ Package and language modules
|
|
194
|
+
|
|
195
|
+
The native behavior is inspired by Starship pinned at
|
|
196
|
+
`9f4d07ed45804e280d6884bb8ced7ea3d3033093`; it is not complete Starship compatibility.
|
|
197
|
+
|
|
198
|
+
| Area | Adopted | Adapted | Intentionally omitted |
|
|
199
|
+
| --- | --- | --- | --- |
|
|
200
|
+
| `package` | `package.json` β Cargo β PEP 621/Poetry precedence, `$version` | Direct manifests only; Cargo workspace version lookup is capped at eight ancestors | Other package ecosystems, dynamic Python versions, package-manager execution |
|
|
201
|
+
| Node.js | Direct markers/extensions, `node --version`, package engine text | Bun/Deno markers suppress Node's default detection | Constraint checks and manager/shim evaluation |
|
|
202
|
+
| Python | Direct markers, selected interpreter `--version`, virtualenv name | Interpreter selection uses only an existing active virtualenv path or `python` | Python code execution and broad environment discovery |
|
|
203
|
+
| Rust | Direct markers and native `rustc --version` | `.cargo`/`.rustup` shim paths are rejected to avoid toolchain installation | Falling back to rustup or any installing probe |
|
|
204
|
+
| Go | Direct markers and `go version` | `$mod_version` stays empty | `go list`, module downloads, and constraint enforcement |
|
|
205
|
+
| Bun / Deno | Direct markers and `bun --version` / `deno -V` | Negative detection avoids overlapping Node defaults | Runtime installation and recursive source detection |
|
|
206
|
+
|
|
207
|
+
All runtime commands use argv execution in `ctx.cwd`, a 2-second timeout, and 64 KiB accepted output.
|
|
208
|
+
Commands run only when the reachable module format references the command-backed variable. Missing,
|
|
209
|
+
killed, oversized, or malformed commands clear that value independently. `version_format`,
|
|
210
|
+
`detect_files`, `detect_extensions`, and `detect_folders` are available on language modules; package
|
|
211
|
+
supports `version_format`.
|
|
212
|
+
|
|
213
|
+
### π§° Development environments
|
|
214
|
+
|
|
215
|
+
| Module | Detection / allowed inputs | Optional command | Options |
|
|
216
|
+
| --- | --- | --- | --- |
|
|
217
|
+
| `mise` | Direct `mise.toml`, `.mise.toml`, or `.tool-versions` | `mise doctor` only for `$health` | Detection arrays |
|
|
218
|
+
| `direnv` | Direct `.envrc`; the file is never read or sourced | `direnv status --json` only for status variables | Detection arrays |
|
|
219
|
+
| `conda` | `CONDA_DEFAULT_ENV` only | None | `ignore_base` (default `true`) |
|
|
220
|
+
| `pixi` | Direct `pixi.toml`/`pixi.lock`, `PIXI_ENVIRONMENT_NAME`, `PIXI_PROJECT_NAME` | `pixi --version` only for `$version` | Detection arrays, `version_format`, `show_default_environment` |
|
|
221
|
+
| `nix_shell` | `IN_NIX_SHELL`, `NIX_SHELL_NAME`, `NIX_SHELL_LEVEL` | None | None |
|
|
222
|
+
| `guix_shell` | Presence of `GUIX_ENVIRONMENT` | None | None |
|
|
223
|
+
|
|
224
|
+
The extension never enumerates the process environment, activates a shell, evaluates Nix, lists
|
|
225
|
+
installed tools, or publishes arbitrary environment values. Names and paths are control-sanitized and
|
|
226
|
+
bounded before publication.
|
|
227
|
+
|
|
228
|
+
### π’ Deployment and cloud context
|
|
229
|
+
|
|
230
|
+
These modules read inert local metadata only. They do **not** contact Docker, a Kubernetes cluster,
|
|
231
|
+
a Terraform/OpenTofu backend, a cloud API, an OAuth flow, a credential helper, or a metadata service.
|
|
232
|
+
The deployment/cloud safety review retained opt-in root behavior: context labels may be sensitive and
|
|
233
|
+
there is no usage evidence justifying more default footer density.
|
|
234
|
+
|
|
235
|
+
- `docker_context`: `DOCKER_CONTEXT`, then `DOCKER_CONFIG/config.json` or `~/.docker/config.json`;
|
|
236
|
+
`default` is suppressed. `only_with_files` and detection arrays are supported.
|
|
237
|
+
- `kubernetes`: at most `max_config_files` (default 8) from `KUBECONFIG` or `~/.kube/config`, with
|
|
238
|
+
first-wins merge semantics. Only context, namespace, cluster name, and user name are selected.
|
|
239
|
+
Exact `context_aliases`, `namespace_aliases`, `cluster_aliases`, and `user_aliases` apply.
|
|
240
|
+
- `terraform`: direct `.tf`, `.tfplan`, `.tfstate`, or `.terraform`; workspace precedence is
|
|
241
|
+
`TF_WORKSPACE` β `TF_DATA_DIR/environment` β `.terraform/environment`. `terraform version`, then
|
|
242
|
+
`tofu version`, runs only for `$version`. Workspace, init, provider, and state commands never run.
|
|
243
|
+
- `aws`: `AWS_PROFILE`/`AWS_DEFAULT_PROFILE`, `AWS_REGION`/`AWS_DEFAULT_REGION`, then the selected AWS
|
|
244
|
+
config section. The credentials file is never read. Exact profile/region aliases are supported.
|
|
245
|
+
- `gcloud`: active selector plus allowlisted `core.account`, `core.project`, and `compute.region` INI
|
|
246
|
+
keys. Exact project/region aliases are supported.
|
|
247
|
+
- `azure`: the default local `azureProfile.json` subscription name. `show_username` defaults to
|
|
248
|
+
`false`; exact subscription aliases are supported.
|
|
249
|
+
- `openstack`: `OS_CLOUD`, `OS_PROJECT_NAME`, or the selected `clouds.yaml` `auth.project_name` only;
|
|
250
|
+
exact cloud/project aliases are supported.
|
|
251
|
+
|
|
252
|
+
Cloud files often colocate credentials with labels. Parsers allowlist fields while reading and
|
|
253
|
+
discard source documents; token, key, password, auth URL, tenant, and credential-derived duration
|
|
254
|
+
fields never enter snapshots, diagnostics, notifications, or rendered output. Presence indicates only
|
|
255
|
+
selected local metadataβnot valid credentials or connectivity.
|
|
256
|
+
|
|
257
|
+
### π₯οΈ Execution context
|
|
258
|
+
|
|
259
|
+
`hostname` is SSH-only by default and supports `ssh_only`, `trim_at`, and exact `aliases`. `username`
|
|
260
|
+
appears only for `show_always`, SSH, root/Administrator, a login-user mismatch, or configured
|
|
261
|
+
`detect_env_vars`; it supports exact aliases. Negated username detection names are rejected. `os` is
|
|
262
|
+
disabled by default and supports an exact `symbols` map. `container` uses only Dev Container/Codespaces
|
|
263
|
+
markers, WSL metadata, `/.dockerenv`, `/run/.containerenv`, and `/run/systemd/container`; it does not
|
|
264
|
+
scan process tables or cgroups. Ordinary local hostname/username sessions stay empty. All identity
|
|
265
|
+
labels are bounded and stripped of C0/C1 controls, ANSI, newlines, and OSC control bytes.
|
|
266
|
+
|
|
267
|
+
### βοΈ Fill layout
|
|
268
|
+
|
|
269
|
+
Add `${fill}` between left and right root content (braces disambiguate adjacent text):
|
|
270
|
+
|
|
271
|
+
```toml
|
|
272
|
+
format = "$directory$git_branch${fill}$model$context"
|
|
273
|
+
|
|
274
|
+
[fill]
|
|
275
|
+
symbol = " " # native invisible default; use "Β·" for a visible pattern
|
|
276
|
+
style = "dimmed"
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Fill resolves independently on each logical line before ANSI serialization and wrapping. Multiple
|
|
280
|
+
fills divide remaining cells left-to-right; complete positive-width patterns repeat and any remainder
|
|
281
|
+
uses styled spaces. Empty/zero-width patterns become spaces. Fixed content is never truncated: when it
|
|
282
|
+
already meets or exceeds the width, fill contributes zero and normal ANSI-aware wrapping applies.
|
|
283
|
+
Unicode wide/combining symbols, palettes, `prev_fg`/`prev_bg`, ANSI, and OSC hyperlinks use Pi TUI
|
|
284
|
+
visible-width semantics. `$all` deliberately includes enabled fill, so use `$all` only when that
|
|
285
|
+
whole-catalog layout is intended. There is no `line_break` module; use literal newlines in `format`.
|
|
286
|
+
|
|
287
|
+
### π Cached refresh lifecycle
|
|
288
|
+
|
|
289
|
+
Workspace and Git readers start only in TUI sessions and only for reachable enabled modules. Root
|
|
290
|
+
format reachability, `$all`, module `disabled`, and module-format variables determine file and command
|
|
291
|
+
requirements. Refreshes run at session start, after accepted settings, branch changes, tool/turn
|
|
292
|
+
completion, and a 30-second fallback. One read runs with at most one latest pending refresh; immutable
|
|
293
|
+
snapshot equality suppresses redraws, and session/config generations reject stale results. Shutdown,
|
|
294
|
+
replacement, and footer disposal stop timers, clear pending work, and prevent late publication.
|
|
295
|
+
Execution identity is retained rather than re-read by the periodic fallback. Render and live preview
|
|
296
|
+
consume snapshots synchronously and perform zero reads or commands.
|
|
297
|
+
|
|
298
|
+
Missing, unreadable, malformed, oversized, timed-out, or unavailable sources fail to empty values.
|
|
299
|
+
Readers cap direct files at 64 KiB, use one bounded current-directory listing, never recurse, and make
|
|
300
|
+
no network calls. Package's explicitly documented Cargo lookup is the only ancestor walk and is capped
|
|
301
|
+
at eight parents.
|
|
302
|
+
|
|
143
303
|
## π¬ Commands
|
|
144
304
|
|
|
145
305
|
| Command | Purpose |
|
|
146
306
|
| --- | --- |
|
|
147
|
-
| `/starship
|
|
307
|
+
| `/starship` | Open the current-state menu in TUI mode; retain help behavior outside TUI |
|
|
308
|
+
| `/starship settings` | Open the compatible direct edit β preview β confirm flow (TUI only) |
|
|
148
309
|
| `/starship status` | Show config source/path and diagnostics |
|
|
149
310
|
| `/starship help` | Show command and configuration help |
|
|
150
311
|
|
|
151
|
-
|
|
312
|
+
The main menu keeps frequent goals visible: **Customize footer**, **Check configuration**, and **Help**. It shows whether the footer uses the built-in or custom document and displays the current warning count. **Advanced** contains uncommon details and the confirmed restore action, with an explicit **Back** path.
|
|
313
|
+
|
|
314
|
+
Status and help remain safe in TUI, RPC, JSON, and print modes. RPC receives notifications but never opens custom terminal UI; print and JSON modes produce no ad hoc output. Footer/timer/Git lifecycle work starts only in TUI mode.
|
|
152
315
|
|
|
153
316
|
## π Scope
|
|
154
317
|
|
|
155
|
-
The formatter
|
|
318
|
+
The formatter, style concepts, and selected contextual modules are Starship-inspired, while Pi owns
|
|
319
|
+
the lifecycle, snapshots, privacy boundary, and footer layout. This extension does not load
|
|
320
|
+
`starship.toml`, claim complete module/config compatibility, invoke the Starship binary, run custom
|
|
321
|
+
shell modules, or expose unrestricted `env_var` behavior. JVM/.NET, other long-tail languages,
|
|
322
|
+
alternative VCS, system-monitor, and additional DevOps modules remain demand-gated; the first-wave
|
|
323
|
+
review found no issue/discussion evidence for a coherent follow-up batch, so no second wave is added.
|
|
324
|
+
|
|
325
|
+
Pi-native model, context, cost, Git metrics, and activity remain owned by the existing modules. The
|
|
326
|
+
lifecycle design rejects provider-specific duplicates and ambiguous `turn_duration`/`last_result`
|
|
327
|
+
modules until separately approved semantics exist.
|
|
156
328
|
|
|
157
329
|
## β Adding a module
|
|
158
330
|
|
|
@@ -163,11 +335,13 @@ Keep `extension_status` last in the catalog so earlier modules can consume exten
|
|
|
163
335
|
## ποΈ Package layout
|
|
164
336
|
|
|
165
337
|
- `src/index.ts` β Pi package entrypoint.
|
|
166
|
-
- `src/pi-starship.ts` β extension lifecycle and footer.
|
|
167
|
-
- `src/
|
|
338
|
+
- `src/pi-starship.ts` β extension lifecycle, cached refresh binding, live preview, and footer.
|
|
339
|
+
- `src/commands.ts` β goal-oriented menu, preview/confirmation, diagnostics, and compatibility routes.
|
|
340
|
+
- `src/config.ts` β TOML loading, draft validation, defaults, atomic persistence, and rollback.
|
|
168
341
|
- `src/format/` β native format/style parser and renderer.
|
|
169
|
-
- `src/modules/` β module
|
|
170
|
-
- `src/modules/git/` β
|
|
342
|
+
- `src/modules/` β domain module definitions, ordered registry, reachability, and width-aware renderer.
|
|
343
|
+
- `src/modules/git/` β bounded Git reader plus branch, status, and worktree modules.
|
|
344
|
+
- `src/runtime/` β shared refresh controller and bounded package/language/context collectors.
|
|
171
345
|
|
|
172
346
|
## π Keywords
|
|
173
347
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-starship",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Native Starship-style TOML statusline for the Pi coding agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"typecheck": "tsc --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"smol-toml": "^1.7.0"
|
|
34
|
+
"smol-toml": "^1.7.0",
|
|
35
|
+
"yaml": "^2.9.0"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"@earendil-works/pi-coding-agent": "*",
|