-
Notifications
You must be signed in to change notification settings - Fork 13
Move the curated Composio catalogs into the contract crate #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
34d09a3
refactor(composio): move catalogs into the bus crate
senamakel 507c395
refactor(composio): update catalog module paths
senamakel f45a979
feat(composio): add catalogs module for composio bus
senamakel 6c10908
feat(composio): extract curated catalogs into their own module
senamakel c54f9e2
test(composio): add catalog module tests
senamakel d9e3480
refactor(composio): centralize catalogs and scope lookup in API
senamakel 43e7558
feat(composio): expose static capability matrix
senamakel 6bdc8ef
refactor(composio): centralize capability and catalog lookups
senamakel 9bdf9cd
docs(composio): document curated toolkit catalogs
senamakel 47245b6
fix(composio): use regular comments for implementation notes
senamakel 42e2d3c
fix(composio): support additional Google and OneDrive slugs
senamakel 8cc4bce
feat(retrieval): add defaults for fast retrieval queries
senamakel 133b7e0
test(retrieval): verify contract and engine defaults match
senamakel e762964
Merge remote-tracking branch 'origin/main' into tinymemory-bus-only
senamakel 9b890cd
chore(composio): reformat long lines and reorder imports
senamakel 85b24d1
fix(composio): handle missing Microsoft catalog gracefully
senamakel 5d36fbf
fix(composio): handle missing productivity catalog gracefully
senamakel 25f408f
chore(tinymemory-bus): remove unused test module
senamakel b3ead1c
chore(catalogs): backtick-quote tool names in doc comments
senamakel 4ad7345
chore(composio): add catalogs compatibility module
senamakel 8d5be90
chore(composio): remove unused providers module
senamakel 7c181e1
fix(providers): correct module path for composio provider imports
senamakel ad555ae
chore(composio): remove commented-out tool entries from curated catalogs
senamakel 3e08612
fix(composio): correct catalog description for memory-mapped I/O region
senamakel 149ded8
fix(tinymemory-bus): correct test module path for composio catalogs
senamakel 0e21f9c
chore(descriptions): flatten microsoft teams description
senamakel f015621
chore: files changed crates/tinymemory-core/src/sync/composio/provide…
senamakel 4560a62
feat(sync): add deletion notice to catalogs compat module
senamakel e65ff58
docs(scopes): document that action-slug catalogs now live in super::c…
senamakel 286a6cd
fix(composio): correct doc comment about catalog location
senamakel 46b8735
chore(composio): move test module declaration to end of file
senamakel de82098
docs(composio/catalogs): add README for composio catalogs
senamakel d50a9b7
docs(catalogs): add `has_native_provider` to the list of moved functions
senamakel 8cf0f3a
docs(README): clarify the historical path and compat module in public…
senamakel 134b815
chore(composio): move compat tests to a separate file
senamakel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # composio::catalogs | ||
|
|
||
| The curated Composio tool catalogs, and the lookups over them. Composio | ||
| publishes 60+ actions per toolkit; most are noise for an agent's planning | ||
| loop. Each toolkit that has one gets a hand-curated `&'static [CuratedTool]` | ||
| slice that pares the surface down to a useful subset and tags every action | ||
| with a [`ToolScope`](../scopes.rs), so a user's scope preference can gate | ||
| execution per action. | ||
|
|
||
| Moved here from the engine crate (`tinymemory-core`) by OpenHuman#5560: the | ||
| catalogs are `&'static str` action slugs with no dependency of any kind, and | ||
| the *host* is their heaviest reader (it filters the agent's visible tool | ||
| list, renders unlock hints, and decides which connected toolkits get the | ||
| "agent-ready" badge). While they lived in the engine crate, every one of | ||
| those host reads was a compile-time link to `tinymemory-core`; now a host can | ||
| read them by depending on `tinymemory-bus` (or `tinymemory-api`) alone. | ||
|
|
||
| ## Responsibilities | ||
|
|
||
| - Hold one curated `&'static [CuratedTool]` table per catalogued toolkit, | ||
| grouped by category (see Key files). | ||
| - Resolve a toolkit slug — including its known aliases and casing — to its | ||
| catalog via [`catalog_for_toolkit`]. | ||
| - Answer "should this action slug be visible to the agent, given a loaded | ||
| user scope preference?" via [`is_action_visible_with_pref`], falling back | ||
| to [`classify_unknown`] for toolkits with no curated catalog. | ||
| - Answer "what scope does this slug require?" via [`curated_scope_for`]. | ||
| - Provide a short human-readable description of a toolkit for the UI via | ||
| [`toolkit_description`] (`descriptions.rs`). | ||
| - Track which catalogued toolkits have a native `ComposioProvider` in the | ||
| engine crate ([`NATIVE_PROVIDERS`]) and how often each one syncs | ||
| ([`native_provider_sync_interval_secs`]), without depending on the engine | ||
| crate's provider trait or registry. | ||
|
|
||
| ## Key files | ||
|
|
||
| | File | Role | | ||
| | --- | --- | | ||
| | `mod.rs` | Module docs, category re-exports, `CAPABILITY_TOOLKITS`, `catalog_for_toolkit`, `is_action_visible_with_pref`, `curated_scope_for`, `toolkit_has_scope`, `NATIVE_PROVIDERS`, sync-interval helpers. | | ||
| | `descriptions.rs` | `toolkit_description` — one short sentence per toolkit slug (including aliases), generic fallback for anything uncatalogued. | | ||
| | `business.rs`, `google.rs`, `messaging.rs`, `microsoft.rs`, `productivity.rs`, `social_media.rs` | The category-grouped `CuratedTool` tables (Shopify/Stripe/HubSpot/…, Google apps, Slack/Discord/…, OneDrive/Excel, Outlook/Linear/Jira/…, Twitter/Spotify/YouTube). | | ||
| | `github.rs`, `gmail.rs`, `notion.rs`, `linear.rs`, `clickup.rs` | Provider-colocated catalogs for the five toolkits with a native `ComposioProvider` in the engine crate. | | ||
| | `mod_tests.rs`, `microsoft_tests.rs`, `productivity_tests.rs` | Module-local unit tests, wired from the bottom of `mod.rs` / the relevant category file with `#[cfg(test)] #[path = "…_tests.rs"] mod tests;`. | | ||
|
|
||
| ## Public surface | ||
|
|
||
| Re-exported from `mod.rs` (and re-exported again from `tinymemory-api::composio::catalogs`, | ||
| and from `tinymemory-core::sync::composio::providers::catalogs` for the historical flat | ||
| path — plus `tinymemory-core`'s `providers::catalogs_compat` module, which restores the | ||
| six per-category module names — `catalogs_business`, `catalogs_google`, … — that predate | ||
| this move): | ||
|
|
||
| - `catalog_for_toolkit`, `is_action_visible_with_pref`, `curated_scope_for`, `toolkit_has_scope`, `has_native_provider` | ||
| - `CAPABILITY_TOOLKITS`, `NATIVE_PROVIDERS` | ||
| - `toolkit_description` | ||
| - `sync_interval_env_var`, `parse_sync_interval_override`, `native_provider_sync_interval_secs` | ||
| - every category module (`business`, `google`, `messaging`, `microsoft`, `productivity`, | ||
| `social_media`) and every provider-colocated module (`gmail`, `notion`, `github`, | ||
| `linear`, `clickup`), each exporting its `&'static [CuratedTool]` constants. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| None beyond `serde`/`std` (via [`CuratedTool`]/[`ToolScope`] in `../scopes.rs`). This | ||
| module must stay dependency-light — see the guard command in | ||
| `tinymemory-bus/Cargo.toml`'s doc comment (`cargo tree -p tinymemory-bus -e normal,build | ||
| --prefix none | grep -Ei 'rusqlite|libsqlite|git2|reqwest|regex|tokio|tinybus'`, expect no | ||
| match) before adding anything here. | ||
|
|
||
| ## Used by | ||
|
|
||
| - `tinymemory-api::host::composio::capability_matrix` — the static integrations-overview | ||
| RPC surface. | ||
| - `tinymemory-core::sync::composio::providers` — re-exports every symbol above at its | ||
| historical path so in-engine callers (trigger dispatch, periodic sync, the six native | ||
| `ComposioProvider` impls) keep resolving unchanged. | ||
| - The OpenHuman host — filters the agent's visible tool list and renders "agent-ready" / | ||
| unlock-hint UI without linking `tinymemory-core`. | ||
|
|
||
| ## Notes / gotchas | ||
|
|
||
| - `get_provider(..).curated_tools()` (the engine's provider-registry hop) is deliberately | ||
| **not** consulted here. Every native provider's `curated_tools()` was verified to return | ||
| exactly the slice `catalog_for_toolkit` returns for the same toolkit, so the hop was pure | ||
| indirection — see the "`get_provider(..).curated_tools()` is not a separate source" | ||
| section in `mod.rs`'s module docs. | ||
| - `resolve_sync_interval_secs` (engine-side) logs via `tracing::warn!` on a malformed | ||
| interval override; `native_provider_sync_interval_secs` here applies the identical rule | ||
| (`parse_sync_interval_override`) silently, because an observability read should not emit | ||
| warnings. Do not add `tracing` to this crate to "fix" that — it is intentional. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| //! Curated catalog of ClickUp Composio actions exposed to the agent. | ||
| //! | ||
| //! Slugs match Composio's naming convention (`<TOOLKIT>_<ACTION>`) for | ||
| //! the ClickUp REST surface. See <https://composio.dev/docs/toolkits/clickup> | ||
| //! for the canonical action list; the entries here are the read-oriented | ||
| //! subset the periodic Memory Tree sync relies on, plus the most common | ||
| //! task-write surface the agent already uses through generic tool-calling. | ||
|
|
||
| use crate::composio::scopes::{CuratedTool, ToolScope}; | ||
|
|
||
| /// The curated action catalog for the `clickup` toolkit. | ||
| pub const CLICKUP_CURATED: &[CuratedTool] = &[ | ||
| // ── Read: identity ───────────────────────────────────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_AUTHORIZED_USER", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_AUTHORIZED_TEAMS_WORKSPACES", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| // ── Read: structure (workspace → space → folder → list) ────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_SPACES", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_FOLDERS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_LISTS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_FOLDERLESS_LISTS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| // ── Read: tasks (the main memory ingest surface) ────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_FILTERED_TEAM_TASKS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_TASKS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_TASK", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_TASK_COMMENTS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_LIST_COMMENTS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| // ── Read: docs / views / time tracking ──────────────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_SEARCH_DOCS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_DOC_PAGES", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_VIEW_TASKS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_TIME_ENTRIES_WITHIN_A_DATE_RANGE", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| // ── Read: members ───────────────────────────────────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_WORKSPACE_MEMBERS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_GET_TASK_MEMBERS", | ||
| scope: ToolScope::Read, | ||
| }, | ||
| // ── Write: create / update tasks ────────────────────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_CREATE_TASK", | ||
| scope: ToolScope::Write, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_UPDATE_TASK", | ||
| scope: ToolScope::Write, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_CREATE_TASK_COMMENT", | ||
| scope: ToolScope::Write, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_UPDATE_COMMENT", | ||
| scope: ToolScope::Write, | ||
| }, | ||
| // ── Write: structure ────────────────────────────────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_CREATE_LIST", | ||
| scope: ToolScope::Write, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_UPDATE_LIST", | ||
| scope: ToolScope::Write, | ||
| }, | ||
| // ── Admin: destructive ──────────────────────────────────────── | ||
| CuratedTool { | ||
| slug: "CLICKUP_DELETE_TASK", | ||
| scope: ToolScope::Admin, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_DELETE_COMMENT", | ||
| scope: ToolScope::Admin, | ||
| }, | ||
| CuratedTool { | ||
| slug: "CLICKUP_DELETE_LIST", | ||
| scope: ToolScope::Admin, | ||
| }, | ||
| ]; |
65 changes: 65 additions & 0 deletions
65
crates/tinymemory-bus/src/composio/catalogs/descriptions.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| //! Human-readable capability summaries for Composio toolkit slugs. | ||
|
|
||
| /// Human-readable capability summary for a Composio toolkit slug. | ||
| /// | ||
| /// Used by the prompt renderer to tell the orchestrator what each connected | ||
| /// integration can do. Covers the most common toolkits; unknown slugs get | ||
| /// a generic fallback so newly connected services still appear. | ||
| pub fn toolkit_description(slug: &str) -> &'static str { | ||
| match slug { | ||
| "gmail" => { | ||
| "Send, read, draft, reply, forward, and search emails; manage labels and threads" | ||
| } | ||
| "notion" => "Create, read, update, and search notion pages and notion databases", | ||
| "github" => { | ||
| "Manage repositories, issues, and pull requests on GitHub; sync \ | ||
| assigned issues into Memory Tree" | ||
| } | ||
| "slack" => "Send messages, read channels, manage threads, and post updates in Slack", | ||
| "discord" => "Send messages, manage channels, and interact with Discord servers", | ||
| "google_calendar" | "googlecalendar" => { | ||
| "Create, update, and query calendar events; check availability" | ||
| } | ||
| "google_drive" | "googledrive" => { | ||
| "Upload, download, search, and share files in Google Drive" | ||
| } | ||
| "google_docs" | "googledocs" => "Create, read, and edit Google Docs documents", | ||
| "google_sheets" | "googlesheets" => "Read, write, and manage Google Sheets spreadsheets", | ||
| "outlook" => "Send, read, and manage emails in Microsoft Outlook", | ||
| "microsoft" | "microsoft_teams" => "Send messages and manage channels in Microsoft Teams", | ||
| "larksuite" => { | ||
| "Connect Lark / Feishu workspace chat, docs, wiki, and meetings via Composio" | ||
| } | ||
| "linear" => { | ||
| "Create, read, and manage issues, projects, and cycles in Linear; sync \ | ||
| assigned issues into Memory Tree" | ||
| } | ||
| "jira" => "Create and manage issues, projects, and sprints in Jira", | ||
| "trello" => "Create and manage cards, lists, and boards in Trello", | ||
| "asana" => "Create and manage tasks, projects, and sections in Asana", | ||
| "clickup" => { | ||
| "Create, read, and manage tasks, lists, and docs in ClickUp; sync \ | ||
| assigned tasks into Memory Tree" | ||
| } | ||
| "dropbox" => "Upload, download, and share files in Dropbox", | ||
| "twitter" => "Post tweets, read timelines, and manage Twitter interactions", | ||
| "spotify" => "Control playback, search music, and manage playlists on Spotify", | ||
| "telegram" => "Send and receive messages via Telegram", | ||
| "whatsapp" => "Send and receive messages via WhatsApp", | ||
| "twilio" => "Send SMS, make calls, and manage communications via Twilio", | ||
| "shopify" => "Manage products, orders, and customers in Shopify", | ||
| "stripe" => "Manage payments, subscriptions, and customers in Stripe", | ||
| "hubspot" => "Manage contacts, deals, and marketing in HubSpot", | ||
| "salesforce" => "Manage contacts, leads, and opportunities in Salesforce", | ||
| "airtable" => "Read and write records in Airtable bases", | ||
| "figma" => "Access and manage Figma design files and components", | ||
| "youtube" => "Search videos, manage playlists, and interact with YouTube", | ||
| "calendar" => "Create, update, and query calendar events", | ||
| "one_drive" | "onedrive" | "one" => { | ||
| "Upload, download, search, and share files in Microsoft OneDrive" | ||
| } | ||
| "excel" => "Read, write, and manage workbooks, worksheets, and tables in Microsoft Excel", | ||
| "todoist" => "Create and manage tasks, projects, sections, and labels in Todoist", | ||
| _ => "Interact with this connected service via its available actions", | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.