{"_id":"@agentica/prompt-jsx","_rev":"3-189f840ed4e7061a79cc68f22fb643de","name":"@agentica/prompt-jsx","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@agentica/prompt-jsx","version":"0.0.1","author":{"name":"wrtnlabs@wrtn.io"},"license":"MIT","_id":"@agentica/prompt-jsx@0.0.1","maintainers":[{"name":"samchon","email":"samchon.github@gmail.com"},{"name":"kakasoo","email":"kscodebase@gmail.com"},{"name":"kimuichan","email":"leerabi577@gmail.com"}],"dist":{"shasum":"a1a5a24222a2421a19c9a4f9b61c3bed6de065a4","tarball":"https://registry.npmjs.org/@agentica/prompt-jsx/-/prompt-jsx-0.0.1.tgz","fileCount":13,"integrity":"sha512-xA3EqnHLw8WlREaWbzPvDkBJ2rjWKhP4BEReQbmIXkw9DjKnkZYT29agLGDNG5q5IL1K4yjPANi1vzyphInmUw==","signatures":[{"sig":"MEYCIQD3l4mN0ssnLoFOojHCZTL046ByqwlZtZ1GtLXkI0r3zAIhAKIxTF+9YSlPM1HpYq7JhogIDtqkIo6jL1GZanog0WuM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34697},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","default":"./dist/jsx-runtime.js"}},"gitHead":"5763559eaa11e88b656d51cc0e757f40fb1e7639","private":false,"scripts":{"test":"jest","build":"tsc -p tsconfig.json","test:watch":"jest --watch"},"_npmUser":{"name":"kimuichan","email":"leerabi577@gmail.com"},"_npmVersion":"10.9.2","description":"A library that supports configuring AI prompts using JSX syntax.","directories":{},"_nodeVersion":"22.13.0","dependencies":{"typescript":"^5.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.3.4","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/prompt-jsx_0.0.1_1748239785685_0.6714926336961518","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@agentica/prompt-jsx","version":"0.0.2","author":{"name":"wrtnlabs@wrtn.io"},"license":"MIT","_id":"@agentica/prompt-jsx@0.0.2","maintainers":[{"name":"samchon","email":"samchon.github@gmail.com"},{"name":"kakasoo","email":"kscodebase@gmail.com"},{"name":"kimuichan","email":"leerabi577@gmail.com"}],"dist":{"shasum":"2937fd9b9cc765b428590dce366d6a71035d13d9","tarball":"https://registry.npmjs.org/@agentica/prompt-jsx/-/prompt-jsx-0.0.2.tgz","fileCount":8,"integrity":"sha512-jgEHRKmI5JUzcLlgs0K7grQ3GMMT/FHXTTauB7hD013Y6lq5WkvZ/+PIHyC1/VK4NqWaGEH9nWQC5dmgPdGwTw==","signatures":[{"sig":"MEYCIQD54PmVlB178aPROqMl1v3NCwyn73S0Q2FVXw0ThAEi6AIhAMwPHWjoSPb9SW4ewukmIB+OZzULR8Nv/rRrP/AXxDRX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10168},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","default":"./dist/jsx-runtime.js"}},"gitHead":"5763559eaa11e88b656d51cc0e757f40fb1e7639","private":false,"scripts":{"test":"jest","build":"tsc -p tsconfig.json","test:watch":"jest --watch"},"_npmUser":{"name":"kimuichan","email":"leerabi577@gmail.com"},"_npmVersion":"10.9.2","description":"A library that supports configuring AI prompts using JSX syntax.","directories":{},"_nodeVersion":"22.13.0","dependencies":{"typescript":"^5.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.3.4","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/prompt-jsx_0.0.2_1748240285855_0.8600825387791236","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-05-26T06:09:45.608Z","modified":"2026-04-03T09:10:36.495Z","0.0.1":"2025-05-26T06:09:45.888Z","0.0.2":"2025-05-26T06:18:06.027Z"},"author":{"name":"wrtnlabs@wrtn.io"},"license":"MIT","description":"A library that supports configuring AI prompts using JSX syntax.","maintainers":[{"email":"samchon.github@gmail.com","name":"samchon"}],"readme":"# Prompt-JSX\n\nPrompt-JSX is a library that allows you to structure and write AI prompts using JSX syntax.\nBy using a React-like syntax to compose prompts as components,\nit significantly improves the readability and reusability of prompts.\n\n## Features\n\n- 🎯 **Structured Prompts**: Write prompts in a logical, hierarchical structure using JSX\n- 📝 **Type Safety**: Type checking for prompts with TypeScript support\n- 🔄 **Reusability**: Reuse prompt elements with component-based structure\n- 🎨 **Readability**: Easily understand complex prompts with visually clear structure\n\n## Installation\n\n```bash\nnpm install @wrtnlabs/prompt-jsx\n```\n\n## Configuration\n\n### TypeScript Configuration\n\n```json\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"@wrtnlabs/prompt-jsx\"\n  }\n}\n```\n\n## Usage Example\n\n```tsx\nimport { jsx } from \"@wrtnlabs/prompt-jsx\";\n\nconst prompt = (\n  <prompt>\n    <instruction>\n      You are a friendly AI assistant. Please provide clear and accurate\n      responses to user questions.\n    </instruction>\n\n    <examples>\n      <input>What is Python?</input>\n      <output>\n        Python is a simple and easy-to-learn programming language. It is known\n        for its high readability and extensive library ecosystem.\n      </output>\n    </examples>\n\n    <context>\n      This conversation is for educational purposes, aimed at programming\n      beginners.\n    </context>\n\n    <persona>\n      You are a senior developer and educator with 10 years of experience. You\n      enjoy explaining complex concepts in simple terms.\n    </persona>\n  </prompt>\n);\n```\n\n## Supported Elements\n\n### Prompt Elements\n\n- `<prompt>`: Root element for the prompt\n- `<instruction>`: Main instructions for the AI\n- `<examples>`: Contains example inputs and outputs\n- `<context>`: Background information or context for the prompt\n- `<input>`: Example input\n- `<output>`: Example output\n- `<persona>`: Defines the AI's role or personality\n- `<role>`: Specifies the AI's expertise or role\n\n### Formatting Elements\n\n- `<br/>`: Line break\n- `<strong>`: Bold text\n- `<code lang=\"javascript\">`: Code block (with optional language specification)\n\n## Benefits\n\n1. **Structured Prompts**\n\n   - Clearly separate different parts of the prompt using JSX's hierarchical structure\n   - Easily visualize the prompt structure\n\n2. **Type Safety**\n\n   - Prevent errors during prompt writing with TypeScript type checking\n   - IDE autocompletion support\n\n3. **Reusability**\n\n   - Create reusable components from common prompt elements\n   - Easy prompt template creation\n\n4. **Maintainability**\n   - Manage prompts in a structured format\n   - Easy to modify and update prompts\n\n## License\n\nMIT\n","readmeFilename":"README.md"}