toolpack-sdk 2.0.0 → 2.1.0

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.cts CHANGED
@@ -991,6 +991,15 @@ interface ModeConfig {
991
991
  * Shorthand for "no tool calls at all".
992
992
  */
993
993
  blockAllTools: boolean;
994
+ /**
995
+ * Response format constraint for all requests in this mode.
996
+ * - 'json_object': instructs the model to return valid JSON as its text content.
997
+ * Useful for evaluator/parser agents whose final response must be machine-readable.
998
+ * Tool-call rounds are unaffected — the model still returns functionCall parts
999
+ * normally; the format only applies to text content.
1000
+ * - 'text' (default): plain text, no constraint.
1001
+ */
1002
+ response_format?: 'text' | 'json_object';
994
1003
  }
995
1004
  /**
996
1005
  * A lightweight reference to a mode, used in tool-blocked hints.
@@ -1369,7 +1378,7 @@ interface VertexAIConfig {
1369
1378
  };
1370
1379
  }
1371
1380
  declare class VertexAIAdapter extends ProviderAdapter {
1372
- private vertexAI;
1381
+ private ai;
1373
1382
  private readonly location;
1374
1383
  constructor(config?: VertexAIConfig);
1375
1384
  getDisplayName(): string;
@@ -1377,7 +1386,7 @@ declare class VertexAIAdapter extends ProviderAdapter {
1377
1386
  generate(request: CompletionRequest): Promise<CompletionResponse>;
1378
1387
  stream(request: CompletionRequest): AsyncGenerator<CompletionChunk>;
1379
1388
  embed(_request: EmbeddingRequest): Promise<EmbeddingResponse>;
1380
- private buildModel;
1389
+ private buildRequestParams;
1381
1390
  private formatHistory;
1382
1391
  private contentToParts;
1383
1392
  private parseResponse;
@@ -2363,6 +2372,11 @@ declare function createMode(config: {
2363
2372
  blockedTools?: string[];
2364
2373
  /** If true, no tools at all (pure conversation). Default: false. */
2365
2374
  blockAllTools?: boolean;
2375
+ /**
2376
+ * Response format for all requests in this mode.
2377
+ * Use 'json_object' for evaluator/parser agents that must return valid JSON.
2378
+ */
2379
+ response_format?: 'text' | 'json_object';
2366
2380
  /** Base context configuration. Controls working directory and tool category injection. */
2367
2381
  baseContext?: {
2368
2382
  includeWorkingDirectory?: boolean;
package/dist/index.d.ts CHANGED
@@ -991,6 +991,15 @@ interface ModeConfig {
991
991
  * Shorthand for "no tool calls at all".
992
992
  */
993
993
  blockAllTools: boolean;
994
+ /**
995
+ * Response format constraint for all requests in this mode.
996
+ * - 'json_object': instructs the model to return valid JSON as its text content.
997
+ * Useful for evaluator/parser agents whose final response must be machine-readable.
998
+ * Tool-call rounds are unaffected — the model still returns functionCall parts
999
+ * normally; the format only applies to text content.
1000
+ * - 'text' (default): plain text, no constraint.
1001
+ */
1002
+ response_format?: 'text' | 'json_object';
994
1003
  }
995
1004
  /**
996
1005
  * A lightweight reference to a mode, used in tool-blocked hints.
@@ -1369,7 +1378,7 @@ interface VertexAIConfig {
1369
1378
  };
1370
1379
  }
1371
1380
  declare class VertexAIAdapter extends ProviderAdapter {
1372
- private vertexAI;
1381
+ private ai;
1373
1382
  private readonly location;
1374
1383
  constructor(config?: VertexAIConfig);
1375
1384
  getDisplayName(): string;
@@ -1377,7 +1386,7 @@ declare class VertexAIAdapter extends ProviderAdapter {
1377
1386
  generate(request: CompletionRequest): Promise<CompletionResponse>;
1378
1387
  stream(request: CompletionRequest): AsyncGenerator<CompletionChunk>;
1379
1388
  embed(_request: EmbeddingRequest): Promise<EmbeddingResponse>;
1380
- private buildModel;
1389
+ private buildRequestParams;
1381
1390
  private formatHistory;
1382
1391
  private contentToParts;
1383
1392
  private parseResponse;
@@ -2363,6 +2372,11 @@ declare function createMode(config: {
2363
2372
  blockedTools?: string[];
2364
2373
  /** If true, no tools at all (pure conversation). Default: false. */
2365
2374
  blockAllTools?: boolean;
2375
+ /**
2376
+ * Response format for all requests in this mode.
2377
+ * Use 'json_object' for evaluator/parser agents that must return valid JSON.
2378
+ */
2379
+ response_format?: 'text' | 'json_object';
2366
2380
  /** Base context configuration. Controls working directory and tool category injection. */
2367
2381
  baseContext?: {
2368
2382
  includeWorkingDirectory?: boolean;