@gitbook/api 0.134.0 → 0.135.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 +85 -12
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/spec/openapi.json +244 -63
- package/spec/openapi.yaml +178 -38
package/dist/client.d.ts
CHANGED
|
@@ -789,7 +789,7 @@ export interface DocumentTableViewCards {
|
|
|
789
789
|
}
|
|
790
790
|
export interface DocumentTableRecord {
|
|
791
791
|
orderIndex: string;
|
|
792
|
-
values: Record<string, number | string | boolean | string[] | ContentRef>;
|
|
792
|
+
values: Record<string, number | string | null | boolean | string[] | ContentRef>;
|
|
793
793
|
}
|
|
794
794
|
export interface DocumentTableDefinitionBase {
|
|
795
795
|
id: string;
|
|
@@ -2538,6 +2538,7 @@ export declare enum IntegrationScope {
|
|
|
2538
2538
|
SiteVisitorAuth = "site:visitor:auth",
|
|
2539
2539
|
SiteAdaptiveRead = "site:adaptive:read",
|
|
2540
2540
|
SiteAdaptiveWrite = "site:adaptive:write",
|
|
2541
|
+
SiteAiAsk = "site:ai:ask",
|
|
2541
2542
|
OpenapiRead = "openapi:read",
|
|
2542
2543
|
OpenapiWrite = "openapi:write",
|
|
2543
2544
|
ConversationsIngest = "conversations:ingest"
|
|
@@ -5014,7 +5015,8 @@ export declare enum CustomizationThemeMode {
|
|
|
5014
5015
|
export declare enum CustomizationAIMode {
|
|
5015
5016
|
None = "none",
|
|
5016
5017
|
Search = "search",
|
|
5017
|
-
Assistant = "assistant"
|
|
5018
|
+
Assistant = "assistant",
|
|
5019
|
+
Integration = "integration"
|
|
5018
5020
|
}
|
|
5019
5021
|
/**
|
|
5020
5022
|
* How external links should open when clicked.
|
|
@@ -5128,6 +5130,8 @@ export interface SiteCustomizationSettings {
|
|
|
5128
5130
|
};
|
|
5129
5131
|
ai: {
|
|
5130
5132
|
mode: CustomizationAIMode;
|
|
5133
|
+
/** The integration to use for the AI features on the site. Only required if mode is set to "integration". */
|
|
5134
|
+
integrationId?: string;
|
|
5131
5135
|
};
|
|
5132
5136
|
advancedCustomization: {
|
|
5133
5137
|
/** If true, Advanced customization is enabled */
|
|
@@ -5349,6 +5353,50 @@ export declare enum AIModel {
|
|
|
5349
5353
|
ReasoningMedium = "reasoning-medium",
|
|
5350
5354
|
ReasoningHigh = "reasoning-high"
|
|
5351
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
|
+
/** Description of a tool that can be called from an AI agent. */
|
|
5364
|
+
export interface AIToolDefinition {
|
|
5365
|
+
/** The name of the tool. It should be unique within the agent. */
|
|
5366
|
+
name: string;
|
|
5367
|
+
/** The description of the tool, passed to the AI agent. */
|
|
5368
|
+
description: string;
|
|
5369
|
+
/** JSON schema describing the input of the tool. */
|
|
5370
|
+
inputSchema?: {
|
|
5371
|
+
type: 'object';
|
|
5372
|
+
properties: Record<string, {
|
|
5373
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
5374
|
+
/** Description of the property. */
|
|
5375
|
+
description: string;
|
|
5376
|
+
[key: string]: any;
|
|
5377
|
+
}>;
|
|
5378
|
+
};
|
|
5379
|
+
/** Confirmation to display to the user when the AI requires the user to confirm a tool call. */
|
|
5380
|
+
confirmation: AIToolConfirmation;
|
|
5381
|
+
}
|
|
5382
|
+
/** Summary of a generic tool call. */
|
|
5383
|
+
export interface AIToolCallOtherSummary {
|
|
5384
|
+
/** Name of the icon */
|
|
5385
|
+
icon: Icon;
|
|
5386
|
+
/** Text to display to the user to describe the tool call. */
|
|
5387
|
+
text: string;
|
|
5388
|
+
}
|
|
5389
|
+
/** Result of a tool call. */
|
|
5390
|
+
export interface AIToolCallResult {
|
|
5391
|
+
/** The name of the tool that was called. */
|
|
5392
|
+
tool: string;
|
|
5393
|
+
/** The ID of the tool call. */
|
|
5394
|
+
toolCallId: string;
|
|
5395
|
+
/** The output to the tool call. */
|
|
5396
|
+
output: object;
|
|
5397
|
+
/** Summary of a generic tool call. */
|
|
5398
|
+
summary: AIToolCallOtherSummary;
|
|
5399
|
+
}
|
|
5352
5400
|
/** 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. */
|
|
5353
5401
|
export interface AIStreamResponseFinish {
|
|
5354
5402
|
type: 'response_finish';
|
|
@@ -5485,7 +5533,13 @@ export interface AIToolCallMCP {
|
|
|
5485
5533
|
/** The title of the tool that has been called. */
|
|
5486
5534
|
mcpToolTitle?: string;
|
|
5487
5535
|
}
|
|
5488
|
-
|
|
5536
|
+
/** Any tool call that is unknown by GitBook */
|
|
5537
|
+
export interface AIToolCallOther {
|
|
5538
|
+
tool: 'other';
|
|
5539
|
+
/** Summary of a generic tool call. */
|
|
5540
|
+
summary: AIToolCallOtherSummary;
|
|
5541
|
+
}
|
|
5542
|
+
export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateAgentTask | AIToolCallMCP | AIToolCallOther;
|
|
5489
5543
|
/** Message emitted by the server to indicate that the AI has called a tool. */
|
|
5490
5544
|
export interface AIStreamResponseToolCall {
|
|
5491
5545
|
type: 'response_tool_call';
|
|
@@ -5495,6 +5549,25 @@ export interface AIStreamResponseToolCall {
|
|
|
5495
5549
|
stepIndex: number;
|
|
5496
5550
|
toolCall: AIToolCall;
|
|
5497
5551
|
}
|
|
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';
|
|
5555
|
+
/** The ID of the message that this event is composing. */
|
|
5556
|
+
messageId: string;
|
|
5557
|
+
/** The index of the step of the message that this event is composing. */
|
|
5558
|
+
stepIndex: number;
|
|
5559
|
+
/** The tool call that the AI requires the user to confirm. */
|
|
5560
|
+
toolCall: {
|
|
5561
|
+
/** The name of the tool that the AI requires the user to confirm. */
|
|
5562
|
+
tool: string;
|
|
5563
|
+
/** The input to the tool call. */
|
|
5564
|
+
input: object;
|
|
5565
|
+
};
|
|
5566
|
+
/** The ID of the tool call that the AI requires the user to confirm. */
|
|
5567
|
+
toolCallId: string;
|
|
5568
|
+
/** Confirmation to display to the user when the AI requires the user to confirm a tool call. */
|
|
5569
|
+
toolConfirmation: AIToolConfirmation;
|
|
5570
|
+
}
|
|
5498
5571
|
/** Message emitted by the server to suggest a followup message the user could respond with. */
|
|
5499
5572
|
export interface AIStreamResponseFollowupSuggestion {
|
|
5500
5573
|
type: 'response_followup_suggestion';
|
|
@@ -5502,7 +5575,7 @@ export interface AIStreamResponseFollowupSuggestion {
|
|
|
5502
5575
|
messageId: string;
|
|
5503
5576
|
suggestions: string[];
|
|
5504
5577
|
}
|
|
5505
|
-
export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseFollowupSuggestion;
|
|
5578
|
+
export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolConfirm | AIStreamResponseFollowupSuggestion;
|
|
5506
5579
|
/** Analytics info on the GitBook's site session. */
|
|
5507
5580
|
export interface SiteInsightsEventSession {
|
|
5508
5581
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -12496,16 +12569,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12496
12569
|
streamAiResponseInSite: (organizationId: string, siteId: string, data: {
|
|
12497
12570
|
/** The ID of the previous response to continue from */
|
|
12498
12571
|
previousResponseId?: string;
|
|
12572
|
+
/** The messages to send to the AI agent. */
|
|
12499
12573
|
input: AIMessageInput[];
|
|
12500
|
-
|
|
12574
|
+
/** @deprecated */
|
|
12575
|
+
output?: AIOutputFormat;
|
|
12501
12576
|
model?: AIModel;
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
/**
|
|
12505
|
-
|
|
12506
|
-
}
|
|
12507
|
-
mode: "assistant";
|
|
12508
|
-
}), params?: RequestParams) => EventIterator<AIStreamResponse>;
|
|
12577
|
+
/** Custom tools to provide to the AI agent. */
|
|
12578
|
+
tools?: AIToolDefinition[];
|
|
12579
|
+
/** Result of a tool call. */
|
|
12580
|
+
toolCall?: AIToolCallResult;
|
|
12581
|
+
}, params?: RequestParams) => EventIterator<AIStreamResponse>;
|
|
12509
12582
|
/**
|
|
12510
12583
|
* @description Experimental operation to get an existing AI response in a site.
|
|
12511
12584
|
*
|
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.
|
|
282
|
+
var version = "0.135.0";
|
|
283
283
|
|
|
284
284
|
// src/client.ts
|
|
285
285
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -611,6 +611,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
611
611
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
612
612
|
IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
|
|
613
613
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
614
|
+
IntegrationScope2["SiteAiAsk"] = "site:ai:ask";
|
|
614
615
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
615
616
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
616
617
|
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
@@ -884,6 +885,7 @@ var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
|
|
|
884
885
|
CustomizationAIMode2["None"] = "none";
|
|
885
886
|
CustomizationAIMode2["Search"] = "search";
|
|
886
887
|
CustomizationAIMode2["Assistant"] = "assistant";
|
|
888
|
+
CustomizationAIMode2["Integration"] = "integration";
|
|
887
889
|
return CustomizationAIMode2;
|
|
888
890
|
})(CustomizationAIMode || {});
|
|
889
891
|
var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
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.
|
|
175
|
+
var version = "0.135.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -504,6 +504,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
504
504
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
505
505
|
IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
|
|
506
506
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
507
|
+
IntegrationScope2["SiteAiAsk"] = "site:ai:ask";
|
|
507
508
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
508
509
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
509
510
|
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
@@ -777,6 +778,7 @@ var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
|
|
|
777
778
|
CustomizationAIMode2["None"] = "none";
|
|
778
779
|
CustomizationAIMode2["Search"] = "search";
|
|
779
780
|
CustomizationAIMode2["Assistant"] = "assistant";
|
|
781
|
+
CustomizationAIMode2["Integration"] = "integration";
|
|
780
782
|
return CustomizationAIMode2;
|
|
781
783
|
})(CustomizationAIMode || {});
|
|
782
784
|
var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -15032,70 +15032,40 @@
|
|
|
15032
15032
|
"content": {
|
|
15033
15033
|
"application/json": {
|
|
15034
15034
|
"schema": {
|
|
15035
|
-
"
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
"
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
"items": {
|
|
15050
|
-
"$ref": "#/components/schemas/AIMessageInput"
|
|
15051
|
-
}
|
|
15052
|
-
},
|
|
15053
|
-
"output": {
|
|
15054
|
-
"$ref": "#/components/schemas/AIOutputFormat"
|
|
15055
|
-
},
|
|
15056
|
-
"model": {
|
|
15057
|
-
"$ref": "#/components/schemas/AIModel"
|
|
15058
|
-
}
|
|
15035
|
+
"type": "object",
|
|
15036
|
+
"required": [
|
|
15037
|
+
"input"
|
|
15038
|
+
],
|
|
15039
|
+
"properties": {
|
|
15040
|
+
"previousResponseId": {
|
|
15041
|
+
"type": "string",
|
|
15042
|
+
"description": "The ID of the previous response to continue from"
|
|
15043
|
+
},
|
|
15044
|
+
"input": {
|
|
15045
|
+
"type": "array",
|
|
15046
|
+
"description": "The messages to send to the AI agent.",
|
|
15047
|
+
"items": {
|
|
15048
|
+
"$ref": "#/components/schemas/AIMessageInput"
|
|
15059
15049
|
}
|
|
15060
15050
|
},
|
|
15061
|
-
{
|
|
15062
|
-
"
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
"type": "string",
|
|
15078
|
-
"description": "Custom instructions for the AI"
|
|
15079
|
-
}
|
|
15080
|
-
}
|
|
15081
|
-
},
|
|
15082
|
-
{
|
|
15083
|
-
"type": "object",
|
|
15084
|
-
"required": [
|
|
15085
|
-
"mode"
|
|
15086
|
-
],
|
|
15087
|
-
"properties": {
|
|
15088
|
-
"mode": {
|
|
15089
|
-
"type": "string",
|
|
15090
|
-
"enum": [
|
|
15091
|
-
"assistant"
|
|
15092
|
-
]
|
|
15093
|
-
}
|
|
15094
|
-
}
|
|
15095
|
-
}
|
|
15096
|
-
]
|
|
15051
|
+
"output": {
|
|
15052
|
+
"deprecated": true,
|
|
15053
|
+
"$ref": "#/components/schemas/AIOutputFormat"
|
|
15054
|
+
},
|
|
15055
|
+
"model": {
|
|
15056
|
+
"$ref": "#/components/schemas/AIModel"
|
|
15057
|
+
},
|
|
15058
|
+
"tools": {
|
|
15059
|
+
"type": "array",
|
|
15060
|
+
"description": "Custom tools to provide to the AI agent.",
|
|
15061
|
+
"items": {
|
|
15062
|
+
"$ref": "#/components/schemas/AIToolDefinition"
|
|
15063
|
+
}
|
|
15064
|
+
},
|
|
15065
|
+
"toolCall": {
|
|
15066
|
+
"$ref": "#/components/schemas/AIToolCallResult"
|
|
15097
15067
|
}
|
|
15098
|
-
|
|
15068
|
+
}
|
|
15099
15069
|
}
|
|
15100
15070
|
}
|
|
15101
15071
|
}
|
|
@@ -19613,7 +19583,8 @@
|
|
|
19613
19583
|
"type": "number"
|
|
19614
19584
|
},
|
|
19615
19585
|
{
|
|
19616
|
-
"type": "string"
|
|
19586
|
+
"type": "string",
|
|
19587
|
+
"nullable": true
|
|
19617
19588
|
},
|
|
19618
19589
|
{
|
|
19619
19590
|
"type": "boolean"
|
|
@@ -25958,6 +25929,7 @@
|
|
|
25958
25929
|
"site:visitor:auth",
|
|
25959
25930
|
"site:adaptive:read",
|
|
25960
25931
|
"site:adaptive:write",
|
|
25932
|
+
"site:ai:ask",
|
|
25961
25933
|
"openapi:read",
|
|
25962
25934
|
"openapi:write",
|
|
25963
25935
|
"conversations:ingest"
|
|
@@ -33110,7 +33082,8 @@
|
|
|
33110
33082
|
"enum": [
|
|
33111
33083
|
"none",
|
|
33112
33084
|
"search",
|
|
33113
|
-
"assistant"
|
|
33085
|
+
"assistant",
|
|
33086
|
+
"integration"
|
|
33114
33087
|
]
|
|
33115
33088
|
},
|
|
33116
33089
|
"SiteExternalLinksTarget": {
|
|
@@ -33326,6 +33299,10 @@
|
|
|
33326
33299
|
"properties": {
|
|
33327
33300
|
"mode": {
|
|
33328
33301
|
"$ref": "#/components/schemas/CustomizationAIMode"
|
|
33302
|
+
},
|
|
33303
|
+
"integrationId": {
|
|
33304
|
+
"type": "string",
|
|
33305
|
+
"description": "The integration to use for the AI features on the site. Only required if mode is set to \"integration\"."
|
|
33329
33306
|
}
|
|
33330
33307
|
},
|
|
33331
33308
|
"required": [
|
|
@@ -34041,6 +34018,132 @@
|
|
|
34041
34018
|
"reasoning-high"
|
|
34042
34019
|
]
|
|
34043
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
|
+
"AIToolDefinition": {
|
|
34039
|
+
"type": "object",
|
|
34040
|
+
"description": "Description of a tool that can be called from an AI agent.",
|
|
34041
|
+
"properties": {
|
|
34042
|
+
"name": {
|
|
34043
|
+
"type": "string",
|
|
34044
|
+
"description": "The name of the tool. It should be unique within the agent."
|
|
34045
|
+
},
|
|
34046
|
+
"description": {
|
|
34047
|
+
"type": "string",
|
|
34048
|
+
"description": "The description of the tool, passed to the AI agent."
|
|
34049
|
+
},
|
|
34050
|
+
"inputSchema": {
|
|
34051
|
+
"type": "object",
|
|
34052
|
+
"description": "JSON schema describing the input of the tool.",
|
|
34053
|
+
"properties": {
|
|
34054
|
+
"type": {
|
|
34055
|
+
"type": "string",
|
|
34056
|
+
"enum": [
|
|
34057
|
+
"object"
|
|
34058
|
+
]
|
|
34059
|
+
},
|
|
34060
|
+
"properties": {
|
|
34061
|
+
"type": "object",
|
|
34062
|
+
"additionalProperties": {
|
|
34063
|
+
"type": "object",
|
|
34064
|
+
"properties": {
|
|
34065
|
+
"type": {
|
|
34066
|
+
"type": "string",
|
|
34067
|
+
"enum": [
|
|
34068
|
+
"string",
|
|
34069
|
+
"number",
|
|
34070
|
+
"boolean",
|
|
34071
|
+
"array",
|
|
34072
|
+
"object"
|
|
34073
|
+
]
|
|
34074
|
+
},
|
|
34075
|
+
"description": {
|
|
34076
|
+
"type": "string",
|
|
34077
|
+
"description": "Description of the property."
|
|
34078
|
+
}
|
|
34079
|
+
},
|
|
34080
|
+
"required": [
|
|
34081
|
+
"type",
|
|
34082
|
+
"description"
|
|
34083
|
+
],
|
|
34084
|
+
"additionalProperties": true
|
|
34085
|
+
}
|
|
34086
|
+
}
|
|
34087
|
+
},
|
|
34088
|
+
"required": [
|
|
34089
|
+
"type",
|
|
34090
|
+
"properties"
|
|
34091
|
+
]
|
|
34092
|
+
},
|
|
34093
|
+
"confirmation": {
|
|
34094
|
+
"$ref": "#/components/schemas/AIToolConfirmation"
|
|
34095
|
+
}
|
|
34096
|
+
},
|
|
34097
|
+
"required": [
|
|
34098
|
+
"name",
|
|
34099
|
+
"description",
|
|
34100
|
+
"confirmation"
|
|
34101
|
+
]
|
|
34102
|
+
},
|
|
34103
|
+
"AIToolCallOtherSummary": {
|
|
34104
|
+
"type": "object",
|
|
34105
|
+
"description": "Summary of a generic tool call.",
|
|
34106
|
+
"properties": {
|
|
34107
|
+
"icon": {
|
|
34108
|
+
"$ref": "#/components/schemas/Icon"
|
|
34109
|
+
},
|
|
34110
|
+
"text": {
|
|
34111
|
+
"type": "string",
|
|
34112
|
+
"description": "Text to display to the user to describe the tool call."
|
|
34113
|
+
}
|
|
34114
|
+
},
|
|
34115
|
+
"required": [
|
|
34116
|
+
"icon",
|
|
34117
|
+
"text"
|
|
34118
|
+
]
|
|
34119
|
+
},
|
|
34120
|
+
"AIToolCallResult": {
|
|
34121
|
+
"type": "object",
|
|
34122
|
+
"description": "Result of a tool call.",
|
|
34123
|
+
"required": [
|
|
34124
|
+
"tool",
|
|
34125
|
+
"toolCallId",
|
|
34126
|
+
"output",
|
|
34127
|
+
"summary"
|
|
34128
|
+
],
|
|
34129
|
+
"properties": {
|
|
34130
|
+
"tool": {
|
|
34131
|
+
"type": "string",
|
|
34132
|
+
"description": "The name of the tool that was called."
|
|
34133
|
+
},
|
|
34134
|
+
"toolCallId": {
|
|
34135
|
+
"type": "string",
|
|
34136
|
+
"description": "The ID of the tool call."
|
|
34137
|
+
},
|
|
34138
|
+
"output": {
|
|
34139
|
+
"type": "object",
|
|
34140
|
+
"description": "The output to the tool call."
|
|
34141
|
+
},
|
|
34142
|
+
"summary": {
|
|
34143
|
+
"$ref": "#/components/schemas/AIToolCallOtherSummary"
|
|
34144
|
+
}
|
|
34145
|
+
}
|
|
34146
|
+
},
|
|
34044
34147
|
"AIStreamResponseFinish": {
|
|
34045
34148
|
"type": "object",
|
|
34046
34149
|
"description": "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.\n",
|
|
@@ -34496,6 +34599,25 @@
|
|
|
34496
34599
|
"mcpToolName"
|
|
34497
34600
|
]
|
|
34498
34601
|
},
|
|
34602
|
+
"AIToolCallOther": {
|
|
34603
|
+
"type": "object",
|
|
34604
|
+
"description": "Any tool call that is unknown by GitBook",
|
|
34605
|
+
"properties": {
|
|
34606
|
+
"tool": {
|
|
34607
|
+
"type": "string",
|
|
34608
|
+
"enum": [
|
|
34609
|
+
"other"
|
|
34610
|
+
]
|
|
34611
|
+
},
|
|
34612
|
+
"summary": {
|
|
34613
|
+
"$ref": "#/components/schemas/AIToolCallOtherSummary"
|
|
34614
|
+
}
|
|
34615
|
+
},
|
|
34616
|
+
"required": [
|
|
34617
|
+
"tool",
|
|
34618
|
+
"summary"
|
|
34619
|
+
]
|
|
34620
|
+
},
|
|
34499
34621
|
"AIToolCall": {
|
|
34500
34622
|
"oneOf": [
|
|
34501
34623
|
{
|
|
@@ -34533,6 +34655,9 @@
|
|
|
34533
34655
|
},
|
|
34534
34656
|
{
|
|
34535
34657
|
"$ref": "#/components/schemas/AIToolCallMCP"
|
|
34658
|
+
},
|
|
34659
|
+
{
|
|
34660
|
+
"$ref": "#/components/schemas/AIToolCallOther"
|
|
34536
34661
|
}
|
|
34537
34662
|
]
|
|
34538
34663
|
},
|
|
@@ -34565,6 +34690,59 @@
|
|
|
34565
34690
|
"toolCall"
|
|
34566
34691
|
]
|
|
34567
34692
|
},
|
|
34693
|
+
"AIStreamResponseToolConfirm": {
|
|
34694
|
+
"type": "object",
|
|
34695
|
+
"description": "Message emitted by the server to indicate that the AI requires the user to confirm a tool call.\n",
|
|
34696
|
+
"properties": {
|
|
34697
|
+
"type": {
|
|
34698
|
+
"type": "string",
|
|
34699
|
+
"enum": [
|
|
34700
|
+
"response_tool_confirm"
|
|
34701
|
+
]
|
|
34702
|
+
},
|
|
34703
|
+
"messageId": {
|
|
34704
|
+
"type": "string",
|
|
34705
|
+
"description": "The ID of the message that this event is composing.\n"
|
|
34706
|
+
},
|
|
34707
|
+
"stepIndex": {
|
|
34708
|
+
"type": "integer",
|
|
34709
|
+
"description": "The index of the step of the message that this event is composing.\n"
|
|
34710
|
+
},
|
|
34711
|
+
"toolCall": {
|
|
34712
|
+
"type": "object",
|
|
34713
|
+
"description": "The tool call that the AI requires the user to confirm.",
|
|
34714
|
+
"required": [
|
|
34715
|
+
"tool",
|
|
34716
|
+
"input"
|
|
34717
|
+
],
|
|
34718
|
+
"properties": {
|
|
34719
|
+
"tool": {
|
|
34720
|
+
"type": "string",
|
|
34721
|
+
"description": "The name of the tool that the AI requires the user to confirm."
|
|
34722
|
+
},
|
|
34723
|
+
"input": {
|
|
34724
|
+
"type": "object",
|
|
34725
|
+
"description": "The input to the tool call."
|
|
34726
|
+
}
|
|
34727
|
+
}
|
|
34728
|
+
},
|
|
34729
|
+
"toolCallId": {
|
|
34730
|
+
"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"
|
|
34735
|
+
}
|
|
34736
|
+
},
|
|
34737
|
+
"required": [
|
|
34738
|
+
"type",
|
|
34739
|
+
"messageId",
|
|
34740
|
+
"stepIndex",
|
|
34741
|
+
"toolCall",
|
|
34742
|
+
"toolCallId",
|
|
34743
|
+
"toolConfirmation"
|
|
34744
|
+
]
|
|
34745
|
+
},
|
|
34568
34746
|
"AIStreamResponseFollowupSuggestion": {
|
|
34569
34747
|
"type": "object",
|
|
34570
34748
|
"description": "Message emitted by the server to suggest a followup message the user could respond with.\n",
|
|
@@ -34607,6 +34785,9 @@
|
|
|
34607
34785
|
{
|
|
34608
34786
|
"$ref": "#/components/schemas/AIStreamResponseToolCall"
|
|
34609
34787
|
},
|
|
34788
|
+
{
|
|
34789
|
+
"$ref": "#/components/schemas/AIStreamResponseToolConfirm"
|
|
34790
|
+
},
|
|
34610
34791
|
{
|
|
34611
34792
|
"$ref": "#/components/schemas/AIStreamResponseFollowupSuggestion"
|
|
34612
34793
|
}
|
package/spec/openapi.yaml
CHANGED
|
@@ -8497,44 +8497,30 @@ paths:
|
|
|
8497
8497
|
content:
|
|
8498
8498
|
application/json:
|
|
8499
8499
|
schema:
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
type: string
|
|
8525
|
-
enum:
|
|
8526
|
-
- custom
|
|
8527
|
-
instructions:
|
|
8528
|
-
type: string
|
|
8529
|
-
description: Custom instructions for the AI
|
|
8530
|
-
- type: object
|
|
8531
|
-
required:
|
|
8532
|
-
- mode
|
|
8533
|
-
properties:
|
|
8534
|
-
mode:
|
|
8535
|
-
type: string
|
|
8536
|
-
enum:
|
|
8537
|
-
- assistant
|
|
8500
|
+
type: object
|
|
8501
|
+
required:
|
|
8502
|
+
- input
|
|
8503
|
+
properties:
|
|
8504
|
+
previousResponseId:
|
|
8505
|
+
type: string
|
|
8506
|
+
description: The ID of the previous response to continue from
|
|
8507
|
+
input:
|
|
8508
|
+
type: array
|
|
8509
|
+
description: The messages to send to the AI agent.
|
|
8510
|
+
items:
|
|
8511
|
+
$ref: "#/components/schemas/AIMessageInput"
|
|
8512
|
+
output:
|
|
8513
|
+
deprecated: true
|
|
8514
|
+
$ref: "#/components/schemas/AIOutputFormat"
|
|
8515
|
+
model:
|
|
8516
|
+
$ref: "#/components/schemas/AIModel"
|
|
8517
|
+
tools:
|
|
8518
|
+
type: array
|
|
8519
|
+
description: Custom tools to provide to the AI agent.
|
|
8520
|
+
items:
|
|
8521
|
+
$ref: "#/components/schemas/AIToolDefinition"
|
|
8522
|
+
toolCall:
|
|
8523
|
+
$ref: "#/components/schemas/AIToolCallResult"
|
|
8538
8524
|
responses:
|
|
8539
8525
|
"200":
|
|
8540
8526
|
description: OK
|
|
@@ -11519,6 +11505,7 @@ components:
|
|
|
11519
11505
|
oneOf:
|
|
11520
11506
|
- type: number
|
|
11521
11507
|
- type: string
|
|
11508
|
+
nullable: true
|
|
11522
11509
|
- type: boolean
|
|
11523
11510
|
- type: array
|
|
11524
11511
|
items:
|
|
@@ -15594,6 +15581,7 @@ components:
|
|
|
15594
15581
|
- site:visitor:auth
|
|
15595
15582
|
- site:adaptive:read
|
|
15596
15583
|
- site:adaptive:write
|
|
15584
|
+
- site:ai:ask
|
|
15597
15585
|
- openapi:read
|
|
15598
15586
|
- openapi:write
|
|
15599
15587
|
- conversations:ingest
|
|
@@ -20422,6 +20410,7 @@ components:
|
|
|
20422
20410
|
- none
|
|
20423
20411
|
- search
|
|
20424
20412
|
- assistant
|
|
20413
|
+
- integration
|
|
20425
20414
|
SiteExternalLinksTarget:
|
|
20426
20415
|
type: string
|
|
20427
20416
|
description: |
|
|
@@ -20578,6 +20567,9 @@ components:
|
|
|
20578
20567
|
properties:
|
|
20579
20568
|
mode:
|
|
20580
20569
|
$ref: "#/components/schemas/CustomizationAIMode"
|
|
20570
|
+
integrationId:
|
|
20571
|
+
type: string
|
|
20572
|
+
description: The integration to use for the AI features on the site. Only required if mode is set to "integration".
|
|
20581
20573
|
required:
|
|
20582
20574
|
- mode
|
|
20583
20575
|
advancedCustomization:
|
|
@@ -21050,6 +21042,97 @@ components:
|
|
|
21050
21042
|
- reasoning-low
|
|
21051
21043
|
- reasoning-medium
|
|
21052
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
|
+
AIToolDefinition:
|
|
21058
|
+
type: object
|
|
21059
|
+
description: Description of a tool that can be called from an AI agent.
|
|
21060
|
+
properties:
|
|
21061
|
+
name:
|
|
21062
|
+
type: string
|
|
21063
|
+
description: The name of the tool. It should be unique within the agent.
|
|
21064
|
+
description:
|
|
21065
|
+
type: string
|
|
21066
|
+
description: The description of the tool, passed to the AI agent.
|
|
21067
|
+
inputSchema:
|
|
21068
|
+
type: object
|
|
21069
|
+
description: JSON schema describing the input of the tool.
|
|
21070
|
+
properties:
|
|
21071
|
+
type:
|
|
21072
|
+
type: string
|
|
21073
|
+
enum:
|
|
21074
|
+
- object
|
|
21075
|
+
properties:
|
|
21076
|
+
type: object
|
|
21077
|
+
additionalProperties:
|
|
21078
|
+
type: object
|
|
21079
|
+
properties:
|
|
21080
|
+
type:
|
|
21081
|
+
type: string
|
|
21082
|
+
enum:
|
|
21083
|
+
- string
|
|
21084
|
+
- number
|
|
21085
|
+
- boolean
|
|
21086
|
+
- array
|
|
21087
|
+
- object
|
|
21088
|
+
description:
|
|
21089
|
+
type: string
|
|
21090
|
+
description: Description of the property.
|
|
21091
|
+
required:
|
|
21092
|
+
- type
|
|
21093
|
+
- description
|
|
21094
|
+
additionalProperties: true
|
|
21095
|
+
required:
|
|
21096
|
+
- type
|
|
21097
|
+
- properties
|
|
21098
|
+
confirmation:
|
|
21099
|
+
$ref: "#/components/schemas/AIToolConfirmation"
|
|
21100
|
+
required:
|
|
21101
|
+
- name
|
|
21102
|
+
- description
|
|
21103
|
+
- confirmation
|
|
21104
|
+
AIToolCallOtherSummary:
|
|
21105
|
+
type: object
|
|
21106
|
+
description: Summary of a generic tool call.
|
|
21107
|
+
properties:
|
|
21108
|
+
icon:
|
|
21109
|
+
$ref: "#/components/schemas/Icon"
|
|
21110
|
+
text:
|
|
21111
|
+
type: string
|
|
21112
|
+
description: Text to display to the user to describe the tool call.
|
|
21113
|
+
required:
|
|
21114
|
+
- icon
|
|
21115
|
+
- text
|
|
21116
|
+
AIToolCallResult:
|
|
21117
|
+
type: object
|
|
21118
|
+
description: Result of a tool call.
|
|
21119
|
+
required:
|
|
21120
|
+
- tool
|
|
21121
|
+
- toolCallId
|
|
21122
|
+
- output
|
|
21123
|
+
- summary
|
|
21124
|
+
properties:
|
|
21125
|
+
tool:
|
|
21126
|
+
type: string
|
|
21127
|
+
description: The name of the tool that was called.
|
|
21128
|
+
toolCallId:
|
|
21129
|
+
type: string
|
|
21130
|
+
description: The ID of the tool call.
|
|
21131
|
+
output:
|
|
21132
|
+
type: object
|
|
21133
|
+
description: The output to the tool call.
|
|
21134
|
+
summary:
|
|
21135
|
+
$ref: "#/components/schemas/AIToolCallOtherSummary"
|
|
21053
21136
|
AIStreamResponseFinish:
|
|
21054
21137
|
type: object
|
|
21055
21138
|
description: |
|
|
@@ -21386,6 +21469,19 @@ components:
|
|
|
21386
21469
|
- tool
|
|
21387
21470
|
- mcpServerId
|
|
21388
21471
|
- mcpToolName
|
|
21472
|
+
AIToolCallOther:
|
|
21473
|
+
type: object
|
|
21474
|
+
description: Any tool call that is unknown by GitBook
|
|
21475
|
+
properties:
|
|
21476
|
+
tool:
|
|
21477
|
+
type: string
|
|
21478
|
+
enum:
|
|
21479
|
+
- other
|
|
21480
|
+
summary:
|
|
21481
|
+
$ref: "#/components/schemas/AIToolCallOtherSummary"
|
|
21482
|
+
required:
|
|
21483
|
+
- tool
|
|
21484
|
+
- summary
|
|
21389
21485
|
AIToolCall:
|
|
21390
21486
|
oneOf:
|
|
21391
21487
|
- $ref: "#/components/schemas/AIToolCallGetPageContent"
|
|
@@ -21400,6 +21496,7 @@ components:
|
|
|
21400
21496
|
- $ref: "#/components/schemas/AIToolCallGetPageDiff"
|
|
21401
21497
|
- $ref: "#/components/schemas/AIToolCallCreateAgentTask"
|
|
21402
21498
|
- $ref: "#/components/schemas/AIToolCallMCP"
|
|
21499
|
+
- $ref: "#/components/schemas/AIToolCallOther"
|
|
21403
21500
|
AIStreamResponseToolCall:
|
|
21404
21501
|
type: object
|
|
21405
21502
|
description: |
|
|
@@ -21424,6 +21521,48 @@ components:
|
|
|
21424
21521
|
- messageId
|
|
21425
21522
|
- stepIndex
|
|
21426
21523
|
- toolCall
|
|
21524
|
+
AIStreamResponseToolConfirm:
|
|
21525
|
+
type: object
|
|
21526
|
+
description: |
|
|
21527
|
+
Message emitted by the server to indicate that the AI requires the user to confirm a tool call.
|
|
21528
|
+
properties:
|
|
21529
|
+
type:
|
|
21530
|
+
type: string
|
|
21531
|
+
enum:
|
|
21532
|
+
- response_tool_confirm
|
|
21533
|
+
messageId:
|
|
21534
|
+
type: string
|
|
21535
|
+
description: |
|
|
21536
|
+
The ID of the message that this event is composing.
|
|
21537
|
+
stepIndex:
|
|
21538
|
+
type: integer
|
|
21539
|
+
description: |
|
|
21540
|
+
The index of the step of the message that this event is composing.
|
|
21541
|
+
toolCall:
|
|
21542
|
+
type: object
|
|
21543
|
+
description: The tool call that the AI requires the user to confirm.
|
|
21544
|
+
required:
|
|
21545
|
+
- tool
|
|
21546
|
+
- input
|
|
21547
|
+
properties:
|
|
21548
|
+
tool:
|
|
21549
|
+
type: string
|
|
21550
|
+
description: The name of the tool that the AI requires the user to confirm.
|
|
21551
|
+
input:
|
|
21552
|
+
type: object
|
|
21553
|
+
description: The input to the tool call.
|
|
21554
|
+
toolCallId:
|
|
21555
|
+
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"
|
|
21559
|
+
required:
|
|
21560
|
+
- type
|
|
21561
|
+
- messageId
|
|
21562
|
+
- stepIndex
|
|
21563
|
+
- toolCall
|
|
21564
|
+
- toolCallId
|
|
21565
|
+
- toolConfirmation
|
|
21427
21566
|
AIStreamResponseFollowupSuggestion:
|
|
21428
21567
|
type: object
|
|
21429
21568
|
description: |
|
|
@@ -21453,6 +21592,7 @@ components:
|
|
|
21453
21592
|
- $ref: "#/components/schemas/AIStreamResponseDocument"
|
|
21454
21593
|
- $ref: "#/components/schemas/AIStreamResponseObject"
|
|
21455
21594
|
- $ref: "#/components/schemas/AIStreamResponseToolCall"
|
|
21595
|
+
- $ref: "#/components/schemas/AIStreamResponseToolConfirm"
|
|
21456
21596
|
- $ref: "#/components/schemas/AIStreamResponseFollowupSuggestion"
|
|
21457
21597
|
SiteInsightsEventSession:
|
|
21458
21598
|
type: object
|