Skip to content

feat: show marketplace publishers and external app provenance - #531

Merged
ahmad-ajmal merged 1 commit into
V1.4.5from
feature/external-agent-apps
Nov 18, 2026
Merged

ahmad-ajmal merged 1 commit into
V1.4.5from
feature/external-agent-apps

Conversation

@ahmad-ajmal

Copy link
Copy Markdown
Collaborator

What

  • Show and search publisher names on marketplace cards. The companion Agent-App change resolves external publishers from the GitHub owner's profile and uses CraftOS for marketplace-hosted apps; older CLI output without a publisher still renders normally.
  • Preserve external app repository, approved commit, and app path in CraftBot's registry response and frontend types, while keeping the approving catalogue's identity.
  • Extend provenance tests to cover both existing folder apps and external apps.

Why

The catalogue can list apps hosted in separate repositories at approved commits. CraftBot needs to display who publishes each app and retain the exact external source recorded by the framework.

Companion framework PR: CraftOS-dev/Agent-App#43. Targets V1.4.5, which contains the current Agent-App integration. This draft does not change CraftBot's bundled framework archive/pin; the new framework must be integrated into that bundle before shipping. Development testing uses CRAFTBOT_AGENT_APP_PACKAGE to select the locally built CLI.

How to test

  1. Build Agent-App PR Refactor actions to use output JSON responses #43 with pnpm --filter agent-app-framework build and set CRAFTBOT_AGENT_APP_PACKAGE to its framework/cli directory when launching CraftBot.
  2. Set A2APP_MARKETPLACE=github:CraftOS-dev/living-ui-marketplace and agent_app.marketplace_ref to staging in the active CraftBot profile's settings. If using CRAFTBOT_HOME, edit that profile's settings rather than the checkout's settings.
  3. Open Add Agent App → Marketplace. Development Studio should show By はる, the other 37 apps By CraftOS, and searching はる should return only Development Studio.
  4. Install Development Studio and check that the registry retains its catalogue ID plus repository, approved commit, and app path. The existing folder-app install path should continue to work.

Screenshots / Logs

  • python -m pytest tests/test_marketplace_source.py -q: 22 passed.
  • Frontend npm run build: passed; existing bundle-size warning only.
  • ruff check app/agent_app/framework.py tests/test_marketplace_source.py: passed.
  • python -m compileall -q app agent_core agents decorators skills: passed.
  • Browser verification: all 38 publishers render, and publisher search works using a catalogue with no manually assigned publisher fields.
  • Integration: Development Studio installed from staging at approved commit 1cee4fd91a7eae2661b659fca65bc10c125d43df through CraftBot using the local framework; dependency installation, gate, startup, and session attachment passed.

Repository-wide ruff check . currently reports 7 existing findings in untouched files (app/credentials/vault.py and three unrelated test files). ruff format --check . also finds existing formatting differences outside the new code. Those baseline issues are not changed by this PR.

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
@ahmad-ajmal
ahmad-ajmal requested a review from zfoong November 18, 2026 12:28
@ahmad-ajmal ahmad-ajmal self-assigned this Nov 18, 2026
@ahmad-ajmal
ahmad-ajmal marked this pull request as ready for review November 18, 2026 12:37
@ahmad-ajmal
ahmad-ajmal merged commit 979cd77 into V1.4.5 Nov 18, 2026
ahmad-ajmal added a commit that referenced this pull request Nov 19, 2026
Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
ahmad-ajmal added a commit that referenced this pull request Nov 19, 2026
* fix: install env + installer UI

* Upload agent app showcase

* Update agent app visual

* Update README.md

* feat: add reusable session and app references to chat (#505)

* feat: add reusable chat references and harden edge cases

Signed-off-by: はる <165422770+ahmad-ajmal@users.noreply.github.com>

* feat: open installed Agent Apps in the chat side panel (#506)

* feat: open installed agent apps in the chat side panel

* docs: replace panel screenshots with live CraftBot captures

* fix(references): stop an unmatched @ mention from swallowing Enter

Typing "ping @john please review" opened the mention list with no
matches, and the list captured Enter, so the message could not be sent.
Escape only helped until the next keystroke: dismissal was keyed on the
query text, so every character reopened the list.

- With no matches the list is only a hint; it handles Escape alone.
- A multi-word query that matches nothing is prose and closes the list.
- "@" followed by a space is not a mention.
- Escape dismisses the mention at its position until the caret leaves it.
- Composer focus, not a blur-time dismissal, decides visibility.

* fix(chat): make Retry idempotent and reconcile the retried bubble

Retry left its button live, so it could be clicked again while the first
retry was in flight. The server only deduplicated submissions carrying
references, so an attachment-only message clicked twice ran twice and
saved its file twice. Rejection also cleared the bubble's pending flag,
so a successful retry's echo could not replace the failed bubble and
the chat showed both.

- A retry puts the bubble back to pending and clears its error.
- Every client submission through the attachment/reference path gets a
  stable message id and goes through the submission gate. Attachment-only
  sends stay best-effort when the store cannot be read.
- Submission ids use a "submission:" prefix now that they are not
  reference-specific.

* fix(agent-apps): track frame loads in the frame host

Only a mounted surface's load listener recorded that a frame had
loaded. If the user switched panel tabs while an app was loading, the
load finished with nobody listening; on return the frame stayed hidden
behind "Loading app view…" until the 20 s timeout, and Retry then
reloaded the app and lost its state.

The frame host now records every load itself, and surfaces ask it
through isIframeLoaded().

* fix(references): size the reference budget from the running model

The reference token budget read settings.json model.context_window
directly. That bypassed the model catalog the LLM uses, so a catalogued
model's real window was ignored. Because the reference service was also
built for every attachment send, a malformed context_window made int()
throw and rejected attachment-only messages that use no references.

- LLMInterface gains a public context_window() over _context_limits(),
  and the protocol declares it.
- create_reference_service takes the LLM (registry by default) and
  derives the budget with reference_token_budget(); its bounds are
  named constants.
- The adapter builds the reference service only for messages that carry
  references.

* fix(references): read app schemas from the registered app address

AgentAppReferenceProvider fetched describe from a hardcoded
http://127.0.0.1:{backend_port or port}. The agent's own app note
(agent_base) uses project.backend_url or project.url, so an external app
that does not listen on loopback showed its schema to the agent but
"Schema unavailable" in a reference.

The provider now uses the same manager-registered address. It still
never follows redirects or uses a proxy, and it refuses any scheme other
than http(s).

* fix(agent-apps): restore launch guidance and error fallback on the app surface

Moving the app page's states into AgentAppSurface dropped the launching
mascot and its "Installing dependencies, running tests, starting
servers" hint, and an error with no message rendered no text, where the
page used to say "Unknown error".

The launching state shows the mascot and hint again. The error state
falls back to common:status.unknownError, and a launch failure's own
message still shows when the project returns to stopped.

* fix(chat): stop telling users to retry a message that was already accepted

When the agent failed to take a message after it had been saved and
echoed, the error said "The message could not be submitted. Please
retry." A retry of that submission is deduplicated and never reaches
the agent, so the advice could not work.

A failure after acceptance now says the message was saved and asks the
user to send it again as a new message. Failures before acceptance keep
their retryable rejection.

* fix(chat): drop retry data once its bubble is gone

Every sent message kept its full payload, including base64 attachment
content, until the server echoed it. Slash commands never get an echo,
and rejected messages that were never retried, or whose chat was
cleared, deleted or reloaded, kept theirs for the life of the page.
Edit restored a failed message into the composer but left the failed
bubble on screen with a working Retry.

- Retry entries record their session and are pruned on each send when
  their bubble no longer exists. Slash commands are not tracked at all.
- A rejection drops its run-state snapshot once restored; a retry takes
  a fresh one.
- Edit removes the rejected bubble and forgets its retry data.

* refactor(chat-panel): dispatch panel tabs by object, not by parsing ids

The panel strip encoded each tab's meaning into its id ("browser",
"app:<project>", "output:<artifact>") and decoded it again with
startsWith and slice(4)/slice(7). Any id it did not recognise fell
through to removing an app.

Each panel tab now carries its own shown/select/close behaviour, and the
strip looks the tab up by id. Ids stay unique keys for ChromeTabs and
the DOM; nothing reads meaning out of them. usePanelApps returns project
ids (attached, selectedProjectId) through a named AppsPanelMode
contract instead of pre-built prefixed tab ids.

* chore: remove dead code left by the reference and panel features

- 16 unused chat locale keys in all 7 locales: apps.show, tabs, add,
  detach, search, added, done, empty, noMatches, noInstalled, limit (an
  earlier modal-picker design) and references.filter, all,
  selectedCount, sessionSingular, appSingular.
- AgentAppPage.module.css rules for the app states that moved to
  AgentAppSurface (.iframe, .loading, .stopped, .error, .errorMessage,
  .hint, .spinner and its keyframes), plus the unused .results selector.
- The panel toggle's branches for apps that could not run after its
  early return; openApp now always takes a project id.
- Docs that described an empty Apps view with an Add app action and a
  limit message; neither exists. Removing the last app returns to the
  chooser, and attaching past 100 apps is ignored.

* i18n(references): translate the reference strings in all locales

All 19 chat references.* strings were English placeholders in es, id,
ja, ko, zh-CN and zh-TW. They are now translated, using each locale's
existing terms for chats, context and agents. "Agent App" stays as the
product name, as elsewhere in those locales. Interpolations ({{name}},
{{time}}) and the read_reference action name are unchanged.

* refactor(agent-apps): one describe reader for the agent prompt and references

agent_view._describe (the agent's app note: cached, but following
redirects, using environment proxies and reading an unbounded body) and
AgentAppReferenceProvider._describe (references: no redirects, no proxy,
64 KiB cap, but uncached) each fetched /api/_a2app/describe their own
way.

agent_view.describe is now the only reader, used by both:
- cached for _TTL_SECONDS as before;
- only http(s) manager-registered addresses, no proxy (apps run
  locally), no redirects;
- at most _MAX_DESCRIBE_BYTES (1 MiB) read, and only a JSON object
  accepted.

The reference provider keeps just its allowlist filter over that
document. The agent's prompt gains the no-redirect, no-proxy and size
bounds; references gain the cache.

* UI and UX update

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

* fix: review agent app requests before first use

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: contain focus in approval dialogs

* fix: preserve consent when dismissing request reviews

* fix: snapshot reviewed defaults for queued app requests

* fix: disclose request inputs before trigger approval

* fix: revoke trigger consent when definitions are unreadable

* Update context button in the chat input, with fold button and command

* fix: surface blocked app requests and hide approved banners

* feature: general purpose sub-agent

* Improve model setting, display in use api/subscription and enable remove of api key

* fix: confirm saved agent app request approvals

* fix browser panel spinner

* feat: include Kanban Board in new CraftBot installations

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* docs: remove the default Agent App guide

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: reuse marketplace settings when bundling Kanban

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* Prompt audit T0 + T1: audit tooling, decision instructions in the system prompt

T0: prompt audit tooling
- scripts/prompt_profile.py: --sections (tokens per prompt block),
  --cache (cache use per model, full prompts vs deltas, delta misses),
  --duplication (decision inputs sent again in the next delta).
- scripts/prompt_replay.py: replays captured decision calls in the
  captured and a candidate layout and compares the chosen actions against
  the model's own run-to-run agreement. Decision calls only, no action is
  executed, nothing is written to llm_calls.db or usage.db.

T1: the decision instructions end the system prompt
- SELECT_ACTION_PROMPT is split into SELECT_ACTION_INSTRUCTIONS (rules,
  output format, <actions>) and the session's own part. The instructions
  end the system prompt (decision_system_prompt), so every session of a
  type reads them from the provider's cache from its first call. The model
  reads the same text in the same order; only the message boundary moved.
- A session history keeps the instructions it started with until it starts
  anew, so a change in what renders now (the Mini Browser rule dropping
  after a failed launch) never breaks a cached prefix in progress.
- One builder, ContextEngine.make_decision_system_prompt (fed by the
  router's decision_instructions hook), for the decision call, /fold and
  both session cache registrations. No other LLM call is affected.
- Saved session histories carry a format number; a history saved before
  this change is not restored (the session starts a new prefix once).
- The Mini Browser prompt filter now applies to the instructions only,
  never to the event stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* label resets, retry in-session, fix lost events

* don't resend the reply's own inputs in deltas

* write fold summaries on the cached session history

* put skills in event stream, pinned when folded

* free deleted sessions and one title request at a time

* describe action sets by where their actions come from

* declare required on every action param, no guessing

* state how replies render per interface, once

* compact action lists, shared params stated once

* Update set requirement action

* lean decision prompt

* fix: preserve MCP results and tighten prompt construction

* fix: preserve history for BytePlus summary overflow

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* update marketplace UI

* update UI for the agent app trigger approval

* allow send email to be parallelizable

* fix portforwarding causing agent app to fail issue

* feat: integrate CraftBot with the Agent-App framework

Use the pinned upstream CLI and A2App contract for native app workflows, lifecycle and task execution while preserving CraftBot's existing app interface and legacy chat wizard.

Add scoped app request handling, subagent verification, packaging, settings integration and regression coverage. Keep the upstream Agent-App implementation unchanged.

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: replace legacy CraftBot app runtime with Agent-App

* refactor: finalize Agent-App bindings and remove legacy tooling

* fix: restore Agent App theme picker and host theme sync

* scaffold new Agent Apps from one blueprint before the build starts instead of refering to kanban agent app

* let the agent choose the blueprint. bind walk-verify to the code fingerprint

* warn the agent when its reply is cut off at the output limit

* re-verify only what changed since the last verified commit

* Fix chat text selection colors and theme-aware splash screen

* remake the subagents due to many places that does not make sense

* feat: connect running Agent Apps and harden installation

* Keep agent docs out of the memory entity graph, tighten the entity judge, add entity delete, and show graph specks in light theme

* Lock ddgs and google-api-python-client for web_search

* rebuild subagents on the main agent's decision loop and stop requirement checks from blocking the event loop

* chore: exclude Agent-App sync documentation from PR

* Rebuild proactive scheduling: local-time cron, self-clearing LLM failure latch, exact-time tasks run in a background session, and a revamped Proactive settings page.

* Update labels, remove the hidden session idea, encourage proactive task to be executed by sub agent

* proactive tasks now can be triggered in its own session

* Gate cron jobs on the scheduler's master switch and pass full job conditions to the run

* Fix background startup after reboot (#526)

* fix: restore automatic startup after system restart

* test: exercise full installs through native startup managers

* fix: preserve login state and correct systemd service paths

* fix: recover installer Python downloads after upstream retirement

* test: verify real reboot identities and graphical logins

* test: provision free reboot probes and save native installers

* test: wait for delayed login tasks and preserve reboot probe window

* test: diagnose hosted Mac reboot lifecycle

* test: prepare bounded free Mac VM validation lab

* fix: retain Ubuntu 22.04 compatibility in native installer builds

* fix: separate native build caches by runner ABI

* Validate installed browser startup with the release frontend build

* Keep Python runtime downloads working when GitHub API is rate limited

* Correct the Windows native runtime registry path

* Wait for OS process teardown in startup acceptance checks

* Cover native runtime recognition and reboot evidence in CI

* Open the native installer without requiring an OpenGL driver

* Use Windows certificate chain validation for installer downloads

* Allow enough free Mac lab time for OS installation and reboot validation

* Remove disposable reboot test infrastructure

* Centralize Python download configuration across install paths

* Install on any Python and any OS, without torch, and much faster

The install path failed for most machines that were not a Windows box with
the right Python already on it. This makes the install self-contained and
fast everywhere.

Interpreter
- install.py runs on any Python 3.8+ and never prompts. CraftBot always
  installs into its own private Python 3.10 (python-build-standalone, from
  app/provision/python_downloads.json), never into the user's: Ubuntu
  22.04's system 3.10 has no pip or ensurepip, Homebrew's is externally
  managed, and installing 200 pinned packages into a user's interpreter
  rewrites their other projects. CRAFTBOT_PYTHON and an active conda env
  still pin an interpreter explicitly.
- Removed the version prompts and the python.org/apt auto-installer (its
  "recommended" path downloaded six 404s and landed on 3.10.11).
- Child processes run in an isolated environment (PYTHONHOME, PYTHONPATH,
  user site-packages and non-network PIP_* settings stripped).
- Tar extraction validated by our own code: tarfile's filter="data" is
  missing before 3.10.12/3.11.4 (macOS 3.9.6, python.org 3.10.11) and
  rejects valid hard links on Ubuntu 22.04's 3.10.12.

Dependencies
- torch, sentence-transformers and docling removed from the core install.
  The memory embedder (bge-small-en-v1.5) runs on ONNX Runtime with
  vectors identical to the sentence-transformers ones (max diff 1.8e-7),
  and scanned-PDF OCR uses RapidOCR. Linux drops from 3.26 GB of CUDA
  wheels to about 0.5 GB; Windows and macOS to about 0.4 GB.
- Locks for win_amd64, macosx_arm64, macosx_x86_64, linux_x86_64 and
  linux_aarch64, generated with uv from one machine. Every pin lists the
  hash of every file published for it, so older macOS and older glibc
  pick a compatible wheel and still verify. Versions match V1.4.5's locks.
- The lock is installed with uv (pinned by hash): ~1 minute instead of
  ~11 with pip. Byte-compilation runs in the background.
- The embedding model is downloaded at install, pinned by SHA-256 in
  app/provision/embedding_model.json, so the first start never depends on
  huggingface.co.
- openpyxl and pandas declared directly (they only arrived via docling).
- read_pdf no longer pip-installs packages at runtime.
- ripgrep bundled for Intel Mac, Linux ARM and Windows ARM.

Networks
- HF_ENDPOINT and CRAFTBOT_MIRRORS rewrite runtime downloads (Python,
  Node, PocketBase, model); the model is still checked by SHA-256.
- Downloads trust the OS certificate store as well as certifi; Node
  children get NODE_USE_ENV_PROXY and, on Node 24+, --use-system-ca; npm,
  Node and uv get the OS proxy when no proxy variable is set.

Checks
- Windows path-length preflight before any download; disk requirement
  measured on the drive that receives the install (3 GB).
- Visual C++ runtime registry check repaired (the key path held a literal
  form feed and never matched).
- Conda mode installs Miniforge (no Anaconda ToS prompt), detects conda
  outside PATH, and the macOS installer arch is detected correctly.

Verified end to end on this branch: Windows from Python 3.11.0 in 610 s
and stock Ubuntu 22.04 python3 without pip in 220 s, both previously
blocked; all five locks dry-run installed for their target platforms.

* Start reliably on every OS and report why when it does not

Built on V1.4.5's login startup (installer/startup.py, run.py --service),
which stays as is; this adds what it did not cover.

- craftbot.py start/install watch the process the whole time; a crash
  prints the log tail and exits non-zero instead of claiming success and
  closing the window. run.py exits with the agent's exit code.
- run.py writes STATE_ROOT/craftbot.pid and ui.json (the live UI
  address), shared by craftbot.py, the launcher and status; windowless
  starts log to STATE_ROOT/craftbot.log.
- If 7925/7926 are taken by another program, the next free pair is used;
  the backend port is injected into the served UI at runtime, so a
  prebuilt UI works on any port. Only a CraftBot of the same STATE_ROOT is
  ever stopped.
- CRAFTBOT_BIND_HOST for Docker and remote use; the Host/Origin guard is
  unchanged. Loopback calls never go through HTTP(S)_PROXY.
- Login services get the PATH, Python, Node, conda and proxy/mirror
  settings captured at install (service-env.json on Windows, loaded under
  --service); a missing systemd and the linger requirement are explained.
- The agent starts before the frontend build so the two overlap, and the
  launcher no longer imports the whole agent stack (via app.config) just
  to find its process ledger: a warm start went from 121 s to 56 s.
- The file index prewarms the agent workspace by default instead of every
  drive (no macOS privacy prompts, no recursive watch on /).
- Background --cli is refused with a pointer to run.py --cli; the console
  close no longer uses wmic or kills the parent shell.
- Uninstall removes CraftBot's private runtimes and npm trees and never
  touches a foreign interpreter or pip cache.
- The updater refuses cleanly outside a git checkout (Docker, ZIP,
  managed installs).
- Runtime files are seeded from shipped defaults (app/config/*.default.json
  and the agent file templates) when missing.

* Stop tracking files CraftBot rewrites at runtime

settings.json (API keys after onboarding), the other app/config JSON files
and the agent's MEMORY.md, ENTITIES.md and PROACTIVE.md were tracked and
rewritten while CraftBot runs, so `git pull` refused to update any
checkout that had been used. The tracked copies also shipped one
developer's memory, entities and provider auth modes to every new user.

They are now created on first start from shipped defaults
(app/config/<name>.default.json and app/data/agent_file_system_template),
only when missing, and ignored by git. The defaults drop the leftover
api_keys_configured and auth_mode entries (auth_mode defaults to api_key
in code).

The in-app updater carries the user's copies across the one pull that
untracks them (verified with a simulated repository for both updater.sh
and updater.bat: the pull succeeds and the user's API key and memory are
kept). AGENT.md, SOUL.md, FORMAT.md and GLOBAL_AGENT_APP.md stay tracked.

* Ship installers that run on every supported OS and architecture

- Linux launchers build in manylinux_2_28 containers (glibc 2.28: Ubuntu
  20.04+, Debian 11+, RHEL 8+), fontconfig loaded at runtime. A gate fails
  the build on any newer glibc symbol or extra linked library, and the
  smoke test runs on Ubuntu 20.04-24.04, Debian 11-13 and AlmaLinux 8/9.
- Linux aarch64 installer added; Linux assets named by architecture.
- Windows Authenticode (Azure Artifact Signing) and macOS Developer ID
  signing, notarization and stapling when the secrets exist, skipped with
  a warning otherwise. Release notes are generated from what was signed,
  with the macOS 15 "Open Anyway" steps when unsigned.
- Linux installs into <data>/source: Uninstall used to delete <data>/app,
  which is also where settings and chat data live.
- Payload downloads retry, are verified against a published SHA-256, and a
  stale local zip is used only when its version matches. V1.4.5's Python
  download and its fallback release are unchanged, now with retries.
- System proxy support (Windows, macOS, GNOME) and CRAFTBOT_MIRRORS for
  every launcher download.
- Child Python processes run isolated from PYTHONHOME/PYTHONPATH/PIP_*.
- The install is recorded only after setup succeeds; failures show Repair
  with the setup log tail; a newer launcher offers Update.
- Running state from STATE_ROOT/craftbot.pid; Open uses ui.json.
- macOS 12 minimum checked before any download; disk check on the drive
  that receives the data.
- New install-e2e workflow: real dependency installs on Windows, macOS
  arm64 and Intel, Ubuntu 22.04, Ubuntu ARM and a Python 3.8 launcher,
  then a start and a 200 from the UI.
- Removed the stale launcher/packaging/release.yml copy and the unused
  OmniParser image build.

* Document the working install paths; real Docker and conda setups

- README (all nine languages): installer first, then the source install
  with the right command per OS (python3 on macOS/Linux), a shallow clone
  or ZIP, and no Node.js or specific Python version required.
  Troubleshooting covers logs, ports, proxies, mirrors, headless servers,
  Gatekeeper, SmartScreen and auto-start on Linux. Removed the stale Node
  18, npm and pip advice and the dead INSTALLATION_FIX.md link.
- Docker runs the browser UI: multi-stage image with the prebuilt UI,
  Node 24, the locked dependencies and the embedding model baked in, a
  /data volume for all state, ports published on 127.0.0.1, a health
  check, and no required .env. The OmniParser service is removed.
- environment.yml uses conda-forge only (the defaults channel now stops
  unattended installs at Anaconda's ToS) and is ASCII so any locale can
  read it.
- .env.example lists only the variables CraftBot actually reads.

* Restore the embedding field the pip-vs-conda parity check compares

The parity fingerprint's embedding entry dropped its "effective" field
when the embedder moved to ONNX Runtime, so the compare step raised
KeyError on every platform. It is back, meaning the same as before: the
model this install's packages can actually run.

* clicking on the desktop icon now open the backend if it hasnt

* fix claude sign in issue when claude cli version not match

* fix connection tester when openai subscription is selected

* Fix prompt-cache routing for subscription providers by sending the ChatGPT session-id and Grok x-grok-conv-id headers and keeping the Claude CLI transcript prefix stable from turn 1.

* Keep blocking work off the event loop to stop CraftBot is busy freezes

* approve agent app connections inside the connect dialog instead of a new tab

* small ui update on the agent app modal

* update the bundled agent app framework to 0.2.1

* Show the builder's questions and requirements review in the Build dialog on the Agent-App 0.2.2 build checkpoints

* Bring back the live build view and give the verifier room to finish a walk, on the Agent-App 0.2.3 re-verify

* Restore the previous look of the agent app request popup, banner and settings on the framework runtime.

* Restore the Agent App host bridge and let app requests do the work they ask for

* Stream agent replies to the chat and start batched actions as they arrive.

* Show action logos, chosen parameters and a live step status in the chat.

* update a2app command icon

* Raise the per-run action limit from 150 to 750

* Raise the per-run token limit and the action timeout by 5x

* Resample marketplace previews to card size and use the box icon in the Add Agent App modal

* Replace textual TUI with react and ink for the terminal interface

* fix CI

* Install the old Python for the launch test without the deadsnakes

* feat: show marketplace publishers and external app provenance (#531)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: restore subscription clients from the runtime profile on startup (#532)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: reconcile release integrations after dev rebase

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* chore: bump version to 1.4.5

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: CraftOS <thamyikfoong@craftos.net>
Co-authored-by: イツミネ <tham_yikfoong@outlook.com>
Co-authored-by: CraftBot <craftbot@craftbot.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ahmad-ajmal added a commit that referenced this pull request Nov 19, 2026
* fix: install env + installer UI

* Upload agent app showcase

* Update agent app visual

* Update README.md

* feat: add reusable session and app references to chat (#505)

* feat: add reusable chat references and harden edge cases

Signed-off-by: はる <165422770+ahmad-ajmal@users.noreply.github.com>

* feat: open installed Agent Apps in the chat side panel (#506)

* feat: open installed agent apps in the chat side panel

* docs: replace panel screenshots with live CraftBot captures

* fix(references): stop an unmatched @ mention from swallowing Enter

Typing "ping @john please review" opened the mention list with no
matches, and the list captured Enter, so the message could not be sent.
Escape only helped until the next keystroke: dismissal was keyed on the
query text, so every character reopened the list.

- With no matches the list is only a hint; it handles Escape alone.
- A multi-word query that matches nothing is prose and closes the list.
- "@" followed by a space is not a mention.
- Escape dismisses the mention at its position until the caret leaves it.
- Composer focus, not a blur-time dismissal, decides visibility.

* fix(chat): make Retry idempotent and reconcile the retried bubble

Retry left its button live, so it could be clicked again while the first
retry was in flight. The server only deduplicated submissions carrying
references, so an attachment-only message clicked twice ran twice and
saved its file twice. Rejection also cleared the bubble's pending flag,
so a successful retry's echo could not replace the failed bubble and
the chat showed both.

- A retry puts the bubble back to pending and clears its error.
- Every client submission through the attachment/reference path gets a
  stable message id and goes through the submission gate. Attachment-only
  sends stay best-effort when the store cannot be read.
- Submission ids use a "submission:" prefix now that they are not
  reference-specific.

* fix(agent-apps): track frame loads in the frame host

Only a mounted surface's load listener recorded that a frame had
loaded. If the user switched panel tabs while an app was loading, the
load finished with nobody listening; on return the frame stayed hidden
behind "Loading app view…" until the 20 s timeout, and Retry then
reloaded the app and lost its state.

The frame host now records every load itself, and surfaces ask it
through isIframeLoaded().

* fix(references): size the reference budget from the running model

The reference token budget read settings.json model.context_window
directly. That bypassed the model catalog the LLM uses, so a catalogued
model's real window was ignored. Because the reference service was also
built for every attachment send, a malformed context_window made int()
throw and rejected attachment-only messages that use no references.

- LLMInterface gains a public context_window() over _context_limits(),
  and the protocol declares it.
- create_reference_service takes the LLM (registry by default) and
  derives the budget with reference_token_budget(); its bounds are
  named constants.
- The adapter builds the reference service only for messages that carry
  references.

* fix(references): read app schemas from the registered app address

AgentAppReferenceProvider fetched describe from a hardcoded
http://127.0.0.1:{backend_port or port}. The agent's own app note
(agent_base) uses project.backend_url or project.url, so an external app
that does not listen on loopback showed its schema to the agent but
"Schema unavailable" in a reference.

The provider now uses the same manager-registered address. It still
never follows redirects or uses a proxy, and it refuses any scheme other
than http(s).

* fix(agent-apps): restore launch guidance and error fallback on the app surface

Moving the app page's states into AgentAppSurface dropped the launching
mascot and its "Installing dependencies, running tests, starting
servers" hint, and an error with no message rendered no text, where the
page used to say "Unknown error".

The launching state shows the mascot and hint again. The error state
falls back to common:status.unknownError, and a launch failure's own
message still shows when the project returns to stopped.

* fix(chat): stop telling users to retry a message that was already accepted

When the agent failed to take a message after it had been saved and
echoed, the error said "The message could not be submitted. Please
retry." A retry of that submission is deduplicated and never reaches
the agent, so the advice could not work.

A failure after acceptance now says the message was saved and asks the
user to send it again as a new message. Failures before acceptance keep
their retryable rejection.

* fix(chat): drop retry data once its bubble is gone

Every sent message kept its full payload, including base64 attachment
content, until the server echoed it. Slash commands never get an echo,
and rejected messages that were never retried, or whose chat was
cleared, deleted or reloaded, kept theirs for the life of the page.
Edit restored a failed message into the composer but left the failed
bubble on screen with a working Retry.

- Retry entries record their session and are pruned on each send when
  their bubble no longer exists. Slash commands are not tracked at all.
- A rejection drops its run-state snapshot once restored; a retry takes
  a fresh one.
- Edit removes the rejected bubble and forgets its retry data.

* refactor(chat-panel): dispatch panel tabs by object, not by parsing ids

The panel strip encoded each tab's meaning into its id ("browser",
"app:<project>", "output:<artifact>") and decoded it again with
startsWith and slice(4)/slice(7). Any id it did not recognise fell
through to removing an app.

Each panel tab now carries its own shown/select/close behaviour, and the
strip looks the tab up by id. Ids stay unique keys for ChromeTabs and
the DOM; nothing reads meaning out of them. usePanelApps returns project
ids (attached, selectedProjectId) through a named AppsPanelMode
contract instead of pre-built prefixed tab ids.

* chore: remove dead code left by the reference and panel features

- 16 unused chat locale keys in all 7 locales: apps.show, tabs, add,
  detach, search, added, done, empty, noMatches, noInstalled, limit (an
  earlier modal-picker design) and references.filter, all,
  selectedCount, sessionSingular, appSingular.
- AgentAppPage.module.css rules for the app states that moved to
  AgentAppSurface (.iframe, .loading, .stopped, .error, .errorMessage,
  .hint, .spinner and its keyframes), plus the unused .results selector.
- The panel toggle's branches for apps that could not run after its
  early return; openApp now always takes a project id.
- Docs that described an empty Apps view with an Add app action and a
  limit message; neither exists. Removing the last app returns to the
  chooser, and attaching past 100 apps is ignored.

* i18n(references): translate the reference strings in all locales

All 19 chat references.* strings were English placeholders in es, id,
ja, ko, zh-CN and zh-TW. They are now translated, using each locale's
existing terms for chats, context and agents. "Agent App" stays as the
product name, as elsewhere in those locales. Interpolations ({{name}},
{{time}}) and the read_reference action name are unchanged.

* refactor(agent-apps): one describe reader for the agent prompt and references

agent_view._describe (the agent's app note: cached, but following
redirects, using environment proxies and reading an unbounded body) and
AgentAppReferenceProvider._describe (references: no redirects, no proxy,
64 KiB cap, but uncached) each fetched /api/_a2app/describe their own
way.

agent_view.describe is now the only reader, used by both:
- cached for _TTL_SECONDS as before;
- only http(s) manager-registered addresses, no proxy (apps run
  locally), no redirects;
- at most _MAX_DESCRIBE_BYTES (1 MiB) read, and only a JSON object
  accepted.

The reference provider keeps just its allowlist filter over that
document. The agent's prompt gains the no-redirect, no-proxy and size
bounds; references gain the cache.

* UI and UX update

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

* fix: review agent app requests before first use

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: contain focus in approval dialogs

* fix: preserve consent when dismissing request reviews

* fix: snapshot reviewed defaults for queued app requests

* fix: disclose request inputs before trigger approval

* fix: revoke trigger consent when definitions are unreadable

* Update context button in the chat input, with fold button and command

* fix: surface blocked app requests and hide approved banners

* feature: general purpose sub-agent

* Improve model setting, display in use api/subscription and enable remove of api key

* fix: confirm saved agent app request approvals

* fix browser panel spinner

* feat: include Kanban Board in new CraftBot installations

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* docs: remove the default Agent App guide

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: reuse marketplace settings when bundling Kanban

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* Prompt audit T0 + T1: audit tooling, decision instructions in the system prompt

T0: prompt audit tooling
- scripts/prompt_profile.py: --sections (tokens per prompt block),
  --cache (cache use per model, full prompts vs deltas, delta misses),
  --duplication (decision inputs sent again in the next delta).
- scripts/prompt_replay.py: replays captured decision calls in the
  captured and a candidate layout and compares the chosen actions against
  the model's own run-to-run agreement. Decision calls only, no action is
  executed, nothing is written to llm_calls.db or usage.db.

T1: the decision instructions end the system prompt
- SELECT_ACTION_PROMPT is split into SELECT_ACTION_INSTRUCTIONS (rules,
  output format, <actions>) and the session's own part. The instructions
  end the system prompt (decision_system_prompt), so every session of a
  type reads them from the provider's cache from its first call. The model
  reads the same text in the same order; only the message boundary moved.
- A session history keeps the instructions it started with until it starts
  anew, so a change in what renders now (the Mini Browser rule dropping
  after a failed launch) never breaks a cached prefix in progress.
- One builder, ContextEngine.make_decision_system_prompt (fed by the
  router's decision_instructions hook), for the decision call, /fold and
  both session cache registrations. No other LLM call is affected.
- Saved session histories carry a format number; a history saved before
  this change is not restored (the session starts a new prefix once).
- The Mini Browser prompt filter now applies to the instructions only,
  never to the event stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* label resets, retry in-session, fix lost events

* don't resend the reply's own inputs in deltas

* write fold summaries on the cached session history

* put skills in event stream, pinned when folded

* free deleted sessions and one title request at a time

* describe action sets by where their actions come from

* declare required on every action param, no guessing

* state how replies render per interface, once

* compact action lists, shared params stated once

* Update set requirement action

* lean decision prompt

* fix: preserve MCP results and tighten prompt construction

* fix: preserve history for BytePlus summary overflow

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* update marketplace UI

* update UI for the agent app trigger approval

* allow send email to be parallelizable

* fix portforwarding causing agent app to fail issue

* feat: integrate CraftBot with the Agent-App framework

Use the pinned upstream CLI and A2App contract for native app workflows, lifecycle and task execution while preserving CraftBot's existing app interface and legacy chat wizard.

Add scoped app request handling, subagent verification, packaging, settings integration and regression coverage. Keep the upstream Agent-App implementation unchanged.

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: replace legacy CraftBot app runtime with Agent-App

* refactor: finalize Agent-App bindings and remove legacy tooling

* fix: restore Agent App theme picker and host theme sync

* scaffold new Agent Apps from one blueprint before the build starts instead of refering to kanban agent app

* let the agent choose the blueprint. bind walk-verify to the code fingerprint

* warn the agent when its reply is cut off at the output limit

* re-verify only what changed since the last verified commit

* Fix chat text selection colors and theme-aware splash screen

* remake the subagents due to many places that does not make sense

* feat: connect running Agent Apps and harden installation

* Keep agent docs out of the memory entity graph, tighten the entity judge, add entity delete, and show graph specks in light theme

* Lock ddgs and google-api-python-client for web_search

* rebuild subagents on the main agent's decision loop and stop requirement checks from blocking the event loop

* chore: exclude Agent-App sync documentation from PR

* Rebuild proactive scheduling: local-time cron, self-clearing LLM failure latch, exact-time tasks run in a background session, and a revamped Proactive settings page.

* Update labels, remove the hidden session idea, encourage proactive task to be executed by sub agent

* proactive tasks now can be triggered in its own session

* Gate cron jobs on the scheduler's master switch and pass full job conditions to the run

* Fix background startup after reboot (#526)

* fix: restore automatic startup after system restart

* test: exercise full installs through native startup managers

* fix: preserve login state and correct systemd service paths

* fix: recover installer Python downloads after upstream retirement

* test: verify real reboot identities and graphical logins

* test: provision free reboot probes and save native installers

* test: wait for delayed login tasks and preserve reboot probe window

* test: diagnose hosted Mac reboot lifecycle

* test: prepare bounded free Mac VM validation lab

* fix: retain Ubuntu 22.04 compatibility in native installer builds

* fix: separate native build caches by runner ABI

* Validate installed browser startup with the release frontend build

* Keep Python runtime downloads working when GitHub API is rate limited

* Correct the Windows native runtime registry path

* Wait for OS process teardown in startup acceptance checks

* Cover native runtime recognition and reboot evidence in CI

* Open the native installer without requiring an OpenGL driver

* Use Windows certificate chain validation for installer downloads

* Allow enough free Mac lab time for OS installation and reboot validation

* Remove disposable reboot test infrastructure

* Centralize Python download configuration across install paths

* Install on any Python and any OS, without torch, and much faster

The install path failed for most machines that were not a Windows box with
the right Python already on it. This makes the install self-contained and
fast everywhere.

Interpreter
- install.py runs on any Python 3.8+ and never prompts. CraftBot always
  installs into its own private Python 3.10 (python-build-standalone, from
  app/provision/python_downloads.json), never into the user's: Ubuntu
  22.04's system 3.10 has no pip or ensurepip, Homebrew's is externally
  managed, and installing 200 pinned packages into a user's interpreter
  rewrites their other projects. CRAFTBOT_PYTHON and an active conda env
  still pin an interpreter explicitly.
- Removed the version prompts and the python.org/apt auto-installer (its
  "recommended" path downloaded six 404s and landed on 3.10.11).
- Child processes run in an isolated environment (PYTHONHOME, PYTHONPATH,
  user site-packages and non-network PIP_* settings stripped).
- Tar extraction validated by our own code: tarfile's filter="data" is
  missing before 3.10.12/3.11.4 (macOS 3.9.6, python.org 3.10.11) and
  rejects valid hard links on Ubuntu 22.04's 3.10.12.

Dependencies
- torch, sentence-transformers and docling removed from the core install.
  The memory embedder (bge-small-en-v1.5) runs on ONNX Runtime with
  vectors identical to the sentence-transformers ones (max diff 1.8e-7),
  and scanned-PDF OCR uses RapidOCR. Linux drops from 3.26 GB of CUDA
  wheels to about 0.5 GB; Windows and macOS to about 0.4 GB.
- Locks for win_amd64, macosx_arm64, macosx_x86_64, linux_x86_64 and
  linux_aarch64, generated with uv from one machine. Every pin lists the
  hash of every file published for it, so older macOS and older glibc
  pick a compatible wheel and still verify. Versions match V1.4.5's locks.
- The lock is installed with uv (pinned by hash): ~1 minute instead of
  ~11 with pip. Byte-compilation runs in the background.
- The embedding model is downloaded at install, pinned by SHA-256 in
  app/provision/embedding_model.json, so the first start never depends on
  huggingface.co.
- openpyxl and pandas declared directly (they only arrived via docling).
- read_pdf no longer pip-installs packages at runtime.
- ripgrep bundled for Intel Mac, Linux ARM and Windows ARM.

Networks
- HF_ENDPOINT and CRAFTBOT_MIRRORS rewrite runtime downloads (Python,
  Node, PocketBase, model); the model is still checked by SHA-256.
- Downloads trust the OS certificate store as well as certifi; Node
  children get NODE_USE_ENV_PROXY and, on Node 24+, --use-system-ca; npm,
  Node and uv get the OS proxy when no proxy variable is set.

Checks
- Windows path-length preflight before any download; disk requirement
  measured on the drive that receives the install (3 GB).
- Visual C++ runtime registry check repaired (the key path held a literal
  form feed and never matched).
- Conda mode installs Miniforge (no Anaconda ToS prompt), detects conda
  outside PATH, and the macOS installer arch is detected correctly.

Verified end to end on this branch: Windows from Python 3.11.0 in 610 s
and stock Ubuntu 22.04 python3 without pip in 220 s, both previously
blocked; all five locks dry-run installed for their target platforms.

* Start reliably on every OS and report why when it does not

Built on V1.4.5's login startup (installer/startup.py, run.py --service),
which stays as is; this adds what it did not cover.

- craftbot.py start/install watch the process the whole time; a crash
  prints the log tail and exits non-zero instead of claiming success and
  closing the window. run.py exits with the agent's exit code.
- run.py writes STATE_ROOT/craftbot.pid and ui.json (the live UI
  address), shared by craftbot.py, the launcher and status; windowless
  starts log to STATE_ROOT/craftbot.log.
- If 7925/7926 are taken by another program, the next free pair is used;
  the backend port is injected into the served UI at runtime, so a
  prebuilt UI works on any port. Only a CraftBot of the same STATE_ROOT is
  ever stopped.
- CRAFTBOT_BIND_HOST for Docker and remote use; the Host/Origin guard is
  unchanged. Loopback calls never go through HTTP(S)_PROXY.
- Login services get the PATH, Python, Node, conda and proxy/mirror
  settings captured at install (service-env.json on Windows, loaded under
  --service); a missing systemd and the linger requirement are explained.
- The agent starts before the frontend build so the two overlap, and the
  launcher no longer imports the whole agent stack (via app.config) just
  to find its process ledger: a warm start went from 121 s to 56 s.
- The file index prewarms the agent workspace by default instead of every
  drive (no macOS privacy prompts, no recursive watch on /).
- Background --cli is refused with a pointer to run.py --cli; the console
  close no longer uses wmic or kills the parent shell.
- Uninstall removes CraftBot's private runtimes and npm trees and never
  touches a foreign interpreter or pip cache.
- The updater refuses cleanly outside a git checkout (Docker, ZIP,
  managed installs).
- Runtime files are seeded from shipped defaults (app/config/*.default.json
  and the agent file templates) when missing.

* Stop tracking files CraftBot rewrites at runtime

settings.json (API keys after onboarding), the other app/config JSON files
and the agent's MEMORY.md, ENTITIES.md and PROACTIVE.md were tracked and
rewritten while CraftBot runs, so `git pull` refused to update any
checkout that had been used. The tracked copies also shipped one
developer's memory, entities and provider auth modes to every new user.

They are now created on first start from shipped defaults
(app/config/<name>.default.json and app/data/agent_file_system_template),
only when missing, and ignored by git. The defaults drop the leftover
api_keys_configured and auth_mode entries (auth_mode defaults to api_key
in code).

The in-app updater carries the user's copies across the one pull that
untracks them (verified with a simulated repository for both updater.sh
and updater.bat: the pull succeeds and the user's API key and memory are
kept). AGENT.md, SOUL.md, FORMAT.md and GLOBAL_AGENT_APP.md stay tracked.

* Ship installers that run on every supported OS and architecture

- Linux launchers build in manylinux_2_28 containers (glibc 2.28: Ubuntu
  20.04+, Debian 11+, RHEL 8+), fontconfig loaded at runtime. A gate fails
  the build on any newer glibc symbol or extra linked library, and the
  smoke test runs on Ubuntu 20.04-24.04, Debian 11-13 and AlmaLinux 8/9.
- Linux aarch64 installer added; Linux assets named by architecture.
- Windows Authenticode (Azure Artifact Signing) and macOS Developer ID
  signing, notarization and stapling when the secrets exist, skipped with
  a warning otherwise. Release notes are generated from what was signed,
  with the macOS 15 "Open Anyway" steps when unsigned.
- Linux installs into <data>/source: Uninstall used to delete <data>/app,
  which is also where settings and chat data live.
- Payload downloads retry, are verified against a published SHA-256, and a
  stale local zip is used only when its version matches. V1.4.5's Python
  download and its fallback release are unchanged, now with retries.
- System proxy support (Windows, macOS, GNOME) and CRAFTBOT_MIRRORS for
  every launcher download.
- Child Python processes run isolated from PYTHONHOME/PYTHONPATH/PIP_*.
- The install is recorded only after setup succeeds; failures show Repair
  with the setup log tail; a newer launcher offers Update.
- Running state from STATE_ROOT/craftbot.pid; Open uses ui.json.
- macOS 12 minimum checked before any download; disk check on the drive
  that receives the data.
- New install-e2e workflow: real dependency installs on Windows, macOS
  arm64 and Intel, Ubuntu 22.04, Ubuntu ARM and a Python 3.8 launcher,
  then a start and a 200 from the UI.
- Removed the stale launcher/packaging/release.yml copy and the unused
  OmniParser image build.

* Document the working install paths; real Docker and conda setups

- README (all nine languages): installer first, then the source install
  with the right command per OS (python3 on macOS/Linux), a shallow clone
  or ZIP, and no Node.js or specific Python version required.
  Troubleshooting covers logs, ports, proxies, mirrors, headless servers,
  Gatekeeper, SmartScreen and auto-start on Linux. Removed the stale Node
  18, npm and pip advice and the dead INSTALLATION_FIX.md link.
- Docker runs the browser UI: multi-stage image with the prebuilt UI,
  Node 24, the locked dependencies and the embedding model baked in, a
  /data volume for all state, ports published on 127.0.0.1, a health
  check, and no required .env. The OmniParser service is removed.
- environment.yml uses conda-forge only (the defaults channel now stops
  unattended installs at Anaconda's ToS) and is ASCII so any locale can
  read it.
- .env.example lists only the variables CraftBot actually reads.

* Restore the embedding field the pip-vs-conda parity check compares

The parity fingerprint's embedding entry dropped its "effective" field
when the embedder moved to ONNX Runtime, so the compare step raised
KeyError on every platform. It is back, meaning the same as before: the
model this install's packages can actually run.

* clicking on the desktop icon now open the backend if it hasnt

* fix claude sign in issue when claude cli version not match

* fix connection tester when openai subscription is selected

* Fix prompt-cache routing for subscription providers by sending the ChatGPT session-id and Grok x-grok-conv-id headers and keeping the Claude CLI transcript prefix stable from turn 1.

* Keep blocking work off the event loop to stop CraftBot is busy freezes

* approve agent app connections inside the connect dialog instead of a new tab

* small ui update on the agent app modal

* update the bundled agent app framework to 0.2.1

* Show the builder's questions and requirements review in the Build dialog on the Agent-App 0.2.2 build checkpoints

* Bring back the live build view and give the verifier room to finish a walk, on the Agent-App 0.2.3 re-verify

* Restore the previous look of the agent app request popup, banner and settings on the framework runtime.

* Restore the Agent App host bridge and let app requests do the work they ask for

* Stream agent replies to the chat and start batched actions as they arrive.

* Show action logos, chosen parameters and a live step status in the chat.

* update a2app command icon

* Raise the per-run action limit from 150 to 750

* Raise the per-run token limit and the action timeout by 5x

* Resample marketplace previews to card size and use the box icon in the Add Agent App modal

* Replace textual TUI with react and ink for the terminal interface

* fix CI

* Install the old Python for the launch test without the deadsnakes

* feat: show marketplace publishers and external app provenance (#531)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: restore subscription clients from the runtime profile on startup (#532)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: reconcile release integrations after dev rebase

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* chore: bump version to 1.4.5

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: CraftOS <thamyikfoong@craftos.net>
Co-authored-by: イツミネ <tham_yikfoong@outlook.com>
Co-authored-by: CraftBot <craftbot@craftbot.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ahmad-ajmal added a commit that referenced this pull request Nov 19, 2026
…es (#534)

* V1.4.5 (#533)

* fix: install env + installer UI

* Upload agent app showcase

* Update agent app visual

* Update README.md

* feat: add reusable session and app references to chat (#505)

* feat: add reusable chat references and harden edge cases

Signed-off-by: はる <165422770+ahmad-ajmal@users.noreply.github.com>

* feat: open installed Agent Apps in the chat side panel (#506)

* feat: open installed agent apps in the chat side panel

* docs: replace panel screenshots with live CraftBot captures

* fix(references): stop an unmatched @ mention from swallowing Enter

Typing "ping @john please review" opened the mention list with no
matches, and the list captured Enter, so the message could not be sent.
Escape only helped until the next keystroke: dismissal was keyed on the
query text, so every character reopened the list.

- With no matches the list is only a hint; it handles Escape alone.
- A multi-word query that matches nothing is prose and closes the list.
- "@" followed by a space is not a mention.
- Escape dismisses the mention at its position until the caret leaves it.
- Composer focus, not a blur-time dismissal, decides visibility.

* fix(chat): make Retry idempotent and reconcile the retried bubble

Retry left its button live, so it could be clicked again while the first
retry was in flight. The server only deduplicated submissions carrying
references, so an attachment-only message clicked twice ran twice and
saved its file twice. Rejection also cleared the bubble's pending flag,
so a successful retry's echo could not replace the failed bubble and
the chat showed both.

- A retry puts the bubble back to pending and clears its error.
- Every client submission through the attachment/reference path gets a
  stable message id and goes through the submission gate. Attachment-only
  sends stay best-effort when the store cannot be read.
- Submission ids use a "submission:" prefix now that they are not
  reference-specific.

* fix(agent-apps): track frame loads in the frame host

Only a mounted surface's load listener recorded that a frame had
loaded. If the user switched panel tabs while an app was loading, the
load finished with nobody listening; on return the frame stayed hidden
behind "Loading app view…" until the 20 s timeout, and Retry then
reloaded the app and lost its state.

The frame host now records every load itself, and surfaces ask it
through isIframeLoaded().

* fix(references): size the reference budget from the running model

The reference token budget read settings.json model.context_window
directly. That bypassed the model catalog the LLM uses, so a catalogued
model's real window was ignored. Because the reference service was also
built for every attachment send, a malformed context_window made int()
throw and rejected attachment-only messages that use no references.

- LLMInterface gains a public context_window() over _context_limits(),
  and the protocol declares it.
- create_reference_service takes the LLM (registry by default) and
  derives the budget with reference_token_budget(); its bounds are
  named constants.
- The adapter builds the reference service only for messages that carry
  references.

* fix(references): read app schemas from the registered app address

AgentAppReferenceProvider fetched describe from a hardcoded
http://127.0.0.1:{backend_port or port}. The agent's own app note
(agent_base) uses project.backend_url or project.url, so an external app
that does not listen on loopback showed its schema to the agent but
"Schema unavailable" in a reference.

The provider now uses the same manager-registered address. It still
never follows redirects or uses a proxy, and it refuses any scheme other
than http(s).

* fix(agent-apps): restore launch guidance and error fallback on the app surface

Moving the app page's states into AgentAppSurface dropped the launching
mascot and its "Installing dependencies, running tests, starting
servers" hint, and an error with no message rendered no text, where the
page used to say "Unknown error".

The launching state shows the mascot and hint again. The error state
falls back to common:status.unknownError, and a launch failure's own
message still shows when the project returns to stopped.

* fix(chat): stop telling users to retry a message that was already accepted

When the agent failed to take a message after it had been saved and
echoed, the error said "The message could not be submitted. Please
retry." A retry of that submission is deduplicated and never reaches
the agent, so the advice could not work.

A failure after acceptance now says the message was saved and asks the
user to send it again as a new message. Failures before acceptance keep
their retryable rejection.

* fix(chat): drop retry data once its bubble is gone

Every sent message kept its full payload, including base64 attachment
content, until the server echoed it. Slash commands never get an echo,
and rejected messages that were never retried, or whose chat was
cleared, deleted or reloaded, kept theirs for the life of the page.
Edit restored a failed message into the composer but left the failed
bubble on screen with a working Retry.

- Retry entries record their session and are pruned on each send when
  their bubble no longer exists. Slash commands are not tracked at all.
- A rejection drops its run-state snapshot once restored; a retry takes
  a fresh one.
- Edit removes the rejected bubble and forgets its retry data.

* refactor(chat-panel): dispatch panel tabs by object, not by parsing ids

The panel strip encoded each tab's meaning into its id ("browser",
"app:<project>", "output:<artifact>") and decoded it again with
startsWith and slice(4)/slice(7). Any id it did not recognise fell
through to removing an app.

Each panel tab now carries its own shown/select/close behaviour, and the
strip looks the tab up by id. Ids stay unique keys for ChromeTabs and
the DOM; nothing reads meaning out of them. usePanelApps returns project
ids (attached, selectedProjectId) through a named AppsPanelMode
contract instead of pre-built prefixed tab ids.

* chore: remove dead code left by the reference and panel features

- 16 unused chat locale keys in all 7 locales: apps.show, tabs, add,
  detach, search, added, done, empty, noMatches, noInstalled, limit (an
  earlier modal-picker design) and references.filter, all,
  selectedCount, sessionSingular, appSingular.
- AgentAppPage.module.css rules for the app states that moved to
  AgentAppSurface (.iframe, .loading, .stopped, .error, .errorMessage,
  .hint, .spinner and its keyframes), plus the unused .results selector.
- The panel toggle's branches for apps that could not run after its
  early return; openApp now always takes a project id.
- Docs that described an empty Apps view with an Add app action and a
  limit message; neither exists. Removing the last app returns to the
  chooser, and attaching past 100 apps is ignored.

* i18n(references): translate the reference strings in all locales

All 19 chat references.* strings were English placeholders in es, id,
ja, ko, zh-CN and zh-TW. They are now translated, using each locale's
existing terms for chats, context and agents. "Agent App" stays as the
product name, as elsewhere in those locales. Interpolations ({{name}},
{{time}}) and the read_reference action name are unchanged.

* refactor(agent-apps): one describe reader for the agent prompt and references

agent_view._describe (the agent's app note: cached, but following
redirects, using environment proxies and reading an unbounded body) and
AgentAppReferenceProvider._describe (references: no redirects, no proxy,
64 KiB cap, but uncached) each fetched /api/_a2app/describe their own
way.

agent_view.describe is now the only reader, used by both:
- cached for _TTL_SECONDS as before;
- only http(s) manager-registered addresses, no proxy (apps run
  locally), no redirects;
- at most _MAX_DESCRIBE_BYTES (1 MiB) read, and only a JSON object
  accepted.

The reference provider keeps just its allowlist filter over that
document. The agent's prompt gains the no-redirect, no-proxy and size
bounds; references gain the cache.

* UI and UX update

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

* fix: review agent app requests before first use

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: contain focus in approval dialogs

* fix: preserve consent when dismissing request reviews

* fix: snapshot reviewed defaults for queued app requests

* fix: disclose request inputs before trigger approval

* fix: revoke trigger consent when definitions are unreadable

* Update context button in the chat input, with fold button and command

* fix: surface blocked app requests and hide approved banners

* feature: general purpose sub-agent

* Improve model setting, display in use api/subscription and enable remove of api key

* fix: confirm saved agent app request approvals

* fix browser panel spinner

* feat: include Kanban Board in new CraftBot installations

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* docs: remove the default Agent App guide

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: reuse marketplace settings when bundling Kanban

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* Prompt audit T0 + T1: audit tooling, decision instructions in the system prompt

T0: prompt audit tooling
- scripts/prompt_profile.py: --sections (tokens per prompt block),
  --cache (cache use per model, full prompts vs deltas, delta misses),
  --duplication (decision inputs sent again in the next delta).
- scripts/prompt_replay.py: replays captured decision calls in the
  captured and a candidate layout and compares the chosen actions against
  the model's own run-to-run agreement. Decision calls only, no action is
  executed, nothing is written to llm_calls.db or usage.db.

T1: the decision instructions end the system prompt
- SELECT_ACTION_PROMPT is split into SELECT_ACTION_INSTRUCTIONS (rules,
  output format, <actions>) and the session's own part. The instructions
  end the system prompt (decision_system_prompt), so every session of a
  type reads them from the provider's cache from its first call. The model
  reads the same text in the same order; only the message boundary moved.
- A session history keeps the instructions it started with until it starts
  anew, so a change in what renders now (the Mini Browser rule dropping
  after a failed launch) never breaks a cached prefix in progress.
- One builder, ContextEngine.make_decision_system_prompt (fed by the
  router's decision_instructions hook), for the decision call, /fold and
  both session cache registrations. No other LLM call is affected.
- Saved session histories carry a format number; a history saved before
  this change is not restored (the session starts a new prefix once).
- The Mini Browser prompt filter now applies to the instructions only,
  never to the event stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* label resets, retry in-session, fix lost events

* don't resend the reply's own inputs in deltas

* write fold summaries on the cached session history

* put skills in event stream, pinned when folded

* free deleted sessions and one title request at a time

* describe action sets by where their actions come from

* declare required on every action param, no guessing

* state how replies render per interface, once

* compact action lists, shared params stated once

* Update set requirement action

* lean decision prompt

* fix: preserve MCP results and tighten prompt construction

* fix: preserve history for BytePlus summary overflow

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* update marketplace UI

* update UI for the agent app trigger approval

* allow send email to be parallelizable

* fix portforwarding causing agent app to fail issue

* feat: integrate CraftBot with the Agent-App framework

Use the pinned upstream CLI and A2App contract for native app workflows, lifecycle and task execution while preserving CraftBot's existing app interface and legacy chat wizard.

Add scoped app request handling, subagent verification, packaging, settings integration and regression coverage. Keep the upstream Agent-App implementation unchanged.

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: replace legacy CraftBot app runtime with Agent-App

* refactor: finalize Agent-App bindings and remove legacy tooling

* fix: restore Agent App theme picker and host theme sync

* scaffold new Agent Apps from one blueprint before the build starts instead of refering to kanban agent app

* let the agent choose the blueprint. bind walk-verify to the code fingerprint

* warn the agent when its reply is cut off at the output limit

* re-verify only what changed since the last verified commit

* Fix chat text selection colors and theme-aware splash screen

* remake the subagents due to many places that does not make sense

* feat: connect running Agent Apps and harden installation

* Keep agent docs out of the memory entity graph, tighten the entity judge, add entity delete, and show graph specks in light theme

* Lock ddgs and google-api-python-client for web_search

* rebuild subagents on the main agent's decision loop and stop requirement checks from blocking the event loop

* chore: exclude Agent-App sync documentation from PR

* Rebuild proactive scheduling: local-time cron, self-clearing LLM failure latch, exact-time tasks run in a background session, and a revamped Proactive settings page.

* Update labels, remove the hidden session idea, encourage proactive task to be executed by sub agent

* proactive tasks now can be triggered in its own session

* Gate cron jobs on the scheduler's master switch and pass full job conditions to the run

* Fix background startup after reboot (#526)

* fix: restore automatic startup after system restart

* test: exercise full installs through native startup managers

* fix: preserve login state and correct systemd service paths

* fix: recover installer Python downloads after upstream retirement

* test: verify real reboot identities and graphical logins

* test: provision free reboot probes and save native installers

* test: wait for delayed login tasks and preserve reboot probe window

* test: diagnose hosted Mac reboot lifecycle

* test: prepare bounded free Mac VM validation lab

* fix: retain Ubuntu 22.04 compatibility in native installer builds

* fix: separate native build caches by runner ABI

* Validate installed browser startup with the release frontend build

* Keep Python runtime downloads working when GitHub API is rate limited

* Correct the Windows native runtime registry path

* Wait for OS process teardown in startup acceptance checks

* Cover native runtime recognition and reboot evidence in CI

* Open the native installer without requiring an OpenGL driver

* Use Windows certificate chain validation for installer downloads

* Allow enough free Mac lab time for OS installation and reboot validation

* Remove disposable reboot test infrastructure

* Centralize Python download configuration across install paths

* Install on any Python and any OS, without torch, and much faster

The install path failed for most machines that were not a Windows box with
the right Python already on it. This makes the install self-contained and
fast everywhere.

Interpreter
- install.py runs on any Python 3.8+ and never prompts. CraftBot always
  installs into its own private Python 3.10 (python-build-standalone, from
  app/provision/python_downloads.json), never into the user's: Ubuntu
  22.04's system 3.10 has no pip or ensurepip, Homebrew's is externally
  managed, and installing 200 pinned packages into a user's interpreter
  rewrites their other projects. CRAFTBOT_PYTHON and an active conda env
  still pin an interpreter explicitly.
- Removed the version prompts and the python.org/apt auto-installer (its
  "recommended" path downloaded six 404s and landed on 3.10.11).
- Child processes run in an isolated environment (PYTHONHOME, PYTHONPATH,
  user site-packages and non-network PIP_* settings stripped).
- Tar extraction validated by our own code: tarfile's filter="data" is
  missing before 3.10.12/3.11.4 (macOS 3.9.6, python.org 3.10.11) and
  rejects valid hard links on Ubuntu 22.04's 3.10.12.

Dependencies
- torch, sentence-transformers and docling removed from the core install.
  The memory embedder (bge-small-en-v1.5) runs on ONNX Runtime with
  vectors identical to the sentence-transformers ones (max diff 1.8e-7),
  and scanned-PDF OCR uses RapidOCR. Linux drops from 3.26 GB of CUDA
  wheels to about 0.5 GB; Windows and macOS to about 0.4 GB.
- Locks for win_amd64, macosx_arm64, macosx_x86_64, linux_x86_64 and
  linux_aarch64, generated with uv from one machine. Every pin lists the
  hash of every file published for it, so older macOS and older glibc
  pick a compatible wheel and still verify. Versions match V1.4.5's locks.
- The lock is installed with uv (pinned by hash): ~1 minute instead of
  ~11 with pip. Byte-compilation runs in the background.
- The embedding model is downloaded at install, pinned by SHA-256 in
  app/provision/embedding_model.json, so the first start never depends on
  huggingface.co.
- openpyxl and pandas declared directly (they only arrived via docling).
- read_pdf no longer pip-installs packages at runtime.
- ripgrep bundled for Intel Mac, Linux ARM and Windows ARM.

Networks
- HF_ENDPOINT and CRAFTBOT_MIRRORS rewrite runtime downloads (Python,
  Node, PocketBase, model); the model is still checked by SHA-256.
- Downloads trust the OS certificate store as well as certifi; Node
  children get NODE_USE_ENV_PROXY and, on Node 24+, --use-system-ca; npm,
  Node and uv get the OS proxy when no proxy variable is set.

Checks
- Windows path-length preflight before any download; disk requirement
  measured on the drive that receives the install (3 GB).
- Visual C++ runtime registry check repaired (the key path held a literal
  form feed and never matched).
- Conda mode installs Miniforge (no Anaconda ToS prompt), detects conda
  outside PATH, and the macOS installer arch is detected correctly.

Verified end to end on this branch: Windows from Python 3.11.0 in 610 s
and stock Ubuntu 22.04 python3 without pip in 220 s, both previously
blocked; all five locks dry-run installed for their target platforms.

* Start reliably on every OS and report why when it does not

Built on V1.4.5's login startup (installer/startup.py, run.py --service),
which stays as is; this adds what it did not cover.

- craftbot.py start/install watch the process the whole time; a crash
  prints the log tail and exits non-zero instead of claiming success and
  closing the window. run.py exits with the agent's exit code.
- run.py writes STATE_ROOT/craftbot.pid and ui.json (the live UI
  address), shared by craftbot.py, the launcher and status; windowless
  starts log to STATE_ROOT/craftbot.log.
- If 7925/7926 are taken by another program, the next free pair is used;
  the backend port is injected into the served UI at runtime, so a
  prebuilt UI works on any port. Only a CraftBot of the same STATE_ROOT is
  ever stopped.
- CRAFTBOT_BIND_HOST for Docker and remote use; the Host/Origin guard is
  unchanged. Loopback calls never go through HTTP(S)_PROXY.
- Login services get the PATH, Python, Node, conda and proxy/mirror
  settings captured at install (service-env.json on Windows, loaded under
  --service); a missing systemd and the linger requirement are explained.
- The agent starts before the frontend build so the two overlap, and the
  launcher no longer imports the whole agent stack (via app.config) just
  to find its process ledger: a warm start went from 121 s to 56 s.
- The file index prewarms the agent workspace by default instead of every
  drive (no macOS privacy prompts, no recursive watch on /).
- Background --cli is refused with a pointer to run.py --cli; the console
  close no longer uses wmic or kills the parent shell.
- Uninstall removes CraftBot's private runtimes and npm trees and never
  touches a foreign interpreter or pip cache.
- The updater refuses cleanly outside a git checkout (Docker, ZIP,
  managed installs).
- Runtime files are seeded from shipped defaults (app/config/*.default.json
  and the agent file templates) when missing.

* Stop tracking files CraftBot rewrites at runtime

settings.json (API keys after onboarding), the other app/config JSON files
and the agent's MEMORY.md, ENTITIES.md and PROACTIVE.md were tracked and
rewritten while CraftBot runs, so `git pull` refused to update any
checkout that had been used. The tracked copies also shipped one
developer's memory, entities and provider auth modes to every new user.

They are now created on first start from shipped defaults
(app/config/<name>.default.json and app/data/agent_file_system_template),
only when missing, and ignored by git. The defaults drop the leftover
api_keys_configured and auth_mode entries (auth_mode defaults to api_key
in code).

The in-app updater carries the user's copies across the one pull that
untracks them (verified with a simulated repository for both updater.sh
and updater.bat: the pull succeeds and the user's API key and memory are
kept). AGENT.md, SOUL.md, FORMAT.md and GLOBAL_AGENT_APP.md stay tracked.

* Ship installers that run on every supported OS and architecture

- Linux launchers build in manylinux_2_28 containers (glibc 2.28: Ubuntu
  20.04+, Debian 11+, RHEL 8+), fontconfig loaded at runtime. A gate fails
  the build on any newer glibc symbol or extra linked library, and the
  smoke test runs on Ubuntu 20.04-24.04, Debian 11-13 and AlmaLinux 8/9.
- Linux aarch64 installer added; Linux assets named by architecture.
- Windows Authenticode (Azure Artifact Signing) and macOS Developer ID
  signing, notarization and stapling when the secrets exist, skipped with
  a warning otherwise. Release notes are generated from what was signed,
  with the macOS 15 "Open Anyway" steps when unsigned.
- Linux installs into <data>/source: Uninstall used to delete <data>/app,
  which is also where settings and chat data live.
- Payload downloads retry, are verified against a published SHA-256, and a
  stale local zip is used only when its version matches. V1.4.5's Python
  download and its fallback release are unchanged, now with retries.
- System proxy support (Windows, macOS, GNOME) and CRAFTBOT_MIRRORS for
  every launcher download.
- Child Python processes run isolated from PYTHONHOME/PYTHONPATH/PIP_*.
- The install is recorded only after setup succeeds; failures show Repair
  with the setup log tail; a newer launcher offers Update.
- Running state from STATE_ROOT/craftbot.pid; Open uses ui.json.
- macOS 12 minimum checked before any download; disk check on the drive
  that receives the data.
- New install-e2e workflow: real dependency installs on Windows, macOS
  arm64 and Intel, Ubuntu 22.04, Ubuntu ARM and a Python 3.8 launcher,
  then a start and a 200 from the UI.
- Removed the stale launcher/packaging/release.yml copy and the unused
  OmniParser image build.

* Document the working install paths; real Docker and conda setups

- README (all nine languages): installer first, then the source install
  with the right command per OS (python3 on macOS/Linux), a shallow clone
  or ZIP, and no Node.js or specific Python version required.
  Troubleshooting covers logs, ports, proxies, mirrors, headless servers,
  Gatekeeper, SmartScreen and auto-start on Linux. Removed the stale Node
  18, npm and pip advice and the dead INSTALLATION_FIX.md link.
- Docker runs the browser UI: multi-stage image with the prebuilt UI,
  Node 24, the locked dependencies and the embedding model baked in, a
  /data volume for all state, ports published on 127.0.0.1, a health
  check, and no required .env. The OmniParser service is removed.
- environment.yml uses conda-forge only (the defaults channel now stops
  unattended installs at Anaconda's ToS) and is ASCII so any locale can
  read it.
- .env.example lists only the variables CraftBot actually reads.

* Restore the embedding field the pip-vs-conda parity check compares

The parity fingerprint's embedding entry dropped its "effective" field
when the embedder moved to ONNX Runtime, so the compare step raised
KeyError on every platform. It is back, meaning the same as before: the
model this install's packages can actually run.

* clicking on the desktop icon now open the backend if it hasnt

* fix claude sign in issue when claude cli version not match

* fix connection tester when openai subscription is selected

* Fix prompt-cache routing for subscription providers by sending the ChatGPT session-id and Grok x-grok-conv-id headers and keeping the Claude CLI transcript prefix stable from turn 1.

* Keep blocking work off the event loop to stop CraftBot is busy freezes

* approve agent app connections inside the connect dialog instead of a new tab

* small ui update on the agent app modal

* update the bundled agent app framework to 0.2.1

* Show the builder's questions and requirements review in the Build dialog on the Agent-App 0.2.2 build checkpoints

* Bring back the live build view and give the verifier room to finish a walk, on the Agent-App 0.2.3 re-verify

* Restore the previous look of the agent app request popup, banner and settings on the framework runtime.

* Restore the Agent App host bridge and let app requests do the work they ask for

* Stream agent replies to the chat and start batched actions as they arrive.

* Show action logos, chosen parameters and a live step status in the chat.

* update a2app command icon

* Raise the per-run action limit from 150 to 750

* Raise the per-run token limit and the action timeout by 5x

* Resample marketplace previews to card size and use the box icon in the Add Agent App modal

* Replace textual TUI with react and ink for the terminal interface

* fix CI

* Install the old Python for the launch test without the deadsnakes

* feat: show marketplace publishers and external app provenance (#531)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: restore subscription clients from the runtime profile on startup (#532)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: reconcile release integrations after dev rebase

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* chore: bump version to 1.4.5

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: CraftOS <thamyikfoong@craftos.net>
Co-authored-by: イツミネ <tham_yikfoong@outlook.com>
Co-authored-by: CraftBot <craftbot@craftbot.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* style: satisfy staging Ruff checks for v1.4.5

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* feat: add web_search.google_cse_base_url setting (#525)

Google ends the Custom Search JSON API for existing customers on January 1, 2027, and the Google path had no way to point at another host, so it would fail and drop to DuckDuckGo. Empty keeps Google's endpoint.

Signed-off-by: Tarek Etman <tarek@specstream.ai>

* fix #488: gate startup URL on browser readiness (#513)

* fix #488: gate startup URL on browser readiness

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Rohan <rohantiwari166@gmail.com>

* fix #488: recheck frontend after agent startup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Rohan <rohantiwari166@gmail.com>

* docs: align readiness comments with current startup order

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: Rohan <rohantiwari166@gmail.com>
Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: use the endpoint announced by MCP SSE servers (#509)

* fix: use the endpoint announced by MCP SSE servers

SSETransport POSTed requests to self.url.replace('/sse', '/message')
and ignored the server's first 'endpoint' event. Servers whose message
path differs (e.g. the official Python SDK: /sse and /messages/?session_id=...)
returned 404, so initialize timed out after 30s.

- Read the 'endpoint' event and POST to it. The URL is resolved against the
  SSE URL and ignored if its origin differs.
- Wait for the endpoint before sending initialize; if none arrives within
  ENDPOINT_TIMEOUT, fall back to the previous guessed URL.
- Send notifications/initialized after initialize, as the stdio and
  websocket transports already do.
- Add tests with a spec-style SSE server.

Fixes #508

* fix: buffer SSE fields per event and compare origins by effective port

Process an event when its blank line arrives so data: may precede event:,
and treat https://host and https://host:443 as the same origin.

* style: format SSE regression tests for current Ruff

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Signed-off-by: Tarek Etman <tarek@specstream.ai>
Signed-off-by: Rohan <rohantiwari166@gmail.com>
Co-authored-by: CraftOS <thamyikfoong@craftos.net>
Co-authored-by: イツミネ <tham_yikfoong@outlook.com>
Co-authored-by: CraftBot <craftbot@craftbot.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: SpecStream <tarek@specstream.ai>
Co-authored-by: Rohan Tiwari <145037553+rohantiwari9573@users.noreply.github.com>
Co-authored-by: Ankit Garg <anki88520@gmail.com>
ahmad-ajmal added a commit that referenced this pull request Nov 19, 2026
…es (#534)

* V1.4.5 (#533)

* fix: install env + installer UI

* Upload agent app showcase

* Update agent app visual

* Update README.md

* feat: add reusable session and app references to chat (#505)

* feat: add reusable chat references and harden edge cases

Signed-off-by: はる <165422770+ahmad-ajmal@users.noreply.github.com>

* feat: open installed Agent Apps in the chat side panel (#506)

* feat: open installed agent apps in the chat side panel

* docs: replace panel screenshots with live CraftBot captures

* fix(references): stop an unmatched @ mention from swallowing Enter

Typing "ping @john please review" opened the mention list with no
matches, and the list captured Enter, so the message could not be sent.
Escape only helped until the next keystroke: dismissal was keyed on the
query text, so every character reopened the list.

- With no matches the list is only a hint; it handles Escape alone.
- A multi-word query that matches nothing is prose and closes the list.
- "@" followed by a space is not a mention.
- Escape dismisses the mention at its position until the caret leaves it.
- Composer focus, not a blur-time dismissal, decides visibility.

* fix(chat): make Retry idempotent and reconcile the retried bubble

Retry left its button live, so it could be clicked again while the first
retry was in flight. The server only deduplicated submissions carrying
references, so an attachment-only message clicked twice ran twice and
saved its file twice. Rejection also cleared the bubble's pending flag,
so a successful retry's echo could not replace the failed bubble and
the chat showed both.

- A retry puts the bubble back to pending and clears its error.
- Every client submission through the attachment/reference path gets a
  stable message id and goes through the submission gate. Attachment-only
  sends stay best-effort when the store cannot be read.
- Submission ids use a "submission:" prefix now that they are not
  reference-specific.

* fix(agent-apps): track frame loads in the frame host

Only a mounted surface's load listener recorded that a frame had
loaded. If the user switched panel tabs while an app was loading, the
load finished with nobody listening; on return the frame stayed hidden
behind "Loading app view…" until the 20 s timeout, and Retry then
reloaded the app and lost its state.

The frame host now records every load itself, and surfaces ask it
through isIframeLoaded().

* fix(references): size the reference budget from the running model

The reference token budget read settings.json model.context_window
directly. That bypassed the model catalog the LLM uses, so a catalogued
model's real window was ignored. Because the reference service was also
built for every attachment send, a malformed context_window made int()
throw and rejected attachment-only messages that use no references.

- LLMInterface gains a public context_window() over _context_limits(),
  and the protocol declares it.
- create_reference_service takes the LLM (registry by default) and
  derives the budget with reference_token_budget(); its bounds are
  named constants.
- The adapter builds the reference service only for messages that carry
  references.

* fix(references): read app schemas from the registered app address

AgentAppReferenceProvider fetched describe from a hardcoded
http://127.0.0.1:{backend_port or port}. The agent's own app note
(agent_base) uses project.backend_url or project.url, so an external app
that does not listen on loopback showed its schema to the agent but
"Schema unavailable" in a reference.

The provider now uses the same manager-registered address. It still
never follows redirects or uses a proxy, and it refuses any scheme other
than http(s).

* fix(agent-apps): restore launch guidance and error fallback on the app surface

Moving the app page's states into AgentAppSurface dropped the launching
mascot and its "Installing dependencies, running tests, starting
servers" hint, and an error with no message rendered no text, where the
page used to say "Unknown error".

The launching state shows the mascot and hint again. The error state
falls back to common:status.unknownError, and a launch failure's own
message still shows when the project returns to stopped.

* fix(chat): stop telling users to retry a message that was already accepted

When the agent failed to take a message after it had been saved and
echoed, the error said "The message could not be submitted. Please
retry." A retry of that submission is deduplicated and never reaches
the agent, so the advice could not work.

A failure after acceptance now says the message was saved and asks the
user to send it again as a new message. Failures before acceptance keep
their retryable rejection.

* fix(chat): drop retry data once its bubble is gone

Every sent message kept its full payload, including base64 attachment
content, until the server echoed it. Slash commands never get an echo,
and rejected messages that were never retried, or whose chat was
cleared, deleted or reloaded, kept theirs for the life of the page.
Edit restored a failed message into the composer but left the failed
bubble on screen with a working Retry.

- Retry entries record their session and are pruned on each send when
  their bubble no longer exists. Slash commands are not tracked at all.
- A rejection drops its run-state snapshot once restored; a retry takes
  a fresh one.
- Edit removes the rejected bubble and forgets its retry data.

* refactor(chat-panel): dispatch panel tabs by object, not by parsing ids

The panel strip encoded each tab's meaning into its id ("browser",
"app:<project>", "output:<artifact>") and decoded it again with
startsWith and slice(4)/slice(7). Any id it did not recognise fell
through to removing an app.

Each panel tab now carries its own shown/select/close behaviour, and the
strip looks the tab up by id. Ids stay unique keys for ChromeTabs and
the DOM; nothing reads meaning out of them. usePanelApps returns project
ids (attached, selectedProjectId) through a named AppsPanelMode
contract instead of pre-built prefixed tab ids.

* chore: remove dead code left by the reference and panel features

- 16 unused chat locale keys in all 7 locales: apps.show, tabs, add,
  detach, search, added, done, empty, noMatches, noInstalled, limit (an
  earlier modal-picker design) and references.filter, all,
  selectedCount, sessionSingular, appSingular.
- AgentAppPage.module.css rules for the app states that moved to
  AgentAppSurface (.iframe, .loading, .stopped, .error, .errorMessage,
  .hint, .spinner and its keyframes), plus the unused .results selector.
- The panel toggle's branches for apps that could not run after its
  early return; openApp now always takes a project id.
- Docs that described an empty Apps view with an Add app action and a
  limit message; neither exists. Removing the last app returns to the
  chooser, and attaching past 100 apps is ignored.

* i18n(references): translate the reference strings in all locales

All 19 chat references.* strings were English placeholders in es, id,
ja, ko, zh-CN and zh-TW. They are now translated, using each locale's
existing terms for chats, context and agents. "Agent App" stays as the
product name, as elsewhere in those locales. Interpolations ({{name}},
{{time}}) and the read_reference action name are unchanged.

* refactor(agent-apps): one describe reader for the agent prompt and references

agent_view._describe (the agent's app note: cached, but following
redirects, using environment proxies and reading an unbounded body) and
AgentAppReferenceProvider._describe (references: no redirects, no proxy,
64 KiB cap, but uncached) each fetched /api/_a2app/describe their own
way.

agent_view.describe is now the only reader, used by both:
- cached for _TTL_SECONDS as before;
- only http(s) manager-registered addresses, no proxy (apps run
  locally), no redirects;
- at most _MAX_DESCRIBE_BYTES (1 MiB) read, and only a JSON object
  accepted.

The reference provider keeps just its allowlist filter over that
document. The agent's prompt gains the no-redirect, no-proxy and size
bounds; references gain the cache.

* UI and UX update

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

---------

Co-authored-by: zfoong <tham_yikfoong@outlook.com>

* fix: review agent app requests before first use

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: contain focus in approval dialogs

* fix: preserve consent when dismissing request reviews

* fix: snapshot reviewed defaults for queued app requests

* fix: disclose request inputs before trigger approval

* fix: revoke trigger consent when definitions are unreadable

* Update context button in the chat input, with fold button and command

* fix: surface blocked app requests and hide approved banners

* feature: general purpose sub-agent

* Improve model setting, display in use api/subscription and enable remove of api key

* fix: confirm saved agent app request approvals

* fix browser panel spinner

* feat: include Kanban Board in new CraftBot installations

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* docs: remove the default Agent App guide

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: reuse marketplace settings when bundling Kanban

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* Prompt audit T0 + T1: audit tooling, decision instructions in the system prompt

T0: prompt audit tooling
- scripts/prompt_profile.py: --sections (tokens per prompt block),
  --cache (cache use per model, full prompts vs deltas, delta misses),
  --duplication (decision inputs sent again in the next delta).
- scripts/prompt_replay.py: replays captured decision calls in the
  captured and a candidate layout and compares the chosen actions against
  the model's own run-to-run agreement. Decision calls only, no action is
  executed, nothing is written to llm_calls.db or usage.db.

T1: the decision instructions end the system prompt
- SELECT_ACTION_PROMPT is split into SELECT_ACTION_INSTRUCTIONS (rules,
  output format, <actions>) and the session's own part. The instructions
  end the system prompt (decision_system_prompt), so every session of a
  type reads them from the provider's cache from its first call. The model
  reads the same text in the same order; only the message boundary moved.
- A session history keeps the instructions it started with until it starts
  anew, so a change in what renders now (the Mini Browser rule dropping
  after a failed launch) never breaks a cached prefix in progress.
- One builder, ContextEngine.make_decision_system_prompt (fed by the
  router's decision_instructions hook), for the decision call, /fold and
  both session cache registrations. No other LLM call is affected.
- Saved session histories carry a format number; a history saved before
  this change is not restored (the session starts a new prefix once).
- The Mini Browser prompt filter now applies to the instructions only,
  never to the event stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* label resets, retry in-session, fix lost events

* don't resend the reply's own inputs in deltas

* write fold summaries on the cached session history

* put skills in event stream, pinned when folded

* free deleted sessions and one title request at a time

* describe action sets by where their actions come from

* declare required on every action param, no guessing

* state how replies render per interface, once

* compact action lists, shared params stated once

* Update set requirement action

* lean decision prompt

* fix: preserve MCP results and tighten prompt construction

* fix: preserve history for BytePlus summary overflow

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* update marketplace UI

* update UI for the agent app trigger approval

* allow send email to be parallelizable

* fix portforwarding causing agent app to fail issue

* feat: integrate CraftBot with the Agent-App framework

Use the pinned upstream CLI and A2App contract for native app workflows, lifecycle and task execution while preserving CraftBot's existing app interface and legacy chat wizard.

Add scoped app request handling, subagent verification, packaging, settings integration and regression coverage. Keep the upstream Agent-App implementation unchanged.

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* refactor: replace legacy CraftBot app runtime with Agent-App

* refactor: finalize Agent-App bindings and remove legacy tooling

* fix: restore Agent App theme picker and host theme sync

* scaffold new Agent Apps from one blueprint before the build starts instead of refering to kanban agent app

* let the agent choose the blueprint. bind walk-verify to the code fingerprint

* warn the agent when its reply is cut off at the output limit

* re-verify only what changed since the last verified commit

* Fix chat text selection colors and theme-aware splash screen

* remake the subagents due to many places that does not make sense

* feat: connect running Agent Apps and harden installation

* Keep agent docs out of the memory entity graph, tighten the entity judge, add entity delete, and show graph specks in light theme

* Lock ddgs and google-api-python-client for web_search

* rebuild subagents on the main agent's decision loop and stop requirement checks from blocking the event loop

* chore: exclude Agent-App sync documentation from PR

* Rebuild proactive scheduling: local-time cron, self-clearing LLM failure latch, exact-time tasks run in a background session, and a revamped Proactive settings page.

* Update labels, remove the hidden session idea, encourage proactive task to be executed by sub agent

* proactive tasks now can be triggered in its own session

* Gate cron jobs on the scheduler's master switch and pass full job conditions to the run

* Fix background startup after reboot (#526)

* fix: restore automatic startup after system restart

* test: exercise full installs through native startup managers

* fix: preserve login state and correct systemd service paths

* fix: recover installer Python downloads after upstream retirement

* test: verify real reboot identities and graphical logins

* test: provision free reboot probes and save native installers

* test: wait for delayed login tasks and preserve reboot probe window

* test: diagnose hosted Mac reboot lifecycle

* test: prepare bounded free Mac VM validation lab

* fix: retain Ubuntu 22.04 compatibility in native installer builds

* fix: separate native build caches by runner ABI

* Validate installed browser startup with the release frontend build

* Keep Python runtime downloads working when GitHub API is rate limited

* Correct the Windows native runtime registry path

* Wait for OS process teardown in startup acceptance checks

* Cover native runtime recognition and reboot evidence in CI

* Open the native installer without requiring an OpenGL driver

* Use Windows certificate chain validation for installer downloads

* Allow enough free Mac lab time for OS installation and reboot validation

* Remove disposable reboot test infrastructure

* Centralize Python download configuration across install paths

* Install on any Python and any OS, without torch, and much faster

The install path failed for most machines that were not a Windows box with
the right Python already on it. This makes the install self-contained and
fast everywhere.

Interpreter
- install.py runs on any Python 3.8+ and never prompts. CraftBot always
  installs into its own private Python 3.10 (python-build-standalone, from
  app/provision/python_downloads.json), never into the user's: Ubuntu
  22.04's system 3.10 has no pip or ensurepip, Homebrew's is externally
  managed, and installing 200 pinned packages into a user's interpreter
  rewrites their other projects. CRAFTBOT_PYTHON and an active conda env
  still pin an interpreter explicitly.
- Removed the version prompts and the python.org/apt auto-installer (its
  "recommended" path downloaded six 404s and landed on 3.10.11).
- Child processes run in an isolated environment (PYTHONHOME, PYTHONPATH,
  user site-packages and non-network PIP_* settings stripped).
- Tar extraction validated by our own code: tarfile's filter="data" is
  missing before 3.10.12/3.11.4 (macOS 3.9.6, python.org 3.10.11) and
  rejects valid hard links on Ubuntu 22.04's 3.10.12.

Dependencies
- torch, sentence-transformers and docling removed from the core install.
  The memory embedder (bge-small-en-v1.5) runs on ONNX Runtime with
  vectors identical to the sentence-transformers ones (max diff 1.8e-7),
  and scanned-PDF OCR uses RapidOCR. Linux drops from 3.26 GB of CUDA
  wheels to about 0.5 GB; Windows and macOS to about 0.4 GB.
- Locks for win_amd64, macosx_arm64, macosx_x86_64, linux_x86_64 and
  linux_aarch64, generated with uv from one machine. Every pin lists the
  hash of every file published for it, so older macOS and older glibc
  pick a compatible wheel and still verify. Versions match V1.4.5's locks.
- The lock is installed with uv (pinned by hash): ~1 minute instead of
  ~11 with pip. Byte-compilation runs in the background.
- The embedding model is downloaded at install, pinned by SHA-256 in
  app/provision/embedding_model.json, so the first start never depends on
  huggingface.co.
- openpyxl and pandas declared directly (they only arrived via docling).
- read_pdf no longer pip-installs packages at runtime.
- ripgrep bundled for Intel Mac, Linux ARM and Windows ARM.

Networks
- HF_ENDPOINT and CRAFTBOT_MIRRORS rewrite runtime downloads (Python,
  Node, PocketBase, model); the model is still checked by SHA-256.
- Downloads trust the OS certificate store as well as certifi; Node
  children get NODE_USE_ENV_PROXY and, on Node 24+, --use-system-ca; npm,
  Node and uv get the OS proxy when no proxy variable is set.

Checks
- Windows path-length preflight before any download; disk requirement
  measured on the drive that receives the install (3 GB).
- Visual C++ runtime registry check repaired (the key path held a literal
  form feed and never matched).
- Conda mode installs Miniforge (no Anaconda ToS prompt), detects conda
  outside PATH, and the macOS installer arch is detected correctly.

Verified end to end on this branch: Windows from Python 3.11.0 in 610 s
and stock Ubuntu 22.04 python3 without pip in 220 s, both previously
blocked; all five locks dry-run installed for their target platforms.

* Start reliably on every OS and report why when it does not

Built on V1.4.5's login startup (installer/startup.py, run.py --service),
which stays as is; this adds what it did not cover.

- craftbot.py start/install watch the process the whole time; a crash
  prints the log tail and exits non-zero instead of claiming success and
  closing the window. run.py exits with the agent's exit code.
- run.py writes STATE_ROOT/craftbot.pid and ui.json (the live UI
  address), shared by craftbot.py, the launcher and status; windowless
  starts log to STATE_ROOT/craftbot.log.
- If 7925/7926 are taken by another program, the next free pair is used;
  the backend port is injected into the served UI at runtime, so a
  prebuilt UI works on any port. Only a CraftBot of the same STATE_ROOT is
  ever stopped.
- CRAFTBOT_BIND_HOST for Docker and remote use; the Host/Origin guard is
  unchanged. Loopback calls never go through HTTP(S)_PROXY.
- Login services get the PATH, Python, Node, conda and proxy/mirror
  settings captured at install (service-env.json on Windows, loaded under
  --service); a missing systemd and the linger requirement are explained.
- The agent starts before the frontend build so the two overlap, and the
  launcher no longer imports the whole agent stack (via app.config) just
  to find its process ledger: a warm start went from 121 s to 56 s.
- The file index prewarms the agent workspace by default instead of every
  drive (no macOS privacy prompts, no recursive watch on /).
- Background --cli is refused with a pointer to run.py --cli; the console
  close no longer uses wmic or kills the parent shell.
- Uninstall removes CraftBot's private runtimes and npm trees and never
  touches a foreign interpreter or pip cache.
- The updater refuses cleanly outside a git checkout (Docker, ZIP,
  managed installs).
- Runtime files are seeded from shipped defaults (app/config/*.default.json
  and the agent file templates) when missing.

* Stop tracking files CraftBot rewrites at runtime

settings.json (API keys after onboarding), the other app/config JSON files
and the agent's MEMORY.md, ENTITIES.md and PROACTIVE.md were tracked and
rewritten while CraftBot runs, so `git pull` refused to update any
checkout that had been used. The tracked copies also shipped one
developer's memory, entities and provider auth modes to every new user.

They are now created on first start from shipped defaults
(app/config/<name>.default.json and app/data/agent_file_system_template),
only when missing, and ignored by git. The defaults drop the leftover
api_keys_configured and auth_mode entries (auth_mode defaults to api_key
in code).

The in-app updater carries the user's copies across the one pull that
untracks them (verified with a simulated repository for both updater.sh
and updater.bat: the pull succeeds and the user's API key and memory are
kept). AGENT.md, SOUL.md, FORMAT.md and GLOBAL_AGENT_APP.md stay tracked.

* Ship installers that run on every supported OS and architecture

- Linux launchers build in manylinux_2_28 containers (glibc 2.28: Ubuntu
  20.04+, Debian 11+, RHEL 8+), fontconfig loaded at runtime. A gate fails
  the build on any newer glibc symbol or extra linked library, and the
  smoke test runs on Ubuntu 20.04-24.04, Debian 11-13 and AlmaLinux 8/9.
- Linux aarch64 installer added; Linux assets named by architecture.
- Windows Authenticode (Azure Artifact Signing) and macOS Developer ID
  signing, notarization and stapling when the secrets exist, skipped with
  a warning otherwise. Release notes are generated from what was signed,
  with the macOS 15 "Open Anyway" steps when unsigned.
- Linux installs into <data>/source: Uninstall used to delete <data>/app,
  which is also where settings and chat data live.
- Payload downloads retry, are verified against a published SHA-256, and a
  stale local zip is used only when its version matches. V1.4.5's Python
  download and its fallback release are unchanged, now with retries.
- System proxy support (Windows, macOS, GNOME) and CRAFTBOT_MIRRORS for
  every launcher download.
- Child Python processes run isolated from PYTHONHOME/PYTHONPATH/PIP_*.
- The install is recorded only after setup succeeds; failures show Repair
  with the setup log tail; a newer launcher offers Update.
- Running state from STATE_ROOT/craftbot.pid; Open uses ui.json.
- macOS 12 minimum checked before any download; disk check on the drive
  that receives the data.
- New install-e2e workflow: real dependency installs on Windows, macOS
  arm64 and Intel, Ubuntu 22.04, Ubuntu ARM and a Python 3.8 launcher,
  then a start and a 200 from the UI.
- Removed the stale launcher/packaging/release.yml copy and the unused
  OmniParser image build.

* Document the working install paths; real Docker and conda setups

- README (all nine languages): installer first, then the source install
  with the right command per OS (python3 on macOS/Linux), a shallow clone
  or ZIP, and no Node.js or specific Python version required.
  Troubleshooting covers logs, ports, proxies, mirrors, headless servers,
  Gatekeeper, SmartScreen and auto-start on Linux. Removed the stale Node
  18, npm and pip advice and the dead INSTALLATION_FIX.md link.
- Docker runs the browser UI: multi-stage image with the prebuilt UI,
  Node 24, the locked dependencies and the embedding model baked in, a
  /data volume for all state, ports published on 127.0.0.1, a health
  check, and no required .env. The OmniParser service is removed.
- environment.yml uses conda-forge only (the defaults channel now stops
  unattended installs at Anaconda's ToS) and is ASCII so any locale can
  read it.
- .env.example lists only the variables CraftBot actually reads.

* Restore the embedding field the pip-vs-conda parity check compares

The parity fingerprint's embedding entry dropped its "effective" field
when the embedder moved to ONNX Runtime, so the compare step raised
KeyError on every platform. It is back, meaning the same as before: the
model this install's packages can actually run.

* clicking on the desktop icon now open the backend if it hasnt

* fix claude sign in issue when claude cli version not match

* fix connection tester when openai subscription is selected

* Fix prompt-cache routing for subscription providers by sending the ChatGPT session-id and Grok x-grok-conv-id headers and keeping the Claude CLI transcript prefix stable from turn 1.

* Keep blocking work off the event loop to stop CraftBot is busy freezes

* approve agent app connections inside the connect dialog instead of a new tab

* small ui update on the agent app modal

* update the bundled agent app framework to 0.2.1

* Show the builder's questions and requirements review in the Build dialog on the Agent-App 0.2.2 build checkpoints

* Bring back the live build view and give the verifier room to finish a walk, on the Agent-App 0.2.3 re-verify

* Restore the previous look of the agent app request popup, banner and settings on the framework runtime.

* Restore the Agent App host bridge and let app requests do the work they ask for

* Stream agent replies to the chat and start batched actions as they arrive.

* Show action logos, chosen parameters and a live step status in the chat.

* update a2app command icon

* Raise the per-run action limit from 150 to 750

* Raise the per-run token limit and the action timeout by 5x

* Resample marketplace previews to card size and use the box icon in the Add Agent App modal

* Replace textual TUI with react and ink for the terminal interface

* fix CI

* Install the old Python for the launch test without the deadsnakes

* feat: show marketplace publishers and external app provenance (#531)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: restore subscription clients from the runtime profile on startup (#532)

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: reconcile release integrations after dev rebase

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* chore: bump version to 1.4.5

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: CraftOS <thamyikfoong@craftos.net>
Co-authored-by: イツミネ <tham_yikfoong@outlook.com>
Co-authored-by: CraftBot <craftbot@craftbot.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* style: satisfy staging Ruff checks for v1.4.5

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* feat: add web_search.google_cse_base_url setting (#525)

Google ends the Custom Search JSON API for existing customers on January 1, 2027, and the Google path had no way to point at another host, so it would fail and drop to DuckDuckGo. Empty keeps Google's endpoint.

Signed-off-by: Tarek Etman <tarek@specstream.ai>

* fix #488: gate startup URL on browser readiness (#513)

* fix #488: gate startup URL on browser readiness

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Rohan <rohantiwari166@gmail.com>

* fix #488: recheck frontend after agent startup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Rohan <rohantiwari166@gmail.com>

* docs: align readiness comments with current startup order

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: Rohan <rohantiwari166@gmail.com>
Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

* fix: use the endpoint announced by MCP SSE servers (#509)

* fix: use the endpoint announced by MCP SSE servers

SSETransport POSTed requests to self.url.replace('/sse', '/message')
and ignored the server's first 'endpoint' event. Servers whose message
path differs (e.g. the official Python SDK: /sse and /messages/?session_id=...)
returned 404, so initialize timed out after 30s.

- Read the 'endpoint' event and POST to it. The URL is resolved against the
  SSE URL and ignored if its origin differs.
- Wait for the endpoint before sending initialize; if none arrives within
  ENDPOINT_TIMEOUT, fall back to the previous guessed URL.
- Send notifications/initialized after initialize, as the stdio and
  websocket transports already do.
- Add tests with a spec-style SSE server.

Fixes #508

* fix: buffer SSE fields per event and compare origins by effective port

Process an event when its blank line arrives so data: may precede event:,
and treat https://host and https://host:443 as the same origin.

* style: format SSE regression tests for current Ruff

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Co-authored-by: ahmad-ajmal <ahmadajmal1514@gmail.com>

---------

Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
Signed-off-by: Tarek Etman <tarek@specstream.ai>
Signed-off-by: Rohan <rohantiwari166@gmail.com>
Co-authored-by: CraftOS <thamyikfoong@craftos.net>
Co-authored-by: イツミネ <tham_yikfoong@outlook.com>
Co-authored-by: CraftBot <craftbot@craftbot.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: SpecStream <tarek@specstream.ai>
Co-authored-by: Rohan Tiwari <145037553+rohantiwari9573@users.noreply.github.com>
Co-authored-by: Ankit Garg <anki88520@gmail.com>
@ahmad-ajmal
ahmad-ajmal deleted the feature/external-agent-apps branch November 20, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant