From 41bc659529d37dcbb3cc40473a787228527e448d Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 12:07:08 -0600 Subject: [PATCH 1/3] WIP: move shared mcpx daemon files into plugin core --- pkgs/mcpx/plugin/{opencode/mcpx => core}/daemon.test.ts | 0 pkgs/mcpx/plugin/{opencode/mcpx => core}/daemon.ts | 0 pkgs/mcpx/plugin/{opencode/mcpx => core}/ops.gen.ts | 0 pkgs/mcpx/plugin/{opencode/mcpx => core}/ops.test.ts | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename pkgs/mcpx/plugin/{opencode/mcpx => core}/daemon.test.ts (100%) rename pkgs/mcpx/plugin/{opencode/mcpx => core}/daemon.ts (100%) rename pkgs/mcpx/plugin/{opencode/mcpx => core}/ops.gen.ts (100%) rename pkgs/mcpx/plugin/{opencode/mcpx => core}/ops.test.ts (100%) diff --git a/pkgs/mcpx/plugin/opencode/mcpx/daemon.test.ts b/pkgs/mcpx/plugin/core/daemon.test.ts similarity index 100% rename from pkgs/mcpx/plugin/opencode/mcpx/daemon.test.ts rename to pkgs/mcpx/plugin/core/daemon.test.ts diff --git a/pkgs/mcpx/plugin/opencode/mcpx/daemon.ts b/pkgs/mcpx/plugin/core/daemon.ts similarity index 100% rename from pkgs/mcpx/plugin/opencode/mcpx/daemon.ts rename to pkgs/mcpx/plugin/core/daemon.ts diff --git a/pkgs/mcpx/plugin/opencode/mcpx/ops.gen.ts b/pkgs/mcpx/plugin/core/ops.gen.ts similarity index 100% rename from pkgs/mcpx/plugin/opencode/mcpx/ops.gen.ts rename to pkgs/mcpx/plugin/core/ops.gen.ts diff --git a/pkgs/mcpx/plugin/opencode/mcpx/ops.test.ts b/pkgs/mcpx/plugin/core/ops.test.ts similarity index 100% rename from pkgs/mcpx/plugin/opencode/mcpx/ops.test.ts rename to pkgs/mcpx/plugin/core/ops.test.ts From 9dd72a5b4fa35b8284fc00e2f60d929eb8af3905 Mon Sep 17 00:00:00 2001 From: repo-worker-code-k Date: Tue, 10 Nov 2026 17:11:21 -0600 Subject: [PATCH 2/3] =?UTF-8?q?fix(mcpx):=20complete=20the=20plugin-core?= =?UTF-8?q?=20relocation=20=E2=80=94=20update=20all=20consumers=20(#7166?= =?UTF-8?q?=20Codex=20P2s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/mcpx.yml | 6 ++++-- .opencode/plugin/{mcpx => core}/daemon.test.ts | 2 +- .opencode/plugin/{mcpx => core}/daemon.ts | 0 .opencode/plugin/{mcpx => core}/ops.gen.ts | 0 .opencode/plugin/{mcpx => core}/ops.test.ts | 2 +- .opencode/plugin/mcpx-session.ts | 2 +- .opencode/plugin/mcpx/ceiling.test.ts | 2 +- pkgs/mcpx/docs/interfaces.md | 4 ++-- pkgs/mcpx/docs/parity.md | 2 +- pkgs/mcpx/internal/api/plugin_ts.go | 2 +- pkgs/mcpx/internal/api/plugin_ts_test.go | 2 +- pkgs/mcpx/internal/cli/parity.go | 2 +- pkgs/mcpx/internal/cli/parity_test.go | 2 +- pkgs/mcpx/internal/e2e/plugin_test.go | 4 ++-- pkgs/mcpx/internal/refdoc/regions_test.go | 2 +- pkgs/mcpx/plugin/core/daemon.test.ts | 2 +- pkgs/mcpx/plugin/core/ops.test.ts | 2 +- pkgs/mcpx/plugin/opencode/mcpx-session.ts | 2 +- pkgs/mcpx/plugin/opencode/mcpx-tui.tsx | 2 +- pkgs/mcpx/plugin/opencode/mcpx/ceiling.test.ts | 2 +- pkgs/mcpx/plugin/opencode/v2/daemon.ts | 4 ++-- pkgs/mcpx/plugin/opencode/v2/index.ts | 2 +- pkgs/mcpx/plugin/opencode/v2/options.ts | 2 +- pkgs/mcpx/plugin/opencode/v2/remember.ts | 4 ++-- pkgs/mcpx/plugin/opencode/v2/sampling.ts | 2 +- pkgs/mcpx/plugin/opencode/v2/tools.test.ts | 2 +- pkgs/mcpx/plugin/opencode/v2/tools.ts | 2 +- 27 files changed, 32 insertions(+), 30 deletions(-) rename .opencode/plugin/{mcpx => core}/daemon.test.ts (99%) rename .opencode/plugin/{mcpx => core}/daemon.ts (100%) rename .opencode/plugin/{mcpx => core}/ops.gen.ts (100%) rename .opencode/plugin/{mcpx => core}/ops.test.ts (99%) diff --git a/.github/workflows/mcpx.yml b/.github/workflows/mcpx.yml index f9ea948aa2..642798d0f4 100644 --- a/.github/workflows/mcpx.yml +++ b/.github/workflows/mcpx.yml @@ -97,6 +97,7 @@ jobs: - name: Check the dogfood plugin copy is in sync run: | diff -r pkgs/mcpx/plugin/opencode/mcpx .opencode/plugin/mcpx + diff -r pkgs/mcpx/plugin/core .opencode/plugin/core diff pkgs/mcpx/plugin/opencode/mcpx-session.ts .opencode/plugin/mcpx-session.ts test: @@ -128,6 +129,7 @@ jobs: - name: Check the dogfood plugin copy is in sync run: | diff -r pkgs/mcpx/plugin/opencode/mcpx .opencode/plugin/mcpx + diff -r pkgs/mcpx/plugin/core .opencode/plugin/core diff pkgs/mcpx/plugin/opencode/mcpx-session.ts .opencode/plugin/mcpx-session.ts - uses: actions/setup-go@v7 @@ -239,7 +241,7 @@ jobs: # test fails CI instead of never running (#1978). - name: Plugin tests (bun) working-directory: pkgs/mcpx - run: bun test plugin/opencode/mcpx/ + run: bun test plugin/opencode/mcpx/ plugin/core/ docs-history: name: "basic: docs-history check" @@ -371,7 +373,7 @@ jobs: - name: bun test working-directory: pkgs/mcpx - run: bun test plugin/opencode/mcpx/ + run: bun test plugin/opencode/mcpx/ plugin/core/ vendorhash-repair: name: vendorHash repair (bot dependency bumps only) diff --git a/.opencode/plugin/mcpx/daemon.test.ts b/.opencode/plugin/core/daemon.test.ts similarity index 99% rename from .opencode/plugin/mcpx/daemon.test.ts rename to .opencode/plugin/core/daemon.test.ts index 0c192a7f84..ba9fc67c26 100644 --- a/.opencode/plugin/mcpx/daemon.test.ts +++ b/.opencode/plugin/core/daemon.test.ts @@ -7,7 +7,7 @@ * stale info file, a socket with nothing behind it, two daemons at once. A * mocked fetch would pass every one of them. * - * bun test plugin/opencode/mcpx/daemon.test.ts + * bun test plugin/core/daemon.test.ts */ import { afterEach, describe, expect, test } from "bun:test"; diff --git a/.opencode/plugin/mcpx/daemon.ts b/.opencode/plugin/core/daemon.ts similarity index 100% rename from .opencode/plugin/mcpx/daemon.ts rename to .opencode/plugin/core/daemon.ts diff --git a/.opencode/plugin/mcpx/ops.gen.ts b/.opencode/plugin/core/ops.gen.ts similarity index 100% rename from .opencode/plugin/mcpx/ops.gen.ts rename to .opencode/plugin/core/ops.gen.ts diff --git a/.opencode/plugin/mcpx/ops.test.ts b/.opencode/plugin/core/ops.test.ts similarity index 99% rename from .opencode/plugin/mcpx/ops.test.ts rename to .opencode/plugin/core/ops.test.ts index a4c0099ee4..2e2cd5744d 100644 --- a/.opencode/plugin/mcpx/ops.test.ts +++ b/.opencode/plugin/core/ops.test.ts @@ -3,7 +3,7 @@ * socket and -- when the Go suite hands one over in OPS_LIVE_SOCKET -- against * a real daemon. * - * bun test plugin/opencode/mcpx/ops.test.ts + * bun test plugin/core/ops.test.ts * * The fake half proves the request shapes: that a path parameter is escaped, * a raw body arrives as bytes, a bare-document route receives the document. diff --git a/.opencode/plugin/mcpx-session.ts b/.opencode/plugin/mcpx-session.ts index 9f29373ece..4b4117e25e 100644 --- a/.opencode/plugin/mcpx-session.ts +++ b/.opencode/plugin/mcpx-session.ts @@ -23,7 +23,7 @@ import { type Discovery, type DiscoverOptions, type Target, -} from "./mcpx/daemon.ts"; +} from "../core/daemon.ts"; // The only reliable way to tell, in v1, whether anyone is looking at a // screen. See `headless` below. import { isMainThread } from "node:worker_threads"; diff --git a/.opencode/plugin/mcpx/ceiling.test.ts b/.opencode/plugin/mcpx/ceiling.test.ts index 42a4efa193..94c804f5f0 100644 --- a/.opencode/plugin/mcpx/ceiling.test.ts +++ b/.opencode/plugin/mcpx/ceiling.test.ts @@ -8,7 +8,7 @@ import { existsSync } from "node:fs" import { describe, expect, test } from "bun:test" -import { DaemonClient } from "./daemon.ts" +import { DaemonClient } from "../../core/daemon.ts" const socket = process.env.CEILING_SOCKET const mark = process.env.CEILING_MARK as string diff --git a/pkgs/mcpx/docs/interfaces.md b/pkgs/mcpx/docs/interfaces.md index 4710b20a40..e25b134f8a 100644 --- a/pkgs/mcpx/docs/interfaces.md +++ b/pkgs/mcpx/docs/interfaces.md @@ -25,7 +25,7 @@ declaration come: - the `mcpx_` MCP tool, - a generated CLI command, for operations that have one, - a typed plugin method on `DaemonClient.ops` - (`plugin/opencode/mcpx/ops.gen.ts`, generated the same way), + (`plugin/core/ops.gen.ts`, generated the same way), - the operation's entry in `/v1/openapi.json` and in the document `mcpx openapi` prints — one document now, generated from the table; the stale hand-written serve-surface document it replaced is @@ -140,7 +140,7 @@ JavaScript runtime involved at all. The whole surface is the ### `DaemonClient` and `connect()` — for harnesses and Bun/TypeScript programs -The opencode plugin's client (`plugin/opencode/mcpx/daemon.ts`) +The opencode plugin's client (`plugin/core/daemon.ts`) talks to the daemon over its unix socket — measured at about 0.17 ms per call against about 23 ms for spawning the binary. It is not published as a package; harness plugins vendor it, and any diff --git a/pkgs/mcpx/docs/parity.md b/pkgs/mcpx/docs/parity.md index 9d724e34d4..c958c23d04 100644 --- a/pkgs/mcpx/docs/parity.md +++ b/pkgs/mcpx/docs/parity.md @@ -23,7 +23,7 @@ Each direction is also held by a test: A command marked *generated* is built from the operation's declaration -- flags from its parameters, positionals for its path -- so it exists the moment the operation does. The plugin reaches every operation through -`DaemonClient.ops` (`plugin/opencode/mcpx/ops.gen.ts`, generated the same way); +`DaemonClient.ops` (`plugin/core/ops.gen.ts`, generated the same way); the named methods beside it are conveniences with typed answers. Privileged operations are offered rather than hidden. A caller that can reach diff --git a/pkgs/mcpx/internal/api/plugin_ts.go b/pkgs/mcpx/internal/api/plugin_ts.go index d30d886763..0aaffe9079 100644 --- a/pkgs/mcpx/internal/api/plugin_ts.go +++ b/pkgs/mcpx/internal/api/plugin_ts.go @@ -6,7 +6,7 @@ import ( "strings" ) -// PluginTS renders plugin/opencode/mcpx/ops.gen.ts: one typed method per +// PluginTS renders plugin/core/ops.gen.ts: one typed method per // /v1 operation, for the opencode plugin's DaemonClient. // // Generated for the reason the MCP tools and the CLI commands are: the diff --git a/pkgs/mcpx/internal/api/plugin_ts_test.go b/pkgs/mcpx/internal/api/plugin_ts_test.go index ee2ce5c049..92e73b3655 100644 --- a/pkgs/mcpx/internal/api/plugin_ts_test.go +++ b/pkgs/mcpx/internal/api/plugin_ts_test.go @@ -10,7 +10,7 @@ import ( var update = flag.Bool("update", false, "rewrite generated files instead of comparing them") -const pluginOpsPath = "../../plugin/opencode/mcpx/ops.gen.ts" +const pluginOpsPath = "../../plugin/core/ops.gen.ts" // TestPluginOpsAreGenerated fails when the plugin's operation methods no // longer match the table -- an operation added, a parameter renamed -- so diff --git a/pkgs/mcpx/internal/cli/parity.go b/pkgs/mcpx/internal/cli/parity.go index a8ef39ab79..bc072021d6 100644 --- a/pkgs/mcpx/internal/cli/parity.go +++ b/pkgs/mcpx/internal/cli/parity.go @@ -73,7 +73,7 @@ Each direction is also held by a test: A command marked *generated* is built from the operation's declaration -- flags from its parameters, positionals for its path -- so it exists the moment the operation does. The plugin reaches every operation through -` + "`DaemonClient.ops`" + ` (` + "`plugin/opencode/mcpx/ops.gen.ts`" + `, generated the same way); +` + "`DaemonClient.ops`" + ` (` + "`plugin/core/ops.gen.ts`" + `, generated the same way); the named methods beside it are conveniences with typed answers. Privileged operations are offered rather than hidden. A caller that can reach diff --git a/pkgs/mcpx/internal/cli/parity_test.go b/pkgs/mcpx/internal/cli/parity_test.go index 934e59bce2..e49b4c6044 100644 --- a/pkgs/mcpx/internal/cli/parity_test.go +++ b/pkgs/mcpx/internal/cli/parity_test.go @@ -13,7 +13,7 @@ var update = flag.Bool("update", false, "rewrite generated files instead of comp const ( parityPath = "../../docs/parity.md" - daemonTSPath = "../../plugin/opencode/mcpx/daemon.ts" + daemonTSPath = "../../plugin/core/daemon.ts" ) // TestParityDocumentIsCurrent fails when docs/parity.md no longer matches the diff --git a/pkgs/mcpx/internal/e2e/plugin_test.go b/pkgs/mcpx/internal/e2e/plugin_test.go index a01feaad50..ec55f1e7ee 100644 --- a/pkgs/mcpx/internal/e2e/plugin_test.go +++ b/pkgs/mcpx/internal/e2e/plugin_test.go @@ -27,12 +27,12 @@ func TestThePluginSuiteRunsAgainstARealDaemon(t *testing.T) { t.Fatalf("could not find the daemon's socket: %v", err) } - cmd := exec.Command(bun, "test", "plugin/opencode/mcpx/") + cmd := exec.Command(bun, "test", "plugin/opencode/mcpx/", "plugin/core/") cmd.Dir = repoRoot(t) cmd.Env = append(e.envVars, "OPS_LIVE_SOCKET="+where.Socket, "OPS_LIVE_DIR="+e.dir) out, err := cmd.CombinedOutput() if err != nil { - t.Fatalf("bun test plugin/opencode/mcpx/: %v\n%s", err, out) + t.Fatalf("bun test plugin/opencode/mcpx/ plugin/core/: %v\n%s", err, out) } // The live tests skip themselves without a socket; a run that skipped // them is a run that did not check what this test exists to check. diff --git a/pkgs/mcpx/internal/refdoc/regions_test.go b/pkgs/mcpx/internal/refdoc/regions_test.go index 31e6108eec..4ce5942628 100644 --- a/pkgs/mcpx/internal/refdoc/regions_test.go +++ b/pkgs/mcpx/internal/refdoc/regions_test.go @@ -94,7 +94,7 @@ func TestCommittedRegionsAreCurrent(t *testing.T) { // docs/parity.md: the whole file is cli.ParityDoc over the plugin's // daemon.ts. { - ts, err := os.ReadFile("../../plugin/opencode/mcpx/daemon.ts") + ts, err := os.ReadFile("../../plugin/core/daemon.ts") if err != nil { t.Fatal(err) } diff --git a/pkgs/mcpx/plugin/core/daemon.test.ts b/pkgs/mcpx/plugin/core/daemon.test.ts index 0c192a7f84..ba9fc67c26 100644 --- a/pkgs/mcpx/plugin/core/daemon.test.ts +++ b/pkgs/mcpx/plugin/core/daemon.test.ts @@ -7,7 +7,7 @@ * stale info file, a socket with nothing behind it, two daemons at once. A * mocked fetch would pass every one of them. * - * bun test plugin/opencode/mcpx/daemon.test.ts + * bun test plugin/core/daemon.test.ts */ import { afterEach, describe, expect, test } from "bun:test"; diff --git a/pkgs/mcpx/plugin/core/ops.test.ts b/pkgs/mcpx/plugin/core/ops.test.ts index a4c0099ee4..2e2cd5744d 100644 --- a/pkgs/mcpx/plugin/core/ops.test.ts +++ b/pkgs/mcpx/plugin/core/ops.test.ts @@ -3,7 +3,7 @@ * socket and -- when the Go suite hands one over in OPS_LIVE_SOCKET -- against * a real daemon. * - * bun test plugin/opencode/mcpx/ops.test.ts + * bun test plugin/core/ops.test.ts * * The fake half proves the request shapes: that a path parameter is escaped, * a raw body arrives as bytes, a bare-document route receives the document. diff --git a/pkgs/mcpx/plugin/opencode/mcpx-session.ts b/pkgs/mcpx/plugin/opencode/mcpx-session.ts index 9f29373ece..4b4117e25e 100644 --- a/pkgs/mcpx/plugin/opencode/mcpx-session.ts +++ b/pkgs/mcpx/plugin/opencode/mcpx-session.ts @@ -23,7 +23,7 @@ import { type Discovery, type DiscoverOptions, type Target, -} from "./mcpx/daemon.ts"; +} from "../core/daemon.ts"; // The only reliable way to tell, in v1, whether anyone is looking at a // screen. See `headless` below. import { isMainThread } from "node:worker_threads"; diff --git a/pkgs/mcpx/plugin/opencode/mcpx-tui.tsx b/pkgs/mcpx/plugin/opencode/mcpx-tui.tsx index 5891a99051..c4ab665585 100644 --- a/pkgs/mcpx/plugin/opencode/mcpx-tui.tsx +++ b/pkgs/mcpx/plugin/opencode/mcpx-tui.tsx @@ -50,7 +50,7 @@ import { targetKey, writeRemembered, type Candidate, -} from "./mcpx/daemon.ts" +} from "../core/daemon.ts" const id = "mcpx-daemon-picker" diff --git a/pkgs/mcpx/plugin/opencode/mcpx/ceiling.test.ts b/pkgs/mcpx/plugin/opencode/mcpx/ceiling.test.ts index 42a4efa193..94c804f5f0 100644 --- a/pkgs/mcpx/plugin/opencode/mcpx/ceiling.test.ts +++ b/pkgs/mcpx/plugin/opencode/mcpx/ceiling.test.ts @@ -8,7 +8,7 @@ import { existsSync } from "node:fs" import { describe, expect, test } from "bun:test" -import { DaemonClient } from "./daemon.ts" +import { DaemonClient } from "../../core/daemon.ts" const socket = process.env.CEILING_SOCKET const mark = process.env.CEILING_MARK as string diff --git a/pkgs/mcpx/plugin/opencode/v2/daemon.ts b/pkgs/mcpx/plugin/opencode/v2/daemon.ts index 386ace08aa..fd5248e685 100644 --- a/pkgs/mcpx/plugin/opencode/v2/daemon.ts +++ b/pkgs/mcpx/plugin/opencode/v2/daemon.ts @@ -1,7 +1,7 @@ /** * The daemon core is harness-free and shared with v1: discovery, the /v1 * socket client, ranking and the remembered-target types all live in - * ../mcpx/daemon.ts and are imported unchanged (design doc §5). This module + * ../../core/daemon.ts and are imported unchanged (design doc §5). This module * exists so the v2 tree names its dependency in one place. */ -export * from "../mcpx/daemon.ts"; +export * from "../../core/daemon.ts"; diff --git a/pkgs/mcpx/plugin/opencode/v2/index.ts b/pkgs/mcpx/plugin/opencode/v2/index.ts index 954403968e..c5f888d558 100644 --- a/pkgs/mcpx/plugin/opencode/v2/index.ts +++ b/pkgs/mcpx/plugin/opencode/v2/index.ts @@ -13,7 +13,7 @@ * sample rows answered through ctx.generate.text. * The v1 tree stays beside this one, untouched, until v2 is what runs. */ -import { targetKey, type Target } from "../mcpx/daemon.ts"; +import { targetKey, type Target } from "../../core/daemon.ts"; import { appendContextOnce, type ContextHookInput } from "./context.ts"; import { resolveOptions, type Options } from "./options.ts"; import { wirePermissionGate, type PermissionDomainLike } from "./permission.ts"; diff --git a/pkgs/mcpx/plugin/opencode/v2/options.ts b/pkgs/mcpx/plugin/opencode/v2/options.ts index 00b56906cc..8955a00a9c 100644 --- a/pkgs/mcpx/plugin/opencode/v2/options.ts +++ b/pkgs/mcpx/plugin/opencode/v2/options.ts @@ -13,7 +13,7 @@ * and these are reads, not sets. (An earlier draft listed the names in * a quoted array and failed that test on all twelve.) */ -import { goDurationMs, splitArgs } from "../mcpx/daemon.ts"; +import { goDurationMs, splitArgs } from "../../core/daemon.ts"; export type Options = { /** A daemon named outright. `unix:///path` or `http://host:port`. */ diff --git a/pkgs/mcpx/plugin/opencode/v2/remember.ts b/pkgs/mcpx/plugin/opencode/v2/remember.ts index 65e6d2178d..6cd605ffe6 100644 --- a/pkgs/mcpx/plugin/opencode/v2/remember.ts +++ b/pkgs/mcpx/plugin/opencode/v2/remember.ts @@ -8,8 +8,8 @@ * was seen, and a caller that health-checks the target drops the record when * the check fails (see recallDaemon). */ -import type { Target } from "../mcpx/daemon.ts"; -import { targetKey } from "../mcpx/daemon.ts"; +import type { Target } from "../../core/daemon.ts"; +import { targetKey } from "../../core/daemon.ts"; /** The slice of ctx.storage this module needs (structural, host-provided). */ export type StorageLike = { diff --git a/pkgs/mcpx/plugin/opencode/v2/sampling.ts b/pkgs/mcpx/plugin/opencode/v2/sampling.ts index eac6432794..88ffd2a290 100644 --- a/pkgs/mcpx/plugin/opencode/v2/sampling.ts +++ b/pkgs/mcpx/plugin/opencode/v2/sampling.ts @@ -37,7 +37,7 @@ * second answer) leaves the question open for the next poll or * another answerer, and never fails the session or setup. */ -import type { DaemonClient } from "../mcpx/daemon.ts"; +import type { DaemonClient } from "../../core/daemon.ts"; /** The slice of the daemon client the watcher uses. */ export type SamplingDaemonLike = Pick; diff --git a/pkgs/mcpx/plugin/opencode/v2/tools.test.ts b/pkgs/mcpx/plugin/opencode/v2/tools.test.ts index ef9408c20e..3d621b84bf 100644 --- a/pkgs/mcpx/plugin/opencode/v2/tools.test.ts +++ b/pkgs/mcpx/plugin/opencode/v2/tools.test.ts @@ -10,7 +10,7 @@ * bun test plugin/opencode/v2/tools.test.ts */ import { describe, expect, test } from "bun:test"; -import { rank, targetKey, type Candidate, type Discovery, type DiscoverOptions, type Target } from "../mcpx/daemon.ts"; +import { rank, targetKey, type Candidate, type Discovery, type DiscoverOptions, type Target } from "../../core/daemon.ts"; import { resolveOptions } from "./options.ts"; import { setupMcpxV2, type McpxV2Context } from "./index.ts"; import { rememberDaemon, type StorageLike } from "./remember.ts"; diff --git a/pkgs/mcpx/plugin/opencode/v2/tools.ts b/pkgs/mcpx/plugin/opencode/v2/tools.ts index 557f782cdd..2b7e3fe673 100644 --- a/pkgs/mcpx/plugin/opencode/v2/tools.ts +++ b/pkgs/mcpx/plugin/opencode/v2/tools.ts @@ -50,7 +50,7 @@ import { type Discovery, type DiscoverOptions, type Target, -} from "../mcpx/daemon.ts"; +} from "../../core/daemon.ts"; import type { Options } from "./options.ts"; import { DAEMON_SELECT_ACTION, type PermissionAssertInput } from "./permission.ts"; import { forgetDaemon, readRememberedDaemon, rememberDaemon, type StorageLike } from "./remember.ts"; From 3ebb272f05bd3838447ea2db78d36b4bfe752281 Mon Sep 17 00:00:00 2001 From: repo-worker-code-k Date: Tue, 10 Nov 2026 17:16:19 -0600 Subject: [PATCH 3/3] fix(mcpx): point post-merge v2 picker + plugin README at plugin/core (#7166) --- pkgs/mcpx/plugin/opencode/README.md | 10 +++++----- pkgs/mcpx/plugin/opencode/v2/picker.test.ts | 2 +- pkgs/mcpx/plugin/opencode/v2/picker.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/mcpx/plugin/opencode/README.md b/pkgs/mcpx/plugin/opencode/README.md index 872116b7c3..5666893926 100644 --- a/pkgs/mcpx/plugin/opencode/README.md +++ b/pkgs/mcpx/plugin/opencode/README.md @@ -70,8 +70,8 @@ is the way to configure a drop-in installation. | file | what it is for | | --- | --- | | `mcpx-session.ts` | the opencode adapter: hooks, tools, toasts, and the session id. The only file opencode loads as a plugin. | -| `mcpx/daemon.ts` | the portable core: the daemon HTTP client, the discovery ladder, and the remembered-choice file. Imports nothing from opencode. | -| `mcpx/daemon.test.ts` | `bun test` over the ladder, against real sockets and real temporary state directories. | +| `../core/daemon.ts` | the portable core: the daemon HTTP client, the discovery ladder, and the remembered-choice file. Imports nothing from opencode. | +| `../core/daemon.test.ts` | `bun test` over the ladder, against real sockets and real temporary state directories. | | `mcpx/ops.gen.ts` | a typed method for every `/v1` operation, generated from the Go operation table. Do not edit; `go test ./internal/api -run TestPluginOpsAreGenerated -update` rewrites it. | | `mcpx/ops.test.ts` | `bun test` over the generated methods, against a fake daemon and -- run from the Go suite -- a real one. | | `mcpx-tui.tsx` | optional TUI plugin: a real picker for the daemon. Different realm, different API, installed separately. | @@ -319,7 +319,7 @@ With no daemon the record is **dropped**, not spawned. A timing is not worth ## Talking to the daemon directly -`mcpx/daemon.ts` connects over the unix socket instead of spawning. Measured +`../core/daemon.ts` connects over the unix socket instead of spawning. Measured here, same request, mean of thirty: | | | @@ -335,7 +335,7 @@ rather than transport. That does not matter for something called once a session. It matters a great deal for anything on the path of every tool call. ```ts -import { connect } from "./mcpx/daemon.ts" +import { connect } from "../core/daemon.ts" const { client, discovery } = await connect({ directory }) if (client) await client.call("fff", "grep", { query: "x" }, sessionID) @@ -398,7 +398,7 @@ them at runtime. ## Tests ```sh -bun test plugin/opencode/mcpx/daemon.test.ts +bun test plugin/core/daemon.test.ts ``` Real unix sockets and real temporary state directories, because every failure diff --git a/pkgs/mcpx/plugin/opencode/v2/picker.test.ts b/pkgs/mcpx/plugin/opencode/v2/picker.test.ts index dd9958b117..a2ecd5b2ab 100644 --- a/pkgs/mcpx/plugin/opencode/v2/picker.test.ts +++ b/pkgs/mcpx/plugin/opencode/v2/picker.test.ts @@ -11,7 +11,7 @@ * bun test plugin/opencode/v2/picker.test.ts */ import { describe, expect, test } from "bun:test"; -import { targetKey, type Candidate, type Target } from "../mcpx/daemon.ts"; +import { targetKey, type Candidate, type Target } from "../../core/daemon.ts"; import { buildPickerOptions, renderPickerMenu, runPickerSelection, type PickerScope } from "./picker.ts"; const a: Target = { kind: "socket", path: "/tmp/a.sock" }; diff --git a/pkgs/mcpx/plugin/opencode/v2/picker.ts b/pkgs/mcpx/plugin/opencode/v2/picker.ts index 44efdf584d..fd375fc642 100644 --- a/pkgs/mcpx/plugin/opencode/v2/picker.ts +++ b/pkgs/mcpx/plugin/opencode/v2/picker.ts @@ -46,7 +46,7 @@ * apply in, a discriminated outcome out — so the stub-host tests are * the contract, exactly as with the rest of the v2 tree. */ -import { ago, label, targetKey, type Candidate, type Target } from "../mcpx/daemon.ts"; +import { ago, label, targetKey, type Candidate, type Target } from "../../core/daemon.ts"; import { DAEMON_SELECT_ACTION, type PermissionAssertInput } from "./permission.ts"; export type PickerScope = "session" | "until-gone" | "indefinite" | "permanent";