prjct-cli 2.63.2 → 2.67.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/CHANGELOG.md +20 -2
- package/README.md +18 -21
- package/assets/statusline/components/limits.sh +66 -0
- package/assets/statusline/default-config.json +5 -1
- package/assets/statusline/lib/cache.sh +48 -2
- package/assets/statusline/lib/config.sh +10 -4
- package/assets/statusline/statusline.sh +1 -1
- package/dist/bin/prjct-core.mjs +413 -407
- package/dist/daemon/entry.mjs +341 -335
- package/dist/mcp/server.mjs +201 -195
- package/dist/templates.json +1 -1
- package/package.json +1 -1
- package/scripts/install.sh +3 -3
- package/templates/antigravity/SKILL.md +2 -2
- package/templates/crew/agents/implementer.md +1 -1
- package/templates/cursor/router.mdc +1 -1
- package/templates/global/ANTIGRAVITY.md +1 -1
- package/templates/global/CURSOR.mdc +1 -1
- package/templates/global/GEMINI.md +1 -1
- package/templates/global/STORAGE-SPEC.md +4 -5
- package/templates/global/WINDSURF.md +1 -1
- package/templates/mcp-config.json +2 -2
- package/templates/windsurf/router.md +1 -1
- package/templates/agentic/checklist-routing.md +0 -98
- package/templates/agentic/orchestrator.md +0 -68
- package/templates/agentic/task-fragmentation.md +0 -89
- package/templates/agents/AGENTS.md +0 -67
- package/templates/checklists/architecture.md +0 -28
- package/templates/checklists/code-quality.md +0 -28
- package/templates/checklists/data.md +0 -33
- package/templates/checklists/documentation.md +0 -33
- package/templates/checklists/infrastructure.md +0 -33
- package/templates/checklists/performance.md +0 -33
- package/templates/checklists/security.md +0 -33
- package/templates/checklists/testing.md +0 -33
- package/templates/checklists/ux-ui.md +0 -37
- package/templates/config/skill-mappings.json +0 -82
- package/templates/context/dashboard.md +0 -251
- package/templates/context/roadmap.md +0 -221
- package/templates/cursor/commands/ship.md +0 -6
- package/templates/cursor/commands/task.md +0 -6
- package/templates/cursor/p.md +0 -6
- package/templates/permissions/default.jsonc +0 -60
- package/templates/permissions/permissive.jsonc +0 -49
- package/templates/permissions/strict.jsonc +0 -58
- package/templates/skills/code-review.md +0 -47
- package/templates/skills/debug.md +0 -61
- package/templates/skills/refactor.md +0 -47
- package/templates/tools/bash.txt +0 -22
- package/templates/tools/edit.txt +0 -18
- package/templates/tools/glob.txt +0 -19
- package/templates/tools/grep.txt +0 -21
- package/templates/tools/read.txt +0 -14
- package/templates/tools/task.txt +0 -20
- package/templates/tools/webfetch.txt +0 -16
- package/templates/tools/websearch.txt +0 -18
- package/templates/tools/write.txt +0 -17
- package/templates/windsurf/workflows/ship.md +0 -6
- package/templates/windsurf/workflows/task.md +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,20 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [2.67.0] - 2026-06-23
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- eval benchmarks cloud
|
|
9
|
+
|
|
10
|
+
## [2.66.0] - 2026-06-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- cleanup command surfaces and dead templates
|
|
14
|
+
|
|
15
|
+
## [2.65.0] - 2026-06-23
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- setup-owned vault root with OS-aware defaults
|
|
19
|
+
|
|
20
|
+
## [2.64.0] - 2026-06-23
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- eval benchmarks cloud
|
|
24
|
+
|
|
5
25
|
## [2.63.2] - 2026-06-23
|
|
6
26
|
|
|
7
27
|
### Bug Fixes
|
|
8
28
|
|
|
9
29
|
- resolve Dependabot audit alerts
|
|
10
30
|
|
|
11
|
-
|
|
12
31
|
## [2.63.1] - 2026-06-23
|
|
13
32
|
|
|
14
33
|
### Bug Fixes
|
|
15
34
|
|
|
16
35
|
- harden prjct eval workflow inputs
|
|
17
36
|
|
|
18
|
-
|
|
19
37
|
## [2.63.0] - 2026-06-23
|
|
20
38
|
|
|
21
39
|
### Added
|
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ and locked-down CI, which closes the supply-chain surface a native rebuild opens
|
|
|
98
98
|
|
|
99
99
|
After install, **next session in any prjct-cli project**:
|
|
100
100
|
|
|
101
|
-
- **Lookup-first protocol**: Claude reads `~/Documents/prjct/<slug>/_generated/`
|
|
101
|
+
- **Lookup-first protocol**: Claude reads the configured vault snapshot (default: your OS Documents folder, e.g. `~/Documents/prjct/<slug>/_generated/` on macOS/Linux) BEFORE re-exploring source. Cuts ~10K tokens of exploration per session.
|
|
102
102
|
- **Auto-capture**: Stop hook scans the assistant transcript and persists durable insights (decisions/learnings/gotchas) tagged for dedup. The next session finds them in the vault.
|
|
103
103
|
- **Pattern detection**: Stop hook detects hot files (>3 changes in 7 days), recurring bugs (gotchas with the same topic), tech-debt growth (TODO/FIXME count rising). All persisted as learnings, surfaced next session.
|
|
104
104
|
- **5 quality workflows** activated by natural language ("review this branch", "qa the UI", "security check", "investigate this bug"):
|
|
@@ -111,7 +111,7 @@ After install, **next session in any prjct-cli project**:
|
|
|
111
111
|
|
|
112
112
|
## How it works
|
|
113
113
|
|
|
114
|
-
State lives in **SQLite** at `~/.prjct-cli/projects/<id>/`. The vault
|
|
114
|
+
State lives in **SQLite** at `~/.prjct-cli/projects/<id>/`. The vault is an auto-regenerated Markdown snapshot under the root configured by `prjct setup` (default: your OS Documents folder, e.g. `~/Documents/prjct/<slug>/_generated/` on macOS/Linux) — agent-readable via `Read`/`Glob`, browsable in Obsidian.
|
|
115
115
|
|
|
116
116
|
```
|
|
117
117
|
Claude Code session prjct-cli
|
|
@@ -143,11 +143,12 @@ Not "all in a local `.prjct/` folder" — that's the pre-v1.24.1 model. Three ti
|
|
|
143
143
|
|---|---|---|
|
|
144
144
|
| Config / identity | `<repo>/.prjct/prjct.config.json` (`projectId`, persona) | **Yes** — small, machine-independent |
|
|
145
145
|
| State (source of truth) | `~/.prjct-cli/projects/<projectId>/prjct.db` (SQLite) | No — per-device |
|
|
146
|
-
| Vault (recall snapshot) |
|
|
146
|
+
| Vault (recall snapshot) | `<vault-root>/<slug>/_generated/` (Markdown; `prjct setup --vault-root <path>`) | No — regenerated |
|
|
147
147
|
|
|
148
148
|
Find a project's data: read `projectId` from `.prjct/prjct.config.json`, then the
|
|
149
149
|
DB is `~/.prjct-cli/projects/<projectId>/`, the vault is
|
|
150
|
-
|
|
150
|
+
`<vault-root>/<slug>/` (`<slug>` = repo dir name lowercased; `prjct setup`
|
|
151
|
+
chooses the global vault root, defaulting to the OS Documents folder; `PRJCT_CLI_HOME`
|
|
151
152
|
relocates the global store). Teammates share knowledge via optional cloud sync
|
|
152
153
|
(`prjct login` + `prjct sync`), **not** git — git never carries state. Full
|
|
153
154
|
detail, worktrees, monorepos: **[docs/storage-and-paths.md](./docs/storage-and-paths.md)**.
|
|
@@ -181,20 +182,19 @@ read-only commands show whether the project is actually compounding:
|
|
|
181
182
|
### Version evals
|
|
182
183
|
|
|
183
184
|
Use `prjct eval` to measure product readiness between versions and publish the
|
|
184
|
-
evidence to
|
|
185
|
+
evidence to the prjct cloud benchmark API:
|
|
185
186
|
|
|
186
187
|
```bash
|
|
187
188
|
prjct eval run --candidate 2.62.0
|
|
188
189
|
prjct eval compare --baseline 2.61.0 --candidate 2.62.0 --md
|
|
189
|
-
prjct eval run --candidate "$GITHUB_SHA" --publish --target
|
|
190
|
-
prjct eval compare --baseline "$BASELINE" --candidate "$CANDIDATE" --publish --target
|
|
190
|
+
prjct eval run --candidate "$GITHUB_SHA" --publish --target cloud
|
|
191
|
+
prjct eval compare --baseline "$BASELINE" --candidate "$CANDIDATE" --publish --target cloud
|
|
191
192
|
```
|
|
192
193
|
|
|
193
|
-
Local artifacts live under `$PRJCT_CLI_HOME/evals/<repo>/`.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
[EVALS.md](./EVALS.md)
|
|
197
|
-
CI workflow.
|
|
194
|
+
Local artifacts live under `$PRJCT_CLI_HOME/evals/<repo>/`. Cloud publishing
|
|
195
|
+
requires `prjct login` and an active `prjct cloud link`, then sends the
|
|
196
|
+
benchmark payload to the prjct API with server-side ownership/subscription
|
|
197
|
+
checks. See [EVALS.md](./EVALS.md) for the full workflow.
|
|
198
198
|
|
|
199
199
|
| Command | What it proves |
|
|
200
200
|
|---|---|
|
|
@@ -260,7 +260,7 @@ p. status done # close the active task
|
|
|
260
260
|
p. ship # commit, push, open PR
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
-
Cursor
|
|
263
|
+
Cursor and Windsurf use their installed prjct router files; otherwise run `prjct <command> --md` and follow the output.
|
|
264
264
|
|
|
265
265
|
### Core verbs
|
|
266
266
|
|
|
@@ -277,7 +277,6 @@ Cursor / Windsurf use the same commands with a `/` prefix: `/capture`, `/task`,
|
|
|
277
277
|
| `prjct ship [name]` | Run the project's ship workflow (commit, push, PR, persist). |
|
|
278
278
|
| `prjct sync` | Re-index files, git co-change, imports; refresh project analysis. |
|
|
279
279
|
| `prjct regen` | Full rebuild of the Obsidian vault snapshot from SQLite. |
|
|
280
|
-
| `prjct suggest` | Smart recommendations based on current project state. |
|
|
281
280
|
| `prjct value` | Show whether prjct is paying for itself in this project. |
|
|
282
281
|
| `prjct memory-doctor` | Audit memory quality before noisy context spreads to every agent. |
|
|
283
282
|
| `prjct report [days]` | Generate a human report from shipped work and project memory. |
|
|
@@ -381,7 +380,7 @@ prjct capture "check why webhook retries on 502"
|
|
|
381
380
|
prjct context memory "auth refresh"
|
|
382
381
|
```
|
|
383
382
|
|
|
384
|
-
Memory is FTS5-backed (SQLite) and persona-filtered. Recall blends three signals — BM25 lexical, semantic vectors, and a usefulness ledger that reinforces what the project keeps building on. Capture **dedups** automatically: a verbatim re-capture of the same `(type, content)` is skipped, so detectors firing each session can't bloat the store. Every `remember`, `capture`, `ship`, and the SessionStart / Stop hooks regenerate the agent-readable markdown export at
|
|
383
|
+
Memory is FTS5-backed (SQLite) and persona-filtered. Recall blends three signals — BM25 lexical, semantic vectors, and a usefulness ledger that reinforces what the project keeps building on. Capture **dedups** automatically: a verbatim re-capture of the same `(type, content)` is skipped, so detectors firing each session can't bloat the store. Every `remember`, `capture`, `ship`, and the SessionStart / Stop hooks regenerate the agent-readable markdown export at `<vault-root>/<slug>/_generated/`.
|
|
385
384
|
|
|
386
385
|
> SQLite is the source of truth. The export is a snapshot — never hand-edit `_generated/`; if data is missing, fix the pipeline.
|
|
387
386
|
|
|
@@ -430,7 +429,7 @@ Without a key the built-in local embedder is used. Vector dimensionality is dete
|
|
|
430
429
|
|
|
431
430
|
### Drop files into the vault (bidirectional)
|
|
432
431
|
|
|
433
|
-
Drop a file into
|
|
432
|
+
Drop a file into `<vault-root>/<slug>/captured/` — it becomes memory, vectorized into the DB. Two shapes:
|
|
434
433
|
|
|
435
434
|
```markdown
|
|
436
435
|
---
|
|
@@ -531,9 +530,7 @@ $ prjct status done # close it when finished
|
|
|
531
530
|
$ prjct ship # bump version, commit, PR
|
|
532
531
|
```
|
|
533
532
|
|
|
534
|
-
Inside an agent you
|
|
535
|
-
refresh"` in Claude Code, `/task "…"` in Cursor/Windsurf. `prjct task` with no
|
|
536
|
-
argument prints the currently active task.
|
|
533
|
+
Inside an agent you can say it: `p. task "add OAuth refresh"` in Claude Code, or run `prjct task "…" --md` from any wired agent. `prjct task` with no argument prints the currently active task.
|
|
537
534
|
|
|
538
535
|
**How do I get AI assistance for a coding problem?**
|
|
539
536
|
Inside Claude Code (or any wired agent) describe the problem in natural
|
|
@@ -548,7 +545,7 @@ persisting findings to memory. Concrete examples:
|
|
|
548
545
|
| "qa the checkout page" | `qa` | Real browser, atomic fixes, regression tests |
|
|
549
546
|
|
|
550
547
|
You can also pull project knowledge directly: ask "what patterns does this
|
|
551
|
-
project use?" and the agent reads
|
|
548
|
+
project use?" and the agent reads `<vault-root>/<slug>/_generated/patterns.md`
|
|
552
549
|
instead of grepping source (the lookup-first protocol). Outside an agent, every
|
|
553
550
|
command takes `--md` to emit agent-ready markdown.
|
|
554
551
|
|
|
@@ -608,7 +605,7 @@ git check-ignore -v .prjct # why git ignores it
|
|
|
608
605
|
The path is always `<repoRoot>/.prjct/` (strictly relative to the project — no
|
|
609
606
|
env var, no global lookup). Read `projectId` from `prjct.config.json` to reach
|
|
610
607
|
the *other* tiers: DB at `~/.prjct-cli/projects/<projectId>/prjct.db`, vault at
|
|
611
|
-
|
|
608
|
+
`<vault-root>/<slug>/_generated/` (`prjct setup --vault-root <path>` configures the vault root; `PRJCT_CLI_HOME` overrides the global
|
|
612
609
|
base). The in-repo `.prjct/` holds only config, not state — full detail in
|
|
613
610
|
[docs/storage-and-paths.md](./docs/storage-and-paths.md).
|
|
614
611
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# prjct statusline - Usage limits component
|
|
3
|
+
# Displays Claude.ai 5-hour and weekly limit usage when Claude provides it.
|
|
4
|
+
|
|
5
|
+
limit_circle() {
|
|
6
|
+
local pct="$1"
|
|
7
|
+
if [[ ! "$pct" =~ ^[0-9]+$ ]]; then
|
|
8
|
+
echo ""
|
|
9
|
+
elif [[ "$pct" -ge 90 ]]; then
|
|
10
|
+
echo "●"
|
|
11
|
+
elif [[ "$pct" -ge 75 ]]; then
|
|
12
|
+
echo "◕"
|
|
13
|
+
elif [[ "$pct" -ge 50 ]]; then
|
|
14
|
+
echo "◑"
|
|
15
|
+
elif [[ "$pct" -ge 25 ]]; then
|
|
16
|
+
echo "◔"
|
|
17
|
+
else
|
|
18
|
+
echo "○"
|
|
19
|
+
fi
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
limit_color() {
|
|
23
|
+
local pct="$1"
|
|
24
|
+
if [[ ! "$pct" =~ ^[0-9]+$ ]]; then
|
|
25
|
+
echo "$MUTED"
|
|
26
|
+
elif [[ "$pct" -ge 90 ]]; then
|
|
27
|
+
echo "$ERROR"
|
|
28
|
+
elif [[ "$pct" -ge 75 ]]; then
|
|
29
|
+
echo "$WARNING"
|
|
30
|
+
else
|
|
31
|
+
echo "$MUTED"
|
|
32
|
+
fi
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
format_limit() {
|
|
36
|
+
local label="$1"
|
|
37
|
+
local pct="$2"
|
|
38
|
+
|
|
39
|
+
[[ -z "$pct" || "$pct" == "null" || ! "$pct" =~ ^[0-9]+$ ]] && return
|
|
40
|
+
|
|
41
|
+
local circle color
|
|
42
|
+
circle=$(limit_circle "$pct")
|
|
43
|
+
color=$(limit_color "$pct")
|
|
44
|
+
|
|
45
|
+
echo -e "${color}${circle} ${label} ${pct}%${NC}"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
component_limits() {
|
|
49
|
+
component_enabled "limits" || return
|
|
50
|
+
|
|
51
|
+
local parts=()
|
|
52
|
+
local five_hour weekly
|
|
53
|
+
|
|
54
|
+
five_hour=$(format_limit "5h" "$RATE_LIMIT_5H_PERCENT")
|
|
55
|
+
weekly=$(format_limit "7d" "$RATE_LIMIT_WEEKLY_PERCENT")
|
|
56
|
+
|
|
57
|
+
[[ -n "$five_hour" ]] && parts+=("$five_hour")
|
|
58
|
+
[[ -n "$weekly" ]] && parts+=("$weekly")
|
|
59
|
+
|
|
60
|
+
[[ ${#parts[@]} -eq 0 ]] && return
|
|
61
|
+
|
|
62
|
+
local old_ifs="$IFS"
|
|
63
|
+
IFS=" "
|
|
64
|
+
echo -e "${parts[*]}"
|
|
65
|
+
IFS="$old_ifs"
|
|
66
|
+
}
|
|
@@ -64,6 +64,43 @@ parse_stdin() {
|
|
|
64
64
|
# Single jq call to extract all values
|
|
65
65
|
local parsed
|
|
66
66
|
parsed=$(echo "$input" | jq -r '
|
|
67
|
+
def pct:
|
|
68
|
+
(.used_percentage // .usedPercent // .used_percent // .percent // empty);
|
|
69
|
+
def reset:
|
|
70
|
+
(.resets_at // .resetsAt // .reset_at // .resetAt // empty);
|
|
71
|
+
def key:
|
|
72
|
+
(.id // .name // .limit_name // .limitName // .window // .type // .label // "" | tostring | ascii_downcase);
|
|
73
|
+
def normpct:
|
|
74
|
+
if . == null or . == "" then "" else (tonumber | floor | tostring) end;
|
|
75
|
+
def five_hour_from($rl):
|
|
76
|
+
if ($rl | type) == "array" then
|
|
77
|
+
(($rl[]? | select((key | test("5|five|hour")) and ((key | test("week|7|day")) | not)) | pct) // "")
|
|
78
|
+
elif ($rl | type) == "object" then
|
|
79
|
+
(($rl.five_hour | pct) // ($rl.fiveHour | pct) // ($rl["5h"] | pct) // ($rl.primary | pct) //
|
|
80
|
+
($rl | to_entries[]? | select(((.key | ascii_downcase) | test("5|five|hour")) or ((.value | key) | test("5|five|hour"))) | .value | pct) // "")
|
|
81
|
+
else "" end;
|
|
82
|
+
def weekly_from($rl):
|
|
83
|
+
if ($rl | type) == "array" then
|
|
84
|
+
(($rl[]? | select(key | test("week|weekly|7|day")) | pct) // "")
|
|
85
|
+
elif ($rl | type) == "object" then
|
|
86
|
+
(($rl.weekly | pct) // ($rl.week | pct) // ($rl.seven_day | pct) // ($rl.sevenDay | pct) // ($rl["7d"] | pct) // ($rl.secondary | pct) //
|
|
87
|
+
($rl | to_entries[]? | select(((.key | ascii_downcase) | test("week|weekly|7|day")) or ((.value | key) | test("week|weekly|7|day"))) | .value | pct) // "")
|
|
88
|
+
else "" end;
|
|
89
|
+
def five_hour_reset_from($rl):
|
|
90
|
+
if ($rl | type) == "array" then
|
|
91
|
+
(($rl[]? | select((key | test("5|five|hour")) and ((key | test("week|7|day")) | not)) | reset) // "")
|
|
92
|
+
elif ($rl | type) == "object" then
|
|
93
|
+
(($rl.five_hour | reset) // ($rl.fiveHour | reset) // ($rl["5h"] | reset) // ($rl.primary | reset) //
|
|
94
|
+
($rl | to_entries[]? | select(((.key | ascii_downcase) | test("5|five|hour")) or ((.value | key) | test("5|five|hour"))) | .value | reset) // "")
|
|
95
|
+
else "" end;
|
|
96
|
+
def weekly_reset_from($rl):
|
|
97
|
+
if ($rl | type) == "array" then
|
|
98
|
+
(($rl[]? | select(key | test("week|weekly|7|day")) | reset) // "")
|
|
99
|
+
elif ($rl | type) == "object" then
|
|
100
|
+
(($rl.weekly | reset) // ($rl.week | reset) // ($rl.seven_day | reset) // ($rl.sevenDay | reset) // ($rl["7d"] | reset) // ($rl.secondary | reset) //
|
|
101
|
+
($rl | to_entries[]? | select(((.key | ascii_downcase) | test("week|weekly|7|day")) or ((.value | key) | test("week|weekly|7|day"))) | .value | reset) // "")
|
|
102
|
+
else "" end;
|
|
103
|
+
.rate_limits as $rl |
|
|
67
104
|
[
|
|
68
105
|
(.model.display_name // "Claude"),
|
|
69
106
|
(.workspace.current_dir // "~"),
|
|
@@ -72,13 +109,17 @@ parse_stdin() {
|
|
|
72
109
|
(.context_window.context_window_size // 200000),
|
|
73
110
|
(.context_window.current_usage.input_tokens // 0),
|
|
74
111
|
(.context_window.current_usage.cache_creation_input_tokens // 0),
|
|
75
|
-
(.context_window.current_usage.cache_read_input_tokens // 0)
|
|
112
|
+
(.context_window.current_usage.cache_read_input_tokens // 0),
|
|
113
|
+
(five_hour_from($rl) | normpct),
|
|
114
|
+
(five_hour_reset_from($rl) // ""),
|
|
115
|
+
(weekly_from($rl) | normpct),
|
|
116
|
+
(weekly_reset_from($rl) // "")
|
|
76
117
|
] | @tsv
|
|
77
118
|
' 2>/dev/null)
|
|
78
119
|
|
|
79
120
|
# Parse tab-separated values (save/restore IFS to avoid breaking associative arrays)
|
|
80
121
|
local old_ifs="$IFS"
|
|
81
|
-
IFS=$'\t' read -r MODEL CWD ADDED REMOVED CTX_SIZE INPUT_TOKENS CACHE_CREATE CACHE_READ <<< "$parsed"
|
|
122
|
+
IFS=$'\t' read -r MODEL CWD ADDED REMOVED CTX_SIZE INPUT_TOKENS CACHE_CREATE CACHE_READ RATE_LIMIT_5H_PERCENT RATE_LIMIT_5H_RESET RATE_LIMIT_WEEKLY_PERCENT RATE_LIMIT_WEEKLY_RESET <<< "$parsed"
|
|
82
123
|
IFS="$old_ifs"
|
|
83
124
|
|
|
84
125
|
# Set defaults if parsing failed
|
|
@@ -90,6 +131,10 @@ parse_stdin() {
|
|
|
90
131
|
INPUT_TOKENS="${INPUT_TOKENS:-0}"
|
|
91
132
|
CACHE_CREATE="${CACHE_CREATE:-0}"
|
|
92
133
|
CACHE_READ="${CACHE_READ:-0}"
|
|
134
|
+
RATE_LIMIT_5H_PERCENT="${RATE_LIMIT_5H_PERCENT:-}"
|
|
135
|
+
RATE_LIMIT_5H_RESET="${RATE_LIMIT_5H_RESET:-}"
|
|
136
|
+
RATE_LIMIT_WEEKLY_PERCENT="${RATE_LIMIT_WEEKLY_PERCENT:-}"
|
|
137
|
+
RATE_LIMIT_WEEKLY_RESET="${RATE_LIMIT_WEEKLY_RESET:-}"
|
|
93
138
|
|
|
94
139
|
# Calculate context percentage
|
|
95
140
|
TOTAL_USED=$((INPUT_TOKENS + CACHE_CREATE + CACHE_READ))
|
|
@@ -119,3 +164,4 @@ get_global_path() {
|
|
|
119
164
|
[[ -z "$project_id" ]] && return
|
|
120
165
|
echo "${HOME}/.prjct-cli/projects/${project_id}"
|
|
121
166
|
}
|
|
167
|
+
|
|
@@ -46,6 +46,7 @@ load_config() {
|
|
|
46
46
|
COMPONENT_ENABLED["git"]="true"
|
|
47
47
|
COMPONENT_ENABLED["changes"]="true"
|
|
48
48
|
COMPONENT_ENABLED["context"]="true"
|
|
49
|
+
COMPONENT_ENABLED["limits"]="true"
|
|
49
50
|
COMPONENT_ENABLED["model"]="true"
|
|
50
51
|
|
|
51
52
|
COMPONENT_POSITION["prjct_icon"]=0
|
|
@@ -56,7 +57,8 @@ load_config() {
|
|
|
56
57
|
COMPONENT_POSITION["git"]=4
|
|
57
58
|
COMPONENT_POSITION["changes"]=5
|
|
58
59
|
COMPONENT_POSITION["context"]=6
|
|
59
|
-
COMPONENT_POSITION["
|
|
60
|
+
COMPONENT_POSITION["limits"]=7
|
|
61
|
+
COMPONENT_POSITION["model"]=8
|
|
60
62
|
|
|
61
63
|
# Load config file if exists
|
|
62
64
|
[[ ! -f "$CONFIG_FILE" ]] && return
|
|
@@ -84,6 +86,7 @@ load_config() {
|
|
|
84
86
|
(if .components.git.enabled == null then true else .components.git.enabled end),
|
|
85
87
|
(if .components.changes.enabled == null then true else .components.changes.enabled end),
|
|
86
88
|
(if .components.context.enabled == null then true else .components.context.enabled end),
|
|
89
|
+
(if .components.limits.enabled == null then true else .components.limits.enabled end),
|
|
87
90
|
(if .components.model.enabled == null then false else .components.model.enabled end),
|
|
88
91
|
(if .components.enrichment.enabled == null then true else .components.enrichment.enabled end),
|
|
89
92
|
(.components.prjct_icon.position // 0),
|
|
@@ -94,7 +97,8 @@ load_config() {
|
|
|
94
97
|
(.components.git.position // 4),
|
|
95
98
|
(.components.changes.position // 5),
|
|
96
99
|
(.components.context.position // 6),
|
|
97
|
-
(.components.
|
|
100
|
+
(.components.limits.position // 7),
|
|
101
|
+
(.components.model.position // 8)
|
|
98
102
|
] | @tsv
|
|
99
103
|
' "$CONFIG_FILE" 2>/dev/null)
|
|
100
104
|
|
|
@@ -107,8 +111,8 @@ load_config() {
|
|
|
107
111
|
CONFIG_CACHE_TTL_PRJCT CONFIG_CACHE_TTL_GIT CONFIG_CACHE_TTL_LINEAR CONFIG_CACHE_TTL_JIRA \
|
|
108
112
|
CONFIG_TASK_MAX_LENGTH CONFIG_CONTEXT_MIN_PERCENT \
|
|
109
113
|
CONFIG_LINEAR_SHOW_PRIORITY CONFIG_JIRA_SHOW_PRIORITY CONFIG_JIRA_SHOW_STATUS \
|
|
110
|
-
E_PRJCT_ICON E_TASK E_LINEAR E_JIRA E_DIR E_GIT E_CHANGES E_CONTEXT E_MODEL E_ENRICHMENT \
|
|
111
|
-
P_PRJCT_ICON P_TASK P_LINEAR P_JIRA P_DIR P_GIT P_CHANGES P_CONTEXT P_MODEL \
|
|
114
|
+
E_PRJCT_ICON E_TASK E_LINEAR E_JIRA E_DIR E_GIT E_CHANGES E_CONTEXT E_LIMITS E_MODEL E_ENRICHMENT \
|
|
115
|
+
P_PRJCT_ICON P_TASK P_LINEAR P_JIRA P_DIR P_GIT P_CHANGES P_CONTEXT P_LIMITS P_MODEL \
|
|
112
116
|
<<< "$config_data"
|
|
113
117
|
IFS="$old_ifs"
|
|
114
118
|
|
|
@@ -121,6 +125,7 @@ load_config() {
|
|
|
121
125
|
COMPONENT_ENABLED["git"]="$E_GIT"
|
|
122
126
|
COMPONENT_ENABLED["changes"]="$E_CHANGES"
|
|
123
127
|
COMPONENT_ENABLED["context"]="$E_CONTEXT"
|
|
128
|
+
COMPONENT_ENABLED["limits"]="$E_LIMITS"
|
|
124
129
|
COMPONENT_ENABLED["model"]="$E_MODEL"
|
|
125
130
|
|
|
126
131
|
# Set component positions
|
|
@@ -132,6 +137,7 @@ load_config() {
|
|
|
132
137
|
COMPONENT_POSITION["git"]="$P_GIT"
|
|
133
138
|
COMPONENT_POSITION["changes"]="$P_CHANGES"
|
|
134
139
|
COMPONENT_POSITION["context"]="$P_CONTEXT"
|
|
140
|
+
COMPONENT_POSITION["limits"]="$P_LIMITS"
|
|
135
141
|
COMPONENT_POSITION["model"]="$P_MODEL"
|
|
136
142
|
|
|
137
143
|
# Update linear/jira enabled based on component config
|
|
@@ -25,7 +25,7 @@ STATUSLINE_DIR="${HOME}/.prjct-cli/statusline"
|
|
|
25
25
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
26
26
|
|
|
27
27
|
# Use installed location or script location for libs/components
|
|
28
|
-
if [[ -
|
|
28
|
+
if [[ -f "${STATUSLINE_DIR}/lib/cache.sh" && -f "${STATUSLINE_DIR}/lib/theme.sh" && -f "${STATUSLINE_DIR}/lib/config.sh" ]]; then
|
|
29
29
|
LIB_DIR="${STATUSLINE_DIR}/lib"
|
|
30
30
|
COMPONENTS_DIR="${STATUSLINE_DIR}/components"
|
|
31
31
|
else
|