Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
b44ad38
chore(internal): remove redundant imports config
stainless-app[bot] Jul 30, 2025
6d04008
fix(mcp): reverse validJson capability option and limit scope
stainless-app[bot] Aug 1, 2025
850f0f6
fix(mcp): avoid sending `jq_filter` to base API
stainless-app[bot] Aug 1, 2025
782e9fa
feat(mcp): add logging when environment variable is set
stainless-app[bot] Aug 2, 2025
98e619a
feat(mcp): remote server with passthru auth
stainless-app[bot] Aug 5, 2025
27f12ba
fix(mcp): fix bug in header handling
stainless-app[bot] Aug 6, 2025
3f2772e
chore(internal): move publish config
stainless-app[bot] Aug 7, 2025
16e027e
chore(mcp): refactor streamable http transport
stainless-app[bot] Aug 7, 2025
29456e4
feat(mcp): add unix socket option for remote MCP
stainless-app[bot] Aug 7, 2025
cd4e751
chore: update @stainless-api/prism-cli to v5.15.0
stainless-app[bot] Aug 9, 2025
c5c42a4
chore(internal): update comment in script
stainless-app[bot] Aug 9, 2025
91d9f96
chore(internal): codegen related update
stainless-app[bot] Aug 12, 2025
b2a894d
chore(mcp): minor cleanup of types and package.json
stainless-app[bot] Aug 14, 2025
fbbcc43
chore(mcp): document remote server in README.md
stainless-app[bot] Aug 15, 2025
7e69826
chore(deps): update dependency @types/node to v20.17.58
stainless-app[bot] Aug 16, 2025
4eb94b3
chore(mcp): update README
stainless-app[bot] Aug 16, 2025
5f7ef32
chore(internal): formatting change
stainless-app[bot] Aug 16, 2025
d57ad3c
feat(mcp): parse query string as mcp client options in mcp server
stainless-app[bot] Aug 19, 2025
3fc9cc8
chore(internal): refactor array check
stainless-app[bot] Aug 19, 2025
736876e
chore(mcp): add cors to oauth metadata route
stainless-app[bot] Aug 20, 2025
a1cbb00
feat(mcp): add code execution tool
stainless-app[bot] Aug 20, 2025
117c3f6
chore(internal): make mcp-server publishing public by defaut
stainless-app[bot] Aug 21, 2025
5e57506
feat(mcp): add option to infer mcp client
stainless-app[bot] Aug 21, 2025
9f2e9e3
chore(mcp): update package.json
stainless-app[bot] Aug 22, 2025
12563a9
chore(mcp): update types
stainless-app[bot] Aug 22, 2025
c4984c4
chore: add package to package.json
stainless-app[bot] Aug 22, 2025
7cd4ae0
chore(internal): codegen related update
stainless-app[bot] Aug 22, 2025
07703e2
chore(client): qualify global Blob
stainless-app[bot] Aug 22, 2025
1674d7e
chore: update CI script
stainless-app[bot] Aug 23, 2025
d77461b
chore(internal): codegen related update
stainless-app[bot] Aug 24, 2025
fe4dddb
chore(internal): update global Error reference
stainless-app[bot] Aug 29, 2025
e757029
feat(mcp): expose client options in `streamableHTTPApp`
stainless-app[bot] Sep 3, 2025
00165b1
chore(internal): codegen related update
stainless-app[bot] Sep 3, 2025
7c287d1
feat(mcp): allow setting logging level
stainless-app[bot] Sep 3, 2025
dd992b1
chore(internal): codegen related update
stainless-app[bot] Sep 5, 2025
eb7fa2d
chore(internal): codegen related update
stainless-app[bot] Sep 6, 2025
0ec3eb3
fix(mcp): fix query options parsing
stainless-app[bot] Sep 6, 2025
4afa2c2
fix: coerce nullable values to undefined
stainless-app[bot] Sep 9, 2025
9ccb2af
chore(mcp): upload dxt as release asset
stainless-app[bot] Sep 10, 2025
8c3db47
fix(mcp): fix uploading dxt release assets
stainless-app[bot] Sep 12, 2025
ce5e62e
fix(ci): set permissions for DXT publish action
stainless-app[bot] Sep 17, 2025
2859f3c
chore(mcp): rename dxt to mcpb
stainless-app[bot] Sep 18, 2025
e541193
chore(internal): gitignore .mcpb files
stainless-app[bot] Sep 19, 2025
879786d
feat(mcp): add docs search tool
stainless-app[bot] Sep 19, 2025
5712a83
chore(codegen): internal codegen update
stainless-app[bot] Sep 19, 2025
39b5c60
chore: do not install brew dependencies in ./scripts/bootstrap by def…
stainless-app[bot] Sep 20, 2025
14a1d22
chore: improve example values
stainless-app[bot] Sep 23, 2025
0077ea5
feat(mcp): enable experimental docs search tool
stainless-app[bot] Sep 23, 2025
d75738d
feat(mcp): add option for including docs tools
stainless-app[bot] Sep 24, 2025
0d8d83a
feat(api): added embedding endpoint
stainless-app[bot] Oct 12, 2025
ffc32c0
codegen metadata
stainless-app[bot] Oct 12, 2025
7aed1ae
codegen metadata
stainless-app[bot] Oct 12, 2025
9bf5c7e
codegen metadata
stainless-app[bot] Oct 12, 2025
402f641
feat(sdk): add embeddings endpoint
stainless-app[bot] Oct 12, 2025
b0f92ff
feat(api): rename embedding -> embeddings
stainless-app[bot] Oct 12, 2025
b6ccef3
codegen metadata
stainless-app[bot] Oct 12, 2025
8255684
feat(api): revert embedding -> embeddings
stainless-app[bot] Oct 12, 2025
865bc85
fix(api): avoid stainless SDK `NameError`
stainless-app[bot] Oct 12, 2025
4cb460a
codegen metadata
stainless-app[bot] Oct 12, 2025
6843e06
codegen metadata
stainless-app[bot] Oct 12, 2025
9c9ef78
feat(sdk): toggle to force regen
stainless-app[bot] Oct 12, 2025
c4755bc
feat(sdk): untoggle to force regen
stainless-app[bot] Oct 12, 2025
ed71d7d
codegen metadata
stainless-app[bot] Oct 12, 2025
14a9df4
fix(sdk)!: add `_response` to response models to finally fix duplicat…
stainless-app[bot] Oct 12, 2025
8dfea48
feat(api)!: reduce max length of embeddings input
stainless-app[bot] Oct 13, 2025
eab8690
fix(api): typo
stainless-app[bot] Oct 14, 2025
3f1e94b
docs(sdk): make embeddings example first
stainless-app[bot] Oct 14, 2025
f635457
release: 0.11.1
stainless-app[bot] Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -68,6 +68,15 @@ jobs:
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh

- name: Upload MCP Server tarball
if: github.repository == 'stainless-sdks/isaacus-typescript'
env:
URL: https://pkg.stainless.com/s?subpackage=mcp-server
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
BASE_PATH: packages/mcp-server
run: ./scripts/utils/upload-artifact.sh
test:
timeout-minutes: 10
name: test
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -39,3 +41,10 @@ jobs:
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
env:
NPM_TOKEN: ${{ secrets.ISAACUS_NPM_TOKEN || secrets.NPM_TOKEN }}

- name: Upload MCP Server DXT GitHub release asset
run: |
gh release upload ${{ github.event.release.tag_name }} \
packages/mcp-server/isaacus_api.mcpb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.ISAACUS_NPM_TOKEN || secrets.NPM_TOKEN }}

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ dist
dist-deno
/*.tgz
.idea/

.eslintcache
dist-bundle
*.mcpb
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.11.0"
".": "0.11.1"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-a0aa3bcfef3af964f7172cecc6e969193a4ca96b26f8c47e7f50d852b13ef356.yml
openapi_spec_hash: e243aed52e8a3c6dad6254c57408fdc4
config_hash: bfe30148ec88e8bbbf4a348a9fdfc00a
configured_endpoints: 4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-ee884a4336559147aacf9a927a540f21e9760f00d2d5588af00fa8a25e2707d9.yml
openapi_spec_hash: 2ba78bd360942c63a7d08dba791f00d2
config_hash: a85580968a69d8d6fadf96e5e2d6870e
84 changes: 84 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,89 @@
# Changelog

## 0.11.1 (2025-10-14)

Full Changelog: [v0.11.0...v0.11.1](https://github.com/isaacus-dev/isaacus-typescript/compare/v0.11.0...v0.11.1)

### ⚠ BREAKING CHANGES

* **api:** reduce max length of embeddings input
* **sdk:** add `_response` to response models to finally fix duplicated names

### Features

* **api:** added embedding endpoint ([0d8d83a](https://github.com/isaacus-dev/isaacus-typescript/commit/0d8d83a611df5252c68050071d06d3fb4685d534))
* **api:** reduce max length of embeddings input ([8dfea48](https://github.com/isaacus-dev/isaacus-typescript/commit/8dfea484dd6333868978b30e74666a8dbb85b669))
* **api:** rename embedding -> embeddings ([b0f92ff](https://github.com/isaacus-dev/isaacus-typescript/commit/b0f92ff7ed78d27692e3fe380d4756074eb54d84))
* **api:** revert embedding -> embeddings ([8255684](https://github.com/isaacus-dev/isaacus-typescript/commit/82556847327ac00dac205e1876b6482099fb1c31))
* **mcp:** add code execution tool ([a1cbb00](https://github.com/isaacus-dev/isaacus-typescript/commit/a1cbb008f3d7addd94730652490c4b157bd554f2))
* **mcp:** add docs search tool ([879786d](https://github.com/isaacus-dev/isaacus-typescript/commit/879786deb453dc2211105151425e5a767e8a52da))
* **mcp:** add logging when environment variable is set ([782e9fa](https://github.com/isaacus-dev/isaacus-typescript/commit/782e9fae8939787ac7f362712395d1ddc988f9db))
* **mcp:** add option for including docs tools ([d75738d](https://github.com/isaacus-dev/isaacus-typescript/commit/d75738ddec8b9f1527a3ec985e7937267c81194a))
* **mcp:** add option to infer mcp client ([5e57506](https://github.com/isaacus-dev/isaacus-typescript/commit/5e5750630aeff57d48479c8ceef76df5f9682120))
* **mcp:** add unix socket option for remote MCP ([29456e4](https://github.com/isaacus-dev/isaacus-typescript/commit/29456e482b1a330cdbf2b3bc9d8a736cde34dd39))
* **mcp:** allow setting logging level ([7c287d1](https://github.com/isaacus-dev/isaacus-typescript/commit/7c287d1650b60ee197658475558ff98c9b3ba253))
* **mcp:** enable experimental docs search tool ([0077ea5](https://github.com/isaacus-dev/isaacus-typescript/commit/0077ea5876adea43d1a9026545fda774c0ef0c02))
* **mcp:** expose client options in `streamableHTTPApp` ([e757029](https://github.com/isaacus-dev/isaacus-typescript/commit/e7570299b08070cfd932e0cf2310bd3178037377))
* **mcp:** parse query string as mcp client options in mcp server ([d57ad3c](https://github.com/isaacus-dev/isaacus-typescript/commit/d57ad3c5a57de9c28c16929e41fad2f3a68c5068))
* **mcp:** remote server with passthru auth ([98e619a](https://github.com/isaacus-dev/isaacus-typescript/commit/98e619a1edbc4adb4c30fbb7dddcd111a05893aa))
* **sdk:** add embeddings endpoint ([402f641](https://github.com/isaacus-dev/isaacus-typescript/commit/402f641b04680e4ebd24242a57a7098ca5433fef))
* **sdk:** toggle to force regen ([9c9ef78](https://github.com/isaacus-dev/isaacus-typescript/commit/9c9ef78f125a67ddb2a016d4eb57517e5b97c015))
* **sdk:** untoggle to force regen ([c4755bc](https://github.com/isaacus-dev/isaacus-typescript/commit/c4755bc35f60f6094ba6a124b42f269e273794de))


### Bug Fixes

* **api:** avoid stainless SDK `NameError` ([865bc85](https://github.com/isaacus-dev/isaacus-typescript/commit/865bc856ef06c536332b9af0de7fd50592f4f237))
* **api:** typo ([eab8690](https://github.com/isaacus-dev/isaacus-typescript/commit/eab869049c7e8f04023ece405445604de31a2985))
* **ci:** set permissions for DXT publish action ([ce5e62e](https://github.com/isaacus-dev/isaacus-typescript/commit/ce5e62ee9c698a85d3eeb6a2e998ee896f497473))
* coerce nullable values to undefined ([4afa2c2](https://github.com/isaacus-dev/isaacus-typescript/commit/4afa2c265b899d29b60c823d27d00c08d23afdc9))
* **mcp:** avoid sending `jq_filter` to base API ([850f0f6](https://github.com/isaacus-dev/isaacus-typescript/commit/850f0f6f5e4c1fb13a7159ccc6d357854992cf5f))
* **mcp:** fix bug in header handling ([27f12ba](https://github.com/isaacus-dev/isaacus-typescript/commit/27f12baeae30bf127d54f43b580291108422b555))
* **mcp:** fix query options parsing ([0ec3eb3](https://github.com/isaacus-dev/isaacus-typescript/commit/0ec3eb32004668ab9dd3d29f74ad01d546c6a323))
* **mcp:** fix uploading dxt release assets ([8c3db47](https://github.com/isaacus-dev/isaacus-typescript/commit/8c3db47ddf574faa5f2ca7b3dacb18530c75012c))
* **mcp:** reverse validJson capability option and limit scope ([6d04008](https://github.com/isaacus-dev/isaacus-typescript/commit/6d040082ad4456a697ef550d9c176cad753afb7a))
* **sdk:** add `_response` to response models to finally fix duplicated names ([14a9df4](https://github.com/isaacus-dev/isaacus-typescript/commit/14a9df456e70d8bdd152e3ff9710e519f870e463))


### Chores

* add package to package.json ([c4984c4](https://github.com/isaacus-dev/isaacus-typescript/commit/c4984c444562500d2f2f36e0090c1f415600f0a1))
* **client:** qualify global Blob ([07703e2](https://github.com/isaacus-dev/isaacus-typescript/commit/07703e2299ade5e7987c7058a90fae4b39e66038))
* **codegen:** internal codegen update ([5712a83](https://github.com/isaacus-dev/isaacus-typescript/commit/5712a833b930d92c94d2d3f0c5e426100786ddf0))
* **deps:** update dependency @types/node to v20.17.58 ([7e69826](https://github.com/isaacus-dev/isaacus-typescript/commit/7e698263849b5a53b1098792a5cdc1e27fa76c70))
* do not install brew dependencies in ./scripts/bootstrap by default ([39b5c60](https://github.com/isaacus-dev/isaacus-typescript/commit/39b5c60b0837ff81d984341f52f9a5399d83e029))
* improve example values ([14a1d22](https://github.com/isaacus-dev/isaacus-typescript/commit/14a1d226a5494f3ad876361b78de554f223c6554))
* **internal:** codegen related update ([eb7fa2d](https://github.com/isaacus-dev/isaacus-typescript/commit/eb7fa2dc18f0189867748891dee527dcd2d5d9f1))
* **internal:** codegen related update ([dd992b1](https://github.com/isaacus-dev/isaacus-typescript/commit/dd992b122975393f2d3350b9a7371e1a29f0c329))
* **internal:** codegen related update ([00165b1](https://github.com/isaacus-dev/isaacus-typescript/commit/00165b13517d9af29d038d9c9c1ad0e358732c91))
* **internal:** codegen related update ([d77461b](https://github.com/isaacus-dev/isaacus-typescript/commit/d77461b18e5fca06485b3fa4f02ff832f16faf14))
* **internal:** codegen related update ([7cd4ae0](https://github.com/isaacus-dev/isaacus-typescript/commit/7cd4ae0a330c4703cc543ad4e5cf211816cbbc4d))
* **internal:** codegen related update ([91d9f96](https://github.com/isaacus-dev/isaacus-typescript/commit/91d9f969277f809196b0e76bf69d3e2b1e734ad5))
* **internal:** formatting change ([5f7ef32](https://github.com/isaacus-dev/isaacus-typescript/commit/5f7ef32bae84995296074c99eca4e9c557b54431))
* **internal:** gitignore .mcpb files ([e541193](https://github.com/isaacus-dev/isaacus-typescript/commit/e5411936faad14e1b9417c2c6ba10f663ddb3694))
* **internal:** make mcp-server publishing public by defaut ([117c3f6](https://github.com/isaacus-dev/isaacus-typescript/commit/117c3f67f3cc2b038d8e08626ecdcd76d309788f))
* **internal:** move publish config ([3f2772e](https://github.com/isaacus-dev/isaacus-typescript/commit/3f2772efe40aa46f0d6c2fc7157d5aef4c4087f1))
* **internal:** refactor array check ([3fc9cc8](https://github.com/isaacus-dev/isaacus-typescript/commit/3fc9cc8aaecea7abe226c9dc9bdc00d971cc2732))
* **internal:** remove redundant imports config ([b44ad38](https://github.com/isaacus-dev/isaacus-typescript/commit/b44ad387603fbbc6d04af5e43788342798e28c73))
* **internal:** update comment in script ([c5c42a4](https://github.com/isaacus-dev/isaacus-typescript/commit/c5c42a4ab8d47a0d4de42df8ccacd87d88c83f0b))
* **internal:** update global Error reference ([fe4dddb](https://github.com/isaacus-dev/isaacus-typescript/commit/fe4dddb7ff5d44bf609edd23d1b97a8d10f6b33a))
* **mcp:** add cors to oauth metadata route ([736876e](https://github.com/isaacus-dev/isaacus-typescript/commit/736876e0b49b6d3c42130b161bd52ba16bd05f7b))
* **mcp:** document remote server in README.md ([fbbcc43](https://github.com/isaacus-dev/isaacus-typescript/commit/fbbcc43335cb6562ba7609bd29206ebcd35ade80))
* **mcp:** minor cleanup of types and package.json ([b2a894d](https://github.com/isaacus-dev/isaacus-typescript/commit/b2a894dc78fca32896b7f0beb29656f681c75923))
* **mcp:** refactor streamable http transport ([16e027e](https://github.com/isaacus-dev/isaacus-typescript/commit/16e027eb2536ed2d452173df0cf22686bd78c75b))
* **mcp:** rename dxt to mcpb ([2859f3c](https://github.com/isaacus-dev/isaacus-typescript/commit/2859f3c4473df3e0df28ac91df1dc393510f70a2))
* **mcp:** update package.json ([9f2e9e3](https://github.com/isaacus-dev/isaacus-typescript/commit/9f2e9e31fe589d24fce942348053c3fd3c0c239d))
* **mcp:** update README ([4eb94b3](https://github.com/isaacus-dev/isaacus-typescript/commit/4eb94b3367ad0c1071edb1c4fe215446dbe19aa9))
* **mcp:** update types ([12563a9](https://github.com/isaacus-dev/isaacus-typescript/commit/12563a9b5596bea758f319118b43748a121d4f65))
* **mcp:** upload dxt as release asset ([9ccb2af](https://github.com/isaacus-dev/isaacus-typescript/commit/9ccb2af27350bf9eca2c27045af6161bc5168cc6))
* update @stainless-api/prism-cli to v5.15.0 ([cd4e751](https://github.com/isaacus-dev/isaacus-typescript/commit/cd4e7513d64584f424ed25bd156218993acaf6b2))
* update CI script ([1674d7e](https://github.com/isaacus-dev/isaacus-typescript/commit/1674d7efca5a5e4137f9fddfa5b00ae03e7b9d86))


### Documentation

* **sdk:** make embeddings example first ([3f1e94b](https://github.com/isaacus-dev/isaacus-typescript/commit/3f1e94bef779f5b0d45eba325fdc2947c0f10728))

## 0.11.0 (2025-07-24)

Full Changelog: [v0.10.0...v0.11.0](https://github.com/isaacus-dev/isaacus-typescript/compare/v0.10.0...v0.11.0)
Expand Down
48 changes: 21 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ const client = new Isaacus({
apiKey: process.env['ISAACUS_API_KEY'], // This is the default and can be omitted
});

const universalClassification = await client.classifications.universal.create({
model: 'kanon-universal-classifier',
query: 'This is a confidentiality clause.',
texts: ['I agree not to tell anyone about the document.'],
const embeddingResponse = await client.embeddings.create({
model: 'kanon-2-embedder',
texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'],
});

console.log(universalClassification.classifications);
console.log(embeddingResponse.embeddings);
```

### Request & Response types
Expand All @@ -47,13 +46,11 @@ const client = new Isaacus({
apiKey: process.env['ISAACUS_API_KEY'], // This is the default and can be omitted
});

const params: Isaacus.Classifications.UniversalCreateParams = {
model: 'kanon-universal-classifier',
query: 'This is a confidentiality clause.',
texts: ['I agree not to tell anyone about the document.'],
const params: Isaacus.EmbeddingCreateParams = {
model: 'kanon-2-embedder',
texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'],
};
const universalClassification: Isaacus.Classifications.UniversalClassification =
await client.classifications.universal.create(params);
const embeddingResponse: Isaacus.EmbeddingResponse = await client.embeddings.create(params);
```

Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
Expand All @@ -66,11 +63,10 @@ a subclass of `APIError` will be thrown:

<!-- prettier-ignore -->
```ts
const universalClassification = await client.classifications.universal
const embeddingResponse = await client.embeddings
.create({
model: 'kanon-universal-classifier',
query: 'This is a confidentiality clause.',
texts: ['I agree not to tell anyone about the document.'],
model: 'kanon-2-embedder',
texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'],
})
.catch(async (err) => {
if (err instanceof Isaacus.APIError) {
Expand Down Expand Up @@ -112,7 +108,7 @@ const client = new Isaacus({
});

// Or, configure per-request:
await client.classifications.universal.create({ model: 'kanon-universal-classifier', query: 'This is a confidentiality clause.', texts: ['I agree not to tell anyone about the document.'] }, {
await client.embeddings.create({ model: 'kanon-2-embedder', texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'] }, {
maxRetries: 5,
});
```
Expand All @@ -129,7 +125,7 @@ const client = new Isaacus({
});

// Override per-request:
await client.classifications.universal.create({ model: 'kanon-universal-classifier', query: 'This is a confidentiality clause.', texts: ['I agree not to tell anyone about the document.'] }, {
await client.embeddings.create({ model: 'kanon-2-embedder', texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'] }, {
timeout: 5 * 1000,
});
```
Expand All @@ -152,25 +148,23 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
```ts
const client = new Isaacus();

const response = await client.classifications.universal
const response = await client.embeddings
.create({
model: 'kanon-universal-classifier',
query: 'This is a confidentiality clause.',
texts: ['I agree not to tell anyone about the document.'],
model: 'kanon-2-embedder',
texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'],
})
.asResponse();
console.log(response.headers.get('X-My-Header'));
console.log(response.statusText); // access the underlying Response object

const { data: universalClassification, response: raw } = await client.classifications.universal
const { data: embeddingResponse, response: raw } = await client.embeddings
.create({
model: 'kanon-universal-classifier',
query: 'This is a confidentiality clause.',
texts: ['I agree not to tell anyone about the document.'],
model: 'kanon-2-embedder',
texts: ['Are restraints of trade enforceable under English law?', 'What is a non-compete clause?'],
})
.withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(universalClassification.classifications);
console.log(embeddingResponse.embeddings);
```

### Logging
Expand Down Expand Up @@ -250,7 +244,7 @@ parameter. This library doesn't validate at runtime that the request matches the
send will be sent as-is.

```ts
client.classifications.universal.create({
client.embeddings.create({
// ...
// @ts-expect-error baz is not yet public
baz: 'undocumented option',
Expand Down
22 changes: 16 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
# Embeddings

Types:

- <code><a href="./src/resources/embeddings.ts">EmbeddingResponse</a></code>

Methods:

- <code title="post /embeddings">client.embeddings.<a href="./src/resources/embeddings.ts">create</a>({ ...params }) -> EmbeddingResponse</code>

# Classifications

## Universal

Types:

- <code><a href="./src/resources/classifications/universal.ts">UniversalClassification</a></code>
- <code><a href="./src/resources/classifications/universal.ts">UniversalClassificationResponse</a></code>

Methods:

- <code title="post /classifications/universal">client.classifications.universal.<a href="./src/resources/classifications/universal.ts">create</a>({ ...params }) -> UniversalClassification</code>
- <code title="post /classifications/universal">client.classifications.universal.<a href="./src/resources/classifications/universal.ts">create</a>({ ...params }) -> UniversalClassificationResponse</code>

# Rerankings

Types:

- <code><a href="./src/resources/rerankings.ts">Reranking</a></code>
- <code><a href="./src/resources/rerankings.ts">RerankingResponse</a></code>

Methods:

- <code title="post /rerankings">client.rerankings.<a href="./src/resources/rerankings.ts">create</a>({ ...params }) -> Reranking</code>
- <code title="post /rerankings">client.rerankings.<a href="./src/resources/rerankings.ts">create</a>({ ...params }) -> RerankingResponse</code>

# Extractions

## Qa

Types:

- <code><a href="./src/resources/extractions/qa.ts">AnswerExtraction</a></code>
- <code><a href="./src/resources/extractions/qa.ts">AnswerExtractionResponse</a></code>

Methods:

- <code title="post /extractions/qa">client.extractions.qa.<a href="./src/resources/extractions/qa.ts">create</a>({ ...params }) -> AnswerExtraction</code>
- <code title="post /extractions/qa">client.extractions.qa.<a href="./src/resources/extractions/qa.ts">create</a>({ ...params }) -> AnswerExtractionResponse</code>
2 changes: 1 addition & 1 deletion bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ else
fi

# Publish with the appropriate tag
yarn publish --access public --tag "$TAG"
yarn publish --tag "$TAG"
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isaacus",
"version": "0.11.0",
"version": "0.11.1",
"description": "The official TypeScript library for the Isaacus API",
"author": "Isaacus <[email protected]>",
"types": "dist/index.d.ts",
Expand All @@ -13,6 +13,9 @@
"**/*"
],
"private": false,
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "./scripts/test",
"build": "./scripts/build",
Expand Down Expand Up @@ -41,15 +44,12 @@
"publint": "^0.2.12",
"ts-jest": "^29.1.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "5.8.3",
"typescript-eslint": "8.31.1"
},
"imports": {
"isaacus": ".",
"isaacus/*": "./src/*"
},
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
Loading