Skip to content

feat(btw): constrain computer use by loop runtime - #142

Merged
BegoniaHe merged 1 commit into
split/btw-loop-modelsfrom
split/btw-loop-runtime
Sep 10, 2026
Merged

BegoniaHe merged 1 commit into
split/btw-loop-modelsfrom
split/btw-loop-runtime

Conversation

@YUZHEthefool

@YUZHEthefool YUZHEthefool commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

Keep Computer Use out of conversation and resolve work runtime as inherit, none, local, or sandbox. Apply the same boundary to main-agent catalog assembly, handoffs, and explicitly supplied computer tools.

Related issue

Related: #129
Parent: #122
Design: #28

Stack

  • Base: split/btw-loop-models. Depends on PR #141.
  • Follow-up PRs: #143.

Behavior

Keep Computer Use unavailable to conversation and let work inherit or explicitly select none/local/sandbox. Apply restrictions through current request/tool assembly and the existing authorization service.

Non-goals

Authorization redesign, automatic elevation, new sandbox backends, and legacy configuration support are outside scope.

Implementation notes

Base branch: split/btw-loop-models. Depends on PR #141. This PR shows only this feature's changes relative to that dependency. The original prototype at 33ee103a62937db3e930c89ba47a648b75cc7772 is provenance; integration follows current master's owners and authorization contracts. The parent issue records review/integration order.

No new HTTP contract or dependency changes. Feature settings and behavior are documented in both languages.

Validation

Combined backend validation: 551 passed, 3 skipped across 18 modules covering both loops, commands/status, detached delivery, providers, capability catalogs, Skills, authorization, metadata conversion, and import boundaries. All five feature heads passed 8 metadata tests. Frozen-lockfile Dashboard checks passed: 3 selector tests, i18n, tsc, vue-tsc, and production build; MDI generation has no tracked asset delta. The VitePress /help/ build and targeted Pyright passed. The final rebase only incorporates six corrected Chinese strings from B3; metadata and i18n checks were repeated after that correction.

Combined checks were run on the integrated capability worktree at 660ebedfb3bb508865a5f2797d00cc50bec63d46. The final branch retains that implementation with the inherited translation correction noted above. Run backend commands from the worktree root, Dashboard commands from dashboard/, and documentation commands from docs/:

& D:/project/Zephirum/.venv/Scripts/python.exe -m pytest tests/unit/test_conversation_loop.py tests/unit/test_btw_work_loop.py tests/unit/test_btw_delivery.py tests/unit/test_btw_status.py tests/unit/test_builtin_command_extensions.py tests/unit/test_process_stage.py tests/unit/test_pipeline_scheduler_order.py tests/unit/test_agent_internal_process.py tests/unit/test_astr_main_agent.py tests/unit/test_astr_agent_tool_exec.py tests/unit/test_skill_tool_assembly.py tests/unit/test_btw_capability_routes.py tests/unit/test_btw_skill_routes.py tests/unit/test_config.py tests/unit/test_config_metadata_i18n.py tests/unit/test_authorization_service.py tests/unit/test_core_import_smoke.py tests/unit/test_import_boundaries.py --basetemp=.tmp/pytest-final-integrated -q

# dashboard/
node node_modules/vitest/vitest.mjs run --config vitest.config.ts tests/pluginLoopSelector.vitest.ts tests/capabilityLoopSelector.vitest.ts
node scripts/check-i18n.mjs
node node_modules/typescript/bin/tsc -p tsconfig.vite-config.json --noEmit
node node_modules/vue-tsc/bin/vue-tsc.js --noEmit
node node_modules/vite/bin/vite.js build *> ../.tmp/final-dashboard-build.log
node scripts/write-dashboard-version.mjs

# docs/
$env:ASTRBOT_DOCS_BASE='/help/'
node node_modules/vitepress/bin/vitepress.js build

Python checks used the existing Python 3.14.1 environment with python -m pytest and task-local --basetemp directories. Local Node was 24.11.1; CI must validate the pinned toolchain. Relevant scoped formatting and Markdown checks were run. The root tracker records the final combined validation. No live model evaluation is implied by deterministic tests or documentation checks.

Compatibility and risk

Preserves current master authorization, including configuration-scoped IM instance-tool roles. Runtime selection does not grant privileges. Existing future imports are retained; the incompatible pyupgrade hook is skipped while Ruff remains active.

Checklist

  • A corresponding development Issue exists and this PR contains one feature or experiment.
  • Tests and bilingual documentation accompany the change, or missing experimental implementation is explicitly described.
  • Existing authorization, current APIs/configuration, Python 3.14+, and integrated documentation constraints are retained.
  • No dependencies, credentials, generated site output, or fork publication claims are introduced.
  • A human maintainer review and separate AI-assisted review have approved merging.

Repository references: AGENTS.md, GOVERNANCE.md, AI_POLICY.md, and the feat PR template.

Agent note

Codex prepared this PR at the user's request to split the original #28 implementation into reviewable features, with only classifier experiments marked as drafts. AI assisted extraction, current-path adaptation, tests, and English descriptions. The validation above was performed locally; remaining limitations are stated explicitly. This note is not a maintainer approval. No PR has been merged.

Extract Computer Use boundaries from the original PR #28 prototype and
apply them through the current request tool catalog. Keep conversation
requests and handoffs free of computer tools, and let work select the
inherited, local, sandbox, or disabled runtime without changing authority.

Fixes #129
AI-Generated: true
Generated-At: 2026-09-10T15:38:41Z
@BegoniaHe
BegoniaHe force-pushed the split/btw-loop-runtime branch from 4d5392f to 0e6b1b5 Compare September 10, 2026 19:25
@BegoniaHe
BegoniaHe merged commit 037994e into master Sep 10, 2026
1 of 25 checks passed
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.

feat(btw): constrain computer use by loop runtime

2 participants