From 46673b913076816164d7f10b892d6c3ee0362bdf Mon Sep 17 00:00:00 2001 From: Sidney Swift <158200036+sidneyswift@users.noreply.github.com> Date: Wed, 21 Oct 2026 18:25:20 -0400 Subject: [PATCH] docs: publish admin Slack author filtering and options --- SOURCE-PROVENANCE.json | 13 +- .../admins/coding-agent-slack-authors.mdx | 4 + api-reference/openapi/accounts.json | 200 +++++++++++- docs.json | 1 + llms-full.txt | 308 +++++++++++++++++- 5 files changed, 509 insertions(+), 17 deletions(-) create mode 100644 api-reference/admins/coding-agent-slack-authors.mdx diff --git a/SOURCE-PROVENANCE.json b/SOURCE-PROVENANCE.json index 36b50934..90a985d9 100644 --- a/SOURCE-PROVENANCE.json +++ b/SOURCE-PROVENANCE.json @@ -1,6 +1,6 @@ { "repository": "recoupable/marketing", - "commit": "548ed38b9f72a5689ca63f7c9feb87c1744408f4", + "commit": "13bee7c72c656eae81ea05c45274b7c29a9f80bc", "sourceDirectory": "content/docs/source", "files": [ { @@ -98,6 +98,11 @@ "sourcePath": "content/docs/source/api-reference/admins/check.mdx", "sha256": "76858ebc8557e9618e3498e35048cff28cd6a62750f68645daab16ce772fdfe6" }, + { + "path": "api-reference/admins/coding-agent-slack-authors.mdx", + "sourcePath": "content/docs/source/api-reference/admins/coding-agent-slack-authors.mdx", + "sha256": "9f80a8b5b7f105ce82416b6773d3fd4611ff792febcc81db2201eea22794c0de" + }, { "path": "api-reference/admins/coding-agent-slack-tags.mdx", "sourcePath": "content/docs/source/api-reference/admins/coding-agent-slack-tags.mdx", @@ -466,7 +471,7 @@ { "path": "api-reference/openapi/accounts.json", "sourcePath": "content/docs/source/api-reference/openapi/accounts.json", - "sha256": "2d107a6832ac1732233580675b67a24af7d914bb2417dbaa9377e26677695341" + "sha256": "2dd43f5daf898995fe2072a720474b4a8d898dd2fcf35a92a6e3cb3b0cffefb0" }, { "path": "api-reference/openapi/ai.json", @@ -1146,7 +1151,7 @@ { "path": "llms-full.txt", "sourcePath": "content/docs/source/llms-full.txt", - "sha256": "fa56e1fecb19db6aee52cded9993a930f145bfc90549ae8aff4b38e7a4c3e6ff" + "sha256": "ad7b424af40a4cdc227d81db1ede89f51a54cc19bad89bda17348a06b11dab07" }, { "path": "llms.txt", @@ -1209,7 +1214,7 @@ "sha256": "df08b22bdc866daaf6adfbdfaafac47859f1281449841990d0e2af499a1e2d7d" } ], - "navigationSha256": "d1207b604b93ec0d974aab16f4b944c190d91af301115d6e1ecbf28d981d5eeb", + "navigationSha256": "48f6cf549dd9bceed1ccbf2eb7a8fa9da3bf48773f22f15da2ba04de9b055d09", "hostSpecific": [ "docs.json theme, colors, navbar, footer, logo and host settings" ], diff --git a/api-reference/admins/coding-agent-slack-authors.mdx b/api-reference/admins/coding-agent-slack-authors.mdx new file mode 100644 index 00000000..6fb31ccf --- /dev/null +++ b/api-reference/admins/coding-agent-slack-authors.mdx @@ -0,0 +1,4 @@ +--- +title: 'List Coding Agent Slack Authors (Admin)' +openapi: "/api-reference/openapi/accounts.json GET /api/admins/coding-agent/slack-tags" +--- diff --git a/api-reference/openapi/accounts.json b/api-reference/openapi/accounts.json index 243690e0..f566dfeb 100644 --- a/api-reference/openapi/accounts.json +++ b/api-reference/openapi/accounts.json @@ -2775,7 +2775,7 @@ "/api/admins/coding/slack": { "get": { "operationId": "getAdminsCodingSlack", - "description": "Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.", + "description": "Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token. Optional tag filters by the exact, case-sensitive Slack author ID after trimming whitespace. Filtering happens after the existing period collection and before all totals are calculated; omission preserves the unfiltered report, and an unknown ID returns empty tags with zero totals. Empty or whitespace-only tag values return 400 after admin authentication. This is display filtering, not authorization or a reduction in Slack collection work. Collection retains its existing channel access, retention, history/thread pagination and partial-failure limits. No automatic caller, UI, polling, scheduled action or Slack send is added.", "parameters": [ { "name": "period", @@ -2792,6 +2792,18 @@ ], "default": "all" } + }, + { + "name": "tag", + "in": "query", + "description": "Optional exact, case-sensitive Slack author ID. Leading/trailing whitespace is trimmed; blank values are rejected. This filters already collected mentions before the totals are computed and does not change access or collection work.", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "pattern": "\\S" + }, + "example": "U2" } ], "security": [ @@ -2826,17 +2838,17 @@ }, "total": { "type": "integer", - "description": "Total number of times the Coding Agent was tagged in the requested period", + "description": "Number of collected Coding Agent mentions after the requested period and optional author filter.", "example": 134 }, "total_pull_requests": { "type": "integer", - "description": "Total number of pull requests opened by the Coding Agent across all tags in the requested period", + "description": "Number of pull request links across the filtered collected mentions.", "example": 121 }, "tags_with_pull_requests": { "type": "integer", - "description": "Number of tags that resulted in at least one pull request being opened", + "description": "Number of filtered collected mentions with at least one pull request link.", "example": 84 }, "tags": { @@ -2913,11 +2925,11 @@ } }, "401": { - "description": "Unauthorized - missing or invalid credentials", + "description": "Missing, conflicting or invalid credentials; inspect error or message according to the returned authentication envelope.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AccountErrorResponse" + "$ref": "#/components/schemas/AdminCodingSlackAuthenticationError" } } } @@ -2941,6 +2953,16 @@ } } } + }, + "400": { + "description": "Invalid period or empty/whitespace-only tag; validation follows admin authentication and stops before Slack collection.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCodingSlackQueryError" + } + } + } } } } @@ -3758,6 +3780,92 @@ } } } + }, + "/api/admins/coding-agent/slack-tags": { + "get": { + "operationId": "getAdminsCodingSlackAuthors", + "description": "Returns distinct authors of collected Coding Agent mentions for an admin author selector. Requires the authenticated account to be a Recoup admin, using exactly one of x-api-key or Authorization Bearer. No query parameters are defined. Each authorized request runs the existing all-period Slack collector once, then deduplicates by Slack author ID, retains the first collected profile and sorts by display name using localeCompare; identical names do not merge different IDs. The result is authors in that collected data, not a complete all-time Slack directory. Existing channel access, retention, paginated history, first-page thread replies and partial-failure limits remain; partial collection can still produce an incomplete successful result. Thrown collection failures return 500. This call is not free cached metadata: a future caller must account for scan latency and quotas. The release adds no automatic caller, UI, polling, scheduled action, new Slack scope or Slack send. Production admin access, history coverage, latency and quotas were not verified by the source contract tests.", + "parameters": [], + "security": [ + { + "apiKeyAuth": [] + }, + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Distinct collected authors; an empty collected dataset returns total 0 and tags [].", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCodingSlackAuthorsResponse" + }, + "examples": { + "collectedAuthors": { + "summary": "Synthetic distinct authors; the first collected Bob profile has no avatar.", + "value": { + "status": "success", + "total": 2, + "tags": [ + { + "id": "U1", + "name": "Alice", + "avatar": null + }, + { + "id": "U2", + "name": "Bob", + "avatar": null + } + ] + } + }, + "noAuthors": { + "summary": "No collected authors.", + "value": { + "status": "success", + "total": 0, + "tags": [] + } + } + } + } + } + }, + "401": { + "description": "Missing, conflicting or invalid credentials; inspect error or message according to the authentication envelope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCodingSlackAuthenticationError" + } + } + } + }, + "403": { + "description": "The authenticated account is not a Recoup admin.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountErrorResponse" + } + } + } + }, + "500": { + "description": "Thrown collection failure with a generic server message.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountErrorResponse" + } + } + } + } + } + } } }, "components": { @@ -6473,6 +6581,86 @@ "example": "https://billing.example.com/manage/portal_sess_a1b2c3d4" } } + }, + "AdminCodingSlackQueryError": { + "type": "object", + "required": [ + "status", + "error" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ] + }, + "error": { + "type": "string", + "description": "The first invalid query field or authentication-mechanism error." + } + } + }, + "AdminCodingSlackAuthenticationError": { + "description": "Missing or simultaneous authentication mechanisms return status/error. An invalid API key or Bearer credential returns status/message. Supply exactly one mechanism and authenticate a Recoup admin account.", + "oneOf": [ + { + "$ref": "#/components/schemas/AdminCodingSlackQueryError" + }, + { + "$ref": "#/components/schemas/AccountErrorResponse" + } + ] + }, + "AdminCodingSlackAuthorsResponse": { + "type": "object", + "required": [ + "status", + "total", + "tags" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "success" + ] + }, + "total": { + "type": "integer", + "minimum": 0, + "description": "Number of distinct author IDs in the collected data." + }, + "tags": { + "type": "array", + "description": "Distinct authors, deduplicated by ID and sorted by display name with the server localeCompare order. The first collected profile is retained; equal names do not merge distinct IDs.", + "items": { + "type": "object", + "required": [ + "id", + "name", + "avatar" + ], + "properties": { + "id": { + "type": "string", + "description": "Slack author ID; use it as the analytics tag filter." + }, + "name": { + "type": "string", + "description": "Display name from the first collected profile." + }, + "avatar": { + "type": [ + "string", + "null" + ], + "description": "Avatar URL from the first collected profile, or null." + } + } + } + } + } } } } diff --git a/docs.json b/docs.json index fe400c4d..0d26b0d1 100644 --- a/docs.json +++ b/docs.json @@ -421,6 +421,7 @@ "api-reference/admins/emails", "api-reference/admins/privy", "api-reference/admins/coding-agent-slack-tags", + "api-reference/admins/coding-agent-slack-authors", "api-reference/admins/coding-pr", "api-reference/admins/content-slack-tags", "api-reference/admins/agent-signups", diff --git a/llms-full.txt b/llms-full.txt index d72e6811..21c99ba3 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -53639,7 +53639,7 @@ This operation requires one of the security alternatives in the specification be Source: https://recoupable.dev/docs/api-reference/admins/coding-agent-slack-tags -Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token. +Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token. Optional tag filters by the exact, case-sensitive Slack author ID after trimming whitespace. Filtering happens after the existing period collection and before all totals are calculated; omission preserves the unfiltered report, and an unknown ID returns empty tags with zero totals. Empty or whitespace-only tag values return 400 after admin authentication. This is display filtering, not authorization or a reduction in Slack collection work. Collection retains its existing channel access, retention, history/thread pagination and partial-failure limits. No automatic caller, UI, polling, scheduled action or Slack send is added. ## GET /api/admins/coding/slack @@ -53673,7 +53673,7 @@ This operation requires one of the security alternatives in the specification be "/api/admins/coding/slack": { "get": { "operationId": "getAdminsCodingSlack", - "description": "Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.", + "description": "Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token. Optional tag filters by the exact, case-sensitive Slack author ID after trimming whitespace. Filtering happens after the existing period collection and before all totals are calculated; omission preserves the unfiltered report, and an unknown ID returns empty tags with zero totals. Empty or whitespace-only tag values return 400 after admin authentication. This is display filtering, not authorization or a reduction in Slack collection work. Collection retains its existing channel access, retention, history/thread pagination and partial-failure limits. No automatic caller, UI, polling, scheduled action or Slack send is added.", "parameters": [ { "name": "period", @@ -53690,6 +53690,18 @@ This operation requires one of the security alternatives in the specification be ], "default": "all" } + }, + { + "name": "tag", + "in": "query", + "description": "Optional exact, case-sensitive Slack author ID. Leading/trailing whitespace is trimmed; blank values are rejected. This filters already collected mentions before the totals are computed and does not change access or collection work.", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "pattern": "\\S" + }, + "example": "U2" } ], "security": [ @@ -53724,17 +53736,17 @@ This operation requires one of the security alternatives in the specification be }, "total": { "type": "integer", - "description": "Total number of times the Coding Agent was tagged in the requested period", + "description": "Number of collected Coding Agent mentions after the requested period and optional author filter.", "example": 134 }, "total_pull_requests": { "type": "integer", - "description": "Total number of pull requests opened by the Coding Agent across all tags in the requested period", + "description": "Number of pull request links across the filtered collected mentions.", "example": 121 }, "tags_with_pull_requests": { "type": "integer", - "description": "Number of tags that resulted in at least one pull request being opened", + "description": "Number of filtered collected mentions with at least one pull request link.", "example": 84 }, "tags": { @@ -53810,12 +53822,22 @@ This operation requires one of the security alternatives in the specification be } } }, + "400": { + "description": "Invalid period or empty/whitespace-only tag; validation follows admin authentication and stops before Slack collection.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCodingSlackQueryError" + } + } + } + }, "401": { - "description": "Unauthorized - missing or invalid credentials", + "description": "Missing, conflicting or invalid credentials; inspect error or message according to the returned authentication envelope.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AccountErrorResponse" + "$ref": "#/components/schemas/AdminCodingSlackAuthenticationError" } } } @@ -53846,6 +53868,36 @@ This operation requires one of the security alternatives in the specification be }, "components": { "schemas": { + "AdminCodingSlackQueryError": { + "type": "object", + "required": [ + "status", + "error" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ] + }, + "error": { + "type": "string", + "description": "The first invalid query field or authentication-mechanism error." + } + } + }, + "AdminCodingSlackAuthenticationError": { + "description": "Missing or simultaneous authentication mechanisms return status/error. An invalid API key or Bearer credential returns status/message. Supply exactly one mechanism and authenticate a Recoup admin account.", + "oneOf": [ + { + "$ref": "#/components/schemas/AdminCodingSlackQueryError" + }, + { + "$ref": "#/components/schemas/AccountErrorResponse" + } + ] + }, "AccountErrorResponse": { "type": "object", "required": [ @@ -53884,6 +53936,248 @@ This operation requires one of the security alternatives in the specification be ``` +# List Coding Agent Slack Authors (Admin) + +Source: https://recoupable.dev/docs/api-reference/admins/coding-agent-slack-authors + +Returns distinct authors of collected Coding Agent mentions for an admin author selector. Requires the authenticated account to be a Recoup admin, using exactly one of x-api-key or Authorization Bearer. No query parameters are defined. Each authorized request runs the existing all-period Slack collector once, then deduplicates by Slack author ID, retains the first collected profile and sorts by display name using localeCompare; identical names do not merge different IDs. The result is authors in that collected data, not a complete all-time Slack directory. Existing channel access, retention, paginated history, first-page thread replies and partial-failure limits remain; partial collection can still produce an incomplete successful result. Thrown collection failures return 500. This call is not free cached metadata: a future caller must account for scan latency and quotas. The release adds no automatic caller, UI, polling, scheduled action, new Slack scope or Slack send. Production admin access, history coverage, latency and quotas were not verified by the source contract tests. + +## GET /api/admins/coding-agent/slack-tags + +Full OpenAPI specification: https://recoupable.dev/docs/spec/accounts.json + +## Authentication + +This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification. + +[Authentication guide](https://recoupable.dev/docs/authentication) + +## Operation and referenced schemas + +```json +{ + "openapi": "3.1.0", + "info": { + "title": "Recoup API - Accounts", + "description": "API documentation for the Recoup platform - an AI agent platform for the music industry", + "license": { + "name": "MIT" + }, + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.recoupable.dev" + } + ], + "paths": { + "/api/admins/coding-agent/slack-tags": { + "get": { + "operationId": "getAdminsCodingSlackAuthors", + "description": "Returns distinct authors of collected Coding Agent mentions for an admin author selector. Requires the authenticated account to be a Recoup admin, using exactly one of x-api-key or Authorization Bearer. No query parameters are defined. Each authorized request runs the existing all-period Slack collector once, then deduplicates by Slack author ID, retains the first collected profile and sorts by display name using localeCompare; identical names do not merge different IDs. The result is authors in that collected data, not a complete all-time Slack directory. Existing channel access, retention, paginated history, first-page thread replies and partial-failure limits remain; partial collection can still produce an incomplete successful result. Thrown collection failures return 500. This call is not free cached metadata: a future caller must account for scan latency and quotas. The release adds no automatic caller, UI, polling, scheduled action, new Slack scope or Slack send. Production admin access, history coverage, latency and quotas were not verified by the source contract tests.", + "parameters": [], + "security": [ + { + "apiKeyAuth": [] + }, + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Distinct collected authors; an empty collected dataset returns total 0 and tags [].", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCodingSlackAuthorsResponse" + }, + "examples": { + "collectedAuthors": { + "summary": "Synthetic distinct authors; the first collected Bob profile has no avatar.", + "value": { + "status": "success", + "total": 2, + "tags": [ + { + "id": "U1", + "name": "Alice", + "avatar": null + }, + { + "id": "U2", + "name": "Bob", + "avatar": null + } + ] + } + }, + "noAuthors": { + "summary": "No collected authors.", + "value": { + "status": "success", + "total": 0, + "tags": [] + } + } + } + } + } + }, + "401": { + "description": "Missing, conflicting or invalid credentials; inspect error or message according to the authentication envelope.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminCodingSlackAuthenticationError" + } + } + } + }, + "403": { + "description": "The authenticated account is not a Recoup admin.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountErrorResponse" + } + } + } + }, + "500": { + "description": "Thrown collection failure with a generic server message.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountErrorResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AdminCodingSlackAuthorsResponse": { + "type": "object", + "required": [ + "status", + "total", + "tags" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "success" + ] + }, + "total": { + "type": "integer", + "minimum": 0, + "description": "Number of distinct author IDs in the collected data." + }, + "tags": { + "type": "array", + "description": "Distinct authors, deduplicated by ID and sorted by display name with the server localeCompare order. The first collected profile is retained; equal names do not merge distinct IDs.", + "items": { + "type": "object", + "required": [ + "id", + "name", + "avatar" + ], + "properties": { + "id": { + "type": "string", + "description": "Slack author ID; use it as the analytics tag filter." + }, + "name": { + "type": "string", + "description": "Display name from the first collected profile." + }, + "avatar": { + "type": [ + "string", + "null" + ], + "description": "Avatar URL from the first collected profile, or null." + } + } + } + } + } + }, + "AdminCodingSlackAuthenticationError": { + "description": "Missing or simultaneous authentication mechanisms return status/error. An invalid API key or Bearer credential returns status/message. Supply exactly one mechanism and authenticate a Recoup admin account.", + "oneOf": [ + { + "$ref": "#/components/schemas/AdminCodingSlackQueryError" + }, + { + "$ref": "#/components/schemas/AccountErrorResponse" + } + ] + }, + "AccountErrorResponse": { + "type": "object", + "required": [ + "status", + "message" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ], + "description": "Status of the request" + }, + "message": { + "type": "string", + "description": "Error message describing what went wrong" + } + } + }, + "AdminCodingSlackQueryError": { + "type": "object", + "required": [ + "status", + "error" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ] + }, + "error": { + "type": "string", + "description": "The first invalid query field or authentication-mechanism error." + } + } + } + }, + "securitySchemes": { + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "x-api-key", + "description": "Your Recoup API key. [Learn more](https://recoupable.dev/docs/quickstart#api-keys)." + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + } + } +} +``` + + # Get Coding Agent PR Merged Status (Admin) Source: https://recoupable.dev/docs/api-reference/admins/coding-pr