@wice24/tars-sdk 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -0
- package/dist/index.js +10 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -149,6 +149,13 @@ export declare class TarsClient {
|
|
|
149
149
|
};
|
|
150
150
|
}>;
|
|
151
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* Which model providers this instance is keyed for (`anthropic`, `openai`,
|
|
154
|
+
* `openrouter`, `custom`). Ask before OFFERING models: a picker listing GPT
|
|
155
|
+
* models on an instance with no OpenAI key produces turns that all fail at
|
|
156
|
+
* the provider call.
|
|
157
|
+
*/
|
|
158
|
+
providers(): Promise<string[]>;
|
|
152
159
|
readonly usage: {
|
|
153
160
|
get: (filter?: {
|
|
154
161
|
from?: string | Date;
|
package/dist/index.js
CHANGED
|
@@ -178,6 +178,16 @@ export class TarsClient {
|
|
|
178
178
|
...(input.maxTokens ? { max_tokens: input.maxTokens } : {}),
|
|
179
179
|
}),
|
|
180
180
|
};
|
|
181
|
+
/**
|
|
182
|
+
* Which model providers this instance is keyed for (`anthropic`, `openai`,
|
|
183
|
+
* `openrouter`, `custom`). Ask before OFFERING models: a picker listing GPT
|
|
184
|
+
* models on an instance with no OpenAI key produces turns that all fail at
|
|
185
|
+
* the provider call.
|
|
186
|
+
*/
|
|
187
|
+
async providers() {
|
|
188
|
+
const body = await this.request('GET', '/v1/providers');
|
|
189
|
+
return body.providers ?? [];
|
|
190
|
+
}
|
|
181
191
|
usage = {
|
|
182
192
|
// Aggregated token/cost usage for this tenant, with per-model, per-agent,
|
|
183
193
|
// and per-end-user breakdowns. Dates are ISO 8601; sessionId narrows to one
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wice24/tars-sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Client SDK for TARS
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Client SDK for TARS — the self-hosted managed-agents platform (sessions, streaming turns, client tools, MCP credentials, skills, files, usage)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|