You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by zh...@apache.org on 2026/10/16 10:27:10 UTC

(maka) 03/03: Merge remote-tracking branch 'origin/rust-preview' into feat/runtime-host-rust

This is an automated email from the ASF dual-hosted git repository.

me2seeks pushed a commit to branch rust-preview
in repository https://gitbox.apache.org/repos/asf/maka.git

commit 2aaffdb8c0d0dcde357b18f3fca74e0a628fc19a
Merge: e361ad5942 d53d46a4b9
Author: me2seeks <me...@gmail.com>
AuthorDate: Fri Oct 16 18:26:20 2026 +0800

    Merge remote-tracking branch 'origin/rust-preview' into feat/runtime-host-rust
    
    # Conflicts:
    #       packages/plugin-sdk/src/configurations.ts
    #       packages/plugin-sdk/src/generated/runtime.ts
    #       platform/event-log/src/handoff/evidence.rs
    #       platform/event-log/tests/continuation/handoff.rs
    #       platform/event-log/tests/continuation/handoff_budget.rs
    #       platform/event-log/tests/continuation/handoff_cancel.rs
    #       platform/event-log/tests/continuation/handoff_claim.rs
    #       platform/event-log/tests/continuation/handoff_consumers.rs
    #       platform/presentation/tests/projection.rs
    #       platform/render-terminal/src/application.rs
    #       platform/render-terminal/src/application/resources.rs
    #       plugins/agent/api/src/contract.rs
    #       plugins/agent/engine/src/handoff.rs
    #       plugins/agent/engine/src/lib.rs
    #       plugins/agent/engine/src/runner.rs
    #       plugins/agent/engine/src/steps.rs
    #       plugins/agent/engine/tests/integration/code_mode_lifetime.rs
    #       plugins/agent/engine/tests/integration/code_mode_media.rs
    #       plugins/agent/engine/tests/integration/context_overflow.rs
    #       plugins/agent/engine/tests/integration/dynamic_tools.rs
    #       plugins/agent/engine/tests/integration/dynamic_tools/session.rs
    #       plugins/agent/engine/tests/integration/handoff.rs
    #       plugins/agent/engine/tests/integration/lifetime.rs
    #       plugins/agent/engine/tests/integration/model_interruption.rs
    #       plugins/agent/engine/tests/integration/model_interruption/websocket.rs
    #       plugins/agent/engine/tests/integration/pruning.rs
    #       plugins/agent/engine/tests/integration/startup_recovery.rs
    #       plugins/agent/engine/tests/integration/support/agent_loop.rs
    #       plugins/agent/engine/tests/integration/support/code_mode.rs
    #       plugins/agent/engine/tests/integration/support/context.rs
    #       plugins/agent/engine/tests/integration/support/image_projection.rs
    #       plugins/agent/facts/src/handoff.rs
    #       plugins/agent/native/README.md
    #       plugins/agent/native/README.zh-CN.md
    #       plugins/agent/native/src/owner.rs
    #       plugins/agent/native/src/owner/tests.rs
    #       plugins/agent/native/src/owner/tests/goal.rs
    #       plugins/agent/native/src/owner/tests/plan.rs
    #       plugins/agent/native/src/owner/tests/service_tools.rs
    #       plugins/agent/native/src/owner/tests/todo.rs
    #       products/maka/bundle/tests/timeline.test.mjs

 Cargo.lock                                         |   11 +
 Cargo.toml                                         |    2 +-
 packages/plugin-sdk/src/configurations.ts          |   49 +-
 packages/plugin-sdk/src/contracts.ts               | 1396 ++++++++++-
 packages/plugin-sdk/src/generated/runtime.ts       |  159 +-
 .../migrations/0020_compaction_history.sql}        |   13 +-
 platform/event-log/src/applications.rs             |  135 +-
 platform/event-log/src/applications/launch.rs      |   50 +
 .../event-log/src/applications/launch/tests.rs     |  165 ++
 platform/event-log/src/applications/operations.rs  |   15 +-
 .../event-log/src/applications/operations/tests.rs |   77 +
 platform/event-log/src/applications/tests.rs       |  194 ++
 platform/event-log/src/archive/candidates.rs       |   13 +-
 platform/event-log/src/archive/target.rs           |    6 +-
 platform/event-log/src/composition.rs              |   32 +
 platform/event-log/src/context/proof.rs            |    3 +-
 platform/event-log/src/context/usage.rs            |   40 +-
 platform/event-log/src/handoff/evidence.rs         |   13 +-
 platform/event-log/src/observation.rs              |    9 +-
 platform/event-log/src/observation/delivery.rs     |   16 +-
 platform/event-log/src/observation/streams.rs      |   25 +
 platform/event-log/src/sessions/execution.rs       |    8 +-
 platform/event-log/src/transcript.rs               |   18 +-
 platform/event-log/src/transcript/compaction.rs    |  125 +
 platform/event-log/src/transcript/history.rs       |   36 +-
 platform/event-log/src/transcript/search.rs        |    2 +-
 platform/event-log/src/transcript/tool_metadata.rs |   75 +-
 platform/event-log/tests/archive.rs                |   59 +-
 platform/event-log/tests/archive/fixtures.rs       |    2 +-
 platform/event-log/tests/auxiliary_usage.rs        |    1 +
 platform/event-log/tests/compact_presentation.rs   |   46 +-
 .../tests/compact_presentation/automatic.rs        |   16 +-
 platform/event-log/tests/context_compaction.rs     |    2 +-
 .../event-log/tests/context_compaction/active.rs   |   16 +-
 .../event-log/tests/context_compaction/fixtures.rs |  268 ++-
 .../event-log/tests/context_compaction/latest.rs   |    2 +-
 .../event-log/tests/context_compaction/lineage.rs  |    2 +-
 platform/event-log/tests/continuation/fixtures.rs  |    1 +
 platform/event-log/tests/continuation/handoff.rs   |    2 -
 .../event-log/tests/continuation/handoff_budget.rs |    6 +-
 .../event-log/tests/continuation/handoff_cancel.rs |    2 -
 .../event-log/tests/continuation/handoff_claim.rs  |   41 +-
 .../tests/continuation/handoff_consumers.rs        |    1 -
 platform/event-log/tests/executor.rs               |    1 +
 platform/event-log/tests/streaming_usage.rs        |   12 +-
 platform/event-log/tests/tool_payloads.rs          |   35 +-
 platform/event-log/tests/transcript_tools.rs       |    4 +-
 .../event-log/tests/transcript_tools/payloads.rs   |   76 +-
 platform/host-js/src/lib.rs                        |    7 +-
 .../tests/application_services/operations.rs       |   16 +-
 .../application_services/resource_mutations.rs     |    8 +-
 platform/host-runtime/src/application.rs           |   32 +-
 platform/host-runtime/src/application/host.rs      |  388 +++-
 .../host-runtime/src/application/host/access.rs    |    4 +-
 .../host-runtime/src/application/host/client.rs    |  346 ++-
 .../host-runtime/src/application/host/protocol.rs  |   67 +-
 .../host-runtime/src/application/management.rs     |  132 +-
 .../src/application/management/authoring.rs        |  105 +-
 .../src/application/management/tests.rs            |  559 +++++
 .../src/application/transport/policy.rs            |   18 +-
 .../src/application/transport/server.rs            |   52 +-
 .../host-runtime/src/application/transport/wire.rs |   11 -
 platform/packages/src/bundle.rs                    |    6 -
 platform/packages/src/lib.rs                       |   88 +-
 platform/packages/src/manifest.rs                  |    5 +-
 platform/plugin-core/src/contract.rs               |  186 +-
 platform/plugin-core/src/deployment/management.rs  |   31 +
 platform/plugin-core/src/package.rs                |   88 +-
 platform/plugin-core/src/plan.rs                   |   26 +-
 platform/plugin-core/src/plan/tests.rs             |   12 +-
 platform/plugin-core/src/runtime.rs                |    7 +-
 platform/presentation/src/compact.rs               |  358 ++-
 platform/presentation/src/lib.rs                   |   15 +-
 platform/presentation/src/message.rs               |    3 +
 platform/presentation/tests/projection.rs          |    1 -
 platform/render-gpui/src/input.rs                  |   18 +-
 platform/render-gpui/src/input/tests.rs            |   45 +
 platform/render-gpui/src/scene.rs                  |   19 +-
 platform/render-gpui/src/textarea.rs               |  134 +-
 platform/render-terminal/src/application.rs        |   44 +-
 .../src/application/context_menu.rs                |  305 +++
 platform/render-terminal/src/application/editor.rs |  116 +-
 .../src/application/file/browser.rs                |   13 +-
 platform/render-terminal/src/application/input.rs  |   75 +-
 platform/render-terminal/src/application/paint.rs  |  149 +-
 .../render-terminal/src/application/resources.rs   |  125 +-
 platform/render-terminal/src/application/run.rs    |  193 +-
 platform/render-terminal/src/application/scene.rs  |   17 +-
 .../render-terminal/src/application/terminal.rs    |    8 +-
 platform/render-terminal/src/application/tests.rs  |   32 +-
 .../src/application/tests/continuations.rs         |    8 +-
 .../render-terminal/src/application/tests/input.rs |  142 +-
 .../src/application/tests/layout.rs                |   78 +-
 .../src/application/tests/reading/items.rs         |    4 +-
 .../src/application/tests/textarea.rs              |  484 +++-
 .../render-terminal/src/application/textarea.rs    |  298 ++-
 .../src/application/textarea/clipboard.rs          |   23 +
 .../src/application/textarea/paste.rs              |  147 +-
 platform/render-terminal/src/editor.rs             |   72 +-
 .../render-terminal/src/editor/presentation.rs     |  300 ++-
 platform/transport/Cargo.toml                      |    2 +-
 platform/transport/README.md                       |    4 +-
 platform/transport/README.zh-CN.md                 |    4 +-
 platform/transport/src/connections.rs              |  296 ++-
 platform/transport/src/connections/host.rs         |  140 +-
 platform/transport/src/lib.rs                      |   13 +-
 platform/transport/src/startup.rs                  |  110 +
 platform/transport/src/transport.rs                |    4 +-
 platform/transport/src/transport/ipc.rs            |   52 +-
 platform/transport/src/transport/native.rs         |    5 +-
 platform/transport/src/transport/process.rs        |  785 -------
 platform/transport/tests/native_requests.rs        |   24 +-
 platform/transport/tests/owners.rs                 |  110 +-
 platform/transport/tests/private.rs                |  162 +-
 platform/transport/tests/public_host.rs            |  836 ++++++-
 platform/transport/tests/public_remote.rs          |    3 +
 platform/transport/tests/support/mod.rs            |   29 +-
 platform/ui-js/examples/counter/support.rs         |   79 +-
 platform/ui-js/tests/background.rs                 |   16 +-
 platform/ui-js/tests/runtime.rs                    |   15 +-
 platform/ui-js/tests/runtime/actions.rs            |   45 +-
 platform/ui-js/tests/runtime/events.rs             |   55 +-
 platform/ui-js/tests/runtime/history.rs            |   16 +-
 platform/ui-js/tests/runtime/native.rs             |   24 +-
 platform/ui-js/tests/runtime/persistence.rs        |   16 +-
 platform/ui-js/tests/runtime/reconciliation.rs     |   16 +-
 platform/ui-js/tests/runtime/scenes.rs             |   16 +-
 platform/ui-js/tests/runtime/subscriptions.rs      |   16 +-
 platform/ui-js/tests/runtime/values.rs             |   16 +-
 platform/ui-runtime/src/deployment.rs              |    2 +-
 platform/ui-runtime/src/editor.rs                  |   96 +
 platform/ui-runtime/src/input.rs                   |    2 +
 platform/ui-runtime/src/lib.rs                     |  123 +-
 platform/ui-runtime/src/scene.rs                   |   53 +-
 platform/ui-runtime/src/scene/desktop.rs           |  147 +-
 platform/ui-runtime/src/scene/terminal.rs          |  114 +-
 platform/ui-runtime/src/textarea.rs                |  149 ++
 platform/ui-runtime/src/tree.rs                    |   83 +-
 platform/ui-runtime/src/values.rs                  |    2 +-
 plugins/agent/agent-screen/actions.ts              |   36 +-
 plugins/agent/agent-screen/compact.ts              |  284 +++
 plugins/agent/agent-screen/component-events.ts     |   18 +
 plugins/agent/agent-screen/conversation-view.ts    |   17 +
 plugins/agent/agent-screen/events.ts               |    1 +
 plugins/agent/agent-screen/frame.ts                |  108 +-
 plugins/agent/agent-screen/goal.ts                 |    7 +-
 plugins/agent/agent-screen/index.ts                |    2 +
 plugins/agent/agent-screen/messages.ts             |    3 +-
 plugins/agent/agent-screen/raw-events.ts           |    9 +
 plugins/agent/agent-screen/results.ts              |   16 +
 plugins/agent/agent-screen/state.ts                |    8 +
 plugins/agent/api/README.md                        |    4 +
 plugins/agent/api/README.zh-CN.md                  |    4 +
 plugins/agent/api/src/contract.rs                  |  154 +-
 plugins/agent/api/src/contract_compaction.rs       |   58 +
 .../assistant-preferences/global-instructions.ts   |  360 +++
 plugins/agent/assistant-preferences/index.ts       |  209 +-
 plugins/agent/assistant-preferences/locale.ts      |   63 +-
 plugins/agent/assistant-preferences/package.ts     |    1 +
 plugins/agent/assistant/src/prompt.rs              |   22 +-
 plugins/agent/assistant/src/prompt/workspace.rs    |    2 +-
 plugins/agent/assistant/src/recall/rank.rs         |    1 +
 plugins/agent/composer-footer/index.ts             |   77 +-
 plugins/agent/composer-footer/locale.ts            |   11 +-
 plugins/agent/composer/component.ts                |  511 +++-
 plugins/agent/composer/locale.ts                   |    9 +-
 plugins/agent/conversation-import/view.ts          |    2 +
 plugins/agent/engine/src/compact.rs                |  138 +-
 plugins/agent/engine/src/context_input.rs          |   42 +-
 plugins/agent/engine/src/continuation.rs           |   11 +-
 plugins/agent/engine/src/handoff.rs                |    1 -
 plugins/agent/engine/src/lib.rs                    |   16 +-
 plugins/agent/engine/src/model_attempt.rs          |  121 +-
 plugins/agent/engine/src/request_composition.rs    |   18 +
 plugins/agent/engine/src/runner.rs                 |   10 +-
 plugins/agent/engine/src/steps.rs                  |   28 +-
 .../agent/engine/tests/integration/agent_loop.rs   |   84 -
 .../engine/tests/integration/code_mode_lifetime.rs |   10 +-
 .../engine/tests/integration/code_mode_media.rs    |    4 +-
 .../engine/tests/integration/context_compaction.rs |  397 +++-
 .../engine/tests/integration/context_overflow.rs   |   20 +-
 .../engine/tests/integration/dynamic_tools.rs      |    8 +-
 .../tests/integration/dynamic_tools/session.rs     |   14 +-
 .../engine/tests/integration/frozen_projection.rs  |   12 +-
 plugins/agent/engine/tests/integration/handoff.rs  |   15 +-
 plugins/agent/engine/tests/integration/lifetime.rs |    5 +-
 .../engine/tests/integration/model_interruption.rs |    3 +-
 .../integration/model_interruption/websocket.rs    |    5 +-
 plugins/agent/engine/tests/integration/pruning.rs  |   15 +-
 .../engine/tests/integration/session_import.rs     |    6 +-
 .../engine/tests/integration/startup_recovery.rs   |    3 +-
 .../engine/tests/integration/support/agent_loop.rs |    3 +-
 .../engine/tests/integration/support/code_mode.rs  |    1 -
 .../engine/tests/integration/support/context.rs    |    1 -
 .../agent/engine/tests/integration/support/http.rs |    2 +-
 .../tests/integration/support/image_projection.rs  |    1 -
 .../engine/tests/integration/support/invocation.rs |    1 +
 plugins/agent/execution-picker/index.ts            |    2 +
 plugins/agent/facts/src/archive.rs                 |   32 +-
 plugins/agent/facts/src/archive/encoding.rs        |   17 +-
 plugins/agent/facts/src/configuration/policy.rs    |    4 +
 .../agent/facts/src/configuration/policy/codec.rs  |    2 +-
 .../facts/src/configuration/policy/settings.rs     |    1 +
 plugins/agent/facts/src/context.rs                 |   79 +-
 plugins/agent/facts/src/context/summary.rs         |  148 +-
 plugins/agent/facts/src/display.rs                 |   11 +
 plugins/agent/facts/src/execution.rs               |    3 +
 plugins/agent/facts/src/handoff.rs                 |    8 -
 plugins/agent/facts/src/tool_output/durable.rs     |   20 +-
 plugins/agent/form-editor/index.ts                 |    2 +
 plugins/agent/native/README.md                     |    8 +-
 plugins/agent/native/README.zh-CN.md               |    8 +-
 plugins/agent/native/src/model.rs                  |   40 +-
 plugins/agent/native/src/owner.rs                  |   10 +-
 plugins/agent/native/src/owner/assistant.rs        |   28 +-
 plugins/agent/native/src/owner/compaction.rs       |  212 ++
 plugins/agent/native/src/owner/execution.rs        |    9 +-
 .../agent/native/src/owner/global_instructions.rs  |  349 +++
 plugins/agent/native/src/owner/notifications.rs    |    2 +-
 plugins/agent/native/src/owner/queue.rs            |    3 +-
 plugins/agent/native/src/owner/queue/controls.rs   |    9 +-
 .../agent/native/src/owner/scheduler/dispatch.rs   |    2 +-
 plugins/agent/native/src/owner/skills.rs           |  141 ++
 plugins/agent/native/src/owner/tests.rs            |   90 +-
 plugins/agent/native/src/owner/tests/compaction.rs |   88 +
 plugins/agent/native/src/owner/tests/executor.rs   |   50 +-
 .../agent/native/src/owner/tests/executor/acp.rs   |    2 +-
 plugins/agent/native/src/owner/tests/goal.rs       |    1 -
 plugins/agent/native/src/owner/tests/health.rs     |   12 +-
 plugins/agent/native/src/owner/tests/metrics.rs    |   92 +
 plugins/agent/native/src/owner/tests/plan.rs       |    5 +-
 plugins/agent/native/src/owner/tests/processes.rs  |  100 +
 plugins/agent/native/src/owner/tests/recall.rs     |   23 +
 .../agent/native/src/owner/tests/service_tools.rs  |   49 +-
 plugins/agent/native/src/owner/tests/settings.rs   |  102 +-
 plugins/agent/native/src/owner/tests/skills.rs     |   87 +-
 plugins/agent/native/src/owner/tests/todo.rs       |    1 -
 plugins/agent/native/src/owner/tests/workhub.rs    |   55 +-
 plugins/agent/native/src/service.rs                |   39 +-
 plugins/agent/native/src/source_path.rs            |    2 +-
 plugins/agent/native/src/tools.rs                  |   38 +-
 plugins/agent/native/src/tools/computer.rs         |   12 +-
 plugins/agent/native/src/tools/shell.rs            |   97 +
 plugins/agent/ports/src/session/history.rs         |   15 +
 plugins/agent/projects/index.ts                    |    2 +
 plugins/agent/question-editor/index.ts             |    2 +
 plugins/agent/recall/index.ts                      |    2 +
 plugins/agent/scheduler/view.ts                    |    2 +
 plugins/agent/session-details/index.ts             |    8 +-
 plugins/agent/session-recap/src/recap.rs           |    1 +
 plugins/agent/subagent-settings/index.ts           |   26 +-
 plugins/agent/subagent-settings/locale.ts          |    5 +
 plugins/agent/tool-catalog/src/request.rs          |   49 +-
 plugins/agent/tool-details/index.ts                |   80 +-
 plugins/agent/tool-details/locale.ts               |    4 +-
 plugins/agent/tools/src/dispatch.rs                |    6 +-
 plugins/application/apps/view.ts                   |    3 +
 plugins/application/deployment/view.ts             |    2 +
 plugins/settings/connection-form/events.ts         |   62 +-
 plugins/settings/connection-form/operations.ts     |    2 +-
 plugins/settings/connection-form/package.ts        |    1 +
 plugins/settings/connection-form/state.ts          |    5 +-
 plugins/settings/connection-form/view.ts           |    9 +-
 plugins/settings/insights/view.ts                  |    3 +
 plugins/settings/model-default/index.ts            |    2 +
 plugins/settings/native/src/connections.rs         |   55 +-
 plugins/settings/native/src/contract.rs            |   18 +-
 plugins/settings/native/src/credential/tests.rs    |   18 +-
 plugins/settings/native/src/preferences.rs         |   25 +
 plugins/settings/native/src/service.rs             |   12 +-
 plugins/settings/network-settings/index.ts         |   20 +-
 plugins/settings/network-settings/locale.ts        |    5 +
 plugins/settings/search.ts                         |   12 +-
 .../store/migrations/0002_shell_titles.sql         |   14 +-
 plugins/settings/store/src/policy.rs               |   22 +
 plugins/settings/store/tests/runtime_policy.rs     |   40 +
 plugins/shared/appearance-editor.ts                |    2 +
 plugins/shared/components.ts                       |  255 +-
 plugins/shared/contracts.ts                        |   38 +-
 .../locale.ts => shared/editor-menu.ts}            |   35 +-
 plugins/shared/locale-catalogs/components.ts       |    9 +-
 plugins/shared/locale-catalogs/message-view.ts     |    4 +
 plugins/shared/message-view.ts                     |  184 +-
 plugins/shared/settings.ts                         |   12 +-
 plugins/shared/tool-cards.ts                       |   18 +-
 plugins/shared/tui-messages.ts                     |   23 +-
 plugins/shared/view.ts                             |  100 +-
 plugins/skills/core/src/context.rs                 |    3 +-
 plugins/skills/core/tests/discovery.rs             |   23 +
 .../skills/native/src/management/tests/recovery.rs |   12 +-
 plugins/ui/command-palette/index.ts                |   61 +-
 plugins/workspace/jev-settings/index.ts            |    9 +-
 plugins/workspace/terminal-panel/index.ts          |    2 +
 plugins/workspace/web-settings/index.ts            |   10 +-
 plugins/workspace/web-settings/locale.ts           |    5 +
 products/maka/bundle/src/composition.ts            |   17 +-
 .../bundle/tests/assistant-preferences.test.mjs    |  418 ++++
 .../maka/bundle/tests/command-palette.test.mjs     |  280 +++
 products/maka/bundle/tests/compact.test.mjs        |  222 ++
 .../maka/bundle/tests/compaction-display.test.mjs  |  196 ++
 products/maka/bundle/tests/composer.test.mjs       |  598 +++++
 products/maka/bundle/tests/connections.test.mjs    |  102 +-
 .../maka/bundle/tests/product-composition.test.mjs |   21 +-
 .../maka/bundle/tests/session-navigation.test.mjs  |   70 +
 products/maka/bundle/tests/task-workbench.test.mjs |  139 ++
 products/maka/bundle/tests/timeline.test.mjs       |  309 ++-
 products/maka/bundle/tests/tool-details.test.mjs   |    1 +
 products/maka/bundle/tests/trace-evidence.test.mjs |  348 +++
 products/maka/cli/Cargo.toml                       |    6 +-
 products/maka/cli/DEPENDENCIES.rust.tsv            | 2443 ++++++++++----------
 products/maka/cli/README.md                        |    6 +-
 products/maka/cli/README.zh-CN.md                  |    6 +-
 products/maka/cli/THIRD_PARTY_NOTICES.txt          |   33 +
 products/maka/cli/notices.json                     |  464 ++--
 products/maka/cli/src/acp/tests.rs                 |    1 +
 products/maka/cli/src/acp/tests/public_client.rs   |  195 ++
 products/maka/cli/src/acp/tests/support.rs         |    4 +
 products/maka/cli/src/application.rs               |   78 +-
 products/maka/cli/src/application/product.rs       |   42 +-
 .../maka/cli/src/application/product/headless.rs   |  236 +-
 .../maka/cli/src/application/product/launch.rs     |  365 ++-
 .../cli/src/application/product/launch/tests.rs    |   82 +-
 .../maka/cli/src/application/product/public.rs     |  406 ++++
 .../maka/cli/src/application/product/restore.rs    |  112 +-
 .../cli/src/application/product/test_public.rs     |  179 ++
 .../maka/cli/src/application/product/update.rs     |   38 +-
 .../cli/src/application/product/update/tests.rs    |   46 +-
 products/maka/cli/src/application/serve.rs         |   61 +-
 products/maka/cli/src/args.rs                      |    6 +-
 products/maka/cli/src/code.rs                      |    1 +
 products/maka/cli/src/deployment.rs                |    2 +-
 products/maka/cli/src/deployment/local.rs          |   67 +-
 products/maka/cli/src/main.rs                      |    1 +
 products/maka/cli/src/startup.rs                   |   89 +
 .../cli/tests/integration/terminal/application.rs  |  304 ++-
 .../tests/integration/terminal/bundled_product.rs  |  421 +++-
 .../integration/terminal/bundled_product/chat.rs   |  169 +-
 .../terminal/bundled_product/chat/code_mode.rs     |    3 +
 .../terminal/bundled_product/chat/compaction.rs    |  287 +++
 .../terminal/bundled_product/chat/computer.rs      |    3 +
 .../terminal/bundled_product/chat/followup.rs      |  157 ++
 .../terminal/bundled_product/chat/goal.rs          |    3 +
 .../terminal/bundled_product/chat/graph.rs         |    3 +
 .../terminal/bundled_product/chat/health.rs        |   11 +-
 .../terminal/bundled_product/chat/performance.rs   |   13 +-
 .../terminal/bundled_product/chat/plan.rs          |    4 +
 .../terminal/bundled_product/chat/recap.rs         |    3 +
 .../terminal/bundled_product/chat/title.rs         |    3 +
 .../terminal/bundled_product/chat/todo.rs          |    3 +
 .../terminal/bundled_product/chat/trace.rs         |  207 ++
 products/maka/desktop/Cargo.toml                   |    8 +
 products/maka/desktop/README.md                    |    2 +-
 products/maka/desktop/README.zh-CN.md              |    2 +-
 products/maka/desktop/examples/native_lifecycle.rs |  179 +-
 products/maka/desktop/src/actions.rs               |   41 +-
 products/maka/desktop/src/canvas_tests.rs          |   16 +-
 products/maka/desktop/src/canvas_tests/image.rs    |    8 +-
 products/maka/desktop/src/editor_tests.rs          |   77 +-
 .../maka/desktop/src/editor_tests/appearance.rs    |    8 +-
 .../maka/desktop/src/editor_tests/checkpoint.rs    |    7 +-
 products/maka/desktop/src/editor_tests/cohost.rs   |   20 +-
 .../maka/desktop/src/editor_tests/composition.rs   |   15 +-
 products/maka/desktop/src/editor_tests/handoff.rs  |   23 +-
 products/maka/desktop/src/editor_tests/menu.rs     |    8 +-
 .../maka/desktop/src/editor_tests/mutations.rs     |    8 +-
 .../maka/desktop/src/editor_tests/navigation.rs    |   16 +-
 .../maka/desktop/src/editor_tests/publication.rs   |    8 +-
 products/maka/desktop/src/editor_tests/reading.rs  |   19 +-
 products/maka/desktop/src/editor_tests/receipts.rs |   16 +-
 products/maka/desktop/src/editor_tests/submit.rs   |   90 +-
 .../maka/desktop/src/editor_tests/subscriptions.rs |   16 +-
 products/maka/desktop/src/main.rs                  |   47 +-
 scripts/rust/README.md                             |   13 +
 scripts/rust/README.zh-CN.md                       |    9 +
 scripts/rust/benchmark-startup.py                  |  208 ++
 .../assets/starter/verify-host.py                  |   91 +-
 .../maka-plugin-authoring/references/runtime-ui.md |    2 +-
 third-party/gpui-kit/SOURCE.md                     |    2 +
 .../crates/base/src/input/base/inline_tokens.rs    |   93 +-
 .../gpui-kit/crates/base/src/input/base/state.rs   |  100 +-
 tools/schema/src/lib.rs                            |    5 +
 381 files changed, 23619 insertions(+), 5628 deletions(-)

diff --cc platform/render-terminal/src/application.rs
index 49beef03a6,2f709504d2..c58a39c5b7
--- a/platform/render-terminal/src/application.rs
+++ b/platform/render-terminal/src/application.rs
@@@ -672,10 -693,9 +703,12 @@@ impl Presenter 
          } else {
              None
          };
 +        if raw_pointer_target.is_some() {
 +            self.resources.redraw = true;
 +        }
-         if raw_pointer_target.is_none() && self.open_context_menu(&event)? {
+         if raw_pointer_target.is_none()
+             && (self.editor_context_menu(&event)? || self.open_context_menu(&event)?)
+         {
              return Ok(());
          }
          if let Event::Mouse(mouse) = &event
diff --cc platform/render-terminal/src/application/resources.rs
index 3881f731d6,94c756ecc8..ee435be758
--- a/platform/render-terminal/src/application/resources.rs
+++ b/platform/render-terminal/src/application/resources.rs
@@@ -697,8 -736,26 +736,27 @@@ impl Resources 
  }
  impl Presenter {
      pub(super) fn sync_native(&mut self) -> maka_ui_runtime::Result<()> {
+         self.sync_native_inner(true)
+     }
+     pub(super) fn progress_native(&mut self) -> maka_ui_runtime::Result<()> {
+         self.sync_native_inner(false)
+     }
+     fn sync_native_inner(&mut self, prepare: bool) -> maka_ui_runtime::Result<()> {
 +        let _span = maka_ui_runtime::diagnostics::Span::new("slow_sync_native");
          self.resources.deactivate(&self.application);
+         self.resources.cancel_pastes(
+             self.focus
+                 .as_ref()
+                 .filter(|_| self.window_focused)
+                 .map(|focus| focus.mount.id()),
+         )?;
+         let mut mounts = if self.application.is_retiring(&self.root)
+             || self.application.frame(&self.root).is_err()
+         {
+             Vec::new()
+         } else {
+             self.application.mounted_subtree(&self.root)?
+         };
          // Transfer completed original work before preflight reserves the next
          // command's capacity. A newer command cannot replace an uncaptured result.
          self.resources
diff --cc platform/ui-js/tests/runtime/subscriptions.rs
index afb69d58f3,23eaea67cb..1dfa752535
--- a/platform/ui-js/tests/runtime/subscriptions.rs
+++ b/platform/ui-js/tests/runtime/subscriptions.rs
@@@ -394,24 -365,6 +400,30 @@@ fn fixture_data
      packages.push(package);
      let service = native_package("native.stream", "test.stream", service_contract());
      let child = native_package("native.child", "test.child", child_contract.clone());
 +    let child = if matches!(mode, Mode::Burst) {
-         let mut declaration = child.manifest().application.clone().unwrap();
++        let mut declaration = child
++            .manifest()
++            .application
++            .as_ref()
++            .unwrap()
++            .declaration()
++            .clone();
 +        declaration
 +            .entries
 +            .get_mut(&EntryTarget::Desktop)
 +            .unwrap()
 +            .imports
 +            .insert(
 +                "stream".into(),
 +                Import {
 +                    contract: service_contract(),
 +                    cardinality: Cardinality::One,
 +                },
 +            );
 +        support::package("native.child", declaration, None)
 +    } else {
 +        child
 +    };
      for (name, key, package) in [("stream", 3, &service), ("child", 4, &child)] {
          input
              .instances
diff --cc plugins/shared/contracts.ts
index a65955263c,4d2e2b8741..f816c3d12a
--- a/plugins/shared/contracts.ts
+++ b/plugins/shared/contracts.ts
@@@ -826,20 -838,16 +840,20 @@@ export const imageViewerContract = comp
  const filePath = { anyOf: [{ type: 'string', minLength: 1, maxLength: 4096 }, { type: 'null' }] };
  export const toolDetailsContract = component(
    'maka.agent.ToolDetails',
 -  object({
 -    theme: { $ref: '#/$defs/Theme' },
 -    locale,
 -    context: object({ sessionId: string, through: { type: 'integer', minimum: 1 } }),
 -    tool: { $ref: '#/$defs/HistoryTool' },
 -    expanded: { type: 'boolean' },
 -    focusOnPointer: { type: 'boolean' },
 -  }),
 +  object(
 +    {
 +      load: { type: 'boolean' },
 +      theme: { $ref: '#/$defs/Theme' },
 +      locale,
 +      context: object({ sessionId: string, through: { type: 'integer', minimum: 1 } }),
 +      tool: { $ref: '#/$defs/HistoryTool' },
 +      expanded: { type: 'boolean' },
 +      focusOnPointer: { type: 'boolean' },
 +    },
 +    ['theme', 'locale', 'context', 'tool', 'expanded', 'focusOnPointer'],
 +  ),
    {
-     fileContext: object({
+     context: object({
        sessionId: string,
        through: { type: 'integer', minimum: 1 },
        toolUseId: string,
diff --cc products/maka/bundle/tests/timeline.test.mjs
index b256ea6819,91c34f0fbd..005c1465a8
--- a/products/maka/bundle/tests/timeline.test.mjs
+++ b/products/maka/bundle/tests/timeline.test.mjs
@@@ -481,89 -482,307 +482,395 @@@ for (const target of ['tui', 'desktop']
    });
  }
  
+ test('trace keeps visible ancestry and keyboard disclosure across bounded history windows', () => {
+   const message = (id, sequence, ancestors = []) => ({
+     id,
+     contentKey: id,
+     role: 'tool_call',
+     text: '{}',
+     timestamp: null,
+     source: sequence,
+     image: false,
+     continued: false,
+     tool: {
+       toolUseId: id,
+       call: {
+         sequence,
+         name: id,
+         title: { fallback: id },
+         presentation: null,
+         pending: false,
+         dispatched: true,
+         ancestorToolUseIds: ancestors,
+       },
+       result: { sequence: sequence + 10, isError: false, settlement: 'returned', image: false },
+     },
+   });
+   const props = {
+     theme,
+     locale: 'en',
+     copyRequest: null,
+     browse: 1,
+     timings: [],
+     markReadEnabled: false,
+     toolContext: { sessionId: 'session', through: 20 },
+     waitingTools: [],
+     liveTools: [],
+     source: null,
+     search: null,
+     loading: false,
+     older: false,
+     newer: false,
+     latest: false,
+     landing: { sequence: 0, edge: 'end' },
+     live: false,
+     messages: [
+       message('run', 1),
+       message('shell', 3, ['hidden-cell', 'run']),
+       message('nested', 4, ['shell', 'hidden-cell', 'run']),
+     ],
+   };
+   let out = component.mount(props, {});
+   const nodes = (node) =>
+     node && typeof node === 'object'
+       ? [
+           node,
+           ...Object.values(node).flatMap((value) =>
+             Array.isArray(value) ? value.flatMap(nodes) : nodes(value),
+           ),
+         ]
+       : [];
+   const find = (key) => nodes(out.frame.view).find((node) => node.key === key);
+   const raw = (key, kind = 'activate') => {
+     out = component.event(out.frame.state, { kind: 'raw', key, event: { kind } }, props, {});
+   };
+   assert.equal(find('marker-run').text, '·');
+   assert.equal(find('indent-run').layout.basis, 2);
+   assert.equal(find('marker-shell').text, '·');
+   assert.equal(find('indent-shell').layout.basis, 4);
+   assert.equal(find('marker-nested').text, '·');
+   assert.equal(find('indent-nested').layout.basis, 6);
+   raw('browse-next');
+   assert.deepEqual(out.frame.state.command.target, { kind: 'focus_item', key: 'browse-shell' });
+   assert.equal(find('toggle-shell').label, '› shell');
+   raw('browse-shell', 'submit');
+   assert.equal(find('toggle-shell').label, '⌄ shell');
+   raw('browse-collapse');
+   assert.equal(find('toggle-shell').label, '› shell');
+   raw('browse-expand');
+   assert.equal(find('toggle-shell').label, '⌄ shell');
+   raw('browse-next');
+   raw('browse-previous');
+   assert.deepEqual(out.frame.state.command.target, { kind: 'focus_item', key: 'browse-shell' });
+   raw('browse-close');
+   assert.ok(out.events.some((event) => event.name === 'browseClosed' && event.value.request === 1));
+   props.messages = props.messages.slice(1);
+   out = component.update(out.frame.state, props, {});
+   assert.equal(find('marker-shell').text, '·');
+   assert.equal(find('indent-shell').layout.basis, 2);
+   assert.equal(find('marker-nested').text, '·');
+   assert.equal(find('indent-nested').layout.basis, 4);
+   assert.equal(find('toggle-shell').label, '⌄ shell');
+ });
+ 
+ test('user-to-response spacing is one plain row above the response, not part of the user band', () => {
+   const message = (role, index) => ({
+     id: `${role}-${index}`,
+     contentKey: `${role}-${index}`,
+     role,
+     text: 'Message',
+     timestamp: null,
+     source: index + 1,
+     image: false,
+     continued: false,
+     tool:
+       role === 'tool_call'
+         ? {
+             toolUseId: `${role}-${index}`,
+             call: {
+               sequence: index + 1,
+               name: 'Read',
+               title: null,
+               presentation: null,
+               pending: false,
+               dispatched: true,
+               ancestorToolUseIds: [],
+             },
+             result: null,
+           }
+         : null,
+   });
+   for (const roles of [
+     ['user', 'assistant'],
+     ['user', 'thinking', 'assistant'],
+     ['user', 'tool_call', 'tool_call', 'assistant'],
+     ['user', 'user', 'assistant'],
+   ]) {
+     const props = {
+       theme,
+       locale: 'en',
+       copyRequest: null,
+       browse: null,
+       timings: [],
+       markReadEnabled: false,
+       toolContext: { sessionId: 'session', through: 20 },
+       waitingTools: [],
+       liveTools: [],
+       source: null,
+       search: null,
+       loading: false,
+       older: false,
+       newer: false,
+       latest: false,
+       landing: { sequence: 0, edge: 'end' },
+       live: false,
+       messages: roles.map(message),
+     };
+     const out = component.mount(props, {});
+     const paths = [];
+     const visit = (node, ancestors = []) => {
+       if (!node || typeof node !== 'object') return;
+       const path = [...ancestors, node];
+       if (node.key) paths.push(path);
+       for (const child of Object.values(node)) {
+         if (Array.isArray(child)) child.forEach((value) => visit(value, path));
+         else visit(child, path);
+       }
+     };
+     visit(out.frame.view);
+     const find = (key) => paths.find((path) => path.at(-1).key === key);
+     const responseIndex = roles.findIndex((role) => role !== 'user');
+     const responseId = props.messages[responseIndex].id;
+     const userId = props.messages[responseIndex - 1].id;
+     const userCard = find('message-card-' + userId).at(-1);
+     const responseCard = (find('message-card-' + responseId) ?? find('message-' + responseId)).at(
+       -1,
+     );
+     const gap = find('message-space-before-' + responseId);
+     assert.ok(gap, `missing response gap: ${roles}`);
+     const response = find('message-' + responseId).at(-1);
+     assert.equal(response.children[0], gap.at(-1));
+     const content = response.children[1];
+     assert.equal(content.kind, 'context_menu');
+     assert.equal(content.background, responseCard);
+     assert.ok(!gap.includes(content), 'the gap must stay outside the menu trigger rectangle');
+     assert.ok(
+       !responseCard.children[0].key.startsWith('message-space-'),
+       'the menu trigger must align with the first content row',
+     );
+     const keys = paths.map((path) => path.at(-1).key);
+     assert.equal(new Set(keys).size, keys.length, 'wrapping must retain unique scene keys');
+     assert.equal(gap.at(-1).layout.basis, 1);
+     assert.ok(!find('message-space-' + userId), 'the previous user must not retain another gap');
+     assert.notEqual(userCard.background, undefined, 'the user body retains its colored band');
+     assert.ok(
+       gap.every((node) => node.background === undefined || node.background !== userCard.background),
+       'the response gap must not inherit the user background',
+     );
+     assert.equal(
+       find('band-bottom-' + userId).at(-1).layout.basis,
+       1,
+       'intrinsic user padding remains unchanged',
+     );
+     const separators = paths.filter((path) => path.at(-1).key.startsWith('message-space-'));
+     const expected = roles
+       .slice(1)
+       .filter((role, index) => !(role === 'tool_call' && roles[index] === 'tool_call')).length;
+     assert.equal(
+       separators.reduce((rows, path) => rows + path.at(-1).layout.basis, 0),
+       expected,
+       'moving the gap must not add rows or spread adjacent tool calls apart',
+     );
+   }
+ });
+ 
+ test('only an observed latest tail acknowledges the displayed message', () => {
+   const props = {
+     theme,
+     locale: 'en',
+     copyRequest: null,
+     browse: null,
+     timings: [],
+     markReadEnabled: true,
+     toolContext: { sessionId: 'session', through: 8 },
+     waitingTools: [],
+     liveTools: [],
+     source: null,
+     search: null,
+     loading: false,
+     older: false,
+     newer: false,
+     latest: false,
+     landing: { sequence: 0, edge: 'end' },
+     live: false,
+     messages: [
+       {
+         id: 'answer',
+         contentKey: 'answer',
+         role: 'assistant',
+         text: 'Answer',
+         timestamp: null,
+         source: 8,
+         image: false,
+         continued: false,
+         tool: null,
+       },
+     ],
+   };
+   const observation = {
+     readingRevision: 1,
+     pendingCommand: null,
+     viewport: {
+       readingRevision: 1,
+       atStart: false,
+       atEnd: true,
+       visibleChildKeys: ['message-answer'],
+     },
+   };
+   const read = (changes = {}, observed = observation) => {
+     const current = { ...props, ...changes };
+     const mounted = component.mount(current, {});
+     assert.equal(
+       mounted.events.some((event) => event.name === 'markRead'),
+       false,
+     );
+     const out = component.event(
+       mounted.frame.state,
+       {
+         kind: 'component',
+         child: 'reading',
+         name: 'observed',
+         event: observed,
+       },
+       current,
+       {},
+     );
+     return out.events.find((event) => event.name === 'markRead');
+   };
+   assert.deepEqual(read(), {
+     name: 'markRead',
+     value: { sessionId: 'session', sequence: 8, field: 'body' },
+   });
+   assert.ok(
+     read({ messages: [{ ...props.messages[0], continued: true }] }),
+     'the visible final fragment of a long message still acknowledges its original identity',
+   );
+   for (const changes of [
+     { markReadEnabled: false },
+     { loading: true },
+     { latest: true },
+     { newer: true },
+     { browse: 1 },
+     { toolContext: null },
+     { messages: [{ ...props.messages[0], source: null }] },
+     { messages: [{ ...props.messages[0], role: 'thinking' }] },
+   ])
+     assert.equal(read(changes), undefined, JSON.stringify(changes));
+   assert.equal(read({}, { ...observation, pendingCommand: 1 }), undefined);
+   assert.equal(
+     read({ messages: [...props.messages, { ...props.messages[0], id: 'new-answer', source: 9 }] }),
+     undefined,
+     'a queued observation of the previous tail cannot acknowledge a newly appended message',
+   );
+   assert.equal(
+     read({}, { ...observation, viewport: { ...observation.viewport, visibleChildKeys: [] } }),
+     undefined,
+     'being at the end is insufficient without the actual tail in the visible children',
+   );
+   assert.equal(
+     read({}, { ...observation, viewport: { ...observation.viewport, atEnd: false } }),
+     undefined,
+   );
+   assert.equal(
+     read({}, { ...observation, viewport: { ...observation.viewport, readingRevision: 0 } }),
+     undefined,
+   );
+ });
++
 +test('tool details follow the visible viewport and suspend in a cached reader', () => {
 +  const props = {
 +    theme,
 +    locale: 'en',
 +    active: true,
 +    copyRequest: null,
 +    browse: null,
 +    timings: [],
 +    markReadEnabled: false,
 +    toolContext: { sessionId: 'session', through: 8 },
 +    waitingTools: [],
 +    liveTools: [],
 +    source: null,
 +    search: null,
 +    loading: false,
 +    older: false,
 +    newer: false,
 +    latest: false,
 +    landing: { sequence: 0, edge: 'end' },
 +    live: false,
 +    messages: Array.from({ length: 40 }, (_, i) => ({
 +      id: 'tool-' + i,
 +      contentKey: 'tool-' + i,
 +      role: 'tool_call',
 +      text: 'Read',
 +      timestamp: null,
 +      source: 7,
 +      image: false,
 +      continued: false,
 +      tool: {
 +        toolUseId: 'read-' + i,
 +        call: {
 +          sequence: 7,
 +          name: 'Read',
 +          title: null,
 +          presentation: 'maka.workspace.Files@1/readText',
++          ancestorToolUseIds: [],
 +          pending: false,
 +          dispatched: true,
 +        },
 +        result: { sequence: 8, isError: false, settlement: 'returned', image: false },
 +      },
 +    })),
 +  };
 +  const find = (node, key) => {
 +    if (!node || typeof node !== 'object') return undefined;
 +    if (node.key === key) return node;
 +    for (const value of Object.values(node)) {
 +      for (const child of Array.isArray(value) ? value : [value]) {
 +        const found = find(child, key);
 +        if (found) return found;
 +      }
 +    }
 +  };
 +  let out = component.mount(props, {});
 +  const detail = (index) => find(out.frame.view, 'tool-details-tool-' + index).props;
 +  assert.equal(detail(0).load, false, 'initial placeholders can present without fetching details');
 +  out = component.event(
 +    out.frame.state,
 +    {
 +      kind: 'component',
 +      child: 'reading',
 +      name: 'observed',
 +      event: {
 +        readingRevision: 1,
 +        selectedChildKey: null,
 +        pendingCommand: null,
 +        receipt: null,
 +        viewport: {
 +          readingRevision: 1,
 +          atStart: false,
 +          atEnd: false,
 +          visibleChildKeys: ['message-tool-4', 'message-tool-5'],
 +        },
 +      },
 +    },
 +    props,
 +    {},
 +  );
 +  for (let i = 0; i < 40; i++) assert.equal(detail(i).load, i === 4 || i === 5);
 +  props.active = false;
 +  out = component.update(out.frame.state, props, {});
 +  assert.equal(detail(4).load, false);
 +  props.active = true;
 +  out = component.update(out.frame.state, props, {});
 +  assert.equal(detail(4).load, true);
 +});
diff --cc products/maka/bundle/tests/tool-details.test.mjs
index f04dbfe74f,0000000000..e4d97c8073
mode 100644,000000..100644
--- a/products/maka/bundle/tests/tool-details.test.mjs
+++ b/products/maka/bundle/tests/tool-details.test.mjs
@@@ -1,121 -1,0 +1,122 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing,
 + * software distributed under the License is distributed on an
 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 + * KIND, either express or implied.  See the License for the
 + * specific language governing permissions and limitations
 + * under the License.
 + */
 +
 +import assert from 'node:assert/strict';
 +import { test } from 'node:test';
 +import Ajv from 'ajv/dist/2020.js';
 +const { activate } = await import('../dist/packages/appearance/tui.js');
 +const theme = activate({ scheme: 'dark' }).Appearance.value;
 +const { component, activate: detailsExports } = await import(
 +  '../dist/packages/tool-details/tui.js'
 +);
 +
 +function props() {
 +  return {
 +    theme,
 +    locale: 'en',
 +    load: false,
 +    context: { sessionId: 'session', through: 8 },
 +    tool: {
 +      toolUseId: 'read-file',
 +      call: {
 +        sequence: 7,
 +        name: 'Read',
 +        title: null,
 +        presentation: 'maka.workspace.Files@1/readText',
++        ancestorToolUseIds: [],
 +        pending: false,
 +        dispatched: true,
 +      },
 +      result: { sequence: 8, isError: false, settlement: 'returned', image: false },
 +    },
 +    expanded: false,
 +    focusOnPointer: true,
 +  };
 +}
 +function reply(out, action, value, current) {
 +  return component.event(
 +    out.frame.state,
 +    { kind: 'action', key: action.key, event: { status: 'succeeded', value } },
 +    current,
 +    {},
 +  );
 +}
 +function page(action, current, text) {
 +  return {
 +    kind: 'ready',
 +    through: 8,
 +    filePath: null,
 +    source: {
 +      sequence: action.input.source.sequence,
 +      field: action.input.field,
 +      path: action.input.path,
 +      format: 'text',
 +      text,
 +      offset: 0,
 +      totalBytes: Buffer.byteLength(text),
 +      tool: current.tool,
 +    },
 +  };
 +}
 +test('tool summaries wait for demand and reuse completed reads after leaving the viewport', () => {
 +  const current = props();
 +  let out = component.mount(current, {});
 +  assert.equal(out.actions.length, 0);
 +  current.load = true;
 +  out = component.update(out.frame.state, current, {});
 +  const actions = out.actions;
 +  assert.equal(actions.length, 2);
 +  current.load = false;
 +  out = component.update(out.frame.state, current, {});
 +  assert.equal(out.actions.length, 0);
 +  for (const action of actions) {
 +    const text = action.input.field === 'arguments' ? '/workspace/source.rs' : 'completed';
 +    out = reply(out, action, page(action, current, text), current);
 +    assert.equal(out.actions.length, 0);
 +  }
 +  current.load = true;
 +  out = component.update(out.frame.state, current, {});
 +  assert.equal(out.actions.length, 0, 'completed summary does not reload on re-entry');
 +  current.expanded = true;
 +  out = component.update(out.frame.state, current, {});
 +  assert.equal(out.actions.length, 4, 'expanded Read fetches content and line metadata');
 +});
 +
 +test('a preparing source pauses polling when its demand is suspended', () => {
 +  const current = props();
 +  current.load = true;
 +  let out = component.mount(current, {});
 +  const action = out.actions[0];
 +  current.load = false;
 +  out = reply(out, action, { kind: 'preparing', through: 8 }, current);
 +  assert.equal(out.actions.length, 0);
 +  current.load = true;
 +  out = component.update(out.frame.state, current, {});
 +  assert.equal(out.actions.length, 1);
 +  assert.deepEqual(out.actions[0].input, action.input);
 +});
 +
 +test('demand is optional for existing tool detail callers', () => {
 +  const current = props();
 +  delete current.load;
 +  const schema = detailsExports().ToolDetails.contract.interface.props;
 +  const valid = new Ajv({ strict: false }).compile(schema);
 +  assert.equal(valid(current), true, JSON.stringify(valid.errors));
 +  assert.equal(component.mount(current, {}).actions.length, 2);
 +});


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org