mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6292] [Feature]: Let capability packages receive structured data from a turn #3507
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3507
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BiBoBaBe on GitHub (Sep 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6292
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
A capability package can put text into a turn's prompt (
registerPromptContext, API 1.7/1.14) and read named verbs back out of the finished narration (gm-verbs.json, API 1.16). Both directions are conventions the model is asked to honour, and there is no way to get structured data back from a turn that the provider itself has constrained.That gap bites hardest for a package that owns live state — a world, a clock, an inventory, a map. Concretely, with the verb path today:
Measuring this on a package I maintain, across identical scenes: parsing named actions out of narration produced at least one unusable argument in 1 of 3 turns. Handing the same vocabulary to the model as a JSON Schema with enums produced 0 rejections in 3 of 3. The difference is not prompt wording — it is whether the allowed values are a constraint or a request.
Proposed solution
Let a package register a tool the model may call, with the parameters as a JSON Schema the package builds:
Engine offers it alongside the built-in tools, validates the call, and hands the arguments to the package's handler. The enum is the point: a package that knows the twelve places in its world can put those twelve strings in the schema, and a thirteenth is refused before the handler ever sees it.
Alternatives considered
gm-verbs.jsonis declarative and hash-pinned, which is genuinely better for reviewability, but it is still parsed out of generated text and cannot express argument types, ranges or required fields.Additional context
Engine already has the machinery:
resolveGenerationToolsbuilds tool definitions,executeToolCallsdispatches them, and the argument validator already names the allowed enum values on a refusal — which is exactly the repair signal a model needs.I have a working implementation and opened it as a PR so the discussion has something concrete to look at. It is not asking to be merged as-is; the PR body lists four design questions I would rather a maintainer decide than assume, chiefly whether package tools should be scoped to chats bound to the package (as verbs are) rather than attached globally, and whether the tool surface should be manifest-declared and hash-pinned so it is reviewable at install time rather than appearing at runtime.
Filing this issue after the fact rather than before, which is the wrong order per
CONTRIBUTING.md; opening it now so the PR has somewhere to point.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Sep 17, 2026):
Implemented in #6290 and merged into staging. Capability packages can register structured, validated tool calls through Capability API 1.19.