WIP: feat: write mode (Read-only by default), preferences via core Preferences, auto-confirm rules (W1; DRAFT until QQQ RC.8) #21

Draft
KofTwentyTwo wants to merge 2 commits from feature/write-mode into develop
pull from: feature/write-mode
KofTwentyTwo commented 2026-10-13 21:27:14 +00:00 (Migrated from github.com)

This is the W1 write mode, reworked onto develop (#19 spec'd endpoints on UiApiInvoker, P-a through P-g, presentation, bulk-load, X1/Y1). Closes #29 (architecture review QRun-IO/qqq#1150 F13).

DRAFT until QQQ 4.1.0-RC.8. The root pom pins RC.8 because core Preferences (QRun-IO/qqq#1162) are not in a release yet. Against a local build of QQQ develop it passes: ./mvnw verify -Dqqq.snapshot.version=4.1.0-PREFS-SNAPSHOT gives 361 tests, 1 skipped (Docker only), with the gates met. CI cannot resolve RC.8 until it is published.

Write mode

  • Each conversation is Read-only or Write. Read-only is the default. In Read-only mode the write tools are absent from the request.
  • Write mode is controlled by the policy (write_mode_allowed, write_mode_permission) and by per-table READ_WRITE data access.
  • Auto-confirm needs both auto_confirm_allowed and the table's auto_confirm_ok, and covers only single-record inserts and updates. Every other write is a confirmed pending action.
  • Scheduled tasks use write tools only when the per-task admin approval is set and the policy allows write mode.
  • Bulk-load writes follow the same mode gating.
  • The denial matrix runs in both modes.

Preferences through core

  • The bespoke /assistant/preferences endpoints are removed.
  • The per-user settings are now core Preferences section assistant at /qqq/v1/preferences/assistant. It holds the write-mode default and auto-confirm for low-risk changes, which is read-only when the policy disallows it.
  • AssistantPreferencesProvider stores them in assistant_user_preference, a standard visible table. It writes only the signed-in user's own row and validates against the policy.
  • The section is denied to the assistant channel, since it is configuration.
  • /assistant/config still returns the effective defaults for the panel toggle.
  • UPGRADE.md maps the old endpoints to the new ones.

🤖 Generated with Claude Code

This is the W1 write mode, reworked onto `develop` (#19 spec'd endpoints on `UiApiInvoker`, P-a through P-g, presentation, bulk-load, X1/Y1). Closes #29 (architecture review QRun-IO/qqq#1150 F13). **DRAFT until QQQ 4.1.0-RC.8.** The root pom pins RC.8 because core Preferences (QRun-IO/qqq#1162) are not in a release yet. Against a local build of QQQ develop it passes: `./mvnw verify -Dqqq.snapshot.version=4.1.0-PREFS-SNAPSHOT` gives 361 tests, 1 skipped (Docker only), with the gates met. CI cannot resolve RC.8 until it is published. ### Write mode - Each conversation is Read-only or Write. Read-only is the default. In Read-only mode the write tools are absent from the request. - Write mode is controlled by the policy (`write_mode_allowed`, `write_mode_permission`) and by per-table READ_WRITE data access. - Auto-confirm needs both `auto_confirm_allowed` and the table's `auto_confirm_ok`, and covers only single-record inserts and updates. Every other write is a confirmed pending action. - **Scheduled tasks** use write tools only when the per-task admin approval is set **and** the policy allows write mode. - **Bulk-load writes** follow the same mode gating. - The denial matrix runs in both modes. ### Preferences through core - The bespoke `/assistant/preferences` endpoints are removed. - The per-user settings are now core Preferences section **`assistant`** at `/qqq/v1/preferences/assistant`. It holds the write-mode default and auto-confirm for low-risk changes, which is read-only when the policy disallows it. - `AssistantPreferencesProvider` stores them in `assistant_user_preference`, a standard visible table. It writes only the signed-in user's own row and validates against the policy. - The section is denied to the assistant channel, since it is configuration. - `/assistant/config` still returns the effective defaults for the panel toggle. - UPGRADE.md maps the old endpoints to the new ones. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request has changes conflicting with the target branch.
  • CHANGELOG.md
  • README.md
  • UPGRADE.md
  • pom.xml
  • qbit-assistant/src/main/java/com/kingsrook/qbits/assistant/api/AssistantApi.java
  • qbit-assistant/src/main/java/com/kingsrook/qbits/assistant/api/specs/AssistantSpecs.java
  • qbit-assistant/src/main/java/com/kingsrook/qbits/assistant/engine/PolicyService.java
  • qbit-assistant/src/main/java/com/kingsrook/qbits/assistant/engine/TurnEngine.java
  • qbit-assistant/src/main/java/com/kingsrook/qbits/assistant/metadata/AssistantRecordScreens.java
  • qbit-assistant/src/main/java/com/kingsrook/qbits/assistant/persistence/AssistantStore.java
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/write-mode:feature/write-mode
git checkout feature/write-mode
Sign in to join this conversation.