944 Commits

Author SHA1 Message Date
William Valentin 8818c326b7 fix(audit): clarify missing drift artifacts-dir errors
Replace raw ENOENT from drift artifact directory scans with a clear explicit error message containing the resolved path. Architecture/protocol diagrams reviewed; no updates needed.
2026-02-27 13:30:56 -08:00
William Valentin 576b11106f fix(audit): expand home paths across phase0 CLI scripts
Apply HOME-based ~ expansion to summarize/drift/prune audit scripts for input/output path flags to match capture behavior and avoid literal ~/ path bugs. Architecture/protocol diagrams reviewed; no updates needed for this path-resolution change.
2026-02-27 13:30:08 -08:00
William Valentin c91262ac30 fix(audit): tolerate missing phase0 artifact dir in prune
Treat missing artifacts dir as empty input for prune planning/apply workflows on fresh hosts; keep report output behavior intact. Architecture/protocol diagrams reviewed; no updates needed for this script robustness change.
2026-02-27 13:28:40 -08:00
William Valentin bfa857f074 fix(audit): dedupe repeated backend CLI selections
Normalize repeated --backend values in phase0 capture/drift scripts so backend lists are unique and deterministic. Architecture/protocol diagrams reviewed; no updates needed for this parsing-only change.
2026-02-27 13:27:35 -08:00
William Valentin 940402729b test(audit): lock drift reaction-threshold script wiring
Assert package drift and rolling commands keep reaction match/skip threshold flags in default cadence wiring. Architecture/protocol diagrams reviewed; no updates needed for test-only coverage.
2026-02-27 13:26:25 -08:00
William Valentin 5b9bcbafee fix(audit): validate phase0 artifact tag inputs
Add shared artifact-tag normalization/validation and apply it to capture, drift, and prune scripts for --tag/--report-tag/--baseline-tag paths. Architecture diagrams reviewed; no flow changes required.
2026-02-27 13:25:35 -08:00
William Valentin 98f954de0d feat(audit): add reaction-rate drift gate thresholds
Add optional reaction match-drop and skip-increase drift thresholds, expose CLI flags, and enable conservative defaults in cadence package scripts. Includes tests and docs/state sync.
2026-02-27 13:23:28 -08:00
William Valentin 0decf34760 fix(audit): require integer gateway window padding
Enforce non-negative integer padding_ms/--window-padding-ms across gateway window helper and live baseline capture CLI, with regression coverage for invalid values. Architecture/protocol diagrams reviewed; no updates were needed for this validation-only change.
2026-02-27 13:18:37 -08:00
William Valentin bf79f734f1 fix(audit): require integer drift minimum sample thresholds
Enforce non-negative integer minCandidateSampledEvents/minBaselineSampledEvents in drift gate evaluation and CLI parsing; add regression coverage. Architecture/protocol diagrams reviewed and no updates were needed for this validation-only change.
2026-02-27 13:16:00 -08:00
William Valentin a4794ddea8 fix(audit): require integer phase0 summary row limits
Require non-negative integer maxSessions/maxChannels/maxSkipReasons in summary core and both phase0 summary/capture CLIs to prevent silent flooring of fractional values. Architecture/protocol diagrams reviewed; no flow or API shape changes required.
2026-02-27 13:14:24 -08:00
William Valentin 06998ac65d fix(audit): require integer rolling retention keep limits
Validate keepPerFamily/--keep-per-family as non-negative integers, remove silent flooring, add regression coverage, and sync runbook/docs wording.
2026-02-27 13:11:31 -08:00
William Valentin c68fd2498e fix(audit): enforce phase0 summary max-limit semantics
Validate maxSessions/maxChannels/maxSkipReasons as non-negative finite values, make 0 produce zero rows, and add regression coverage. No architecture/protocol flow changes; diagram files reviewed and no updates were needed.
2026-02-27 13:08:37 -08:00
William Valentin fd0ab6e6df fix(audit): validate non-negative drift thresholds
Reject negative phase0 drift gate thresholds with explicit parameter names and add regression tests. No architecture/protocol flow changes; diagram files reviewed and no updates were needed.
2026-02-27 13:06:52 -08:00
William Valentin ad395bbdd6 fix(audit): reject malformed rolling artifact tags
Harden phase0 rolling retention timestamp parsing with explicit bounds and UTC round-trip validation; add regression coverage for invalid date/time tags. No architecture/protocol flow changes; diagram files reviewed and no updates were needed.
2026-02-27 13:04:27 -08:00
William Valentin 49a5a44c8a feat(auth): add Anthropic OAuth support and deferred credential loading
- Read Claude Code's OAuth token from ~/.claude/.credentials.json as
  a fallback source for auth_mode: oauth (with expiry checking)
- Fix OAuth callback server to bind to localhost (not 127.0.0.1) and
  use JSON content type for token exchange
- Null out apiKey when authToken is set to prevent SDK from falling
  back to ANTHROPIC_API_KEY env var (routes to wrong billing)
- Add DeferredErrorClient so daemon starts even when credentials are
  missing, surfacing the error on first chat() call instead of crash
- Prompt to complete OAuth flow immediately when setting auth_mode to
  oauth with no token stored

Note: Anthropic currently rejects OAuth for API access (Feb 2026
policy change), but the plumbing is in place for if/when re-enabled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 13:03:01 -08:00
William Valentin 487e5c2930 test(audit): lock phase0 rolling script TAG wiring
Add regression tests that verify rolling and rolling:prune scripts keep shared overridable TAG semantics and tagged prune reports. No architecture/protocol flow changes; diagram files reviewed and no updates were needed.
2026-02-27 12:21:18 -08:00
William Valentin 2610b6973d fix(audit): honor TAG override in rolling prune script
No architecture/protocol flow changes; diagram files reviewed and no updates were needed for this package-script wiring fix.
2026-02-27 12:17:48 -08:00
William Valentin 0c7d2b9190 chore(audit): dedupe rolling cadence script wiring 2026-02-27 11:35:26 -08:00
William Valentin c2c9b2af66 fix(auth): make OAuth device flow polling cancellable via Ctrl+C
Add AbortSignal support to pollForToken (GitHub) and pollDeviceToken
(OpenAI) using an abortable sleep that clears its timer immediately on
abort. Wire an AbortController into the TUI login handlers, triggered
by the readline SIGINT event, so Ctrl+C exits the wait loop cleanly
instead of hanging until the device code expires.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 11:30:50 -08:00
William Valentin 7988d662e8 feat(audit): retain rolling phase0 prune reports 2026-02-27 10:57:00 -08:00
William Valentin 6e7a0aa37f feat(audit): add prune reports to rolling cadence flow 2026-02-27 10:48:49 -08:00
William Valentin 658f024eb8 chore(makefile): separate build, install, and service restart targets
Remove implicit pnpm build from daemon-start and daemon-restart so
restarting the service doesn't trigger a rebuild. Add a deploy target
that explicitly chains build + daemon-restart for the combined workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 10:45:02 -08:00
William Valentin 90ef075295 feat(audit): chain rolling cadence with auto-prune apply 2026-02-27 10:41:01 -08:00
William Valentin 134fa60af1 feat(audit): add rolling phase0 artifact retention tooling 2026-02-27 10:20:14 -08:00
William Valentin 149adb1c85 feat(audit): add rolling timestamped phase0 refresh cadence 2026-02-27 10:00:45 -08:00
William Valentin 55f1a3dd7b feat(audit): refresh all phase0 live windows in cadence run 2026-02-27 09:36:22 -08:00
William Valentin e905fe1d56 feat(audit): persist phase0 backend drift report artifacts 2026-02-27 09:05:25 -08:00
William Valentin 20224f1601 feat(audit): add phase0 backend drift and freshness gates 2026-02-27 09:01:43 -08:00
William Valentin 68cdc2cf8b feat(audit): add backend-scoped phase0 live baseline capture 2026-02-27 08:47:31 -08:00
William Valentin a97cc9dc95 docs(prompt): tighten TOOLS.md tool-use rules
Replace vague "use tools immediately" imperative with precise rules:
add explicit no-tools-available clause to prevent fabrication on
tool-less backends, simplify the Operational Response Contract into
principles, and remove the redundant Autonomy Guardrail section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:42:34 -08:00
William Valentin 4880d757c5 docs(audit): add phase0 baseline cadence scheduling runbook 2026-02-27 00:43:37 -08:00
William Valentin 826df1d35b feat(audit): automate gateway phase0 live-window capture 2026-02-26 23:56:30 -08:00
William Valentin 5a34e986bf docs(observability): capture gateway-origin phase0 live baseline window 2026-02-26 23:50:28 -08:00
William Valentin 4b07a1f166 feat(audit): replace probe baseline workflow with live anonymized capture 2026-02-26 23:41:13 -08:00
William Valentin c96aca5f1d chore(companion): enforce reference-app generator sync in CI 2026-02-26 21:00:28 -08:00
William Valentin 820af97859 fix(companion): make reference-app exports reproducible by default
No diagram change needed: this change only makes generated reference-app timestamps deterministic and adds an override flag.
2026-02-26 20:58:31 -08:00
William Valentin 078c3799ce feat(companion): add mobile runtime skeleton shell templates 2026-02-26 20:56:43 -08:00
William Valentin d303869866 feat(companion): add runnable macOS menu-bar reference app scaffold 2026-02-26 20:51:00 -08:00
William Valentin 3f6232d1fb docs(plan): mark personal-assistant productization roadmap complete 2026-02-26 19:41:35 -08:00
William Valentin 30cf5c5ea6 ci(companion): add bundle build-verify-upload workflow 2026-02-26 19:40:53 -08:00
William Valentin 90b6d94a81 feat(companion): emit release manifest metadata in bundles 2026-02-26 19:39:11 -08:00
William Valentin be8b1f29a4 feat(companion): add generated macos ios android reference app surfaces 2026-02-26 19:37:28 -08:00
William Valentin 3839c04a7d feat(companion): add build-and-verify bundle automation pipeline 2026-02-26 19:35:02 -08:00
William Valentin ad2f7b7d04 feat(companion): enforce checksum verification in generated launcher 2026-02-26 19:32:42 -08:00
William Valentin 995166fbbc feat(companion): add release bundle verification mode 2026-02-26 19:31:24 -08:00
William Valentin 5618ca1fc5 feat(companion): add optional signing for release bundle artifacts 2026-02-26 19:05:41 -08:00
William Valentin 5df8ece040 feat(companion): export platform shell templates for app starters 2026-02-26 19:03:22 -08:00
William Valentin f10c896a75 docs(companion): add release bundle install and verification runbook 2026-02-26 19:00:46 -08:00
William Valentin bbec292434 feat(companion): include checksums in release bundle artifacts 2026-02-26 18:59:44 -08:00
William Valentin 484247e1c1 feat(companion): export release bundle artifacts for shell packaging 2026-02-26 18:58:21 -08:00