@fleox/agentphoto 0.0.0-stage → 0.1.0
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/LICENSE +143 -0
- package/README.md +229 -2
- package/changelog.json +17 -0
- package/dist/agent/agentphoto.mjs +3307 -0
- package/dist/agent/chunks/assets-CDQo3VqD.mjs +151 -0
- package/dist/agent/chunks/catalog-DIZ5dnH5.mjs +953 -0
- package/dist/agent/chunks/context-DoLoLF9f.mjs +75 -0
- package/dist/agent/chunks/doc-BjY_j4Su.mjs +773 -0
- package/dist/agent/chunks/export-CLmpFART.mjs +140 -0
- package/dist/agent/chunks/ids-DAmiNwd9.mjs +28 -0
- package/dist/agent/chunks/imageInfo-QxAfu8R6.mjs +173 -0
- package/dist/agent/chunks/jsonPath-B7vAPXsi.mjs +155 -0
- package/dist/agent/chunks/library-C_EXiphj.mjs +16 -0
- package/dist/agent/chunks/models-C4i_hicr.mjs +387 -0
- package/dist/agent/chunks/output-3F12IR9O.mjs +130 -0
- package/dist/agent/chunks/package-DSmAxrla.mjs +71 -0
- package/dist/agent/chunks/project-CUykGysG.mjs +198 -0
- package/dist/agent/chunks/rolldown-runtime-CMQPkI6i.mjs +18 -0
- package/dist/agent/chunks/server-I0trf5tM.mjs +241 -0
- package/dist/agent/chunks/templates--YGpGuHh.mjs +40 -0
- package/dist/agent/chunks/tools-Dnh8g6F9.mjs +1354 -0
- package/dist/agent/chunks/tree-DO7N0UDV.mjs +127 -0
- package/dist/agent/chunks/types-DOK7tAAu.mjs +30 -0
- package/dist/agent/chunks/validate-CXPFB-i6.mjs +936 -0
- package/dist/engine/agentphoto-engine.js +2777 -0
- package/dist/engine/chunks/transformers.web-D5Vsg6-A.js +18494 -0
- package/dist/engine/ort/ort-wasm-simd-threaded.asyncify.mjs +124 -0
- package/dist/engine/ort/ort-wasm-simd-threaded.asyncify.wasm +0 -0
- package/dist/studio/assets/index-Be8JnaFy.js +28 -0
- package/dist/studio/assets/index-DwPms2S5.css +1 -0
- package/dist/studio/assets/transformers.web-DgnCIB_X.js +38 -0
- package/dist/studio/index.html +15 -0
- package/dist/studio/library/LICENSES.md +57 -0
- package/dist/studio/library/fonts/OFL.txt +90 -0
- package/dist/studio/library/fonts/anton/anton-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/anton/anton-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/archivo-black/archivo-black-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/archivo-black/archivo-black-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/bebas-neue/bebas-neue-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/bebas-neue/bebas-neue-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/caveat/caveat-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/dm-serif/dm-serif-display-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/dm-serif/dm-serif-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/inter/inter-latin-ext-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/lobster/lobster-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/lobster/lobster-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/montserrat/montserrat-latin-ext-800-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/oswald/oswald-latin-ext-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/pacifico/pacifico-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/pacifico/pacifico-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-400-italic.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-ext-400-italic.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/playfair/playfair-display-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-ext-600-normal.woff2 +0 -0
- package/dist/studio/library/fonts/poppins/poppins-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/LICENSE.txt +202 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-ext-400-normal.woff2 +0 -0
- package/dist/studio/library/fonts/roboto-slab/roboto-slab-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-500-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-700-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-ext-500-normal.woff2 +0 -0
- package/dist/studio/library/fonts/space-grotesk/space-grotesk-latin-ext-700-normal.woff2 +0 -0
- package/dist/studio/library/images/city.jpg +0 -0
- package/dist/studio/library/images/food.jpg +0 -0
- package/dist/studio/library/images/landscape.jpg +0 -0
- package/dist/studio/library/images/pet.jpg +0 -0
- package/dist/studio/library/images/portrait.jpg +0 -0
- package/dist/studio/library/images/product.jpg +0 -0
- package/dist/studio/library/index.json +752 -0
- package/dist/studio/templates/avatar-pro/assets/masks/photo-cutout.png +0 -0
- package/dist/studio/templates/avatar-pro/photo.json +13 -0
- package/dist/studio/templates/avatar-pro/preview.jpg +0 -0
- package/dist/studio/templates/avatar-pro/template.json +1 -0
- package/dist/studio/templates/index.json +1 -0
- package/dist/studio/templates/og-article/photo.json +13 -0
- package/dist/studio/templates/og-article/preview.jpg +0 -0
- package/dist/studio/templates/og-article/template.json +1 -0
- package/dist/studio/templates/polaroid/photo.json +13 -0
- package/dist/studio/templates/polaroid/preview.jpg +0 -0
- package/dist/studio/templates/polaroid/template.json +1 -0
- package/dist/studio/templates/product-white/assets/masks/photo-cutout.png +0 -0
- package/dist/studio/templates/product-white/photo.json +72 -0
- package/dist/studio/templates/product-white/preview.jpg +0 -0
- package/dist/studio/templates/product-white/template.json +1 -0
- package/dist/studio/templates/sale-banner/photo.json +125 -0
- package/dist/studio/templates/sale-banner/preview.jpg +0 -0
- package/dist/studio/templates/sale-banner/template.json +1 -0
- package/dist/studio/templates/social-quote/photo.json +13 -0
- package/dist/studio/templates/social-quote/preview.jpg +0 -0
- package/dist/studio/templates/social-quote/template.json +1 -0
- package/dist/studio/templates/story-promo/photo.json +13 -0
- package/dist/studio/templates/story-promo/preview.jpg +0 -0
- package/dist/studio/templates/story-promo/template.json +1 -0
- package/dist/studio/templates/youtube-thumbnail/photo.json +12 -0
- package/dist/studio/templates/youtube-thumbnail/preview.jpg +0 -0
- package/dist/studio/templates/youtube-thumbnail/template.json +1 -0
- package/library/LICENSES.md +57 -0
- package/library/fonts/OFL.txt +90 -0
- package/library/fonts/anton/anton-latin-400-normal.woff2 +0 -0
- package/library/fonts/anton/anton-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/archivo-black/archivo-black-latin-400-normal.woff2 +0 -0
- package/library/fonts/archivo-black/archivo-black-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/bebas-neue/bebas-neue-latin-400-normal.woff2 +0 -0
- package/library/fonts/bebas-neue/bebas-neue-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-400-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-700-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/caveat/caveat-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/dm-serif/dm-serif-display-latin-400-normal.woff2 +0 -0
- package/library/fonts/dm-serif/dm-serif-display-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-800-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-600-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/inter/inter-latin-ext-800-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/jetbrains-mono/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/lobster/lobster-latin-400-normal.woff2 +0 -0
- package/library/fonts/lobster/lobster-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-400-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-700-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-800-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/montserrat/montserrat-latin-ext-800-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-400-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-600-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/oswald/oswald-latin-ext-600-normal.woff2 +0 -0
- package/library/fonts/pacifico/pacifico-latin-400-normal.woff2 +0 -0
- package/library/fonts/pacifico/pacifico-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-400-italic.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-400-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-700-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-ext-400-italic.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/playfair/playfair-display-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-400-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-600-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-700-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-ext-600-normal.woff2 +0 -0
- package/library/fonts/poppins/poppins-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/LICENSE.txt +202 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-400-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-700-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-ext-400-normal.woff2 +0 -0
- package/library/fonts/roboto-slab/roboto-slab-latin-ext-700-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-500-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-700-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-ext-500-normal.woff2 +0 -0
- package/library/fonts/space-grotesk/space-grotesk-latin-ext-700-normal.woff2 +0 -0
- package/library/images/city.jpg +0 -0
- package/library/images/food.jpg +0 -0
- package/library/images/landscape.jpg +0 -0
- package/library/images/pet.jpg +0 -0
- package/library/images/portrait.jpg +0 -0
- package/library/images/product.jpg +0 -0
- package/library/index.json +752 -0
- package/package.json +65 -4
- package/plugin/.claude-plugin/plugin.json +19 -0
- package/plugin/skills/agentphoto-cutout/SKILL.md +132 -0
- package/plugin/skills/agentphoto-design/SKILL.md +104 -0
- package/plugin/skills/agentphoto-design/references/layouts.md +60 -0
- package/plugin/skills/agentphoto-publish/SKILL.md +79 -0
- package/plugin/skills/agentphoto-retouch/SKILL.md +144 -0
- package/plugin/skills/agentphoto-retouch/references/filters.md +51 -0
- package/plugin/skills/agentphoto-retouch/references/patch-ops.md +66 -0
- package/plugin/skills/agentphoto-retouch/references/recipes.md +129 -0
- package/templates/avatar-pro/assets/masks/photo-cutout.png +0 -0
- package/templates/avatar-pro/photo.json +13 -0
- package/templates/avatar-pro/preview.jpg +0 -0
- package/templates/avatar-pro/template.json +1 -0
- package/templates/og-article/photo.json +13 -0
- package/templates/og-article/preview.jpg +0 -0
- package/templates/og-article/template.json +1 -0
- package/templates/polaroid/photo.json +13 -0
- package/templates/polaroid/preview.jpg +0 -0
- package/templates/polaroid/template.json +1 -0
- package/templates/product-white/assets/masks/photo-cutout.png +0 -0
- package/templates/product-white/photo.json +72 -0
- package/templates/product-white/preview.jpg +0 -0
- package/templates/product-white/template.json +1 -0
- package/templates/sale-banner/photo.json +125 -0
- package/templates/sale-banner/preview.jpg +0 -0
- package/templates/sale-banner/template.json +1 -0
- package/templates/social-quote/photo.json +13 -0
- package/templates/social-quote/preview.jpg +0 -0
- package/templates/social-quote/template.json +1 -0
- package/templates/story-promo/photo.json +13 -0
- package/templates/story-promo/preview.jpg +0 -0
- package/templates/story-promo/template.json +1 -0
- package/templates/youtube-thumbnail/photo.json +12 -0
- package/templates/youtube-thumbnail/preview.jpg +0 -0
- package/templates/youtube-thumbnail/template.json +1 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { createRequire as __apRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __apPath } from "node:url";
|
|
3
|
+
import { dirname as __apDirname } from "node:path";
|
|
4
|
+
__apRequire(import.meta.url);
|
|
5
|
+
const __filename = __apPath(import.meta.url);
|
|
6
|
+
__apDirname(__filename);
|
|
7
|
+
import { d as sizePreset, s as SIZE_PRESETS } from "./catalog-DIZ5dnH5.mjs";
|
|
8
|
+
import { r as slugify } from "./ids-DAmiNwd9.mjs";
|
|
9
|
+
import { n as imageInfo } from "./imageInfo-QxAfu8R6.mjs";
|
|
10
|
+
import { i as validateDoc, l as didYouMean, n as defaultDoc, r as normalizeDoc, t as MAX_CANVAS } from "./validate-CXPFB-i6.mjs";
|
|
11
|
+
import { i as isImageMask } from "./types-DOK7tAAu.mjs";
|
|
12
|
+
import { a as nowIso, c as validationError, i as hasErrors, l as writeJson, o as readJson, r as OpsError, s as readJsonOr, t as AGENTPHOTO_VERSION } from "./context-DoLoLF9f.mjs";
|
|
13
|
+
import { n as findLayer } from "./tree-DO7N0UDV.mjs";
|
|
14
|
+
// src/ops/project.ts
|
|
15
|
+
var MANIFEST_FILE = "agentphoto.json";
|
|
16
|
+
var DOC_FILE = "photo.json";
|
|
17
|
+
var ASSET_MANIFEST_FILE = "assets/manifest.json";
|
|
18
|
+
var decoder = new TextDecoder();
|
|
19
|
+
var asText = (v) => typeof v === "string" ? v : decoder.decode(v);
|
|
20
|
+
function resolveSize(opts) {
|
|
21
|
+
if (opts.size) {
|
|
22
|
+
const p = sizePreset(opts.size);
|
|
23
|
+
if (!p) throw new OpsError("invalid", `Unknown size preset "${opts.size}".`, `${didYouMean(opts.size, SIZE_PRESETS.map((s) => s.id))}Presets: ${SIZE_PRESETS.map((s) => `${s.id} (${s.width}×${s.height})`).join(", ")}. Or pass width and height.`);
|
|
24
|
+
return {
|
|
25
|
+
width: p.width,
|
|
26
|
+
height: p.height
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (opts.width !== void 0 || opts.height !== void 0) {
|
|
30
|
+
const w = Math.round(opts.width ?? opts.height ?? 0);
|
|
31
|
+
const h = Math.round(opts.height ?? opts.width ?? 0);
|
|
32
|
+
if (!(w >= 1 && h >= 1 && w <= 16384 && h <= 16384)) throw new OpsError("invalid", `Invalid canvas size ${w}×${h}.`, `Width and height are 1…${MAX_CANVAS} px.`);
|
|
33
|
+
return {
|
|
34
|
+
width: w,
|
|
35
|
+
height: h
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
async function createProject(fs, opts) {
|
|
41
|
+
if (!opts.name || !opts.name.trim()) throw new OpsError("invalid", "A project needs a name.", "Pass a name, e.g. \"summer-sale\".");
|
|
42
|
+
if (!opts.force && (await fs.exists("agentphoto.json") || await fs.exists("photo.json"))) throw new OpsError("conflict", "This folder already contains an AgentPhoto project.", "Choose an empty folder, or pass force: true (CLI --force) to overwrite it.");
|
|
43
|
+
if (opts.template && !opts.templateFiles) throw new OpsError("invalid", `Template "${opts.template}" was requested but its files were not provided.`, "The front door reads templates/<id>/ and passes templateFiles (templates_list lists the ids).");
|
|
44
|
+
const name = slugify(opts.name, "photo");
|
|
45
|
+
const title = opts.title?.trim() || opts.name.trim();
|
|
46
|
+
const files = [];
|
|
47
|
+
const size = resolveSize(opts);
|
|
48
|
+
let doc;
|
|
49
|
+
let templateSlot;
|
|
50
|
+
let templateDoc = null;
|
|
51
|
+
if (opts.templateFiles) {
|
|
52
|
+
const tf = opts.templateFiles;
|
|
53
|
+
if (!tf["photo.json"]) throw new OpsError("invalid", `Template "${opts.template ?? "?"}" has no photo.json.`, "A template folder holds photo.json, template.json and optional assets/.");
|
|
54
|
+
try {
|
|
55
|
+
templateDoc = normalizeDoc(JSON.parse(asText(tf[DOC_FILE])));
|
|
56
|
+
} catch (e) {
|
|
57
|
+
throw new OpsError("invalid", `Template photo.json is not valid JSON: ${e.message}`);
|
|
58
|
+
}
|
|
59
|
+
const tIssues = validateDoc(templateDoc);
|
|
60
|
+
if (hasErrors(tIssues)) throw validationError(`Template "${opts.template ?? "?"}" is invalid.`, tIssues);
|
|
61
|
+
}
|
|
62
|
+
if (opts.image && !imageInfo(opts.image.bytes)) throw new OpsError("invalid", `${opts.image.name} is not a supported image (PNG, JPEG, WebP, GIF, BMP, AVIF, SVG).`);
|
|
63
|
+
let photo = null;
|
|
64
|
+
if (opts.image) {
|
|
65
|
+
const info = imageInfo(opts.image.bytes);
|
|
66
|
+
if (!info) throw new OpsError("invalid", `${opts.image.name} is not a supported image (PNG, JPEG, WebP, GIF, BMP, AVIF, SVG).`);
|
|
67
|
+
const { addAsset } = await import("./assets-CDQo3VqD.mjs").then((n) => n.n);
|
|
68
|
+
const entry = await addAsset(fs, {
|
|
69
|
+
name: opts.image.name,
|
|
70
|
+
bytes: opts.image.bytes,
|
|
71
|
+
kind: "image",
|
|
72
|
+
source: opts.image.source ?? "user",
|
|
73
|
+
license: opts.image.license,
|
|
74
|
+
author: opts.image.author,
|
|
75
|
+
sourceUrl: opts.image.sourceUrl
|
|
76
|
+
});
|
|
77
|
+
photo = {
|
|
78
|
+
path: entry.path,
|
|
79
|
+
width: info.width,
|
|
80
|
+
height: info.height
|
|
81
|
+
};
|
|
82
|
+
files.push(entry.path);
|
|
83
|
+
}
|
|
84
|
+
if (opts.templateFiles) {
|
|
85
|
+
const tf = opts.templateFiles;
|
|
86
|
+
for (const [path, content] of Object.entries(tf)) {
|
|
87
|
+
if (path === "photo.json" || path === "agentphoto.json" || path === "template.json" || path === "preview.png" || path === "preview.jpg") continue;
|
|
88
|
+
if (typeof content === "string") await fs.writeText(path, content);
|
|
89
|
+
else await fs.writeBytes(path, content);
|
|
90
|
+
files.push(path);
|
|
91
|
+
}
|
|
92
|
+
doc = templateDoc;
|
|
93
|
+
try {
|
|
94
|
+
templateSlot = tf["template.json"] ? JSON.parse(asText(tf["template.json"])).slot : void 0;
|
|
95
|
+
} catch {
|
|
96
|
+
templateSlot = void 0;
|
|
97
|
+
}
|
|
98
|
+
doc.id = name;
|
|
99
|
+
doc.title = title;
|
|
100
|
+
if (size) doc.canvas = {
|
|
101
|
+
...doc.canvas,
|
|
102
|
+
...size
|
|
103
|
+
};
|
|
104
|
+
if (opts.background !== void 0) doc.canvas.background = opts.background;
|
|
105
|
+
if (photo) {
|
|
106
|
+
const slot = templateSlot ? findLayer(doc.layers, templateSlot) : null;
|
|
107
|
+
if (slot && slot.layer.type === "image") {
|
|
108
|
+
slot.layer.src = photo.path;
|
|
109
|
+
if (slot.layer.mask && isImageMask(slot.layer.mask)) delete slot.layer.mask;
|
|
110
|
+
delete slot.layer.crop;
|
|
111
|
+
} else doc.layers.unshift(photoLayer(photo, doc.canvas));
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
const canvas = size ?? (photo ? {
|
|
115
|
+
width: photo.width,
|
|
116
|
+
height: photo.height
|
|
117
|
+
} : {
|
|
118
|
+
width: 1200,
|
|
119
|
+
height: 630
|
|
120
|
+
});
|
|
121
|
+
doc = defaultDoc({
|
|
122
|
+
id: name,
|
|
123
|
+
title,
|
|
124
|
+
...canvas,
|
|
125
|
+
background: opts.background !== void 0 ? opts.background : photo ? void 0 : "#ffffff"
|
|
126
|
+
});
|
|
127
|
+
if (photo) doc.layers.push(photoLayer(photo, doc.canvas));
|
|
128
|
+
}
|
|
129
|
+
const issues = validateDoc(doc);
|
|
130
|
+
if (hasErrors(issues)) throw validationError("The new project's document is invalid.", issues, "Fix the template (or the options) and retry.");
|
|
131
|
+
const now = nowIso();
|
|
132
|
+
const manifest = {
|
|
133
|
+
name,
|
|
134
|
+
title,
|
|
135
|
+
createdAt: now,
|
|
136
|
+
updatedAt: now,
|
|
137
|
+
...opts.template ? { template: opts.template } : {},
|
|
138
|
+
agentphoto: AGENTPHOTO_VERSION
|
|
139
|
+
};
|
|
140
|
+
await writeJson(fs, MANIFEST_FILE, manifest);
|
|
141
|
+
await writeJson(fs, DOC_FILE, doc);
|
|
142
|
+
if (!await fs.exists("assets/manifest.json")) await writeJson(fs, ASSET_MANIFEST_FILE, { assets: [] });
|
|
143
|
+
files.push(MANIFEST_FILE, DOC_FILE, ASSET_MANIFEST_FILE);
|
|
144
|
+
return {
|
|
145
|
+
manifest,
|
|
146
|
+
doc,
|
|
147
|
+
files: [...new Set(files)].sort(),
|
|
148
|
+
issues
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function photoLayer(photo, canvas) {
|
|
152
|
+
return photo.width === canvas.width && photo.height === canvas.height ? {
|
|
153
|
+
id: "photo",
|
|
154
|
+
type: "image",
|
|
155
|
+
name: "Photo",
|
|
156
|
+
src: photo.path,
|
|
157
|
+
x: 0,
|
|
158
|
+
y: 0,
|
|
159
|
+
width: photo.width,
|
|
160
|
+
height: photo.height
|
|
161
|
+
} : {
|
|
162
|
+
id: "photo",
|
|
163
|
+
type: "image",
|
|
164
|
+
name: "Photo",
|
|
165
|
+
src: photo.path,
|
|
166
|
+
x: 0,
|
|
167
|
+
y: 0,
|
|
168
|
+
width: canvas.width,
|
|
169
|
+
height: canvas.height,
|
|
170
|
+
fit: "cover"
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
async function loadManifest(fs) {
|
|
174
|
+
return readJson(fs, MANIFEST_FILE, "Project manifest");
|
|
175
|
+
}
|
|
176
|
+
async function loadProject(fs) {
|
|
177
|
+
return {
|
|
178
|
+
manifest: await loadManifest(fs),
|
|
179
|
+
doc: normalizeDoc(await readJson(fs, DOC_FILE, "The document"))
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
async function saveDoc(fs, doc, opts = {}) {
|
|
183
|
+
const issues = validateDoc(doc);
|
|
184
|
+
if (hasErrors(issues) && !opts.allowInvalid) throw validationError("Document not saved:", issues);
|
|
185
|
+
await writeJson(fs, DOC_FILE, doc);
|
|
186
|
+
await touchManifest(fs);
|
|
187
|
+
return { issues };
|
|
188
|
+
}
|
|
189
|
+
async function touchManifest(fs) {
|
|
190
|
+
const manifest = await readJsonOr(fs, MANIFEST_FILE, null);
|
|
191
|
+
if (!manifest) return;
|
|
192
|
+
await writeJson(fs, MANIFEST_FILE, {
|
|
193
|
+
...manifest,
|
|
194
|
+
updatedAt: nowIso(),
|
|
195
|
+
agentphoto: AGENTPHOTO_VERSION
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
export { saveDoc as a, loadProject as i, DOC_FILE as n, createProject as r, ASSET_MANIFEST_FILE as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRequire as __apRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __apPath } from "node:url";
|
|
3
|
+
import { dirname as __apDirname } from "node:path";
|
|
4
|
+
__apRequire(import.meta.url);
|
|
5
|
+
const __filename = __apPath(import.meta.url);
|
|
6
|
+
__apDirname(__filename);
|
|
7
|
+
// \0rolldown/runtime.js
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __exportAll = (all, no_symbols) => {
|
|
10
|
+
let target = {};
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
export { __exportAll as t };
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { createRequire as __apRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __apPath } from "node:url";
|
|
3
|
+
import { dirname as __apDirname } from "node:path";
|
|
4
|
+
__apRequire(import.meta.url);
|
|
5
|
+
const __filename = __apPath(import.meta.url);
|
|
6
|
+
__apDirname(__filename);
|
|
7
|
+
import { o as toCliError } from "./output-3F12IR9O.mjs";
|
|
8
|
+
// agent/mcp/server.ts
|
|
9
|
+
var SUPPORTED_PROTOCOLS = [
|
|
10
|
+
"2025-06-18",
|
|
11
|
+
"2025-03-26",
|
|
12
|
+
"2024-11-05"
|
|
13
|
+
];
|
|
14
|
+
var LATEST_PROTOCOL = SUPPORTED_PROTOCOLS[0];
|
|
15
|
+
var RPC = {
|
|
16
|
+
parse: -32700,
|
|
17
|
+
invalidRequest: -32600,
|
|
18
|
+
methodNotFound: -32601,
|
|
19
|
+
invalidParams: -32602,
|
|
20
|
+
internal: -32603
|
|
21
|
+
};
|
|
22
|
+
var DESTRUCTIVE = /* @__PURE__ */ new Set([
|
|
23
|
+
"doc_apply",
|
|
24
|
+
"layer_remove",
|
|
25
|
+
"assets_remove",
|
|
26
|
+
"export"
|
|
27
|
+
]);
|
|
28
|
+
var IDEMPOTENT = /* @__PURE__ */ new Set([
|
|
29
|
+
"doc_apply",
|
|
30
|
+
"layer_update",
|
|
31
|
+
"mask_set",
|
|
32
|
+
"render_preview",
|
|
33
|
+
"export"
|
|
34
|
+
]);
|
|
35
|
+
var OPEN_WORLD = /* @__PURE__ */ new Set([
|
|
36
|
+
"assets_add",
|
|
37
|
+
"remove_background",
|
|
38
|
+
"mask_generate",
|
|
39
|
+
"project_create"
|
|
40
|
+
]);
|
|
41
|
+
function toolAnnotations(tool) {
|
|
42
|
+
return {
|
|
43
|
+
title: tool.name.replace(/_/g, " ").replace(/^\w/, (c) => c.toUpperCase()),
|
|
44
|
+
readOnlyHint: !tool.mutating,
|
|
45
|
+
destructiveHint: tool.mutating && DESTRUCTIVE.has(tool.name),
|
|
46
|
+
idempotentHint: !tool.mutating || IDEMPOTENT.has(tool.name),
|
|
47
|
+
openWorldHint: OPEN_WORLD.has(tool.name)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function isRefusal(result) {
|
|
51
|
+
if (!result || typeof result !== "object") return false;
|
|
52
|
+
const r = result;
|
|
53
|
+
return r.status === "refused" || r.applied === false && typeof r.counts?.errors === "number" && r.counts.errors > 0;
|
|
54
|
+
}
|
|
55
|
+
function createMcpServer(opts) {
|
|
56
|
+
const all = () => typeof opts.tools === "function" ? opts.tools() : opts.tools;
|
|
57
|
+
const visible = () => all().filter((t) => !(opts.readOnly && t.mutating));
|
|
58
|
+
const resources = opts.resources ?? [];
|
|
59
|
+
let initialized = false;
|
|
60
|
+
let protocol = LATEST_PROTOCOL;
|
|
61
|
+
const ok = (id, result) => ({
|
|
62
|
+
jsonrpc: "2.0",
|
|
63
|
+
id,
|
|
64
|
+
result
|
|
65
|
+
});
|
|
66
|
+
const fail = (id, code, message, data) => ({
|
|
67
|
+
jsonrpc: "2.0",
|
|
68
|
+
id,
|
|
69
|
+
error: {
|
|
70
|
+
code,
|
|
71
|
+
message,
|
|
72
|
+
...data !== void 0 ? { data } : {}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const withStructured = (text) => protocol >= "2025-06-18" && text.length <= 8192;
|
|
76
|
+
async function callTool(id, params) {
|
|
77
|
+
const name = typeof params.name === "string" ? params.name : "";
|
|
78
|
+
const tool = all().find((t) => t.name === name);
|
|
79
|
+
if (!tool) return fail(id, RPC.invalidParams, `Unknown tool: ${name}`);
|
|
80
|
+
if (opts.readOnly && tool.mutating) return fail(id, RPC.invalidParams, `Tool ${name} changes the project and this server is read-only.`);
|
|
81
|
+
const args = params.arguments && typeof params.arguments === "object" ? params.arguments : {};
|
|
82
|
+
try {
|
|
83
|
+
const result = await opts.call(name, args);
|
|
84
|
+
const structured = result && typeof result === "object" && !Array.isArray(result) ? result : { result: result ?? null };
|
|
85
|
+
const images = opts.images ? await opts.images(name, result).catch(() => []) : [];
|
|
86
|
+
const text = JSON.stringify(result ?? null);
|
|
87
|
+
return ok(id, {
|
|
88
|
+
content: [{
|
|
89
|
+
type: "text",
|
|
90
|
+
text
|
|
91
|
+
}, ...images.map((img) => ({
|
|
92
|
+
type: "image",
|
|
93
|
+
data: img.data,
|
|
94
|
+
mimeType: img.mimeType
|
|
95
|
+
}))],
|
|
96
|
+
...withStructured(text) ? { structuredContent: structured } : {},
|
|
97
|
+
isError: isRefusal(result)
|
|
98
|
+
});
|
|
99
|
+
} catch (err) {
|
|
100
|
+
const e = toCliError(err);
|
|
101
|
+
const error = {
|
|
102
|
+
code: e.code,
|
|
103
|
+
message: e.message,
|
|
104
|
+
...e.hint ? { hint: e.hint } : {},
|
|
105
|
+
...e.details !== void 0 ? { details: e.details } : {}
|
|
106
|
+
};
|
|
107
|
+
const text = JSON.stringify({ error });
|
|
108
|
+
return ok(id, {
|
|
109
|
+
content: [{
|
|
110
|
+
type: "text",
|
|
111
|
+
text
|
|
112
|
+
}],
|
|
113
|
+
...withStructured(text) ? { structuredContent: { error } } : {},
|
|
114
|
+
isError: true
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async function readResource(id, uri) {
|
|
119
|
+
const r = resources.find((x) => x.uri === uri);
|
|
120
|
+
if (!r) return fail(id, -32002, `Resource not found: ${uri}`, { uri });
|
|
121
|
+
const value = await r.read();
|
|
122
|
+
return ok(id, { contents: [{
|
|
123
|
+
uri,
|
|
124
|
+
mimeType: r.mimeType,
|
|
125
|
+
text: typeof value === "string" ? value : JSON.stringify(value)
|
|
126
|
+
}] });
|
|
127
|
+
}
|
|
128
|
+
async function handle(msg) {
|
|
129
|
+
if (!msg || typeof msg !== "object" || msg.jsonrpc !== "2.0" || typeof msg.method !== "string") {
|
|
130
|
+
const id = msg && typeof msg === "object" && "id" in msg ? msg.id ?? null : null;
|
|
131
|
+
return fail(id, RPC.invalidRequest, "Invalid JSON-RPC 2.0 request.");
|
|
132
|
+
}
|
|
133
|
+
const req = msg;
|
|
134
|
+
const isNotification = !("id" in req) || req.id === void 0;
|
|
135
|
+
const id = req.id ?? null;
|
|
136
|
+
const params = req.params ?? {};
|
|
137
|
+
if (isNotification) {
|
|
138
|
+
if (req.method === "notifications/initialized") initialized = true;
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
switch (req.method) {
|
|
143
|
+
case "initialize": {
|
|
144
|
+
const requested = typeof params.protocolVersion === "string" ? params.protocolVersion : LATEST_PROTOCOL;
|
|
145
|
+
protocol = SUPPORTED_PROTOCOLS.includes(requested) ? requested : LATEST_PROTOCOL;
|
|
146
|
+
return ok(id, {
|
|
147
|
+
protocolVersion: protocol,
|
|
148
|
+
capabilities: {
|
|
149
|
+
tools: { listChanged: false },
|
|
150
|
+
resources: {
|
|
151
|
+
listChanged: false,
|
|
152
|
+
subscribe: false
|
|
153
|
+
},
|
|
154
|
+
prompts: { listChanged: false },
|
|
155
|
+
logging: {}
|
|
156
|
+
},
|
|
157
|
+
serverInfo: {
|
|
158
|
+
name: opts.serverName,
|
|
159
|
+
title: "AgentPhoto",
|
|
160
|
+
version: opts.version
|
|
161
|
+
},
|
|
162
|
+
instructions: `${opts.instructions}${opts.readOnly ? " READ-ONLY: tools that change the project are hidden." : ""}`
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
case "ping": return ok(id, {});
|
|
166
|
+
case "tools/list": return ok(id, { tools: visible().map((t) => ({
|
|
167
|
+
name: t.name,
|
|
168
|
+
title: toolAnnotations(t).title,
|
|
169
|
+
description: t.description,
|
|
170
|
+
inputSchema: t.inputSchema,
|
|
171
|
+
annotations: toolAnnotations(t)
|
|
172
|
+
})) });
|
|
173
|
+
case "tools/call": return callTool(id, params);
|
|
174
|
+
case "resources/list": return ok(id, { resources: resources.map(({ read: _read, ...r }) => r) });
|
|
175
|
+
case "resources/templates/list": return ok(id, { resourceTemplates: [] });
|
|
176
|
+
case "resources/read": return readResource(id, typeof params.uri === "string" ? params.uri : "");
|
|
177
|
+
case "prompts/list": return ok(id, { prompts: [] });
|
|
178
|
+
case "logging/setLevel": return ok(id, {});
|
|
179
|
+
default: return fail(id, RPC.methodNotFound, `Method not found: ${req.method}`);
|
|
180
|
+
}
|
|
181
|
+
} catch (err) {
|
|
182
|
+
return fail(id, RPC.internal, err.message);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
handle,
|
|
187
|
+
get initialized() {
|
|
188
|
+
return initialized;
|
|
189
|
+
},
|
|
190
|
+
get protocol() {
|
|
191
|
+
return protocol;
|
|
192
|
+
},
|
|
193
|
+
toolNames: () => visible().map((t) => t.name)
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function serveStdio(server, input, write, log = () => void 0) {
|
|
197
|
+
return new Promise((resolve) => {
|
|
198
|
+
let buffer = "";
|
|
199
|
+
let chain = Promise.resolve();
|
|
200
|
+
const processLine = async (line) => {
|
|
201
|
+
if (!line.trim()) return;
|
|
202
|
+
let msg;
|
|
203
|
+
try {
|
|
204
|
+
msg = JSON.parse(line);
|
|
205
|
+
} catch {
|
|
206
|
+
write(JSON.stringify({
|
|
207
|
+
jsonrpc: "2.0",
|
|
208
|
+
id: null,
|
|
209
|
+
error: {
|
|
210
|
+
code: RPC.parse,
|
|
211
|
+
message: "Parse error"
|
|
212
|
+
}
|
|
213
|
+
}));
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (Array.isArray(msg)) {
|
|
217
|
+
const out = (await Promise.all(msg.map((m) => server.handle(m)))).filter((r) => r !== null);
|
|
218
|
+
if (out.length) write(JSON.stringify(out));
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const res = await server.handle(msg);
|
|
222
|
+
if (res) write(JSON.stringify(res));
|
|
223
|
+
};
|
|
224
|
+
input.setEncoding?.("utf8");
|
|
225
|
+
input.on("data", (chunk) => {
|
|
226
|
+
buffer += chunk.toString();
|
|
227
|
+
let nl;
|
|
228
|
+
while ((nl = buffer.indexOf("\n")) >= 0) {
|
|
229
|
+
const line = buffer.slice(0, nl).replace(/\r$/, "");
|
|
230
|
+
buffer = buffer.slice(nl + 1);
|
|
231
|
+
chain = chain.then(() => processLine(line)).catch((err) => log(`[mcp] ${err.message}`));
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
input.on("end", () => {
|
|
235
|
+
const rest = buffer;
|
|
236
|
+
buffer = "";
|
|
237
|
+
chain = chain.then(() => processLine(rest)).finally(() => resolve());
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
export { createMcpServer, serveStdio };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createRequire as __apRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __apPath } from "node:url";
|
|
3
|
+
import { dirname as __apDirname } from "node:path";
|
|
4
|
+
__apRequire(import.meta.url);
|
|
5
|
+
const __filename = __apPath(import.meta.url);
|
|
6
|
+
__apDirname(__filename);
|
|
7
|
+
import { c as closest } from "./validate-CXPFB-i6.mjs";
|
|
8
|
+
import { r as OpsError } from "./context-DoLoLF9f.mjs";
|
|
9
|
+
import "./project-CUykGysG.mjs";
|
|
10
|
+
// src/ops/templates.ts
|
|
11
|
+
function listTemplates(index, filter = {}) {
|
|
12
|
+
const words = (filter.query ?? "").toLowerCase().split(/\s+/).filter(Boolean);
|
|
13
|
+
return (index ?? []).filter((t) => {
|
|
14
|
+
if (filter.category && t.category !== filter.category) return false;
|
|
15
|
+
const hay = `${t.id} ${t.title} ${t.description} ${t.category} ${t.tags.join(" ")}`.toLowerCase();
|
|
16
|
+
return words.every((w) => hay.includes(w));
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function findTemplate(index, id) {
|
|
20
|
+
const t = (index ?? []).find((x) => x.id === id);
|
|
21
|
+
if (!t) {
|
|
22
|
+
const s = closest(id, (index ?? []).map((x) => x.id));
|
|
23
|
+
throw new OpsError("notFound", `Unknown template "${id}".`, `${s ? `Did you mean "${s}"? ` : ""}List templates with templates_list / \`agentphoto templates list\`.`);
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
function parseTemplateInfo(json, fallbackId) {
|
|
28
|
+
const t = json ?? {};
|
|
29
|
+
return {
|
|
30
|
+
id: typeof t.id === "string" ? t.id : fallbackId,
|
|
31
|
+
title: typeof t.title === "string" ? t.title : fallbackId,
|
|
32
|
+
description: typeof t.description === "string" ? t.description : "",
|
|
33
|
+
category: typeof t.category === "string" ? t.category : "other",
|
|
34
|
+
tags: Array.isArray(t.tags) ? t.tags.map(String) : [],
|
|
35
|
+
width: typeof t.width === "number" ? t.width : 1200,
|
|
36
|
+
height: typeof t.height === "number" ? t.height : 630,
|
|
37
|
+
...typeof t.slot === "string" ? { slot: t.slot } : {}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export { listTemplates as n, parseTemplateInfo as r, findTemplate as t };
|