Commit Graph
9 Commits
Author SHA1 Message Date
SikongJueluo 80108d3a7c fix(ai-judge): truncate advice widget with visible-width awareness
- delegate widget line truncation to pi-tui truncateToWidth so ANSI
  styling and double-width CJK reasons count visible cells only
- replace the code-point clamp that crashed the TUI when a Chinese
  reason rendered wider than the terminal
- add @earendil-works/pi-tui peer and dev dependencies
- cover CJK reasons at several terminal widths in tests
2026-09-18 00:02:17 +08:00
SikongJueluo 962d90dec8 chore(ai-judge): release 0.1.0
- bump version from 0.0.1 to 0.1.0 to ship the dialog advice widget
2026-09-17 23:58:30 +08:00
SikongJueluo ff947425eb build(packages): prepare both packages for standalone npm publishing
- unify dependency strategy: @gotgenes/pi-permission-system moves from
  dependencies+bundledDependencies (inner-cmd) to peerDependencies in both
  packages, so git/npm consumption share a single service instance
- add description/license/author/repository(directory)/publishConfig/files
- copy GPL-3.0 LICENSE into both packages, add inner-cmd README
- ai-judge: ship models-catalog.json; exclude test/tools/reports from tarball
- README install sections now show npm source (prereq aligned to >=32)
2026-09-17 15:47:14 +08:00
SikongJueluo c0585a1740 fix(deps): adapt to pi-permission-system 32 session-keyed services
- resolve the permissions service by the live session id in both
  tryRegister paths, so a mid-session republish re-keys via the re-emitted
  permissions:ready channel
- read the session probe instead of the start-time snapshot for inner-cmd
- pass the session key to publish/unpublishPermissionsService in tests and
  drop the removed PromptPermissionDetails.message field
- raise the ai-judge peer floor to @gotgenes/pi-permission-system >=32.0.0
- bump dev deps: pi-coding-agent 0.85.1, vitest 5, typescript 7
2026-09-16 20:57:55 +08:00
SikongJueluo c479f51469 refactor(ai-judge): split remaining hotspots and cover CRAP branches
- stage-ify judgeAuthorize into auditEnrollment, runPreflightGates, prepareModelCall, and enforceAndEmit
- extract tallyJoinedRows and tallyAttributable from computeMetrics, removing three dead locals
- extract validateVerdictResponse from requestStructuredVerdict
- extract collectUserTexts and charBudgetStart from buildConversationEvidence
- table-drive corpus-replay parseArgs and split main into resolveReplayModel, selectCorpusCases, and replayCorpus
- split analyzer cli main into loadReviewEvents, withinWindow, loadAuditEnrolled, and printReport with a run-as-script guard
- add 81 tests covering parseEntry, extractBashCommandEvidence, validateVerdictResponse, forcedToolChoice, classifyGit dry-run paths, CLI arg/window/report rendering, and the infra-failure result path
- add @vitest/coverage-istanbul for exact per-function CRAP scoring via fallow health --coverage
2026-08-22 01:24:50 +08:00
SikongJueluo 0a1b9f259d build: align permission-system to 25.4 2026-08-17 19:20:49 +08:00
SikongJueluo 1afcbd3118 refactor(permission): consume structured bash payload
- require @gotgenes/pi-permission-system >=25.3.0 and read the complete local bash command from PromptPermissionDetails.payload instead of session-walking recovery
- remove the @sikongjueluo/pi-permission-shared package
- pass the triggering command unit to handlers via HandlerContext.unit in place of details.command
- add shadow-only AI judge modules for evidence projection, structured verdict requests, and prompt building, with vitest coverage
- record ADR 0004 and mark the ADR 0001 recovery mechanism superseded
- exclude pi-permission-system 25.3.0 from the pnpm minimumReleaseAge guard
2026-08-16 23:08:45 +08:00
SikongJueluo 2014e7f793 refactor(pi-permission): extract shared bash-recovery package
- add @sikongjueluo/pi-permission-shared with recoverNativeBashCommand and its tests
- move the recovery module out of pi-permission-inner-cmd and import it from the shared package
- wire pi-permission-ai-judge to capture the UI-root session and recover the full bash command
- gate pi-permission-ai-judge registration on a UI-present root session
- add @types/node to pi-permission-ai-judge and allow its test script to pass with no tests
2026-08-11 21:53:46 +08:00
SikongJueluo f62a073de7 feat(pi-permission-ai-judge): add deferring authorizer extension
- add pnpm workspace scaffold with shared TypeScript config
- register an ai-bash-judge authorizer with pi-permission-system
- log permission request details and deterministic policy verdicts
- record review entries and defer to the next authorizer
2026-08-08 19:43:21 +08:00