Ship Assistent 0.11.9: esbuild bundle and patch-keys manifest.
Replace split Assets JS with a built bundle and aligned C#/config so SwarmUI loads one script and patch apply stays consistent; drop legacy terse persona and memory seed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
SwarmUI extension for **collaborative Krea 2** prompting via **Ollama**: chat + board (Generate | Refs tabs), LoRA chips, **persona presets** (`Config/personas/`), **About the user** prefs + craft vector memory, model cards with Civitai fetch, img2img/inpaint, slash commands, auto Generate.
|
||||
|
||||
**Turn model:** one user message is one *turn*. A turn may fan out into nested LLM *hops* — Krea prompt prep, empty-patch retry, vision, auto-critique. Hops share one `HOP_BUDGET`, never re-read the user's text (their prompt is client-authored), and pass the busy gate that blocks new user sends. What a reply does to generation state is decided once, in `resolveTurnIntent`: the model's `actions:["generate"]` / `look_at` win, RU intent heuristics only back it up when the model forgets, and an explicit «запомни, не генерируй» vetoes both.
|
||||
|
||||
**Version 0.11.9** — Distilled client: esbuild bundle (`Assets/assistent.bundle.js`), unified patch keys (`Config/_base/patch-keys.json`), taste stack removed (UserPrefs only), chat storage merge + all-chats disk save, `write_prompt` → alias of `ordinary`. Builds on prior 0.11.9 turn-intent work.
|
||||
|
||||
**Version 0.11.9** — One turn, one decision. Nested hops (Krea prep, empty-patch retry, vision, critique) share a `turnHops` budget and pass the busy gate — Krea prep and the empty-patch retry were silently no-ops since 0.10.22/0.11.2. Generate / `look_at` are decided in a single `resolveTurnIntent`; `ensureGenerateAction`, `shouldHonorLookAt` and the `wantsGen`/`willGen`/`suppressGen` tangle are gone. Builds on 0.11.8.
|
||||
|
||||
**Version 0.11.8** — `session_exact` remembers applied params that differ from Exact (not only when the user typed the knob). `/debug ask` uses a hidden Q&A pack: 5–10 line explain, no JSON/generate, dump stays a system note. Builds on 0.11.7.
|
||||
|
||||
**Version 0.11.7** — Generate only for a real frame request: chat/opinions no longer auto-run Swarm. Context still counts («нарисуй», «ещё одну», «другая поза»), not only «генерируй». Builds on 0.11.6.
|
||||
@@ -50,10 +56,22 @@ Assistent/
|
||||
_base/ personas/<id>/ # overlay presets — same names as Config/, sparse
|
||||
settings.json # embed_model, base_url, per-persona skills
|
||||
ollama-roles.json # chat vs memory model tags (gpu-rent writes this)
|
||||
memory/assistent.sqlite # craft RAG + user_prefs + tags FTS + chats + ui_state + taste (legacy)
|
||||
_migrated_json/ # one-shot archive of old chats/*.json, ui-state.json, taste.json
|
||||
memory/assistent.sqlite # craft RAG + user_prefs + tags FTS + chats + ui_state
|
||||
```
|
||||
|
||||
## Client build
|
||||
|
||||
Sources live in `src/` (ES modules). The VM ships the committed bundle only (no Node required at runtime):
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run build # → Assets/assistent.bundle.js
|
||||
npm run watch # rebuild on save
|
||||
npm test # intent.js + patch.js
|
||||
```
|
||||
|
||||
SwarmUI loads a single script: `Assets/assistent.bundle.js`.
|
||||
|
||||
Copy `personas/leonid/` → new id, edit only differing JSON. See `Config/personas/README.md`.
|
||||
|
||||
**Controls:** optional `controls.json` schema + `exact.controls` values. UI auto-draws every slider (`order`, `display: percent`). LLM may patch `"controls": {…}`. Values persist in overlay Exact (DeepMerge partial saves). Leonid: **Вкус** + **Хорни**; `/остынь`, `/horny-game`.
|
||||
@@ -76,7 +94,6 @@ Separate sqlite table `user_prefs` (not craft RAG):
|
||||
- **Persona** — only the current agent
|
||||
- Injected as `## About the user`; strength via `user_prefs_weight` / `user_prefs_max` in `assistant.json` (⚙ → О пользователе)
|
||||
- Agent write: `actions: ["user_pref_upsert"]` + `user_prefs: [{key,text,scope}]`
|
||||
- Legacy `kv.taste` migrates once into global prefs
|
||||
|
||||
## Craft vector memory
|
||||
|
||||
@@ -92,9 +109,8 @@ Two layers in `memory/assistent.sqlite` (`persona` column; empty = shared):
|
||||
## Chats and runtime KV
|
||||
|
||||
- Every chat (messages + Generate params snapshot) is a row in `assistent.sqlite`, newest **200** kept. History search uses FTS over title + body.
|
||||
- First launch after 0.8.3 copies `chats/*.json`, `ui-state.json`, and `taste.json` into sqlite, then archives them under `_migrated_json/`.
|
||||
- localStorage stays as a fast cache; on first run with an empty store the old `swarm_assistent_chats_v1` browser history is migrated up once.
|
||||
- UI state seeds a **fresh** browser only — anything already in localStorage wins, and `auto_download` is never restored as on
|
||||
- All chats with messages are debounced to disk (not only the active one). Load merges disk + localStorage by `updatedAt`.
|
||||
- UI state whitelists `park_llm` among other keys in sqlite `kv.ui_state`.
|
||||
- `settings.json` and persona overlays stay files (layered merge + git). `.assistent.json` cards stay next to weights.
|
||||
## VRAM handover
|
||||
|
||||
@@ -115,6 +131,8 @@ Two layers in `memory/assistent.sqlite` (`persona` column; empty = shared):
|
||||
| Command | Effect |
|
||||
| --- | --- |
|
||||
| `/help` | List commands |
|
||||
| `/new` | New chat (current one is saved) |
|
||||
| `/history` | Open saved chats |
|
||||
| `/debug` | Short UI/Exact dump (no LLM) |
|
||||
| `/debug ask` / `/why` | Dump + short model explanation |
|
||||
| `/gen` | Generate now |
|
||||
@@ -124,7 +142,8 @@ Two layers in `memory/assistent.sqlite` (`persona` column; empty = shared):
|
||||
| `/aspect 16:9` | Set size from the official 1K table |
|
||||
| `/seed lock\|random` | Lock or randomize seed |
|
||||
| `/vary` | New seed, same prompt (+ generate if auto) |
|
||||
| `/pack write\|critique\|…` | Switch pack |
|
||||
| `/pack write\|ordinary\|critique\|compose\|params\|inpaint\|describe\|card\|persona` | Switch pack |
|
||||
| `/persona new\|clone\|save` | Overlay persona authoring |
|
||||
| `/civitai <query>` | Ask LLM to search Civitai |
|
||||
| `/inventory` | Rescan models + refresh LoRA list |
|
||||
|
||||
@@ -149,18 +168,21 @@ Restart / rebuild SwarmUI after clone. gpu-rent: `seed-extensions` + restart.
|
||||
|
||||
## Packs & skills
|
||||
|
||||
**Packs** (one active): `ordinary` (default комбайн), `write_prompt`, `critique_image`, `compose_scene`, `fix_params`, `inpaint_edit`, `describe_ref`, `catalog_card`, `author_persona`.
|
||||
**Packs** (one active): `ordinary` (default комбайн; covers write/critique/params flows), `write_prompt` (alias → same as ordinary), `critique_image`, `compose_scene`, `fix_params`, `inpaint_edit`, `describe_ref`, `catalog_card`, `author_persona`.
|
||||
|
||||
Patch fence keys: single source `Config/_base/patch-keys.json` → C# + client via `AssistentGetConfig.patch_keys`.
|
||||
|
||||
**Skills** (checkboxes): `prompting`, `creativity_sliders`, `memory` — procedures; encyclopedia numbers live in Exact, soft notes in memory-seed / RAG, human taste in UserPrefs.
|
||||
|
||||
**Personas:** `neutral`, `lewd`, `aggressive`, `cinema`, `terse`, `leonid` under `Config/personas/`. Overlay clones via `/persona new` or ⚙ → Личности.
|
||||
**Personas:** `neutral`, `lewd`, `aggressive`, `cinema`, `leonid` under `Config/personas/`. Saved `terse` falls back to `aggressive`. Overlay clones via `/persona new` or ⚙ → Личности.
|
||||
|
||||
## API routes
|
||||
|
||||
| Route | Role |
|
||||
| --- | --- |
|
||||
| `AssistentListModels` | Ollama tags → `models` (chat) + `memory_models` |
|
||||
| `AssistentGetConfig` | Merged preset for persona (ui, packs, skills, identity, controls) |
|
||||
| `AssistentGetConfig` | Merged preset for persona (ui, packs, skills, identity, controls, **patch_keys**) |
|
||||
| `AssistentSaveSettings` | Overlay settings DeepMerge (skills, embed_model) |
|
||||
| `AssistentSaveControls` | Persist Exact `controls` values for a persona (overlay) |
|
||||
| `AssistentGetPersonaShelves` | Merged identity shelves + controls |
|
||||
| `AssistentClonePersona` | Snapshot clone → overlay id |
|
||||
@@ -168,14 +190,11 @@ Restart / rebuild SwarmUI after clone. gpu-rent: `seed-extensions` + restart.
|
||||
| `AssistentDeletePersona` | UI-only delete of overlay persona |
|
||||
| `AssistentExportPersona` / `AssistentImportPersona` | Shareable `.assistent-persona.json` pack |
|
||||
| `AssistentSaveKnobs` | Overlay `_base/assistant.json` + Exact turbo/raw profiles |
|
||||
| `AssistentGetSettings` / `AssistentSaveSettings` | Overlay settings (skills, embed_model) |
|
||||
| `AssistentListInventory` | LoRA / checkpoint / wildcard inventory |
|
||||
| `AssistentListPersonas` | Persona catalog |
|
||||
| `AssistentGetPacks` | Prompt pack texts |
|
||||
| `AssistentGetCard` / `AssistentSaveCard` | `.assistent.json` cards (+ memory ingest) |
|
||||
| `AssistentGetCardMeta` | Local sidecar + optional Civitai by-hash |
|
||||
| `AssistentEnqueueWanted` / `AssistentListWanted` | Wanted YAML queue (write / read + count) |
|
||||
| `AssistentGetTaste` / `AssistentSaveTaste` | sqlite `kv.taste` (legacy; prefer UserPrefs) |
|
||||
| `AssistentListUserPrefs` / `AssistentUpsertUserPref` / `AssistentForgetUserPref` / `AssistentClearUserPrefs` | About the user |
|
||||
| `AssistentSearchCivitai` | Civitai LoRA search |
|
||||
| `AssistentChat` / `AssistentChatWS` | Chat (+ user prefs + hybrid craft memory + hops) |
|
||||
|
||||
Reference in New Issue
Block a user