Skip to content

feat(runtime): contextual get_fragments — base set + 1-hop guidance horizon - #43

Open
joelgwebber wants to merge 1 commit into
feat/exec-actions-toolsfrom
feat/fragment-horizon
Open

feat(runtime): contextual get_fragments — base set + 1-hop guidance horizon#43
joelgwebber wants to merge 1 commit into
feat/exec-actions-toolsfrom
feat/fragment-horizon

Conversation

@joelgwebber

Copy link
Copy Markdown
Collaborator

Stacked on #41 (A + B-lite). This is C of the exec-actions decomposition (sites-10b3, sites-90dc).

What

get_fragments returned only the tools offered on the current view. It now also returns the 1-hop horizon — the tools one navigation away, reached via the current view's tools' guidance graph — so an agent can pre-compose the next step instead of hitting a hard cut at the view boundary.

Each fragment is tagged:

  • view — its owning tool's view (state-independent provenance).
  • distance — 0 = a tool on the current view, 1 = a tool one navigation away.

Reachability rides the per-tool guidance (Suggestion[]) only and stops at one hop deliberately (deeper is journey territory); we do not pull the journey graph into the IR. get_fragments is intentionally broader than the registered tool set — the horizon isn't registered yet, but surfacing it is the point.

How

  • New pure, testable scopedFragments(ir, path) in the executor: base = tools whose ensure_view matches the path (plus view-agnostic tools) at distance 0; horizon = their guidance targets not already in the base, at distance 1. boot's currentFragments delegates to it.
  • projectFragments also tags each fragment with its owning tool's view.

Tests

67 runtime tests. New scopedFragments tests cover base-at-0 / horizon-at-1 / 2-hop exclusion / no double-emit; the get_fragments meta-tool test now asserts a guided tool surfaces on the prior view at distance 1.

Decisions locked with @joelgwebber: guidance adjacency is enough (no journey graph in the IR); get_fragments broader than the registered set; one hop only. Follows sites-90dc.

…orizon (sites-90dc)

get_fragments returned only the current view's tools. It now also returns the
1-hop horizon: tools one navigation away, reached via the current view's tools'
guidance graph (Suggestion[]), so an agent can pre-compose the next step instead
of hitting a hard cut at the view boundary. Each fragment carries view (owning
tool's view) and distance (0 = here, 1 = one hop). Reachability rides per-tool
guidance only; one hop deliberately (deeper is journey territory).

New scopedFragments(ir, path) in the executor (pure, testable); boot's
currentFragments delegates to it. projectFragments now also tags each fragment
with its owning tool's view.

67 runtime tests (scopedFragments base/horizon/distance + a get_fragments horizon
test added). Stacks on #41.

Signed-off-by: Joel Webber <joel@fullstory.com>
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