@gitbook/api 0.135.0 → 0.136.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/client.d.ts CHANGED
@@ -5353,13 +5353,6 @@ export declare enum AIModel {
5353
5353
  ReasoningMedium = "reasoning-medium",
5354
5354
  ReasoningHigh = "reasoning-high"
5355
5355
  }
5356
- /** Confirmation to display to the user when the AI requires the user to confirm a tool call. */
5357
- export interface AIToolConfirmation {
5358
- /** Label to display in the UI when the user is prompted to confirm this tool. */
5359
- label: string;
5360
- /** Icon to display in the UI when the user is prompted to confirm this tool. */
5361
- icon?: Icon;
5362
- }
5363
5356
  /** Description of a tool that can be called from an AI agent. */
5364
5357
  export interface AIToolDefinition {
5365
5358
  /** The name of the tool. It should be unique within the agent. */
@@ -5376,8 +5369,6 @@ export interface AIToolDefinition {
5376
5369
  [key: string]: any;
5377
5370
  }>;
5378
5371
  };
5379
- /** Confirmation to display to the user when the AI requires the user to confirm a tool call. */
5380
- confirmation: AIToolConfirmation;
5381
5372
  }
5382
5373
  /** Summary of a generic tool call. */
5383
5374
  export interface AIToolCallOtherSummary {
@@ -5395,7 +5386,7 @@ export interface AIToolCallResult {
5395
5386
  /** The output to the tool call. */
5396
5387
  output: object;
5397
5388
  /** Summary of a generic tool call. */
5398
- summary: AIToolCallOtherSummary;
5389
+ summary?: AIToolCallOtherSummary;
5399
5390
  }
5400
5391
  /** Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests. */
5401
5392
  export interface AIStreamResponseFinish {
@@ -5549,24 +5540,22 @@ export interface AIStreamResponseToolCall {
5549
5540
  stepIndex: number;
5550
5541
  toolCall: AIToolCall;
5551
5542
  }
5552
- /** Message emitted by the server to indicate that the AI requires the user to confirm a tool call. */
5553
- export interface AIStreamResponseToolConfirm {
5554
- type: 'response_tool_confirm';
5543
+ /** Message emitted by the server to indicate that the AI is calling a client-side tool. */
5544
+ export interface AIStreamResponseToolCallPending {
5545
+ type: 'response_tool_call_pending';
5555
5546
  /** The ID of the message that this event is composing. */
5556
5547
  messageId: string;
5557
5548
  /** The index of the step of the message that this event is composing. */
5558
5549
  stepIndex: number;
5559
- /** The tool call that the AI requires the user to confirm. */
5550
+ /** The tool call that the AI is calling. */
5560
5551
  toolCall: {
5561
- /** The name of the tool that the AI requires the user to confirm. */
5552
+ /** The name of the tool that the AI is calling. */
5562
5553
  tool: string;
5563
5554
  /** The input to the tool call. */
5564
5555
  input: object;
5565
5556
  };
5566
- /** The ID of the tool call that the AI requires the user to confirm. */
5557
+ /** The ID of the tool call that the AI is calling. */
5567
5558
  toolCallId: string;
5568
- /** Confirmation to display to the user when the AI requires the user to confirm a tool call. */
5569
- toolConfirmation: AIToolConfirmation;
5570
5559
  }
5571
5560
  /** Message emitted by the server to suggest a followup message the user could respond with. */
5572
5561
  export interface AIStreamResponseFollowupSuggestion {
@@ -5575,7 +5564,7 @@ export interface AIStreamResponseFollowupSuggestion {
5575
5564
  messageId: string;
5576
5565
  suggestions: string[];
5577
5566
  }
5578
- export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolConfirm | AIStreamResponseFollowupSuggestion;
5567
+ export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion;
5579
5568
  /** Analytics info on the GitBook's site session. */
5580
5569
  export interface SiteInsightsEventSession {
5581
5570
  /** GitBook's unique identifier of the visitor. */
package/dist/index.cjs CHANGED
@@ -279,7 +279,7 @@ module.exports = __toCommonJS(src_exports);
279
279
 
280
280
  // package.json
281
281
  var name = "@gitbook/api";
282
- var version = "0.135.0";
282
+ var version = "0.136.0";
283
283
 
284
284
  // src/client.ts
285
285
  var import_event_iterator = __toESM(require_node(), 1);
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.135.0";
175
+ var version = "0.136.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.135.0",
7
+ "version": "0.136.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -34018,23 +34018,6 @@
34018
34018
  "reasoning-high"
34019
34019
  ]
34020
34020
  },
34021
- "AIToolConfirmation": {
34022
- "type": "object",
34023
- "description": "Confirmation to display to the user when the AI requires the user to confirm a tool call.",
34024
- "properties": {
34025
- "label": {
34026
- "type": "string",
34027
- "description": "Label to display in the UI when the user is prompted to confirm this tool."
34028
- },
34029
- "icon": {
34030
- "description": "Icon to display in the UI when the user is prompted to confirm this tool.",
34031
- "$ref": "#/components/schemas/Icon"
34032
- }
34033
- },
34034
- "required": [
34035
- "label"
34036
- ]
34037
- },
34038
34021
  "AIToolDefinition": {
34039
34022
  "type": "object",
34040
34023
  "description": "Description of a tool that can be called from an AI agent.",
@@ -34089,9 +34072,6 @@
34089
34072
  "type",
34090
34073
  "properties"
34091
34074
  ]
34092
- },
34093
- "confirmation": {
34094
- "$ref": "#/components/schemas/AIToolConfirmation"
34095
34075
  }
34096
34076
  },
34097
34077
  "required": [
@@ -34123,8 +34103,7 @@
34123
34103
  "required": [
34124
34104
  "tool",
34125
34105
  "toolCallId",
34126
- "output",
34127
- "summary"
34106
+ "output"
34128
34107
  ],
34129
34108
  "properties": {
34130
34109
  "tool": {
@@ -34690,14 +34669,14 @@
34690
34669
  "toolCall"
34691
34670
  ]
34692
34671
  },
34693
- "AIStreamResponseToolConfirm": {
34672
+ "AIStreamResponseToolCallPending": {
34694
34673
  "type": "object",
34695
- "description": "Message emitted by the server to indicate that the AI requires the user to confirm a tool call.\n",
34674
+ "description": "Message emitted by the server to indicate that the AI is calling a client-side tool.\n",
34696
34675
  "properties": {
34697
34676
  "type": {
34698
34677
  "type": "string",
34699
34678
  "enum": [
34700
- "response_tool_confirm"
34679
+ "response_tool_call_pending"
34701
34680
  ]
34702
34681
  },
34703
34682
  "messageId": {
@@ -34710,7 +34689,7 @@
34710
34689
  },
34711
34690
  "toolCall": {
34712
34691
  "type": "object",
34713
- "description": "The tool call that the AI requires the user to confirm.",
34692
+ "description": "The tool call that the AI is calling.",
34714
34693
  "required": [
34715
34694
  "tool",
34716
34695
  "input"
@@ -34718,7 +34697,7 @@
34718
34697
  "properties": {
34719
34698
  "tool": {
34720
34699
  "type": "string",
34721
- "description": "The name of the tool that the AI requires the user to confirm."
34700
+ "description": "The name of the tool that the AI is calling."
34722
34701
  },
34723
34702
  "input": {
34724
34703
  "type": "object",
@@ -34728,10 +34707,7 @@
34728
34707
  },
34729
34708
  "toolCallId": {
34730
34709
  "type": "string",
34731
- "description": "The ID of the tool call that the AI requires the user to confirm."
34732
- },
34733
- "toolConfirmation": {
34734
- "$ref": "#/components/schemas/AIToolConfirmation"
34710
+ "description": "The ID of the tool call that the AI is calling."
34735
34711
  }
34736
34712
  },
34737
34713
  "required": [
@@ -34739,8 +34715,7 @@
34739
34715
  "messageId",
34740
34716
  "stepIndex",
34741
34717
  "toolCall",
34742
- "toolCallId",
34743
- "toolConfirmation"
34718
+ "toolCallId"
34744
34719
  ]
34745
34720
  },
34746
34721
  "AIStreamResponseFollowupSuggestion": {
@@ -34786,7 +34761,7 @@
34786
34761
  "$ref": "#/components/schemas/AIStreamResponseToolCall"
34787
34762
  },
34788
34763
  {
34789
- "$ref": "#/components/schemas/AIStreamResponseToolConfirm"
34764
+ "$ref": "#/components/schemas/AIStreamResponseToolCallPending"
34790
34765
  },
34791
34766
  {
34792
34767
  "$ref": "#/components/schemas/AIStreamResponseFollowupSuggestion"
package/spec/openapi.yaml CHANGED
@@ -21042,18 +21042,6 @@ components:
21042
21042
  - reasoning-low
21043
21043
  - reasoning-medium
21044
21044
  - reasoning-high
21045
- AIToolConfirmation:
21046
- type: object
21047
- description: Confirmation to display to the user when the AI requires the user to confirm a tool call.
21048
- properties:
21049
- label:
21050
- type: string
21051
- description: Label to display in the UI when the user is prompted to confirm this tool.
21052
- icon:
21053
- description: Icon to display in the UI when the user is prompted to confirm this tool.
21054
- $ref: "#/components/schemas/Icon"
21055
- required:
21056
- - label
21057
21045
  AIToolDefinition:
21058
21046
  type: object
21059
21047
  description: Description of a tool that can be called from an AI agent.
@@ -21095,8 +21083,6 @@ components:
21095
21083
  required:
21096
21084
  - type
21097
21085
  - properties
21098
- confirmation:
21099
- $ref: "#/components/schemas/AIToolConfirmation"
21100
21086
  required:
21101
21087
  - name
21102
21088
  - description
@@ -21120,7 +21106,6 @@ components:
21120
21106
  - tool
21121
21107
  - toolCallId
21122
21108
  - output
21123
- - summary
21124
21109
  properties:
21125
21110
  tool:
21126
21111
  type: string
@@ -21521,15 +21506,15 @@ components:
21521
21506
  - messageId
21522
21507
  - stepIndex
21523
21508
  - toolCall
21524
- AIStreamResponseToolConfirm:
21509
+ AIStreamResponseToolCallPending:
21525
21510
  type: object
21526
21511
  description: |
21527
- Message emitted by the server to indicate that the AI requires the user to confirm a tool call.
21512
+ Message emitted by the server to indicate that the AI is calling a client-side tool.
21528
21513
  properties:
21529
21514
  type:
21530
21515
  type: string
21531
21516
  enum:
21532
- - response_tool_confirm
21517
+ - response_tool_call_pending
21533
21518
  messageId:
21534
21519
  type: string
21535
21520
  description: |
@@ -21540,29 +21525,26 @@ components:
21540
21525
  The index of the step of the message that this event is composing.
21541
21526
  toolCall:
21542
21527
  type: object
21543
- description: The tool call that the AI requires the user to confirm.
21528
+ description: The tool call that the AI is calling.
21544
21529
  required:
21545
21530
  - tool
21546
21531
  - input
21547
21532
  properties:
21548
21533
  tool:
21549
21534
  type: string
21550
- description: The name of the tool that the AI requires the user to confirm.
21535
+ description: The name of the tool that the AI is calling.
21551
21536
  input:
21552
21537
  type: object
21553
21538
  description: The input to the tool call.
21554
21539
  toolCallId:
21555
21540
  type: string
21556
- description: The ID of the tool call that the AI requires the user to confirm.
21557
- toolConfirmation:
21558
- $ref: "#/components/schemas/AIToolConfirmation"
21541
+ description: The ID of the tool call that the AI is calling.
21559
21542
  required:
21560
21543
  - type
21561
21544
  - messageId
21562
21545
  - stepIndex
21563
21546
  - toolCall
21564
21547
  - toolCallId
21565
- - toolConfirmation
21566
21548
  AIStreamResponseFollowupSuggestion:
21567
21549
  type: object
21568
21550
  description: |
@@ -21592,7 +21574,7 @@ components:
21592
21574
  - $ref: "#/components/schemas/AIStreamResponseDocument"
21593
21575
  - $ref: "#/components/schemas/AIStreamResponseObject"
21594
21576
  - $ref: "#/components/schemas/AIStreamResponseToolCall"
21595
- - $ref: "#/components/schemas/AIStreamResponseToolConfirm"
21577
+ - $ref: "#/components/schemas/AIStreamResponseToolCallPending"
21596
21578
  - $ref: "#/components/schemas/AIStreamResponseFollowupSuggestion"
21597
21579
  SiteInsightsEventSession:
21598
21580
  type: object