{"_id":"@superdoc-dev/ai","_rev":"27-1910e096f907e035d47a7924901e90df","name":"@superdoc-dev/ai","dist-tags":{"next":"0.1.8-next.6","latest":"0.1.6"},"versions":{"0.1.2":{"name":"@superdoc-dev/ai","version":"0.1.2","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.2","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"689018164f2cc50ed2e1a3d7df1f1a96cc778662","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.2.tgz","fileCount":20,"integrity":"sha512-FhIzh5el2SMEWXpf1mOh3ad5UBji1YiD9at/2tcbzV32LhMG+yL5jzWKZ0qreXQDIggpdrhx7WIwFR+qZ7T1tg==","signatures":[{"sig":"MEQCIAgWQHF6OkKYedATSD7f/2egtS+x57StSH4WP0YY+s6pAiAX5BvutBcNEa05r0FOkIo1lFtACuW4WLYDo/GWFi9NmQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":102517},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"f72ebbb20422f8da9ebfc8b529c1f4a954dd2e14","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.28.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.2_1762979811841_0.01889512753537237","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@superdoc-dev/ai","version":"0.1.3","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.3","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"9548fb75a1b22631bf1271a6c3565a8703219778","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.3.tgz","fileCount":18,"integrity":"sha512-W6XIJ9knvo+KZ4HvD4H6OqsJYoFZESBk4llJVIuXPAtFDZYrv8HcEtGhYJ9DBBA4V2ZScUXdZdkx+WZ3PzcZgw==","signatures":[{"sig":"MEYCIQDy6WK4Gw+yr96ti6YxWKpktNtY5KoCsHMu00JsdnQpogIhAMqX8yVr90ZZf/fqDN0v4ueYgLVHa9NGqyrT6Zj4SkmU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88646},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"f56ef770b19ff2a2e625bd5ebb7001f1c68d68aa","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.28.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.3_1763037227713_0.11170155034826568","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@superdoc-dev/ai","version":"0.1.4","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.4","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"1d82c1d3b7a0982718a7a5895b64bb89851775b1","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.4.tgz","fileCount":18,"integrity":"sha512-FKJpHj9tBVLbyXIfu4x0cEq5KWSTyS8fd1WlySLxuJcVI3iUyFAoaWAwMSfqVII/iPsY++QV1DOkoMev/WkFOA==","signatures":[{"sig":"MEYCIQCjmhy4BWfEt3q18S/HIA5wk/eYMoD3BzDghtXN84SGXQIhANEOlHT+kFp8ak1FXdBwKyW6h8dSeKYD8qno77jYMmT9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105014},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"202a1d5236e44746448a2350f506b5437af3cda3","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"harbournick","email":"nick@superdoc.dev"},"_npmVersion":"11.4.2","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.28.0","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.4_1763502248272_0.8864243480958505","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@superdoc-dev/ai","version":"0.1.5","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.5","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"08bd71e5479bb9a7c7a58c656882e94252734f1b","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.5.tgz","fileCount":18,"integrity":"sha512-sHzvGbSlC6z3PSYgkrRe8nWebDKx0Gkv7+LcnmPDP3QIi8c2i3aAkJ38nXHvaHKPHpcJyoHBIBO9BoI+CuVMrw==","signatures":[{"sig":"MEYCIQDpN7Woss2SPhGTrDnNkaUNsoSGjA4cDeApLvbFjFjCggIhAP4NvXFtGlHhT6pOnbyqWpWW8vzJ3Avb0ICYj3wNJQGJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106368},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"29703eb6940cf54626dc9d7c645b88ea30f6c94f","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.28.0","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.5_1763506491255_0.5607150599326276","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next":{"name":"@superdoc-dev/ai","version":"0.1.6-next","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"1c8aadd6e8564a69175a82ff3c600f5b532c3456","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.tgz","fileCount":4,"integrity":"sha512-tmLj09T2445MRnQB9GBxDCOcPPJbeR8a5fXOgC1kp0giE319TrGK6vj0YYgyd5JouzUoHIMlivceHe9goKbYGg==","signatures":[{"sig":"MEQCICXCOAlg6A2mE9ScA+5MVwKd6bppxTAKOcY+TUIKtIyeAiB5PU4P+p3S4QrolNPxMZQapaEqulEmkUn/i6V5n0q/UQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61237},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"25a6611475fd0edb63a14eec8d3fb3708f808431","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.31.2","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next_1763984601283_0.4537802946542786","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.1":{"name":"@superdoc-dev/ai","version":"0.1.6-next.1","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.1","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"493d76a0e90b1b0e18dfb8e5380f0290742b501e","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.1.tgz","fileCount":4,"integrity":"sha512-fBstVRnK1lofcPj6IYgYBy4d/2qZ4/PdG659N0d8u8Igv7LeweYxhOuy6IeRwziyo4WRjl1hrjVmezvGUq3rTg==","signatures":[{"sig":"MEUCIQD3pk7vs58zSB64zwzewNcsOurvPfOZSVQVnZ9pzIjFAAIgd8lMBg8mXrVVQmXGxbi7tKnw20Bm+ww1GBpywun8WHI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62287},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"d9777953503d12609abbd73945aa697cbdae77a6","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.31.2","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.1_1764008049016_0.3241374317709993","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.2":{"name":"@superdoc-dev/ai","version":"0.1.6-next.2","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.2","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"2cce571281472168bf702ba0784d402f5b197b65","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.2.tgz","fileCount":20,"integrity":"sha512-1ga60tbHdW8N24KtS2yQlPI/rXyivQUorN57gywW3aOAylEX6TpY393GH3tVv6RRpB2e0n22RqBjeujEzh99/g==","signatures":[{"sig":"MEUCIQDQ7XiN7asfPpKbqPwWZVVSUn3/izI4CzSc+3AYqAs0WwIgIlb47vH7e1oLDgOGzU3Km1lZTDUBpwgjHRN8TESVRow=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126111},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"aed988d1ab28f0ba773fa3df38e44d4b328e3b16","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.31.2","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.2_1764081506044_0.5098511205722915","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.3":{"name":"@superdoc-dev/ai","version":"0.1.6-next.3","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.3","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"04881d64571de5fea2045a7cf6ef09fd386309bd","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.3.tgz","fileCount":20,"integrity":"sha512-emfBAKT88a6JLZVFOyT4/WVNp/mb6K205d+/OnXIOf5wU44S2vJjqbzKOxj2c8cxgJ47DaFs0+XzwzsRCwOIvA==","signatures":[{"sig":"MEQCIGjI3QAfeFO8nK0Np0J/IvFJp+jKYJO7w3d7xRh0ZBuvAiBIQg+zO5zoxyBCWUPz/JFSsYk5WTUS/p6msgBB/ijXcg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125932},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"aed988d1ab28f0ba773fa3df38e44d4b328e3b16","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.31.2","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.3_1764087791241_0.5254700393868121","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.4":{"name":"@superdoc-dev/ai","version":"0.1.6-next.4","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.4","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"e9a647a79928f93c979a4411f02bda1d15d61fa3","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.4.tgz","fileCount":4,"integrity":"sha512-PnvptxhV7EKiO9dDeN4TncmQyePjNNOdESkcteLALHhIWHfR5pMH6pDMrKBTggxnC9CIhNJciVwX+/6BdhUkVw==","signatures":[{"sig":"MEUCIGWzNwtAi6wmA4bmPcEOgtbvgbLrgvtAJMANktNBCMhZAiEAySdhQO/ekObWrPIJaa3iBgK3CKA0Hqni9sJ2Kahc0hs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63729},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"b90ce51c46f9a3f5aa07c098a143a1012c1a22bf","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.31.2","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.4_1764103110021_0.09327496569677907","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.5":{"name":"@superdoc-dev/ai","version":"0.1.6-next.5","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.5","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"8067a9b21371c9070f785f5510b9bbe1743a783c","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.5.tgz","fileCount":4,"integrity":"sha512-pYnBhDudLYzC6WwKwf+KFISgiX/4y/zJ5H9B6JO1uN076jNJMYzOH+lZdH4+EILAwMsh12W+zl/x+Xp+TPMsBw==","signatures":[{"sig":"MEQCIHacpSrIawkZ80a8j59aqxotsaqyJku763E+1ZFXQ2yzAiBHCr8YzfrdKuvkUeljdXVdsmZeDLrA5yjNq+dPy9SB0A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63957},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"2e45774a0a32a340ffe98f9fb4e87f957ab70fd4","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^0.32.0","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.5_1764108052423_0.050831021812195676","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.10":{"name":"@superdoc-dev/ai","version":"0.1.6-next.10","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.10","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"7593c6d8dc2a66c07d279998d4788feb387637b4","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.10.tgz","fileCount":94,"integrity":"sha512-N/FEPm6HPFR2WFcEuE5yLD87RCsUNZesvobWa0jiUsliDOLBEUWwY5wpO30CFqqEFXb13lt0TNaqIHJxTf3lqw==","signatures":[{"sig":"MEUCIQDTTIXP3nCZnfcpnmUt8rjh1LDOOt7ivIkG/utdl/jRjwIgZ8eWIr1AFh/7yADFiJPAp6D+eid5ell7qqMAFxyK0Co=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":420550},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"de598b85776cb2de8c90c709e280c3df817a0745","scripts":{"dev":"tsc --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.4","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"0.34.5","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.10_1764852983659_0.9811076544719028","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.14":{"name":"@superdoc-dev/ai","version":"0.1.6-next.14","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.14","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"066b6acbb967eb4230fe8d7d691a5db5e4ab79f6","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.14.tgz","fileCount":4,"integrity":"sha512-wm6bvpzdG7El/gZoxRD3LKSU6gWPJ8AjoA5CSes/f4NOsZlWzONymBMzfrmx/qVNPSFDm3Qr1Hm/RWp7nwKIbA==","signatures":[{"sig":"MEQCIGlN2HrwedhklUx4FfHJroECpoog5mVp0YqixxZW9rHNAiBhOZLKg6I7392/r52ZU6kMlQiH/AonZQJOw0T0mD0bxg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106444},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"395340d12f65f20d125b47a745a09bc9aa208593","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.4","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"0.34.5","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.14_1764879502788_0.43673416498591533","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.16":{"name":"@superdoc-dev/ai","version":"0.1.6-next.16","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.16","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"d23ddbc69a77e707479cfbc97c9717380f98f99e","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.16.tgz","fileCount":4,"integrity":"sha512-tyWM72qoL+JCwI4pfq3KqHBy9SAz+gmoJwQRqzToWNQjnXV0csgbsZtoiOj+6QqFml7VAjyxGWrub5hVkWqLQA==","signatures":[{"sig":"MEQCIC1+ItXWPWdMTued6GeLT9jgligt/KD30cQhC0GCK4WuAiBy3EKXeabHMY2ZiMn/t6hoZ1dpP3l8HXCDSjDCSNhVNw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109261},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"8fd019ad4f6b1d7446c88d55f2b1fd4f938f4706","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.4","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"0.34.5","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.16_1764884392833_0.6308655014870874","host":"s3://npm-registry-packages-npm-production"}},"0.1.6-next.18":{"name":"@superdoc-dev/ai","version":"0.1.6-next.18","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6-next.18","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"b47a2cec13cbf677049268859c08ec4482c162c9","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6-next.18.tgz","fileCount":4,"integrity":"sha512-KJL6DlTmrLRSG79us44lHD6zBwOMlgg3w91t6WsZwLtG0Bl0gqBWVjUymNTbBxJXy8FhSA5TMg6A021CJf6jFg==","signatures":[{"sig":"MEYCIQDt9Wzz/y8+afGvwISJ1WNT5wYzH3E2Mxpnp52xQjg0fgIhAMIlXmBZuzc02Jrdqr2ox1kzZ9ejpHvor2zMzYUFOCD2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109261},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"4eacae974461ebb8dab7051acda1b3006fee1421","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.4","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"0.34.5","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"*","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6-next.18_1764885259175_0.4101042592054247","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next":{"name":"@superdoc-dev/ai","version":"0.1.8-next","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"ae04171760073dff3b53aab491f48daf6dc7a33b","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.tgz","fileCount":4,"integrity":"sha512-deYb+vYRfD0V/Ep0/pfgAQQeMlmQsVorA6TFsXvqKQLEuuOffVV4WvDA5FNxQ+hBK0WHZh/Qy9OBPm27kCIZdA==","signatures":[{"sig":"MEUCIEpRVv8hxhE0um4VlBzPABCE/MrI2eprObMBx9KhC2LWAiEA9VYW7urTQ0R6F6rz+Mr/hVKXXRTRWbs+hMZc6GJTXbU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":128166},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"b9c65eb2428a725a0ae597b0c84c06e225530593","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.4","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"*","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-beta.57","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next_1765404284488_0.3765370485117343","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next.1":{"name":"@superdoc-dev/ai","version":"0.1.8-next.1","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next.1","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"99953bbaef3558f3e06b135f978512ec944b9e90","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.1.tgz","fileCount":4,"integrity":"sha512-FGsbsLklPuvKLUUJGXoxlYnfAdIp+S9Q1qHDcnHaop9mcoCjL9H4qmYezhszRtvIus3FXilLZ/Wb2qpMR1ZEVg==","signatures":[{"sig":"MEUCIQDO980aj+QOyfvmSCwEdrLUZ6a6oA43IRc6vIs4SzTvTQIgfE2LxrakqZHOPwzHgyyTNK9LodYCYeVhtFMT7qRqt1k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":128364},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"7ced16e717a8ce2e1fc8185788d081f03ae1179a","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"*","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-beta.57","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next.1_1765406078808_0.40998916516102035","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next.2":{"name":"@superdoc-dev/ai","version":"0.1.8-next.2","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next.2","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"ab1b1e94f7246828d0f508d3a302cc178310772a","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.2.tgz","fileCount":4,"integrity":"sha512-xPmTT3Euyl8IQWPB6CXu0r1b3EHaV/a2rQDiPj0n/oD6lBiBw2fM7mbXs6raKArtD4P3bdsjMMPgXyp1uJrDOQ==","signatures":[{"sig":"MEUCIQCyYPy+w0zOyT80w9/1s4lmjpRYTYBB9hZ2Zbu5xR5UwAIgcQP92bcI2ZypOI2J1GCXxv+a5iDXlafYSvhY4enyZfg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129593},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"d9b4c5c0f60aca23c439e4d027fd97d4b9e1cd20","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"1.0.0-beta.73","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-beta.57","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next.2_1765577197614_0.7407156286902017","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next.3":{"name":"@superdoc-dev/ai","version":"0.1.8-next.3","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next.3","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"1934d7d9a040d098164383c041e5469005f97af9","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.3.tgz","fileCount":4,"integrity":"sha512-NHWVyIKc8nQz9j/jHch6TR46sPkvaBVEiCWTeKYQTi1fNkokWXCNFNmGH0KhIycWqonJs791rA8D+swZmqhv9A==","signatures":[{"sig":"MEQCIAk6ms6KD45z6ZX/7xF+bIpKa4i53dLyS6wva/3lMHRHAiAQ5vT6L3o07pImAA1arxvILaqhIqz0e7bt9ykteGu7sQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129593},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"d9b4c5c0f60aca23c439e4d027fd97d4b9e1cd20","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"1.0.0-beta.73","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-beta.73","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next.3_1765577411346_0.20531737905516678","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next.4":{"name":"@superdoc-dev/ai","version":"0.1.8-next.4","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next.4","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"81889b9609598044c79dc34854d40d8701b94126","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.4.tgz","fileCount":4,"integrity":"sha512-lA9dAc6KYDbxvhlGLmGEHcf7vZaFdG213Glhhjfy30cR+dlv1msmxDqnkp6ixFWw/g2mI8SFusNVzSP2OrXd0Q==","signatures":[{"sig":"MEQCICVvzaa9WtDb/aq1eClMt+poKZSCe2DGCc0FspKue6auAiAE1qW/RW9CJFTUZmLjh5xJAvQ2n7Scue1GafiQPknOjw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":128765},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"d9b4c5c0f60aca23c439e4d027fd97d4b9e1cd20","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"1.0.0-beta.73","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-beta.73","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next.4_1765578951012_0.19968379350966714","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next.5":{"name":"@superdoc-dev/ai","version":"0.1.8-next.5","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next.5","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"185221cf33d14d7358e61fe4fb8c772cf981343d","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.5.tgz","fileCount":4,"integrity":"sha512-DTHjpZwax3Kd2M/PwiSGtSwnlAAe66iNemaNRksYF6aWYQg01o9zN2bPChWFeOcalU84Xc4JrfM8KF/quPxsLg==","signatures":[{"sig":"MEUCIGZTeO0m4mtIh9zCPQeyo8HISt4cy0O0osQlNOpoZTIfAiEA5soCaeYubP6BcBfdWUO8Udg5ujULC4lZsnFj3VOVp6U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130203},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"1c4297d47bb36243d233a3228baf89eff6260a07","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"1.0.0-beta.73","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-beta.73","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next.5_1765580285198_0.21171990313859168","host":"s3://npm-registry-packages-npm-production"}},"0.1.8-next.6":{"name":"@superdoc-dev/ai","version":"0.1.8-next.6","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.8-next.6","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"d4f1d8d525cac4f3e7c6e5370e04d6669b2b3653","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.8-next.6.tgz","fileCount":4,"integrity":"sha512-YS4swzQpj6vEa4BGyOMTNbIRA+2gx0qDfsvY/sRtueLkanySrQ+hK4eJjW5fFwapwORUJmawdPRXh/3/XOEU5w==","signatures":[{"sig":"MEUCIQCkeas8D2MtXVhSeYahBvrbnFl6BSaWZn1bazCUzeMwEAIgYKA2Vppf4CtXFMQt1aXVG9cj146Cc2Bhbi5Yi7x+WDI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130199},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"c746a961dc48c2a30a61477109612a72bcf91de4","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"1.0.0-next.1","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-next.1","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.8-next.6_1765878436079_0.47535873067750445","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@superdoc-dev/ai","version":"0.1.6","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"license":"AGPL-3.0","_id":"@superdoc-dev/ai@0.1.6","maintainers":[{"name":"falsaadeh","email":"fatima@harbourshare.com"},{"name":"harbournick","email":"nick@superdoc.dev"},{"name":"caio-pizzol","email":"caio@harbourshare.com"}],"dist":{"shasum":"009abaac9cbb059c723cb9e2f185788ecaec5ee0","tarball":"https://registry.npmjs.org/@superdoc-dev/ai/-/ai-0.1.6.tgz","fileCount":4,"integrity":"sha512-5h/F3200VOfpdpt+g0jg17p8UfKvOi4djwroijcTQiVVcQbY8mYw5LB7TL5WgIJ5pMjZgsk1jN3yH+c0C/46LQ==","signatures":[{"sig":"MEYCIQCP9RMXDMm7HWxya/LOou8S/ABtHCEYJEFR9gHQZ5WfUQIhAIy39/hAILCCvkQmQ1/naUL2XDAPrzzebvjvgR+CAHS2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130388},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"50c4b956517082a5bc511f50623d04158dcd35d9","scripts":{"dev":"tsup --watch","info":"npm view @superdoc-dev/ai dist-tags && npm view @superdoc-dev/ai versions","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","publish:beta":"npm run build && npm run test && npm publish --tag beta --access public","publish:next":"npm run build && npm run test && npm publish --tag next --access public","release:beta":"npm run version:beta && npm run publish:beta","release:next":"npm run version:next && npm run publish:next","version:beta":"npm version prerelease --preid=beta --no-git-tag-version","version:next":"npm version prerelease --preid=next --no-git-tag-version","version:major":"npm version major --no-git-tag-version","version:minor":"npm version minor --no-git-tag-version","version:patch":"npm version patch --no-git-tag-version","prepublishOnly":"npm run build","publish:latest":"npm run build && npm run test && npm publish --tag latest --access public"},"_npmUser":{"name":"falsaadeh","email":"fatima@harbourshare.com"},"_npmVersion":"10.9.3","description":"AI integration package for SuperDoc","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^8.0.0","vitest":"^3.2.4","superdoc":"^1.0.0-next.1","typescript":"^5.0.0","@types/node":"^20.0.0","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"superdoc":"1.0.0-next.1","prosemirror-view":"^1.33.8","prosemirror-model":"^1.25.2","prosemirror-state":"^1.4.3"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.6_1766051957716_0.5917914100589796","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-11-12T20:36:51.757Z","modified":"2026-07-31T15:15:42.077Z","0.1.2":"2025-11-12T20:36:52.040Z","0.1.3":"2025-11-13T12:33:47.983Z","0.1.4":"2025-11-18T21:44:08.506Z","0.1.5":"2025-11-18T22:54:51.446Z","0.1.6-next":"2025-11-24T11:43:21.461Z","0.1.6-next.1":"2025-11-24T18:14:09.205Z","0.1.6-next.2":"2025-11-25T14:38:26.251Z","0.1.6-next.3":"2025-11-25T16:23:11.421Z","0.1.6-next.4":"2025-11-25T20:38:30.186Z","0.1.6-next.5":"2025-11-25T22:00:52.638Z","0.1.6-next.8":"2025-12-04T12:55:08.212Z","0.1.6-next.10":"2025-12-04T12:56:23.813Z","0.1.6-next.14":"2025-12-04T20:18:22.979Z","0.1.6-next.16":"2025-12-04T21:39:52.991Z","0.1.6-next.18":"2025-12-04T21:54:19.321Z","0.1.8-next":"2025-12-10T22:04:44.645Z","0.1.8-next.1":"2025-12-10T22:34:38.952Z","0.1.8-next.2":"2025-12-12T22:06:37.769Z","0.1.8-next.3":"2025-12-12T22:10:12.658Z","0.1.8-next.4":"2025-12-12T22:35:51.178Z","0.1.8-next.5":"2025-12-12T22:58:05.394Z","0.1.8-next.6":"2025-12-16T09:47:16.223Z","0.1.6":"2025-12-18T09:59:17.864Z"},"license":"AGPL-3.0","keywords":["superdoc","ai","document","collaboration","llm","openai","anthropic"],"description":"AI integration package for SuperDoc","maintainers":[{"email":"eric@harbourshare.com","name":"edoversb"},{"email":"gabriel@harbourshare.com","name":"chittolina"},{"email":"nick@superdoc.dev","name":"harbournick"},{"email":"caio@harbourshare.com","name":"caio-pizzol"}],"readme":"# @superdoc-dev/ai\n\n> AI integration package for SuperDoc - Add powerful AI capabilities to your document editor\n\n## Features\n\n- 🤖 **Multiple AI Providers**: Built-in support for OpenAI, Anthropic Claude, and custom HTTP endpoints\n- 🔍 **Smart Content Finding**: Natural language search across documents\n- ✍️ **Intelligent Editing**: AI-powered content replacement, suggestions, and generation\n- 💬 **Comment Integration**: Automatically insert AI-generated comments\n- 📝 **Track Changes**: AI suggestions with full revision history\n- 🎨 **Content Highlighting**: Smart text highlighting based on queries\n- 🌊 **Streaming Support**: Real-time AI responses with streaming\n- 📦 **TypeScript First**: Full type safety and excellent IDE support\n\n## Installation\n\n```bash\nnpm install @superdoc-dev/ai\n```\n\n## Quick Start\n\n```typescript\nimport { AIActions } from '@superdoc-dev/ai';\n\nconst ai = new AIActions(superdoc, {\n  user: {\n    displayName: 'AI Assistant',\n    userId: 'ai-bot-001', // Required: unique identifier\n  },\n  provider: {\n    type: 'openai',\n    apiKey: process.env.OPENAI_API_KEY, // ⚠️ NEVER in browser!\n    model: 'gpt-4',\n  },\n  onReady: ({ aiActions }) => {\n    console.log('AI is ready!');\n  },\n});\n\n// Wait for initialization\nawait ai.waitUntilReady();\n\n// Find content\nconst result = await ai.action.find('privacy policy');\n\n// Replace content\nawait ai.action.replace('change \"color\" to \"colour\" in British English');\n\n// Insert tracked changes\nawait ai.action.insertTrackedChange('improve the introduction');\n\n// Generate content\nawait ai.action.insertContent('write a conclusion paragraph');\n```\n\n## API Reference\n\n### AIActions Class\n\nThe main class for AI integration.\n\n#### Constructor\n\n```typescript\nnew AIActions(superdoc: SuperDocInstance, options: AIActionsOptions)\n```\n\n**Options:**\n\n- `user` (required): User/bot information\n  - `displayName`: Display name for AI-generated changes\n  - `userId`: Unique identifier for the AI user (required)\n  - `profileUrl?`: Optional profile image URL\n- `provider` (required): AI provider configuration or instance\n- `systemPrompt?`: Custom system prompt for AI context\n- `enableLogging?`: Enable debug logging (default: false)\n- `maxContextLength?`: Maximum number of characters from the document that will accompany AI prompts (default: 8,000)\n- Callbacks:\n  - `onReady?`: Called when AI is initialized\n  - `onStreamingStart?`: Called when streaming begins\n  - `onStreamingPartialResult?`: Called for each streaming chunk\n  - `onStreamingEnd?`: Called when streaming completes\n  - `onError?`: Called when an error occurs\n\n#### Methods\n\n##### `waitUntilReady()`\n\nWaits for AI initialization to complete.\n\n```typescript\nawait ai.waitUntilReady();\n```\n\n##### `getIsReady()`\n\nChecks if AI is ready.\n\n```typescript\nconst ready = ai.getIsReady(); // boolean\n```\n\n##### `getCompletion(prompt, options?)`\n\nGet a complete AI response.\n\n```typescript\nconst response = await ai.getCompletion('Summarize this document', {\n  temperature: 0.7,\n  maxTokens: 500,\n});\n```\n\n##### `streamCompletion(prompt, options?)`\n\nStream AI responses in real-time.\n\n```typescript\nconst result = await ai.streamCompletion('Generate introduction');\n```\n\n##### `getDocumentContext()`\n\nGet current document text.\n\n```typescript\nconst context = ai.getDocumentContext();\n```\n\n### AI Actions\n\nAll actions are available via `ai.action.*`.\n\n#### `find(query)`\n\nFind the first occurrence of content matching the query.\n\n```typescript\nconst result = await ai.action.find('GDPR compliance section');\n// Returns: { success: boolean, results: FoundMatch[] }\n```\n\n#### `findAll(query)`\n\nFind all occurrences of content matching the query.\n\n```typescript\nconst result = await ai.action.findAll('privacy policy');\n```\n\n#### `highlight(query, color?)`\n\nFind and highlight content.\n\n```typescript\nawait ai.action.highlight('important terms', '#FFFF00');\n```\n\n#### `replace(instruction)`\n\nReplace the first occurrence based on instruction.\n\n```typescript\nawait ai.action.replace('change \"data\" to \"information\" in the first paragraph');\n```\n\n#### `replaceAll(instruction)`\n\nReplace all occurrences based on instruction.\n\n```typescript\nawait ai.action.replaceAll('update dates to 2025');\n```\n\n#### `insertTrackedChange(instruction)`\n\nInsert a single tracked change.\n\n```typescript\nawait ai.action.insertTrackedChange('improve clarity of terms and conditions');\n```\n\n#### `insertTrackedChanges(instruction)`\n\nInsert multiple tracked changes.\n\n```typescript\nawait ai.action.insertTrackedChanges('fix all grammatical errors');\n```\n\n#### `insertComment(instruction)`\n\nInsert a single comment.\n\n```typescript\nawait ai.action.insertComment('suggest improvements to introduction');\n```\n\n## AIPlanner: Prompt → Plan → Action\n\nAccess the planner through your `AIActions` instance to turn natural language prompts into concrete plans and apply them with formatting-safe primitives.\n\n```ts\nimport { AIActions } from '@superdoc-dev/ai';\n\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI Assistant', userId: 'ai-1' },\n  provider: {\n    type: 'openai',\n    apiKey: process.env.OPENAI_API_KEY!,\n    model: 'gpt-4o-mini',\n  },\n  // Optional planner configuration\n  planner: {\n    maxContextLength: 8000,\n    documentContextProvider: () => {\n      // Include the current selection when available, otherwise share full text\n      const { state } = superdoc.activeEditor;\n      return state.doc.textBetween(state.selection.from, state.selection.to || state.doc.content.size, ' ').trim();\n    },\n    onProgress: (event) => console.log('Progress:', event),\n  },\n});\n\n// Access planner through ai.planner\nconst result = await ai.planner.execute('Add tracked changes that tighten the executive summary.');\n\nconsole.log(result.executedTools); // e.g. ['insertTrackedChanges', 'respond']\nconsole.log(result.response); // Planner's textual reply (if any)\n```\n\n### AIPlanner Highlights\n\n- **Planning Prompt** – Planner sends the document text, JSON, and schema summary (when available) to the LLM and asks for a JSON plan (`tool`, `instruction`).\n- **Tool Registry** – Built-in tools cover find/highlight, replace (single/all), tracked changes, comments, summaries, content insertion, and a `respond` fallback. You can inject your own tool definitions if needed.\n- **Formatting Preservation** – Every editing tool is backed by the `EditorAdapter`, which maintains marks and inline styling via `replaceText`, tracked changes, and comment helpers.\n- **Execution Results** – `execute` returns whether the run succeeded, which tools ran, any textual response, the parsed plan, and warnings for skipped steps.\n\nUse `ai.planner` when you want prompt → plan → action orchestration (redlining, drafting, reviews) while keeping full control over the resulting document edits.\n\n#### `insertComments(instruction)`\n\nInsert multiple comments.\n\n```typescript\nawait ai.action.insertComments('review all legal terms');\n```\n\n#### `summarize(instruction)`\n\nGenerate a summary.\n\n```typescript\nconst result = await ai.action.summarize('create executive summary');\n// onStreamingPartialResult receives partial updates when the provider allows streaming.\n```\n\n#### `insertContent(instruction)`\n\nGenerate and insert new content.\n\n```typescript\nawait ai.action.insertContent('write a conclusion paragraph');\n```\n\nWhen the provider configuration leaves `streamResults` enabled (default), generated content streams into the document incrementally instead of waiting for the full response.\n\n## AI Providers\n\n### OpenAI\n\n```typescript\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI', userId: 'ai-1' },\n  provider: {\n    type: 'openai',\n    apiKey: 'sk-...',\n    model: 'gpt-4',\n    baseURL: 'https://api.openai.com/v1', // optional\n    organizationId: 'org-...', // optional\n    temperature: 0.7, // optional\n    maxTokens: 2000, // optional\n    streamResults: false, // optional (applies to AI insert/summarize actions; default true)\n  },\n});\n```\n\n### Anthropic Claude\n\n```typescript\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI', userId: 'ai-1' },\n  provider: {\n    type: 'anthropic',\n    apiKey: 'sk-ant-...',\n    model: 'claude-3-opus-20240229',\n    apiVersion: '2023-06-01', // optional\n    baseURL: 'https://api.anthropic.com', // optional\n    temperature: 0.7, // optional\n    maxTokens: 2000, // optional\n    streamResults: false, // optional (applies to AI insert/summarize actions; default true)\n  },\n});\n```\n\n### Custom HTTP Provider\n\n```typescript\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI', userId: 'ai-1' },\n  provider: {\n    type: 'http',\n    url: 'https://your-ai-api.com/complete',\n    streamUrl: 'https://your-ai-api.com/stream', // optional\n    headers: {\n      Authorization: 'Bearer token',\n      'X-Custom-Header': 'value',\n    },\n    method: 'POST', // default\n    streamResults: true, // optional (used by insertContent/summarize; default true)\n    buildRequestBody: (context) => ({\n      messages: context.messages,\n      stream: context.stream,\n      // custom fields\n    }),\n    parseCompletion: (payload) => {\n      // Extract text from response\n      return payload.result;\n    },\n  },\n});\n```\n\n### Custom Provider Instance\n\nImplement the `AIProvider` interface:\n\n```typescript\nconst customProvider: AIProvider = {\n  streamResults: true,\n  async *streamCompletion(messages, options) {\n    // Yield chunks\n    yield 'chunk1';\n    yield 'chunk2';\n  },\n  async getCompletion(messages, options) {\n    // Return complete response\n    return 'response';\n  },\n};\n\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI', userId: 'ai-1' },\n  provider: customProvider,\n});\n```\n\n## Advanced Usage\n\n### With Callbacks\n\n```typescript\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI', userId: 'ai-1' },\n  provider: { type: 'openai', apiKey: '...', model: 'gpt-4' },\n  enableLogging: true,\n  onReady: () => console.log('Ready!'),\n  onStreamingStart: () => console.log('Streaming started'),\n  onStreamingPartialResult: ({ partialResult }) => {\n    console.log('Partial:', partialResult);\n  },\n  onStreamingEnd: ({ fullResult }) => {\n    console.log('Complete:', fullResult);\n  },\n  onError: (error) => {\n    console.error('Error:', error);\n  },\n});\n```\n\n### Custom System Prompt\n\n```typescript\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'Legal AI', userId: 'legal-ai-1' },\n  provider: { type: 'openai', apiKey: '...', model: 'gpt-4' },\n  systemPrompt: `You are a legal document assistant. \n    Focus on accuracy, clarity, and compliance.\n    Always cite relevant regulations when applicable.`,\n});\n```\n\n### Context Budgeting\n\n`AIActions` automatically truncates the document context that accompanies provider calls to 8,000 characters (60% head + 40% tail) to prevent token overflows. Override the default when you need more or less context:\n\n```typescript\nconst ai = new AIActions(superdoc, {\n  user: { displayName: 'AI', userId: 'ai-1' },\n  provider: { type: 'openai', apiKey: '...', model: 'gpt-4o' },\n  maxContextLength: 4000, // send at most 4k characters from the document\n});\n```\n\n### Abort Streaming\n\n```typescript\nconst controller = new AbortController();\n\nai.streamCompletion('Long task', {\n  signal: controller.signal,\n});\n\n// Later...\ncontroller.abort();\n```\n\n### Provider-Specific Options\n\n```typescript\nawait ai.getCompletion('prompt', {\n  temperature: 0.5,\n  maxTokens: 1000,\n  stop: ['\\n\\n'],\n  providerOptions: {\n    // OpenAI specific\n    top_p: 0.9,\n    frequency_penalty: 0.5,\n    // or Anthropic specific\n    top_k: 40,\n  },\n});\n```\n\n## Error Handling\n\n```typescript\ntry {\n  await ai.action.replace('make changes');\n} catch (error) {\n  if (error.message.includes('not ready')) {\n    await ai.waitUntilReady();\n    // Retry\n  } else {\n    console.error('AI operation failed:', error);\n  }\n}\n```\n\n## Testing\n\n```bash\nnpm test\n```\n\n## License\n\nAGPL-3.0 - see [LICENSE](../../LICENSE) for details.\n\n## Support\n\n- 📖 [Documentation](https://superdoc.dev/docs/ai)\n- 💬 [Discord Community](https://discord.gg/superdoc)\n- 🐛 [Issue Tracker](https://github.com/harbour-enterprises/superdoc/issues)\n- 📧 [Email Support](mailto:support@superdoc.dev)\n\n## Version & Compatibility\n\n**Current Version**: 0.1.8-next.6 (Pre-release)\n\n**Supported SuperDoc Versions**: >=1.0.0-next <2.0.0\n\n> ⚠️ **Production Security**: Never expose API keys in browser code. Implement a server-side API proxy and configure `maxContextLength` appropriately. Note: `maxContextLength` is measured in **characters** (not tokens). A rough estimate is 2,000–3,000 tokens per 8,000 characters, depending on content. Adjust based on your provider's token limits.\n\n### What's New in 0.1.x\n\n- ✅ Complete architecture refactor (ai-actions)\n- ✅ Multi-provider support (OpenAI, Anthropic, HTTP, custom)\n- ✅ Dynamic schema support via editor.getSchemaSummaryJSON()\n- ✅ Flexible positioning (7 modes)\n- ✅ Query-based operations\n- ✅ AIPlanner orchestration system\n- ✅ All critical bugs fixed\n","readmeFilename":"README.md"}