{"_id":"@callmedayz/ai-prompt-toolkit","_rev":"10-8afc2e2d59dd6be8fbb26f7cfd44be06","name":"@callmedayz/ai-prompt-toolkit","dist-tags":{"latest":"2.6.2"},"versions":{"1.0.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"1.0.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@1.0.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"9885c2337fc9f53933b609ab5b6ebc2899f631fa","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-1.0.0.tgz","fileCount":35,"integrity":"sha512-g4w5QUuImZdoVi0mwn40nFHVQmojzPd1aoO65pV3Sb1IXuWTYoNUjYWYfjn3vdDu5WS2k6D5bz44hjHclH0dlw==","signatures":[{"sig":"MEYCIQDNtro6GIv4VC3+IaUQF6x9lCWJ5guilxUzuXohiJVUswIhAOe8dF4UmQgx9JVYEtTVhZWvdZrc4YrA3Jc9A0qqXXYn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80431},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive toolkit for AI prompt engineering, token counting, and text processing","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_1.0.0_1752065581267_0.39462638263731686","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@callmedayz/ai-prompt-toolkit","version":"1.0.1","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@1.0.1","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"9294cb28e7eaf94fe9a3c84bb7ecc9b4e5a2d4bc","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-1.0.1.tgz","fileCount":35,"integrity":"sha512-IemLwqtg3SFAiAkwGlVfbKJYxdbNBHXxnA387DVJ1g7LdLIjEVwqL4yUiv22ll4caS3CXj3/i94X6heHfa9rFQ==","signatures":[{"sig":"MEUCIQCCDH2FW2VXcA2FJC6oau7zEIZCKy3lcvXgDvt9ReRjkwIgVFrZLPF9eEoLLWH+FI5AWglc1hWTe4lgR6/M7/GJ8Ig=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81812},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"09130f82ea706c69e06b9d9d733f03699575b391","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive toolkit for AI prompt engineering, token counting, and text processing","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_1.0.1_1752066478947_0.3267565678264974","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.0.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.0.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"61aa1e6b456a841a457e66e3136f738214c88a9e","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.0.0.tgz","fileCount":43,"integrity":"sha512-WY7u2+8bKX+ERvEpQ2iKqDRlbwWk0U1Unud/DKcXZqlhN3f5JGGXbi/FXFqGe5ZDHXH0QnVG6yZRbZ9W8vJzHQ==","signatures":[{"sig":"MEUCIQC0LiJeKlfAu8qLhIq77XxFMbtERLPTO//zSWXj+qoHgAIgYBsKpyf75qpCztbb+qQFj6FGyFq/25Zg5SLQ65gcee8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99112},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"eb6989bfb933ca970c3a6a7289adb08cb62575d1","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive toolkit for AI prompt engineering with OpenRouter integration, supporting 100+ AI models including free-tier options","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.0.0_1752068535183_0.7635701849149088","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.1.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.1.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"d2ea1666f5fc930513ee5d3e243e193c51067dff","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.1.0.tgz","fileCount":59,"integrity":"sha512-yppamFGAAyfWjVkoei2moKunn+V6IpSr+jysWdQfrqcS4nhbnENcVl4jlQcsASFeEv2EL6//S/Dzi7pIsM83Kw==","signatures":[{"sig":"MEUCIQDShLnlN6uEoK9b2BUQ93ICS2I/y79rzRZK/P01VZtxfQIgJCJdRg1rh/nFjeh8qJtOzNZMOMpwdorg5tpU0BbzxjI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":172251},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"fc8d9c5d42b5822e8a246c3ff4bae4ee8b6d9e30","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive toolkit for AI prompt engineering with OpenRouter integration, supporting 100+ AI models including free-tier options","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.1.0_1752070409754_0.9065501234790554","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.2.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.2.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"b395c63dd272b709acd87498331ecf3285c9fc95","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.2.0.tgz","fileCount":67,"integrity":"sha512-JWLYa516x0OuRHvJ1j4vyMjEJdJbcMse9HZ0Hs0WXCQHjnDXVtTH74QsVcj9vzdmkwI8hzXQy26gRGAmI0jxXA==","signatures":[{"sig":"MEQCIBBHrGHDAhvSirBQNtmkShq0IGkujwLaNlf/aMfskI1RAiA4YlOnfmBUIyVJhZZcWnmwmMMap5oh9Xex13j5EVpqfw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":247791},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"ff5d24a1d2b3e2a6fb2fd4dc7b26bd0c4c9a722b","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive toolkit for AI prompt engineering with OpenRouter integration, supporting 100+ AI models including free-tier options","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.2.0_1752071445170_0.8469143461422557","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.3.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.3.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"b344662eb025e0ebc5f85415bd73face06a2647f","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.3.0.tgz","fileCount":75,"integrity":"sha512-rlpqFQvDbYJk5LDBk9SgjMM/QGfc1L0iOrRoMEnPtRDcwhT5WhWOXQuLbvZCJ2CkeSt9kEeuhrQY3sBxNpeggg==","signatures":[{"sig":"MEQCIH1b+a/GdgOoeFpBKJ98/cULkNUVrQg559MuUg53c41qAiAt5RlKEaqpxRVdkwHCEfbyRzVWlrQ9Myq1Y13XEQIT5A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":291993},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b65ebe5268d1bad6ac4aaf8dade531d4ae9ff6fd","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"Professional AI prompt engineering toolkit with Chain-of-Thought templates, Few-Shot learning, OpenRouter integration, real API calls, streaming responses, and 310+ model support","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.3.0_1752073555849_0.6244431714517151","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.4.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.4.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"6a0bca4edcb7875a28206dcaee53737664a507bb","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.4.0.tgz","fileCount":91,"integrity":"sha512-1McATTB0qjn/wKu18KYU5renei31GvW1wKODMRpSc+kdnohApyLKD68GQ3eEMU/AtbsKVr83Rp7/oTVrWff8qg==","signatures":[{"sig":"MEUCIDOd+lvvak0ghQBg0YqZmmXdyFkERlaJXCSXL2bNGxVAAiEAyO2sBJpsmNmPG1nsU3yRxevkMe2kqnKWzRhtGMcpX/k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":438895},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"afac58bc1506050fb29dd17d0ea713fb27a015eb","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"Professional AI prompt engineering toolkit with Chain-of-Thought templates, Few-Shot learning, OpenRouter integration, real API calls, streaming responses, and 310+ model support","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.4.0_1752075656701_0.2939293773026359","host":"s3://npm-registry-packages-npm-production"}},"2.6.0":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.6.0","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.6.0","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"c804c40e9e9953c31ad77e1f33c44ef4a820be13","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.6.0.tgz","fileCount":111,"integrity":"sha512-KdQnkbbMjy0k7TrFYJQj4lo/19xTgEi3U49695wf2xoK1LmWl6F8v02xkm0UB/6svZSrJiddU1Gj7fu7kBLwVA==","signatures":[{"sig":"MEYCIQDA5v2xw1/o2BylZnJ6v5j9zv0sMDPwvWrdyKkIB/dIUAIhANMqXtnuJ+Ymu/gSeK2dPV9BvSA2Ekfh1BxcDt25hHSp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":600418},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"973b8dc0d3376a11413343ce6df282e1bd060a96","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.6.0_1752079040836_0.8577029390282382","host":"s3://npm-registry-packages-npm-production"}},"2.6.1":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.6.1","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","_id":"@callmedayz/ai-prompt-toolkit@2.6.1","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"dist":{"shasum":"45666e2169bfefac63c8ccda7442a19e8dbde1b0","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.6.1.tgz","fileCount":111,"integrity":"sha512-u4E1xPhyaCtRa0ZGLQg1eE+eKy148Zvo8a828nZRfv6Q2YXYHURxrjUEsTwO30XKHop7T7wEWAs0YhyUdYdqFg==","signatures":[{"sig":"MEYCIQCIjjvYZ7pgSrH1K0F+YT4vZCNlV7NLD37qdfnkMgdiTQIhAMTymfKDgpER6OV1btAe0GxaWONaXR8i14eddRpbtkHu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":601643},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"bde2448f738415b0a39c010cb0c672396e93f08b","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","test:watch":"jest --watch","fetch-models":"node scripts/fetch-openrouter-models.js","update-models":"npm run fetch-models && npm run generate-config && npm run build","prepublishOnly":"npm run build","generate-config":"node scripts/generate-model-config.js"},"_npmUser":{"name":"callmedayz","actor":{"name":"callmedayz","type":"user","email":"gxdsins@gmail.com"},"email":"gxdsins@gmail.com"},"repository":{"url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git","type":"git"},"_npmVersion":"10.9.2","description":"Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ai-prompt-toolkit_2.6.1_1752081054638_0.14493238817513254","host":"s3://npm-registry-packages-npm-production"}},"2.6.2":{"name":"@callmedayz/ai-prompt-toolkit","version":"2.6.2","description":"Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"jest","test:watch":"jest --watch","prepublishOnly":"npm run build","dev":"tsc --watch","fetch-models":"node scripts/fetch-openrouter-models.js","generate-config":"node scripts/generate-model-config.js","update-models":"npm run fetch-models && npm run generate-config && npm run build"},"keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"author":{"name":"callmedayz"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git"},"bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^30.0.0","@types/node":"^24.0.12","jest":"^30.0.4","ts-jest":"^29.4.0","typescript":"^5.8.3"},"_id":"@callmedayz/ai-prompt-toolkit@2.6.2","gitHead":"e33d4b4fc3c1f0b8e71575dcc2d9ff5153930815","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-l4ZHhK0RV9jTQ6eu4z6KhDnS0UOJSpDZjBpVx9jR4z/kbwjEkZT0D4VXyAapUy+80zpnj2D6BD2SdNq6HXmucQ==","shasum":"de42b64c67f1470c80bb85fda37e9f37712b09a4","tarball":"https://registry.npmjs.org/@callmedayz/ai-prompt-toolkit/-/ai-prompt-toolkit-2.6.2.tgz","fileCount":111,"unpackedSize":601849,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDW5r44yvCFgy99khvwD93Gansm9/itacoN6ZOXTpnoOgIgezlqX4HjitR+QFwj7011c2k9xDero3qJhMnfSeD+sZE="}]},"_npmUser":{"name":"callmedayz","email":"gxdsins@gmail.com","actor":{"name":"callmedayz","email":"gxdsins@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-prompt-toolkit_2.6.2_1752081340027_0.9742191056374283"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-09T12:53:01.167Z","modified":"2025-07-09T17:15:40.372Z","1.0.0":"2025-07-09T12:53:01.437Z","1.0.1":"2025-07-09T13:07:59.199Z","2.0.0":"2025-07-09T13:42:15.362Z","2.1.0":"2025-07-09T14:13:29.941Z","2.2.0":"2025-07-09T14:30:45.416Z","2.3.0":"2025-07-09T15:05:56.027Z","2.4.0":"2025-07-09T15:40:56.919Z","2.6.0":"2025-07-09T16:37:21.032Z","2.6.1":"2025-07-09T17:10:54.817Z","2.6.2":"2025-07-09T17:15:40.211Z"},"bugs":{"url":"https://github.com/callmedayz/ai-prompt-toolkit/issues"},"author":{"name":"callmedayz"},"license":"MIT","homepage":"https://github.com/callmedayz/ai-prompt-toolkit#readme","keywords":["ai","prompt","engineering","tokens","text-processing","llm","gpt","claude","openrouter","multimodal","free-tier","machine-learning"],"repository":{"type":"git","url":"git+https://github.com/callmedayz/ai-prompt-toolkit.git"},"description":"Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support","maintainers":[{"name":"callmedayz","email":"gxdsins@gmail.com"}],"readme":"# AI Prompt Toolkit\n\n[![npm version](https://badge.fury.io/js/@callmedayz%2Fai-prompt-toolkit.svg)](https://badge.fury.io/js/@callmedayz%2Fai-prompt-toolkit)\n[![CI](https://github.com/callmedayz/ai-prompt-toolkit/workflows/CI/badge.svg)](https://github.com/callmedayz/ai-prompt-toolkit/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n\nA comprehensive TypeScript/JavaScript toolkit for AI prompt engineering, token counting, and text processing. Built specifically for OpenRouter API integration, providing access to multiple AI models including GPT, Claude, Llama, Gemini, and many free-tier models through a single unified interface.\n\n## Features\n\n### Core Features\n- 🎯 **Prompt Templating**: Dynamic prompt generation with variable substitution\n- 🔢 **Token Counting**: Accurate token estimation for OpenRouter-supported models\n- ✂️ **Text Chunking**: Smart text splitting for large documents\n- ✅ **Prompt Validation**: Quality checks and optimization suggestions\n- ⚡ **Prompt Optimization**: Automatic prompt compression and improvement\n- 🌐 **OpenRouter Integration**: Access to 100+ AI models through a single API\n- 🆓 **Free Tier Support**: Built-in support for free OpenRouter models\n\n### Advanced Features (v2.4.0)\n- 📊 **Prompt Versioning & A/B Testing**: Manage prompt versions and run statistical A/B tests\n- 📈 **Performance Analytics**: Real-time monitoring, insights, and trend analysis\n- 🤖 **Auto-Optimization**: AI-powered prompt improvement using OpenRouter models\n- 🖼️ **Multimodal Support**: Text + image prompts for vision-capable models\n\n### 🚀 NEW! Advanced Template Features (v2.5.0)\n- 🔀 **Conditional Logic**: If/else statements and branching in templates\n- 🔄 **Loop Processing**: Iterate over arrays with #each syntax\n- 🏗️ **Template Inheritance**: Base templates with child overrides and composition\n- 🎯 **Dynamic Composition**: Rule-based template selection based on context\n- ⚡ **Smart Functions**: Built-in and custom functions for template processing\n\n### 📊 NEW! Enhanced Analytics & Dashboards (v2.6.0)\n- 📈 **Real-time Dashboards**: Live performance monitoring with customizable widgets\n- 🔔 **Live Monitoring**: Event-driven updates with anomaly detection\n- 📋 **Custom Metrics**: Configurable KPIs and business intelligence\n- 🚨 **Alert System**: Threshold-based alerting with severity levels\n- 📤 **Dashboard Export**: Save and share dashboard configurations\n\n### ✅ **Fully Tested & Production Ready**\n- 🧪 **Comprehensive Testing**: 60+ test cases covering all features\n- 🌐 **Web Demo**: Interactive application demonstrating real-world usage\n- 🤖 **AI Validated**: Tested with Google Gemini 2.0 Flash and other models\n- 📊 **Performance Verified**: Real-time analytics and monitoring validated\n- 🐛 **Bug Tracked**: Professional bug tracking and resolution documentation\n\n## Installation\n\n```bash\nnpm install @callmedayz/ai-prompt-toolkit\n```\n\n## Setup\n\nTo use this toolkit, you'll need an OpenRouter API key:\n\n1. Sign up at [OpenRouter.ai](https://openrouter.ai/)\n2. Get your API key from the dashboard\n3. Set it as an environment variable:\n\n```bash\n# .env file\nOPENROUTER_API_KEY=your_api_key_here\n```\n\nOr pass it directly to the functions that need it.\n\n## Quick Start\n\n### Basic Usage (Offline)\n```typescript\nimport {\n  PromptTemplate,\n  estimateTokens,\n  validatePrompt,\n  chunkText\n} from '@callmedayz/ai-prompt-toolkit';\n\n// Create a prompt template\nconst template = new PromptTemplate({\n  template: 'Analyze the following {type}: {content}',\n  variables: { type: 'text' }\n});\n\nconst prompt = template.render({ content: 'Hello world!' });\nconsole.log(prompt); // \"Analyze the following text: Hello world!\"\n\n// Estimate tokens for OpenRouter models (offline estimation)\nconst tokenInfo = estimateTokens(prompt, 'openai/gpt-3.5-turbo');\nconsole.log(`Estimated tokens: ${tokenInfo.tokens}, Cost: $${tokenInfo.estimatedCost}`);\n\n// Validate prompt quality\nconst validation = validatePrompt(prompt);\nconsole.log(`Quality Score: ${validation.isValid ? 'Good' : 'Needs improvement'}`);\n```\n\n### Enhanced Prompt Engineering (v2.3.0+)\n```typescript\nimport {\n  ChainOfThoughtTemplate,\n  FewShotTemplate,\n  createChainOfThought,\n  createFewShot\n} from '@callmedayz/ai-prompt-toolkit';\n\n// Chain-of-Thought Reasoning\nconst problemSolver = ChainOfThoughtTemplate.createPattern('problem-solving');\nconst result = problemSolver.generate({ problem: 'Optimize database performance' });\nconsole.log(result.prompt);\n\n// Few-Shot Learning\nconst classifier = new FewShotTemplate({\n  task: 'Classify customer sentiment',\n  examples: [\n    { input: 'Love this product!', output: 'positive' },\n    { input: 'Terrible experience', output: 'negative' }\n  ]\n});\nconst classification = classifier.generate('This is okay');\n```\n\n### Real API Integration (v2.1.0+)\n```typescript\nimport {\n  OpenRouterClient,\n  OpenRouterCompletion,\n  TokenCounter,\n  getTokenCount\n} from '@callmedayz/ai-prompt-toolkit';\n\n// Initialize OpenRouter client\nconst client = OpenRouterClient.fromEnv(); // Uses OPENROUTER_API_KEY env var\n// or: const client = new OpenRouterClient({ apiKey: 'your-key' });\n\n// Set up real tokenization\nTokenCounter.setClient(client);\n\n// Get accurate token count using OpenRouter API\nconst realTokens = await getTokenCount('Your text here', 'openai/gpt-3.5-turbo');\nconsole.log(`Actual tokens: ${realTokens.tokens}`);\n\n// Generate real completions\nconst completion = new OpenRouterCompletion(client);\nconst result = await completion.complete('Write a haiku about AI', {\n  model: 'openai/gpt-3.5-turbo',\n  maxTokens: 100\n});\n\nconsole.log(`Response: ${result.text}`);\nconsole.log(`Tokens used: ${result.usage.totalTokens}`);\n```\n\n## API Reference\n\n### PromptTemplate\n\nCreate dynamic prompts with variable substitution.\n\n```typescript\nconst template = new PromptTemplate({\n  template: 'Hello {name}, you are {age} years old!',\n  variables: { name: 'World' },\n  escapeHtml: false,\n  preserveWhitespace: true\n});\n\n// Render with variables\nconst result = template.render({ age: 25 });\n\n// Get required variables\nconst vars = template.getVariables(); // ['name', 'age']\n\n// Validate variables\nconst validation = template.validate({ name: 'Alice', age: 30 });\n```\n\n### Chain-of-Thought Templates\n\nCreate structured prompts that guide AI models through step-by-step reasoning:\n\n```typescript\nimport { ChainOfThoughtTemplate, createChainOfThought } from '@callmedayz/ai-prompt-toolkit';\n\n// Use pre-built patterns\nconst problemSolver = ChainOfThoughtTemplate.createPattern('problem-solving');\nconst analysisChain = ChainOfThoughtTemplate.createPattern('analysis');\nconst decisionMaker = ChainOfThoughtTemplate.createPattern('decision-making');\nconst creativeChain = ChainOfThoughtTemplate.createPattern('creative');\n\n// Generate structured reasoning prompt\nconst result = problemSolver.generate({\n  problem: 'Optimize database query performance for high-traffic application'\n});\n\nconsole.log(`Steps: ${result.stepCount}, Complexity: ${result.complexity}`);\nconsole.log(result.prompt);\n\n// Create custom chain-of-thought\nconst customChain = new ChainOfThoughtTemplate({\n  problem: 'Design a scalable microservices architecture',\n  context: 'E-commerce platform with 1M+ users',\n  constraints: ['High availability', 'Cost-effective', 'Easy to maintain'],\n  steps: [\n    {\n      id: 'requirements',\n      title: 'Requirements Analysis',\n      instruction: 'Identify functional and non-functional requirements',\n      reasoning: 'Clear requirements guide architectural decisions'\n    },\n    {\n      id: 'design',\n      title: 'Architecture Design',\n      instruction: 'Design service boundaries and communication patterns'\n    }\n  ],\n  reasoningStyle: 'detailed'\n});\n\n// Quick chain creation\nconst quickChain = createChainOfThought(\n  'Implement CI/CD pipeline',\n  ['Plan pipeline stages', 'Configure tools', 'Test and deploy'],\n  { reasoningStyle: 'step-by-step' }\n);\n```\n\n### Few-Shot Learning Templates\n\nEnable AI models to learn from examples and apply patterns to new inputs:\n\n```typescript\nimport { FewShotTemplate, createFewShot, createExamplesFromData } from '@callmedayz/ai-prompt-toolkit';\n\n// Create classification template\nconst sentimentClassifier = new FewShotTemplate({\n  task: 'Classify customer review sentiment',\n  instructions: 'Analyze the sentiment as positive, negative, or neutral',\n  examples: [\n    {\n      input: 'This product exceeded my expectations! Amazing quality.',\n      output: 'positive',\n      explanation: 'Enthusiastic language and positive descriptors'\n    },\n    {\n      input: 'Terrible customer service, very disappointed.',\n      output: 'negative',\n      explanation: 'Clear negative sentiment and dissatisfaction'\n    },\n    {\n      input: 'The product works as described, nothing special.',\n      output: 'neutral',\n      explanation: 'Factual statement without strong emotional indicators'\n    }\n  ]\n});\n\nconst result = sentimentClassifier.generate('The delivery was fast but packaging was damaged');\nconsole.log(result.prompt);\n\n// Use pre-built patterns\nconst dataExtractor = FewShotTemplate.createPattern('extraction', 'contact information');\nconst codeGenerator = FewShotTemplate.createPattern('generation', 'SQL queries');\nconst documentClassifier = FewShotTemplate.createPattern('classification', 'document types');\n\n// Quick few-shot creation\nconst quickClassifier = createFewShot(\n  'Categorize support tickets',\n  [\n    { input: 'Login not working', output: 'technical' },\n    { input: 'Billing question', output: 'financial' },\n    { input: 'Feature request', output: 'product' }\n  ],\n  'Password reset email not received',\n  { instructions: 'Categorize based on the type of issue' }\n);\n\n// Create examples from dataset\nconst trainingData = [\n  { input: { age: 25, purchases: 12 }, output: 'regular' },\n  { input: { age: 45, purchases: 50 }, output: 'premium' }\n];\nconst examples = createExamplesFromData(trainingData, 5);\n```\n\n### Token Counting\n\n#### Offline Estimation\n```typescript\nimport { TokenCounter, estimateTokens } from '@callmedayz/ai-prompt-toolkit';\n\n// Quick estimation (offline)\nconst result = estimateTokens('Your text here', 'tencent/hunyuan-a13b-instruct:free');\nconsole.log(result.tokens, result.estimatedCost);\n\n// Check if text fits in model\nconst fits = TokenCounter.fitsInModel('Your text', 'tencent/hunyuan-a13b-instruct:free');\n```\n\n#### Real API Token Counting (v2.1.0+)\n```typescript\nimport { OpenRouterClient, TokenCounter, getTokenCount } from '@callmedayz/ai-prompt-toolkit';\n\n// Set up real API tokenization\nconst client = OpenRouterClient.fromEnv();\nTokenCounter.setClient(client);\n\n// Get accurate token count from OpenRouter\nconst realCount = await getTokenCount('Your text here', 'openai/gpt-4');\nconsole.log(`Actual tokens: ${realCount.tokens}`);\n\n// Automatically falls back to estimation if API fails\nconst safeCount = await getTokenCount('Text', 'anthropic/claude-3-sonnet');\n```\n\n// Get model recommendation\nconst recommendation = TokenCounter.recommendModel('Very long text...');\nconsole.log(recommendation.model, recommendation.reason);\n```\n\n### Text Chunking\n\nSplit large texts into manageable chunks.\n\n```typescript\nimport { TextChunker, chunkText } from '@callmedayz/ai-prompt-toolkit';\n\n// Basic chunking\nconst chunks = chunkText('Long text...', {\n  maxTokens: 1000,\n  overlap: 50,\n  preserveWords: true,\n  preserveSentences: true\n});\n\n// Model-specific chunking\nconst modelChunks = TextChunker.chunkForModel(\n  'Very long document...', \n  'gpt-3.5-turbo',\n  10 // 10% overlap\n);\n\n// Get chunk statistics\nconst stats = TextChunker.getChunkStats(chunks);\n```\n\n### Prompt Validation\n\nValidate and improve prompt quality.\n\n```typescript\nimport { PromptValidator, validatePrompt } from '@callmedayz/ai-prompt-toolkit';\n\nconst validation = validatePrompt('Your prompt here', 'gpt-4');\n\nconsole.log(validation.isValid);\nconsole.log(validation.errors);\nconsole.log(validation.warnings);\nconsole.log(validation.suggestions);\n\n// Get quality score (0-100)\nconst score = PromptValidator.getQualityScore('Your prompt');\n```\n\n### Prompt Optimization\n\nOptimize prompts to reduce token usage.\n\n```typescript\nimport { PromptOptimizer, optimizePrompt } from '@callmedayz/ai-prompt-toolkit';\n\nconst result = optimizePrompt('Please kindly analyze this data carefully');\n\nconsole.log(result.originalPrompt);\nconsole.log(result.optimizedPrompt);\nconsole.log(result.tokensSaved);\nconsole.log(result.optimizations);\n\n// Optimize to specific token target\nconst targeted = PromptOptimizer.optimizeToTarget(\n  'Long prompt...', \n  100, // target tokens\n  'gpt-3.5-turbo'\n);\n```\n\n### OpenRouter Completion API (v2.1.0+)\n\nGenerate real AI responses using OpenRouter's API.\n\n```typescript\nimport { OpenRouterClient, OpenRouterCompletion } from '@callmedayz/ai-prompt-toolkit';\n\n// Initialize completion service\nconst client = OpenRouterClient.fromEnv();\nconst completion = new OpenRouterCompletion(client);\n\n// Simple completion\nconst result = await completion.complete('Write a haiku about programming', {\n  model: 'openai/gpt-3.5-turbo',\n  maxTokens: 100,\n  temperature: 0.7\n});\n\nconsole.log(result.text);\nconsole.log(`Used ${result.usage.totalTokens} tokens`);\n\n// Chat-style completion\nconst chatResult = await completion.chat([\n  { role: 'system', content: 'You are a helpful coding assistant.' },\n  { role: 'user', content: 'Explain async/await in JavaScript' }\n], { model: 'anthropic/claude-3-haiku' });\n\n// Test prompt against a model\nconst validation = await completion.validatePrompt(\n  'What is 2+2?',\n  'openai/gpt-3.5-turbo'\n);\n\nif (validation.isValid) {\n  console.log('Prompt works!', validation.result?.text);\n} else {\n  console.log('Prompt failed:', validation.error);\n}\n```\n\n### Streaming Responses (v2.1.0+)\n\nGet real-time streaming responses from AI models.\n\n```typescript\nimport { OpenRouterCompletion, StreamingCallback } from '@callmedayz/ai-prompt-toolkit';\n\nconst completion = OpenRouterCompletion.fromEnv();\n\n// Stream with callback\nconst streamCallback: StreamingCallback = (chunk) => {\n  if (chunk.isComplete) {\n    console.log('\\n✅ Stream completed!');\n  } else {\n    process.stdout.write(chunk.content);\n  }\n};\n\nawait completion.completeStream('Write a story about AI', streamCallback, {\n  model: 'openai/gpt-3.5-turbo',\n  maxTokens: 200\n});\n\n// Collect streaming results\nconst collected = await completion.completeStreamCollected('Explain quantum computing');\nconsole.log('Full response:', collected.text);\nconsole.log('Received in chunks:', collected.chunks.length);\n```\n\n### Enhanced Error Handling (v2.1.0+)\n\nRobust error handling with retry logic and circuit breakers.\n\n```typescript\nimport {\n  OpenRouterClient,\n  OpenRouterError,\n  ErrorType,\n  CircuitBreaker\n} from '@callmedayz/ai-prompt-toolkit';\n\n// Custom retry configuration\nconst client = new OpenRouterClient(\n  { apiKey: 'your-key' },\n  {\n    maxRetries: 5,\n    baseDelay: 1000,\n    maxDelay: 30000,\n    exponentialBase: 2,\n    jitter: true,\n    retryableErrors: [ErrorType.NETWORK, ErrorType.RATE_LIMIT]\n  }\n);\n\ntry {\n  const result = await client.completion(request);\n} catch (error) {\n  if (error instanceof OpenRouterError) {\n    console.log(`Error type: ${error.type}`);\n    console.log(`Retryable: ${error.retryable}`);\n    console.log(`Retry after: ${error.retryAfter}ms`);\n  }\n}\n\n// Circuit breaker status\nconsole.log('Circuit breaker:', client.getCircuitBreakerStatus());\n```\n\n### Rate Limiting & Quota Management (v2.1.0+)\n\nControl API usage and costs with built-in rate limiting and quotas.\n\n```typescript\nimport {\n  OpenRouterClient,\n  RateLimitConfig,\n  QuotaConfig\n} from '@callmedayz/ai-prompt-toolkit';\n\n// Configure rate limits\nconst rateLimitConfig: RateLimitConfig = {\n  requestsPerMinute: 60,\n  requestsPerHour: 1000,\n  requestsPerDay: 10000,\n  tokensPerMinute: 10000,\n  costPerMinute: 1.0\n};\n\n// Configure quotas\nconst quotaConfig: QuotaConfig = {\n  dailyBudget: 10.0,\n  monthlyBudget: 200.0,\n  alertThresholds: [50, 80, 95],\n  autoStop: true\n};\n\nconst client = OpenRouterClient.fromEnv(\n  undefined, // API config\n  undefined, // Retry config\n  rateLimitConfig,\n  quotaConfig\n);\n\n// Monitor usage\nconsole.log('Rate limit status:', client.getRateLimitStatus());\nconsole.log('Quota status:', client.getQuotaStatus());\nconsole.log('Quota alerts:', client.getQuotaAlerts());\n```\n\n## Supported Models (via OpenRouter)\n\n### Free Tier Models\n- **OpenAI GPT-3.5-turbo**: `openai/gpt-3.5-turbo`\n- **Meta Llama 3.1 8B**: `meta-llama/llama-3.1-8b-instruct:free`\n- **Google Gemma 2 9B**: `google/gemma-2-9b-it:free`\n- **Microsoft Phi-3**: `microsoft/phi-3-medium-128k-instruct:free`\n- **Mistral 7B**: `mistralai/mistral-7b-instruct:free`\n\n### Premium Models\n- **GPT-4**: `openai/gpt-4`\n- **GPT-4 Turbo**: `openai/gpt-4-turbo`\n- **Claude-3.5 Sonnet**: `anthropic/claude-3.5-sonnet`\n- **Claude-3 Opus**: `anthropic/claude-3-opus`\n- **Gemini Pro**: `google/gemini-pro`\n\n*See [OpenRouter Models](https://openrouter.ai/models) for the complete list*\n\n## Model Management Scripts\n\nThis toolkit includes scripts to keep OpenRouter model data up-to-date:\n\n### Fetch Latest Models\n```bash\nnpm run fetch-models\n```\nFetches the latest model list from OpenRouter API and saves to `data/` directory.\n\n### Generate Model Configurations\n```bash\nnpm run generate-config\n```\nGenerates TypeScript types and configurations from fetched model data.\n\n### Update Everything\n```bash\nnpm run update-models\n```\nRuns both scripts above and rebuilds the package.\n\n## Utility Functions\n\n```typescript\nimport { \n  analyzePrompt,\n  fitsInModel,\n  recommendModel,\n  calculateCost,\n  getPromptQuality\n} from '@callmedayz/ai-prompt-toolkit';\n\n// Comprehensive prompt analysis\nconst analysis = analyzePrompt('Your prompt', 'gpt-4');\nconsole.log(analysis.tokens, analysis.validation, analysis.quality);\n\n// Quick utilities\nconst fits = fitsInModel('Text', 'gpt-3.5-turbo');\nconst rec = recommendModel('Long text');\nconst cost = calculateCost('Text', 'gpt-4');\nconst quality = getPromptQuality('Your prompt');\n```\n\n## Advanced Features (v2.4.0)\n\n### Prompt Versioning and A/B Testing\n\n```typescript\nimport { PromptVersionManager, createQuickABTest } from '@callmedayz/ai-prompt-toolkit';\n\n// Create version manager\nconst manager = new PromptVersionManager();\n\n// Create prompt versions\nconst v1 = manager.createVersion('customer-support', 'Help the customer: {issue}');\nconst v2 = manager.createVersion('customer-support', 'As a helpful assistant, please address: {issue}');\n\n// Quick A/B test setup\nconst { manager: testManager, testConfig } = createQuickABTest(\n  'support-test',\n  'Template A: {input}',\n  'Template B: {input}',\n  { input: 'test' }\n);\n\n// Start A/B test\nconst testResult = await manager.startABTest({\n  name: 'Support Prompt Test',\n  variants: [v1, v2],\n  trafficSplit: [50, 50],\n  successCriteria: [\n    { metric: 'success_rate', target: 90, operator: 'greater_than' }\n  ]\n});\n```\n\n### Performance Analytics\n\n```typescript\nimport { PromptAnalytics } from '@callmedayz/ai-prompt-toolkit';\n\n// Initialize analytics\nconst analytics = new PromptAnalytics({\n  enableRealTimeMonitoring: true,\n  alertThresholds: {\n    successRate: { warning: 85, critical: 70 },\n    responseTime: { warning: 3000, critical: 5000 }\n  }\n});\n\n// Record test execution\nanalytics.recordExecution(execution, 'openai/gpt-4.5-preview');\n\n// Generate insights\nconst insights = analytics.generateInsights(promptVersionId);\nconsole.log('Performance insights:', insights);\n\n// Get aggregated metrics\nconst dailyMetrics = analytics.generateAggregation(promptVersionId, 'day');\n```\n\n### Auto-Prompt Optimization\n\n```typescript\nimport { AutoPromptOptimizer } from '@callmedayz/ai-prompt-toolkit';\n\n// Initialize optimizer\nconst optimizer = new AutoPromptOptimizer(versionManager, analytics, {\n  optimizationModel: 'openai/gpt-4.5-preview',\n  targetMetrics: {\n    successRate: { target: 95, weight: 0.4 },\n    responseTime: { target: 2000, weight: 0.3 }\n  }\n});\n\n// Get optimization recommendations\nconst recommendations = await optimizer.analyzeForOptimization(promptVersionId);\n\n// Apply AI-powered optimization\nconst optimizationResult = await optimizer.optimizePrompt(\n  promptVersionId,\n  'conciseness_optimization'\n);\n```\n\n### Multimodal Prompts\n\n```typescript\nimport { MultimodalPromptTemplate, createImageInput } from '@callmedayz/ai-prompt-toolkit';\n\n// Create image inputs\nconst productImage = await createImageInput(\n  'https://example.com/product.jpg',\n  'Product photo'\n);\n\n// Create multimodal prompt\nconst multimodalPrompt = new MultimodalPromptTemplate({\n  template: 'Analyze this product image and provide insights: {analysis_focus}',\n  variables: { analysis_focus: 'market positioning' },\n  imageVariables: { product: [productImage] },\n  maxImages: 5\n});\n\n// Render prompt with images\nconst result = multimodalPrompt.render();\nconsole.log('Text:', result.text);\nconsole.log('Images:', result.images.length);\nconsole.log('Supported models:', result.metadata.supportedModels);\n```\n\n### 🚀 NEW! Advanced Template Features (v2.5.0)\n\n```typescript\nimport { AdvancedPromptTemplate, TemplateComposer, TemplateInheritanceManager } from '@callmedayz/ai-prompt-toolkit';\n\n// Advanced templates with conditional logic and loops\nconst advancedTemplate = new AdvancedPromptTemplate({\n  template: `\nYou are a {{#if user_level == \"expert\"}}senior{{#else}}helpful{{/if}} AI assistant.\n\n{{#if task_complexity > 5}}\nThis is a complex task. Please break it down:\n{{#each steps as step}}\n{step_index}. {{capitalize(step)}}\n{{/each}}\n{{#else}}\nThis is a straightforward task.\n{{/if}}\n\n{{#if length(examples) > 0}}\nExamples: {{join(examples, \", \")}}\n{{/if}}\n  `,\n  variables: {\n    user_level: 'expert',\n    task_complexity: 7,\n    steps: ['analyze requirements', 'design solution', 'implement'],\n    examples: ['example 1', 'example 2']\n  }\n});\n\nconst result = advancedTemplate.render();\nconsole.log(result);\n\n// Dynamic template composition\nconst composer = new TemplateComposer();\n\ncomposer.registerTemplate('simple', new AdvancedPromptTemplate({\n  template: 'Simple task: {task}'\n}));\n\ncomposer.registerTemplate('complex', new AdvancedPromptTemplate({\n  template: 'Complex analysis required for: {task}'\n}));\n\n// Add composition rules\ncomposer.addCompositionRule({\n  name: 'complexity_rule',\n  conditions: [{ field: 'complexity', operator: 'greater_than', value: 5 }],\n  templatePattern: 'complex',\n  priority: 10\n});\n\nconst composedResult = composer.compose({\n  complexity: 8,\n  task: 'Market analysis'\n});\n\nconsole.log('Selected template:', composedResult.templateName);\nconsole.log('Generated prompt:', composedResult.prompt);\n```\n\n### 📊 NEW! Real-time Analytics & Dashboards (v2.6.0)\n\n```typescript\nimport { EnhancedAnalytics, RealTimeDashboard } from '@callmedayz/ai-prompt-toolkit';\n\n// Initialize enhanced analytics with real-time monitoring\nconst analytics = new EnhancedAnalytics({\n  enableRealTimeMonitoring: true,\n  alertThresholds: {\n    successRate: { warning: 90, critical: 80 },\n    responseTime: { warning: 2000, critical: 5000 }\n  }\n});\n\n// Enable real-time monitoring\nanalytics.enableRealTimeMonitoring();\n\n// Get dashboard instance\nconst dashboard = analytics.getDashboard();\n\n// Create custom dashboard layout\nconst layoutId = dashboard.createLayout({\n  name: 'AI Performance Monitor',\n  autoRefresh: true,\n  refreshInterval: 15,\n  widgets: [\n    {\n      id: 'success_rate',\n      type: 'metric',\n      title: 'Success Rate',\n      position: { x: 0, y: 0, width: 3, height: 2 },\n      config: { metric: 'successRate', format: 'percentage' }\n    },\n    {\n      id: 'response_time',\n      type: 'metric',\n      title: 'Response Time',\n      position: { x: 3, y: 0, width: 3, height: 2 },\n      config: { metric: 'averageResponseTime', format: 'duration' }\n    }\n  ]\n});\n\n// Subscribe to real-time updates\ndashboard.subscribe('metric:success_rate', (metric) => {\n  console.log(`Success Rate: ${metric.value.toFixed(1)}% (${metric.trend})`);\n});\n\ndashboard.subscribe('alerts', (alert) => {\n  console.log(`🚨 ALERT: ${alert.title}`);\n});\n\n// Record executions (triggers real-time updates)\nanalytics.recordExecution({\n  id: 'exec_1',\n  promptVersionId: 'prompt_v1',\n  responseTime: 1500,\n  success: true,\n  cost: 0.005,\n  timestamp: new Date()\n}, 'openai/gpt-3.5-turbo');\n\n// Get real-time metrics\nconst metrics = analytics.getRealTimeMetrics();\nconsole.log('Current metrics:', metrics);\n\n// Export dashboard configuration\nconst config = dashboard.exportDashboard();\nconsole.log('Dashboard exported:', config.length, 'bytes');\n```\n\n## 🌐 Web Demo Application\n\nExperience all v2.6.0 features in an interactive web interface:\n\n**Location**: `web-app-demo/` directory (included in repository)\n\n### Features Demonstrated\n- **Advanced Template Builder**: Create templates with conditionals, loops, and functions\n- **Smart Template Composition**: Automatic template selection based on context\n- **Real-time Analytics Dashboard**: Live performance monitoring and metrics\n- **AI Integration**: Google Gemini 2.0 Flash completions with tracking\n- **Interactive UI**: Professional web interface with Bootstrap 5\n\n### Quick Start\n```bash\ngit clone https://github.com/callmedayz/ai-prompt-toolkit.git\ncd ai-prompt-toolkit/web-app-demo\ncp .env.example .env\n# Add your OpenRouter API key to .env\nnpm install\nnpm start\n# Visit http://localhost:3000\n```\n\n**Note**: The web demo uses the published `@callmedayz/ai-prompt-toolkit@2.6.1` package and demonstrates real-world usage patterns. Get a free API key at [OpenRouter.ai](https://openrouter.ai).\n\n## Examples\n\nSee the `/examples` directory for complete usage examples:\n\n- Basic prompt templating and token counting\n- Advanced template features with conditionals and loops\n- Real-time dashboard monitoring\n- Prompt versioning and A/B testing\n- Performance analytics and optimization\n- Multimodal prompts with images\n- Multi-model workflows with OpenRouter\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines and submit pull requests.\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Support\n\n- 📖 [Documentation](https://github.com/callmedayz/ai-prompt-toolkit#readme)\n- 🐛 [Issues](https://github.com/callmedayz/ai-prompt-toolkit/issues)\n- 💬 [Discussions](https://github.com/callmedayz/ai-prompt-toolkit/discussions)\n","readmeFilename":"README.md"}