Skip to content

mcpx: natural language to script -- a sentence in, a reviewed script (or its result) out #1961

Closed

Description

@dezren39

Relocated from dezren39/darwin-nix#294 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

mcpx is mostly a gateway, but one planned surface turns a sentence into a script against the configured servers.

Today mcpx prompt "<what you want>" matches a saved recipe or generates a script to review, governed by prompt.autonomy (decision 0002: off < advise < ask < propose < apply < run).

Wanted, as one declared feature across CLI, /v1, MCP and the plugin:

  • Script only: a sentence in, the script bytes out (typed against the generated client, type-checked), without running anything. This is the default at propose.
  • Run: the same, executed, with the result returned (at run, subject to the daemon's autonomy.max ceiling).
  • Where the model comes from must be stated: a caller-supplied model/provider, not MCP sampling (deprecated in 2026-07-28).
  • Generated scripts saved as recipes on request, so a repeated sentence becomes a recipe match instead of a regeneration.

Related: #112 (hooks), #113 (administration by intent), decision 0002.

Acceptance criteria

  • mcpx prompt "<sentence>" can return the generated script bytes without executing anything (script-only mode), typed against the generated client and type-checked before it is returned.
  • Run mode executes the same generated script and returns its result, gated by the caller's autonomy level and the daemon's autonomy.max ceiling.
  • The model/provider used for generation is caller-supplied and stated in the response; MCP sampling is not used.
  • A generated script can be saved as a recipe on request, and a later identical sentence matches the saved recipe instead of regenerating.
  • The feature behaves the same across the CLI, /v1, MCP, and plugin surfaces, with tests covering script-only vs run gating.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#294 (verbatim, oldest first):


    @dezren39 · 2026-10-27T14:50:30Z

    Intake review

    Fleet-monitor intake pass (2026-10-27). Related: #112 (hooks), #113 (administration by intent), decision 0002 (autonomy ladder) — all cited in the issue. The body already specifies the four surfaces and the autonomy gating well; I appended acceptance criteria and normalized labels (kind/enhancement, priority/low, effort/l, app/mcpx).

    Notes / risks: this is a design-level feature, not a bug — the caller-supplied model requirement (no MCP sampling, deprecated 2026-07-28) is the load-bearing constraint and should be settled before implementation. Suggested approach: land script-only mode first (it is the default at propose and the safest slice), then run mode behind the autonomy ceiling, then recipe saving.


    @dezren39 · 2026-10-28T19:23:17Z

    Triage verdict (task 2318): LARGELY IMPLEMENTED — one acceptance item fails and is routed.

    Verified at developing-today/code main 35726e8e (mcpx source: pkgs/mcpx):

    • Script-only / run (acceptance 1–2): done. internal/cli/consumer.go:421 CmdPrompt takes --autonomy/--run; at propose the script Source is returned unexecuted, at run it executes, and a daemon-ceiling clamp is reported on stderr (Resolution.ClampedBy), with e2e coverage in internal/e2e/autonomy_test.go and ceiling_test.go. Generated scripts are validated before return (internal/cli/script_validate_test.go).
    • Recipes (acceptance 4): done. A sentence matches saved recipes first; a generated script carries Resolution.Save and the CLI prints 'keep it with mcpx recipes save <name> -'.
    • Model stated (acceptance 3, half): Resolution.Model is in the response shape.
    • Model caller-supplied, no sampling (acceptance 3, the failing half): not met. Client.Intent takes (prompt, autonomy, values, session) — no model/provider from the caller; the daemon's only provider config is its own repair.provider/repair.model settings (internal/daemon/consumer.go resolveProvider). And when no provider answers, generate() (daemon/consumer.go, 'generation by sampling', ~:605+) falls back to an MCP sampling request through the broker (elicit.SampleAsk) — the CLI even calls that the default state ('generated by sampling; review it before running'). Sampling is deprecated in 2026-07-28 and this issue's acceptance says it must not be used for generation.
    • Cross-surface parity (acceptance 5) is implemented through the shared intent path but I did not exhaustively verify plugin-surface tests this triage; the fix packet keeps the surfaces on the same path.

    Routing: remainder enqueued as task 2644 (queue repo-health-nix-pilot, dedupe repo-health:v1:fix:dezren39/nix:issue:294): caller-supplied model/provider on the intent path (CLI flag + /v1 field), and remove the sampling fallback from generate() so no-provider returns the existing no-model resolution instead. This issue stays open for that remainder.

  3. added
    enhancementNew feature or request
    priority/lowNice to have; do when convenient
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued task in the Supabase agent queue
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  4. 52 remaining items

  5. added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 29, 2026
  6. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  7. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 29, 2026
  8. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insenhancementNew feature or requestkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientstatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions