diff --git a/components/hedy/actions/create-session-context/create-session-context.mjs b/components/hedy/actions/create-session-context/create-session-context.mjs new file mode 100644 index 0000000000000..c7088ef6928f4 --- /dev/null +++ b/components/hedy/actions/create-session-context/create-session-context.mjs @@ -0,0 +1,53 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-create-session-context", + name: "Create Session Context", + description: "Creates a new reusable Hedy session context — a named set of custom AI instructions that can be applied to meeting recordings to guide analysis." + + " Free accounts are limited to 1 context; Pro accounts can create multiple." + + " Set `isDefault` to `true` to make this context automatically applied to new sessions." + + " Use **Update Session Context** to modify an existing context, or **Delete Session Context** to remove one." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Session%20Contexts/post_contexts)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + app, + title: { + propDefinition: [ + app, + "title", + ], + }, + content: { + propDefinition: [ + app, + "content", + ], + }, + isDefault: { + propDefinition: [ + app, + "isDefault", + ], + default: false, + }, + }, + async run({ $ }) { + const response = await this.app.createContext({ + $, + data: { + title: this.title, + content: this.content, + isDefault: this.isDefault, + }, + }); + const context = response?.data || response; + $.export("$summary", `Created session context: ${context?.title || this.title}`); + return response; + }, +}; diff --git a/components/hedy/actions/create-topic/create-topic.mjs b/components/hedy/actions/create-topic/create-topic.mjs new file mode 100644 index 0000000000000..7f7fb2c0efb2d --- /dev/null +++ b/components/hedy/actions/create-topic/create-topic.mjs @@ -0,0 +1,64 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-create-topic", + name: "Create Topic", + description: "Creates a new Hedy meeting topic for organizing sessions." + + " Topics can include a custom AI analysis context (`topicContext`) — up to 20,000 characters of instructions that guide Hedy's AI when analyzing meetings in this topic." + + " Use **Update Topic** to modify an existing topic, or **Delete Topic** to remove one." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Topics/post_topics)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + app, + name: { + type: "string", + label: "Name", + description: "The topic name (maximum 100 characters).", + }, + description: { + type: "string", + label: "Description", + description: "An optional description of the topic (maximum 500 characters).", + optional: true, + }, + color: { + type: "string", + label: "Color", + description: "Optional hex color code for the topic (e.g. `#4CAF50`).", + optional: true, + }, + iconName: { + type: "string", + label: "Icon Name", + description: "Optional icon identifier for the topic.", + optional: true, + }, + topicContext: { + type: "string", + label: "Topic Context", + description: "Optional custom AI instructions for analyzing sessions in this topic (maximum 20,000 characters). Use this to focus Hedy's analysis on specific themes, extract particular insights, or follow custom frameworks.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.app.createTopic({ + $, + data: { + name: this.name, + description: this.description, + color: this.color, + iconName: this.iconName, + topicContext: this.topicContext, + }, + }); + const topic = response?.data || response; + $.export("$summary", `Created topic: ${topic?.name || this.name}`); + return response; + }, +}; diff --git a/components/hedy/actions/delete-session-context/delete-session-context.mjs b/components/hedy/actions/delete-session-context/delete-session-context.mjs new file mode 100644 index 0000000000000..7d9378e7bb80c --- /dev/null +++ b/components/hedy/actions/delete-session-context/delete-session-context.mjs @@ -0,0 +1,34 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-delete-session-context", + name: "Delete Session Context", + description: "Deletes a Hedy session context. This action is irreversible." + + " If you delete the current default context, the most recently created remaining context is automatically promoted to default." + + " Use **Get Many Session Contexts** to find the context ID before deleting." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Session%20Contexts/delete_contexts__contextId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: true, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + app, + contextId: { + propDefinition: [ + app, + "contextId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.deleteContext({ + $, + contextId: this.contextId, + }); + $.export("$summary", `Deleted session context ${this.contextId}`); + return response; + }, +}; diff --git a/components/hedy/actions/delete-topic/delete-topic.mjs b/components/hedy/actions/delete-topic/delete-topic.mjs new file mode 100644 index 0000000000000..0d04bce88bab3 --- /dev/null +++ b/components/hedy/actions/delete-topic/delete-topic.mjs @@ -0,0 +1,33 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-delete-topic", + name: "Delete Topic", + description: "Deletes a Hedy topic. Sessions that were linked to the topic are NOT deleted — they are unlinked and remain in your account." + + " This action is irreversible. Use **Get Many Topics** to find the topic ID before deleting." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Topics/delete_topics__topicId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: true, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + app, + topicId: { + propDefinition: [ + app, + "topicId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.deleteTopic({ + $, + topicId: this.topicId, + }); + $.export("$summary", `Deleted topic ${this.topicId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-highlight/get-highlight.mjs b/components/hedy/actions/get-highlight/get-highlight.mjs new file mode 100644 index 0000000000000..0df927b376e45 --- /dev/null +++ b/components/hedy/actions/get-highlight/get-highlight.mjs @@ -0,0 +1,34 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-highlight", + name: "Get Highlight", + description: "Retrieves full details for a single AI-generated highlight by ID, including the raw quote, cleaned quote, main idea, and AI insight." + + " Use **Get Many Highlights** or **Get Highlights By Session** first to find a highlight ID." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Highlights/get_highlights__highlightId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + highlightId: { + propDefinition: [ + app, + "highlightId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getHighlight({ + $, + highlightId: this.highlightId, + }); + const highlight = response?.data || response; + $.export("$summary", `Retrieved highlight: ${highlight?.title || this.highlightId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-highlights-by-session/get-highlights-by-session.mjs b/components/hedy/actions/get-highlights-by-session/get-highlights-by-session.mjs new file mode 100644 index 0000000000000..0008e9ab6adc6 --- /dev/null +++ b/components/hedy/actions/get-highlights-by-session/get-highlights-by-session.mjs @@ -0,0 +1,38 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-highlights-by-session", + name: "Get Highlights By Session", + description: "Retrieves all AI-generated highlights for a specific Hedy session." + + " Use **Get Many Sessions** first to find the session ID." + + " Each result includes a highlight ID, title, and timestamp within the session." + + " Use **Get Highlight** with the highlight ID to fetch the full detail including raw quote, cleaned quote, main idea, and AI insight." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Highlights/get_sessions__sessionId__highlights)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + sessionId: { + propDefinition: [ + app, + "sessionId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getHighlightsBySession({ + $, + sessionId: this.sessionId, + }); + const highlights = response?.data || []; + $.export("$summary", `Retrieved ${highlights.length} highlight${highlights.length === 1 + ? "" + : "s"} for session ${this.sessionId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-many-highlights/get-many-highlights.mjs b/components/hedy/actions/get-many-highlights/get-many-highlights.mjs new file mode 100644 index 0000000000000..4d33f666420e0 --- /dev/null +++ b/components/hedy/actions/get-many-highlights/get-many-highlights.mjs @@ -0,0 +1,47 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-many-highlights", + name: "Get Many Highlights", + description: "Retrieves a paginated list of AI-generated highlights across all Hedy sessions." + + " Each highlight includes a title, timestamp, and the session it came from." + + " Use **Get Highlight** with a specific highlight ID to fetch the full detail including raw quote, cleaned quote, main idea, and AI insight." + + " To list highlights for a specific session only, use **Get Highlights By Session**." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Highlights/get_highlights)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + limit: { + propDefinition: [ + app, + "limit", + ], + }, + after: { + propDefinition: [ + app, + "after", + ], + }, + }, + async run({ $ }) { + const response = await this.app.listHighlights({ + $, + params: { + limit: this.limit, + after: this.after, + }, + }); + const highlights = response?.data || []; + $.export("$summary", `Retrieved ${highlights.length} highlight${highlights.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-many-session-contexts/get-many-session-contexts.mjs b/components/hedy/actions/get-many-session-contexts/get-many-session-contexts.mjs new file mode 100644 index 0000000000000..96c2606427a6e --- /dev/null +++ b/components/hedy/actions/get-many-session-contexts/get-many-session-contexts.mjs @@ -0,0 +1,30 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-many-session-contexts", + name: "Get Many Session Contexts", + description: "Retrieves all reusable Hedy session contexts, including title, content, and which one is set as the default." + + " Session contexts are custom AI instruction sets that guide Hedy's analysis of meeting recordings." + + " Use this tool to browse available contexts or to find a context ID to pass to **Get Session Context**, **Update Session Context**, or **Delete Session Context**." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Session%20Contexts/get_contexts)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listContexts({ + $, + }); + const contexts = response?.data || []; + $.export("$summary", `Retrieved ${contexts.length} session context${contexts.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-many-sessions/get-many-sessions.mjs b/components/hedy/actions/get-many-sessions/get-many-sessions.mjs new file mode 100644 index 0000000000000..8f5dd1c06b700 --- /dev/null +++ b/components/hedy/actions/get-many-sessions/get-many-sessions.mjs @@ -0,0 +1,48 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-many-sessions", + name: "Get Many Sessions", + description: "Retrieves a paginated list of Hedy meeting sessions ordered from most recent." + + " Each session includes its title, start/end times, duration, and session type." + + " Use this tool to browse recent meetings or to find a session ID to pass to **Get Session** for full transcript and summary details." + + " To list sessions within a specific topic, use **Get Topic Sessions** instead." + + " Paginate using the `after` cursor from the response's `pagination` field." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Sessions/get_sessions)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + limit: { + propDefinition: [ + app, + "limit", + ], + }, + after: { + propDefinition: [ + app, + "after", + ], + }, + }, + async run({ $ }) { + const response = await this.app.listSessions({ + $, + params: { + limit: this.limit, + after: this.after, + }, + }); + const sessions = response?.data || []; + $.export("$summary", `Retrieved ${sessions.length} session${sessions.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-many-todos/get-many-todos.mjs b/components/hedy/actions/get-many-todos/get-many-todos.mjs new file mode 100644 index 0000000000000..dd573be731f1b --- /dev/null +++ b/components/hedy/actions/get-many-todos/get-many-todos.mjs @@ -0,0 +1,31 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-many-todos", + name: "Get Many Todos", + description: "Retrieves a paginated list of action items (todos) across all Hedy sessions." + + " Each item includes the todo text, completion status, optional due date, and the session it came from." + + " To get todos for a specific session only, use **Get Todos By Session**." + + " Use **Get Todo** with a specific todo ID to fetch a single item's full detail." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Todos/get_todos)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listTodos({ + $, + }); + const todos = response?.data || []; + $.export("$summary", `Retrieved ${todos.length} todo${todos.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-many-topics/get-many-topics.mjs b/components/hedy/actions/get-many-topics/get-many-topics.mjs new file mode 100644 index 0000000000000..45e175fd0f6e4 --- /dev/null +++ b/components/hedy/actions/get-many-topics/get-many-topics.mjs @@ -0,0 +1,29 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-many-topics", + name: "Get Many Topics", + description: "Retrieves all Hedy meeting topics with their session counts, last session date, dominant session type, and cached AI overview." + + " Use this tool to browse available topics or to find a topic ID to pass to **Get Topic**, **Get Topic Sessions**, **Update Topic**, or **Delete Topic**." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Topics/get_topics)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + }, + async run({ $ }) { + const response = await this.app.listTopics({ + $, + }); + const topics = response?.data || []; + $.export("$summary", `Retrieved ${topics.length} topic${topics.length === 1 + ? "" + : "s"}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-session-context/get-session-context.mjs b/components/hedy/actions/get-session-context/get-session-context.mjs new file mode 100644 index 0000000000000..46a5e6cf46c6b --- /dev/null +++ b/components/hedy/actions/get-session-context/get-session-context.mjs @@ -0,0 +1,35 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-session-context", + name: "Get Session Context", + description: "Retrieves full details for a single reusable Hedy session context by ID, including the title, content, and whether it is the default context." + + " Session contexts are reusable custom AI instruction sets that guide Hedy's analysis across multiple meetings." + + " Use **Get Many Session Contexts** first to list available contexts and obtain a context ID." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Session%20Contexts/get_contexts__contextId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + contextId: { + propDefinition: [ + app, + "contextId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getContext({ + $, + contextId: this.contextId, + }); + const context = response?.data || response; + $.export("$summary", `Retrieved session context: ${context?.title || this.contextId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-session/get-session.mjs b/components/hedy/actions/get-session/get-session.mjs new file mode 100644 index 0000000000000..8ad8a67f3bd6f --- /dev/null +++ b/components/hedy/actions/get-session/get-session.mjs @@ -0,0 +1,34 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-session", + name: "Get Session", + description: "Retrieves full details for a single Hedy meeting session by ID, including the complete transcript, meeting minutes, recap, session notes, highlights array, and action items (todos)." + + " Use **Get Many Sessions** first to list sessions and obtain a session ID." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Sessions/get_sessions__sessionId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + sessionId: { + propDefinition: [ + app, + "sessionId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getSession({ + $, + sessionId: this.sessionId, + }); + const session = response?.data || response; + $.export("$summary", `Retrieved session: ${session?.title || this.sessionId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-todo/get-todo.mjs b/components/hedy/actions/get-todo/get-todo.mjs new file mode 100644 index 0000000000000..76ef08b4ce473 --- /dev/null +++ b/components/hedy/actions/get-todo/get-todo.mjs @@ -0,0 +1,44 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-todo", + name: "Get Todo", + description: "Retrieves a single action item (todo) by its ID within a session, returning text, completion status, due date, and associated topic." + + " Both the session ID and todo ID are required." + + " Use **Get Todos By Session** first to list todos for a session and obtain todo IDs." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Todos/get_sessions__sessionId__todos__todoId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + sessionId: { + propDefinition: [ + app, + "sessionId", + ], + }, + todoId: { + propDefinition: [ + app, + "todoId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getTodo({ + $, + sessionId: this.sessionId, + todoId: this.todoId, + }); + const todo = response?.data || response; + $.export("$summary", `Retrieved todo: ${todo?.text + ? todo.text.slice(0, 60) + : this.todoId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-todos-by-session/get-todos-by-session.mjs b/components/hedy/actions/get-todos-by-session/get-todos-by-session.mjs new file mode 100644 index 0000000000000..ec01df52e53e3 --- /dev/null +++ b/components/hedy/actions/get-todos-by-session/get-todos-by-session.mjs @@ -0,0 +1,38 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-todos-by-session", + name: "Get Todos By Session", + description: "Retrieves all action items (todos) for a specific Hedy session." + + " Use **Get Many Sessions** first to find the session ID." + + " Each result includes the todo text, completion status, and optional due date." + + " Use **Get Todo** with the session ID and todo ID for single-item detail." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Todos/get_sessions__sessionId__todos)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + sessionId: { + propDefinition: [ + app, + "sessionId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getTodosBySession({ + $, + sessionId: this.sessionId, + }); + const todos = response?.data || []; + $.export("$summary", `Retrieved ${todos.length} todo${todos.length === 1 + ? "" + : "s"} for session ${this.sessionId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-topic-sessions/get-topic-sessions.mjs b/components/hedy/actions/get-topic-sessions/get-topic-sessions.mjs new file mode 100644 index 0000000000000..96484207118fe --- /dev/null +++ b/components/hedy/actions/get-topic-sessions/get-topic-sessions.mjs @@ -0,0 +1,53 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-topic-sessions", + name: "Get Topic Sessions", + description: "Retrieves a paginated list of Hedy sessions belonging to a specific topic." + + " Use **Get Many Topics** first to find the topic ID." + + " Paginate using the `startAfter` cursor (a session ID from the last item in the previous page)." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Topics/get_topics__topicId__sessions)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + topicId: { + propDefinition: [ + app, + "topicId", + ], + }, + limit: { + propDefinition: [ + app, + "limit", + ], + }, + startAfter: { + type: "string", + label: "Start After (Session ID)", + description: "Pagination cursor — pass the session ID of the last item from the previous page to retrieve the next page.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.app.getTopicSessions({ + $, + topicId: this.topicId, + params: { + limit: this.limit, + startAfter: this.startAfter, + }, + }); + const sessions = response?.data || []; + $.export("$summary", `Retrieved ${sessions.length} session${sessions.length === 1 + ? "" + : "s"} for topic ${this.topicId}`); + return response; + }, +}; diff --git a/components/hedy/actions/get-topic/get-topic.mjs b/components/hedy/actions/get-topic/get-topic.mjs new file mode 100644 index 0000000000000..d553a7e688dbb --- /dev/null +++ b/components/hedy/actions/get-topic/get-topic.mjs @@ -0,0 +1,35 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-get-topic", + name: "Get Topic", + description: "Retrieves full details for a single Hedy topic by ID, including the complete custom AI analysis context (`topicContext`), cached overview, and session statistics." + + " The `topicContext` field (up to 20,000 characters) contains custom instructions that guide Hedy's AI analysis for sessions in this topic." + + " Use **Get Many Topics** first to list topics and obtain a topic ID." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Topics/get_topics__topicId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + topicId: { + propDefinition: [ + app, + "topicId", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getTopic({ + $, + topicId: this.topicId, + }); + const topic = response?.data || response; + $.export("$summary", `Retrieved topic: ${topic?.name || this.topicId}`); + return response; + }, +}; diff --git a/components/hedy/actions/update-session-context/update-session-context.mjs b/components/hedy/actions/update-session-context/update-session-context.mjs new file mode 100644 index 0000000000000..e297ec22b7d61 --- /dev/null +++ b/components/hedy/actions/update-session-context/update-session-context.mjs @@ -0,0 +1,59 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-update-session-context", + name: "Update Session Context", + description: "Updates an existing Hedy session context. All fields are optional — only the fields you provide will be changed." + + " If you set `isDefault` to `true`, this context becomes the default and the previous default is demoted." + + " Use **Get Many Session Contexts** to find the context ID." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Session%20Contexts/patch_contexts__contextId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + app, + contextId: { + propDefinition: [ + app, + "contextId", + ], + }, + title: { + propDefinition: [ + app, + "title", + ], + optional: true, + }, + content: { + propDefinition: [ + app, + "content", + ], + }, + isDefault: { + propDefinition: [ + app, + "isDefault", + ], + }, + }, + async run({ $ }) { + const response = await this.app.updateContext({ + $, + contextId: this.contextId, + data: { + title: this.title, + content: this.content, + isDefault: this.isDefault, + }, + }); + const context = response?.data || response; + $.export("$summary", `Updated session context: ${context?.title || this.contextId}`); + return response; + }, +}; diff --git a/components/hedy/actions/update-topic/update-topic.mjs b/components/hedy/actions/update-topic/update-topic.mjs new file mode 100644 index 0000000000000..32669dd677741 --- /dev/null +++ b/components/hedy/actions/update-topic/update-topic.mjs @@ -0,0 +1,74 @@ +import app from "../../hedy.app.mjs"; + +export default { + key: "hedy-update-topic", + name: "Update Topic", + description: "Updates properties of an existing Hedy topic. All fields are optional — only the fields you provide will be changed." + + " To clear the custom AI context, pass an empty string or `null` for `topicContext`." + + " Use **Get Many Topics** to find the topic ID." + + " [See the documentation](https://app.swaggerhub.com/apis-docs/HedyAI/hedy-api/1.5.2#/Topics/patch_topics__topicId_)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + app, + topicId: { + propDefinition: [ + app, + "topicId", + ], + }, + name: { + type: "string", + label: "Name", + description: "New topic name (maximum 100 characters).", + optional: true, + }, + description: { + type: "string", + label: "Description", + description: "New topic description (maximum 500 characters).", + optional: true, + }, + color: { + type: "string", + label: "Color", + description: "New hex color code (e.g. `#FF5722`).", + optional: true, + }, + iconName: { + type: "string", + label: "Icon Name", + description: "New icon identifier.", + optional: true, + }, + topicContext: { + type: "string", + label: "Topic Context", + description: "New custom AI analysis instructions (maximum 20,000 characters). Pass an empty string to clear the existing context.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.app.updateTopic({ + $, + topicId: this.topicId, + data: { + name: this.name, + description: this.description, + color: this.color, + iconName: this.iconName, + topicContext: this.topicContext === "" + ? null + : this.topicContext, + }, + }); + const topic = response?.data || response; + $.export("$summary", `Updated topic: ${topic?.name || this.topicId}`); + return response; + }, +}; diff --git a/components/hedy/hedy.app.mjs b/components/hedy/hedy.app.mjs index a513c60b5de7f..de7e93a5fc027 100644 --- a/components/hedy/hedy.app.mjs +++ b/components/hedy/hedy.app.mjs @@ -1,11 +1,251 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "hedy", - propDefinitions: {}, + propDefinitions: { + sessionId: { + type: "string", + label: "Session ID", + description: "The unique identifier of the meeting session (e.g., `ses_0123abcd`). Use **Get Many Sessions** to list available session IDs.", + }, + topicId: { + type: "string", + label: "Topic ID", + description: "The unique identifier of the topic (e.g., `topic_5f8e9a`). Use **Get Many Topics** to list available topic IDs.", + }, + highlightId: { + type: "string", + label: "Highlight ID", + description: "The unique identifier of the highlight (e.g., `hl_20240501_abc123`). Use **Get Many Highlights** to list available highlight IDs.", + }, + todoId: { + type: "string", + label: "Todo ID", + description: "The unique identifier of the action item (todo) (e.g., `todo_987xyz`). Use **Get Many Action Items** to list available todo IDs.", + }, + contextId: { + type: "string", + label: "Context ID", + description: "The unique identifier of the session context (e.g., `ctx_456def`). Use **Get Many Session Contexts** to list available context IDs.", + }, + limit: { + type: "integer", + label: "Limit", + description: "Maximum number of items to return (1–100). Defaults to 20. Example: `50`.", + min: 1, + max: 100, + optional: true, + default: 20, + }, + after: { + type: "string", + label: "After Cursor", + description: "Pagination cursor from a previous response's `pagination.after` field. Pass this value to retrieve the next page of results (e.g., `eyJpZCI6IjEyMyJ9`).", + optional: true, + }, + title: { + type: "string", + label: "Title", + description: "The context name (maximum 200 characters).", + }, + content: { + type: "string", + label: "Content", + description: "Custom AI instruction text for this context (maximum 20,000 characters). Describe how Hedy should analyze meetings — e.g., focus areas, summary style, or specific data to extract.", + optional: true, + }, + isDefault: { + type: "boolean", + label: "Set as Default", + description: "Set to `true` to make this the default context automatically applied to new sessions.", + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return this.$auth.base_url || "https://api.hedy.bot"; + }, + _headers() { + return { + "Authorization": `Bearer ${this.$auth.api_key}`, + "Content-Type": "application/json", + }; + }, + _makeRequest({ + $ = this, method = "GET", path, params, data, + }) { + return axios($, { + method, + url: `${this._baseUrl()}${path}`, + headers: this._headers(), + params, + data, + }); + }, + listSessions({ + $ = this, params, + }) { + return this._makeRequest({ + $, + path: "/sessions", + params, + }); + }, + getSession({ + $ = this, sessionId, + }) { + return this._makeRequest({ + $, + path: `/sessions/${sessionId}`, + }); + }, + listHighlights({ + $ = this, params, + }) { + return this._makeRequest({ + $, + path: "/highlights", + params, + }); + }, + getHighlightsBySession({ + $ = this, sessionId, params, + }) { + return this._makeRequest({ + $, + path: `/sessions/${sessionId}/highlights`, + params, + }); + }, + getHighlight({ + $ = this, highlightId, + }) { + return this._makeRequest({ + $, + path: `/highlights/${highlightId}`, + }); + }, + listTodos({ + $ = this, params, + }) { + return this._makeRequest({ + $, + path: "/todos", + params, + }); + }, + getTodosBySession({ + $ = this, sessionId, params, + }) { + return this._makeRequest({ + $, + path: `/sessions/${sessionId}/todos`, + params, + }); + }, + getTodo({ + $ = this, sessionId, todoId, + }) { + return this._makeRequest({ + $, + path: `/sessions/${sessionId}/todos/${todoId}`, + }); + }, + listTopics({ $ = this }) { + return this._makeRequest({ + $, + path: "/topics", + }); + }, + getTopic({ + $ = this, topicId, + }) { + return this._makeRequest({ + $, + path: `/topics/${topicId}`, + }); + }, + getTopicSessions({ + $ = this, topicId, params, + }) { + return this._makeRequest({ + $, + path: `/topics/${topicId}/sessions`, + params, + }); + }, + createTopic({ + $ = this, data, + }) { + return this._makeRequest({ + $, + method: "POST", + path: "/topics", + data, + }); + }, + updateTopic({ + $ = this, topicId, data, + }) { + return this._makeRequest({ + $, + method: "PATCH", + path: `/topics/${topicId}`, + data, + }); + }, + deleteTopic({ + $ = this, topicId, + }) { + return this._makeRequest({ + $, + method: "DELETE", + path: `/topics/${topicId}`, + }); + }, + listContexts({ $ = this }) { + return this._makeRequest({ + $, + path: "/contexts", + }); + }, + getContext({ + $ = this, contextId, + }) { + return this._makeRequest({ + $, + path: `/contexts/${contextId}`, + }); + }, + createContext({ + $ = this, data, + }) { + return this._makeRequest({ + $, + method: "POST", + path: "/contexts", + data, + }); + }, + updateContext({ + $ = this, contextId, data, + }) { + return this._makeRequest({ + $, + method: "PATCH", + path: `/contexts/${contextId}`, + data, + }); + }, + deleteContext({ + $ = this, contextId, + }) { + return this._makeRequest({ + $, + method: "DELETE", + path: `/contexts/${contextId}`, + }); }, }, }; diff --git a/components/hedy/package.json b/components/hedy/package.json index 84fa39769148a..fa371fff550e2 100644 --- a/components/hedy/package.json +++ b/components/hedy/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hedy", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Hedy Components", "main": "hedy.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.4.0" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a39f4571e52fd..014675aa352ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7170,7 +7170,11 @@ importers: specifier: ^3.1.1 version: 3.1.1 - components/hedy: {} + components/hedy: + dependencies: + '@pipedream/platform': + specifier: ^3.4.0 + version: 3.4.0 components/heedjy: dependencies: @@ -41763,7 +41767,6 @@ snapshots: transitivePeerDependencies: - rolldown - rollup - - supports-color '@putout/operator-parens@2.0.0(rolldown@1.0.0-beta.60(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1))(rollup@4.53.2)': dependencies: