Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ docker-compose.override.yaml
**/CLAUDE.md
.claude
.cursorrules

# Planning files (local only)
.planning

.cursor/*
!.cursor/README.md
!.cursor/cursor.md
Expand Down
1 change: 1 addition & 0 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ build-v4: node_modules playbooks
@cat $(V4_SRC)/access_control.yaml >> $(V4_YAML)
@cat $(V4_SRC)/content_flagging.yaml >> $(V4_YAML)
@cat $(V4_SRC)/agents.yaml >> $(V4_YAML)
@cat $(V4_SRC)/scheduled_recaps.yaml >> $(V4_YAML)
@cat $(V4_SRC)/properties.yaml >> $(V4_YAML)
@if [ -r $(PLAYBOOKS_SRC)/paths.yaml ]; then cat $(PLAYBOOKS_SRC)/paths.yaml >> $(V4_YAML); fi
@if [ -r $(PLAYBOOKS_SRC)/merged-definitions.yaml ]; then cat $(PLAYBOOKS_SRC)/merged-definitions.yaml >> $(V4_YAML); else cat $(V4_SRC)/definitions.yaml >> $(V4_YAML); fi
Expand Down
149 changes: 149 additions & 0 deletions api/v4/source/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5436,6 +5436,155 @@ components:
type: integer
format: int64
description: The time in milliseconds the recap channel was created
RecapLimitStatus:
type: object
description: The current user's recap limit status including usage and cooldown information
properties:
effective_limits:
$ref: "#/components/schemas/EffectiveRecapLimits"
daily:
$ref: "#/components/schemas/DailyUsageStatus"
cooldown:
$ref: "#/components/schemas/CooldownStatus"
EffectiveRecapLimits:
type: object
description: Resolved recap limit values for a user. A value of -1 means the limit is disabled/unlimited.
properties:
max_recaps_per_day:
type: integer
description: Maximum number of recaps the user can create per day (-1 = unlimited)
max_scheduled_recaps:
type: integer
description: Maximum number of scheduled recaps (-1 = unlimited)
max_channels_per_recap:
type: integer
description: Maximum number of channels per recap (-1 = unlimited)
max_posts_per_recap:
type: integer
description: Maximum number of posts per recap (-1 = unlimited)
max_tokens_per_recap:
type: integer
description: Maximum number of tokens per recap (-1 = unlimited)
max_posts_per_day:
type: integer
description: Maximum number of posts that can be processed per day (-1 = unlimited)
cooldown_minutes:
type: integer
description: Cooldown period in minutes between recap creations (-1 = no cooldown)
source:
type: string
enum: [system, group, user]
description: Where the effective limits originated from
source_id:
type: string
description: Group ID or User ID if overridden, empty for system defaults
DailyUsageStatus:
type: object
description: Daily recap usage tracking
properties:
used:
type: integer
description: Number of recaps used today
limit:
type: integer
description: Maximum recaps allowed per day
reset_at:
type: integer
format: int64
description: Unix timestamp in milliseconds when daily usage resets
CooldownStatus:
type: object
description: Cooldown state for recap creation
properties:
is_active:
type: boolean
description: Whether the cooldown is currently active
available_at:
type: integer
format: int64
description: Unix timestamp in milliseconds when cooldown ends
retry_after_seconds:
type: integer
description: Seconds until recap creation is available again
ScheduledRecap:
type: object
properties:
id:
type: string
description: Unique identifier for the scheduled recap
user_id:
type: string
description: The ID of the user who owns this scheduled recap
title:
type: string
description: Title for the scheduled recap
maxLength: 255
days_of_week:
type: integer
description: >
Bitmask for days of the week the recap should run.
Sun=1, Mon=2, Tue=4, Wed=8, Thu=16, Fri=32, Sat=64.
minimum: 1
maximum: 127
time_of_day:
type: string
description: Time of day in HH:MM format (e.g., "09:00")
timezone:
type: string
description: IANA timezone (e.g., "America/New_York")
time_period:
type: string
description: The lookback period for the recap content
enum:
- last_24h
- last_week
- since_last_read
next_run_at:
type: integer
format: int64
description: The next scheduled execution time in UTC milliseconds
last_run_at:
type: integer
format: int64
description: The last execution time in UTC milliseconds
run_count:
type: integer
description: Number of times this schedule has executed
channel_mode:
type: string
description: How channels are selected for the recap
enum:
- specific
- all_unreads
channel_ids:
type: array
items:
type: string
description: List of channel IDs to include (when channel_mode is "specific")
custom_instructions:
type: string
description: Custom AI instructions for the recap
agent_id:
type: string
description: ID of the AI agent to use for generating the recap
is_recurring:
type: boolean
description: Whether the recap runs on a recurring schedule or just once
enabled:
type: boolean
description: Whether the scheduled recap is active (false when paused)
create_at:
type: integer
format: int64
description: The time in milliseconds the scheduled recap was created
update_at:
type: integer
format: int64
description: The time in milliseconds the scheduled recap was last updated
delete_at:
type: integer
format: int64
description: The time in milliseconds the scheduled recap was soft-deleted (0 if not deleted)
externalDocs:
description: Find out more about Mattermost
url: 'https://about.mattermost.com'
Expand Down
2 changes: 2 additions & 0 deletions api/v4/source/introduction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ tags:
description: Endpoints for managing audit log certificates and configuration.
- name: recaps
description: Endpoints for creating and managing AI-powered channel recaps that summarize unread messages.
- name: scheduled recaps
description: Endpoints for creating and managing scheduled recaps that run automatically on a configured schedule.
- name: agents
description: Endpoints for interacting with AI agents and LLM services.
servers:
Expand Down
27 changes: 27 additions & 0 deletions api/v4/source/recaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,33 @@
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"/api/v4/recaps/limit_status":
get:
tags:
- recaps
- ai
summary: Get recap limit status for the current user
description: >
Get the current user's recap usage limits and status, including daily
usage, effective limits, and cooldown information.

##### Permissions

Must be authenticated.

__Minimum server version__: 11.2
operationId: GetRecapLimitStatus
responses:
"200":
description: Recap limit status retrieval successful
content:
application/json:
schema:
$ref: "#/components/schemas/RecapLimitStatus"
"401":
$ref: "#/components/responses/Unauthorized"
"501":
description: Recaps feature is not enabled
"/api/v4/recaps/mark_viewed":
post:
tags:
Expand Down
Loading
Loading