Commit Graph

4184 Commits

Author SHA1 Message Date
TyperBody 76398c8bc4 Merge origin/master into feat/totp-two-factor-auth
Resolve the revision-graph conflict introduced by the release line.

Conflicts
- tests/integration/persistence/test_rag_document_identity.py: master had
  independently introduced the same dynamic-head helper (`current_head`) plus
  a `DOCUMENT_IDENTITY_REVISION` constant, and it explicitly upgrades to that
  revision. Keep master's semantics (the explicit revision matters because
  upgrading to the head now also traverses the TOTP branch) while keeping the
  module-level alembic imports on this branch.

New migration
- 0030_merge_totp_into_release joins the TOTP branch's own merge revision
  (0026_merge_totp_and_rag_identity) with the release head
  (0029_merge_rag_identity). Both reached 0025_rag_document_identity without
  including each other, which left Alembic with two heads and made
  `upgrade head` fail with "Multiple head revisions are present".

Verification
- Single Alembic head confirmed (0030_merge_totp_into_release).
- tests/integration/persistence/test_rag_document_identity.py: 34 passed.
- Full fast integration suite: 356 passed, 84 skipped.
2026-09-24 02:27:37 +08:00
RockChinQ 3a6f4a2dce Merge 4.11 into master
merge: integrate 4.11 into master
2026-09-24 02:11:28 +08:00
RockChinQ 9b589a8f08 merge: integrate 4.11 into master 2026-09-24 02:01:00 +08:00
TyperBody 0bf610037a fix(web): keep reset-password wire shape for the default method
resetPassword() unconditionally added `method` and an empty `totp_code` to
every request, which broke the Playwright smoke test that asserts the
recovery-key flow posts exactly {user, recovery_key, new_password}.

Send only the second-factor fields that apply to the selected method, so the
default recovery-key flow stays byte-compatible with existing callers while
the totp / recovery_code methods still carry their inputs.
2026-09-24 01:31:54 +08:00
TyperBody 28e8821365 fix(auth): repair TOTP CI failures
Address the migration and formatting failures reported on the TOTP branch.

Migrations
- Register totp_credentials and totp_recovery_codes in
  _ALEMBIC_TENANT_TABLES. On a legacy PostgreSQL install these two tables
  reference users.uuid, which only exists after 0009, so create_all() must
  not run ahead of Alembic the way it did for the other tenant tables.
  Without this the PostgreSQL migration test failed with
  "column uuid referenced in foreign key constraint does not exist".

Tests
- Resolve the Alembic head dynamically in the RAG document identity
  regression instead of pinning 0025_rag_document_identity. The TOTP and
  RAG branches now meet at a merge revision, so the pinned value was no
  longer the head. This matches the convention already used by
  test_migrations_postgres.

Formatting
- Apply ruff format to the new backend modules and prettier to the locale
  files and TOTP components, so the lint jobs pass.
2026-09-24 01:31:54 +08:00
TyperBody 8633567ce7 feat(auth): add TOTP two-factor authentication
Add a per-Account time-based one-time password (TOTP) second sign-in
factor, plus the owner/admin tooling needed to operate it.

Backend
- TotpService: enrolment, constant-time verification with a +/- one step
  drift window, single-use recovery codes and disablement.
  * shared secret is only ever persisted as a Fernet token whose key is
    derived (HKDF-SHA256) from the instance JWT secret and gated by a
    key_version epoch;
  * recovery codes are only ever persisted as salted
    PBKDF2-HMAC-SHA256 digests (600k iterations) and are single-use;
  * the consumed counter advances monotonically so a captured code cannot
    be replayed inside the same time window.
- New persistence entities and alembic migrations for credentials and
  recovery codes.
- Login second-factor challenge, bound to the Account that passed the
  password step.
- Owner/admin oversight endpoints to inspect and re-bind the second
  factor of any Account.

Frontend
- Account settings panel for enrolling, managing, re-binding and
  disabling the second factor.
- Login second-factor step and the matching client methods.
- Strings for all eight locales.

The shared secret never crosses the API boundary: enrolment returns a
server-rendered QR code (as a data: URL) and the plaintext secret is
discarded as soon as the image is produced.
2026-09-24 01:31:54 +08:00
Martin 874eb6600c fix(wecombot): stop empty bubbles and premature stream close on blank final chunks (#2561)
* fix(pipeline): stop emitting empty final assistant messages

An empty final streaming chunk was appended as an empty message chain when no sandbox outbox attachment was present, so platforms received an empty reply. Only append the chain when attachments were actually collected, and gate the "Call ..." tool notice behind output.misc.track-function-calls so it no longer becomes the final chunk of a stream.

* fix(wecombot): do not close stream on a blank final snapshot

A blank final snapshot closed the WeCom stream with an empty bubble and pushed the real answer into a separate reply_text message. Skip blank final snapshots and keep the session open so the following non-blank chunk can finalize it. Covered by new regression tests.
2026-09-23 18:28:11 +08:00
RockChinQ fd940a3a06 Merge pull request #2559 from Rapeter/codex/fix-storage-analysis-menu-icon
fix(web): add storage analysis menu icon
2026-09-23 18:17:21 +08:00
RockChinQ 827626d8c5 Merge pull request #2562 from langbot-app/fix/411-debug-prompt
fix(agent): preserve configured prompts in debug runs (certified-Runner acceptance follow-up)
2026-09-23 14:27:49 +08:00
RockChinQ ee90ec61d0 fix(agent): preserve configured prompts in debug runs
[verified] Independently reviewed debug-only Query initialization, explicit-empty prompt semantics, scoped Runner schema/config, trusted execution metadata and MCP projection. Focused RED/GREEN and 249 regression tests pass. No shared orchestration or nondebug behavior changes.
2026-09-21 19:18:30 +00:00
RockChinQ e897c575e0 Merge pull request #2560 from langbot-app/fix/411-runner-live-acceptance
fix(4.11): merge master and repair PostgreSQL Runner execution
2026-09-22 01:36:27 +08:00
RockChinQ 08a6ed0fdd fix(runner): normalize PostgreSQL journal timestamps to UTC-naive
Preserve the published timezone-less schema and epoch API contract across run lifecycle, deadlines, leases, heartbeat registry, events, transcripts and retention cutoffs. Exercise the real Host journal with asyncpg under a non-superuser role on metadata and published-migration schemas; 32 PostgreSQL regressions fail before the fix and pass after it.
2026-09-21 17:05:40 +00:00
RockChinQ a8d291e581 fix(plugins): retain Host progress fallback after master merge 2026-09-21 17:04:57 +00:00
RockChinQ 5d9684731e merge(4.11): integrate master marketplace updates preserving Runner lifecycle 2026-09-21 16:58:35 +00:00
RockChinQ 6b83089535 Merge pull request #2546 from langbot-app/feat/marketplace-installed-state-and-search
feat(plugins): show installed state in marketplace and search install…
2026-09-22 00:43:46 +08:00
Zhong 74a0aa3563 fix(web): add storage analysis menu icon 2026-09-21 21:00:55 +08:00
RockChinQ 7d37e74ce6 Merge pull request #2558 from langbot-app/fix/411-bot-form-layout-assertion
test(web): align bot form assertion with responsive grid layout
2026-09-21 19:46:24 +08:00
RockChinQ 44ee0e8d71 test(web): align bot form assertion with responsive grid layout 2026-09-21 11:35:19 +00:00
RockChinQ d3eb7b09e5 merge(4.11): synchronize master certification and document identity fixes (#2557)
merge: synchronize master certification and document identity fixes into 4.11
2026-09-21 19:27:49 +08:00
RockChinQ 73f26bd0a3 test: include legacy pipeline dependency in identity migration fixtures 2026-09-21 11:19:03 +00:00
RockChinQ 27871e4363 merge: integrate master certification and document identity fixes into 4.11 2026-09-21 10:55:40 +00:00
RockChinQ b10139bd83 Merge pull request #2556 from langbot-app/fix/ke-document-identity-20260921
fix(rag): retain interrupted ingestion state and engine identity
2026-09-21 15:55:24 +08:00
RockChinQ 381bb3f852 fix(rag): retain interrupted ingestion state and engine identity 2026-09-21 07:47:31 +00:00
TyperBody efc28747d5 Merge origin/master into feat/marketplace-installed-state-and-search
Resolved one conflict in src/langbot/pkg/plugin/connector.py. Master added
archive admission (`_admit_plugin_archive` + the certification digest check
before Runtime apply) at the same points this branch added install-stage
reporting, so both sides are kept:

- the archive is admitted first, then the 'inspecting plugin package' stage is
  reported
- the certification digest is verified before Runtime apply, then the
  'installing or starting plugin' stage is reported

Verified after merge: py_compile + ruff, tsc --noEmit, 98/98 unit tests.
2026-09-21 00:48:20 +08:00
TyperBody 163dac48b0 fix(plugins): correct install progress bounds, skill identity, and stage accuracy
Addresses review feedback on the marketplace installed-state change.

- Progress: byte-derived progress no longer has time-based drift layered on
  top, and fallback drift is clamped to the current stage range, so the bar
  cannot exceed the download band. 90/100 bytes at 40s elapsed used to report
  61% against a declared 5-45% band; it now reports 41%. Drift is measured
  from when the stage was entered rather than from task start.
- Skills: a marketplace skill is no longer reported installed from a bare
  skill name. The backend names skills from their own SKILL.md and records no
  publisher, so alice/review and bob/review install identically; matching the
  bare name marked every publisher's skill as installed. Skill cards now
  resolve to not-installed until the installed skill carries a publisher.
- Stages: "installing plugin dependencies" and "launching plugin" described
  work this task context cannot observe (installation persistence ran under
  the former; the runtime installs dependencies and starts the plugin inside
  apply_plugin_installation under the latter). They become "persisting the
  installation" and "installing or starting plugin", and the frontend maps
  that combined step to the dependency stage rather than the launch stage.
- Removed the per-dependency progress fields: the backend never populated
  them, so the UI could never have displayed them.

The stage mapping and progress maths move to install-progress.ts, and the
installed-state matching to a React-free marketplace-installed.ts, so both
are covered by executable tests (+9).

Verified: ruff, tsc --noEmit, prettier --check, eslint (0 errors), 98/98 unit
tests.
2026-09-21 00:40:23 +08:00
RockChinQ 52f5699533 fix(plugin): honor requested marketplace version (#2555) 2026-09-20 23:59:50 +08:00
RockChinQ 942a302808 fix(plugin): load certification key ring from env (#2554) 2026-09-20 22:22:32 +08:00
RockChinQ 20a04a77bf feat(plugin): enforce certified archive admission (#2553)
* feat(plugin): add certified admission policy

* feat(plugin): enforce certified archive admission

* chore(plugin): pin certified SDK beta

* fix(plugin): consume SDK beta 5

* style(plugin): format certification admission
2026-09-20 18:54:45 +08:00
RockChinQ 503fec4d6e feat(web): unify guided tours and complete translations 2026-09-19 22:14:29 +08:00
fdc310 e7ad051cf6 Merge remote-tracking branch 'origin/dev/4.11.x' into dev/4.11.x
# Conflicts:
#	uv.lock
#	web/src/i18n/locales/en-US.ts
#	web/src/i18n/locales/ja-JP.ts
#	web/src/i18n/locales/zh-Hans.ts
#	web/src/i18n/locales/zh-Hant.ts
2026-09-19 11:00:45 +08:00
sheetung 8f8356fe97 Merge pull request #2552 from sheetung/fnos-privilege
Fnos privilege
2026-09-19 09:16:15 +08:00
fdc310 cc8a0ec847 feat: simplify resource setup and detail guides 2026-09-19 02:39:35 +08:00
RockChinQ 92cac61930 fix(deps): align SDK lock with default prerelease policy 2026-09-18 16:49:04 +00:00
RockChinQ cd1188a62d chore(deps): pin published plugin SDK 0.6.0b3 2026-09-18 16:30:33 +00:00
RockChinQ 804c089d20 fix(wizard): show default AI preparation progress in button 2026-09-19 00:05:49 +08:00
RockChinQ 79cac0c6a3 fix(reasoning): apply explicit per-call levels without runner config caching 2026-09-19 00:05:49 +08:00
RockChinQ 4b86d979dd Update links in README_CN.md 2026-09-18 21:01:31 +08:00
RockChinQ d61926af85 Update website link in README.md 2026-09-18 21:01:02 +08:00
RockChinQ da4b0d6ca2 fix(wizard): prepare default Local Agent and refine Runner setup 2026-09-18 19:27:56 +08:00
fdc310 960e322c79 feat(web): add contextual setup guides 2026-09-18 19:08:30 +08:00
“sheetung” d705861d25 fix(fnos): open LangBot embedded inside fnOS desktop instead of external browser
Change desktop entry type from 'url' (opens external browser) to 'iframe'
(embeds the web UI inside the fnOS desktop window), per the official
Application Entry documentation at developer.fnnas.com/docs/core-concepts/app-entry.
2026-09-18 17:05:47 +08:00
“sheetung” 34f1e3d56f feat(fnos): run entirely without root and harden process lifecycle
- Switch privilege model to run-as: package (zero root, per fnOS guide)
- Borrow App Store python312 instead of bundling CPython; keep bundled uv
- Move venv, HOME and caches onto the persistent data share
- Start service via setsid; stop/upgrade kill the whole process group
- Sweep stray runtime/box orphans in install/upgrade init hooks
- Track LangBot 4.10.11 (manifest baseline + upstream merge)
2026-09-18 16:20:32 +08:00
RockChinQ bece2aa554 fix(wizard): restore message pipeline setup and page bot preview 2026-09-18 16:01:55 +08:00
RockChinQ 60606e1997 fix(migration): improve runner migration and plugin installation feedback 2026-09-18 13:10:32 +08:00
RockChinQ 79b4fe2004 docs(readme): add text links below Cloud deployment buttons (#2551) 2026-09-18 13:10:19 +08:00
RockChinQ e3ae3cc1ea Update links in README_CN.md 2026-09-18 08:30:22 +08:00
RockChinQ db244084a9 Update website link in README.md 2026-09-18 08:29:51 +08:00
RockChinQ e77acfa3ab fix(box): align integration tests with runner-owned bindings 2026-09-18 01:07:43 +08:00
RockChinQ a6ac25cf84 feat(agent): add task-oriented run logs and execution details 2026-09-18 00:59:17 +08:00
RockChinQ b264d46d77 feat: delegate sandbox policy to runners and simplify pipeline migration 2026-09-17 23:05:27 +08:00