Repository navigation
Description
Problem
#1099 established the shared product-tool catalog and derives HostCapabilities and deferred groups from catalog ∩ host binding. Run policy is still applied outside that projection.
#1488 exposes the remaining gap: one agentTools decision must currently be threaded through root tool construction, child-session provisioning, deferred availability, Harbor execution identity, and TaskRun tool identity. Those consumers can disagree because there is no single effective-surface result.
Decision
Add one pure projector near tool-catalog-derive.ts:
catalog + host id + host-local bindings + normalized run policy
-> effective bound tools
-> effective tool names
-> HostCapabilities
-> deferred ToolAvailability groups
-> tool-surface identity
This is a pure composition function, not a service, store, registry, or new runtime owner. Each root Session/TaskRun composition calls it once before constructing its backend.
Rules:
- The catalog remains authoritative for product names, surfaces, metadata, and host affinity.
- Hosts continue to own tool implementations and constructors.
- Policy removes disabled tools before any capability, deferred-group, or identity derivation.
- A disabled surface cannot expose
load_tools, and a persisted historical load call cannot reactivate it. - Deferred groups are derived only from the effective binding.
- Scoped child
ctx.toolsremains a hard ceiling. Projection must never reintroduce parent tools into a child binding. - Child-session admission for the Agent surface consumes the same projection; it must not repeat an independent boolean decision.
- Execution identity records the normalized surface policy and exact effective product-tool names rather than a hand-maintained approximation.
- Harness and external tools—Heavy Task, Task Ledger experiments, MCP tools, provider-native tools, and Pi CLI tools—remain outside the product catalog. They may contribute explicitly labelled supplemental identity entries, but cannot manufacture catalog capabilities or deferred groups.
Scope
- Introduce the immutable effective-surface result and pure projector.
- Migrate standard Desktop, CLI, and Headless product-tool composition to it.
- Remove replaced pre-policy name lists and parallel capability/group derivations.
- Preserve model-specific and scoped child bindings as explicit projector inputs.
- Add cross-host contract tests for projection consistency.
Prefer one cohesive PR. Split only if a real Desktop model-specific dependency requires it; do not leave a second production projection path.
Non-goals
- Centralizing tool constructors or implementations.
- Redesigning permissions or granting authority from catalog metadata.
- Adding more user-facing switches or settings UI.
- Moving harness, MCP, provider-native, or Pi tools into the product catalog.
- Merging Interactive Session and Headless TaskRun control loops.
- Expanding the Runtime Host migration tracked by feat(runtime): RFC - one Runtime Host for every interactive Maka surface #853 and [Tracking] Runtime Host M3 domain ownership migration #1167.
Acceptance
- Default Headless projection contains the six isolated tools, no Agent tools, no Agent deferred group, and no Agent child admission.
agentTools: truerestores all four Agent tools as one deferred group and enables the corresponding child admission.- A historical
load_tools(agent)event cannot revive a disabled Agent surface. - Desktop and CLI retain their current effective product surfaces.
HostCapabilities, deferred groups, provider-visible product tools, and product-tool identity are all derived from the same effective binding.- Scoped child bindings cannot regain omitted parent tools.
- No entrypoint maintains a parallel effective product-tool name list.
- Existing permission, Heavy Task, Task Ledger, MCP, provider-native, and Pi behavior remains unchanged.
Refs #1099 and #1488. This projector is compatible with the hosted-execution direction in #853 but does not depend on that migration.
Activity
Astro-Han commentedon Jul 28, 2026
I’m taking this. I’ll implement the issue as specified in one cohesive PR: add the pure effective product-tool surface projector, migrate Desktop, CLI, and Headless product-tool composition to it, and derive child admission and execution identity from the same projection. Harness and external tools, unrelated policy work, and broader Runtime Host migration remain out of scope.
fix(runtime): address ApplyPatch review — shared engine, permissions,…
fix(runtime): address ApplyPatch review — shared engine, permissions,…