@plitzi/sdk-mcp 0.38.16 → 0.38.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/modules/mcp/apps/render/view/streamProgress.ts +1 -1
  3. package/dist/modules/mcp/helpers/components.js +1 -1
  4. package/dist/modules/mcp/helpers/interactions.d.ts +1 -2
  5. package/dist/modules/mcp/helpers/space.js +1 -1
  6. package/dist/modules/mcp/resources/renderGuide.js +1 -1
  7. package/dist/modules/mcp/resources/schema.js +1 -1
  8. package/dist/modules/mcp/server.js +1 -1
  9. package/dist/modules/mcp/tools/apply/index.js +1 -1
  10. package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.js +1 -1
  11. package/dist/modules/mcp/tools/operations/schema/components/deleteComponent.js +1 -1
  12. package/dist/modules/mcp/tools/operations/schema/components/upsertComponent.js +1 -3
  13. package/dist/modules/mcp/tools/operations/schema/elements/deleteElement.js +1 -2
  14. package/dist/modules/mcp/tools/operations/schema/elements/moveElement.js +1 -1
  15. package/dist/modules/mcp/tools/operations/schema/elements/patchElement.js +2 -2
  16. package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.js +1 -1
  17. package/dist/modules/mcp/tools/operations/schema/pages/deleteLayout.js +1 -1
  18. package/dist/modules/mcp/tools/operations/schema/pages/deletePage.js +1 -1
  19. package/dist/modules/mcp/tools/operations/schema/shared.d.ts +1 -2
  20. package/dist/modules/mcp/tools/operations/schema/shared.js +2 -3
  21. package/dist/modules/mcp/tools/operations/schema/translator.js +1 -1
  22. package/dist/modules/mcp/tools/operations/schema/write.js +2 -4
  23. package/dist/modules/mcp/tools/operations/style/validate.js +1 -2
  24. package/dist/modules/mcp/tools/operations/style/write.js +2 -3
  25. package/dist/modules/mcp/tools/renderWidget.js +1 -1
  26. package/dist/modules/mcp/tools/shared/effects.js +1 -2
  27. package/dist/modules/mcp/tools/shared/lintDraft.js +1 -2
  28. package/dist/modules/mcp/tools/shared/validator/index.js +1 -2
  29. package/dist/modules/mcp/tools/shared/validator/refs.js +1 -1
  30. package/package.json +21 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @plitzi/sdk-mcp
2
2
 
3
+ ## 0.38.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 4f8dc37: ## Packages
8
+
9
+ - **A library package is imported by its root and its folders, never by a file** (`@plitzi/sdk-shared`, `sdk-schema`,
10
+ `sdk-style`, `sdk-elements`, `sdk-interactions`, `sdk-auth`, `sdk-dev-tools`, `sdk-event-bridge`, `sdk-navigation`,
11
+ `sdk-plugins`, `sdk-variables`): each `exports` is now `"."` and `"./*"`, the latter a folder's `index`.
12
+ `@plitzi/sdk-shared/helpers/isRecord` becomes `import { isRecord } from '@plitzi/sdk-shared/helpers'`, and a default
13
+ export by the name its folder gives it — almost always its file's (`import usePlitzi from '…/hooks/usePlitzi'` →
14
+ `import { usePlitzi } from '@plitzi/sdk-shared/hooks'`). A file-level specifier now fails with `ERR_MODULE_NOT_FOUND`.
15
+ New entries where a folder barrel would have brought more than was asked for: `@plitzi/sdk-shared/project` and
16
+ `@plitzi/sdk-shared/plugins/bundle` (Node only), `@plitzi/sdk-interactions/declarations` (the global callbacks and
17
+ utility specs, without React), and `@plitzi/sdk-elements/elements/declarations`, which now also carries the
18
+ declarations' attribute types and the constants they are checked with. `RuleGroup` is exported by `@plitzi/sdk-shared`
19
+ with the document types that use it. `plitzi upgrade migrations` names every such import in a project, with the folder to
20
+ import it from instead.
21
+ - **`@plitzi/sdk-shared`'s root exports the document types, and only them** (`@plitzi/sdk-shared`): what the package
22
+ does is imported from its folder — `formatDate` from `@plitzi/sdk-shared/helpers`, `ThemeProvider` from
23
+ `@plitzi/sdk-shared/theme`, a GraphQL operation's types from `@plitzi/sdk-shared/network/graphql` — so a module that
24
+ imports a type from the root no longer loads every area of the package.
25
+ - **What one package alone used lives in that package** (`@plitzi/sdk-shared`, `@plitzi/sdk-elements`): the data
26
+ source hooks moved from `@plitzi/sdk-shared/dataSource/hooks` to `@plitzi/sdk-elements/dataSource`
27
+ (`useRegisterSource`, `useResolvedVariables`), and the Apollo links the builder's client is built with into the
28
+ builder.
29
+ - **The builder's panels are an entry of their own** (`@plitzi/sdk-style`, `@plitzi/sdk-variables`,
30
+ `@plitzi/sdk-elements`): the style inspector, the advanced style editor and `BuilderStyleContextProvider` are imported
31
+ from `@plitzi/sdk-style/builder`; the variables' lists and forms from `@plitzi/sdk-variables/builder`; the elements'
32
+ settings panels (`defaultElementsSettings`) from `@plitzi/sdk-elements/builder`. Each package's root keeps what a page
33
+ and a server use — `generateCache` no longer loads the inspector, on a server 227 modules down to 21.
34
+
35
+ ## CLI
36
+ - **`plitzi upgrade`'s `renames` part is now `migrations`** (`@plitzi/cli`): what a version changed that a project's
37
+ own source must follow, one file per change in the CLI's `src/migrations/changes/` with the version it shipped in —
38
+ rewritten with `--write` when it has one right answer, said otherwise. The `--json` report carries `migrations` (each
39
+ with its `migration`, `since`, `file`, `line`, `what` and whether it was `written`) in place of `renames` and
40
+ `changes`. The changes of 0.38.0 (`canTemplate` → `canSnippet`, the `*Template` authoring names), 0.38.9 (a
41
+ `formControl` without `required` is optional) and 0.38.12 (`usePlitziServiceContext` → `usePlitzi`) are no longer
42
+ looked for: a project still on one of those versions makes them by hand.
43
+
44
+ - Updated dependencies [4f8dc37]
45
+ - @plitzi/plitzi-sdk@0.38.17
46
+ - @plitzi/sdk-server@0.38.17
47
+ - @plitzi/sdk-authoring@0.38.17
48
+ - @plitzi/sdk-schema@0.38.17
49
+ - @plitzi/sdk-shared@0.38.17
50
+ - @plitzi/sdk-style@0.38.17
51
+
3
52
  ## 0.38.16
4
53
 
5
54
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { isRecord } from '@plitzi/sdk-shared/helpers/isRecord';
1
+ import { isRecord } from '@plitzi/sdk-shared/helpers';
2
2
  /** What the host has streamed of the tool call so far, reduced to the little a placeholder can honestly show.
3
3
  *
4
4
  * The wait a user sees is almost entirely the model TYPING this batch — the server render takes milliseconds —
@@ -1,4 +1,4 @@
1
- import { componentNamed, instancesOf } from "@plitzi/sdk-schema/helpers/components";
1
+ import { componentNamed, instancesOf } from "@plitzi/sdk-schema";
2
2
  //#region src/modules/mcp/helpers/components.ts
3
3
  /** A component by the name it is placed by, unless a page or a layout answers to it first. */
4
4
  var findComponentByRef = (schema, ref) => Object.hasOwn(schema.flat, ref) ? void 0 : componentNamed(schema, ref);
@@ -1,6 +1,5 @@
1
1
  import { AIBinding, AIBindings, AIInteractionFlow, AIInteractionNodeType } from '../types';
2
- import { RuleGroup } from '@plitzi/plitzi-ui/QueryBuilder';
3
- import { ElementBinding, ElementDefinition, ElementInteraction, WhileRunning } from '@plitzi/sdk-shared';
2
+ import { ElementBinding, ElementDefinition, ElementInteraction, RuleGroup, WhileRunning } from '@plitzi/sdk-shared';
4
3
  /** The node shape agents supply on write: same as AIInteractionNode but `id` is optional (generated when
5
4
  * omitted). Kept structural so the tool-layer zod type assigns to it without importing the tool layer here. */
6
5
  export interface FlowNodeInput {
@@ -1,4 +1,4 @@
1
- import { descendants } from "@plitzi/sdk-schema/helpers/elementTree";
1
+ import { descendants } from "@plitzi/sdk-schema";
2
2
  //#region src/modules/mcp/helpers/space.ts
3
3
  var cloneSpace = (space) => ({
4
4
  schema: structuredClone(space.schema),
@@ -1,6 +1,6 @@
1
1
  import { elementCatalog } from "../catalogs/index.js";
2
2
  import { envelope, jsonContents } from "./envelope.js";
3
- import { STYLE_STATES } from "@plitzi/sdk-shared/style/styleStates";
3
+ import { STYLE_STATES } from "@plitzi/sdk-shared/style";
4
4
  //#region src/modules/mcp/resources/renderGuide.ts
5
5
  var RENDER_GUIDE_URI = "plitzi://render/guide";
6
6
  var RENDER_TYPES_URI = "plitzi://render/types";
@@ -4,7 +4,7 @@ import { afterPrefix, componentsUri, dataSourcesUri, elementUri, flagsUri, folde
4
4
  import { buildDataSourceCatalog, buildInteractionCatalog } from "../catalogs/observed.js";
5
5
  import { envelope } from "./envelope.js";
6
6
  import { elementView, folderRefToAI, foldersToAI, layoutSummariesToAI, pageSkeletonToAI, pageStylesToAI, pageSummariesToAI, schemaVariablesToAI, settingsToAI } from "../tools/operations/schema/translator.js";
7
- import { treeOf } from "@plitzi/sdk-schema/helpers/components";
7
+ import { treeOf } from "@plitzi/sdk-schema";
8
8
  //#region src/modules/mcp/resources/schema.ts
9
9
  /** Element-schema reads: page listings/skeletons/styles, folders, single elements and schema variables. Returns
10
10
  * undefined when the URI belongs to another domain, null when the shape is ours but the ref does not resolve. */
@@ -73,7 +73,7 @@ var createMcpServer = async ({ adapters, getGrant, preview, screenshot, logger,
73
73
  const getSpace = () => spacePromise ??= loadSpace();
74
74
  const server = new McpServer({
75
75
  name: "plitzi-mcp",
76
- version: "0.38.16"
76
+ version: "0.38.17"
77
77
  }, { instructions: hasSpace ? serverInstructions : widgetsOnlyInstructions });
78
78
  const { getChanges } = adapters;
79
79
  registerResources(server, getSpace, MCP_ENV, log, hasSpace, getChanges ? (query) => getChanges(requireSpaceId(), MCP_ENV, query) : void 0);
@@ -7,7 +7,7 @@ import { effectsOf } from "../shared/effects.js";
7
7
  import { fullPage, lookAt, pageRef, viewport } from "../shared/look.js";
8
8
  import { AGAIN, REPEATED, batchKey, forgetRefused, noteRefused, timesRefused } from "../shared/repeats.js";
9
9
  import { z } from "zod";
10
- import { generateCache } from "@plitzi/sdk-style/StyleHelper";
10
+ import { generateCache } from "@plitzi/sdk-style";
11
11
  //#region src/modules/mcp/tools/apply/index.ts
12
12
  var applyShape = {
13
13
  environment,
@@ -2,8 +2,8 @@ import { pageUri } from "../../../../helpers/uris.js";
2
2
  import { empty } from "../../../../helpers/opResult.js";
3
3
  import { bindingCategory, bindingInput } from "../shared.js";
4
4
  import { resolveElement } from "../write.js";
5
+ import { positionalElementId } from "@plitzi/sdk-schema";
5
6
  import { z } from "zod";
6
- import { positionalElementId } from "@plitzi/sdk-schema/helpers/elementId";
7
7
  //#region src/modules/mcp/tools/operations/schema/bindings/upsertBinding.ts
8
8
  var upsertBindingOp = z.object({
9
9
  type: z.literal("upsertBinding"),
@@ -1,6 +1,6 @@
1
1
  import { componentsUri } from "../../../../helpers/uris.js";
2
2
  import { empty, fail } from "../../../../helpers/opResult.js";
3
- import { componentNamed, instancesOf, removeComponent } from "@plitzi/sdk-schema/helpers/components";
3
+ import { componentNamed, instancesOf, removeComponent } from "@plitzi/sdk-schema";
4
4
  import { z } from "zod";
5
5
  //#region src/modules/mcp/tools/operations/schema/components/deleteComponent.ts
6
6
  var deleteComponentOp = z.object({
@@ -2,10 +2,8 @@ import { invalidateIndex } from "../../../../helpers/space.js";
2
2
  import { componentsUri, pageUri } from "../../../../helpers/uris.js";
3
3
  import { empty, fail } from "../../../../helpers/opResult.js";
4
4
  import { ID_REF_HINT, guardNewRef } from "../write.js";
5
- import { addComponent, componentNamed, propNameProblem, treeOf, updateComponent } from "@plitzi/sdk-schema/helpers/components";
6
- import { descendants } from "@plitzi/sdk-schema/helpers/elementTree";
5
+ import { addComponent, componentNamed, descendants, isValidElementId, propNameProblem, treeOf, updateComponent } from "@plitzi/sdk-schema";
7
6
  import { z } from "zod";
8
- import { isValidElementId } from "@plitzi/sdk-schema/helpers/elementId";
9
7
  //#region src/modules/mcp/tools/operations/schema/components/upsertComponent.ts
10
8
  /**
11
9
  * A prop as a component declares it. Checked when the op runs rather than spelled out in the op's schema: the op union
@@ -1,9 +1,8 @@
1
1
  import { findRootByRef, indexRemoveElements, resolveRef } from "../../../../helpers/space.js";
2
2
  import { pageUri } from "../../../../helpers/uris.js";
3
3
  import { empty, fail } from "../../../../helpers/opResult.js";
4
- import { descendants } from "@plitzi/sdk-schema/helpers/elementTree";
4
+ import { FlatMap, descendants } from "@plitzi/sdk-schema";
5
5
  import { z } from "zod";
6
- import FlatMap from "@plitzi/sdk-schema/helpers/FlatMap";
7
6
  //#region src/modules/mcp/tools/operations/schema/elements/deleteElement.ts
8
7
  var deleteElementOp = z.object({
9
8
  type: z.literal("deleteElement"),
@@ -3,8 +3,8 @@ import { pageUri } from "../../../../helpers/uris.js";
3
3
  import { empty, fail } from "../../../../helpers/opResult.js";
4
4
  import { position } from "../shared.js";
5
5
  import { DROP_POSITION } from "../write.js";
6
+ import { FlatMap } from "@plitzi/sdk-schema";
6
7
  import { z } from "zod";
7
- import FlatMap from "@plitzi/sdk-schema/helpers/FlatMap";
8
8
  //#region src/modules/mcp/tools/operations/schema/elements/moveElement.ts
9
9
  var moveElementOp = z.object({
10
10
  type: z.literal("moveElement"),
@@ -3,10 +3,10 @@ import { pageUri } from "../../../../helpers/uris.js";
3
3
  import { empty, fail } from "../../../../helpers/opResult.js";
4
4
  import { elementAnchor, elementFlag, elementMotion, elementQuiet, elementRuntime, initialStateInput, styleRefs } from "../shared.js";
5
5
  import { guardNewRef, writeInitialState } from "../write.js";
6
+ import { repointIds } from "@plitzi/sdk-schema";
6
7
  import { flagGateOf } from "@plitzi/sdk-authoring";
7
8
  import { z } from "zod";
8
- import { isMotion } from "@plitzi/sdk-shared/schema/motion";
9
- import { repointIds } from "@plitzi/sdk-schema/helpers/elementId";
9
+ import { isMotion } from "@plitzi/sdk-shared/schema";
10
10
  //#region src/modules/mcp/tools/operations/schema/elements/patchElement.ts
11
11
  var patchElementOp = z.object({
12
12
  type: z.literal("patchElement"),
@@ -5,7 +5,7 @@ import { elementInput, position } from "../shared.js";
5
5
  import { DROP_POSITION, collectInputRefs, createElement, guardNewRef, writeInitialState } from "../write.js";
6
6
  import { flagGateOf } from "@plitzi/sdk-authoring";
7
7
  import { z } from "zod";
8
- import { isMotion } from "@plitzi/sdk-shared/schema/motion";
8
+ import { isMotion } from "@plitzi/sdk-shared/schema";
9
9
  //#region src/modules/mcp/tools/operations/schema/elements/upsertElement.ts
10
10
  var upsertElementOp = z.object({
11
11
  type: z.literal("upsertElement"),
@@ -1,7 +1,7 @@
1
1
  import { findLayoutByRef, indexRemoveLayout, pagesUsingLayout } from "../../../../helpers/space.js";
2
2
  import { layoutsUri, pageUri } from "../../../../helpers/uris.js";
3
3
  import { empty, fail } from "../../../../helpers/opResult.js";
4
- import { descendants } from "@plitzi/sdk-schema/helpers/elementTree";
4
+ import { descendants } from "@plitzi/sdk-schema";
5
5
  import { z } from "zod";
6
6
  //#region src/modules/mcp/tools/operations/schema/pages/deleteLayout.ts
7
7
  var deleteLayoutOp = z.object({
@@ -1,7 +1,7 @@
1
1
  import { findPageByRef, indexRemovePage } from "../../../../helpers/space.js";
2
2
  import { pageUri, pagesUri } from "../../../../helpers/uris.js";
3
3
  import { empty, fail } from "../../../../helpers/opResult.js";
4
- import { descendants } from "@plitzi/sdk-schema/helpers/elementTree";
4
+ import { descendants } from "@plitzi/sdk-schema";
5
5
  import { z } from "zod";
6
6
  //#region src/modules/mcp/tools/operations/schema/pages/deletePage.ts
7
7
  var deletePageOp = z.object({
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { RuleGroup } from '@plitzi/plitzi-ui/QueryBuilder';
3
- import { ElementRuntime } from '@plitzi/sdk-shared';
2
+ import { ElementRuntime, RuleGroup } from '@plitzi/sdk-shared';
4
3
  export declare const ruleGroup: z.ZodType<RuleGroup>;
5
4
  export interface InitialStateInput {
6
5
  styleVariant?: Record<string, Record<string, string | string[]>>;
@@ -2,9 +2,8 @@ import { closedObject } from "../closed.js";
2
2
  import { isSuggestionCode } from "@plitzi/sdk-authoring";
3
3
  import { z } from "zod";
4
4
  import { FLAG_GATE_PATTERN } from "@plitzi/sdk-shared/flags";
5
- import { ANCHOR_PATTERN } from "@plitzi/sdk-shared/schema/anchor";
6
- import { motionProblems } from "@plitzi/sdk-shared/schema/motion";
7
- import { WHILE_RUNNING_MODES } from "@plitzi/sdk-shared/types/SchemaTypes";
5
+ import { ANCHOR_PATTERN, motionProblems } from "@plitzi/sdk-shared/schema";
6
+ import { WHILE_RUNNING_MODES } from "@plitzi/sdk-shared/types";
8
7
  //#region src/modules/mcp/tools/operations/schema/shared.ts
9
8
  var combinator = z.enum(["and", "or"]);
10
9
  var operator = z.enum([
@@ -2,7 +2,7 @@ import { computeVersion } from "../../../helpers/computeVersion.js";
2
2
  import { descendantCount, elementById, getLayoutElements, getPageElements, nameOf, orderedChildren, pageFoldersOf, pageRefOfElement, pagesUsingLayout, slugRouteParams, spaceIndex, strOr } from "../../../helpers/space.js";
3
3
  import { bindingsToAI, flowsFromInteractions } from "../../../helpers/interactions.js";
4
4
  import { definitionToAI, globalStylesForType, idStyleToAI } from "../style/translator.js";
5
- import { descendants } from "@plitzi/sdk-schema/helpers/elementTree";
5
+ import { descendants } from "@plitzi/sdk-schema";
6
6
  import { flagSpecOf, isDocumentScroll, splitNotificationsCss } from "@plitzi/sdk-authoring";
7
7
  //#region src/modules/mcp/tools/operations/schema/translator.ts
8
8
  var splitClasses = (value) => value ? value.split(/\s+/).filter(Boolean) : [];
@@ -1,11 +1,9 @@
1
1
  import { findRootByRef, indexAddElement, resolveRef } from "../../../helpers/space.js";
2
2
  import { folderUri, foldersUri, layoutsUri, pageUri, pagesUri, schemaVarsUri, settingsUri } from "../../../helpers/uris.js";
3
3
  import { fail } from "../../../helpers/opResult.js";
4
- import { documentIds } from "@plitzi/sdk-schema/helpers/components";
4
+ import { FlatMap, documentIds, elementIdConflict, isValidElementId } from "@plitzi/sdk-schema";
5
5
  import { flagGateOf } from "@plitzi/sdk-authoring";
6
- import { isMotion } from "@plitzi/sdk-shared/schema/motion";
7
- import { elementIdConflict, isValidElementId } from "@plitzi/sdk-schema/helpers/elementId";
8
- import FlatMap from "@plitzi/sdk-schema/helpers/FlatMap";
6
+ import { isMotion } from "@plitzi/sdk-shared/schema";
9
7
  //#region src/modules/mcp/tools/operations/schema/write.ts
10
8
  var ID_REF_HINT = "Start with a letter, then letters, numbers, hyphens and underscores (e.g. \"hero-cta\" or \"food_item\"). The name IS the element id, which the runtime embeds in source names like `apiContainer_<id>.field` and in interaction targets — a dot would split those paths (an underscore is fine: the FIRST `_` separates the type from the id, and element types carry none, so extra underscores are unambiguous).";
11
9
  var TAKEN_HINT = "A name must be unique across the space — pick a different one, or address the existing element by this name.";
@@ -1,7 +1,6 @@
1
1
  import { expandShorthand } from "../../../catalogs/index.js";
2
2
  import { fail } from "../../../helpers/opResult.js";
3
- import { STYLE_MOTION_CONDITIONS, canonicalCondition } from "@plitzi/sdk-shared/style/styleConditions";
4
- import { CONTENT_PSEUDOS, GENERATED_PSEUDOS, PSEUDO_PROPERTIES, STYLE_PSEUDOS, isContentValue, isStylePseudo, pseudoHonours } from "@plitzi/sdk-shared/style/stylePseudos";
3
+ import { CONTENT_PSEUDOS, GENERATED_PSEUDOS, PSEUDO_PROPERTIES, STYLE_MOTION_CONDITIONS, STYLE_PSEUDOS, canonicalCondition, isContentValue, isStylePseudo, pseudoHonours } from "@plitzi/sdk-shared/style";
5
4
  //#region src/modules/mcp/tools/operations/style/validate.ts
6
5
  var MODES = [
7
6
  "desktop",
@@ -2,9 +2,8 @@ import { defUri, defsUri, globalUri, globalsUri, idUri, idsUri, styleVarUri, sty
2
2
  import { expandShorthand, expandShorthandPatch } from "../../../catalogs/index.js";
3
3
  import { fail } from "../../../helpers/opResult.js";
4
4
  import { styleInputProblem } from "./validate.js";
5
- import { canonicalCondition } from "@plitzi/sdk-shared/style/styleConditions";
6
- import { isStylePseudo } from "@plitzi/sdk-shared/style/stylePseudos";
7
- import processSelector from "@plitzi/sdk-style/helpers/processSelector";
5
+ import { canonicalCondition, isStylePseudo } from "@plitzi/sdk-shared/style";
6
+ import { processSelector } from "@plitzi/sdk-style/helpers";
8
7
  //#region src/modules/mcp/tools/operations/style/write.ts
9
8
  var MODES = [
10
9
  "desktop",
@@ -3,7 +3,7 @@ import { proxifyResources } from "../proxy/rewrite.js";
3
3
  import { documentOperations } from "./operations/index.js";
4
4
  import { draftBatch } from "./shared/draftBatch.js";
5
5
  import { interactionReport } from "./shared/interactionReport.js";
6
- import { generateCache } from "@plitzi/sdk-style/StyleHelper";
6
+ import { generateCache } from "@plitzi/sdk-style";
7
7
  //#region src/modules/mcp/tools/renderWidget.ts
8
8
  /**
9
9
  * A widget built from an agent's operations, with no space and no backend: the engine behind `plitzi_render`, apart
@@ -1,5 +1,4 @@
1
- import { canonicalJson } from "@plitzi/sdk-shared/helpers/canonicalJson";
2
- import { isRecord } from "@plitzi/sdk-shared/helpers/isRecord";
1
+ import { canonicalJson, isRecord } from "@plitzi/sdk-shared/helpers";
3
2
  //#region src/modules/mcp/tools/shared/effects.ts
4
3
  /**
5
4
  * What a write did to the space, read off the documents before and after it — never off what was asked. An agent
@@ -1,7 +1,6 @@
1
1
  import { findElementByRef, findPageByRef } from "../../helpers/space.js";
2
+ import { styleWithoutTag, validateSchema } from "@plitzi/sdk-schema";
2
3
  import { authoringCodeEntry, elementSourceTypes, fixSpace, lintSpace } from "@plitzi/sdk-authoring";
3
- import { validateSchema } from "@plitzi/sdk-schema/helpers/schemaValidator";
4
- import { styleWithoutTag } from "@plitzi/sdk-schema/helpers/styleWithoutTag";
5
4
  //#region src/modules/mcp/tools/shared/lintDraft.ts
6
5
  /** The elements a batch touches, by the ref each op names — what the lint of the result is held to. */
7
6
  var touchedRefs = (ops) => {
@@ -11,9 +11,8 @@ import { checkSlotCss } from "./css.js";
11
11
  import { checkRef } from "./refs.js";
12
12
  import { checkElementInput, checkRawMarkup, checkTypeProps, checkVariantApplication } from "./elements.js";
13
13
  import { checkInteractionNode } from "./interactions.js";
14
- import { treeOf } from "@plitzi/sdk-schema/helpers/components";
14
+ import { isValidElementId, treeOf } from "@plitzi/sdk-schema";
15
15
  import { closest } from "@plitzi/sdk-authoring";
16
- import { isValidElementId } from "@plitzi/sdk-schema/helpers/elementId";
17
16
  //#region src/modules/mcp/tools/shared/validator/index.ts
18
17
  var STYLE_CATEGORIES = [
19
18
  "color",
@@ -1,4 +1,4 @@
1
- import { isValidElementId } from "@plitzi/sdk-schema/helpers/elementId";
1
+ import { isValidElementId } from "@plitzi/sdk-schema";
2
2
  //#region src/modules/mcp/tools/shared/validator/refs.ts
3
3
  var REF_RE = /^[a-zA-Z0-9._-]+$/;
4
4
  var checkRef = (ref, path, ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-mcp",
3
- "version": "0.38.16",
3
+ "version": "0.38.17",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist",
@@ -11,16 +11,19 @@
11
11
  "types": "dist/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
+ "@plitzi/source": "./src/index.ts",
14
15
  "types": "./dist/index.d.ts",
15
16
  "import": "./dist/index.js",
16
17
  "default": "./dist/index.js"
17
18
  },
18
19
  "./server": {
20
+ "@plitzi/source": "./src/server.ts",
19
21
  "types": "./dist/server.d.ts",
20
22
  "import": "./dist/server.js",
21
23
  "default": "./dist/server.js"
22
24
  },
23
25
  "./render": {
26
+ "@plitzi/source": "./src/render.ts",
24
27
  "types": "./dist/render.d.ts",
25
28
  "import": "./dist/render.js",
26
29
  "default": "./dist/render.js"
@@ -34,16 +37,16 @@
34
37
  "sideEffects": false,
35
38
  "dependencies": {
36
39
  "@modelcontextprotocol/ext-apps": "^1.7.5",
37
- "@modelcontextprotocol/sdk": "^1.32.0",
38
- "@plitzi/plitzi-sdk": "0.38.16",
39
- "@plitzi/sdk-authoring": "0.38.16",
40
- "@plitzi/sdk-schema": "0.38.16",
41
- "@plitzi/sdk-server": "0.38.16",
42
- "@plitzi/sdk-shared": "0.38.16",
43
- "@plitzi/sdk-style": "0.38.16",
44
- "ejs": "^6.0.1",
40
+ "@modelcontextprotocol/sdk": "^1.32.1",
41
+ "@plitzi/plitzi-sdk": "0.38.17",
42
+ "@plitzi/sdk-authoring": "0.38.17",
43
+ "@plitzi/sdk-schema": "0.38.17",
44
+ "@plitzi/sdk-server": "0.38.17",
45
+ "@plitzi/sdk-shared": "0.38.17",
46
+ "@plitzi/sdk-style": "0.38.17",
47
+ "ejs": "^7.0.1",
45
48
  "esbuild": "^0.28.2",
46
- "zod": "^4.6.5"
49
+ "zod": "^4.6.7"
47
50
  },
48
51
  "peerDependencies": {
49
52
  "react": "^19",
@@ -52,20 +55,20 @@
52
55
  "devDependencies": {
53
56
  "@types/ejs": "^3.1.5",
54
57
  "@types/jsdom": "^30.0.0",
55
- "@types/node": "^26.6.4",
58
+ "@types/node": "^26.6.5",
56
59
  "@types/react": "^19.3.0",
57
- "@vitejs/plugin-react": "^6.1.1",
58
- "@vitest/coverage-v8": "^5.0.3",
60
+ "@vitejs/plugin-react": "^6.1.2",
61
+ "@vitest/coverage-v8": "^5.0.5",
59
62
  "eslint": "^9.39.5",
60
63
  "eslint-plugin-import": "^2.32.0",
61
- "jsdom": "^30.1.1",
62
- "react": "^19.3.0",
63
- "react-dom": "^19.3.0",
64
+ "jsdom": "^30.1.3",
65
+ "react": "^19.3.1",
66
+ "react-dom": "^19.3.1",
64
67
  "tsx": "^4.23.15",
65
68
  "typescript": "^6.0.3",
66
- "vite": "^8.3.2",
69
+ "vite": "^8.3.4",
67
70
  "vite-plugin-dts": "^5.1.2",
68
- "vitest": "^5.0.3"
71
+ "vitest": "^5.0.5"
69
72
  },
70
73
  "scripts": {
71
74
  "start": "TSX_TSCONFIG_PATH=tsconfig.app.json node --import tsx dev/main.ts",