@wice24/tars-sdk 0.1.5 → 0.1.6

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @wice24/tars-sdk
2
2
 
3
- TypeScript client for [TARS](https://github.com/meridian-capital/tars) — a
3
+ TypeScript client for [TARS](https://github.com/LegendariTech/tars) — a
4
4
  self-hosted managed-agents platform: server-side agent loops in sandboxes,
5
5
  an append-only session event log with SSE streaming + replay, client-executed
6
6
  tools, per-end-user MCP credentials, skills, files, and usage metering.
@@ -22,7 +22,7 @@ const tars = new TarsClient({
22
22
  const agent = await tars.agents.create({
23
23
  name: 'assistant',
24
24
  system: 'You are a helpful assistant.',
25
- model: 'anthropic/claude-sonnet-5',
25
+ model: 'openrouter/anthropic/claude-sonnet-5',
26
26
  });
27
27
 
28
28
  const session = await tars.sessions.create({ agentId: agent.id });
package/dist/index.d.ts CHANGED
@@ -268,6 +268,11 @@ export declare class TarsSession {
268
268
  file: FileMeta;
269
269
  mount_path: string;
270
270
  }>;
271
+ /** Abort the in-flight turn, if any. Idempotent. */
272
+ interrupt(): Promise<{
273
+ ok: boolean;
274
+ interrupted: boolean;
275
+ }>;
271
276
  destroy(): Promise<{
272
277
  ok: boolean;
273
278
  }>;
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ export class TarsClient {
144
144
  return this.request('DELETE', `/v1/mcp-credentials?${params}`);
145
145
  },
146
146
  };
147
- // ── usage ────────────────────────────────────────────────────
147
+ // ── skills ───────────────────────────────────────────────────
148
148
  // Versioned skill bundles (zip with SKILL.md at root), pinned per agent.
149
149
  skills = {
150
150
  create: (input) => this.request('POST', '/v1/skills', { slug: input.slug, display_title: input.displayTitle }),
@@ -163,6 +163,7 @@ export class TarsClient {
163
163
  return res.json();
164
164
  },
165
165
  };
166
+ // ── api keys / identity ──────────────────────────────────────
166
167
  apiKeys = {
167
168
  create: (input) => this.request('POST', '/v1/api-keys', { ...(input?.name ? { name: input.name } : {}) }),
168
169
  list: async () => (await this.request('GET', '/v1/api-keys')).keys,
@@ -194,6 +195,7 @@ export class TarsClient {
194
195
  },
195
196
  stats: () => this.request('GET', '/v1/admin/stats'),
196
197
  };
198
+ // ── completions / providers (any key) ────────────────────────
197
199
  // Cheap non-session completion (titles and other one-shots) — routed
198
200
  // through the same provider seam as agent turns.
199
201
  completions = {
@@ -214,6 +216,7 @@ export class TarsClient {
214
216
  const body = await this.request('GET', '/v1/providers');
215
217
  return body.providers ?? [];
216
218
  }
219
+ // ── usage ────────────────────────────────────────────────────
217
220
  usage = {
218
221
  // Aggregated token/cost usage for this tenant, with per-model, per-agent,
219
222
  // and per-end-user breakdowns. Dates are ISO 8601; sessionId narrows to one
@@ -437,6 +440,10 @@ export class TarsSession {
437
440
  const { mount_path } = await this.mountFile(file.id, input.mountPath);
438
441
  return { file, mount_path };
439
442
  }
443
+ /** Abort the in-flight turn, if any. Idempotent. */
444
+ interrupt() {
445
+ return this.client.sessions.interrupt(this.info.id);
446
+ }
440
447
  destroy() {
441
448
  return this.client.sessions.destroy(this.info.id);
442
449
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wice24/tars-sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Client SDK for TARS — the self-hosted managed-agents platform (sessions, streaming turns, client tools, MCP credentials, skills, files, usage, tenant administration)",
5
5
  "type": "module",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "repository": {
30
30
  "type": "git",
31
- "url": "git+https://github.com/meridian-capital/tars.git",
31
+ "url": "git+https://github.com/LegendariTech/tars.git",
32
32
  "directory": "sdk"
33
33
  },
34
34
  "publishConfig": {