@plitzi/sdk-mcp 0.39.0 → 0.39.2
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.
- package/CHANGELOG.md +29 -0
- package/README.md +5 -1
- package/dist/createServer.d.ts +3 -2
- package/dist/createServer.js +3 -13
- package/dist/index.js +8 -8
- package/dist/modules/mcp/accessibilityOutline.js +1 -2
- package/dist/modules/mcp/apps/index.js +3 -4
- package/dist/modules/mcp/apps/render/index.js +3 -7
- package/dist/modules/mcp/apps/render/styles.js +2 -3
- package/dist/modules/mcp/apps/shared/assets.d.ts +6 -0
- package/dist/modules/mcp/apps/shared/assets.js +15 -4
- package/dist/modules/mcp/apps/shared/bundle.js +3 -4
- package/dist/modules/mcp/apps/shared/index.d.ts +1 -1
- package/dist/modules/mcp/apps/shared/page.js +3 -5
- package/dist/modules/mcp/apps/shared/registerApp.js +1 -2
- package/dist/modules/mcp/apps/shared/resolve.js +1 -2
- package/dist/modules/mcp/apps/shared/zodEnglishOnly.js +1 -2
- package/dist/modules/mcp/catalogs/observed.js +1 -2
- package/dist/modules/mcp/catalogs/pluginCatalog.d.ts +1 -1
- package/dist/modules/mcp/catalogs/pluginCatalog.js +1 -2
- package/dist/modules/mcp/catalogs/registry.d.ts +2 -1
- package/dist/modules/mcp/catalogs/registry.js +1 -2
- package/dist/modules/mcp/handler.d.ts +1 -1
- package/dist/modules/mcp/handler.js +1 -2
- package/dist/modules/mcp/helpers/callToolResult.js +1 -2
- package/dist/modules/mcp/helpers/components.js +1 -2
- package/dist/modules/mcp/helpers/computeVersion.js +1 -2
- package/dist/modules/mcp/helpers/guide/index.js +1 -2
- package/dist/modules/mcp/helpers/guide/instructions.js +1 -2
- package/dist/modules/mcp/helpers/guide/logic.js +1 -2
- package/dist/modules/mcp/helpers/guide/practice.js +5 -5
- package/dist/modules/mcp/helpers/guide/reference.d.ts +1 -1
- package/dist/modules/mcp/helpers/guide/reference.js +3 -3
- package/dist/modules/mcp/helpers/guide/server.d.ts +1 -1
- package/dist/modules/mcp/helpers/guide/server.js +3 -4
- package/dist/modules/mcp/helpers/guide/structure.d.ts +1 -1
- package/dist/modules/mcp/helpers/guide/structure.js +3 -2
- package/dist/modules/mcp/helpers/guide/styling.js +1 -2
- package/dist/modules/mcp/helpers/guide/values.js +1 -2
- package/dist/modules/mcp/helpers/interactions.js +1 -2
- package/dist/modules/mcp/helpers/log.d.ts +1 -1
- package/dist/modules/mcp/helpers/log.js +2 -3
- package/dist/modules/mcp/helpers/opResult.js +1 -2
- package/dist/modules/mcp/helpers/space.d.ts +2 -1
- package/dist/modules/mcp/helpers/space.js +1 -2
- package/dist/modules/mcp/helpers/uris.js +1 -2
- package/dist/modules/mcp/localScreenshotClient.js +9 -6
- package/dist/modules/mcp/previewClient.js +1 -2
- package/dist/modules/mcp/proxy/config.d.ts +1 -1
- package/dist/modules/mcp/proxy/config.js +2 -3
- package/dist/modules/mcp/proxy/fetch.js +1 -2
- package/dist/modules/mcp/proxy/grant.js +1 -2
- package/dist/modules/mcp/proxy/guard.js +2 -3
- package/dist/modules/mcp/proxy/handler.d.ts +1 -1
- package/dist/modules/mcp/proxy/handler.js +2 -3
- package/dist/modules/mcp/proxy/payload.js +1 -2
- package/dist/modules/mcp/proxy/rewrite.js +1 -2
- package/dist/modules/mcp/proxy/sign.js +1 -2
- package/dist/modules/mcp/proxy/types.js +1 -2
- package/dist/modules/mcp/resources/actions.js +2 -3
- package/dist/modules/mcp/resources/canonical.js +1 -2
- package/dist/modules/mcp/resources/connectors.js +2 -3
- package/dist/modules/mcp/resources/core.js +4 -5
- package/dist/modules/mcp/resources/data.js +1 -2
- package/dist/modules/mcp/resources/envelope.js +1 -2
- package/dist/modules/mcp/resources/explain.js +1 -2
- package/dist/modules/mcp/resources/functions.js +1 -2
- package/dist/modules/mcp/resources/primer.js +7 -8
- package/dist/modules/mcp/resources/register.d.ts +1 -1
- package/dist/modules/mcp/resources/register.js +6 -7
- package/dist/modules/mcp/resources/renderGuide.js +2 -3
- package/dist/modules/mcp/resources/router.js +3 -4
- package/dist/modules/mcp/resources/schema.js +3 -4
- package/dist/modules/mcp/resources/style.js +2 -3
- package/dist/modules/mcp/screenshotClient.js +6 -5
- package/dist/modules/mcp/server.d.ts +1 -1
- package/dist/modules/mcp/server.js +4 -5
- package/dist/modules/mcp/tools/activity.js +1 -2
- package/dist/modules/mcp/tools/apply/dispatch.js +4 -5
- package/dist/modules/mcp/tools/apply/index.d.ts +5 -0
- package/dist/modules/mcp/tools/apply/index.js +3 -4
- package/dist/modules/mcp/tools/apply/writeResult.js +1 -2
- package/dist/modules/mcp/tools/describeOperation.js +2 -3
- package/dist/modules/mcp/tools/index.js +1 -2
- package/dist/modules/mcp/tools/intents.js +3 -4
- package/dist/modules/mcp/tools/look.js +2 -3
- package/dist/modules/mcp/tools/operations/actions/deleteAction.js +2 -3
- package/dist/modules/mcp/tools/operations/actions/document.d.ts +2 -0
- package/dist/modules/mcp/tools/operations/actions/document.js +4 -3
- package/dist/modules/mcp/tools/operations/actions/index.d.ts +4 -0
- package/dist/modules/mcp/tools/operations/actions/index.js +1 -2
- package/dist/modules/mcp/tools/operations/actions/patchAction.d.ts +2 -0
- package/dist/modules/mcp/tools/operations/actions/patchAction.js +3 -4
- package/dist/modules/mcp/tools/operations/actions/upsertAction.d.ts +2 -0
- package/dist/modules/mcp/tools/operations/actions/upsertAction.js +3 -4
- package/dist/modules/mcp/tools/operations/closed.js +1 -2
- package/dist/modules/mcp/tools/operations/connectors/deleteConnector.js +2 -3
- package/dist/modules/mcp/tools/operations/connectors/index.js +1 -2
- package/dist/modules/mcp/tools/operations/connectors/manifest.js +1 -2
- package/dist/modules/mcp/tools/operations/connectors/patchConnector.js +3 -4
- package/dist/modules/mcp/tools/operations/connectors/upsertConnector.js +3 -4
- package/dist/modules/mcp/tools/operations/data/index.js +1 -2
- package/dist/modules/mcp/tools/operations/functions/index.js +2 -3
- package/dist/modules/mcp/tools/operations/index.d.ts +12 -0
- package/dist/modules/mcp/tools/operations/index.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/bindings/deleteBinding.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/bindings/patchBinding.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/components/deleteComponent.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/components/upsertComponent.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/elements/deleteElement.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/elements/moveElement.js +3 -4
- package/dist/modules/mcp/tools/operations/schema/elements/patchElement.js +3 -4
- package/dist/modules/mcp/tools/operations/schema/elements/repeatElement.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.js +3 -4
- package/dist/modules/mcp/tools/operations/schema/flags/deleteFlag.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/flags/upsertFlag.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/folders/deleteFolder.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/folders/upsertFolder.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/interactions/deleteInteraction.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/operations.d.ts +1 -0
- package/dist/modules/mcp/tools/operations/schema/operations.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/pages/deleteLayout.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/pages/deletePage.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/pages/upsertLayout.js +3 -4
- package/dist/modules/mcp/tools/operations/schema/pages/upsertPage.js +3 -4
- package/dist/modules/mcp/tools/operations/schema/settings/patchSettings.d.ts +1 -0
- package/dist/modules/mcp/tools/operations/schema/settings/patchSettings.js +3 -3
- package/dist/modules/mcp/tools/operations/schema/shared.js +1 -2
- package/dist/modules/mcp/tools/operations/schema/translator.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/variables/deleteVariable.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/variables/upsertVariable.js +2 -3
- package/dist/modules/mcp/tools/operations/schema/write.js +3 -4
- package/dist/modules/mcp/tools/operations/schemaIds.js +1 -2
- package/dist/modules/mcp/tools/operations/style/definitions/deleteDefinition.js +1 -2
- package/dist/modules/mcp/tools/operations/style/definitions/patchDefinition.js +2 -3
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinition.js +1 -2
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinitions.js +1 -2
- package/dist/modules/mcp/tools/operations/style/fonts/deleteFont.js +2 -3
- package/dist/modules/mcp/tools/operations/style/fonts/upsertFont.js +2 -3
- package/dist/modules/mcp/tools/operations/style/globalStyles/deleteGlobalStyle.js +1 -2
- package/dist/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.js +2 -3
- package/dist/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.js +1 -2
- package/dist/modules/mcp/tools/operations/style/idStyles/deleteIdStyle.js +1 -2
- package/dist/modules/mcp/tools/operations/style/idStyles/patchIdStyle.js +2 -3
- package/dist/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.js +1 -2
- package/dist/modules/mcp/tools/operations/style/operations.js +1 -2
- package/dist/modules/mcp/tools/operations/style/shared.js +1 -2
- package/dist/modules/mcp/tools/operations/style/translator.js +1 -2
- package/dist/modules/mcp/tools/operations/style/validate.js +1 -2
- package/dist/modules/mcp/tools/operations/style/variables/deleteStyleVariable.js +2 -3
- package/dist/modules/mcp/tools/operations/style/variables/upsertStyleVariable.js +2 -3
- package/dist/modules/mcp/tools/operations/style/write.js +2 -3
- package/dist/modules/mcp/tools/read.js +2 -3
- package/dist/modules/mcp/tools/render.d.ts +1 -0
- package/dist/modules/mcp/tools/render.js +3 -4
- package/dist/modules/mcp/tools/renderWidget.d.ts +1 -0
- package/dist/modules/mcp/tools/renderWidget.js +2 -3
- package/dist/modules/mcp/tools/search.js +2 -3
- package/dist/modules/mcp/tools/shared/draftBatch.js +2 -3
- package/dist/modules/mcp/tools/shared/effects.js +1 -2
- package/dist/modules/mcp/tools/shared/expandOperations.js +1 -2
- package/dist/modules/mcp/tools/shared/interactionReport.js +1 -2
- package/dist/modules/mcp/tools/shared/lintDraft.js +1 -2
- package/dist/modules/mcp/tools/shared/look.js +1 -2
- package/dist/modules/mcp/tools/shared/newSuggestions.js +1 -2
- package/dist/modules/mcp/tools/shared/normalizeOperations.js +1 -2
- package/dist/modules/mcp/tools/shared/repeats.js +1 -2
- package/dist/modules/mcp/tools/shared/tool.js +1 -2
- package/dist/modules/mcp/tools/shared/validator/batch.js +1 -2
- package/dist/modules/mcp/tools/shared/validator/bindings.js +1 -2
- package/dist/modules/mcp/tools/shared/validator/connectors.js +2 -3
- package/dist/modules/mcp/tools/shared/validator/context.js +1 -2
- package/dist/modules/mcp/tools/shared/validator/css.js +2 -3
- package/dist/modules/mcp/tools/shared/validator/elements.js +2 -3
- package/dist/modules/mcp/tools/shared/validator/index.js +20 -10
- package/dist/modules/mcp/tools/shared/validator/interactions.js +2 -3
- package/dist/modules/mcp/tools/shared/validator/refs.js +1 -2
- package/dist/modules/mcp/tools/test.js +1 -2
- package/dist/modules/mcp/tools/tryFunction.js +1 -2
- package/dist/modules/mcp/types/aiSchema.d.ts +2 -0
- package/dist/modules/mcp/types/screenshotTypes.d.ts +8 -0
- package/dist/options.d.ts +1 -1
- package/dist/pipeline.d.ts +2 -1
- package/dist/pipeline.js +4 -3
- package/dist/preview/createPreview.d.ts +1 -1
- package/dist/preview/createPreview.js +1 -2
- package/dist/preview.d.ts +7 -0
- package/dist/preview.js +1 -0
- package/dist/render.js +1 -1
- package/dist/server.js +3 -3
- package/dist/stages/mcp.d.ts +1 -1
- package/dist/stages/mcp.js +2 -3
- package/dist/stages/preview.d.ts +2 -1
- package/dist/stages/preview.js +3 -4
- package/dist/stages/proxy.d.ts +1 -1
- package/dist/stages/proxy.js +2 -3
- package/package.json +23 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineTool, imageResult } from "./shared/tool.js";
|
|
2
1
|
import { fullPage, lookAt, pageRef, viewport } from "./shared/look.js";
|
|
2
|
+
import { defineTool, imageResult } from "./shared/tool.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
4
|
+
// src/modules/mcp/tools/look.ts
|
|
5
5
|
var lookShape = {
|
|
6
6
|
pageRef,
|
|
7
7
|
view: z.enum([
|
|
@@ -28,5 +28,4 @@ var lookTool = defineTool({
|
|
|
28
28
|
return look.images.length > 0 ? imageResult(look.images, look.meta) : look.meta;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
//#endregion
|
|
32
31
|
export { lookShape, lookTool };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { findActionEntry } from "../../../helpers/space.js";
|
|
2
1
|
import { actionUri, actionsUri } from "../../../helpers/uris.js";
|
|
3
2
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
3
|
+
import { findActionEntry } from "../../../helpers/space.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/modules/mcp/tools/operations/actions/deleteAction.ts
|
|
6
6
|
var deleteActionOp = z.object({
|
|
7
7
|
type: z.literal("deleteAction"),
|
|
8
8
|
ref: z.string().describe("Identifier of the action to remove")
|
|
@@ -16,5 +16,4 @@ var deleteAction = (space, env, op) => {
|
|
|
16
16
|
staleResources: [actionsUri(env), actionUri(env, op.ref)]
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { deleteAction, deleteActionOp };
|
|
@@ -69,4 +69,6 @@ export declare const actionLimits: z.ZodObject<{
|
|
|
69
69
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
70
70
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
71
71
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
72
74
|
}, z.core.$strip>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
// src/modules/mcp/tools/operations/actions/document.ts
|
|
3
3
|
/**
|
|
4
4
|
* The shared vocabulary of an action document, as the agent writes it.
|
|
5
5
|
*
|
|
@@ -70,7 +70,8 @@ var actionLimits = z.object({
|
|
|
70
70
|
timeoutMs: z.number().optional(),
|
|
71
71
|
streamTimeoutMs: z.number().optional(),
|
|
72
72
|
maxNodes: z.number().optional(),
|
|
73
|
-
maxRequests: z.number().optional()
|
|
73
|
+
maxRequests: z.number().optional(),
|
|
74
|
+
maxResponseBytes: z.number().optional(),
|
|
75
|
+
maxRunBytes: z.number().optional()
|
|
74
76
|
}).describe("Ceilings for one run; may only TIGHTEN what the deployment allows");
|
|
75
|
-
//#endregion
|
|
76
77
|
export { actionAccess, actionField, actionLimits, actionNode, actionTriggerParams };
|
|
@@ -44,6 +44,8 @@ export declare const actionOps: {
|
|
|
44
44
|
streamTimeoutMs: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
45
45
|
maxNodes: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
46
46
|
maxRequests: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
47
|
+
maxResponseBytes: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
48
|
+
maxRunBytes: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
47
49
|
}, import('zod/v4/core').$strip>>;
|
|
48
50
|
}, import('zod/v4/core').$strip>;
|
|
49
51
|
patchAction: import('zod').ZodObject<{
|
|
@@ -87,6 +89,8 @@ export declare const actionOps: {
|
|
|
87
89
|
streamTimeoutMs: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
88
90
|
maxNodes: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
89
91
|
maxRequests: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
92
|
+
maxResponseBytes: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
93
|
+
maxRunBytes: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
90
94
|
}, import('zod/v4/core').$strip>>;
|
|
91
95
|
}, import('zod/v4/core').$strip>;
|
|
92
96
|
deleteAction: import('zod').ZodObject<{
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { deleteAction, deleteActionOp } from "./deleteAction.js";
|
|
2
2
|
import { patchAction, patchActionOp } from "./patchAction.js";
|
|
3
3
|
import { toDocument, upsertAction, upsertActionOp } from "./upsertAction.js";
|
|
4
|
-
|
|
4
|
+
// src/modules/mcp/tools/operations/actions/index.ts
|
|
5
5
|
/** The action write vocabulary, keyed by op type — feeds the discriminated union in tools/operations.ts. */
|
|
6
6
|
var actionOps = {
|
|
7
7
|
upsertAction: upsertActionOp,
|
|
8
8
|
patchAction: patchActionOp,
|
|
9
9
|
deleteAction: deleteActionOp
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { actionOps, deleteAction, deleteActionOp, patchAction, patchActionOp, toDocument, upsertAction, upsertActionOp };
|
|
@@ -42,6 +42,8 @@ export declare const patchActionOp: z.ZodObject<{
|
|
|
42
42
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
43
43
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
45
47
|
}, z.core.$strip>>;
|
|
46
48
|
}, z.core.$strip>;
|
|
47
49
|
export type PatchAction = z.infer<typeof patchActionOp>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { actionField, actionLimits, actionNode } from "./document.js";
|
|
2
2
|
import { actionUri, actionsUri } from "../../../helpers/uris.js";
|
|
3
3
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
4
|
-
import {
|
|
4
|
+
import { findActionEntry } from "../../../helpers/space.js";
|
|
5
5
|
import { validateActionDocument } from "@plitzi/sdk-shared/actions";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
|
|
7
|
+
// src/modules/mcp/tools/operations/actions/patchAction.ts
|
|
8
8
|
var patchActionOp = z.object({
|
|
9
9
|
type: z.literal("patchAction"),
|
|
10
10
|
ref: z.string().describe("Identifier of the action to change"),
|
|
@@ -67,5 +67,4 @@ var patchAction = (space, env, op) => {
|
|
|
67
67
|
staleResources: [actionsUri(env), actionUri(env, op.ref)]
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
-
//#endregion
|
|
71
70
|
export { patchAction, patchActionOp };
|
|
@@ -43,6 +43,8 @@ export declare const upsertActionOp: z.ZodObject<{
|
|
|
43
43
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
45
45
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
46
48
|
}, z.core.$strip>>;
|
|
47
49
|
}, z.core.$strip>;
|
|
48
50
|
export type UpsertAction = z.infer<typeof upsertActionOp>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { actionField, actionLimits, actionNode } from "./document.js";
|
|
2
2
|
import { actionUri, actionsUri } from "../../../helpers/uris.js";
|
|
3
3
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
4
|
-
import {
|
|
4
|
+
import { findActionEntry } from "../../../helpers/space.js";
|
|
5
5
|
import { validateActionDocument } from "@plitzi/sdk-shared/actions";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
|
|
7
|
+
// src/modules/mcp/tools/operations/actions/upsertAction.ts
|
|
8
8
|
var upsertActionOp = z.object({
|
|
9
9
|
type: z.literal("upsertAction"),
|
|
10
10
|
ref: z.string().describe("Stable identifier a `runServerAction` step stores, e.g. \"send-quote\". Never reused for another action"),
|
|
@@ -79,5 +79,4 @@ var upsertAction = (space, env, op) => {
|
|
|
79
79
|
staleResources: stale
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { toDocument, upsertAction, upsertActionOp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { closest } from "@plitzi/sdk-authoring";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
// src/modules/mcp/tools/operations/closed.ts
|
|
4
4
|
/**
|
|
5
5
|
* Objects of the write vocabulary that refuse a field they do not have. One left out of a schema used to be dropped as
|
|
6
6
|
* the batch was read — `prop` for `props` applied nothing and answered success, the one mistake an agent cannot see.
|
|
@@ -25,5 +25,4 @@ var closed = (operation) => {
|
|
|
25
25
|
const type = typeOf(operation);
|
|
26
26
|
return closedObject(type, operation.shape, `plitzi_describe_operation { type: "${type}" }`).describe(operation.description ?? "");
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { closed, closedObject, typeOf };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { findConnectorEntry } from "../../../helpers/space.js";
|
|
2
1
|
import { connectorUri, connectorsUri } from "../../../helpers/uris.js";
|
|
3
2
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
3
|
+
import { findConnectorEntry } from "../../../helpers/space.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/modules/mcp/tools/operations/connectors/deleteConnector.ts
|
|
6
6
|
var deleteConnectorOp = z.object({
|
|
7
7
|
type: z.literal("deleteConnector"),
|
|
8
8
|
ref: z.string().describe("Identifier of the connector to remove")
|
|
@@ -16,5 +16,4 @@ var deleteConnector = (space, env, op) => {
|
|
|
16
16
|
staleResources: [connectorsUri(env), connectorUri(env, op.ref)]
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { deleteConnector, deleteConnectorOp };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { deleteConnector, deleteConnectorOp } from "./deleteConnector.js";
|
|
2
2
|
import { patchConnector, patchConnectorOp } from "./patchConnector.js";
|
|
3
3
|
import { toManifest, upsertConnector, upsertConnectorOp } from "./upsertConnector.js";
|
|
4
|
-
|
|
4
|
+
// src/modules/mcp/tools/operations/connectors/index.ts
|
|
5
5
|
/** The connector write vocabulary, keyed by op type — feeds the discriminated union in tools/operations.ts. */
|
|
6
6
|
var connectorOps = {
|
|
7
7
|
upsertConnector: upsertConnectorOp,
|
|
8
8
|
patchConnector: patchConnectorOp,
|
|
9
9
|
deleteConnector: deleteConnectorOp
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { connectorOps, deleteConnector, deleteConnectorOp, patchConnector, patchConnectorOp, toManifest, upsertConnector, upsertConnectorOp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONNECTOR_HTTP_METHODS } from "@plitzi/sdk-shared/connectors";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
// src/modules/mcp/tools/operations/connectors/manifest.ts
|
|
4
4
|
var templated = z.record(z.string(), z.string());
|
|
5
5
|
var pagination = z.enum([
|
|
6
6
|
"offset",
|
|
@@ -66,5 +66,4 @@ var connectorConnection = z.object({
|
|
|
66
66
|
])).optional().describe("Field types published to the builder for typed bindings. The only part a browser ever sees"),
|
|
67
67
|
projection: z.literal("full").optional().describe("Send every field instead of only the bound paths. Costs payload size; only for dynamic templates")
|
|
68
68
|
}).describe("Settings that apply to every call this connector makes");
|
|
69
|
-
//#endregion
|
|
70
69
|
export { connectorConnection, readEndpoint, writeEndpoint };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connectorConnection, readEndpoint, writeEndpoint } from "./manifest.js";
|
|
2
2
|
import { connectorUri, connectorsUri } from "../../../helpers/uris.js";
|
|
3
3
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
4
|
-
import {
|
|
4
|
+
import { findConnectorEntry } from "../../../helpers/space.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
|
|
6
|
+
// src/modules/mcp/tools/operations/connectors/patchConnector.ts
|
|
7
7
|
var patchConnectorOp = z.object({
|
|
8
8
|
type: z.literal("patchConnector"),
|
|
9
9
|
ref: z.string().describe("Identifier of the connector to change"),
|
|
@@ -54,5 +54,4 @@ var patchConnector = (space, env, op) => {
|
|
|
54
54
|
staleResources: [connectorsUri(env), connectorUri(env, op.ref)]
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
//#endregion
|
|
58
57
|
export { patchConnector, patchConnectorOp };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connectorConnection, readEndpoint, writeEndpoint } from "./manifest.js";
|
|
2
2
|
import { connectorUri, connectorsUri } from "../../../helpers/uris.js";
|
|
3
3
|
import { empty } from "../../../helpers/opResult.js";
|
|
4
|
-
import {
|
|
4
|
+
import { findConnectorEntry } from "../../../helpers/space.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
|
|
6
|
+
// src/modules/mcp/tools/operations/connectors/upsertConnector.ts
|
|
7
7
|
var upsertConnectorOp = z.object({
|
|
8
8
|
type: z.literal("upsertConnector"),
|
|
9
9
|
ref: z.string().describe("Identifier of the connector, chosen by you and stable forever: it is what a provider element stores. Letters, numbers, hyphens and underscores, starting with a letter (e.g. \"strapi-blog\")."),
|
|
@@ -60,5 +60,4 @@ var upsertConnector = (space, env, op) => {
|
|
|
60
60
|
staleResources: stale
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
//#endregion
|
|
64
63
|
export { toManifest, upsertConnector, upsertConnectorOp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dataFileUri, dataUri } from "../../../helpers/uris.js";
|
|
2
2
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
4
|
+
// src/modules/mcp/tools/operations/data/index.ts
|
|
5
5
|
var upsertDataFileOp = z.object({
|
|
6
6
|
type: z.literal("upsertDataFile"),
|
|
7
7
|
path: z.string().describe("e.g. \"products.json\" — read as query \"/data/<path>\""),
|
|
@@ -50,5 +50,4 @@ var dataOps = {
|
|
|
50
50
|
upsertDataFile: upsertDataFileOp,
|
|
51
51
|
deleteDataFile: deleteDataFileOp
|
|
52
52
|
};
|
|
53
|
-
//#endregion
|
|
54
53
|
export { dataOps, deleteDataFile, deleteDataFileOp, upsertDataFile, upsertDataFileOp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { functionFileUri, functionsUri } from "../../../helpers/uris.js";
|
|
2
1
|
import { empty, fail } from "../../../helpers/opResult.js";
|
|
2
|
+
import { functionFileUri, functionsUri } from "../../../helpers/uris.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
4
|
+
// src/modules/mcp/tools/operations/functions/index.ts
|
|
5
5
|
var upsertFunctionFileOp = z.object({
|
|
6
6
|
type: z.literal("upsertFunctionFile"),
|
|
7
7
|
path: z.string().describe("e.g. \"index.ts\", \"lib/feed.ts\""),
|
|
@@ -44,5 +44,4 @@ var functionOps = {
|
|
|
44
44
|
upsertFunctionFile: upsertFunctionFileOp,
|
|
45
45
|
deleteFunctionFile: deleteFunctionFileOp
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { deleteFunctionFile, deleteFunctionFileOp, functionOps, upsertFunctionFile, upsertFunctionFileOp };
|
|
@@ -253,6 +253,7 @@ export declare const documentOperation: z.ZodDiscriminatedUnion<readonly [z.ZodO
|
|
|
253
253
|
transientState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
254
254
|
keptState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
255
|
paintedState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
+
browserState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
257
|
userProvider: z.ZodOptional<z.ZodString>;
|
|
257
258
|
tokenStorage: z.ZodOptional<z.ZodEnum<{
|
|
258
259
|
"": "";
|
|
@@ -1692,6 +1693,7 @@ export declare const operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1692
1693
|
transientState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1693
1694
|
keptState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1694
1695
|
paintedState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1696
|
+
browserState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1695
1697
|
userProvider: z.ZodOptional<z.ZodString>;
|
|
1696
1698
|
tokenStorage: z.ZodOptional<z.ZodEnum<{
|
|
1697
1699
|
"": "";
|
|
@@ -3098,6 +3100,8 @@ export declare const operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3098
3100
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3099
3101
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
3100
3102
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
3103
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
3104
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
3101
3105
|
}, z.core.$strip>>;
|
|
3102
3106
|
}, z.core.$strict>, z.ZodObject<{
|
|
3103
3107
|
type: z.ZodLiteral<"patchAction">;
|
|
@@ -3140,6 +3144,8 @@ export declare const operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3140
3144
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3141
3145
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
3142
3146
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
3147
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
3148
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
3143
3149
|
}, z.core.$strip>>;
|
|
3144
3150
|
}, z.core.$strict>, z.ZodObject<{
|
|
3145
3151
|
type: z.ZodLiteral<"deleteAction">;
|
|
@@ -3416,6 +3422,7 @@ export declare const operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
3416
3422
|
transientState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3417
3423
|
keptState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3418
3424
|
paintedState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3425
|
+
browserState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3419
3426
|
userProvider: z.ZodOptional<z.ZodString>;
|
|
3420
3427
|
tokenStorage: z.ZodOptional<z.ZodEnum<{
|
|
3421
3428
|
"": "";
|
|
@@ -4822,6 +4829,8 @@ export declare const operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
4822
4829
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4823
4830
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
4824
4831
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
4832
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
4833
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
4825
4834
|
}, z.core.$strip>>;
|
|
4826
4835
|
}, z.core.$strict>, z.ZodObject<{
|
|
4827
4836
|
type: z.ZodLiteral<"patchAction">;
|
|
@@ -4864,6 +4873,8 @@ export declare const operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
4864
4873
|
streamTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4865
4874
|
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
4866
4875
|
maxRequests: z.ZodOptional<z.ZodNumber>;
|
|
4876
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
4877
|
+
maxRunBytes: z.ZodOptional<z.ZodNumber>;
|
|
4867
4878
|
}, z.core.$strip>>;
|
|
4868
4879
|
}, z.core.$strict>, z.ZodObject<{
|
|
4869
4880
|
type: z.ZodLiteral<"deleteAction">;
|
|
@@ -5135,6 +5146,7 @@ export declare const documentOperations: z.ZodArray<z.ZodDiscriminatedUnion<read
|
|
|
5135
5146
|
transientState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5136
5147
|
keptState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5137
5148
|
paintedState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5149
|
+
browserState: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5138
5150
|
userProvider: z.ZodOptional<z.ZodString>;
|
|
5139
5151
|
tokenStorage: z.ZodOptional<z.ZodEnum<{
|
|
5140
5152
|
"": "";
|
|
@@ -8,7 +8,7 @@ import { registerSharedSchemaIds } from "./schemaIds.js";
|
|
|
8
8
|
import { styleOps } from "./style/operations.js";
|
|
9
9
|
import { closest } from "@plitzi/sdk-authoring";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
|
|
11
|
+
// src/modules/mcp/tools/operations/index.ts
|
|
12
12
|
registerSharedSchemaIds();
|
|
13
13
|
/** A batch's operations, each read by its `type` — and a type none of them has answered with the nearest one. */
|
|
14
14
|
var union = (options) => {
|
|
@@ -89,5 +89,4 @@ var DOCUMENT_OPERATION_TYPES = documentOperation.options.map((variant) => varian
|
|
|
89
89
|
* schema per connection instead of two; what runs is still parsed against the full one.
|
|
90
90
|
*/
|
|
91
91
|
var compactDocumentOperations = z.array(z.looseObject({ type: z.enum(DOCUMENT_OPERATION_TYPES) })).max(MAX_OPS).describe(`Operations applied atomically, in order (max ${MAX_OPS}) — the document operations of plitzi_apply, with the same fields; plitzi_describe_operation gives any one of them`);
|
|
92
|
-
//#endregion
|
|
93
92
|
export { MAX_OPS, OPERATIONS_BY_TYPE, compactDocumentOperations, documentOperation, documentOperations, environment, isStyleOp, operation, operations };
|
|
@@ -3,7 +3,7 @@ import { empty, fail } from "../../../../helpers/opResult.js";
|
|
|
3
3
|
import { bindingCategory } from "../shared.js";
|
|
4
4
|
import { resolveElement } from "../write.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
|
|
6
|
+
// src/modules/mcp/tools/operations/schema/bindings/deleteBinding.ts
|
|
7
7
|
var deleteBindingOp = z.object({
|
|
8
8
|
type: z.literal("deleteBinding"),
|
|
9
9
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -28,5 +28,4 @@ var deleteBinding = (space, env, op) => {
|
|
|
28
28
|
elementRefs: [op.ref]
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
//#endregion
|
|
32
31
|
export { deleteBinding, deleteBindingOp };
|
|
@@ -3,7 +3,7 @@ import { empty, fail } from "../../../../helpers/opResult.js";
|
|
|
3
3
|
import { bindingCategory, bindingInput } from "../shared.js";
|
|
4
4
|
import { resolveElement } from "../write.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
|
|
6
|
+
// src/modules/mcp/tools/operations/schema/bindings/patchBinding.ts
|
|
7
7
|
var patchBindingOp = z.object({
|
|
8
8
|
type: z.literal("patchBinding"),
|
|
9
9
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -32,5 +32,4 @@ var patchBinding = (space, env, op) => {
|
|
|
32
32
|
elementRefs: [op.ref]
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { patchBinding, patchBindingOp };
|
|
@@ -4,7 +4,7 @@ import { bindingCategory, bindingInput } from "../shared.js";
|
|
|
4
4
|
import { resolveElement } from "../write.js";
|
|
5
5
|
import { positionalElementId } from "@plitzi/sdk-schema";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
|
|
7
|
+
// src/modules/mcp/tools/operations/schema/bindings/upsertBinding.ts
|
|
8
8
|
var upsertBindingOp = z.object({
|
|
9
9
|
type: z.literal("upsertBinding"),
|
|
10
10
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -43,5 +43,4 @@ var upsertBinding = (space, env, op) => {
|
|
|
43
43
|
elementRefs: [op.ref]
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
//#endregion
|
|
47
46
|
export { upsertBinding, upsertBindingOp };
|
|
@@ -2,7 +2,7 @@ import { componentsUri } from "../../../../helpers/uris.js";
|
|
|
2
2
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
3
3
|
import { componentNamed, instancesOf, removeComponent } from "@plitzi/sdk-schema";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/modules/mcp/tools/operations/schema/components/deleteComponent.ts
|
|
6
6
|
var deleteComponentOp = z.object({
|
|
7
7
|
type: z.literal("deleteComponent"),
|
|
8
8
|
ref: z.string()
|
|
@@ -17,5 +17,4 @@ var deleteComponent = (space, env, op) => {
|
|
|
17
17
|
staleResources: [componentsUri(env)]
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { deleteComponent, deleteComponentOp };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { invalidateIndex } from "../../../../helpers/space.js";
|
|
2
1
|
import { componentsUri, pageUri } from "../../../../helpers/uris.js";
|
|
3
2
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
3
|
+
import { invalidateIndex } from "../../../../helpers/space.js";
|
|
4
4
|
import { ID_REF_HINT, guardNewRef } from "../write.js";
|
|
5
5
|
import { addComponent, componentNamed, descendants, isValidElementId, propNameProblem, treeOf, updateComponent } from "@plitzi/sdk-schema";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
|
|
7
|
+
// src/modules/mcp/tools/operations/schema/components/upsertComponent.ts
|
|
8
8
|
/**
|
|
9
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
|
|
10
10
|
* rides on every request of every conversation, and the guide — read once — says what a prop is.
|
|
@@ -141,5 +141,4 @@ var upsertComponent = (space, env, op) => {
|
|
|
141
141
|
staleResources: stale
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
|
-
//#endregion
|
|
145
144
|
export { upsertComponent, upsertComponentOp };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
1
2
|
import { findRootByRef, indexRemoveElements, resolveRef } from "../../../../helpers/space.js";
|
|
2
3
|
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
|
-
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
4
4
|
import { FlatMap, descendants } from "@plitzi/sdk-schema";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
|
|
6
|
+
// src/modules/mcp/tools/operations/schema/elements/deleteElement.ts
|
|
7
7
|
var deleteElementOp = z.object({
|
|
8
8
|
type: z.literal("deleteElement"),
|
|
9
9
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -23,5 +23,4 @@ var deleteElement = (space, env, op) => {
|
|
|
23
23
|
staleResources: [pageUri(env, op.pageRef)]
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { deleteElement, deleteElementOp };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { findRootByRef, indexInvalidateDetails, resolveRef } from "../../../../helpers/space.js";
|
|
2
|
-
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
1
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
2
|
+
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
|
+
import { findRootByRef, indexInvalidateDetails, resolveRef } from "../../../../helpers/space.js";
|
|
4
4
|
import { position } from "../shared.js";
|
|
5
5
|
import { DROP_POSITION } from "../write.js";
|
|
6
6
|
import { FlatMap } from "@plitzi/sdk-schema";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
|
|
8
|
+
// src/modules/mcp/tools/operations/schema/elements/moveElement.ts
|
|
9
9
|
var moveElementOp = z.object({
|
|
10
10
|
type: z.literal("moveElement"),
|
|
11
11
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -29,5 +29,4 @@ var moveElement = (space, env, op) => {
|
|
|
29
29
|
elementRefs: [op.ref]
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { moveElement, moveElementOp };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { findRootByRef, invalidateIndex, resolveRef } from "../../../../helpers/space.js";
|
|
2
|
-
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
1
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
2
|
+
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
|
+
import { findRootByRef, invalidateIndex, resolveRef } from "../../../../helpers/space.js";
|
|
4
4
|
import { elementAnchor, elementFlag, elementMotion, elementQuiet, elementRuntime, initialStateInput, styleRefs } from "../shared.js";
|
|
5
5
|
import { guardNewRef, writeInitialState } from "../write.js";
|
|
6
6
|
import { repointIds } from "@plitzi/sdk-schema";
|
|
7
7
|
import { flagGateOf } from "@plitzi/sdk-authoring";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { isMotion } from "@plitzi/sdk-shared/schema";
|
|
10
|
-
|
|
10
|
+
// src/modules/mcp/tools/operations/schema/elements/patchElement.ts
|
|
11
11
|
var patchElementOp = z.object({
|
|
12
12
|
type: z.literal("patchElement"),
|
|
13
13
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -69,5 +69,4 @@ var patchElement = (space, env, op) => {
|
|
|
69
69
|
elementRefs: [op.ref]
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
//#endregion
|
|
73
72
|
export { patchElement, patchElementOp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { elementInput, elementShape, position, styleRefs } from "../shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
// src/modules/mcp/tools/operations/schema/elements/repeatElement.ts
|
|
4
4
|
var item = z.record(z.string(), z.unknown());
|
|
5
5
|
var MAX_ITEMS = 100;
|
|
6
6
|
var MAX_ROWS = 500;
|
|
@@ -144,5 +144,4 @@ var expandRepeat = (op) => {
|
|
|
144
144
|
errors
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
|
-
//#endregion
|
|
148
147
|
export { expandRepeat, repeatElementOp };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { findRootByRef, resolveRef } from "../../../../helpers/space.js";
|
|
2
|
-
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
1
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
2
|
+
import { pageUri } from "../../../../helpers/uris.js";
|
|
3
|
+
import { findRootByRef, resolveRef } from "../../../../helpers/space.js";
|
|
4
4
|
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
8
|
import { isMotion } from "@plitzi/sdk-shared/schema";
|
|
9
|
-
|
|
9
|
+
// src/modules/mcp/tools/operations/schema/elements/upsertElement.ts
|
|
10
10
|
var upsertElementOp = z.object({
|
|
11
11
|
type: z.literal("upsertElement"),
|
|
12
12
|
pageRef: z.string().describe("The page, by name"),
|
|
@@ -65,5 +65,4 @@ var upsertElement = (space, env, op) => {
|
|
|
65
65
|
elementRefs: [op.element.ref]
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
//#endregion
|
|
69
68
|
export { upsertElement, upsertElementOp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { flagsUri } from "../../../../helpers/uris.js";
|
|
2
1
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
2
|
+
import { flagsUri } from "../../../../helpers/uris.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
4
|
+
// src/modules/mcp/tools/operations/schema/flags/deleteFlag.ts
|
|
5
5
|
var deleteFlagOp = z.object({
|
|
6
6
|
type: z.literal("deleteFlag"),
|
|
7
7
|
name: z.string()
|
|
@@ -17,5 +17,4 @@ var deleteFlag = (space, env, op) => {
|
|
|
17
17
|
staleResources: [flagsUri(env)]
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { deleteFlag, deleteFlagOp };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { flagsUri } from "../../../../helpers/uris.js";
|
|
2
1
|
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
2
|
+
import { flagsUri } from "../../../../helpers/uris.js";
|
|
3
3
|
import { ruleGroup } from "../shared.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { isFlagName, isSchemaFlag } from "@plitzi/sdk-shared/flags";
|
|
6
|
-
|
|
6
|
+
// src/modules/mcp/tools/operations/schema/flags/upsertFlag.ts
|
|
7
7
|
var ruleInput = z.object({
|
|
8
8
|
when: ruleGroup,
|
|
9
9
|
value: z.boolean()
|
|
@@ -34,5 +34,4 @@ var upsertFlag = (space, env, op) => {
|
|
|
34
34
|
staleResources: [flagsUri(env)]
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { upsertFlag, upsertFlagOp };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
1
2
|
import { findFolderByRef, isPageElement, pageFoldersOf, sortFolders } from "../../../../helpers/space.js";
|
|
2
3
|
import { folderUri, foldersUri, pagesUri } from "../../../../helpers/uris.js";
|
|
3
|
-
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/modules/mcp/tools/operations/schema/folders/deleteFolder.ts
|
|
6
6
|
var deleteFolderOp = z.object({
|
|
7
7
|
type: z.literal("deleteFolder"),
|
|
8
8
|
ref: z.string()
|
|
@@ -28,5 +28,4 @@ var deleteFolder = (space, env, op) => {
|
|
|
28
28
|
]
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
//#endregion
|
|
32
31
|
export { deleteFolder, deleteFolderOp };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
1
2
|
import { findFolderByRef, pageFoldersOf, slugify, sortFolders } from "../../../../helpers/space.js";
|
|
2
3
|
import { folderUri, foldersUri } from "../../../../helpers/uris.js";
|
|
3
|
-
import { empty, fail } from "../../../../helpers/opResult.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/modules/mcp/tools/operations/schema/folders/upsertFolder.ts
|
|
6
6
|
var upsertFolderOp = z.object({
|
|
7
7
|
type: z.literal("upsertFolder"),
|
|
8
8
|
ref: z.string().describe("Folder ref: an existing folder id/name/slug to update, or a new id you choose"),
|
|
@@ -45,5 +45,4 @@ var upsertFolder = (space, env, op) => {
|
|
|
45
45
|
staleResources: [folderUri(env, folder.id), foldersUri(env)]
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { upsertFolder, upsertFolderOp };
|