@wice24/tars-sdk 0.2.3 → 0.2.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.
Files changed (2) hide show
  1. package/dist/types.d.ts +41 -0
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -67,6 +67,17 @@ export type SessionEvent = {
67
67
  } & ({
68
68
  status: 'connected';
69
69
  tool_count: number;
70
+ /** The tool names the model received from this server (its own
71
+ * unprefixed names, in server order) — what `tool_count` counts.
72
+ * Absent on rows journaled by servers before 0.2.4. */
73
+ tools?: string[];
74
+ /** Offered by the server but removed by the declaration's policy:
75
+ * the `blocked_tools` it offered (deny), or everything not in
76
+ * `tools` (allow). Empty with no policy. Absent before 0.2.4. */
77
+ filtered_out?: string[];
78
+ /** Either list was cut — at 256 names, a 200-character name, or
79
+ * the row's character budget; `tool_count` stays exact. */
80
+ truncated?: true;
70
81
  } | {
71
82
  status: 'failed';
72
83
  code: AgentErrorCode;
@@ -309,6 +320,30 @@ export interface CreateAgentInput {
309
320
  mcp_servers?: McpServer[] | null;
310
321
  }
311
322
  export type UpdateAgentInput = Partial<CreateAgentInput>;
323
+ /** A client-executed tool as a session stores it: the wire declaration,
324
+ * without `execute` (that runs in your app) — the same shape as a
325
+ * `SessionInfo.custom_tools` element. */
326
+ export interface SessionClientTool {
327
+ name: string;
328
+ description: string;
329
+ input_schema: Record<string, unknown>;
330
+ timeout_sec?: number;
331
+ }
332
+ /**
333
+ * The complete tool surface a session's turns are built with, as declared:
334
+ * the enabled built-ins with the descriptions the model is shown, the
335
+ * client-executed tools, and the MCP servers with their `tools` /
336
+ * `blocked_tools` policy. What each MCP server actually contributed on a
337
+ * given turn is in that turn's `mcp_connect` event (`tools` / `filtered_out`).
338
+ */
339
+ export interface SessionToolSurface {
340
+ builtin: Array<{
341
+ name: BuiltInTool;
342
+ description: string;
343
+ }>;
344
+ client: SessionClientTool[];
345
+ mcp_servers: McpServer[];
346
+ }
312
347
  export interface SessionInfo {
313
348
  id: string;
314
349
  status: SessionStatus;
@@ -328,6 +363,12 @@ export interface SessionInfo {
328
363
  input_schema: Record<string, unknown>;
329
364
  timeout_sec?: number;
330
365
  }> | null;
366
+ /**
367
+ * The declared tool surface (built-ins, client tools, MCP servers with
368
+ * policy) the session's turns run with. Optional: absent from servers
369
+ * predating this field.
370
+ */
371
+ tools?: SessionToolSurface;
331
372
  /**
332
373
  * The EFFECTIVE system prompt the session's turns run with — agent base
333
374
  * prompt + session system_suffix + skills appendix, fused at creation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wice24/tars-sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
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": {