{"_id":"@careerstudiomax/cstm2","_rev":"3-cb1bc970b88eba50cc17adeb6b7b1760","name":"@careerstudiomax/cstm2","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@careerstudiomax/cstm2","version":"1.0.0","keywords":["careerstudiomax","cstm2","career-ai","sdk"],"license":"MIT","_id":"@careerstudiomax/cstm2@1.0.0","maintainers":[{"name":"johnkayking","email":"johnkayking@gmail.com"}],"homepage":"https://careerstudiomax.com/developer","bugs":{"url":"https://github.com/owolat4real/career-studio/issues"},"dist":{"shasum":"e6edbf74e0686368920e5261e55b70f95d8fea07","tarball":"https://registry.npmjs.org/@careerstudiomax/cstm2/-/cstm2-1.0.0.tgz","fileCount":4,"integrity":"sha512-XkEFaM5mZD/U0HNFmGGp4OK2vemS+1ccZ+5r/YLdroQiSXkfg5yPPT5zV5GZEAQEsk7d5nxpbfjhRVH9+F966Q==","signatures":[{"sig":"MEUCIQDSUf8IkbjSubYfXHCXC4TFpXK37nM8YjpeFsqhLEPV6QIgRpmpIVVrslGH17SC0XIM7lx3XTP4bPkBdz9uIv0OUTU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13174},"main":"cstm2.js","types":"cstm2.d.ts","engines":{"node":">=18"},"gitHead":"e814212d3a7be782de1ad46166abb6ddcf65cbba","_npmUser":{"name":"johnkayking","email":"johnkayking@gmail.com"},"repository":{"url":"git+https://github.com/owolat4real/career-studio.git","type":"git"},"_npmVersion":"10.4.0","description":"Official JavaScript/TypeScript SDK for the CSTM-2 CareerStudioMax Model API","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cstm2_1.0.0_1784798585639_0.025795369662368506","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@careerstudiomax/cstm2","version":"1.0.1","keywords":["careerstudiomax","cstm2","career-ai","sdk"],"license":"MIT","_id":"@careerstudiomax/cstm2@1.0.1","maintainers":[{"name":"johnkayking","email":"johnkayking@gmail.com"}],"homepage":"https://careerstudiomax.com/developer","bugs":{"url":"https://github.com/owolat4real/career-studio/issues"},"dist":{"shasum":"f17935c4e117558d78666af845c36cedaa455111","tarball":"https://registry.npmjs.org/@careerstudiomax/cstm2/-/cstm2-1.0.1.tgz","fileCount":4,"integrity":"sha512-lEvu+Xu7/AEUG0+PKu5z7ei+GukR6U8oALkE5TgBQChoD6KO1DdfDJHAK1hF55WNMz3gzVNXqYoT7p4rX1rVcg==","signatures":[{"sig":"MEQCIHOFXK7Ms1s79hF4Hc4H/Qkv/gXn6U4P04onOrxecotfAiBcSFrO3ar/fbED1Dvt00uCbsPPNeSCQj7zSLHXbZwR3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16018},"main":"cstm2.js","types":"cstm2.d.ts","engines":{"node":">=18"},"gitHead":"20b2fbb4355be9a5d930ee762d923248ac92aff1","scripts":{"test":"node verify-readme.js","prepublishOnly":"node verify-readme.js"},"_npmUser":{"name":"johnkayking","email":"johnkayking@gmail.com"},"repository":{"url":"git+https://github.com/owolat4real/career-studio.git","type":"git"},"_npmVersion":"10.4.0","description":"Official JavaScript/TypeScript SDK for the CSTM-2 CareerStudioMax Model API","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cstm2_1.0.1_1785674305325_0.9495793949221798","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@careerstudiomax/cstm2","version":"1.0.2","description":"Official JavaScript/TypeScript SDK for the CSTM-2 CareerStudioMax Model API","main":"cstm2.js","types":"cstm2.d.ts","scripts":{"test":"node verify-readme.js","prepublishOnly":"node verify-readme.js"},"engines":{"node":">=18"},"keywords":["careerstudiomax","cstm2","career-ai","sdk"],"author":{"name":"CloudooAI Solution"},"license":"MIT","homepage":"https://careerstudiomax.com/developer","repository":{"type":"git","url":"git+https://github.com/owolat4real/career-studio.git"},"_id":"@careerstudiomax/cstm2@1.0.2","gitHead":"278c522ed9dfcb7bae979dda2e83f9357778b30f","bugs":{"url":"https://github.com/owolat4real/career-studio/issues"},"_nodeVersion":"24.14.1","_npmVersion":"10.4.0","dist":{"integrity":"sha512-xfKS/uttkEZntwLWGxjBUdqtdsgqKrxVY6vXsYqBO4AEI85LXxza/zAROcKbYu9KFNElLCqg5zCainKsdGKWFg==","shasum":"d60165a206233873d965e36ee63996a66f712efc","tarball":"https://registry.npmjs.org/@careerstudiomax/cstm2/-/cstm2-1.0.2.tgz","fileCount":4,"unpackedSize":16104,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAwoC8ha+98veWA2WWUbpxm3oPhyD/xD5xiriQ1f6CjNAiEAtaCFjNdigHpA0f0/By4J84qeEmeN+5a3b0qhFNxI0No="}]},"_npmUser":{"name":"johnkayking","email":"johnkayking@gmail.com"},"directories":{},"maintainers":[{"name":"johnkayking","email":"johnkayking@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cstm2_1.0.2_1787196808245_0.7063752180610974"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-23T09:23:05.425Z","modified":"2026-08-20T03:33:28.573Z","1.0.0":"2026-07-23T09:23:05.794Z","1.0.1":"2026-08-02T12:38:25.477Z","1.0.2":"2026-08-20T03:33:28.378Z"},"bugs":{"url":"https://github.com/owolat4real/career-studio/issues"},"license":"MIT","homepage":"https://careerstudiomax.com/developer","keywords":["careerstudiomax","cstm2","career-ai","sdk"],"repository":{"type":"git","url":"git+https://github.com/owolat4real/career-studio.git"},"description":"Official JavaScript/TypeScript SDK for the CSTM-2 CareerStudioMax Model API","maintainers":[{"name":"johnkayking","email":"johnkayking@gmail.com"}],"readme":"# CSTM-2 JavaScript / TypeScript SDK\n\nOfficial client for the [CareerStudioMax CSTM-2 API](https://careerstudiomax.com/developer) — 8 independent, career-native model families.\n\n## Install\n\n```bash\nnpm install @careerstudiomax/cstm2\n```\n\n## Quickstart\n\n```js\nconst { CSTM2Client } = require('@careerstudiomax/cstm2');\n// or: import { CSTM2Client } from '@careerstudiomax/cstm2';\n\nconst client = new CSTM2Client('cstm_lm_your_key_here');\n\nconst { choices } = await client.careerlm.chat({\n  messages: [{ role: 'user', content: 'Write a cover letter opener for a Senior PM role' }],\n});\nconsole.log(choices[0].message.content);\n```\n\n## Streaming\n\n`chatStream` is a sibling of `chat`, not nested under it:\n\n```js\nawait client.careerlm.chatStream(\n  { messages: [{ role: 'user', content: 'Draft a resignation letter' }] },\n  (event) => process.stdout.write(event.text || ''),\n);\n```\n\nEvery other streaming family follows the same shape — `careeragent.runStream`,\n`careeragent.jobSearchStream`, and `careerwebapi.searchStream` all take\n`(request, onEvent)` and resolve once the stream closes:\n\n```js\nawait client.careeragent.runStream(\n  { task: 'Find 5 remote senior PM roles at Series B startups' },\n  (event) => { if (event.type === 'text') process.stdout.write(event.text); },\n);\n```\n\n## Generate career documents\n\n`careerlm.generate` was previously broken — the backend endpoint is\nSSE-only, but this method called it as a plain JSON request and threw a\nparse error on every real call. Fixed: it now streams internally and\nresolves with the full assembled text once done (pass a second `onEvent`\nargument for live token-by-token updates, exactly like `chatStream`):\n\n```js\nconst { text } = await client.careerlm.generate({\n  type: 'cover-letter', // or 'cv-summary' | 'linkedin-about' | 'exec-bio'\n  role: 'Senior Product Manager',\n  company: 'Acme Inc',\n  country: 'UK',\n});\nconsole.log(text);\n```\n\n## Each model family needs its own key\n\nA `cstm_lm_*` key only works on `careerlm` endpoints; a `cstm_em_*` key only works on `careerembed`, and so on. Generate one key per family you use at [careerstudiomax.com/developer](https://careerstudiomax.com/developer).\n\n| Family | Client namespace | Key prefix |\n|---|---|---|\n| CareerLM | `client.careerlm` | `cstm_lm_` |\n| CareerEmbed | `client.careerembed` | `cstm_em_` |\n| CareerScore | `client.careerscore` | `cstm_sc_` |\n| CareerAgent | `client.careeragent` | `cstm_ag_` |\n| CareerVoice | `client.careervoice` | `cstm_vc_` |\n| CareerVision | `client.careervision` | `cstm_vi_` |\n| CareerVideo | `client.careervideo` | `cstm_vd_` |\n| CareerWebAPI | `client.careerwebapi` | `cstm_wb_` |\n\n## Errors\n\nAll errors throw `CSTM2Error` (`message`, `code`, `status`).\n\n```js\nconst { CSTM2Client, CSTM2Error } = require('@careerstudiomax/cstm2');\ntry {\n  await client.careerembed.embed('some text');\n} catch (e) {\n  if (e instanceof CSTM2Error) console.error(e.code, e.status, e.message);\n}\n```\n\nFull endpoint reference: [careerstudiomax.com/developer](https://careerstudiomax.com/developer)\n","readmeFilename":"README.md","author":{"name":"CloudooAI Solution"}}