Skip to content

Commit a7c3eb1

Browse files
committed
updated docs script
1 parent b56abfb commit a7c3eb1

3 files changed

Lines changed: 60 additions & 112 deletions

File tree

apps/docs/content/docs/en/tools/github.mdx

Lines changed: 28 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -824,24 +824,10 @@ Create a new branch in a GitHub repository by creating a git reference pointing
824824

825825
| Parameter | Type | Description |
826826
| --------- | ---- | ----------- |
827-
| `data` | json | Operation result data \(API-aligned\) |
828-
| `action` | string | The action that was performed |
829-
| `event_type` | string | Type of GitHub event |
830-
| `repository` | string | Repository full name |
831-
| `repository_name` | string | Repository name only |
832-
| `repository_owner` | string | Repository owner username |
833-
| `sender` | string | Username of the user who triggered the event |
834-
| `sender_id` | string | User ID of the sender |
835-
| `ref` | string | Git reference \(for push events\) |
836-
| `before` | string | SHA of the commit before the push |
837-
| `after` | string | SHA of the commit after the push |
838-
| `commits` | string | Array of commit objects \(for push events\) |
839-
| `pull_request` | string | Pull request object \(for pull_request events\) |
840-
| `issue` | string | Issue object \(for issues events\) |
841-
| `comment` | string | Comment object \(for comment events\) |
842-
| `branch` | string | Branch name extracted from ref |
843-
| `commit_message` | string | Latest commit message |
844-
| `commit_author` | string | Author of the latest commit |
827+
| `ref` | string | Full reference name \(refs/heads/branch\) |
828+
| `node_id` | string | Git ref node ID |
829+
| `url` | string | API URL for the reference |
830+
| `object` | json | Git object with type and sha |
845831

846832
### `github_delete_branch`
847833

@@ -860,24 +846,8 @@ Delete a branch from a GitHub repository by removing its git reference. Protecte
860846

861847
| Parameter | Type | Description |
862848
| --------- | ---- | ----------- |
863-
| `data` | json | Operation result data \(API-aligned\) |
864-
| `action` | string | The action that was performed |
865-
| `event_type` | string | Type of GitHub event |
866-
| `repository` | string | Repository full name |
867-
| `repository_name` | string | Repository name only |
868-
| `repository_owner` | string | Repository owner username |
869-
| `sender` | string | Username of the user who triggered the event |
870-
| `sender_id` | string | User ID of the sender |
871-
| `ref` | string | Git reference \(for push events\) |
872-
| `before` | string | SHA of the commit before the push |
873-
| `after` | string | SHA of the commit after the push |
874-
| `commits` | string | Array of commit objects \(for push events\) |
875-
| `pull_request` | string | Pull request object \(for pull_request events\) |
876-
| `issue` | string | Issue object \(for issues events\) |
877-
| `comment` | string | Comment object \(for comment events\) |
878-
| `branch` | string | Branch name extracted from ref |
879-
| `commit_message` | string | Latest commit message |
880-
| `commit_author` | string | Author of the latest commit |
849+
| `deleted` | boolean | Whether the branch was deleted |
850+
| `branch` | string | Name of the deleted branch |
881851

882852
### `github_get_branch_protection`
883853

@@ -896,24 +866,17 @@ Get the branch protection rules for a specific branch, including status checks,
896866

897867
| Parameter | Type | Description |
898868
| --------- | ---- | ----------- |
899-
| `data` | json | Operation result data \(API-aligned\) |
900-
| `action` | string | The action that was performed |
901-
| `event_type` | string | Type of GitHub event |
902-
| `repository` | string | Repository full name |
903-
| `repository_name` | string | Repository name only |
904-
| `repository_owner` | string | Repository owner username |
905-
| `sender` | string | Username of the user who triggered the event |
906-
| `sender_id` | string | User ID of the sender |
907-
| `ref` | string | Git reference \(for push events\) |
908-
| `before` | string | SHA of the commit before the push |
909-
| `after` | string | SHA of the commit after the push |
910-
| `commits` | string | Array of commit objects \(for push events\) |
911-
| `pull_request` | string | Pull request object \(for pull_request events\) |
912-
| `issue` | string | Issue object \(for issues events\) |
913-
| `comment` | string | Comment object \(for comment events\) |
914-
| `branch` | string | Branch name extracted from ref |
915-
| `commit_message` | string | Latest commit message |
916-
| `commit_author` | string | Author of the latest commit |
869+
| `url` | string | Protection settings URL |
870+
| `required_status_checks` | json | Status check requirements |
871+
| `enforce_admins` | json | Admin enforcement settings |
872+
| `required_pull_request_reviews` | json | PR review requirements |
873+
| `restrictions` | json | Push restrictions |
874+
| `required_linear_history` | json | Linear history requirement |
875+
| `allow_force_pushes` | json | Force push settings |
876+
| `allow_deletions` | json | Deletion settings |
877+
| `block_creations` | json | Creation blocking settings |
878+
| `required_conversation_resolution` | json | Conversation resolution requirement |
879+
| `required_signatures` | json | Signature requirements |
917880

918881
### `github_update_branch_protection`
919882

@@ -936,24 +899,17 @@ Update branch protection rules for a specific branch, including status checks, r
936899

937900
| Parameter | Type | Description |
938901
| --------- | ---- | ----------- |
939-
| `data` | json | Operation result data \(API-aligned\) |
940-
| `action` | string | The action that was performed |
941-
| `event_type` | string | Type of GitHub event |
942-
| `repository` | string | Repository full name |
943-
| `repository_name` | string | Repository name only |
944-
| `repository_owner` | string | Repository owner username |
945-
| `sender` | string | Username of the user who triggered the event |
946-
| `sender_id` | string | User ID of the sender |
947-
| `ref` | string | Git reference \(for push events\) |
948-
| `before` | string | SHA of the commit before the push |
949-
| `after` | string | SHA of the commit after the push |
950-
| `commits` | string | Array of commit objects \(for push events\) |
951-
| `pull_request` | string | Pull request object \(for pull_request events\) |
952-
| `issue` | string | Issue object \(for issues events\) |
953-
| `comment` | string | Comment object \(for comment events\) |
954-
| `branch` | string | Branch name extracted from ref |
955-
| `commit_message` | string | Latest commit message |
956-
| `commit_author` | string | Author of the latest commit |
902+
| `url` | string | Protection settings URL |
903+
| `required_status_checks` | json | Status check requirements |
904+
| `enforce_admins` | json | Admin enforcement settings |
905+
| `required_pull_request_reviews` | json | PR review requirements |
906+
| `restrictions` | json | Push restrictions |
907+
| `required_linear_history` | json | Linear history requirement |
908+
| `allow_force_pushes` | json | Force push settings |
909+
| `allow_deletions` | json | Deletion settings |
910+
| `block_creations` | json | Creation blocking settings |
911+
| `required_conversation_resolution` | json | Conversation resolution requirement |
912+
| `required_signatures` | json | Signature requirements |
957913

958914
### `github_create_issue`
959915

apps/docs/content/docs/en/tools/slack.mdx

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -172,32 +172,9 @@ Create and share Slack canvases in channels. Canvases are collaborative document
172172

173173
| Parameter | Type | Description |
174174
| --------- | ---- | ----------- |
175-
| `message` | json | Complete message object with all properties: ts, text, user, channel, reactions, threads, files, attachments, blocks, stars, pins, and edit history |
176-
| `ts` | string | Message timestamp returned by Slack API |
177-
| `channel` | string | Channel identifier where message was sent |
178-
| `fileCount` | number | Number of files uploaded \(when files are attached\) |
179-
| `canvas_id` | string | Canvas identifier for created canvases |
175+
| `canvas_id` | string | Unique canvas identifier |
176+
| `channel` | string | Channel where canvas was created |
180177
| `title` | string | Canvas title |
181-
| `messages` | json | Array of message objects with comprehensive properties: text, user, timestamp, reactions, threads, files, attachments, blocks, stars, pins, and edit history |
182-
| `parentMessage` | json | The thread parent message with all properties |
183-
| `replies` | json | Array of reply messages in the thread \(excluding the parent\) |
184-
| `replyCount` | number | Number of replies returned in this response |
185-
| `hasMore` | boolean | Whether there are more messages in the thread |
186-
| `channels` | json | Array of channel objects with properties: id, name, is_private, is_archived, is_member, num_members, topic, purpose, created, creator |
187-
| `count` | number | Total number of items returned \(channels, members, or users\) |
188-
| `members` | json | Array of user IDs who are members of the channel |
189-
| `users` | json | Array of user objects with properties: id, name, real_name, display_name, is_bot, is_admin, deleted, timezone, avatar, status_text, status_emoji |
190-
| `user` | json | Detailed user object with properties: id, name, real_name, display_name, first_name, last_name, title, is_bot, is_admin, deleted, timezone, avatars, status |
191-
| `file` | json | Downloaded file stored in execution files |
192-
| `content` | string | Success message for update operation |
193-
| `metadata` | json | Updated message metadata \(legacy, use message object instead\) |
194-
| `event_type` | string | Type of Slack event that triggered the workflow |
195-
| `channel_name` | string | Human-readable channel name |
196-
| `user_name` | string | Username who triggered the event |
197-
| `timestamp` | string | Message timestamp from the triggering event |
198-
| `thread_ts` | string | Parent thread timestamp \(if message is in a thread\) |
199-
| `team_id` | string | Slack workspace/team ID |
200-
| `event_id` | string | Unique event identifier for the trigger |
201178

202179
### `slack_message_reader`
203180

scripts/generate-docs.ts

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,21 +1276,36 @@ function extractToolInfo(
12761276
const toolPrefix = getToolPrefixFromName(toolName)
12771277

12781278
let outputs: Record<string, any> = {}
1279-
// Use word boundary to avoid matching 'run_outputs' or similar param names
1280-
const outputsStart = toolContent.search(/(?<![a-zA-Z_])outputs\s*:\s*{/)
1281-
if (outputsStart !== -1) {
1282-
const openBracePos = toolContent.indexOf('{', outputsStart)
1283-
if (openBracePos !== -1) {
1284-
let braceCount = 1
1285-
let pos = openBracePos + 1
1286-
while (pos < toolContent.length && braceCount > 0) {
1287-
if (toolContent[pos] === '{') braceCount++
1288-
else if (toolContent[pos] === '}') braceCount--
1289-
pos++
1290-
}
1291-
if (braceCount === 0) {
1292-
const outputsContent = toolContent.substring(openBracePos + 1, pos - 1).trim()
1293-
outputs = parseToolOutputsField(outputsContent, toolPrefix)
1279+
1280+
// Pattern 1: outputs directly assigned to a const (e.g., "outputs: GIT_REF_OUTPUT_PROPERTIES,")
1281+
const directConstMatch = toolContent.match(
1282+
/(?<![a-zA-Z_])outputs\s*:\s*([A-Z][A-Z_0-9]+)\s*(?:,|\}|$)/
1283+
)
1284+
if (directConstMatch) {
1285+
const constName = directConstMatch[1]
1286+
const resolvedConst = resolveConstReference(constName, toolPrefix)
1287+
if (resolvedConst && typeof resolvedConst === 'object') {
1288+
outputs = resolvedConst
1289+
}
1290+
}
1291+
1292+
// Pattern 2: outputs is an object with properties (e.g., "outputs: { ... }")
1293+
if (Object.keys(outputs).length === 0) {
1294+
const outputsStart = toolContent.search(/(?<![a-zA-Z_])outputs\s*:\s*{/)
1295+
if (outputsStart !== -1) {
1296+
const openBracePos = toolContent.indexOf('{', outputsStart)
1297+
if (openBracePos !== -1) {
1298+
let braceCount = 1
1299+
let pos = openBracePos + 1
1300+
while (pos < toolContent.length && braceCount > 0) {
1301+
if (toolContent[pos] === '{') braceCount++
1302+
else if (toolContent[pos] === '}') braceCount--
1303+
pos++
1304+
}
1305+
if (braceCount === 0) {
1306+
const outputsContent = toolContent.substring(openBracePos + 1, pos - 1).trim()
1307+
outputs = parseToolOutputsField(outputsContent, toolPrefix)
1308+
}
12941309
}
12951310
}
12961311
}

0 commit comments

Comments
 (0)