@mapomodule/mcp 1.0.0-beta.3 → 1.0.0-experimental.1
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/README.md +26 -24
- package/dist/build.mjs +66 -4
- package/dist/cli.mjs +8 -1
- package/dist/knowledge/api.json +1 -1
- package/dist/knowledge/docs.json +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/core/ai-setup/catalog.d.ts +0 -0
- package/dist/runtime/core/ai-setup/catalog.js +411 -0
- package/dist/runtime/core/ai-setup/index.d.ts +0 -0
- package/dist/runtime/core/ai-setup/index.js +20 -0
- package/dist/runtime/core/ai-setup/plan.d.ts +0 -0
- package/dist/runtime/core/ai-setup/plan.js +640 -0
- package/dist/runtime/core/ai-setup/questions.d.ts +0 -0
- package/dist/runtime/core/ai-setup/questions.js +237 -0
- package/dist/runtime/core/indexer.js +10 -3
- package/dist/runtime/core/instructions.js +3 -2
- package/dist/runtime/core/prompts.js +25 -1
- package/dist/runtime/core/recipes.js +388 -3
- package/dist/runtime/core/search.js +2 -1
- package/dist/runtime/core/tools/ai.d.ts +0 -0
- package/dist/runtime/core/tools/ai.js +125 -0
- package/dist/runtime/core/tools/api.js +7 -1
- package/dist/runtime/mcp/handlers/mapo/prompts/ai-setup.js +3 -0
- package/dist/runtime/mcp/handlers/mapo/tools/ai-setup.js +3 -0
- package/package.json +1 -1
- package/src/__tests__/aiSetup.test.ts +330 -0
- package/src/__tests__/cli.test.ts +1 -0
- package/src/__tests__/composables.test.ts +95 -0
- package/src/__tests__/indexer.test.ts +19 -0
- package/src/__tests__/knowledge.test.ts +48 -0
- package/src/__tests__/overview.test.ts +11 -0
- package/src/__tests__/recipes.test.ts +67 -0
- package/src/__tests__/search.test.ts +16 -0
- package/src/__tests__/tools.test.ts +27 -1
- package/src/build/extract-components.ts +33 -5
- package/src/build/extract-composables.ts +65 -2
- package/src/cli.ts +8 -1
- package/src/runtime/core/ai-setup/catalog.ts +475 -0
- package/src/runtime/core/ai-setup/index.ts +29 -0
- package/src/runtime/core/ai-setup/plan.ts +706 -0
- package/src/runtime/core/ai-setup/questions.ts +290 -0
- package/src/runtime/core/indexer.ts +16 -4
- package/src/runtime/core/instructions.ts +3 -2
- package/src/runtime/core/prompts.ts +28 -0
- package/src/runtime/core/recipes.ts +408 -3
- package/src/runtime/core/search.ts +4 -1
- package/src/runtime/core/tools/ai.ts +209 -0
- package/src/runtime/core/tools/api.ts +8 -0
- package/src/runtime/mcp/handlers/mapo/prompts/ai-setup.ts +4 -0
- package/src/runtime/mcp/handlers/mapo/tools/ai-setup.ts +4 -0
|
@@ -82,6 +82,12 @@ interface ComponentApiArgs {
|
|
|
82
82
|
include?: Array<"props" | "events" | "slots" | "exposed">;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/** What an app needs before it has the components of an opt-in package. */
|
|
86
|
+
const OPT_IN_PACKAGES: Record<string, string> = {
|
|
87
|
+
"@mapomodule/ai":
|
|
88
|
+
"Experimental and opt-in: it exists only in an app that sets `mapo.ai` (the meta-module then installs `@mapomodule/ai`).",
|
|
89
|
+
};
|
|
90
|
+
|
|
85
91
|
function renderComponent(
|
|
86
92
|
component: ComponentApi,
|
|
87
93
|
include?: ComponentApiArgs["include"],
|
|
@@ -99,9 +105,11 @@ function renderComponent(
|
|
|
99
105
|
sections.push(renderMembers("Exposed", component.exposed));
|
|
100
106
|
}
|
|
101
107
|
|
|
108
|
+
const optIn = OPT_IN_PACKAGES[component.pkg];
|
|
102
109
|
return (
|
|
103
110
|
`# ${component.name}\n` +
|
|
104
111
|
`package: \`${component.pkg}\` · source: \`${component.file}\`\n` +
|
|
112
|
+
(optIn ? `\n${optIn}\n` : "") +
|
|
105
113
|
(component.description ? `\n${component.description}\n` : "") +
|
|
106
114
|
`\n${sections.join("\n")}` +
|
|
107
115
|
renderDocs(component.docs)
|