Commit graph

90 commits

Author SHA1 Message Date
Darkatse
8ed6c627f0 fix(macos): keep actool stdin open during icon compilation 2026-10-22 06:46:49 -04:00
Darkatse
9ad3d138ab feat(agent): bundle read-only application knowledge skills
Expose bundled application documentation through the existing Skill repository and Session workspace. Materialize versioned resources across platforms, keep built-ins out of installed-skill management and writes, and preserve user Skill macros and saved visibility choices.

Include the maintained knowledge packages and deterministic documentation checks. New assistant profiles enable knowledge reading by default.

Validation: pnpm run check; Android aarch64 check; macOS dev and packaged application checks.
2026-10-22 04:46:02 -04:00
Darkatse
40e1956d57 feat(release): publish the web frontend with stable and canary releases
Tavern Studio builds its TauriTavern vendor image from a local checkout
because no release carries the web frontend.

Stable and canary releases now build it in a web job and attach
TauriTavern-<version>-web.zip (canary: -canary-web.zip). The archive is
src/ after pnpm web:build, the same frontend the native app embeds. The
release asset collector requires it, so a release cannot publish
without it. WebHost.md describes the asset and how to verify it.

Validation: node --test tests/ci-release-assets.test.mjs; both
workflows parse.
2026-10-19 18:40:02 -04:00
Darkatse
f1c50c42fc feat(host): start the frontend in a browser through a Web Host
Tavern Studio previews the TauriTavern frontend in a browser, where there
is no Tauri. The frontend reaches its host only through tauri-bridge.js,
so a browser host has one seam to provide.

src/tauri/web-host provides that side for the startup path: from boot to
an open character chat with its linked lorebook, including the settings
save that startup triggers. Data goes to the embedder's backend with
SillyTavern HTTP semantics, and TT settings live in an opaque document the
embedder keeps. Other commands reject as Unsupported. The settings
defaults come from the Rust DTO, and a test keeps that copy current.

The browser test harness now starts every test through the Web Host
instead of a hand-written __TAURI__, and a startup test covers the desktop
and Android identities. The byte wire constants, the Persona projection
and the avatar file name now each have one definition, shared by the
frontend and the Web Host. The settings save contract now states that
Personas are sent as a delta. The other docs stay host-neutral;
docs/CurrentState/WebHost.md describes the Web Host and when it needs
changes.

Validation: pnpm run check.
2026-10-18 22:22:53 -04:00
Darkatse
2bd2c30230 refactor(assistant): extract the UI engine as @tauritavern/app-use
Tavern Studio needs the same snapshot and interaction engine inside its
preview pages. The engine, its tests and the cursor move to
packages/app-use, an independently versioned AGPL package that imports
no TT modules. The in-app assistant consumes it from the workspace, and
the old ui/ directory is removed.

TT differences arrive as options: the [data-tt-sensitive] marker, the
assistant history area, the control-shell surface and #chat scrolling.
scrollChatSurfaceTo is exposed on the page context, so interact no
longer imports /script.js and runs synchronously. The package exports
the four tool definitions; the assistant appends its own notes and
implements evaluate and read_logs. The cursor follows SmartTheme
colors, and its CSS is bundled with the assistant's styles.

Pushing an app-use-v<VERSION> tag publishes the package through npm
trusted publishing.

Validation: pnpm run check; browser iframe checks; the packed tarball
works outside the repository.
2026-10-18 18:44:16 -04:00
Darkatse
c440057e83 refactor(host): rely on the host and scope the dev resource bridge
The frontend checked at runtime whether it ran in Tauri, but init.js,
the only entry, set __TAURI_RUNNING__ unconditionally. The upstream
branches never ran, yet a missing flag would have switched to them
silently; settings would then save without a revision. Native globals
were also read beside tauri-bridge.js in 13 modules.

Native capabilities now come only from tauri-bridge.js, enforced by
check:frontend. The Android speech shim, injected before the module
graph, is the one exemption. The is-Tauri checks and their upstream
branches, the bridge fallbacks, initializeBridge, the is_ready and
get_version commands, tauri-ready.js and backend-readiness.js are
removed; startup awaits host readiness once. Text Completion profiles
are rejected in validateProfile, caption no longer offers Local or
Horde, and the unreachable login page is deleted. __TAURI_RUNNING__
stays as an external marker.

init.js also inferred a dev session from the URL and registered
tt-ext-sw.js at scope /, replacing any embedder's worker. The dev server
now injects dev-sw-bootstrap.js, which installs the bridge only on
documents served at devUrl (mobile dev uses the app protocol, whose
resource hook serves these paths) and publishes
__TAURITAVERN_DEV_SW_READY__ for init.js. An uncontrolled page asks the
worker to claim it, and message delivery starts during parsing, since
head stylesheets may load through the window proxy.

Validation: pnpm run check.
2026-10-18 03:01:46 -04:00
Darkatse
6f5f427755 build(ohos): pin the OpenHarmony forks ported to Tauri 2.12.3
The tauri, wry, tao and plugins forks merge Tauri 2.12.3, wry 0.57.0,
tao 0.37.1 and the 2026-10-10 plugin releases, so they satisfy the
versions the app declares again. Tao now comes from a fork as well:
tauri-apps/tao has no OpenHarmony branch for 0.37. Pin the Darkatse
branches until LeenHawk merges them.

Validation: x86_64 debug HAP on the API 26 emulator, installed over the
2.11.6 build: storage survives the upgrade and a force stop; chat save
beyond the frame budget, chunked upload and fs 2.7 reads, native and
<input> file pickers, clipboard, opener, fullscreen and back, keyboard
resize and system bar strips. Pending: aarch64 and devices.
2026-10-10 18:49:03 -04:00
Darkatse
2d446c9237 feat(ohos): adopt the native window layout contract
Bring OpenHarmony onto the contract Android and iOS already follow.
ArkUI lays the Web out in the safe area, ArkWeb's RESIZE_CONTENT
shrinks the layout viewport by the docked keyboard's overlap, and an
app-owned window-layout plugin publishes window snapshots and draws
wallpaper strips behind the system bars.

- Share the window-layout plugin transport between Android and OHOS.
- Drop the remaining OHOS branches in Rust and the frontend.
- Rotate with the sensor, within the system rotation lock.

The ability and plugins-workspace pins point at the Darkatse forks
until LeenHawk/openharmony-ability#1 and LeenHawk/plugins-workspace#1
merge.
2026-10-05 19:53:38 -04:00
Darkatse
bd70d4d514 test(platform): enforce host identity boundaries
Scan frontend and Rust sources for noncanonical host detection, platform
category shortcuts and incomplete platform matches. Point each violation
to the documented rule and its intended replacement.

Run the guard through pnpm check and replace the legacy mobile exclusion
in generation-background setup with explicit desktop and OHOS branches.
2026-10-05 05:51:31 -04:00
Darkatse
9329278c6d refactor(files): unify native file selection and delivery
Centralize file picking, staging and delivery across platforms, with explicit cancellation outcomes and source ownership.

Remove superseded platform bridges and redundant tests, and document the shared contract and platform differences.

Validation: pnpm run check; Android aarch64 cargo check; 117 host tests.
2026-10-04 16:28:48 -04:00
LeenHawk
0c95ee5128
fix(ohos): use the shared runtime with isolated startup scripts and native dialogs 2026-10-04 15:33:33 +08:00
LeenHawk
0077e15241
feat: add experimental OpenHarmony HAP support (#300)
* feat: add experimental OpenHarmony application build

* build(ohos): isolate experimental NAPI dependencies

* ci(ohos): build in this repository with public toolchain image

* ci: run existing checks for OHOS adaptation

* fix(ohos): generate QuickJS bindings for the OHOS target

* fix(ohos): use private caches and exclude desktop migration logs

* feat(ohos): restore native plugins and trusted endpoint confirmation

* ci(ohos): verify native plugin integration with existing checks

* chore(ohos): remove completed one-off validation workflow

* fix(ohos): clean dependency warnings and enable HAP LTO

* fix(ohos): retain shared plugin callbacks for the native bridge

* refactor(ohos): keep the native project and align the framework baseline

* fix(ohos): pin frame authorization and name the launcher entry

* fix(ohos): bind native builds and HAP packaging to the selected ABI

* fix(ohos): pin ordered Tauri bridge initialization

* fix(ohos): compress native libraries in HAP packages

* refactor(ohos): simplify HAP builds and Canary publishing

Build Rust once through the OHOS CLI and derive HAP versions from its merged
configuration. Replace the demo with the application page and remove generated
configuration writes, CMake scaffolding, and redundant preparation steps.

Keep ARM64 HAPs optional for Canary, report unsupported dev-log exports clearly,
and document the current build and host contracts.

Validated with pnpm run check, a local x86_64 HAP build and simulator smoke checks,
and Windows notification smoke checks.

---------

Co-authored-by: Darkatse <39111369+Darkatse@users.noreply.github.com>
2026-10-04 14:09:37 +08:00
Darkatse
c4197086c3 feat(assistant): add session controller and WebView tools
Manage lazy session creation, durable history and live responses independently of the UI. Add the default assistant profile and page evaluation/log tools, with focused state-boundary tests and TypeScript checks.
2026-09-22 04:24:58 -04:00
Darkatse
8b7cf0c721 feat(agent): add JavaScript to the shared workspace shell
Unify Bashkit and QuickJS behind WorkspaceFs, retain the existing skill entry point during migration, and clarify Agent tool descriptions and errors.

Validation: pnpm run check.
2026-09-20 17:46:04 -04:00
Darkatse
f24aaf5621 fix(iOS): remove specific cargo unwind profile 2026-09-19 22:16:42 -04:00
Darkatse
5dc7d265cc feat(agent): add Bashkit workspace shell
Run shell commands and jq against the shared, scoped workspace. Integrate per-round automatic commits and cancellation that finishes active file writes before returning.
2026-09-19 21:44:54 -04:00
Darkatse
74bf383781 docs: use short URLs for installation and migration scripts 2026-09-18 22:51:51 -04:00
Darkatse
c899f6405d refactor(database): integrate TriviumDB through a native adapter
Move database ownership, blocking IO and TQL binding into tt-adapter-triviumdb
and upgrade the native engine to 0.8.8. Preserve the plugin API capabilities
with awaited open, numeric IDs and explicit shared-namespace lifecycle.

Coordinate archive IO with database maintenance and restore each namespace
as a complete file group. Keep behavior tests for persistence, parameter
binding, transactions and recovery instead of per-method forwarding tests.

Validated with pnpm run check and tauri-pilot against the macOS app using
the real data root; temporary test namespaces were removed afterward.
2026-09-18 01:42:56 -04:00
Darkatse
3c791aee36 fix(installer): support Debian rolling releases (#260) 2026-09-16 12:59:24 +08:00
Darkatse
6cc5deb727 fix(dev): use native file watcher for reloads (#229) 2026-09-06 00:59:33 -04:00
gaogao-gao
85cb559aef fix(dev): stop fs.watch last-access noise from looping page reloads
On Windows hosts with NTFS last-access updates enabled (fsutil behavior
DisableLastAccess 0/2), every read of a file under src/ updates its
last-access time, and recursive fs.watch reports that as a change event.
The dev server then reloaded the page for any non-bundled path: fonts,
styles, images and other static assets fetched by the page itself.
Each reload fetched those assets again, producing a reload -> fetch ->
last-access -> reload feedback loop where any UI interaction kept
refreshing the page.

Two guards in handleFrontendChange:

- Directory-level change events arrive with a null filename and cannot
  identify a reloadable file; ignore them instead of reloading.
- A last-access update never changes mtime, so a change event whose
  mtime is far in the past is read noise, not an edit. Only reload for
  files written within the last 30 seconds. Trade-off: writers that
  deliberately preserve mtime no longer trigger a reload.

Verified on Windows (DisableLastAccess=2): two rounds of fetching 12
static assets produced zero reload events (previously 8 in one round),
while a real file write still triggered exactly one reload.
2026-09-06 04:08:38 +01:00
Darkatse
a3532dde5b feat(ios): add limited iOS 15 support 2026-08-29 20:52:16 -04:00
Darkatse
72ff45bd15 build(frontend): remove Vue toolchain 2026-08-25 19:55:03 -04:00
Darkatse
e6177f4ba6 refactor(agent): migrate timelines to React 2026-08-24 21:39:24 -04:00
Darkatse
61a1abd55b refactor(dev): migrate dev logs panel to React 2026-08-23 21:51:16 -04:00
Darkatse
f74610cdd8 refactor(settings): migrate settings panel to React 2026-08-23 16:24:29 -04:00
Darkatse
7173fb1480 refactor(sync): migrate sync panel to React 2026-08-22 23:36:13 -04:00
Darkatse
9ff3d36858 perf(check): streamline Rust and test validation 2026-08-22 19:30:20 -04:00
Darkatse
94f6209c34 refactor(frontend): establish React migration foundation 2026-08-20 21:21:47 -04:00
Darkatse
eda7ece7bf fix(agent): align skill scripts with workspace semantics 2026-08-20 16:07:56 -04:00
matrix97
db460d9707 fix(ci): register tt-adapter-quickjs in boundary checks, narrow tokio features
The boundary script previously only listed quickjs as a forbidden dependency of tt-application, so the crate's own dependency tree and source boundaries were never checked. Register it with a full rule set banning other adapters, host layers, and infra packages.

Also stop inheriting the workspace tokio full feature: the adapter only needs spawn_blocking (rt) and #[tokio::test] (macros).
2026-08-20 18:43:31 +08:00
matrix97
0ad25d02ab fix(ci): repair contract_tests constructor call, narrow rquickjs features, register quickjs adapter boundary 2026-08-20 17:06:10 +08:00
hucc
049566b439 ci(workflow): publish QuickJS feature build on partial platform success
Allow the QuickJS feature release to publish whatever succeeded instead of requiring every platform to build: add --best-effort to the desktop asset collector, run desktop/mobile with continue-on-error, gate publish on prepare success rather than all jobs, and relax the Linux deb/rpm count check to at least one.
2026-08-17 16:35:18 +08:00
matrix97
2fcb39dbaa Merge remote-tracking branch 'origin/dev' into feature/quickjs-script-engine
# Conflicts:
#	src-tauri/Cargo.lock
#	src-tauri/crates/tauritavern/src/app/composition/services/mod.rs
2026-08-16 20:55:18 +08:00
Darkatse
abd51f095e feat(vectors): implement native compatibility layer 2026-08-15 14:18:04 -04:00
lovewormcn-Matrix965
2a8afae458 Merge remote-tracking branch 'origin/dev' into feature/quickjs-script-engine
# Conflicts:
#	src-tauri/Cargo.lock
2026-08-15 21:42:20 +08:00
Darkatse
9c091ca568 fix(ios): enable panic unwinding for Xcode builds 2026-08-14 15:36:33 -04:00
matrix97
f8665223c9 fix(workflow): rewrite QuickJS feature release based on canary-release
Align the QuickJS feature branch release with the canary desktop pipeline:
- desktop-only matrix (win, mac x64/arm64, linux x64/arm64) with portable builds
- no signing / notarization, no apt/rpm repo publish, no nix, no Codex
- deterministic commit-based release notes
- move QuickJS-Feature tag via gh api PATCH (force) instead of git push
- fix missing linux-version step reference
- add desktop-only asset collector (scripts/ci/collect-desktop-release-assets.mjs)
2026-08-13 23:55:43 +08:00
Darkatse
6e69c5c6ba feat(mcp): add registration and tool discovery 2026-08-08 02:16:44 -04:00
Darkatse
28a2eda892 feat(ci): publish desktop debug builds 2026-07-30 00:59:02 -04:00
Darkatse
b68cce4805 fix(ci): repair TestFlight and Linux repository publishing 2026-07-28 15:08:43 -04:00
Darkatse
e0052d78fe feat(flatpak): add source-based application packaging 2026-07-27 05:52:55 +08:00
Darkatse
d78c445faa refactor(distribution): organize Linux repository publishers 2026-07-27 05:52:27 +08:00
Darkatse
620ad57e83 ci(mobile): allow HTTP in standard release artifacts 2026-07-26 01:55:57 -04:00
Darkatse
96fec267b0 feat(ci): automate public TestFlight distribution 2026-07-26 01:55:46 -04:00
Darkatse
2dd0899df6 fix(ci): normalize release asset names 2026-07-26 08:25:20 +08:00
Darkatse
6a67dbba49 docs(linux): document repository and Nix distribution 2026-07-26 07:17:29 +08:00
Darkatse
d78bd498f8 feat(linux): add a cross-distribution package installer 2026-07-26 07:17:24 +08:00
Darkatse
1c07729e88 feat(ci): automate stable releases and Linux repositories 2026-07-26 07:17:18 +08:00
Darkatse
8aa01b3372 fix(dev): rebind service workers across app restarts 2026-07-24 02:28:50 -04:00