GeezerVison is showing github.com — mcpx: define the script-side generate API contract (split from #1925) · Issue #14183 · developing-today/code
mcpx: define the script-side generate API contract (split from #1925) #14183DescriptionFollow-on from #1925 (second-pass verify-and-route, queue task 21712, lane oc-code-03).
Scope
Define the script-side generate API contract for mcpx, the one remainder of #1925 that is not implemented. This issue is the design/spec step only. Implementation is a separate packet once the contract is settled.
Why this exists
Verified 2026-11-24 on fresh GitHub state. The earlier verify pass (task 19653, comment on #1925 from 2026-11-17) found:
sampling.answerLocally is implemented and tested (pkgs/mcpx/internal/daemon/sampling_local.go, wired at internal/daemon/hooks.go).
- "script-side generate" has no public, script-callable surface.
pkgs/mcpx/docs/exec.md describes daemon-side prompt hooks only. internal/execsvc/hooks.go says the ask/run prompt effects are not implemented.
Questions the contract must answer
- Call surface and name, as seen from a script.
- Which script languages can call it.
- Provider and model selection, and how a model profile is chosen.
- Request and response shape.
- Budgets and timeouts (
prompt.catalogBudget, prompt.maxTokens, prompt.sampleTimeout are the existing knobs).
- Error semantics.
Done check
A written contract in pkgs/mcpx/docs/ that names each question above, and a verdict on whether the implementation packet is ready. Refs #1925.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T07:43:23Z",
"session_id": "ses_e5df37ed67affejAsZreOJ49Up",
"lane": null,
"host": "amd",
"worktree": "/home/user/git/code",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/code",
"repo": "developing-today/code",
"branch": "oc-code-06/design-10391-iroh-transport",
"sha": "9c2b4ad096e30beb45358cbde674ed4c8a52434e"
},
"auth_subject": "oc-code-03",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activitydeveloping-today commented on Nov 24, 2026 dezren39 commented on Nov 24, 2026
Agent note — contract coverage verdict (lane code-g, task 23524): the deliverable this task was routed to write already exists twice, both open and active today:
Fresh verification against main: both PRs answer all six questions named in this issue, and their "current state" claims check out — sampling.answerLocally implemented (internal/daemon/sampling_local.go), ask/run refused at validation (internal/execsvc/hooks.go:192, test-pinned), no generate in the generated script client (internal/codegen/emit.go: only incidental matches), prompt hooks documented daemon-side only (docs/exec.md).
Implementation packet is NOT ready yet. Three conflicts between the two contracts must settle at merge/review before anyone builds:
- Call surface: launcher global vs
tools.model namespace method (permission-model implications differ).
- Error shape: thrown typed errors vs discriminated
ok:false values (hook precedent cited by docs(mcpx): script-side generate API contract #14459 cuts toward values).
- Knob mapping: whether
prompt.maxTokens caps script calls (docs(mcpx): script-side generate API contract (#14183) #14472) or script calls bring their own ask under the shared rule only (docs(mcpx): script-side generate API contract #14459).
No third contract doc opened — it would duplicate. This task completes on this verdict; the merge round on #14459/#14472 owns the three decisions. dezren39 commented on Nov 25, 2026
Decided: Settle the competing drafts using #14459 as the basis: generated generate global, discriminated model-outcome results, and model-layer caps rather than consumer prompt asks. First slice is TS/JS with configured direct providers; sampling/plugin and Python/Roc bindings are deferred.
Why: Code evidence confirms installGlobals exists, model.profiles exists, tool calls throw but prompt hooks carry recoverable failures, and prompt.* covers consumer synthesis as well as hooks. Neither draft should claim imaginary namespace/model permission grants. Consolidation branch oc-code-07/14183-settled-generate-contract corrects these facts and makes deadlines non-extendable.
Undo: A later contract PR can revise the surface before implementation; this is docs only.
By: oc-code-07, task 23524
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|