Skip to content

feat(core): shell-tools feature gate — mobile/embedder profile - #47

Merged
ajianaz merged 1 commit into
developfrom
feat/mobile-ready-gating
Aug 28, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/mobile-ready-gating

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

Phase 0 of the uteke-mobile integration plan: subprocess-backed tools (run_command, git, gh, cora_search, uteke) move behind the shell-tools feature — default-on, so the CLI host is unchanged. Embedders on shell-less platforms (Android/iOS via flutter_rust_bridge) build tole-core with --no-default-features and register their own tool set; storage / state machine / turn loop / provider remain pure std+serde and compile everywhere.

tole-cli mirrors the feature (shell-tools = ["tole-core/shell-tools"]) so its cfg attributes resolve without clippy unexpected_cfg warnings. The embedder profile is documented in the crate docs.

Why

Tole is being prepared as the chatbot harness for uteke-mobile (owner-approved direction: all-Rust, runs inside Flutter, BYOK LLM). The mobile embed cannot spawn subprocesses — this gate is the precondition for tole-core = "x.y" as a crates.io dependency of uteke-ffi, without dragging a shell dependency into an Android build.

Testing

  • Default profile (CLI): 138/138 tests, clippy clean — unchanged behavior.
  • Mobile profile: cargo check/test -p tole-core --no-default-features compiles and passes 85/85 core tests (storage, state machine, turn loop, file tools, provider — everything except the 5 shell-tool modules).

Phase 0 of the uteke-mobile integration plan: subprocess-backed tools
(run_command, git, gh, cora_search, uteke) move behind the shell-tools
feature, default-on so the CLI host is unchanged. Embedders on
shell-less platforms (Android/iOS via flutter_rust_bridge) build
tole-core with --no-default-features and register their own tool set;
storage/state machine/turn loop/provider remain pure std+serde.

Verified both profiles: default 138/138 tests + clippy clean; mobile
profile (--no-default-features) compiles and passes 85/85 core tests.
tole-cli mirrors the feature so its cfg resolves; documented the
embedder profile in the crate docs.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 8983c4f into develop Aug 28, 2026
11 checks passed
@ajianaz
ajianaz deleted the feat/mobile-ready-gating branch August 28, 2026 01:19
ajianaz added a commit that referenced this pull request Sep 12, 2026
…ecovery (#68)

* chore(release): v0.3.0 — reliability & long-running work

Version bump 0.2.0 -> 0.3.0 (minor: real features per house versioning),
CHANGELOG entries for #57-#66, publish workflow extended to ship
tole-cli (version-pinned core dependency, published after core),
cli manifest pins tole-core 0.3.0.

* fix(ci): run security checks on PRs targeting main too

The main ruleset REQUIRES 'Cargo Audit' and 'Trivy FS Scan', but
security.yml only produced them for PRs targeting develop - release PRs
to main were permanently blocked (the documented impossible-required-
check trap: admin cannot bypass required checks). Align the trigger set
with ci.yml (develop, main).

* fix: harden replay safety, guard resume, jail validation, torn-line recovery

CodeCora full-scan findings triaged pre-tag (1 CRITICAL + 3 MAJOR real):
- turn: derive ReplaySafety from tool risk (CRITICAL #33) - a crash after
  a Write/Destructive effect ran must not blindly re-execute on resume;
  Guarded now forces re-consultation of the approver.
- turn: Guarded resume actually consults the approver and settles the
  intent either way (MAJOR #34) - Allow replays once; deny/absent settles
  the sandwich as failed instead of livelocking every future resume.
- jails: component-based path validation everywhere (MAJOR #6, INFO #12)
  - Windows drive-prefixed/rooted relatives escape via join despite not
  being is_absolute(); substring '..' both misses them and rejects benign
  names. Uniform across WriteFileTool, core file_tools, read_file.
- storage: torn-line accounting (MAJOR #47) - good_bytes counted before
  parse made a newline-terminated invalid final line look consumed; the
  truncation never fired and the next append bricked the session. Now
  counted only after a successful parse; empty lines still counted.
Tests: guarded deny (settles, no livelock), guarded allow (fires exactly
once), full workspace green; fmt/clippy clean; CodeCora diff review clean.

---------

Co-authored-by: ajianaz <[email protected]>
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