GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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) #14183

New issue
Copy link
New issue
Copy link
Done
#14770
Done
mcpx: define the script-side generate API contract (split from #1925)#14183
#14770
Copy link
Labels
enhancementNew feature or requeststatus:done

Description

@dezren39
dezren39
opened on Nov 24, 2026
Issue body actions

Follow-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)"
  }
}

Activity

  1. dezren39
    added
    enhancementNew feature or request
    on Nov 24, 2026
  2. developing-today commented on Nov 24, 2026

    @developing-today
    developing-todayBot
    on Nov 24, 2026 – with developing.today
    Contributor
    More actions

    CODE-5217

  3. dezren39
    added a commit that references this issue on Nov 24, 2026

    docs(mcpx): write script-side generate API contract

    68fd5fc
  4. developing-today
    added
    status:in-review
    on Nov 24, 2026
  5. dezren39 commented on Nov 24, 2026

    @dezren39
    dezren39
    on Nov 24, 2026
    MemberAuthor
    More actions

    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:

    • PR docs(mcpx): script-side generate API contract (#14183) #14472 (docs/script-generate-contract.md, updated 16:22Z): proposes tools.model.generate(...), TS-first, typed-throw errors, reuses prompt.maxTokens as the per-call cap.
    • PR docs(mcpx): script-side generate API contract #14459 (docs/script-generate.md + index entries, updated 16:08Z): proposes a launcher-installed generate(...) global, discriminated ok:false results (never throws for model outcomes), script calls share the ModelTokenCap rule but NOT the prompt.* knobs.

    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:

    1. Call surface: launcher global vs tools.model namespace method (permission-model implications differ).
    2. 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).
    3. 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.

  6. dezren39 commented on Nov 25, 2026

    @dezren39
    dezren39
    on Nov 25, 2026
    MemberAuthor
    More actions

    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

  7. dezren39
    added 2 commits that reference this issue on Nov 25, 2026

    docs(mcpx): write script-side generate API contract

    293a623

    docs(mcpx): settle competing generate API contracts for #14183

    f5b4d6e
  8. dezren39
    closed this as completedin #14770on Nov 25, 2026
  9. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.