Add Tool Source Economy v1 - #34
Merged
likun666661 merged 1 commit intoJun 17, 2026
Merged
Conversation
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
…mantics PR #30's P2 #3 redefines promptSegment.toolCount as the model-visible (active) tool count, not the full providerTools registry (which includes the invalid fallback plus any deferred-unloaded / economy-hidden schemas that never reach the wire). After rebasing onto Tool Source Economy (PR #34), three economy tests still asserted the old providerTools.length values; update them to the active counts, which now equal modelToolNames().length in each case.
This was referenced Jun 17, 2026
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) calls are accepted only as durable ledger-seeding aliases, never advertised as provider-visible tools. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. Same-turn activation honors only `load_tools` (and only its `group` arg). The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) names are accepted solely when re-seeding prior-turn activations from the durable ledger — never advertised, never live in the current turn. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
Recognize the unified `load_tools` connector (and the historical `load_tool`, PR #30 — it shipped and returns the same `{ loaded: [...] }` shape) for the localized "Load tools" card, reading the loaded group id from `group` with a `namespace` fallback so replayed pre-unification sessions still render. `connect_tool_source` (PR #34) is deliberately not presented: it never shipped, so no such result exists, and its `{ tools: [...] }` shape differs from this card's `{ loaded: [...] }`. The runtime still seeds from it for the durable ledger (a separate concern that reads call args, not results).
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. Same-turn activation honors only `load_tools` (and only its `group` arg). The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) names are accepted solely when re-seeding prior-turn activations from the durable ledger — never advertised, never live in the current turn. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
Recognize the unified `load_tools` connector (and the historical `load_tool`, PR #30 — it shipped and returns the same `{ loaded: [...] }` shape) for the localized "Load tools" card, reading the loaded group id from `group` with a `namespace` fallback so replayed pre-unification sessions still render. `connect_tool_source` (PR #34) is deliberately not presented: it never shipped, so no such result exists, and its `{ tools: [...] }` shape differs from this card's `{ loaded: [...] }`. The runtime still seeds from it for the durable ledger (a separate concern that reads call args, not results).
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. Same-turn activation honors only `load_tools` (and only its `group` arg). The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) names are accepted solely when re-seeding prior-turn activations from the durable ledger — never advertised, never live in the current turn. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
Astro-Han
added a commit
that referenced
this pull request
Jun 17, 2026
Recognize the unified `load_tools` connector (and the historical `load_tool`, PR #30 — it shipped and returns the same `{ loaded: [...] }` shape) for the localized "Load tools" card, reading the loaded group id from `group` with a `namespace` fallback so replayed pre-unification sessions still render. `connect_tool_source` (PR #34) is deliberately not presented: it never shipped, so no such result exists, and its `{ tools: [...] }` shape differs from this card's `{ loaded: [...] }`. The runtime still seeds from it for the durable ledger (a separate concern that reads call args, not results).
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
…mantics PR #30's P2 #3 redefines promptSegment.toolCount as the model-visible (active) tool count, not the full providerTools registry (which includes the invalid fallback plus any deferred-unloaded / economy-hidden schemas that never reach the wire). After rebasing onto Tool Source Economy (PR #34), three economy tests still asserted the old providerTools.length values; update them to the active counts, which now equal modelToolNames().length in each case.
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. Same-turn activation honors only `load_tools` (and only its `group` arg). The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) names are accepted solely when re-seeding prior-turn activations from the durable ledger — never advertised, never live in the current turn. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Recognize the unified `load_tools` connector (and the historical `load_tool`, PR #30 — it shipped and returns the same `{ loaded: [...] }` shape) for the localized "Load tools" card, reading the loaded group id from `group` with a `namespace` fallback so replayed pre-unification sessions still render. `connect_tool_source` (PR #34) is deliberately not presented: it never shipped, so no such result exists, and its `{ tools: [...] }` shape differs from this card's `{ loaded: [...] }`. The runtime still seeds from it for the durable ledger (a separate concern that reads call args, not results).
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
…mantics PR #30's P2 #3 redefines promptSegment.toolCount as the model-visible (active) tool count, not the full providerTools registry (which includes the invalid fallback plus any deferred-unloaded / economy-hidden schemas that never reach the wire). After rebasing onto Tool Source Economy (PR #34), three economy tests still asserted the old providerTools.length values; update them to the active counts, which now equal modelToolNames().length in each case.
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. Same-turn activation honors only `load_tools` (and only its `group` arg). The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) names are accepted solely when re-seeding prior-turn activations from the durable ledger — never advertised, never live in the current turn. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Recognize the unified `load_tools` connector (and the historical `load_tool`, PR #30 — it shipped and returns the same `{ loaded: [...] }` shape) for the localized "Load tools" card, reading the loaded group id from `group` with a `namespace` fallback so replayed pre-unification sessions still render. `connect_tool_source` (PR #34) is deliberately not presented: it never shipped, so no such result exists, and its `{ tools: [...] }` shape differs from this card's `{ loaded: [...] }`. The runtime still seeds from it for the durable ledger (a separate concern that reads call args, not results).
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
…mantics PR #30's P2 #3 redefines promptSegment.toolCount as the model-visible (active) tool count, not the full providerTools registry (which includes the invalid fallback plus any deferred-unloaded / economy-hidden schemas that never reach the wire). After rebasing onto Tool Source Economy (PR #34), three economy tests still asserted the old providerTools.length values; update them to the active counts, which now equal modelToolNames().length in each case.
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
…o ToolAvailabilityRuntime Collapse the two parallel tool-visibility mechanisms — PR #30 deferred tool loading and PR #34 tool source economy — into one mechanism and one policy (issue #37): - One `economy` switch + configurable `coreToolNames`; grouping comes from `ToolAvailabilityConfig.groups`, not the per-tool `exposure` tag (removed from MakaTool). The now-dead `toolSource` tag is swept separately next. - One `load_tools` connector, built by the runtime. Same-turn activation honors only `load_tools` (and only its `group` arg). The historical `load_tool` (PR #30) and `connect_tool_source` (PR #34) names are accepted solely when re-seeding prior-turn activations from the durable ledger — never advertised, never live in the current turn. - One same-turn activation policy (prepareStep + execute-boundary gating); the next-request economy semantics are dropped. - Delete tool-source-economy.ts, deferred-activation.ts, load-tool.ts and their tests; add tool-availability.ts + tool-availability.test.ts. - Rename ToolSourceEconomyDiagnostic → ToolAvailabilityDiagnostic (record field toolSourceEconomy → toolAvailability) while keeping the historical *SourceIds shell vocabulary (a "source" id is a catalog group id). - Wire main.ts through a single ToolAvailabilityConfig (economy = !MAKA_DISABLE_DEFERRED_TOOLS; groups = rive/office/browser); the runtime now produces the connector, so builtinTools no longer include it.
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
Recognize the unified `load_tools` connector (and the historical `load_tool`, PR #30 — it shipped and returns the same `{ loaded: [...] }` shape) for the localized "Load tools" card, reading the loaded group id from `group` with a `namespace` fallback so replayed pre-unification sessions still render. `connect_tool_source` (PR #34) is deliberately not presented: it never shipped, so no such result exists, and its `{ tools: [...] }` shape differs from this card's `{ loaded: [...] }`. The runtime still seeds from it for the durable ledger (a separate concern that reads call args, not results).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Rive/Codex workflow: wfrun_4822ebad192c4409a8c5f73926a057b3, scheduler sched_a9d3856787f04c4b8b3e0be180938e53. Post-review patch fixed the final reviewer blocker around top-level prefix reason compatibility.