4 Commits
Author SHA1 Message Date
Aleksey Shakhmatov 7804681356 test(api): add unit tests for Jira/Confluence/GitLab helpers, drop obsolete shell test 2026-08-06 14:43:20 +03:00
Aleksey Shakhmatov 035bededb0 feat(uninstall): one-command full uninstall with confirmation
- uninstall.sh: removes pi-kit from settings.json (string + gated object
  entries), the package clone, kit-installed public skills, ~/.config/pi-kit
  (env.sh with tokens, audit.jsonl) and the shell-rc sourcing block
- confirmation prompt by default; PI_KIT_UNINSTALL=1 for non-interactive,
  PI_KIT_KEEP_CONFIG=1 / PI_KIT_KEEP_SKILLS=1 to retain parts
- works without the pi binary (settings edited directly); notes how to
  remove pi itself
- tests: test/uninstall.test.sh against a throwaway $HOME (14 checks:
  full/partial removal, refusal without flag, idempotent re-run), wired
  into npm test
2026-08-06 11:45:50 +03:00
Aleksey Shakhmatov c068dfae0c fix(review): address review findings (guardrails, prompts, tests, docs)
- permission-gate: block refs/tags/v* pushes, rm -r -f separated flags,
  git reset --hard, git clean (verified against actual bypasses)
- prompts: /bugfix /feature /review no longer hardcode go-standards —
  reference profile-gated <lang>-standards instead
- company-context: drop hardcoded Go stack, note TRACKER_URL priority,
  warn on context truncation instead of silently dropping rules
- repo-map/docs-map: graceful degradation when config values are TODO
- /kit-doctor: warn on unfilled config fields (repoMap/trackerUrl/docsUrl)
- audit: retry POSTs to endpoint (3 attempts, backoff), still best-effort
- install.sh: remove TODO course URL from cheat sheet
- tests: expand guardrails (43 node checks), add shell tests for create-mr.sh
  (scp/https origin parse, GITLAB_HOST override, protected branch refusal),
  cover company-context lib (normalize/fetch/truncation) and mcp-bridge
- commit package-lock.json for reproducible installs
- document npm test Node >= 22.6 requirement (type stripping)
2026-08-06 11:22:53 +03:00
dev 7e50043984 feat(security): secret-scanner, commit-guard, llm-redaction, audit-log
- lib/secrets.ts: shared SECRET_PATTERNS + scanSecrets/redact (AWS/GitLab/GitHub/Slack tokens, private keys, JWT, generic credentials)
- lib/audit.ts: local JSONL audit (~/.config/pi-kit/audit.jsonl, 600), optional PI_KIT_AUDIT_URL POST; never logs secret values
- secret-scanner: block write/edit whose content matches a secret (complements protected-paths)
- commit-guard: enforce Conventional Commits on 'git commit -m' + scan message for secrets
- llm-redaction: redact secrets from outbound payload via before_provider_request
- audit-log: session_start + slash-command usage; wires company.json auditEndpoint into env
- config: auditEndpoint (null); package.json: npm test; test/guardrails.test.ts (16 cases, all pass)

Verified: all extensions load via pi (lib/ not loaded as extensions); npm test green.
2026-07-16 13:46:22 +03:00