pi-goal-pro 1.1.1 → 1.2.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 CHANGED
@@ -5,7 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [1.2.0] - 2026-06-11
9
+
10
+ ### Added
11
+ - `.claude/CLAUDE.md` — agent instructions with git workflow and code style guide
12
+ - `.pi/prompts/commit.md` — AI prompt template for conventional commit messages
13
+ - `.pi/prompts/review.md` — AI prompt template for code review with checklist
14
+ - `VERSION` file — single source of truth for version number
15
+ - `.gitattributes` — consistent line endings (LF) and diff settings
16
+ - `.githooks/pre-commit` — Biome check on staged files before each commit
17
+ - `.githooks/commit-msg` — Enforce conventional commit format on each commit
18
+ - `prepare` script — auto-configures git hooks path on `npm install`
19
+ - `typecheck` script — `tsc --noEmit` for TypeScript validation
20
+ - `check:all` script — runs both Biome check and typecheck
21
+ - `lint-staged` config in package.json for pre-commit checks
22
+
23
+ ### Changed
24
+ - **CI workflow**: renamed from `test.yml`, now with `concurrency` group and `cancel-in-progress: true`
25
+ - **CI split into two jobs**: `quality` (lint + typecheck) and `test` (unit tests on matrix)
26
+ - **CI matrix**: expanded to `os: [ubuntu-latest, macos-latest]` × `node: [20, 22]`
27
+ - **release.yml**: added tag-version verification, pre-release npm tag detection, `make_latest: true`
28
+ - `test:all` script now runs `check:all` (lint + format + typecheck) before tests
29
+ - README CI badge fixed to point to `test.yml` instead of non-existent `ci.yml`
30
+ - `.gitignore` expanded: added IDE files, logs, `.tgz`, coverage, `ideal-git-workflow.md`
31
+ - Fixed TypeScript `typeof theme` scoping error in index.ts
9
32
 
10
33
  ## [1.1.1] - 2026-06-11
11
34
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  <p align="center">
3
3
  <img src="https://img.shields.io/badge/pi-extension-8B5CF6?style=flat-square&logo=pi-hole&logoColor=white" alt="pi extension">
4
4
  <img src="https://img.shields.io/npm/v/pi-goal-pro?style=flat-square&color=cb3837" alt="npm">
5
- <img src="https://img.shields.io/github/actions/workflow/status/izzzzzi/pi-goal-pro/ci.yml?style=flat-square&branch=main" alt="CI">
5
+ <img src="https://img.shields.io/github/actions/workflow/status/izzzzzi/pi-goal-pro/test.yml?style=flat-square&branch=main" alt="CI">
6
6
  <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT">
7
7
  </p>
8
8
 
package/index.ts CHANGED
@@ -691,27 +691,27 @@ Do not call update_goal unless the goal is actually complete.`;
691
691
 
692
692
  // ── Message renderer for goal events ───────────────────────────────
693
693
 
694
- const GOAL_KIND_LABELS: Record<string, (th: typeof theme) => string> = {
695
- active: (th) => th.fg('accent', 'active'),
696
- continuation: (th) => th.fg('muted', 'continuing'),
697
- paused: (th) => th.fg('warning', 'paused'),
698
- resumed: (th) => th.fg('accent', 'resumed'),
699
- cleared: (th) => th.fg('dim', 'cleared'),
700
- budget_limited: (th) => th.fg('warning', 'budget'),
701
- complete: (th) => th.fg('success', 'achieved'),
702
- unmet: (th) => th.fg('error', 'unmet'),
703
- };
704
-
705
694
  pi.registerMessageRenderer(`${GOAL_STORAGE_TYPE}:event`, (message, options, theme) => {
706
695
  const details = message.details as GoalEvent | undefined;
707
696
  const kind = details?.kind ?? 'continuation';
708
697
  const state = details?.goal ?? null;
709
698
 
699
+ const goalKindLabels: Record<string, (th: typeof theme) => string> = {
700
+ active: (th) => th.fg('accent', 'active'),
701
+ continuation: (th) => th.fg('muted', 'continuing'),
702
+ paused: (th) => th.fg('warning', 'paused'),
703
+ resumed: (th) => th.fg('accent', 'resumed'),
704
+ cleared: (th) => th.fg('dim', 'cleared'),
705
+ budget_limited: (th) => th.fg('warning', 'budget'),
706
+ complete: (th) => th.fg('success', 'achieved'),
707
+ unmet: (th) => th.fg('error', 'unmet'),
708
+ };
709
+
710
710
  const renderGoalEvent = (_width: number): string[] => {
711
711
  const lines: string[] = [];
712
712
  const isExpanded = options.expanded;
713
713
  const prefix = theme.fg('accent', theme.bold('Goal'));
714
- const kindLabel = (GOAL_KIND_LABELS[kind] ?? ((th: typeof theme) => th.fg('text', kind)))(theme);
714
+ const kindLabel = (goalKindLabels[kind] ?? ((th: typeof theme) => th.fg('text', kind)))(theme);
715
715
  const statusText = theme.fg('dim', isExpanded ? '' : '(ctrl+o to expand)');
716
716
 
717
717
  lines.push(`${prefix} ${kindLabel} ${!isExpanded ? statusText : ''}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-pro",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Persistent autonomous goals for Pi — with no-progress detection, evidence-based completion, token budgets, and auto-continuation",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -57,10 +57,17 @@
57
57
  "scripts": {
58
58
  "test": "npm run test:unit",
59
59
  "test:unit": "tsx --test tests/index.test.ts",
60
- "test:all": "npm run lint && npm run test:unit",
60
+ "test:all": "npm run check:all && npm run test:unit",
61
61
  "lint": "biome lint .",
62
62
  "check": "biome check .",
63
+ "check:all": "npm run check && npm run typecheck",
64
+ "typecheck": "tsc --noEmit",
63
65
  "format": "biome format --write .",
66
+ "prepare": "git config core.hooksPath .githooks",
64
67
  "dev": "pi -e ./index.ts"
68
+ },
69
+ "lint-staged": {
70
+ "*.{ts,tsx}": ["npx @biomejs/biome check --write", "npx tsc --noEmit --pretty"],
71
+ "*.{json,md,yaml}": ["npx @biomejs/biome format --write"]
65
72
  }
66
73
  }