create-agentmark 0.3.0 → 0.4.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.
Files changed (65) hide show
  1. package/dist/index.d.ts +2 -3
  2. package/dist/index.js +787 -51
  3. package/dist/index.js.map +1 -1
  4. package/dist/utils/examples/templates/index.d.ts +47 -13
  5. package/dist/utils/examples/templates/index.js +504 -12
  6. package/dist/utils/examples/templates/index.js.map +1 -1
  7. package/package.json +3 -2
  8. package/dist/index.d.ts.map +0 -1
  9. package/dist/utils/examples/create-example-app.d.ts +0 -2
  10. package/dist/utils/examples/create-example-app.d.ts.map +0 -1
  11. package/dist/utils/examples/create-example-app.js +0 -243
  12. package/dist/utils/examples/create-example-app.js.map +0 -1
  13. package/dist/utils/examples/templates/adapters.d.ts +0 -15
  14. package/dist/utils/examples/templates/adapters.d.ts.map +0 -1
  15. package/dist/utils/examples/templates/adapters.js +0 -28
  16. package/dist/utils/examples/templates/adapters.js.map +0 -1
  17. package/dist/utils/examples/templates/animal-drawing-prompt.d.ts +0 -2
  18. package/dist/utils/examples/templates/animal-drawing-prompt.d.ts.map +0 -1
  19. package/dist/utils/examples/templates/animal-drawing-prompt.js +0 -19
  20. package/dist/utils/examples/templates/animal-drawing-prompt.js.map +0 -1
  21. package/dist/utils/examples/templates/app-index.d.ts +0 -2
  22. package/dist/utils/examples/templates/app-index.d.ts.map +0 -1
  23. package/dist/utils/examples/templates/app-index.js +0 -95
  24. package/dist/utils/examples/templates/app-index.js.map +0 -1
  25. package/dist/utils/examples/templates/customer-support-prompt.d.ts +0 -2
  26. package/dist/utils/examples/templates/customer-support-prompt.d.ts.map +0 -1
  27. package/dist/utils/examples/templates/customer-support-prompt.js +0 -40
  28. package/dist/utils/examples/templates/customer-support-prompt.js.map +0 -1
  29. package/dist/utils/examples/templates/datasets.d.ts +0 -5
  30. package/dist/utils/examples/templates/datasets.d.ts.map +0 -1
  31. package/dist/utils/examples/templates/datasets.js +0 -21
  32. package/dist/utils/examples/templates/datasets.js.map +0 -1
  33. package/dist/utils/examples/templates/env.d.ts +0 -2
  34. package/dist/utils/examples/templates/env.d.ts.map +0 -1
  35. package/dist/utils/examples/templates/env.js +0 -12
  36. package/dist/utils/examples/templates/env.js.map +0 -1
  37. package/dist/utils/examples/templates/example-prompts.d.ts +0 -2
  38. package/dist/utils/examples/templates/example-prompts.d.ts.map +0 -1
  39. package/dist/utils/examples/templates/example-prompts.js +0 -35
  40. package/dist/utils/examples/templates/example-prompts.js.map +0 -1
  41. package/dist/utils/examples/templates/index.d.ts.map +0 -1
  42. package/dist/utils/examples/templates/package-setup.d.ts +0 -3
  43. package/dist/utils/examples/templates/package-setup.d.ts.map +0 -1
  44. package/dist/utils/examples/templates/package-setup.js +0 -61
  45. package/dist/utils/examples/templates/package-setup.js.map +0 -1
  46. package/dist/utils/examples/templates/party-planner-prompt.d.ts +0 -2
  47. package/dist/utils/examples/templates/party-planner-prompt.d.ts.map +0 -1
  48. package/dist/utils/examples/templates/party-planner-prompt.js +0 -40
  49. package/dist/utils/examples/templates/party-planner-prompt.js.map +0 -1
  50. package/dist/utils/examples/templates/story-teller-prompt.d.ts +0 -2
  51. package/dist/utils/examples/templates/story-teller-prompt.d.ts.map +0 -1
  52. package/dist/utils/examples/templates/story-teller-prompt.js +0 -23
  53. package/dist/utils/examples/templates/story-teller-prompt.js.map +0 -1
  54. package/dist/utils/examples/templates/tsconfig.d.ts +0 -2
  55. package/dist/utils/examples/templates/tsconfig.d.ts.map +0 -1
  56. package/dist/utils/examples/templates/tsconfig.js +0 -14
  57. package/dist/utils/examples/templates/tsconfig.js.map +0 -1
  58. package/dist/utils/examples/templates/user-client-config.d.ts +0 -6
  59. package/dist/utils/examples/templates/user-client-config.d.ts.map +0 -1
  60. package/dist/utils/examples/templates/user-client-config.js +0 -85
  61. package/dist/utils/examples/templates/user-client-config.js.map +0 -1
  62. package/dist/utils/providers.d.ts +0 -9
  63. package/dist/utils/providers.d.ts.map +0 -1
  64. package/dist/utils/providers.js +0 -16
  65. package/dist/utils/providers.js.map +0 -1
@@ -1,243 +0,0 @@
1
- import fs from "fs-extra";
2
- import { readFileSync, writeFileSync, existsSync } from "fs";
3
- import * as path from "path";
4
- import { Providers } from "../providers.js";
5
- import { setupPackageJson, installDependencies, getIndexFileContent, getTsConfigContent, getEnvFileContent, createExamplePrompts, getClientConfigContent, getAdapterConfig, } from "./templates/index.js";
6
- import { fetchPromptsFrontmatter, generateTypeDefinitions } from "@agentmark/shared-utils";
7
- const setupMCPServer = (client, targetPath) => {
8
- if (client === "skip") {
9
- console.log("Skipping MCP server setup.");
10
- return;
11
- }
12
- // Keep ./ prefix for display in messages
13
- const folderName = targetPath;
14
- // Handle VS Code
15
- if (client === "vscode") {
16
- try {
17
- console.log(`Setting up MCP server for VS Code in ${folderName}...`);
18
- const vscodeDir = path.join(targetPath, ".vscode");
19
- fs.ensureDirSync(vscodeDir);
20
- const mcpConfig = {
21
- servers: {
22
- "agentmark-docs": {
23
- url: "https://docs.agentmark.co/mcp"
24
- }
25
- }
26
- };
27
- fs.writeJsonSync(path.join(vscodeDir, "mcp.json"), mcpConfig, { spaces: 2 });
28
- console.log(`✅ MCP server configured for VS Code in ${folderName}/.vscode/mcp.json`);
29
- }
30
- catch (error) {
31
- console.warn(`Warning: Could not set up MCP server for VS Code:`, error);
32
- console.log("See https://docs.agentmark.co/agentmark/further_reference/agentmark-mcp for setup instructions.");
33
- }
34
- return;
35
- }
36
- // Handle Zed
37
- if (client === "zed") {
38
- try {
39
- console.log(`Setting up MCP server for Zed in ${folderName}...`);
40
- const zedDir = path.join(targetPath, ".zed");
41
- fs.ensureDirSync(zedDir);
42
- const zedConfig = {
43
- context_servers: {
44
- "agentmark-docs": {
45
- url: "https://docs.agentmark.co/mcp"
46
- }
47
- }
48
- };
49
- fs.writeJsonSync(path.join(zedDir, "settings.json"), zedConfig, { spaces: 2 });
50
- console.log(`✅ MCP server configured for Zed in ${folderName}/.zed/settings.json`);
51
- }
52
- catch (error) {
53
- console.warn(`Warning: Could not set up MCP server for Zed:`, error);
54
- console.log("See https://docs.agentmark.co/agentmark/further_reference/agentmark-mcp for setup instructions.");
55
- }
56
- return;
57
- }
58
- // Handle Cursor
59
- if (client === "cursor") {
60
- try {
61
- console.log(`Setting up MCP server for Cursor in ${folderName}...`);
62
- const cursorDir = path.join(targetPath, ".cursor");
63
- fs.ensureDirSync(cursorDir);
64
- const cursorConfig = {
65
- mcpServers: {
66
- "agentmark-docs": {
67
- url: "https://docs.agentmark.co/mcp"
68
- }
69
- }
70
- };
71
- fs.writeJsonSync(path.join(cursorDir, "mcp.json"), cursorConfig, { spaces: 2 });
72
- console.log(`✅ MCP server configured for Cursor in ${folderName}/.cursor/mcp.json`);
73
- }
74
- catch (error) {
75
- console.warn(`Warning: Could not set up MCP server for Cursor:`, error);
76
- console.log("See https://docs.agentmark.co/agentmark/further_reference/agentmark-mcp for setup instructions.");
77
- }
78
- return;
79
- }
80
- // Handle Claude Code
81
- if (client === "claude-code") {
82
- try {
83
- console.log(`Setting up MCP server for Claude Code in ${folderName}...`);
84
- const mcpConfig = {
85
- mcpServers: {
86
- "agentmark-docs": {
87
- type: "http",
88
- url: "https://docs.agentmark.co/mcp"
89
- }
90
- }
91
- };
92
- fs.writeJsonSync(path.join(targetPath, ".mcp.json"), mcpConfig, { spaces: 2 });
93
- console.log(`✅ MCP server configured for Claude Code in ${folderName}/.mcp.json`);
94
- }
95
- catch (error) {
96
- console.warn(`Warning: Could not set up MCP server for Claude Code:`, error);
97
- console.log("See https://docs.agentmark.co/agentmark/further_reference/agentmark-mcp for setup instructions.");
98
- }
99
- return;
100
- }
101
- };
102
- export const createExampleApp = async (client, targetPath = ".", apiKey = "", adapter = "ai-sdk") => {
103
- try {
104
- const modelProvider = 'openai';
105
- const model = 'gpt-4o';
106
- console.log("Creating Agent Mark example app...");
107
- // Keep ./ prefix for display in messages
108
- const folderName = targetPath;
109
- // Create directory structure
110
- fs.ensureDirSync(`${targetPath}/agentmark`);
111
- setupMCPServer(client, targetPath);
112
- // Create example prompts
113
- createExamplePrompts(model, targetPath, adapter);
114
- console.log(`✅ Example prompts and datasets created in ${folderName}/agentmark/`);
115
- // Create user client config at project root
116
- // Prefer TS for dev ergonomics
117
- const langModels = Providers[modelProvider].languageModels.slice(0, 1);
118
- fs.writeFileSync(`${targetPath}/agentmark.client.ts`, getClientConfigContent({ provider: modelProvider, languageModels: langModels, adapter }));
119
- // Create .env file
120
- fs.writeFileSync(`${targetPath}/.env`, getEnvFileContent(modelProvider, apiKey));
121
- // Create .gitignore
122
- const gitignore = ['node_modules', '.env', '*.agentmark-outputs/', '.agentmark'].join('\n');
123
- fs.writeFileSync(`${targetPath}/.gitignore`, gitignore);
124
- // Create the main application file
125
- fs.writeFileSync(`${targetPath}/index.ts`, getIndexFileContent(adapter));
126
- // Create tsconfig.json
127
- fs.writeJsonSync(`${targetPath}/tsconfig.json`, getTsConfigContent(), { spaces: 2 });
128
- // Setup package.json and install dependencies
129
- setupPackageJson(targetPath);
130
- installDependencies(modelProvider, targetPath, adapter);
131
- // Generate types file using the type generation library
132
- console.log("Generating types from prompts...");
133
- try {
134
- const agentmarkDir = path.join(targetPath, 'agentmark');
135
- const prompts = await fetchPromptsFrontmatter({ rootDir: agentmarkDir });
136
- const typeDefinitions = await generateTypeDefinitions(prompts);
137
- fs.writeFileSync(`${targetPath}/agentmark.types.ts`, typeDefinitions);
138
- }
139
- catch (error) {
140
- console.warn("Warning: Could not generate types automatically:", error);
141
- console.log("You can generate types later by running: npx agentmark generate-types --root-dir agentmark");
142
- // Create a placeholder types file
143
- fs.writeFileSync(`${targetPath}/agentmark.types.ts`, `// Auto-generated types from AgentMark\n// Run 'npx agentmark generate-types --root-dir agentmark' to generate types\nexport default interface AgentmarkTypes {}\n`);
144
- }
145
- // Create .agentmark directory and dev-entry.ts
146
- console.log("Creating development server entry point...");
147
- const agentmarkInternalDir = path.join(targetPath, '.agentmark');
148
- fs.ensureDirSync(agentmarkInternalDir);
149
- // Get adapter-specific values from config
150
- const adapterConfig = getAdapterConfig(adapter);
151
- const { webhookHandler } = adapterConfig.classes;
152
- const devEntryContent = `// Auto-generated webhook server entry point
153
- // To customize, create a dev-server.ts file in your project root
154
-
155
- import { createWebhookServer } from '@agentmark/cli/runner-server';
156
- import { ${webhookHandler} } from '${adapterConfig.package}/runner';
157
- import { AgentMarkSDK } from '@agentmark/sdk';
158
- import path from 'path';
159
-
160
- async function main() {
161
- const { client } = await import('../agentmark.client.js');
162
-
163
- const args = process.argv.slice(2);
164
- const webhookPortArg = args.find(arg => arg.startsWith('--webhook-port='));
165
- const fileServerPortArg = args.find(arg => arg.startsWith('--file-server-port='));
166
-
167
- const webhookPort = webhookPortArg ? parseInt(webhookPortArg.split('=')[1]) : 9417;
168
- const fileServerPort = fileServerPortArg ? parseInt(fileServerPortArg.split('=')[1]) : 9418;
169
-
170
- // Initialize OpenTelemetry tracing to export traces to the API server
171
- const fileServerUrl = \`http://localhost:\${fileServerPort}\`;
172
- const sdk = new AgentMarkSDK({
173
- apiKey: '',
174
- appId: '',
175
- baseUrl: fileServerUrl,
176
- });
177
- sdk.initTracing({ disableBatch: true });
178
-
179
- const handler = new ${webhookHandler}(client as any);
180
- const templatesDirectory = path.join(process.cwd(), 'agentmark');
181
-
182
- await createWebhookServer({
183
- port: webhookPort,
184
- handler,
185
- fileServerUrl,
186
- templatesDirectory
187
- });
188
- }
189
-
190
- main().catch((err) => {
191
- console.error(err);
192
- process.exit(1);
193
- });
194
- `;
195
- fs.writeFileSync(path.join(agentmarkInternalDir, 'dev-entry.ts'), devEntryContent);
196
- // Create .env file with webhook URL configuration
197
- // Always use Express runner server (port 9417) for local development
198
- // regardless of deployment platform
199
- const webhookUrl = 'http://localhost:9417';
200
- const envPath = path.join(targetPath, '.env');
201
- let envContent = '';
202
- if (existsSync(envPath)) {
203
- envContent = readFileSync(envPath, 'utf8');
204
- if (!envContent.includes('AGENTMARK_WEBHOOK_URL')) {
205
- envContent += `\n# AgentMark runner server URL\nAGENTMARK_WEBHOOK_URL=${webhookUrl}\n`;
206
- }
207
- }
208
- else {
209
- envContent = `# AgentMark runner server URL\nAGENTMARK_WEBHOOK_URL=${webhookUrl}\n\n# Add your API keys here\n# OPENAI_API_KEY=your-key-here\n`;
210
- }
211
- writeFileSync(envPath, envContent, 'utf8');
212
- // Success message
213
- console.log("\n✅ Agentmark initialization completed successfully!");
214
- console.log(`
215
- █████╗ ██████╗ ███████╗███╗ ██╗████████╗███╗ ███╗ █████╗ ██████╗ ██╗ ██╗
216
- ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝████╗ ████║██╔══██╗██╔══██╗██║ ██╔╝
217
- ███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ ██╔████╔██║███████║██████╔╝█████╔╝
218
- ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ██║╚██╔╝██║██╔══██║██╔══██╗██╔═██╗
219
- ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ██║ ╚═╝ ██║██║ ██║██║ ██║██║ ██╗
220
- ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
221
-
222
- `);
223
- console.log('\n' + '═'.repeat(70));
224
- console.log('Next Steps');
225
- console.log('═'.repeat(70));
226
- // Simplified instructions - always just "npm run dev"
227
- console.log('\n Get Started:');
228
- if (folderName !== "." && folderName !== "./") {
229
- console.log(` $ cd ${folderName}`);
230
- }
231
- console.log(' $ npm run dev\n');
232
- console.log('─'.repeat(70));
233
- console.log('Resources');
234
- console.log('─'.repeat(70));
235
- console.log(' Documentation: https://docs.agentmark.co');
236
- console.log('═'.repeat(70) + '\n');
237
- }
238
- catch (error) {
239
- console.error("Error creating example app:", error);
240
- throw error;
241
- }
242
- };
243
- //# sourceMappingURL=create-example-app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-example-app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AE,CAAC,CAAC,CAAC;QAE5B,sDAAsD;QACtD,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAC/B,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;YAC9C,OAAO,CAAC,GAAG,CAAC,UAAU,UAAU,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAEjC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;QACpD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- export interface AdapterConfig {
2
- /** npm package name for the adapter */
3
- package: string;
4
- /** Additional npm packages required by this adapter */
5
- dependencies: string[];
6
- /** Class names used in generated code */
7
- classes: {
8
- modelRegistry: string;
9
- toolRegistry: string;
10
- webhookHandler: string;
11
- };
12
- }
13
- export declare const ADAPTERS: Record<string, AdapterConfig>;
14
- export declare function getAdapterConfig(adapter: string): AdapterConfig;
15
- //# sourceMappingURL=adapters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/adapters.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,OAAO,EAAE;QACP,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAmBlD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAM/D"}
@@ -1,28 +0,0 @@
1
- export const ADAPTERS = {
2
- 'ai-sdk': {
3
- package: '@agentmark/ai-sdk-v5-adapter',
4
- dependencies: ['ai@^5'],
5
- classes: {
6
- modelRegistry: 'VercelAIModelRegistry',
7
- toolRegistry: 'VercelAIToolRegistry',
8
- webhookHandler: 'VercelAdapterWebhookHandler',
9
- },
10
- },
11
- 'mastra': {
12
- package: '@agentmark/mastra-v0-adapter',
13
- dependencies: ['@mastra/core@<0.20.0', '@mastra/mcp@<0.13.4'],
14
- classes: {
15
- modelRegistry: 'MastraModelRegistry',
16
- toolRegistry: 'MastraToolRegistry',
17
- webhookHandler: 'MastraAdapterWebhookHandler',
18
- },
19
- },
20
- };
21
- export function getAdapterConfig(adapter) {
22
- const config = ADAPTERS[adapter];
23
- if (!config) {
24
- throw new Error(`Unknown adapter: ${adapter}. Available adapters: ${Object.keys(ADAPTERS).join(', ')}`);
25
- }
26
- return config;
27
- }
28
- //# sourceMappingURL=adapters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/adapters.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,QAAQ,GAAkC;IACrD,QAAQ,EAAE;QACR,OAAO,EAAE,8BAA8B;QACvC,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,OAAO,EAAE;YACP,aAAa,EAAE,uBAAuB;YACtC,YAAY,EAAE,sBAAsB;YACpC,cAAc,EAAE,6BAA6B;SAC9C;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,8BAA8B;QACvC,YAAY,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;QAC7D,OAAO,EAAE;YACP,aAAa,EAAE,qBAAqB;YACpC,YAAY,EAAE,oBAAoB;YAClC,cAAc,EAAE,6BAA6B;SAC9C;KACF;CACF,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,yBAAyB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1G,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getAnimalDrawingPrompt: () => string;
2
- //# sourceMappingURL=animal-drawing-prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animal-drawing-prompt.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/animal-drawing-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,QAAO,MAiBzC,CAAC"}
@@ -1,19 +0,0 @@
1
- export const getAnimalDrawingPrompt = () => {
2
- return `---
3
- name: animal-drawing
4
- image_config:
5
- model_name: dall-e-3
6
- num_images: 1
7
- size: 1024x1024
8
- aspect_ratio: 1:1
9
- test_settings:
10
- dataset: animal.jsonl
11
- props:
12
- animal: "cat"
13
- ---
14
-
15
- <ImagePrompt>
16
- Draw a hyper-realistic picture of a {props.animal}
17
- </ImagePrompt>`;
18
- };
19
- //# sourceMappingURL=animal-drawing-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animal-drawing-prompt.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/animal-drawing-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAW,EAAE;IACjD,OAAO;;;;;;;;;;;;;;;eAeM,CAAC;AAChB,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getIndexFileContent: (adapter?: string) => string;
2
- //# sourceMappingURL=app-index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-index.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/app-index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAAI,UAAS,MAAiB,KAAG,MA4FhE,CAAC"}
@@ -1,95 +0,0 @@
1
- export const getIndexFileContent = (adapter = "ai-sdk") => {
2
- if (adapter === "mastra") {
3
- return `import "dotenv/config";
4
- import { Agent } from "@mastra/core/agent";
5
- import { client } from "./agentmark.client";
6
-
7
- const telemetry = {
8
- isEnabled: true,
9
- metadata: {
10
- traceId: "trace-123",
11
- traceName: "customer-support",
12
- userId: "user-123",
13
- sessionId: "session-123",
14
- sessionName: "my-first-session",
15
- },
16
- };
17
-
18
- const runCustomerSupport = async (customer_message: string) => {
19
- const prompt = await client.loadTextPrompt("customer-support-agent.prompt.mdx");
20
- const agentConfig = await prompt.formatAgent({
21
- options: {
22
- telemetry,
23
- },
24
- });
25
-
26
- const [messages, generateOptions] = await agentConfig.formatMessages({
27
- props: {
28
- customer_question: customer_message,
29
- },
30
- });
31
-
32
- const agent = new Agent(agentConfig);
33
- const response = await agent.generate(messages, generateOptions);
34
-
35
- return (response as any).text || (response as any).content || String(response);
36
- };
37
-
38
- const main = async () => {
39
- try {
40
- const user_message = "How long does shipping take?";
41
- const assistant = await runCustomerSupport(user_message);
42
- console.log("Customer support response:", assistant);
43
- } catch (error) {
44
- console.error(error);
45
- }
46
- };
47
-
48
- main();
49
- `;
50
- }
51
- else {
52
- return `import "dotenv/config";
53
- import { generateText } from "ai";
54
- import { client } from "./agentmark.client";
55
-
56
- const telemetry = {
57
- isEnabled: true,
58
- metadata: {
59
- traceId: "trace-123",
60
- traceName: "customer-support",
61
- userId: "user-123",
62
- sessionId: "session-123",
63
- sessionName: "my-first-session",
64
- },
65
- };
66
-
67
- const runCustomerSupport = async (customer_message: string) => {
68
- const prompt = await client.loadTextPrompt("customer-support-agent.prompt.mdx");
69
- const vercelInput = await prompt.format({
70
- props: {
71
- customer_question: customer_message,
72
- },
73
- telemetry,
74
- });
75
-
76
- const resp = await generateText(vercelInput);
77
-
78
- return resp.text;
79
- };
80
-
81
- const main = async () => {
82
- try {
83
- const user_message = "How long does shipping take?";
84
- const assistant = await runCustomerSupport(user_message);
85
- console.log("Customer support response:", assistant);
86
- } catch (error) {
87
- console.error(error);
88
- }
89
- };
90
-
91
- main();
92
- `;
93
- }
94
- };
95
- //# sourceMappingURL=app-index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-index.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/app-index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAkB,QAAQ,EAAU,EAAE;IACxE,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CV,CAAC;IACA,CAAC;SAAM,CAAC;QACN,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCV,CAAC;IACA,CAAC;AACH,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getCustomerSupportPrompt: (model: string) => string;
2
- //# sourceMappingURL=customer-support-prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customer-support-prompt.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/customer-support-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,GAAI,OAAO,MAAM,KAAG,MAsCxD,CAAC"}
@@ -1,40 +0,0 @@
1
- export const getCustomerSupportPrompt = (model) => {
2
- return `---
3
- name: customer-support-agent
4
- text_config:
5
- model_name: ${model}
6
- max_calls: 2
7
- tools:
8
- search_knowledgebase:
9
- description: Search the company knowledgebase for information about shipping, warranty, and returns policies.
10
- parameters:
11
- type: object
12
- properties:
13
- query:
14
- type: string
15
- description: The search query to find relevant information
16
- required: [query]
17
- test_settings:
18
- dataset: customer-query.jsonl
19
- props:
20
- customer_question: "I'm having trouble with my order. How long does shipping take?"
21
- input_schema:
22
- type: object
23
- properties:
24
- customer_question:
25
- type: string
26
- description: "The customer's question"
27
- required:
28
- - customer_question
29
- ---
30
-
31
- <System>
32
- You are a customer service agent for a company that sells products online. You are given a customer's question and you need to respond to the customer. You need to be friendly, professional, and helpful.
33
-
34
- You have access to the following tool:
35
- - search_knowledgebase: Search the company knowledgebase for information about shipping, warranty, and returns. Use this when customers ask about these topics.
36
- </System>
37
-
38
- <User>{props.customer_question}</User>`;
39
- };
40
- //# sourceMappingURL=customer-support-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customer-support-prompt.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/customer-support-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAU,EAAE;IAChE,OAAO;;;gBAGO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAiCkB,CAAC;AACxC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const getAnimalDataset: () => string;
2
- export declare const getCustomerQueryDataset: () => string;
3
- export declare const getPartyDataset: () => string;
4
- export declare const getStoryDataset: () => string;
5
- //# sourceMappingURL=datasets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/datasets.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,QAAO,MAInC,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAO,MAI1C,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,MAIlC,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,MAIlC,CAAC"}
@@ -1,21 +0,0 @@
1
- export const getAnimalDataset = () => {
2
- return `{"input": {"animal": "cat"}, "expected_output": "A realistic picture of a cat"}
3
- {"input": {"animal": "dog"}, "expected_output": "A realistic picture of a dog"}
4
- {"input": {"animal": "bird"}, "expected_output": "A realistic picture of a bird"}`;
5
- };
6
- export const getCustomerQueryDataset = () => {
7
- return `{"input": {"customer_question": "My package hasn't arrived yet. Can you help me track it?"}}
8
- {"input": {"customer_question": "I received the wrong item in my order. What should I do?"}}
9
- {"input": {"customer_question": "How do I return a product that I purchased last week?"}}`;
10
- };
11
- export const getPartyDataset = () => {
12
- return `{"input": {"party_text": "We're having a party with Alice, Bob, and Carol."}, "expected_output": "{\\"names\\": [\\"Alice\\", \\"Bob\\", \\"Carol\\"]}"}
13
- {"input": {"party_text": "The guest list includes Dave, Emma, and Frank."}, "expected_output": "{\\"names\\": [\\"Dave\\", \\"Emma\\", \\"Frank\\"]}"}
14
- {"input": {"party_text": "Join us for a celebration with Grace, Henry, and Isla."}, "expected_output": "{\\"names\\": [\\"Grace\\", \\"Henry\\", \\"Isla\\"]}"}`;
15
- };
16
- export const getStoryDataset = () => {
17
- return `{"input": {"story": "Once upon a time, the Moon woke up and found her glow missing! She floated around the sky asking stars, clouds, and even comets if they'd seen her light. It wasn't until she peeked into a mountain lake that she saw her glow shining back—hidden in her own reflection! Laughing, she realized she had never lost it—it was with her all along, just hiding beneath a cloudy sky."}}
18
- {"input": {"story": "Benny was no ordinary banana—he dreamed of becoming a superhero. One day, when a monkey slipped in the jungle and cried for help, Benny rolled into action, dodging vines and swinging from branches using his peel like a lasso. The monkey was saved, and from that day on, Benny was known as \\"The Peel of Justice,\\" the bravest fruit in the whole rainforest."}}
19
- {"input": {"story": "In the town of Maplebrook, there was a library that whispered stories when no one was looking. Curious little Nia tiptoed in one rainy day and heard the books giggling softly. She opened one called The Secret Tunnel, and to her surprise, it sucked her in! She found herself riding a dragon through glittering caves. When she returned, the book winked shut—waiting for its next reader to listen."}}`;
20
- };
21
- //# sourceMappingURL=datasets.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/datasets.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAW,EAAE;IAC3C,OAAO;;kFAEyE,CAAC;AACnF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAW,EAAE;IAClD,OAAO;;0FAEiF,CAAC;AAC3F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAW,EAAE;IAC1C,OAAO;;gKAEuJ,CAAC;AACjK,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAW,EAAE;IAC1C,OAAO;;maAE0Z,CAAC;AACpa,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getEnvFileContent: (_modelProvider: string, apiKey?: string) => string;
2
- //# sourceMappingURL=env.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/env.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,MAAM,EACtB,SAAQ,MAAW,KAClB,MAWF,CAAC"}
@@ -1,12 +0,0 @@
1
- export const getEnvFileContent = (_modelProvider, apiKey = '') => {
2
- const apiKeyValue = apiKey || 'your_api_key_here';
3
- return `# Cloud deployment: Set these environment variables
4
- # AGENTMARK_BASE_URL=https://api.agentmark.co
5
- # AGENTMARK_API_KEY=your_agentmark_api_key
6
- # AGENTMARK_APP_ID=your_agentmark_app_id
7
- # Learn more: https://docs.agentmark.co/platform/getting_started/quickstart
8
-
9
- OPENAI_API_KEY=${apiKeyValue}
10
- `;
11
- };
12
- //# sourceMappingURL=env.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/env.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,cAAsB,EACtB,SAAiB,EAAE,EACX,EAAE;IACV,MAAM,WAAW,GAAG,MAAM,IAAI,mBAAmB,CAAC;IAElD,OAAO;;;;;;iBAMQ,WAAW;CAC3B,CAAC;AACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const createExamplePrompts: (model: string, targetPath?: string, adapter?: string) => void;
2
- //# sourceMappingURL=example-prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-prompts.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/example-prompts.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,EAAE,aAAY,MAAY,EAAE,UAAS,MAAiB,SA+BvG,CAAC"}
@@ -1,35 +0,0 @@
1
- import fs from 'fs-extra';
2
- import { getAnimalDrawingPrompt } from './animal-drawing-prompt.js';
3
- import { getCustomerSupportPrompt } from './customer-support-prompt.js';
4
- import { getPartyPlannerPrompt } from './party-planner-prompt.js';
5
- import { getStoryTellerPrompt } from './story-teller-prompt.js';
6
- import { getAnimalDataset, getCustomerQueryDataset, getPartyDataset, getStoryDataset } from './datasets.js';
7
- export const createExamplePrompts = (model, targetPath = ".", adapter = "ai-sdk") => {
8
- // Ensure the templates directory exists
9
- fs.ensureDirSync(`${targetPath}/agentmark`);
10
- // Create animal drawing prompt and dataset (skip for mastra adapter)
11
- if (adapter !== "mastra") {
12
- const animalDrawingPrompt = getAnimalDrawingPrompt();
13
- fs.writeFileSync(`${targetPath}/agentmark/animal-drawing.prompt.mdx`, animalDrawingPrompt);
14
- const animalDataset = getAnimalDataset();
15
- fs.writeFileSync(`${targetPath}/agentmark/animal.jsonl`, animalDataset);
16
- }
17
- // Create customer support prompt and dataset
18
- const customerSupportPrompt = getCustomerSupportPrompt(model);
19
- fs.writeFileSync(`${targetPath}/agentmark/customer-support-agent.prompt.mdx`, customerSupportPrompt);
20
- const customerQueryDataset = getCustomerQueryDataset();
21
- fs.writeFileSync(`${targetPath}/agentmark/customer-query.jsonl`, customerQueryDataset);
22
- // Create party planner prompt and dataset
23
- const partyPlannerPrompt = getPartyPlannerPrompt(model);
24
- fs.writeFileSync(`${targetPath}/agentmark/party-planner.prompt.mdx`, partyPlannerPrompt);
25
- const partyDataset = getPartyDataset();
26
- fs.writeFileSync(`${targetPath}/agentmark/party.jsonl`, partyDataset);
27
- // Create story teller prompt and dataset (skip for mastra adapter)
28
- if (adapter !== "mastra") {
29
- const storyTellerPrompt = getStoryTellerPrompt();
30
- fs.writeFileSync(`${targetPath}/agentmark/story-teller.prompt.mdx`, storyTellerPrompt);
31
- const storyDataset = getStoryDataset();
32
- fs.writeFileSync(`${targetPath}/agentmark/story.jsonl`, storyDataset);
33
- }
34
- };
35
- //# sourceMappingURL=example-prompts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-prompts.js","sourceRoot":"","sources":["../../../../src/utils/examples/templates/example-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAE,aAAqB,GAAG,EAAE,UAAkB,QAAQ,EAAE,EAAE;IAC1G,wCAAwC;IACxC,EAAE,CAAC,aAAa,CAAC,GAAG,UAAU,YAAY,CAAC,CAAC;IAE5C,qEAAqE;IACrE,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src/utils/examples/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const setupPackageJson: (targetPath?: string) => void;
2
- export declare const installDependencies: (modelProvider: string, targetPath?: string, adapter?: string) => void;
3
- //# sourceMappingURL=package-setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-setup.d.ts","sourceRoot":"","sources":["../../../../src/utils/examples/templates/package-setup.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,GAAI,aAAY,MAAY,SA4BxD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,eAAe,MAAM,EACrB,aAAY,MAAY,EACxB,UAAS,MAAiB,SAuC3B,CAAC"}