feat: QQQ Assistant qbit phase 0/1 (read-only Q&A, SSE, Anthropic provider) #1

Merged
KofTwentyTwo merged 7 commits from feature/phase-0-1-assistant into develop 2026-10-12 17:28:10 +00:00
7 Commits
Author SHA1 Message Date
james.maesandClaude Opus 5.5 5ea804d53f ci: rebuild now that QQQ 4.1.0-RC.4 is on Maven Central
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:25:29 -05:00
james.maesandClaude Opus 5.5 913a8af6ce build: build against QQQ 4.1.0-RC.4
RC.3 has neither the AI tool kernel (actions.ai, QRun-IO/qqq#1078) nor the
developer panel contract (model.developer, QRun-IO/qqq#1076), so CI could not
compile the qbit. Both are in 4.1.0-RC.4. Verified locally against a
4.1.0-SNAPSHOT core with both merged: mvn verify passes (60 + 7 tests).

CI goes green once 4.1.0-RC.4 is on Maven Central.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:13:20 -05:00
james.maesandClaude Opus 5.5 5508f4619d fix(security): hide the Assistant Admin app and tables from non-admins in meta-data
adminRules() set only the custom checker. The enricher then copied the host's
default level (NOT_PROTECTED on kof22) into it, and PermissionsHelper's
meta-data path returns ALLOW for NOT_PROTECTED without calling the checker,
so every user saw the Assistant Admin app, its tables and the retention
process in the nav (actions on them were still denied). The rules are now
HAS_ACCESS_PERMISSION with deny behavior HIDDEN, plus the checker.

Found while adopting the QBit in kof22 Website-Backend. Regression test runs
on an enriched NOT_PROTECTED host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:13:00 -05:00
james.maesandClaude Opus 5.5 a1400d6f05 feat: publish assistant frontend settings for the v1 metaData probe
AssistantInstanceMetaData exposes getFrontendSettings() ({version, basePath}),
which the v1 middleware (QRun-IO/qqq#1078) publishes as
supplementalInstanceMetaData.assistant next to available=true. The probe
test now runs end to end. README: allowedWidgetNames is the only widget
opt-in (core widget meta-data has no supplemental hook).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 07:52:46 -05:00
james.maesandClaude Opus 5.5 ae01f32006 fix: security review follow-ups (orphans, retention, usage, kill switch, limits)
- Kernel settings from config: allowedWidgetNames (kernel default-deny),
  hiddenWidgetNames, customRedactionPatterns.
- Orphaned RUNNING turns of a dead replica are finished as ERROR on first
  sight (replay, cancel, delete, new turn) with persisted error(INTERNAL) +
  message.end; replay is paged (500) and capped at maxTurnSeconds + 60 s.
- Retention: tool-result cutoff also deletes turn events and strips render
  payloads / record refs from stored message parts.
- addUsage: per-key locks, unique key (scope, userId, usageDate), insert-race
  retry; partial usage of cancelled / timed-out / failed calls is counted.
- Kill switch fails closed; a per-turn watcher cancels running turns when it
  flips.
- Page-context scalars capped (512 chars, 100 ids); list limits for
  conversations and running turns.
- Terminal events persisted before the turn status becomes final.
- "assistant" supplemental instance meta-data for the Next probe gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 07:14:25 -05:00
james.maesandClaude Opus 5.5 e95fb90228 feat: red team, golden evals, developer panel, docs and CI
- ArchUnit rules: no system session, no QSession construction, data actions
  only in the persistence package.
- Permission red team (build gate): no-permission denial without leaks,
  other users' conversations, kill switch mid-turn, hard budget, hidden and
  password sentinels never sent, enveloped tool results, no thinking in SSE,
  cancel stops pending tools.
- Golden evals v1 (scripted faithful model) incl. example D and the read
  half of example A, plus an opt-in live run against Claude.
- Record Developer screen Assistant panel on the core developer-panel
  contract (QRun-IO/qqq#1076) fed by AiToolKernel.describeAccess, with the
  ask-the-assistant deep link.
- README, CLAUDE.md, CHANGELOG, reference DDL, CircleCI (qqq-orb 0.6.8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 06:27:58 -05:00
james.maesandClaude Opus 5.5 003c66e14f feat: assistant qbit skeleton - config, tables, provider SPI, turn engine, SSE routes, Anthropic provider
Multi-module build (qbit-assistant, qbit-assistant-provider-anthropic) on
qbit-build-parent 2.0.0 with the qqq-snapshot BOM profile. Standard visible
assistant* tables with owner record locks, provider-neutral model SPI with a
scripted provider, turn engine on the core AiToolKernel, /qqq/v1/assistant
routes with SSE, and the Anthropic adapter with recorded-stream tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 06:10:59 -05:00