├── .env.docker ├── .env.example ├── .github └── workflows │ ├── build-docker-image.yml │ ├── release-integration.yml │ ├── release.yml │ └── website.yml ├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── apps ├── electron │ ├── .editorconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .nano-staged.js │ ├── .npmrc │ ├── .prettierignore │ ├── .prettierrc │ ├── .simple-git-hooks.json │ ├── buildResources │ │ ├── .gitkeep │ │ ├── icon-16x16.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ ├── icon.iconset │ │ │ ├── icon_1024.png │ │ │ ├── icon_128.png │ │ │ ├── icon_16.png │ │ │ ├── icon_256.png │ │ │ ├── icon_32.png │ │ │ └── icon_512.png │ │ ├── icon.png │ │ ├── iconTemplate.png │ │ └── production.provisionprofile │ ├── demo.png │ ├── electron-builder.yml │ ├── eslint.config.js │ ├── notarize │ │ ├── entitlements.mac.plist │ │ └── notarize.cjs │ ├── package.json │ ├── packages │ │ ├── main │ │ │ ├── notifications │ │ │ │ └── test.ts │ │ │ ├── src │ │ │ │ ├── api.ts │ │ │ │ ├── auto-update.ts │ │ │ │ ├── deeplink.ts │ │ │ │ ├── index.ts │ │ │ │ ├── integrations-init.ts │ │ │ │ ├── security-restrictions.ts │ │ │ │ ├── store.ts │ │ │ │ └── utils.ts │ │ │ ├── tests │ │ │ │ └── unit.spec.ts │ │ │ ├── tsconfig.json │ │ │ ├── utils.ts │ │ │ ├── vite.config.js │ │ │ └── windows │ │ │ │ ├── index.ts │ │ │ │ ├── listeners.ts │ │ │ │ ├── main.ts │ │ │ │ ├── notification.ts │ │ │ │ └── quick.ts │ │ └── preload │ │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── nodeCrypto.ts │ │ │ └── versions.ts │ │ │ ├── tests │ │ │ └── unit.spec.ts │ │ │ ├── tsconfig.json │ │ │ └── vite.config.js │ ├── scripts │ │ ├── update-electron-vendors.js │ │ └── watch.js │ ├── tests │ │ └── e2e.spec.ts │ ├── types │ │ └── env.d.ts │ └── vitest.config.js ├── server │ ├── .dockerignore │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── Dockerfile │ ├── cors.json │ ├── nest-cli.json │ ├── package.json │ ├── prisma │ │ ├── migrations │ │ │ ├── 20241017173952_init │ │ │ │ └── migration.sql │ │ │ ├── 20241020081742_add_other_tables │ │ │ │ └── migration.sql │ │ │ ├── 20241026124409_add_tags_for_page │ │ │ │ └── migration.sql │ │ │ ├── 20241027131319_add_y_js_storage_field │ │ │ │ └── migration.sql │ │ │ ├── 20241104043804_add_conversations │ │ │ │ └── migration.sql │ │ │ ├── 20241104104943_move_context_to_conv_history │ │ │ │ └── migration.sql │ │ │ ├── 20241105015950_add_user_to_conv_history │ │ │ │ └── migration.sql │ │ │ ├── 20241105070250_add_activity │ │ │ │ └── migration.sql │ │ │ ├── 20241105105256_add_settings_to_integration_account │ │ │ │ └── migration.sql │ │ │ ├── 20241124160354_add_index_job │ │ │ │ └── migration.sql │ │ │ ├── 20241204093410_add_task_model │ │ │ │ └── migration.sql │ │ │ ├── 20241209114943_add_workspace_to_tasks │ │ │ │ └── migration.sql │ │ │ ├── 20241209123718_add_activity_to_sync │ │ │ │ └── migration.sql │ │ │ ├── 20241210175356_add_conversationa_and_history_to_model_enum │ │ │ │ └── migration.sql │ │ │ ├── 20241211064221_add_title_in_conversation │ │ │ │ └── migration.sql │ │ │ ├── 20241212072939_add_due_date_to_task │ │ │ │ └── migration.sql │ │ │ ├── 20250116081327_add_number_column_task │ │ │ │ └── migration.sql │ │ │ ├── 20250116081826_add_trigger_for_task_number │ │ │ │ └── migration.sql │ │ │ ├── 20250116091812_add_completed_time_task │ │ │ │ └── migration.sql │ │ │ ├── 20250118110021_added_schedule_columns │ │ │ │ └── migration.sql │ │ │ ├── 20250119040315_add_recurrence_text │ │ │ │ └── migration.sql │ │ │ ├── 20250121054005_add_task_occurance_model │ │ │ │ └── migration.sql │ │ │ ├── 20250121070259_add_delete_in_task_occurence │ │ │ │ └── migration.sql │ │ │ ├── 20250203055255_add_worksapce_in_occurence │ │ │ │ └── migration.sql │ │ │ ├── 20250204054951_add_ai_requet_prompt_models │ │ │ │ └── migration.sql │ │ │ ├── 20250205052903_add_lists │ │ │ │ └── migration.sql │ │ │ ├── 20250205055459_added_workspace_to_list │ │ │ │ └── migration.sql │ │ │ ├── 20250205055621_add_list_to_sync_table │ │ │ │ └── migration.sql │ │ │ ├── 20250208094609_add_due_date_remind_at_in_task │ │ │ │ └── migration.sql │ │ │ ├── 20250209133908_change_task_colomn_to_more_generic │ │ │ │ └── migration.sql │ │ │ ├── 20250211035320_add_task_page_in_conversation │ │ │ │ └── migration.sql │ │ │ ├── 20250213132253_add_task_external_model │ │ │ │ └── migration.sql │ │ │ ├── 20250217101447_convert_source_to_json │ │ │ │ └── migration.sql │ │ │ ├── 20250218012803_remove_activity │ │ │ │ └── migration.sql │ │ │ ├── 20250218013710_add_summary_suggestion_models │ │ │ │ └── migration.sql │ │ │ ├── 20250220130624_remove_activity │ │ │ │ └── migration.sql │ │ │ ├── 20250223114812_add_outlink_to_page │ │ │ │ └── migration.sql │ │ │ ├── 20250304092327_remove_status │ │ │ │ └── migration.sql │ │ │ ├── 20250305151325_add_page_id_to_task_occurence │ │ │ │ └── migration.sql │ │ │ ├── 20250306074350_add_unique_task_page_id_on_task_occurence │ │ │ │ └── migration.sql │ │ │ ├── 20250306083417_add_task_occurrence_in_model_name │ │ │ │ └── migration.sql │ │ │ ├── 20250307060553_add_agent_worklog │ │ │ │ └── migration.sql │ │ │ ├── 20250307075715_add_workspace_in_agent_worklog │ │ │ │ └── migration.sql │ │ │ ├── 20250311164948_add_list_type_to_page │ │ │ │ └── migration.sql │ │ │ ├── 20250311165121_add_page_to_list │ │ │ │ └── migration.sql │ │ │ ├── 20250314061432_add_icon_to_list │ │ │ │ └── migration.sql │ │ │ ├── 20250325030905_add_task_external_link │ │ │ │ └── migration.sql │ │ │ ├── 20250325051859_update_trigger_task_number │ │ │ │ └── migration.sql │ │ │ ├── 20250325055254_change_function_parameter_text │ │ │ │ └── migration.sql │ │ │ ├── 20250417092430_add_conversation_execution_step │ │ │ │ └── migration.sql │ │ │ ├── 20250418034145_add_relation_to_conv_execstep │ │ │ │ └── migration.sql │ │ │ ├── 20250422054815_add_mcp │ │ │ │ └── migration.sql │ │ │ ├── 20250422105215_add_thought │ │ │ │ └── migration.sql │ │ │ ├── 20250424165839_add_brief_model │ │ │ │ └── migration.sql │ │ │ ├── 20250428061249_st_favourite │ │ │ │ └── migration.sql │ │ │ ├── 20250428164830_add_activity_notifications_table │ │ │ │ └── migration.sql │ │ │ ├── 20250428165557_add_context_page_type │ │ │ │ └── migration.sql │ │ │ ├── 20250429093400_remove_suggestions │ │ │ │ └── migration.sql │ │ │ ├── 20250429093458_misc │ │ │ │ └── migration.sql │ │ │ ├── 20250430090052_add_source_for_activity │ │ │ │ └── migration.sql │ │ │ ├── 20250430110827_add_notification_activity_to_sync │ │ │ │ └── migration.sql │ │ │ ├── 20250430112453_add_activity_to_conversation │ │ │ │ └── migration.sql │ │ │ ├── 20250502060237_add_usage_credits │ │ │ │ └── migration.sql │ │ │ ├── 20250502090837_add_spec_to_id_v2 │ │ │ │ └── migration.sql │ │ │ ├── 20250507074525_add_action_details │ │ │ │ └── migration.sql │ │ │ ├── 20250509103445_convert_date_to_string_sync │ │ │ │ └── migration.sql │ │ │ ├── 20250521114707_status_conversation_remove_notification │ │ │ │ └── migration.sql │ │ │ ├── 20250521175822_drop_thought │ │ │ │ └── migration.sql │ │ │ ├── 20250522082428_remove_task_external_add_automation │ │ │ │ └── migration.sql │ │ │ ├── 20250522095918_add_workspace_automation │ │ │ │ └── migration.sql │ │ │ ├── 20250522101036_add_mcp_remove_task_external │ │ │ │ └── migration.sql │ │ │ ├── 20250522181340_add_reject_reason │ │ │ │ └── migration.sql │ │ │ ├── 20250523190830_add_sync_conversation_relation │ │ │ │ └── migration.sql │ │ │ ├── 20250606073019_remove_per_day_page_concept │ │ │ │ └── migration.sql │ │ │ ├── 20250606080458_add_conversation_to_activity │ │ │ │ └── migration.sql │ │ │ ├── 20250612091054_add_action_status │ │ │ │ └── migration.sql │ │ │ ├── 20250613061409_misc │ │ │ │ └── migration.sql │ │ │ ├── 20250615112736_change_activity │ │ │ │ └── migration.sql │ │ │ ├── 20250616165828_add_command_enum │ │ │ │ └── migration.sql │ │ │ ├── 20250617071558_remove_ai_request │ │ │ │ └── migration.sql │ │ │ ├── 20250617111807_drop_sync_add_invite │ │ │ │ └── migration.sql │ │ │ ├── 20250617154944_add_update_by │ │ │ │ └── migration.sql │ │ │ ├── 20250620055557_add_claude_user_sessions │ │ │ │ └── migration.sql │ │ │ └── migration_lock.toml │ │ └── schema.prisma │ ├── scripts │ │ └── entrypoint.sh │ ├── src │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ ├── common │ │ │ ├── authentication.ts │ │ │ ├── common.interface.ts │ │ │ ├── configs │ │ │ │ ├── config.interface.ts │ │ │ │ └── config.ts │ │ │ ├── middleware │ │ │ │ └── logging.middleware.ts │ │ │ ├── remote-loader │ │ │ │ ├── index.ts │ │ │ │ └── load-remote-module.ts │ │ │ └── utils │ │ │ │ └── login.ts │ │ ├── main.ts │ │ ├── modules │ │ │ ├── activity │ │ │ │ ├── activity.controller.ts │ │ │ │ ├── activity.module.ts │ │ │ │ └── activity.service.ts │ │ │ ├── als │ │ │ │ ├── als.middleware.ts │ │ │ │ ├── als.module.ts │ │ │ │ └── als.service.ts │ │ │ ├── attachments │ │ │ │ ├── attachments.controller.ts │ │ │ │ ├── attachments.interface.ts │ │ │ │ ├── attachments.module.ts │ │ │ │ ├── attachments.service.ts │ │ │ │ ├── gcp-storage.provider.ts │ │ │ │ ├── s3-storage.provider.ts │ │ │ │ ├── storage-provider.interface.ts │ │ │ │ └── storage.factory.ts │ │ │ ├── auth │ │ │ │ ├── auth.filter.ts │ │ │ │ ├── auth.guard.ts │ │ │ │ ├── auth.middleware.ts │ │ │ │ ├── auth.module.ts │ │ │ │ ├── config.interface.ts │ │ │ │ ├── credit.guard.ts │ │ │ │ ├── session.decorator.ts │ │ │ │ └── supertokens │ │ │ │ │ ├── supertokens.config.ts │ │ │ │ │ └── supertokens.service.ts │ │ │ ├── automation │ │ │ │ ├── automation.controller.ts │ │ │ │ ├── automation.module.ts │ │ │ │ └── automation.service.ts │ │ │ ├── content │ │ │ │ ├── content.module.ts │ │ │ │ └── content.service.ts │ │ │ ├── conversation-history │ │ │ │ ├── conversation-history.controller.ts │ │ │ │ ├── conversation-history.module.ts │ │ │ │ └── conversation-history.service.ts │ │ │ ├── conversation │ │ │ │ ├── conversation.controller.ts │ │ │ │ ├── conversation.module.ts │ │ │ │ └── conversation.service.ts │ │ │ ├── integration-account │ │ │ │ ├── integration-account.controller.ts │ │ │ │ ├── integration-account.interface.ts │ │ │ │ ├── integration-account.module.ts │ │ │ │ └── integration-account.service.ts │ │ │ ├── integration-definition │ │ │ │ ├── integration-definition.controller.ts │ │ │ │ ├── integration-definition.interface.ts │ │ │ │ ├── integration-definition.module.ts │ │ │ │ └── integration-definition.service.ts │ │ │ ├── integrations │ │ │ │ ├── integrations.module.ts │ │ │ │ └── integrations.service.ts │ │ │ ├── lists │ │ │ │ ├── lists.controller.ts │ │ │ │ ├── lists.module.ts │ │ │ │ └── lists.service.ts │ │ │ ├── logger │ │ │ │ ├── logger.interface.ts │ │ │ │ └── logger.service.ts │ │ │ ├── oauth-callback │ │ │ │ ├── oauth-callback.controller.ts │ │ │ │ ├── oauth-callback.interface.ts │ │ │ │ ├── oauth-callback.module.ts │ │ │ │ ├── oauth-callback.service.ts │ │ │ │ └── oauth-callback.utils.ts │ │ │ ├── pages │ │ │ │ ├── pages.controller.ts │ │ │ │ ├── pages.module.ts │ │ │ │ ├── pages.service.ts │ │ │ │ └── pages.utils.ts │ │ │ ├── replication │ │ │ │ ├── replication.interface.ts │ │ │ │ ├── replication.module.ts │ │ │ │ └── replication.service.ts │ │ │ ├── sync-actions │ │ │ │ ├── sync-actions.controller.ts │ │ │ │ ├── sync-actions.interface.ts │ │ │ │ ├── sync-actions.module.ts │ │ │ │ ├── sync-actions.service.ts │ │ │ │ └── sync-actions.utils.ts │ │ │ ├── sync │ │ │ │ ├── sync.constants.ts │ │ │ │ ├── sync.gateway.ts │ │ │ │ ├── sync.interface.ts │ │ │ │ ├── sync.module.ts │ │ │ │ └── sync.utils.ts │ │ │ ├── task-occurrence │ │ │ │ ├── task-occurrence.controller.ts │ │ │ │ ├── task-occurrence.model.ts │ │ │ │ └── task-occurrence.service.ts │ │ │ ├── tasks-hook │ │ │ │ ├── tasks-hook.service.ts │ │ │ │ └── tasks-hooks.module.ts │ │ │ ├── tasks │ │ │ │ ├── tasks-ai.controller.ts │ │ │ │ ├── tasks-ai.service.ts │ │ │ │ ├── tasks-vector.service.ts │ │ │ │ ├── tasks.controller.ts │ │ │ │ ├── tasks.module.ts │ │ │ │ ├── tasks.service.ts │ │ │ │ └── tasks.utils.ts │ │ │ ├── triggerdev │ │ │ │ ├── trigger.utils.ts │ │ │ │ ├── triggerdev.module.ts │ │ │ │ └── triggerdev.service.ts │ │ │ ├── users │ │ │ │ ├── users.controller.ts │ │ │ │ ├── users.interface.ts │ │ │ │ ├── users.module.ts │ │ │ │ ├── users.service.ts │ │ │ │ └── users.utils.ts │ │ │ ├── vector │ │ │ │ ├── vector.module.ts │ │ │ │ └── vector.service.ts │ │ │ ├── webhook │ │ │ │ ├── webhook.controller.ts │ │ │ │ ├── webhook.module.ts │ │ │ │ └── webhook.service.ts │ │ │ └── workspaces │ │ │ │ ├── constants.ts │ │ │ │ ├── workspaces.controller.ts │ │ │ │ ├── workspaces.interface.ts │ │ │ │ ├── workspaces.module.ts │ │ │ │ └── workspaces.service.ts │ │ └── triggers │ │ │ ├── .gitkeep │ │ │ ├── agents │ │ │ ├── activity │ │ │ │ ├── activity-run.ts │ │ │ │ └── utils.ts │ │ │ ├── chat │ │ │ │ ├── chat-utils.ts │ │ │ │ ├── chat.ts │ │ │ │ ├── code-tools.ts │ │ │ │ ├── memory-utils.ts │ │ │ │ ├── prompt.ts │ │ │ │ ├── stream-utils.ts │ │ │ │ └── types.ts │ │ │ ├── daily-run │ │ │ │ ├── index.ts │ │ │ │ └── task-occurrence.ts │ │ │ ├── sol-tools │ │ │ │ ├── errors.ts │ │ │ │ ├── operations │ │ │ │ │ ├── list.ts │ │ │ │ │ ├── memory.ts │ │ │ │ │ ├── page.ts │ │ │ │ │ ├── reminder.ts │ │ │ │ │ ├── task.ts │ │ │ │ │ └── websearch.ts │ │ │ │ ├── sol-tools.ts │ │ │ │ └── types │ │ │ │ │ ├── list.ts │ │ │ │ │ ├── memory.ts │ │ │ │ │ ├── page.ts │ │ │ │ │ ├── reminder.ts │ │ │ │ │ ├── task.ts │ │ │ │ │ └── websearch.ts │ │ │ └── utils │ │ │ │ ├── mcp.ts │ │ │ │ ├── stdio.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ ├── coding │ │ │ ├── claude-code.ts │ │ │ └── query.ts │ │ │ ├── conversation │ │ │ └── create-conversation-title.ts │ │ │ ├── integrations │ │ │ ├── integration-run-schedule.ts │ │ │ ├── integration-run.ts │ │ │ └── scheduler.ts │ │ │ ├── list │ │ │ └── list-activity-handler.ts │ │ │ ├── page │ │ │ ├── index.ts │ │ │ ├── page-activity-handler.ts │ │ │ ├── task-occurrence.ts │ │ │ └── workspace-page.ts │ │ │ ├── task │ │ │ ├── beautify-task.ts │ │ │ ├── task-activity-handler.ts │ │ │ └── task-run-schedule.ts │ │ │ └── utils.ts │ ├── templates │ │ └── loginUser.hbs │ ├── trigger.config.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── webapp │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── .prod.env │ ├── Dockerfile │ ├── README.md │ ├── common │ │ ├── RemoteComponent.tsx │ │ ├── adjustable-textarea.tsx │ │ ├── common-utils.ts │ │ ├── content-box.tsx │ │ ├── editor │ │ │ ├── ReactNodeView.tsx │ │ │ ├── add-task-selector │ │ │ │ ├── add-task-selector.tsx │ │ │ │ ├── index.ts │ │ │ │ └── task-selector.tsx │ │ │ ├── drag-handler │ │ │ │ ├── drag-handler.ts │ │ │ │ ├── index.ts │ │ │ │ └── utils.ts │ │ │ ├── editor-context.tsx │ │ │ ├── editor-extensions.ts │ │ │ ├── editor.tsx │ │ │ ├── file-extension │ │ │ │ ├── file-component.tsx │ │ │ │ ├── file-extension.tsx │ │ │ │ └── index.ts │ │ │ ├── generative │ │ │ │ ├── ai-completion-command.tsx │ │ │ │ ├── ai-selector-commands.tsx │ │ │ │ ├── ai-selector.tsx │ │ │ │ ├── generative-menu-switch.tsx │ │ │ │ └── index.ts │ │ │ ├── image-extension │ │ │ │ ├── image-component.tsx │ │ │ │ ├── image-extension.tsx │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── link-task │ │ │ │ ├── index.ts │ │ │ │ ├── link-task-utils.tsx │ │ │ │ └── link-task.ts │ │ │ ├── list-item │ │ │ │ └── index.ts │ │ │ ├── markdown.tsx │ │ │ ├── selectors │ │ │ │ ├── color-selector.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── link-selector.tsx │ │ │ │ ├── node-selector.tsx │ │ │ │ └── text-buttons.tsx │ │ │ ├── slash-command.tsx │ │ │ ├── socket-utils.tsx │ │ │ ├── task-extension │ │ │ │ ├── index.ts │ │ │ │ ├── task-component.tsx │ │ │ │ ├── task-extension.tsx │ │ │ │ └── task-metadata.tsx │ │ │ ├── trailing-node │ │ │ │ └── index.ts │ │ │ ├── utils.ts │ │ │ └── utils │ │ │ │ ├── atoms.ts │ │ │ │ ├── command-item.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── render-items.tsx │ │ │ │ └── store.ts │ │ ├── icon-picker │ │ │ ├── emoji-data.ts │ │ │ ├── icon-picker.tsx │ │ │ ├── index.ts │ │ │ └── utils.tsx │ │ ├── icon-utils.ts │ │ ├── init-config.ts │ │ ├── lib │ │ │ ├── common.ts │ │ │ ├── config.ts │ │ │ ├── index.ts │ │ │ └── react-query-client.tsx │ │ ├── logo │ │ │ ├── dynamic-logo.tsx │ │ │ ├── index.ts │ │ │ └── logo.tsx │ │ ├── progress.tsx │ │ ├── shortcut-scopes.ts │ │ ├── shortcut.tsx │ │ ├── theme-provider.tsx │ │ ├── tooltip │ │ │ ├── index.ts │ │ │ └── tooltip-wrapper.tsx │ │ ├── types │ │ │ ├── activity.ts │ │ │ ├── agent-worklog.ts │ │ │ ├── automation.ts │ │ │ ├── conversation.ts │ │ │ ├── data-loader.ts │ │ │ ├── index.ts │ │ │ ├── integration-account.ts │ │ │ ├── integration-definition.ts │ │ │ ├── list.ts │ │ │ ├── page.ts │ │ │ ├── status.ts │ │ │ ├── task-occurrence.ts │ │ │ ├── task.ts │ │ │ ├── user.ts │ │ │ └── workspace.ts │ │ ├── use-auto-scroll.tsx │ │ ├── use-local-state.tsx │ │ ├── user-avatar.tsx │ │ ├── virtualized-list │ │ │ ├── index.ts │ │ │ └── scroll-managed-list.tsx │ │ └── wrappers │ │ │ ├── all-providers.tsx │ │ │ ├── auth-guard.tsx │ │ │ ├── bootstrap-data.tsx │ │ │ ├── database-wrapper.tsx │ │ │ ├── index.ts │ │ │ ├── socket-data-sync.tsx │ │ │ ├── socket-data-util.ts │ │ │ ├── user-data-wrapper.tsx │ │ │ └── workspace-store-provider.tsx │ ├── electron.d.ts │ ├── entrypoint.sh │ ├── hooks │ │ ├── application │ │ │ ├── index.ts │ │ │ ├── use-application.ts │ │ │ └── use-tab.ts │ │ ├── conversations │ │ │ ├── index.ts │ │ │ └── use-conversation-history.tsx │ │ ├── integration │ │ │ ├── index.ts │ │ │ └── use-integration-from-account.tsx │ │ ├── ipc │ │ │ ├── index.ts │ │ │ └── use-ipc.tsx │ │ ├── list │ │ │ ├── index.ts │ │ │ └── use-lists.tsx │ │ ├── pages │ │ │ ├── index.ts │ │ │ └── use-page.tsx │ │ ├── use-is-electron.tsx │ │ ├── use-scope.tsx │ │ └── workspace │ │ │ ├── index.ts │ │ │ └── use-workspace.tsx │ ├── icons │ │ ├── claude.tsx │ │ ├── gmail.tsx │ │ ├── hevy.tsx │ │ ├── index.ts │ │ └── types.tsx │ ├── layouts │ │ ├── app-layout │ │ │ ├── app-layout.tsx │ │ │ ├── app-tabs.tsx │ │ │ ├── index.ts │ │ │ ├── navigation.tsx │ │ │ ├── notifications.tsx │ │ │ ├── utils.ts │ │ │ └── workspace-dropdown.tsx │ │ └── right-side-layout │ │ │ ├── index.ts │ │ │ ├── right-side-header.tsx │ │ │ └── right-side-layout.tsx │ ├── modules │ │ ├── ai-thinking.tsx │ │ ├── auth │ │ │ ├── auth-email.tsx │ │ │ ├── auth.tsx │ │ │ ├── authorize.tsx │ │ │ ├── google.tsx │ │ │ ├── index.ts │ │ │ ├── layout.tsx │ │ │ ├── utils.ts │ │ │ └── verify.tsx │ │ ├── conversation │ │ │ ├── conversation-context.tsx │ │ │ ├── conversation-item.tsx │ │ │ ├── conversation-textarea.tsx │ │ │ ├── conversation-utils.ts │ │ │ ├── conversation.tsx │ │ │ ├── header-actions.tsx │ │ │ ├── history-dropdown.tsx │ │ │ ├── index.ts │ │ │ ├── resource │ │ │ │ ├── index.ts │ │ │ │ └── resource.tsx │ │ │ ├── skill-extension │ │ │ │ ├── index.ts │ │ │ │ ├── skill-component.tsx │ │ │ │ └── skill-extension.ts │ │ │ ├── streaming-conversation.tsx │ │ │ ├── suggestion-extension │ │ │ │ ├── index.tsx │ │ │ │ ├── mention-list.tsx │ │ │ │ ├── use-context-suggestions.tsx │ │ │ │ └── use-context.tsx │ │ │ ├── use-conversation-context.tsx │ │ │ ├── use-conversation-read.tsx │ │ │ └── use-trigger-stream.tsx │ │ ├── dialog-views-provider │ │ │ ├── dialog-views-provider.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── editor │ │ │ ├── claude │ │ │ │ └── index.tsx │ │ │ ├── memory │ │ │ │ └── index.tsx │ │ │ └── types.ts │ │ ├── home │ │ │ ├── home.tsx │ │ │ ├── index.ts │ │ │ └── window-listener.tsx │ │ ├── inbox │ │ │ ├── assistant-editor.tsx │ │ │ ├── assistant.tsx │ │ │ ├── inbox-conversation.tsx │ │ │ ├── index.ts │ │ │ ├── new-conversation.tsx │ │ │ ├── today-view.tsx │ │ │ └── utils.ts │ │ ├── instructions │ │ │ ├── index.ts │ │ │ └── instructions.tsx │ │ ├── integrations │ │ │ ├── index.ts │ │ │ └── integrations.tsx │ │ ├── lists │ │ │ ├── delete-list-alert.tsx │ │ │ ├── index.ts │ │ │ ├── list-page-editor.tsx │ │ │ ├── list-page-header.tsx │ │ │ ├── list-page.tsx │ │ │ ├── list-progress.tsx │ │ │ ├── list-view.tsx │ │ │ ├── lists.tsx │ │ │ └── onboarding-highlight.tsx │ │ ├── onboarding │ │ │ ├── index.ts │ │ │ ├── onboarding-form.tsx │ │ │ └── onboarding.tsx │ │ ├── provider.tsx │ │ ├── quick │ │ │ ├── index.ts │ │ │ ├── quick-editor.tsx │ │ │ └── quick.tsx │ │ ├── redirect-home.tsx │ │ ├── search │ │ │ ├── command │ │ │ │ ├── command.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── use-search-commands.tsx │ │ │ │ └── use-task-operations.tsx │ │ │ ├── index.ts │ │ │ └── search.tsx │ │ ├── settings │ │ │ ├── automations │ │ │ │ ├── automations.tsx │ │ │ │ ├── editor-automation.tsx │ │ │ │ └── index.ts │ │ │ ├── history │ │ │ │ ├── activity-item.tsx │ │ │ │ ├── activity-list.tsx │ │ │ │ ├── history.tsx │ │ │ │ ├── index.ts │ │ │ │ └── use-activities.tsx │ │ │ ├── index.ts │ │ │ ├── integrations │ │ │ │ ├── index.ts │ │ │ │ ├── integration-auth-api.tsx │ │ │ │ ├── integration-auth.tsx │ │ │ │ ├── integration-util.tsx │ │ │ │ ├── integration.tsx │ │ │ │ └── integrations.tsx │ │ │ ├── json-editor │ │ │ │ ├── editor-setup.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── json-editor.tsx │ │ │ │ └── theme.tsx │ │ │ ├── mcp.tsx │ │ │ ├── memory │ │ │ │ ├── index.ts │ │ │ │ └── memory.tsx │ │ │ ├── preferences.tsx │ │ │ ├── setting-section.tsx │ │ │ ├── settings-provider.tsx │ │ │ ├── settings.tsx │ │ │ └── workspace.tsx │ │ ├── tasks │ │ │ ├── action-bar │ │ │ │ ├── action-bar.tsx │ │ │ │ ├── delete-task-alert.tsx │ │ │ │ └── index.ts │ │ │ ├── filters │ │ │ │ ├── applied-filters-view.tsx │ │ │ │ ├── completed-filter.tsx │ │ │ │ ├── default-filter-dropdown.tsx │ │ │ │ ├── filter-item-view.tsx │ │ │ │ ├── filter-options-dropdown.tsx │ │ │ │ ├── filter-utils.ts │ │ │ │ ├── filters.tsx │ │ │ │ ├── grouping-ordering-options.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── view-option-item.tsx │ │ │ │ └── view-options.tsx │ │ │ ├── group-view │ │ │ │ ├── schedule │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── schedule-list.tsx │ │ │ │ │ └── utils.ts │ │ │ │ └── status │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── status-list.tsx │ │ │ │ │ └── utils.ts │ │ │ ├── header.tsx │ │ │ ├── index.ts │ │ │ ├── metadata │ │ │ │ ├── assignee.tsx │ │ │ │ ├── dropdown-item.tsx │ │ │ │ ├── due-date │ │ │ │ │ ├── due-date-dialog.tsx │ │ │ │ │ ├── due-date-dropdown.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── list │ │ │ │ │ ├── filters │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── list-dropdown.tsx │ │ │ │ │ │ └── list-filter.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── list-dropdown-content.tsx │ │ │ │ │ └── list-dropdown.tsx │ │ │ │ ├── schedule │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── schedule-dialog.tsx │ │ │ │ │ └── schedule-dropdown.tsx │ │ │ │ ├── status │ │ │ │ │ ├── filters │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── status-dropdown.tsx │ │ │ │ │ │ └── status-filter.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── status-dropdown-content.tsx │ │ │ │ │ ├── status-dropdown.tsx │ │ │ │ │ └── status-utils.tsx │ │ │ │ └── sub-tasks │ │ │ │ │ ├── index.ts │ │ │ │ │ └── sub-tasks.tsx │ │ │ ├── single-task │ │ │ │ ├── due-date │ │ │ │ │ ├── due-date.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── single-task-editor.tsx │ │ │ │ ├── single-task-metadata.tsx │ │ │ │ ├── single-task-status.tsx │ │ │ │ ├── single-task-title.tsx │ │ │ │ └── single-task.tsx │ │ │ ├── task-external-info.tsx │ │ │ ├── task-info.tsx │ │ │ ├── task-item.tsx │ │ │ ├── tasks.tsx │ │ │ └── utils.ts │ │ └── updates │ │ │ └── updates.tsx │ ├── next.config.js │ ├── next.config.webapp.js │ ├── next.d.ts │ ├── package.json │ ├── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── api │ │ │ └── [...path].js │ │ ├── auth │ │ │ ├── auth-old │ │ │ │ └── index.tsx │ │ │ ├── google │ │ │ │ └── index.tsx │ │ │ ├── index.tsx │ │ │ └── verify │ │ │ │ └── index.tsx │ │ ├── authorize │ │ │ └── index.tsx │ │ ├── home │ │ │ └── index.tsx │ │ ├── index.tsx │ │ ├── integrations │ │ │ └── index.tsx │ │ ├── onboarding │ │ │ └── index.tsx │ │ ├── quick │ │ │ └── index.tsx │ │ └── settings │ │ │ └── index.tsx │ ├── postcss.config.js │ ├── public │ │ ├── favicon.ico │ │ ├── logo.png │ │ ├── logo_black.svg │ │ ├── logo_light.svg │ │ ├── logo_text.svg │ │ └── logo_white_text.svg │ ├── remote-component.config.js │ ├── sentry.client.config.ts │ ├── sentry.edge.config.ts │ ├── sentry.server.config.ts │ ├── services │ │ ├── automation │ │ │ ├── create-automation.tsx │ │ │ ├── delete-automation.tsx │ │ │ ├── index.ts │ │ │ └── update-automation.tsx │ │ ├── conversations │ │ │ ├── approve-or-decline.tsx │ │ │ ├── create-conversation.tsx │ │ │ ├── get-conversation-history-action.tsx │ │ │ ├── get-current-conversation.tsx │ │ │ ├── index.ts │ │ │ ├── read-conversation.tsx │ │ │ └── stop-conversation.tsx │ │ ├── integration-account │ │ │ ├── create-integration-account.ts │ │ │ └── index.ts │ │ ├── integration-definition │ │ │ ├── get-integration-definition.tsx │ │ │ ├── get-integration-definitions.tsx │ │ │ └── index.ts │ │ ├── lists │ │ │ ├── create-list.tsx │ │ │ ├── delete-list.tsx │ │ │ ├── index.ts │ │ │ └── update-list.tsx │ │ ├── oauth │ │ │ ├── create-redirect-url.ts │ │ │ ├── delete-oauth-account.ts │ │ │ └── index.ts │ │ ├── pages │ │ │ ├── create-page.ts │ │ │ ├── index.ts │ │ │ └── update-page.ts │ │ ├── sync │ │ │ ├── bootstrap-sync.ts │ │ │ ├── delta-sync.ts │ │ │ └── index.ts │ │ ├── task-occurrence │ │ │ ├── create-task-occurrence.tsx │ │ │ ├── delete-all-task-occurrences.tsx │ │ │ ├── delete-task-occurrence.tsx │ │ │ ├── index.ts │ │ │ ├── update-single-task-occurrence.tsx │ │ │ └── update-task-occurrences.tsx │ │ ├── tasks │ │ │ ├── add-task-duedate.ts │ │ │ ├── add-task.ts │ │ │ ├── delete-task.ts │ │ │ ├── get-task-schedule.ts │ │ │ ├── index.ts │ │ │ └── update-task.ts │ │ ├── users │ │ │ ├── authorize.ts │ │ │ ├── create-auth-code.ts │ │ │ ├── create-pat.ts │ │ │ ├── delete-pat.ts │ │ │ ├── get-pats.ts │ │ │ ├── get-user.ts │ │ │ ├── index.ts │ │ │ └── update-user.tsx │ │ ├── utils │ │ │ ├── common.ts │ │ │ ├── error.ts │ │ │ └── index.ts │ │ └── workspace │ │ │ ├── create-initial-resources.tsx │ │ │ ├── index.ts │ │ │ └── update-workspace.tsx │ ├── store │ │ ├── activity │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── agent-worklog │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── application │ │ │ ├── index.ts │ │ │ ├── store.ts │ │ │ └── types.ts │ │ ├── automation │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── common │ │ │ ├── index.ts │ │ │ └── store.ts │ │ ├── conversation-history │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── conversations │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── database.ts │ │ ├── global-context-provider.tsx │ │ ├── history │ │ │ ├── index.ts │ │ │ └── store.ts │ │ ├── integration-accounts │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── lists │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── models.ts │ │ ├── pages │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── tab-context.tsx │ │ ├── task-occurrences │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── tasks │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ │ ├── user-context.tsx │ │ └── workspace │ │ │ ├── index.ts │ │ │ ├── models.ts │ │ │ ├── save-data.ts │ │ │ └── store.ts │ ├── styles │ │ ├── code.css │ │ ├── globals.css │ │ └── rc.css │ ├── tailwind.config.ts │ └── tsconfig.json └── website │ ├── .dockerignore │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── common │ └── theme-provider.tsx │ ├── next.config.js │ ├── next.d.ts │ ├── package.json │ ├── postcss.config.js │ ├── public │ ├── busy.png │ ├── command.png │ ├── favicon.ico │ ├── footer.png │ ├── footer.svg │ ├── globe.png │ ├── logo.png │ ├── logo_black.svg │ ├── logo_light.svg │ ├── logo_text.svg │ ├── logo_white_text.svg │ ├── mars_rover.svg │ ├── memory.png │ ├── peer.png │ ├── sol.png │ └── sol_logo.png │ ├── src │ ├── components │ │ ├── footer.tsx │ │ ├── header.tsx │ │ ├── hero.tsx │ │ ├── index.tsx │ │ └── utils.tsx │ ├── features │ │ ├── busy_work.tsx │ │ ├── command_centre.tsx │ │ ├── memory.tsx │ │ └── peer.tsx │ ├── icons │ │ ├── gmail.tsx │ │ └── index.ts │ └── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── global.css │ │ └── index.tsx │ ├── tailwind.config.ts │ ├── tsconfig.json │ ├── video.d.ts │ └── videos │ └── get-started.mp4.json ├── docker-compose.dev.yaml ├── docker-compose.yaml ├── docs ├── automations │ └── rules.mdx ├── concepts │ ├── home.mdx │ ├── lists.mdx │ └── tasks.mdx ├── core │ ├── local-setup.mdx │ └── overview.mdx ├── favicon.svg ├── getting-started.mdx ├── images │ ├── account-setup.png │ ├── actions.png │ ├── checks-passed.png │ ├── copy-magic-link.png │ ├── default-workspace.png │ ├── docker-running.png │ ├── enter-email.png │ ├── kanban_view.png │ ├── list_view.png │ ├── sent-magic-link.png │ ├── terminal-view.png │ └── views.png ├── integrations │ └── overview.mdx ├── introduction.mdx ├── logo │ ├── dark.svg │ ├── light.svg │ └── logo.png ├── mcp │ ├── overview.mdx │ ├── setup.mdx │ └── usage.mdx └── mint.json ├── integrations ├── github │ ├── .gitignore │ ├── .prettierrc │ ├── backend │ │ ├── account-create.ts │ │ ├── index.ts │ │ ├── schedule.ts │ │ └── utils.ts │ ├── eslint.config.js │ ├── package.json │ ├── pnpm-lock.yaml │ ├── rollup.config.mjs │ ├── spec.json │ └── tsconfig.json ├── gmail │ ├── .gitignore │ ├── .prettierrc │ ├── backend │ │ ├── account-create.ts │ │ ├── index.ts │ │ ├── schedule.ts │ │ └── utils.ts │ ├── eslint.config.js │ ├── package.json │ ├── pnpm-lock.yaml │ ├── rollup.config.mjs │ ├── spec.json │ ├── tsconfig.json │ └── tsup.config.ts ├── hevy │ ├── .gitignore │ ├── .prettierrc │ ├── backend │ │ ├── account-create.ts │ │ └── index.ts │ ├── eslint.config.js │ ├── package.json │ ├── pnpm-lock.yaml │ ├── rollup.config.mjs │ ├── spec.json │ ├── tsconfig.json │ └── tsup.config.ts ├── linear │ ├── .prettierrc │ ├── backend │ │ ├── index.ts │ │ └── schedule.ts │ ├── eslint.config.js │ ├── frontend │ │ └── index.tsx │ ├── package.json │ ├── pnpm-lock.yaml │ ├── rollup.config.mjs │ ├── spec.json │ ├── tsconfig.frontend.json │ └── tsconfig.json └── slack │ ├── .gitignore │ ├── .prettierrc │ ├── backend │ ├── account-create.ts │ ├── create-activity.ts │ ├── index.ts │ └── utils.ts │ ├── eslint.config.js │ ├── package.json │ ├── pnpm-lock.yaml │ ├── rollup.config.mjs │ ├── spec.json │ ├── tsconfig.json │ └── tsup.config.ts ├── oauth-implementation-summary.md ├── package.json ├── packages ├── editor-extensions │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── package.json │ ├── src │ │ ├── context-mention.ts │ │ ├── date-page-extension.ts │ │ ├── editor-extensions.ts │ │ ├── file-extension.ts │ │ ├── image-extension.ts │ │ ├── index.ts │ │ ├── skill-extension.ts │ │ ├── task-item.ts │ │ ├── tasks-extension.ts │ │ └── tiptap.utils.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── sdk │ ├── .eslintrc.js │ ├── .prettierrc.json │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── services │ ├── .eslintrc.js │ ├── .prettierrc.json │ ├── package.json │ ├── src │ │ ├── activity │ │ │ ├── create-activity.ts │ │ │ └── index.ts │ │ ├── automation │ │ │ ├── create-automation.ts │ │ │ ├── delete-automation.ts │ │ │ ├── index.ts │ │ │ └── update-automation.ts │ │ ├── conversation │ │ │ ├── create-conversation.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── integration-account │ │ │ ├── create-integration-account-without-oauth.ts │ │ │ ├── create-integration-account.ts │ │ │ ├── get-integration-account-token.ts │ │ │ ├── index.ts │ │ │ └── update-integration-account.ts │ │ ├── integration-definition │ │ │ ├── get-integration-definition.ts │ │ │ ├── get-integration-definitions.ts │ │ │ └── index.ts │ │ ├── lists │ │ │ ├── create-list.ts │ │ │ ├── delete-list.ts │ │ │ ├── index.ts │ │ │ └── update-list.ts │ │ ├── oauth │ │ │ ├── create-redirect-url.ts │ │ │ ├── delete-oauth.ts │ │ │ └── index.ts │ │ ├── page │ │ │ ├── create-page.ts │ │ │ ├── get-create-page.ts │ │ │ ├── index.ts │ │ │ └── update-page.ts │ │ ├── task-occurrence │ │ │ ├── create-task-occurrence.ts │ │ │ ├── delete-all-task-occurrences.ts │ │ │ ├── delete-task-occurrence.ts │ │ │ ├── get-task-occurrence.ts │ │ │ ├── index.ts │ │ │ ├── update-single-task-occurrence.ts │ │ │ └── update-task-occurrence.ts │ │ ├── task │ │ │ ├── get-ai-tasks.ts │ │ │ └── index.ts │ │ ├── tasks │ │ │ ├── add-task-duedate.ts │ │ │ ├── create-task.ts │ │ │ ├── delete-task.ts │ │ │ ├── get-task.ts │ │ │ ├── index.ts │ │ │ ├── schedule-task.ts │ │ │ └── update-task.ts │ │ ├── transformer.ts │ │ └── user │ │ │ ├── authorize-code.ts │ │ │ ├── create-auth-code.ts │ │ │ ├── create-pat.ts │ │ │ ├── delete-pat.ts │ │ │ ├── get-pats.ts │ │ │ ├── get-user.ts │ │ │ ├── get-users.ts │ │ │ └── index.ts │ ├── tsconfig.json │ └── tsup.config.ts └── types │ ├── .eslintrc.js │ ├── .prettierrc.json │ ├── package.json │ ├── src │ ├── activity │ │ ├── activity.dto.ts │ │ ├── create-activity.dto.ts │ │ └── index.ts │ ├── agent-worklog │ │ ├── agent-worklog.entity.ts │ │ └── index.ts │ ├── ai-request │ │ ├── ai-request.dto.ts │ │ ├── ai-request.entity.ts │ │ ├── get-ai-request.dto.ts │ │ └── index.ts │ ├── attachment │ │ ├── attachment.entity.ts │ │ ├── attachment.interface.ts │ │ └── index.ts │ ├── common │ │ ├── common.ts │ │ ├── index.ts │ │ ├── integration.ts │ │ └── utility.ts │ ├── conversation-execution-step │ │ ├── conversation-execution.entity.ts │ │ └── index.ts │ ├── conversation-history │ │ ├── conversation-history.dto.ts │ │ ├── conversation-history.entity.ts │ │ ├── get-conversation-history-action.dto.ts │ │ ├── index.ts │ │ └── update-conversation-history.dto.ts │ ├── conversation │ │ ├── conversation.dto.ts │ │ ├── conversation.entity.ts │ │ ├── create-conversation.dto.ts │ │ ├── index.ts │ │ └── update-conversation.dto.ts │ ├── index-job │ │ ├── index-job.entity.ts │ │ └── index.ts │ ├── index.ts │ ├── integration-account │ │ ├── create-integration-account.dto.ts │ │ ├── get-integration-account.dto.ts │ │ ├── index.ts │ │ ├── integration-account.dto.ts │ │ ├── integration-account.entity.ts │ │ └── update-integration-account.dto.ts │ ├── integration-definition │ │ ├── index.ts │ │ ├── integration-definition.dto.ts │ │ ├── integration-definition.entity.ts │ │ └── spec.ts │ ├── list │ │ ├── index.ts │ │ ├── list.dto.ts │ │ ├── list.entity.ts │ │ └── update-list.dto.ts │ ├── page │ │ ├── create-page.dto.ts │ │ ├── get-page.dto.ts │ │ ├── index.ts │ │ ├── page.dto.ts │ │ ├── page.entity.ts │ │ └── update-page.dto.ts │ ├── prompt │ │ ├── create-prompt.dto.ts │ │ ├── index.ts │ │ ├── prompt.entity.ts │ │ └── prompt.interface.ts │ ├── status │ │ ├── index.ts │ │ └── status.entity.ts │ ├── summary │ │ ├── create-summary.dto.ts │ │ ├── index.ts │ │ └── summary.entity.ts │ ├── sync-action │ │ ├── index.ts │ │ └── sync-action.entity.ts │ ├── task-occurrence │ │ ├── create-task-occurrence.dto.ts │ │ ├── get-task-occurrence.dto.ts │ │ ├── index.ts │ │ ├── task-occurrence.dto.ts │ │ ├── task-occurrence.entity.ts │ │ └── update-task-occurrence.dto.ts │ ├── task │ │ ├── create-task.dto.ts │ │ ├── get-task.dto.ts │ │ ├── index.ts │ │ ├── search-task.dto.ts │ │ ├── task.entity.ts │ │ └── update-task.dto.ts │ ├── template │ │ ├── index.ts │ │ └── template.entity.ts │ ├── user │ │ ├── code.dto.ts │ │ ├── create-pat.dto.ts │ │ ├── get-users.dto.ts │ │ ├── index.ts │ │ ├── pat.dto.ts │ │ ├── pat.entity.ts │ │ └── user.entity.ts │ ├── webhook │ │ ├── index.ts │ │ └── webhook.entity.ts │ └── workspace │ │ ├── index.ts │ │ ├── workspace.dto.ts │ │ └── workspace.entity.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── postcss.config.js ├── tailwind.config.js ├── tooling ├── eslint-config │ ├── README │ ├── internal.js │ ├── next.js │ ├── package.json │ └── server.js └── typescript-config │ ├── .tsbuildinfo │ ├── base.json │ ├── nest.json │ ├── next.json │ ├── node.json │ └── package.json └── turbo.json /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | dist/ 8 | 9 | # testing 10 | coverage 11 | 12 | # next.js 13 | .next/ 14 | out/ 15 | build 16 | 17 | # misc 18 | .DS_Store 19 | *.pem 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | .pnpm-debug.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # turbo 34 | .turbo 35 | .env 36 | 37 | certificate.* 38 | .vscode 39 | 40 | 41 | 42 | # Agent things 43 | context.json 44 | .claude -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | public-hoist-pattern=* -------------------------------------------------------------------------------- /apps/electron/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # https://github.com/jokeyrhyme/standard-editorconfig 4 | 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | # defaults 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_size = 2 15 | indent_style = space 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /apps/electron/.gitattributes: -------------------------------------------------------------------------------- 1 | .github/actions/**/*.js linguist-detectable=false 2 | scripts/*.js linguist-detectable=false 3 | *.config.js linguist-detectable=false 4 | * text=auto eol=lf 5 | -------------------------------------------------------------------------------- /apps/electron/.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | -------------------------------------------------------------------------------- /apps/electron/.prettierignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/dist 3 | **/*.svg 4 | 5 | package.json 6 | package-lock.json 7 | .electron-vendors.cache.json 8 | 9 | .github 10 | .idea -------------------------------------------------------------------------------- /apps/electron/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "semi": true, 4 | "singleQuote": true, 5 | "overrides": [ 6 | { 7 | "files": ["**/*.css", "**/*.scss", "**/*.html"], 8 | "options": { 9 | "singleQuote": false 10 | } 11 | } 12 | ], 13 | "trailingComma": "all", 14 | "bracketSpacing": false, 15 | "arrowParens": "avoid", 16 | "proseWrap": "never", 17 | "htmlWhitespaceSensitivity": "strict", 18 | "vueIndentScriptAndStyle": false, 19 | "endOfLine": "lf", 20 | "singleAttributePerLine": true 21 | } 22 | -------------------------------------------------------------------------------- /apps/electron/.simple-git-hooks.json: -------------------------------------------------------------------------------- 1 | { 2 | "pre-commit": "npx nano-staged" 3 | } 4 | -------------------------------------------------------------------------------- /apps/electron/buildResources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/.gitkeep -------------------------------------------------------------------------------- /apps/electron/buildResources/icon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon-16x16.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.icns -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.ico -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.iconset/icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.iconset/icon_1024.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.iconset/icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.iconset/icon_128.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.iconset/icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.iconset/icon_16.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.iconset/icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.iconset/icon_256.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.iconset/icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.iconset/icon_32.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.iconset/icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.iconset/icon_512.png -------------------------------------------------------------------------------- /apps/electron/buildResources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/icon.png -------------------------------------------------------------------------------- /apps/electron/buildResources/iconTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/iconTemplate.png -------------------------------------------------------------------------------- /apps/electron/buildResources/production.provisionprofile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/buildResources/production.provisionprofile -------------------------------------------------------------------------------- /apps/electron/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/demo.png -------------------------------------------------------------------------------- /apps/electron/notarize/entitlements.mac.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-unsigned-executable-memory 6 | 7 | 8 | com.apple.security.cs.allow-jit 9 | 10 | 11 | com.apple.security.cs.disable-library-validation 12 | 13 | 14 | com.apple.security.personal-information.calendars 15 | 16 | 17 | 18 | com.apple.security.device.screen-capture 19 | 20 | 21 | -------------------------------------------------------------------------------- /apps/electron/packages/main/notifications/test.ts: -------------------------------------------------------------------------------- 1 | import {Notification} from 'electron'; 2 | 3 | export const sendTestNotification = () => { 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | const payload: any = { 6 | title: 'SAmple', 7 | body: 'This is how you will be notified as.', 8 | hasReply: true, 9 | silent: false, 10 | }; 11 | 12 | const notification = new Notification(payload); 13 | 14 | notification.show(); 15 | }; 16 | -------------------------------------------------------------------------------- /apps/electron/packages/main/src/deeplink.ts: -------------------------------------------------------------------------------- 1 | import {Deeplink} from 'electron-deeplink'; 2 | import type {BrowserWindow} from 'electron'; 3 | import {app} from 'electron'; 4 | 5 | export const registerDeepLink = (mainWindow: BrowserWindow) => { 6 | const deeplink = new Deeplink({ 7 | app, 8 | mainWindow, 9 | protocol: 'sol', 10 | }); 11 | 12 | deeplink.on('received', link => { 13 | if (!link.startsWith('sol://')) return; 14 | const encoded = link.split('sol://')[1]; 15 | if (!encoded) { 16 | throw new Error('Invalid sol link!'); 17 | } 18 | const [action, data] = Buffer.from(encoded, 'base64').toString().split(':'); 19 | mainWindow.webContents.send('received-link', {action, data}); 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /apps/electron/packages/main/src/store.ts: -------------------------------------------------------------------------------- 1 | import {ipcMain} from 'electron'; 2 | import Store from 'electron-store'; 3 | 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | export const store: any = new Store(); 6 | 7 | export const registerStore = () => { 8 | // IPC listener 9 | ipcMain.on('electron-store-get', async (event, val) => { 10 | event.returnValue = store.get(val); 11 | }); 12 | ipcMain.on('electron-store-set', async (_event, key, val) => { 13 | store.set(key, val); 14 | }); 15 | ipcMain.on('electron-store-delete', async (_event, val) => { 16 | store.delete(val); 17 | }); 18 | return store; 19 | }; 20 | -------------------------------------------------------------------------------- /apps/electron/packages/main/src/utils.ts: -------------------------------------------------------------------------------- 1 | import {app, BrowserWindow} from 'electron'; 2 | 3 | /** 4 | * ensureSafeQuitAndInstall 5 | * 6 | * @access public 7 | * @return void 8 | */ 9 | export function ensureSafeQuitAndInstall() { 10 | app.removeAllListeners('window-all-closed'); 11 | const browserWindows = BrowserWindow.getAllWindows(); 12 | for (const browserWindow of browserWindows) { 13 | browserWindow.removeAllListeners('close'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/electron/packages/main/utils.ts: -------------------------------------------------------------------------------- 1 | export const PORT = process.env.PORT ? parseInt(process.env.PORT) : 53081; 2 | -------------------------------------------------------------------------------- /apps/electron/packages/main/windows/notification.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/electron/packages/main/windows/notification.ts -------------------------------------------------------------------------------- /apps/electron/packages/preload/src/nodeCrypto.ts: -------------------------------------------------------------------------------- 1 | import {type BinaryLike, createHash} from 'node:crypto'; 2 | 3 | export function sha256sum(data: BinaryLike) { 4 | return createHash('sha256').update(data).digest('hex'); 5 | } 6 | -------------------------------------------------------------------------------- /apps/electron/packages/preload/src/versions.ts: -------------------------------------------------------------------------------- 1 | export {versions} from 'node:process'; 2 | -------------------------------------------------------------------------------- /apps/electron/packages/preload/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "module": "NodeNext", 5 | "target": "ESNext", 6 | "sourceMap": false, 7 | "moduleResolution": "NodeNext", 8 | "skipLibCheck": true, 9 | "strict": true, 10 | "isolatedModules": true, 11 | "types": ["node"], 12 | "baseUrl": "." 13 | }, 14 | "include": ["src/**/*.ts", "../../types/**/*.d.ts"], 15 | "exclude": ["**/*.spec.ts", "**/*.test.ts"] 16 | } 17 | -------------------------------------------------------------------------------- /apps/electron/scripts/update-electron-vendors.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This script should be run in electron context 3 | * @example 4 | * ELECTRON_RUN_AS_NODE=1 electron scripts/update-electron-vendors.js 5 | */ 6 | 7 | import {writeFileSync} from 'fs'; 8 | import path from 'path'; 9 | 10 | const electronRelease = process.versions; 11 | 12 | const node = electronRelease.node.split('.')[0]; 13 | const chrome = electronRelease.v8.split('.').splice(0, 2).join(''); 14 | 15 | const browserslistrcPath = path.resolve(process.cwd(), '.browserslistrc'); 16 | 17 | writeFileSync('./.electron-vendors.cache.json', JSON.stringify({chrome, node})); 18 | writeFileSync(browserslistrcPath, `Chrome ${chrome}`, 'utf8'); 19 | -------------------------------------------------------------------------------- /apps/electron/vitest.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Configuration for the global end-to-end testing, 3 | * placed in the project's root 'tests' folder. 4 | * @type {import('vite').UserConfig} 5 | * @see https://vitest.dev/config/ 6 | */ 7 | const config = { 8 | test: { 9 | /** 10 | * By default, vitest searches for the test files in all packages. 11 | * For e2e tests, have vitest search only in the project root 'tests' folder. 12 | */ 13 | include: ['./tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], 14 | 15 | /** 16 | * The default timeout of 5000ms is sometimes not enough for playwright. 17 | */ 18 | testTimeout: 30_000, 19 | hookTimeout: 30_000, 20 | }, 21 | }; 22 | 23 | export default config; 24 | -------------------------------------------------------------------------------- /apps/server/.dockerignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | node_modules/ 3 | npm-debug.log 4 | dist/ 5 | test/ 6 | 7 | .env -------------------------------------------------------------------------------- /apps/server/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ['@sol/eslint-config/server.js'], 5 | parserOptions: { 6 | project: true, 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /apps/server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | prisma/*.db 4 | coverage/ 5 | 6 | .DS_Store 7 | 8 | prisma/migrations/dev/ 9 | .env 10 | 11 | certs/ 12 | .trigger 13 | 14 | combined.log 15 | 16 | -------------------------------------------------------------------------------- /apps/server/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /apps/server/cors.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "origin": [ 4 | "http://localhost:3000", 5 | "https://app.tegon.ai", 6 | "https://attachment.tegon.ai" 7 | ], 8 | "method": ["GET", "POST", "PUT", "HEAD", "OPTIONS"], 9 | "responseHeader": [ 10 | "Content-Type", 11 | "Authorization", 12 | "Access-Control-Allow-Origin", 13 | "Cache-Control", 14 | "Content-Length", 15 | "Content-Range" 16 | ], 17 | "maxAgeSeconds": 3600 18 | } 19 | ] 20 | -------------------------------------------------------------------------------- /apps/server/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "ts", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src" 5 | } -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241027131319_add_y_js_storage_field/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Page" ADD COLUMN "descriptionBinary" BYTEA; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241104104943_move_context_to_conv_history/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `context` on the `Conversation` table. All the data in the column will be lost. 5 | - You are about to drop the column `files` on the `ConversationHistory` table. All the data in the column will be lost. 6 | 7 | */ 8 | -- AlterEnum 9 | ALTER TYPE "UserType" ADD VALUE 'System'; 10 | 11 | -- AlterTable 12 | ALTER TABLE "Conversation" DROP COLUMN "context"; 13 | 14 | -- AlterTable 15 | ALTER TABLE "ConversationHistory" DROP COLUMN "files", 16 | ADD COLUMN "context" JSONB; 17 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241105015950_add_user_to_conv_history/migration.sql: -------------------------------------------------------------------------------- 1 | -- AddForeignKey 2 | ALTER TABLE "ConversationHistory" ADD CONSTRAINT "ConversationHistory_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241105105256_add_settings_to_integration_account/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "IntegrationAccount" ADD COLUMN "settings" JSONB; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241209114943_add_workspace_to_tasks/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `workspaceId` to the `Task` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Task" ADD COLUMN "workspaceId" TEXT NOT NULL; 9 | 10 | -- AddForeignKey 11 | ALTER TABLE "Task" ADD CONSTRAINT "Task_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241209123718_add_activity_to_sync/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "ModelName" ADD VALUE 'Activity'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241210175356_add_conversationa_and_history_to_model_enum/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | -- This migration adds more than one value to an enum. 3 | -- With PostgreSQL versions 11 and earlier, this is not possible 4 | -- in a single migration. This can be worked around by creating 5 | -- multiple migrations, each migration adding only one value to 6 | -- the enum. 7 | 8 | 9 | ALTER TYPE "ModelName" ADD VALUE 'Conversation'; 10 | ALTER TYPE "ModelName" ADD VALUE 'ConversationHistory'; 11 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241211064221_add_title_in_conversation/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Conversation" ADD COLUMN "title" TEXT; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20241212072939_add_due_date_to_task/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Task" ADD COLUMN "dueDate" TIMESTAMP(3); 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250116081327_add_number_column_task/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Task" ADD COLUMN "number" INTEGER; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250116091812_add_completed_time_task/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Task" ADD COLUMN "completedAt" TIMESTAMP(3); 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250118110021_added_schedule_columns/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `dueDate` on the `Task` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Task" DROP COLUMN "dueDate", 9 | ADD COLUMN "endTime" TIMESTAMP(3), 10 | ADD COLUMN "recurrence" TEXT[], 11 | ADD COLUMN "startTime" TIMESTAMP(3); 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250119040315_add_recurrence_text/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Task" ADD COLUMN "recurrenceText" TEXT; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250121070259_add_delete_in_task_occurence/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "TaskOccurrence" ADD COLUMN "deleted" TIMESTAMP(3); 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250203055255_add_worksapce_in_occurence/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `workspaceId` to the `TaskOccurrence` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "TaskOccurrence" ADD COLUMN "workspaceId" TEXT NOT NULL; 9 | 10 | -- AlterTable 11 | ALTER TABLE "User" ADD COLUMN "preferences" JSONB; 12 | 13 | -- AddForeignKey 14 | ALTER TABLE "TaskOccurrence" ADD CONSTRAINT "TaskOccurrence_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 15 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250205052903_add_lists/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Activity" ADD COLUMN "isUrgent" BOOLEAN NOT NULL DEFAULT false; 3 | 4 | -- AlterTable 5 | ALTER TABLE "Task" ADD COLUMN "listId" TEXT; 6 | 7 | -- CreateTable 8 | CREATE TABLE "List" ( 9 | "id" TEXT NOT NULL, 10 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 11 | "updatedAt" TIMESTAMP(3) NOT NULL, 12 | "deleted" TIMESTAMP(3), 13 | "name" TEXT NOT NULL, 14 | 15 | CONSTRAINT "List_pkey" PRIMARY KEY ("id") 16 | ); 17 | 18 | -- AddForeignKey 19 | ALTER TABLE "Task" ADD CONSTRAINT "Task_listId_fkey" FOREIGN KEY ("listId") REFERENCES "List"("id") ON DELETE SET NULL ON UPDATE CASCADE; 20 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250205055459_added_workspace_to_list/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - A unique constraint covering the columns `[name,workspaceId]` on the table `List` will be added. If there are existing duplicate values, this will fail. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "List" ADD COLUMN "workspaceId" TEXT; 9 | 10 | -- CreateIndex 11 | CREATE UNIQUE INDEX "List_name_workspaceId_key" ON "List"("name", "workspaceId"); 12 | 13 | -- AddForeignKey 14 | ALTER TABLE "List" ADD CONSTRAINT "List_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE SET NULL ON UPDATE CASCADE; 15 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250205055621_add_list_to_sync_table/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "ModelName" ADD VALUE 'List'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250208094609_add_due_date_remind_at_in_task/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Task" ADD COLUMN "dueDate" TIMESTAMP(3), 3 | ADD COLUMN "remindAt" TIMESTAMP(3); 4 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250209133908_change_task_colomn_to_more_generic/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `recurrenceText` on the `Task` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Task" DROP COLUMN "recurrenceText", 9 | ADD COLUMN "scheduleText" TEXT; 10 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250211035320_add_task_page_in_conversation/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Conversation" ADD COLUMN "pageId" TEXT, 3 | ADD COLUMN "taskId" TEXT; 4 | 5 | -- AddForeignKey 6 | ALTER TABLE "Conversation" ADD CONSTRAINT "Conversation_pageId_fkey" FOREIGN KEY ("pageId") REFERENCES "Page"("id") ON DELETE SET NULL ON UPDATE CASCADE; 7 | 8 | -- AddForeignKey 9 | ALTER TABLE "Conversation" ADD CONSTRAINT "Conversation_taskId_fkey" FOREIGN KEY ("taskId") REFERENCES "Task"("id") ON DELETE SET NULL ON UPDATE CASCADE; 10 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250217101447_convert_source_to_json/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `sourceExternalLinkId` on the `Task` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "Task" DROP CONSTRAINT "Task_sourceExternalLinkId_fkey"; 9 | 10 | -- AlterTable 11 | ALTER TABLE "Task" DROP COLUMN "sourceExternalLinkId", 12 | ADD COLUMN "archived" TIMESTAMP(3), 13 | ADD COLUMN "source" JSONB; 14 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250218012803_remove_activity/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the `Activity` table. If the table is not empty, all the data it contains will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "Activity" DROP CONSTRAINT "Activity_integrationAccountId_fkey"; 9 | 10 | -- DropForeignKey 11 | ALTER TABLE "Activity" DROP CONSTRAINT "Activity_taskId_fkey"; 12 | 13 | -- DropForeignKey 14 | ALTER TABLE "Activity" DROP CONSTRAINT "Activity_workspaceId_fkey"; 15 | 16 | -- DropTable 17 | DROP TABLE "Activity"; 18 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250220130624_remove_activity/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - The values [Activity] on the enum `ModelName` will be removed. If these variants are still used in the database, this will fail. 5 | 6 | */ 7 | -- AlterEnum 8 | BEGIN; 9 | CREATE TYPE "ModelName_new" AS ENUM ('Attachment', 'IntegrationAccount', 'IntegrationDefinitionV2', 'Task', 'SyncAction', 'User', 'Workspace', 'Page', 'Status', 'Conversation', 'ConversationHistory', 'List'); 10 | ALTER TABLE "SyncAction" ALTER COLUMN "modelName" TYPE "ModelName_new" USING ("modelName"::text::"ModelName_new"); 11 | ALTER TYPE "ModelName" RENAME TO "ModelName_old"; 12 | ALTER TYPE "ModelName_new" RENAME TO "ModelName"; 13 | DROP TYPE "ModelName_old"; 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250223114812_add_outlink_to_page/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Page" ADD COLUMN "outlinks" JSONB DEFAULT '[]'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250305151325_add_page_id_to_task_occurence/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "TaskOccurrence" ADD COLUMN "pageId" TEXT; 3 | 4 | -- AddForeignKey 5 | ALTER TABLE "TaskOccurrence" ADD CONSTRAINT "TaskOccurrence_pageId_fkey" FOREIGN KEY ("pageId") REFERENCES "Page"("id") ON DELETE SET NULL ON UPDATE CASCADE; 6 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250306083417_add_task_occurrence_in_model_name/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "ModelName" ADD VALUE 'TaskOccurrence'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250307060553_add_agent_worklog/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "ModelName" ADD VALUE 'AgentWorklog'; 3 | 4 | -- CreateTable 5 | CREATE TABLE "AgentWorklog" ( 6 | "id" TEXT NOT NULL, 7 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 | "updatedAt" TIMESTAMP(3) NOT NULL, 9 | "deleted" TIMESTAMP(3), 10 | "modelName" TEXT NOT NULL, 11 | "modelId" TEXT NOT NULL, 12 | "state" TEXT NOT NULL, 13 | "type" TEXT NOT NULL, 14 | 15 | CONSTRAINT "AgentWorklog_pkey" PRIMARY KEY ("id") 16 | ); 17 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250307075715_add_workspace_in_agent_worklog/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `workspaceId` to the `AgentWorklog` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "AgentWorklog" ADD COLUMN "workspaceId" TEXT NOT NULL; 9 | 10 | -- AddForeignKey 11 | ALTER TABLE "AgentWorklog" ADD CONSTRAINT "AgentWorklog_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250311164948_add_list_type_to_page/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "PageType" ADD VALUE 'List'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250311165121_add_page_to_list/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `name` on the `List` table. All the data in the column will be lost. 5 | - Added the required column `pageId` to the `List` table without a default value. This is not possible if the table is not empty. 6 | 7 | */ 8 | -- DropIndex 9 | DROP INDEX "List_name_workspaceId_key"; 10 | 11 | -- AlterTable 12 | ALTER TABLE "List" DROP COLUMN "name", 13 | ADD COLUMN "pageId" TEXT NOT NULL; 14 | 15 | -- AddForeignKey 16 | ALTER TABLE "List" ADD CONSTRAINT "List_pageId_fkey" FOREIGN KEY ("pageId") REFERENCES "Page"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 17 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250314061432_add_icon_to_list/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "List" ADD COLUMN "icon" TEXT; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250325030905_add_task_external_link/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "ModelName" ADD VALUE 'TaskExternalLink'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250325055254_change_function_parameter_text/migration.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE FUNCTION get_task_number_sequence(workspace_id varchar) 2 | RETURNS TEXT AS $$ 3 | DECLARE 4 | seq_name TEXT; 5 | BEGIN 6 | seq_name := 'task_number_seq_' || workspace_id; 7 | -- Create sequence if not exists 8 | EXECUTE FORMAT( 9 | 'CREATE SEQUENCE IF NOT EXISTS %I START WITH 1;', 10 | seq_name 11 | ); 12 | RETURN seq_name; 13 | END; 14 | $$ LANGUAGE plpgsql; 15 | 16 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250417092430_add_conversation_execution_step/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "ConversationExecutionStep" ( 3 | "id" TEXT NOT NULL, 4 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 5 | "updatedAt" TIMESTAMP(3) NOT NULL, 6 | "deleted" TIMESTAMP(3), 7 | "thought" TEXT NOT NULL, 8 | "message" TEXT NOT NULL, 9 | "metadata" JSONB DEFAULT '{}', 10 | 11 | CONSTRAINT "ConversationExecutionStep_pkey" PRIMARY KEY ("id") 12 | ); 13 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250418034145_add_relation_to_conv_execstep/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `conversationHistoryId` to the `ConversationExecutionStep` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "ConversationExecutionStep" ADD COLUMN "conversationHistoryId" TEXT NOT NULL; 9 | 10 | -- AddForeignKey 11 | ALTER TABLE "ConversationExecutionStep" ADD CONSTRAINT "ConversationExecutionStep_conversationHistoryId_fkey" FOREIGN KEY ("conversationHistoryId") REFERENCES "ConversationHistory"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250422054815_add_mcp/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ADD COLUMN "mcp" JSONB; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250422105215_add_thought/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "ConversationHistory" ADD COLUMN "thought" TEXT NOT NULL DEFAULT ''; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250424165839_add_brief_model/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Brief" ( 3 | "id" TEXT NOT NULL, 4 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 5 | "updatedAt" TIMESTAMP(3) NOT NULL, 6 | "deleted" TIMESTAMP(3), 7 | "title" TEXT NOT NULL, 8 | "content" TEXT NOT NULL, 9 | "date" TIMESTAMP(3) NOT NULL, 10 | "workspaceId" TEXT NOT NULL, 11 | 12 | CONSTRAINT "Brief_pkey" PRIMARY KEY ("id") 13 | ); 14 | 15 | -- AddForeignKey 16 | ALTER TABLE "Brief" ADD CONSTRAINT "Brief_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 17 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250428061249_st_favourite/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "List" ADD COLUMN "favourite" BOOLEAN NOT NULL DEFAULT false; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250428165557_add_context_page_type/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "PageType" ADD VALUE 'Context'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250429093400_remove_suggestions/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the `Suggestion` table. If the table is not empty, all the data it contains will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "Suggestion" DROP CONSTRAINT "Suggestion_taskId_fkey"; 9 | 10 | -- DropTable 11 | DROP TABLE "Suggestion"; 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250429093458_misc/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the `Brief` table. If the table is not empty, all the data it contains will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "Brief" DROP CONSTRAINT "Brief_workspaceId_fkey"; 9 | 10 | -- DropTable 11 | DROP TABLE "Brief"; 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250430090052_add_source_for_activity/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Activity" ADD COLUMN "sourceId" TEXT, 3 | ADD COLUMN "sourceURL" TEXT; 4 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250430112453_add_activity_to_conversation/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Conversation" ADD COLUMN "activityId" TEXT; 3 | 4 | -- AddForeignKey 5 | ALTER TABLE "Conversation" ADD CONSTRAINT "Conversation_activityId_fkey" FOREIGN KEY ("activityId") REFERENCES "Activity"("id") ON DELETE SET NULL ON UPDATE CASCADE; 6 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250502090837_add_spec_to_id_v2/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "IntegrationDefinitionV2" ADD COLUMN "spec" JSONB NOT NULL DEFAULT '{}'; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250507074525_add_action_details/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "ConversationExecutionStep" ADD COLUMN "actionId" TEXT, 3 | ADD COLUMN "actionInput" TEXT, 4 | ADD COLUMN "actionOutput" TEXT; 5 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250509103445_convert_date_to_string_sync/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Sync" ALTER COLUMN "date" SET DATA TYPE TEXT; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250521175822_drop_thought/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `thought` on the `ConversationHistory` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "ConversationHistory" DROP COLUMN "thought"; 9 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250522095918_add_workspace_automation/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `workspaceId` to the `Automation` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Automation" ADD COLUMN "workspaceId" TEXT NOT NULL; 9 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250522181340_add_reject_reason/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Activity" ADD COLUMN "rejectionReason" TEXT; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250523190830_add_sync_conversation_relation/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `date` on the `Sync` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Sync" DROP COLUMN "date", 9 | ADD COLUMN "conversationId" TEXT, 10 | ADD COLUMN "syncedAt" TIMESTAMP(3); 11 | 12 | -- AddForeignKey 13 | ALTER TABLE "Sync" ADD CONSTRAINT "Sync_conversationId_fkey" FOREIGN KEY ("conversationId") REFERENCES "Conversation"("id") ON DELETE SET NULL ON UPDATE CASCADE; 14 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250606073019_remove_per_day_page_concept/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `pageId` on the `TaskOccurrence` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "TaskOccurrence" DROP CONSTRAINT "TaskOccurrence_pageId_fkey"; 9 | 10 | -- DropIndex 11 | DROP INDEX "TaskOccurrence_taskId_pageId_key"; 12 | 13 | -- AlterTable 14 | ALTER TABLE "TaskOccurrence" DROP COLUMN "pageId"; 15 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250612091054_add_action_status/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "ConversationExecutionStep" ADD COLUMN "actionStatus" TEXT; 3 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250616165828_add_command_enum/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterEnum 2 | ALTER TYPE "ModelName" ADD VALUE 'Command'; 3 | 4 | -- CreateTable 5 | CREATE TABLE "Command" ( 6 | "id" TEXT NOT NULL, 7 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 | "updatedAt" TIMESTAMP(3) NOT NULL, 9 | "deleted" TIMESTAMP(3), 10 | "command" TEXT NOT NULL, 11 | "description" TEXT NOT NULL, 12 | "workspaceId" TEXT NOT NULL, 13 | 14 | CONSTRAINT "Command_pkey" PRIMARY KEY ("id") 15 | ); 16 | 17 | -- AddForeignKey 18 | ALTER TABLE "Command" ADD CONSTRAINT "Command_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 19 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250617071558_remove_ai_request/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the `AIRequest` table. If the table is not empty, all the data it contains will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "AIRequest" DROP CONSTRAINT "AIRequest_workspaceId_fkey"; 9 | 10 | -- DropTable 11 | DROP TABLE "AIRequest"; 12 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250617154944_add_update_by/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "List" ADD COLUMN "updatedBy" TEXT NOT NULL DEFAULT 'user'; 3 | 4 | -- AlterTable 5 | ALTER TABLE "Task" ADD COLUMN "updatedBy" TEXT NOT NULL DEFAULT 'user'; 6 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/20250620055557_add_claude_user_sessions/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "UserCodingSession" ( 3 | "id" TEXT NOT NULL, 4 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 5 | "updatedAt" TIMESTAMP(3) NOT NULL, 6 | "sessionId" TEXT NOT NULL, 7 | "sessionStatus" TEXT NOT NULL, 8 | "userId" TEXT NOT NULL, 9 | 10 | CONSTRAINT "UserCodingSession_pkey" PRIMARY KEY ("id") 11 | ); 12 | 13 | -- CreateIndex 14 | CREATE UNIQUE INDEX "UserCodingSession_id_key" ON "UserCodingSession"("id"); 15 | 16 | -- AddForeignKey 17 | ALTER TABLE "UserCodingSession" ADD CONSTRAINT "UserCodingSession_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 18 | -------------------------------------------------------------------------------- /apps/server/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /apps/server/scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -xe 3 | 4 | cd /app/apps/server 5 | # exec dumb-init pnpm run start:local 6 | NODE_PATH='/app/node_modules/.pnpm/node_modules' exec dumb-init pnpm start-prod-with-prisma -------------------------------------------------------------------------------- /apps/server/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Param } from '@nestjs/common'; 2 | 3 | import { AppService } from './app.service'; 4 | 5 | @Controller() 6 | export class AppController { 7 | constructor(private readonly appService: AppService) {} 8 | 9 | @Get() 10 | getHello(): string { 11 | return this.appService.getHello(); 12 | } 13 | 14 | @Get('hello/:name') 15 | getHelloName(@Param('name') name: string): string { 16 | return this.appService.getHelloName(name); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/server/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | 9 | getHelloName(name: string): string { 10 | return `Hello ${name}!`; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/server/src/common/common.interface.ts: -------------------------------------------------------------------------------- 1 | export type TiptapListTypes = 'orderedList' | 'bulletList' | 'taskList' | null; 2 | export interface TiptapAttrs { 3 | src?: string; 4 | alt?: string; 5 | href?: string; 6 | type?: string; 7 | target?: string; 8 | rel?: string; 9 | class?: string; 10 | tight?: boolean; 11 | start?: number; 12 | language?: string; 13 | level?: number; 14 | checked?: boolean; 15 | } 16 | 17 | export interface TiptapMarks { 18 | type: string; 19 | attrs?: TiptapAttrs; 20 | } 21 | 22 | export interface TiptapNode { 23 | type: string; 24 | content?: TiptapNode[]; 25 | text?: string; 26 | marks?: TiptapMarks[]; 27 | attrs?: TiptapAttrs; 28 | } 29 | -------------------------------------------------------------------------------- /apps/server/src/common/configs/config.interface.ts: -------------------------------------------------------------------------------- 1 | export interface Config { 2 | cors: CorsConfig; 3 | superToken: SuperTokenConfig; 4 | log: LogConfigs; 5 | } 6 | 7 | export interface LogConfigs { 8 | level: string; 9 | createLogFile?: boolean; 10 | } 11 | 12 | export interface AppInfoConfig { 13 | appName: string; 14 | apiDomain: string; 15 | websiteDomain: string; 16 | apiBasePath: string; 17 | websiteBasePath: string; 18 | } 19 | 20 | export interface SuperTokenConfig { 21 | appInfo: AppInfoConfig; 22 | connectionURI: string; 23 | } 24 | 25 | export interface CorsConfig { 26 | enabled: boolean; 27 | } 28 | -------------------------------------------------------------------------------- /apps/server/src/common/configs/config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from './config.interface'; 2 | 3 | export const config: Config = { 4 | cors: { 5 | enabled: true, 6 | }, 7 | superToken: { 8 | appInfo: { 9 | appName: 'Sol', 10 | apiDomain: process.env.BACKEND_HOST, 11 | websiteDomain: process.env.FRONTEND_HOST, 12 | apiBasePath: '/auth', 13 | websiteBasePath: '/auth', 14 | }, 15 | connectionURI: process.env.SUPERTOKEN_CONNECTION_URI, 16 | }, 17 | log: { 18 | level: process.env.LOG_LEVEL, 19 | createLogFile: process.env.CREATE_LOG_FILE === 'true', 20 | }, 21 | }; 22 | 23 | export default (): Config => config; 24 | -------------------------------------------------------------------------------- /apps/server/src/common/middleware/logging.middleware.ts: -------------------------------------------------------------------------------- 1 | import { Prisma } from '@prisma/client'; 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 4 | export function loggingMiddleware(logger: any = console): Prisma.Middleware { 5 | return async (params, next) => { 6 | const before = Date.now(); 7 | 8 | const result = await next(params); 9 | 10 | const after = Date.now(); 11 | 12 | logger.log( 13 | `Prisma Query ${params.model}.${params.action} took ${after - before}ms`, 14 | ); 15 | 16 | return result; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /apps/server/src/common/remote-loader/index.ts: -------------------------------------------------------------------------------- 1 | export * from './load-remote-module'; 2 | -------------------------------------------------------------------------------- /apps/server/src/common/utils/login.ts: -------------------------------------------------------------------------------- 1 | import Passwordless from 'supertokens-node/recipe/passwordless'; 2 | 3 | export async function createMagicLink(email: string) { 4 | const magicLink = await Passwordless.createMagicLink({ 5 | email, 6 | tenantId: 'public', 7 | }); 8 | 9 | return magicLink; 10 | } 11 | -------------------------------------------------------------------------------- /apps/server/src/modules/activity/activity.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 3 | 4 | import { ConversationHistoryModule } from 'modules/conversation-history/conversation-history.module'; 5 | import { UsersService } from 'modules/users/users.service'; 6 | 7 | import { ActivityController } from './activity.controller'; 8 | import ActivityService from './activity.service'; 9 | 10 | @Module({ 11 | imports: [PrismaModule, ConversationHistoryModule], 12 | controllers: [ActivityController], 13 | providers: [PrismaService, ActivityService, UsersService], 14 | exports: [ActivityService], 15 | }) 16 | export class ActivityModule {} 17 | -------------------------------------------------------------------------------- /apps/server/src/modules/als/als.module.ts: -------------------------------------------------------------------------------- 1 | import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; 2 | 3 | import { ALSMiddleware } from './als.middleware'; 4 | import { ALSService } from './als.service'; 5 | 6 | @Module({ 7 | providers: [ALSService], 8 | exports: [ALSService], 9 | }) 10 | export class ALSModule implements NestModule { 11 | configure(consumer: MiddlewareConsumer) { 12 | consumer.apply(ALSMiddleware).forRoutes('*'); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/server/src/modules/attachments/storage.factory.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | import { GCPStorageProvider } from './gcp-storage.provider'; 4 | import { S3StorageProvider } from './s3-storage.provider'; 5 | import { StorageProvider } from './storage-provider.interface'; 6 | 7 | @Injectable() 8 | export class StorageFactory { 9 | createStorageProvider(): StorageProvider { 10 | const provider = process.env.STORAGE_PROVIDER?.toLowerCase() || 'gcp'; 11 | 12 | switch (provider) { 13 | case 'aws': 14 | return new S3StorageProvider(); 15 | case 'gcp': 16 | default: 17 | return new GCPStorageProvider(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/server/src/modules/auth/auth.middleware.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | 3 | import { Injectable, NestMiddleware } from '@nestjs/common'; 4 | import { middleware } from 'supertokens-node/framework/express'; 5 | 6 | @Injectable() 7 | export class AuthMiddleware implements NestMiddleware { 8 | supertokensMiddleware: any; 9 | 10 | constructor() { 11 | this.supertokensMiddleware = middleware(); 12 | } 13 | 14 | use(req: Request, res: any, next: () => void) { 15 | return this.supertokensMiddleware(req, res, next); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/server/src/modules/auth/config.interface.ts: -------------------------------------------------------------------------------- 1 | import { AppInfo } from 'supertokens-node/types'; 2 | 3 | export const ConfigInjectionToken = 'ConfigInjectionToken'; 4 | 5 | export interface AuthModuleConfig { 6 | appInfo: AppInfo; 7 | connectionURI: string; 8 | apiKey?: string; 9 | } 10 | -------------------------------------------------------------------------------- /apps/server/src/modules/automation/automation.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 3 | 4 | import { UsersService } from 'modules/users/users.service'; 5 | 6 | import { AutomationController } from './automation.controller'; 7 | import AutomationService from './automation.service'; 8 | 9 | @Module({ 10 | imports: [PrismaModule], 11 | controllers: [AutomationController], 12 | providers: [PrismaService, UsersService, AutomationService], 13 | exports: [AutomationService], 14 | }) 15 | export class AutomationModule {} 16 | -------------------------------------------------------------------------------- /apps/server/src/modules/content/content.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaService } from 'nestjs-prisma'; 3 | 4 | import { ContentService } from './content.service'; 5 | 6 | @Module({ 7 | imports: [], 8 | providers: [ContentService, PrismaService], 9 | exports: [ContentService], 10 | }) 11 | export class ContentModule {} 12 | -------------------------------------------------------------------------------- /apps/server/src/modules/conversation-history/conversation-history.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule } from 'nestjs-prisma'; 3 | 4 | import { UsersService } from 'modules/users/users.service'; 5 | import { WorkspacesModule } from 'modules/workspaces/workspaces.module'; 6 | 7 | import { ConversationHistoryController } from './conversation-history.controller'; 8 | import { ConversationHistoryService } from './conversation-history.service'; 9 | 10 | @Module({ 11 | imports: [PrismaModule, WorkspacesModule], 12 | controllers: [ConversationHistoryController], 13 | providers: [ConversationHistoryService, UsersService], 14 | exports: [ConversationHistoryService], 15 | }) 16 | export class ConversationHistoryModule {} 17 | -------------------------------------------------------------------------------- /apps/server/src/modules/conversation/conversation.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule } from 'nestjs-prisma'; 3 | 4 | import { UsersService } from 'modules/users/users.service'; 5 | 6 | import { ConversationController } from './conversation.controller'; 7 | import { ConversationService } from './conversation.service'; 8 | 9 | @Module({ 10 | imports: [PrismaModule], 11 | controllers: [ConversationController], 12 | providers: [ConversationService, UsersService], 13 | exports: [ConversationService], 14 | }) 15 | export class ConversationModule {} 16 | -------------------------------------------------------------------------------- /apps/server/src/modules/integration-definition/integration-definition.interface.ts: -------------------------------------------------------------------------------- 1 | import { Spec, WorkspaceRequestParamsDto } from '@redplanethq/sol-sdk'; 2 | import { IsObject, IsString } from 'class-validator'; 3 | 4 | export class IntegrationDefinitionSpec { 5 | spec: Spec; 6 | } 7 | 8 | export class IntegrationDefinitionCreateBody extends WorkspaceRequestParamsDto { 9 | @IsObject() 10 | name: string; 11 | 12 | @IsString() 13 | icon: string; 14 | 15 | @IsString() 16 | clientId: string; 17 | 18 | @IsString() 19 | clientSecret: string; 20 | } 21 | -------------------------------------------------------------------------------- /apps/server/src/modules/integration-definition/integration-definition.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 3 | 4 | import { UsersService } from 'modules/users/users.service'; 5 | 6 | import { IntegrationDefinitionController } from './integration-definition.controller'; 7 | import { IntegrationDefinitionService } from './integration-definition.service'; 8 | 9 | @Module({ 10 | imports: [PrismaModule], 11 | controllers: [IntegrationDefinitionController], 12 | providers: [PrismaService, IntegrationDefinitionService, UsersService], 13 | exports: [IntegrationDefinitionService], 14 | }) 15 | export class IntegrationDefinitionModule {} 16 | -------------------------------------------------------------------------------- /apps/server/src/modules/integrations/integrations.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaService } from 'nestjs-prisma'; 3 | 4 | import { UsersService } from 'modules/users/users.service'; 5 | 6 | import { IntegrationsService } from './integrations.service'; 7 | 8 | @Module({ 9 | imports: [], 10 | controllers: [], 11 | providers: [PrismaService, UsersService, IntegrationsService], 12 | exports: [IntegrationsService], 13 | }) 14 | export class IntegrationsModule {} 15 | -------------------------------------------------------------------------------- /apps/server/src/modules/lists/lists.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 3 | 4 | import { PagesModule } from 'modules/pages/pages.module'; 5 | import { UsersService } from 'modules/users/users.service'; 6 | 7 | import { ListsController } from './lists.controller'; 8 | import { ListsService } from './lists.service'; 9 | 10 | @Module({ 11 | imports: [PrismaModule, PagesModule], 12 | controllers: [ListsController], 13 | providers: [PrismaService, ListsService, UsersService], 14 | exports: [ListsService], 15 | }) 16 | export class ListsModule {} 17 | -------------------------------------------------------------------------------- /apps/server/src/modules/pages/pages.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule } from 'nestjs-prisma'; 3 | 4 | import { ContentModule } from 'modules/content/content.module'; 5 | import { UsersService } from 'modules/users/users.service'; 6 | 7 | import { PagesController } from './pages.controller'; 8 | import { PagesService } from './pages.service'; 9 | 10 | @Module({ 11 | imports: [PrismaModule, ContentModule], 12 | controllers: [PagesController], 13 | providers: [PagesService, UsersService], 14 | exports: [PagesService], 15 | }) 16 | export class PagesModule {} 17 | -------------------------------------------------------------------------------- /apps/server/src/modules/sync-actions/sync-actions.interface.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class BootstrapRequestQuery { 4 | @IsString() 5 | workspaceId: string; 6 | 7 | @IsString() 8 | modelNames: string; 9 | 10 | @IsString() 11 | userId: string; 12 | } 13 | 14 | export class DeltaRequestQuery { 15 | @IsString() 16 | workspaceId: string; 17 | 18 | @IsString() 19 | modelNames: string; 20 | 21 | @IsString() 22 | lastSequenceId: string; 23 | 24 | @IsString() 25 | userId: string; 26 | } 27 | -------------------------------------------------------------------------------- /apps/server/src/modules/sync/sync.constants.ts: -------------------------------------------------------------------------------- 1 | export const SOCKET_EVENTS = { 2 | MESSAGE: 'message', 3 | }; 4 | -------------------------------------------------------------------------------- /apps/server/src/modules/sync/sync.interface.ts: -------------------------------------------------------------------------------- 1 | export interface ClientMetadata { 2 | workspaceId: string; 3 | userId: string; 4 | } 5 | -------------------------------------------------------------------------------- /apps/server/src/modules/sync/sync.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | 3 | import { SyncGateway } from './sync.gateway'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [], 8 | providers: [SyncGateway], 9 | exports: [SyncGateway], 10 | }) 11 | export class SyncModule {} 12 | -------------------------------------------------------------------------------- /apps/server/src/modules/sync/sync.utils.ts: -------------------------------------------------------------------------------- 1 | import * as cookie from 'cookie'; 2 | 3 | import { hasValidHeader } from 'common/authentication'; 4 | 5 | export async function isValidAuthentication( 6 | headers: Record, 7 | ) { 8 | if (!headers.cookie) { 9 | return false; 10 | } 11 | 12 | const cookies = cookie.parse(headers.cookie as string); 13 | 14 | if (!cookies) { 15 | return false; 16 | } 17 | if (!cookies.sAccessToken) { 18 | return false; 19 | } 20 | 21 | return await hasValidHeader(`Bearer ${cookies.sAccessToken}`, false); 22 | } 23 | -------------------------------------------------------------------------------- /apps/server/src/modules/task-occurrence/task-occurrence.model.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 3 | 4 | import { PagesModule } from 'modules/pages/pages.module'; 5 | import { UsersService } from 'modules/users/users.service'; 6 | 7 | import { TaskOccurenceController } from './task-occurrence.controller'; 8 | import { TaskOccurenceService } from './task-occurrence.service'; 9 | 10 | @Module({ 11 | imports: [PrismaModule, PagesModule], 12 | controllers: [TaskOccurenceController], 13 | providers: [PrismaService, TaskOccurenceService, UsersService], 14 | exports: [TaskOccurenceService], 15 | }) 16 | export class TaskOccurenceModule {} 17 | -------------------------------------------------------------------------------- /apps/server/src/modules/triggerdev/triggerdev.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | 3 | import { UsersService } from 'modules/users/users.service'; 4 | 5 | import { TriggerdevService } from './triggerdev.service'; 6 | 7 | @Module({ 8 | imports: [], 9 | controllers: [], 10 | providers: [TriggerdevService, UsersService], 11 | exports: [TriggerdevService], 12 | }) 13 | export class TriggerdevModule {} 14 | -------------------------------------------------------------------------------- /apps/server/src/modules/users/users.utils.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | export const generateUniqueId = (length = 24) => { 4 | // Generate random bytes and encode them as base64 5 | return ( 6 | crypto 7 | .randomBytes(length) 8 | .toString('base64') 9 | // Remove non-url-safe characters 10 | .replace(/\+/g, '0') 11 | .replace(/\//g, '0') 12 | .replace(/=/g, '') 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /apps/server/src/modules/vector/vector.module.ts: -------------------------------------------------------------------------------- 1 | // apps/server/src/modules/vector-store/vector-store.module.ts 2 | import { Module } from '@nestjs/common'; 3 | 4 | import { VectorStoreService } from './vector.service'; 5 | 6 | @Module({ 7 | providers: [VectorStoreService], 8 | exports: [VectorStoreService], 9 | }) 10 | export class VectorStoreModule {} 11 | -------------------------------------------------------------------------------- /apps/server/src/modules/webhook/webhook.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 3 | 4 | import { IntegrationsService } from 'modules/integrations/integrations.service'; 5 | import { TasksModule } from 'modules/tasks/tasks.module'; 6 | import { UsersService } from 'modules/users/users.service'; 7 | 8 | import { WebhookController } from './webhook.controller'; 9 | import WebhookService from './webhook.service'; 10 | 11 | @Module({ 12 | imports: [PrismaModule, TasksModule], 13 | controllers: [WebhookController], 14 | providers: [PrismaService, WebhookService, UsersService, IntegrationsService], 15 | exports: [], 16 | }) 17 | export class WebhookModule {} 18 | -------------------------------------------------------------------------------- /apps/server/src/modules/workspaces/workspaces.module.ts: -------------------------------------------------------------------------------- 1 | import { HttpModule } from '@nestjs/axios'; 2 | import { Module } from '@nestjs/common'; 3 | import { PrismaModule, PrismaService } from 'nestjs-prisma'; 4 | 5 | import { ListsModule } from 'modules/lists/lists.module'; 6 | import { UsersService } from 'modules/users/users.service'; 7 | 8 | import { WorkspacesController } from './workspaces.controller'; 9 | import WorkspacesService from './workspaces.service'; 10 | 11 | @Module({ 12 | imports: [PrismaModule, HttpModule, ListsModule], 13 | controllers: [WorkspacesController], 14 | providers: [WorkspacesService, PrismaService, UsersService], 15 | exports: [WorkspacesService], 16 | }) 17 | export class WorkspacesModule {} 18 | -------------------------------------------------------------------------------- /apps/server/src/triggers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/server/src/triggers/.gitkeep -------------------------------------------------------------------------------- /apps/server/src/triggers/agents/sol-tools/operations/memory.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | import { RetrieveMemoryParams } from '../types/memory'; 4 | 5 | export const retrieveMemory = async (params: RetrieveMemoryParams) => { 6 | const { queries } = params; 7 | const responses = await Promise.all( 8 | queries.map(async (query) => { 9 | const response = await axios.post(`https://sol::core_memory`, { 10 | query, 11 | }); 12 | return response.data; 13 | }), 14 | ); 15 | 16 | return responses; 17 | }; 18 | -------------------------------------------------------------------------------- /apps/server/src/triggers/agents/sol-tools/types/memory.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const RetrieveMemorySchema = z.object({ 4 | queries: z.array(z.string()).describe('Queries to retrieve memory'), 5 | }); 6 | 7 | export type RetrieveMemoryParams = z.infer; 8 | -------------------------------------------------------------------------------- /apps/server/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "prisma"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/nest.json", 3 | "compilerOptions": { 4 | "baseUrl": "src", 5 | "module": "commonjs", 6 | "outDir": "./dist" 7 | }, 8 | "exclude": ["node_modules", ".trigger", "src/triggers/coding/query.js"], 9 | "include": [ 10 | "**/*.ts", 11 | "**/*.tsx", 12 | "prisma/scripts/create-number.js", 13 | "trigger.config.ts", 14 | "src/triggers/coding/query.js" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /apps/webapp/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@sol/eslint-config/next.js'], 4 | parserOptions: { 5 | project: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /apps/webapp/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env* 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | -------------------------------------------------------------------------------- /apps/webapp/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /apps/webapp/.prod.env: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_VERSION=0.1.11 2 | NEXT_PUBLIC_BASE_HOST=https://app.heysol.ai 3 | NEXT_PUBLIC_TRIGGER_URL=https://trigger.heysol.ai 4 | NEXT_PUBLIC_CONTENT_HOST=content.heysol.ai 5 | NEXT_PUBLIC_NODE_ENV=production 6 | NEXT_PUBLIC_SENTRY_DSN=https://ec3f0d16cdae2eeca1aa231e9708d0d2@o4507089815863296.ingest.us.sentry.io/4508496872341504 7 | NEXT_PUBLIC_POSTHOG_KEY=PROD_NEXT_PUBLIC_POSTHOG_KEY 8 | NEXT_PUBLIC_POSTHOG_HOST=PROD_NEXT_PUBLIC_POSTHOG_HOST 9 | -------------------------------------------------------------------------------- /apps/webapp/common/RemoteComponent.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createRemoteComponent, 3 | createRequires, 4 | createUseRemoteComponent, 5 | } from '@paciolan/remote-component'; 6 | 7 | import { resolve } from '../remote-component.config.js'; 8 | 9 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 10 | const requires = createRequires(resolve as any); 11 | 12 | export const RemoteComponent = createRemoteComponent({ requires }); 13 | 14 | export const useRemoteComponent = createUseRemoteComponent({ requires }); 15 | -------------------------------------------------------------------------------- /apps/webapp/common/content-box.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@redplanethq/ui'; 2 | import { observer } from 'mobx-react-lite'; 3 | 4 | interface ContentBoxProps { 5 | children: React.ReactNode; 6 | className?: string; 7 | } 8 | 9 | export const ContentBox = observer( 10 | ({ children, className }: ContentBoxProps) => { 11 | return ( 12 |
15 |
16 | {children} 17 |
18 |
19 | ); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/add-task-selector/index.ts: -------------------------------------------------------------------------------- 1 | export * from './add-task-selector'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/drag-handler/index.ts: -------------------------------------------------------------------------------- 1 | export * from './drag-handler'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/editor-context.tsx: -------------------------------------------------------------------------------- 1 | import type { Source } from '@sol/types'; 2 | 3 | import React from 'react'; 4 | 5 | interface EditorContextType { 6 | source: Source; 7 | date?: Date; 8 | } 9 | 10 | export const EditorContext = React.createContext(undefined); 11 | 12 | export const EditorContextProvider = ({ 13 | source, 14 | date, 15 | children, 16 | }: { 17 | source: Source; 18 | date?: Date; 19 | children: React.ReactNode; 20 | }) => { 21 | return ( 22 | 23 | {children} 24 | 25 | ); 26 | }; 27 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/file-extension/index.ts: -------------------------------------------------------------------------------- 1 | export * from './file-extension'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/generative/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generative-menu-switch'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/image-extension/index.ts: -------------------------------------------------------------------------------- 1 | export * from './image-extension'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/index.ts: -------------------------------------------------------------------------------- 1 | export * from './editor'; 2 | export * from './selectors'; 3 | export * from './utils'; 4 | export * from './utils/index'; 5 | export * from './slash-command'; 6 | export * from './markdown'; 7 | export * from './socket-utils'; 8 | export * from './editor-extensions'; 9 | export * from './add-task-selector'; 10 | export * from './editor-context'; 11 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/link-task/index.ts: -------------------------------------------------------------------------------- 1 | export * from './link-task'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/link-task/link-task.ts: -------------------------------------------------------------------------------- 1 | import Mention from '@tiptap/extension-mention'; 2 | import { PluginKey } from '@tiptap/pm/state'; 3 | 4 | import { renderItems } from './link-task-utils'; 5 | 6 | export const LinkTaskExtension = Mention.extend({ 7 | namepe: 'linkTask', 8 | }).configure({ 9 | suggestion: { 10 | char: '[[', 11 | pluginKey: new PluginKey('linkTaskSuggestion'), 12 | allowSpaces: true, 13 | items: () => [], 14 | render: renderItems, 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/markdown.tsx: -------------------------------------------------------------------------------- 1 | import Markdown from 'react-markdown'; 2 | 3 | export { Markdown }; 4 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/selectors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './node-selector'; 2 | export * from './text-buttons'; 3 | export * from './link-selector'; 4 | export * from './color-selector'; 5 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/socket-utils.tsx: -------------------------------------------------------------------------------- 1 | import getConfig from 'next/config'; 2 | 3 | const { publicRuntimeConfig } = getConfig(); 4 | 5 | export function getSocketURL() { 6 | return publicRuntimeConfig.NEXT_PUBLIC_NODE_ENV === 'production' 7 | ? `wss://${publicRuntimeConfig.NEXT_PUBLIC_CONTENT_HOST}` 8 | : `ws://${publicRuntimeConfig.NEXT_PUBLIC_CONTENT_HOST}`; 9 | } 10 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/task-extension/index.ts: -------------------------------------------------------------------------------- 1 | export * from './task-extension'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/utils/atoms.ts: -------------------------------------------------------------------------------- 1 | import type { Range } from '@tiptap/core'; 2 | 3 | import { atom } from 'jotai'; 4 | 5 | export const queryAtom = atom(''); 6 | export const rangeAtom = atom(null); 7 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './render-items'; 2 | export * from './command-item'; 3 | -------------------------------------------------------------------------------- /apps/webapp/common/editor/utils/store.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'jotai'; 2 | 3 | export const novelStore = createStore(); 4 | -------------------------------------------------------------------------------- /apps/webapp/common/icon-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from './icon-picker'; 2 | export * from './utils'; 3 | -------------------------------------------------------------------------------- /apps/webapp/common/lib/common.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 2 | export function groupBy>( 3 | arr: T[], 4 | key: keyof T, 5 | ): Map { 6 | const groupedMap = new Map(); 7 | for (const obj of arr) { 8 | const value = obj[key]; 9 | if (value !== undefined) { 10 | const group = groupedMap.get(value); 11 | if (group) { 12 | group.push(obj); 13 | } else { 14 | groupedMap.set(value, [obj]); 15 | } 16 | } 17 | } 18 | return groupedMap; 19 | } 20 | -------------------------------------------------------------------------------- /apps/webapp/common/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './react-query-client'; 2 | export * from './config'; 3 | export * from './common'; 4 | -------------------------------------------------------------------------------- /apps/webapp/common/lib/react-query-client.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from 'next/router'; 2 | import * as React from 'react'; 3 | import { QueryCache, QueryClient } from 'react-query'; 4 | 5 | export const useGetQueryClient = () => { 6 | const router = useRouter(); 7 | 8 | return React.useRef( 9 | new QueryClient({ 10 | queryCache: new QueryCache({ 11 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 12 | onError: (error: any) => { 13 | if (error?.resStatus === 403) { 14 | // global intercept 403 and redirect to home page 15 | router.push('/'); 16 | } 17 | }, 18 | }), 19 | }), 20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /apps/webapp/common/logo/dynamic-logo.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic'; 2 | 3 | export const Logo = dynamic(() => import('./logo'), { 4 | ssr: false, 5 | }); 6 | -------------------------------------------------------------------------------- /apps/webapp/common/logo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dynamic-logo'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/shortcut-scopes.ts: -------------------------------------------------------------------------------- 1 | export enum SCOPES { 2 | Global = 'global', 3 | Search = 'search', 4 | Task = 'task', 5 | Tasks = 'tasks', 6 | List = 'list', 7 | AI = 'ai', 8 | 9 | // view 10 | ASSISTANT = 'ASSISTANT', 11 | } 12 | 13 | export const FRONTEND_IPC = 'frontend'; 14 | -------------------------------------------------------------------------------- /apps/webapp/common/shortcut.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@redplanethq/ui'; 2 | 3 | interface ShortcutProps { 4 | shortcut: string; 5 | className?: string; 6 | } 7 | 8 | export const Shortcut = ({ shortcut, className }: ShortcutProps) => { 9 | return ( 10 | 11 | {shortcut} 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /apps/webapp/common/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeProvider as NextThemesProvider } from 'next-themes'; 2 | import { type ThemeProviderProps } from 'next-themes/dist/types'; 3 | 4 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 5 | return {children}; 6 | } 7 | -------------------------------------------------------------------------------- /apps/webapp/common/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tooltip-wrapper'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/types/activity.ts: -------------------------------------------------------------------------------- 1 | export interface ActivityType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | 6 | text: string; 7 | sourceURL?: string; 8 | 9 | conversationId?: string; 10 | 11 | taskId?: string; 12 | workspaceId: string; 13 | integrationAccountId?: string; 14 | } 15 | -------------------------------------------------------------------------------- /apps/webapp/common/types/agent-worklog.ts: -------------------------------------------------------------------------------- 1 | export interface AgentWorklogType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | modelName: string; 6 | modelId: string; 7 | state: string; 8 | type: string; 9 | workspaceId: string; 10 | } 11 | -------------------------------------------------------------------------------- /apps/webapp/common/types/automation.ts: -------------------------------------------------------------------------------- 1 | export interface AutomationType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | 6 | mcps: string[]; 7 | integrationAccountIds: string[]; 8 | 9 | text: string; 10 | usedCount: number; 11 | workspaceId: string; 12 | } 13 | -------------------------------------------------------------------------------- /apps/webapp/common/types/conversation.ts: -------------------------------------------------------------------------------- 1 | import type { UserType } from '@sol/types'; 2 | 3 | export interface ConversationType { 4 | id: string; 5 | createdAt: string; 6 | updatedAt: string; 7 | 8 | status: string; 9 | title: string; 10 | userId: string; 11 | workspaceId: string; 12 | 13 | pageId?: string; 14 | taskId?: string; 15 | 16 | unread: boolean; 17 | } 18 | 19 | export interface ConversationHistoryType { 20 | id: string; 21 | createdAt: string; 22 | updatedAt: string; 23 | 24 | activityId?: string; 25 | message: string; 26 | userType: UserType; 27 | context: string; 28 | thoughts: string; 29 | userId?: string; 30 | conversationId: string; 31 | } 32 | -------------------------------------------------------------------------------- /apps/webapp/common/types/data-loader.ts: -------------------------------------------------------------------------------- 1 | const enum Action { 2 | 'I' = 'I', 3 | 'U' = 'U', 4 | 'D' = 'D', 5 | } 6 | 7 | export interface SyncActionRecord { 8 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 9 | data: any; 10 | 11 | modelName: string; 12 | modelId: string; 13 | action: Action; 14 | workspaceId: string; 15 | sequenceId: string; 16 | } 17 | 18 | export interface BootstrapResponse { 19 | syncActions: SyncActionRecord[]; 20 | lastSequenceId: string; 21 | } 22 | -------------------------------------------------------------------------------- /apps/webapp/common/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './data-loader'; 2 | export * from './integration-account'; 3 | export * from './integration-definition'; 4 | export * from './workspace'; 5 | export * from './user'; 6 | export * from './page'; 7 | export * from './status'; 8 | export * from './activity'; 9 | export * from './task'; 10 | export * from './conversation'; 11 | export * from './list'; 12 | export * from './task-occurrence'; 13 | export * from './automation'; 14 | export * from './agent-worklog'; 15 | -------------------------------------------------------------------------------- /apps/webapp/common/types/list.ts: -------------------------------------------------------------------------------- 1 | export interface ListType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | pageId: string; 6 | favourite: boolean; 7 | icon?: string; 8 | } 9 | -------------------------------------------------------------------------------- /apps/webapp/common/types/page.ts: -------------------------------------------------------------------------------- 1 | export interface PageType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | archived: string; 6 | title: string | null; 7 | description: string | null; 8 | sortOrder: string; 9 | workspaceId: string; 10 | parentId: string | null; 11 | 12 | type: string; 13 | } 14 | -------------------------------------------------------------------------------- /apps/webapp/common/types/status.ts: -------------------------------------------------------------------------------- 1 | export interface StatusType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | name: string; 6 | position: number; 7 | description?: string; 8 | color: string; 9 | workspaceId: string; 10 | } 11 | -------------------------------------------------------------------------------- /apps/webapp/common/types/task-occurrence.ts: -------------------------------------------------------------------------------- 1 | export interface TaskOccurrenceType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | startTime?: string; 6 | endTime?: string; 7 | status?: string; 8 | workspaceId: string; 9 | taskId: string; 10 | } 11 | -------------------------------------------------------------------------------- /apps/webapp/common/types/task.ts: -------------------------------------------------------------------------------- 1 | export interface TaskType { 2 | id: string; 3 | number: number; 4 | createdAt: string; 5 | updatedAt: string; 6 | completedAt?: string; 7 | startTime: string; 8 | dueDate?: string; 9 | endTime: string; 10 | recurrence: string[]; 11 | scheduleText?: string; 12 | status: string; 13 | metadata: string; 14 | workspaceId: string; 15 | pageId: string; 16 | source: string; 17 | listId?: string; 18 | parentId?: string; 19 | integrationAccountId?: string; 20 | } 21 | -------------------------------------------------------------------------------- /apps/webapp/common/types/user.ts: -------------------------------------------------------------------------------- 1 | interface Workspace { 2 | name: string; 3 | slug: string; 4 | icon: string; 5 | id: string; 6 | preferences?: { 7 | timezone?: string; 8 | scheduleId?: string; 9 | autonomy?: number; 10 | tone?: number; 11 | playfulness?: number; 12 | 13 | memory_host?: string; 14 | memory_api_key?: string; 15 | }; 16 | } 17 | 18 | export interface User { 19 | fullname: string; 20 | email: string; 21 | id: string; 22 | username: string; 23 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 24 | mcp: any; 25 | workspace: Workspace; 26 | image?: string; 27 | } 28 | -------------------------------------------------------------------------------- /apps/webapp/common/types/workspace.ts: -------------------------------------------------------------------------------- 1 | export interface WorkspaceType { 2 | id: string; 3 | createdAt: string; 4 | updatedAt: string; 5 | slug: string; 6 | name: string; 7 | userId: string; 8 | } 9 | -------------------------------------------------------------------------------- /apps/webapp/common/user-avatar.tsx: -------------------------------------------------------------------------------- 1 | import type { User } from './types'; 2 | 3 | import { AvatarText, cn } from '@redplanethq/ui'; 4 | 5 | interface UserAvatarProps { 6 | user: User; 7 | showFull?: boolean; 8 | className?: string; 9 | } 10 | 11 | export function UserAvatar({ 12 | user, 13 | showFull = false, 14 | className, 15 | }: UserAvatarProps) { 16 | if (!user) { 17 | return null; 18 | } 19 | 20 | return ( 21 |
22 | 23 | 24 | {showFull && <> {user.fullname}} 25 |
26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /apps/webapp/common/virtualized-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './scroll-managed-list'; 2 | -------------------------------------------------------------------------------- /apps/webapp/common/wrappers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth-guard'; 2 | export * from './database-wrapper'; 3 | export * from './user-data-wrapper'; 4 | -------------------------------------------------------------------------------- /apps/webapp/electron.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare global { 3 | interface Window { 4 | electron: { 5 | // Add specific methods or properties you expose to the renderer 6 | ipcRenderer: { 7 | sendMessage(channel: string, ...args: any[]): void; 8 | on( 9 | channel: string, 10 | listener: (event: any, ...args: any[]) => void, 11 | ): void; 12 | once( 13 | channel: string, 14 | listener: (event: any, ...args: any[]) => void, 15 | ): void; 16 | }; 17 | }; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/webapp/hooks/application/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-application'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/application/use-tab.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { useContextStore } from 'store/global-context-provider'; 4 | import { TabContext } from 'store/tab-context'; 5 | 6 | export const useTab = () => { 7 | const tabContext = React.useContext(TabContext); 8 | const { applicationStore } = useContextStore(); 9 | const tabGroup = applicationStore.getTabGroup(); 10 | 11 | return { tab: tabGroup.tabs.find((tab) => tab.id === tabContext.tabId) }; 12 | }; 13 | -------------------------------------------------------------------------------- /apps/webapp/hooks/conversations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-conversation-history'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/integration/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-integration-from-account'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/ipc/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-ipc'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-lists'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-page'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/pages/use-page.tsx: -------------------------------------------------------------------------------- 1 | import type { PageType } from 'common/types'; 2 | 3 | import { useContextStore } from 'store/global-context-provider'; 4 | 5 | export function usePage(pageId: string): PageType { 6 | const { pagesStore } = useContextStore(); 7 | 8 | return pagesStore.getPageWithId(pageId); 9 | } 10 | -------------------------------------------------------------------------------- /apps/webapp/hooks/use-is-electron.tsx: -------------------------------------------------------------------------------- 1 | export const useIsElectron = () => { 2 | if (typeof window === 'undefined') { 3 | return false; 4 | } 5 | 6 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 7 | return (window as any)?.electron; 8 | }; 9 | -------------------------------------------------------------------------------- /apps/webapp/hooks/use-scope.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useHotkeysContext } from 'react-hotkeys-hook'; 3 | 4 | export function useScope(scope: string) { 5 | const { enableScope, disableScope } = useHotkeysContext(); 6 | 7 | React.useEffect(() => { 8 | enableScope(scope); 9 | 10 | return () => { 11 | disableScope(scope); 12 | }; 13 | // eslint-disable-next-line react-hooks/exhaustive-deps 14 | }, []); 15 | } 16 | -------------------------------------------------------------------------------- /apps/webapp/hooks/workspace/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-workspace'; 2 | -------------------------------------------------------------------------------- /apps/webapp/hooks/workspace/use-workspace.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { UserContext } from 'store/user-context'; 4 | 5 | export function useWorkspace() { 6 | const user = React.useContext(UserContext); 7 | 8 | return user.workspace; 9 | } 10 | -------------------------------------------------------------------------------- /apps/webapp/icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hevy'; 2 | export * from './gmail'; 3 | export * from './claude'; 4 | -------------------------------------------------------------------------------- /apps/webapp/icons/types.tsx: -------------------------------------------------------------------------------- 1 | export interface IconProps { 2 | size?: number; 3 | className?: string; 4 | color?: string; 5 | onClick?: (event: MouseEvent) => void; 6 | } 7 | -------------------------------------------------------------------------------- /apps/webapp/layouts/app-layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-layout'; 2 | export * from './navigation'; 3 | -------------------------------------------------------------------------------- /apps/webapp/layouts/right-side-layout/index.ts: -------------------------------------------------------------------------------- 1 | export * from './right-side-layout'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './layout'; 2 | export * from './auth'; 3 | export * from './verify'; 4 | export * from './authorize'; 5 | -------------------------------------------------------------------------------- /apps/webapp/modules/auth/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | 3 | import { Logo } from 'common/logo'; 4 | 5 | interface Props { 6 | children: React.ReactNode; 7 | } 8 | 9 | export function AuthLayout(props: Props): ReactElement { 10 | const { children } = props; 11 | 12 | return ( 13 |
14 |
15 | 16 |
SOL
17 |
18 | 19 |
20 | {children} 21 |
22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /apps/webapp/modules/conversation/conversation-context.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | interface ConversationContextInterface { 4 | conversationHistoryId: string; 5 | 6 | // Used just in streaming 7 | streaming?: boolean; 8 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 9 | actionMessages?: Record; 10 | } 11 | 12 | export const ConversationContext = 13 | React.createContext(undefined); 14 | -------------------------------------------------------------------------------- /apps/webapp/modules/conversation/conversation-utils.ts: -------------------------------------------------------------------------------- 1 | export interface TaskType { 2 | state: 'Pending' | 'Done'; 3 | id: string; 4 | } 5 | -------------------------------------------------------------------------------- /apps/webapp/modules/conversation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './conversation'; 2 | export * from './header-actions'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/conversation/resource/index.ts: -------------------------------------------------------------------------------- 1 | export * from './resource'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/conversation/skill-extension/index.ts: -------------------------------------------------------------------------------- 1 | export * from './skill-extension'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/dialog-views-provider/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dialog-views-provider'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/dialog-views-provider/types.ts: -------------------------------------------------------------------------------- 1 | export enum DialogType { 2 | SCHEDULE = 'schedule', 3 | DUEDATE = 'due-date', 4 | } 5 | -------------------------------------------------------------------------------- /apps/webapp/modules/editor/types.ts: -------------------------------------------------------------------------------- 1 | export interface SkillComponentType { 2 | streaming?: boolean; 3 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 4 | actionStream: { isStreaming: boolean; content: any[] }; 5 | id: string; 6 | agent: string; 7 | name: string; 8 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 9 | actionData?: any; 10 | } 11 | -------------------------------------------------------------------------------- /apps/webapp/modules/home/index.ts: -------------------------------------------------------------------------------- 1 | export * from './home'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/inbox/index.ts: -------------------------------------------------------------------------------- 1 | export * from './assistant'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/inbox/today-view.tsx: -------------------------------------------------------------------------------- 1 | import { observer } from 'mobx-react-lite'; 2 | 3 | import { TaskListItem } from 'modules/tasks/task-item'; 4 | 5 | interface TodayViewProps { 6 | taskIds: string[]; 7 | } 8 | 9 | export const TodayView = observer(({ taskIds }: TodayViewProps) => { 10 | return ( 11 |
12 |

Today tasks

13 | 14 | {taskIds.map((taskId, index) => ( 15 | 16 | ))} 17 |
18 | ); 19 | }); 20 | -------------------------------------------------------------------------------- /apps/webapp/modules/instructions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './instructions'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/instructions/instructions.tsx: -------------------------------------------------------------------------------- 1 | import { observer } from 'mobx-react-lite'; 2 | 3 | export const Instructions = observer(() => { 4 | return

Instructions

; 5 | }); 6 | -------------------------------------------------------------------------------- /apps/webapp/modules/integrations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './integrations'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/lists/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lists'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/lists/onboarding-highlight.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@redplanethq/ui'; 2 | import React from 'react'; 3 | 4 | interface OnboardingHighlightProps { 5 | children: React.ReactNode; 6 | className?: string; 7 | highlight?: boolean; 8 | } 9 | 10 | export function OnboardingHighlight({ 11 | children, 12 | className, 13 | highlight = false, 14 | }: OnboardingHighlightProps) { 15 | return ( 16 |
23 | {children} 24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /apps/webapp/modules/onboarding/index.ts: -------------------------------------------------------------------------------- 1 | export * from './onboarding'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/quick/index.ts: -------------------------------------------------------------------------------- 1 | export * from './quick'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/quick/quick.tsx: -------------------------------------------------------------------------------- 1 | import { AllProviders } from 'common/wrappers/all-providers'; 2 | 3 | import { useGetIntegrationDefinitions } from 'services/integration-definition'; 4 | 5 | import { QuickEditor } from './quick-editor'; 6 | 7 | export const Quick = () => { 8 | const { isLoading } = useGetIntegrationDefinitions(); 9 | 10 | return ( 11 |
12 | {!isLoading && } 13 |
14 | ); 15 | }; 16 | 17 | Quick.getLayout = function getLayout(page: React.ReactElement) { 18 | return {page}; 19 | }; 20 | -------------------------------------------------------------------------------- /apps/webapp/modules/search/command/index.ts: -------------------------------------------------------------------------------- 1 | export * from './command'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/search/index.ts: -------------------------------------------------------------------------------- 1 | export * from './search'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/automations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './automations'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/history/index.ts: -------------------------------------------------------------------------------- 1 | export * from './history'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './settings'; 2 | export * from './settings-provider'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/integrations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './integrations'; 2 | export * from './integration'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/integrations/integration-util.tsx: -------------------------------------------------------------------------------- 1 | import type { IntegrationAccountType } from 'common/types'; 2 | 3 | import { useContextStore } from 'store/global-context-provider'; 4 | 5 | export function useIntegrationAccount( 6 | integrationDefinitionId: string, 7 | ): IntegrationAccountType | undefined { 8 | const { 9 | integrationAccountsStore: { integrationAccounts: allIntegrationAccounts }, 10 | } = useContextStore(); 11 | 12 | const integrationAccount = allIntegrationAccounts.find( 13 | (integrationAccount: IntegrationAccountType) => { 14 | return ( 15 | integrationAccount.integrationDefinitionId === integrationDefinitionId 16 | ); 17 | }, 18 | ); 19 | 20 | return integrationAccount; 21 | } 22 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/json-editor/index.ts: -------------------------------------------------------------------------------- 1 | import dynamic from 'next/dynamic'; 2 | 3 | export const JSONEditor = dynamic( 4 | () => import('./json-editor').then((mod) => ({ default: mod.JSONEditor })), 5 | { 6 | ssr: false, 7 | }, 8 | ); 9 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/memory/index.ts: -------------------------------------------------------------------------------- 1 | export * from './memory'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/settings/settings-provider.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from 'next/router'; 2 | 3 | export const useSettings = () => { 4 | const router = useRouter(); 5 | 6 | const openSettings = (page?: string) => { 7 | router.push({ 8 | pathname: '/settings', 9 | query: { ...router.query, settings: page }, 10 | }); 11 | }; 12 | 13 | return { 14 | openSettings, 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/action-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action-bar'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/filters/filter-utils.ts: -------------------------------------------------------------------------------- 1 | import type { FiltersModelType } from 'store/application'; 2 | 3 | export function isEmpty(filters: FiltersModelType) { 4 | if (Object.keys(filters).length === 0) { 5 | return true; 6 | } 7 | 8 | let isEmpty = true; 9 | Object.keys(filters).forEach((key: keyof FiltersModelType) => { 10 | if (filters[key] !== undefined) { 11 | isEmpty = false; 12 | } 13 | }); 14 | 15 | return isEmpty; 16 | } 17 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/filters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './filters'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/filters/view-option-item.tsx: -------------------------------------------------------------------------------- 1 | import { Switch } from '@redplanethq/ui'; 2 | 3 | interface ViewOptionItemProps { 4 | id: string; 5 | checked: boolean; 6 | onCheckedChange: (value: boolean) => void; 7 | text: string; 8 | } 9 | 10 | export function ViewOptionItem({ 11 | id, 12 | checked, 13 | onCheckedChange, 14 | text, 15 | }: ViewOptionItemProps) { 16 | return ( 17 |
18 |
19 | 20 |
21 |
{text}
22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/group-view/schedule/index.ts: -------------------------------------------------------------------------------- 1 | export * from './schedule-list'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/group-view/status/index.ts: -------------------------------------------------------------------------------- 1 | export * from './status-list'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tasks'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/assignee.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/webapp/modules/tasks/metadata/assignee.tsx -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/dropdown-item.tsx: -------------------------------------------------------------------------------- 1 | import { CommandItem } from '@redplanethq/ui'; 2 | 3 | interface DropdownItemProps { 4 | id: string | number; 5 | value: string; 6 | onSelect: (value: string | number) => void; 7 | index: number; 8 | children: React.ReactElement; 9 | } 10 | 11 | export function DropdownItem({ 12 | id, 13 | value, 14 | onSelect, 15 | children, 16 | }: DropdownItemProps) { 17 | return ( 18 | onSelect(id)}> 19 |
20 |
{children}
21 |
22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/due-date/index.ts: -------------------------------------------------------------------------------- 1 | export * from './due-date-dropdown'; 2 | export * from './due-date-dialog'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/index.ts: -------------------------------------------------------------------------------- 1 | export * from './schedule'; 2 | export * from './status'; 3 | export * from './dropdown-item'; 4 | export * from './list'; 5 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/list/filters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './list-dropdown'; 2 | export * from './list-filter'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './list-dropdown-content'; 2 | export * from './filters'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/list/list-dropdown.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/webapp/modules/tasks/metadata/list/list-dropdown.tsx -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/schedule/index.ts: -------------------------------------------------------------------------------- 1 | export * from './schedule-dropdown'; 2 | export * from './schedule-dialog'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/status/filters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './status-dropdown'; 2 | export * from './status-filter'; 3 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/status/index.ts: -------------------------------------------------------------------------------- 1 | export * from './status-dropdown'; 2 | export * from './status-dropdown-content'; 3 | export * from './status-utils'; 4 | export * from './filters'; 5 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/metadata/sub-tasks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sub-tasks'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/single-task/due-date/index.ts: -------------------------------------------------------------------------------- 1 | export * from './due-date'; 2 | -------------------------------------------------------------------------------- /apps/webapp/modules/tasks/single-task/index.ts: -------------------------------------------------------------------------------- 1 | export * from './single-task'; 2 | -------------------------------------------------------------------------------- /apps/webapp/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { GeistMono } from 'geist/font/mono'; 2 | import { GeistSans } from 'geist/font/sans'; 3 | import { Html, Head, Main, NextScript } from 'next/document'; 4 | 5 | export default function Document() { 6 | return ( 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /apps/webapp/pages/auth/auth-old/index.tsx: -------------------------------------------------------------------------------- 1 | import { AuthEmail } from 'modules/auth/auth-email'; 2 | 3 | export default AuthEmail; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/auth/google/index.tsx: -------------------------------------------------------------------------------- 1 | import { Google } from 'modules/auth/google'; 2 | 3 | export default Google; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/auth/index.tsx: -------------------------------------------------------------------------------- 1 | import { Auth } from 'modules/auth'; 2 | 3 | export default Auth; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/auth/verify/index.tsx: -------------------------------------------------------------------------------- 1 | import { Verify } from 'modules/auth'; 2 | 3 | export default Verify; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/authorize/index.tsx: -------------------------------------------------------------------------------- 1 | import { Authorize } from 'modules/auth/authorize'; 2 | 3 | export default Authorize; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/home/index.tsx: -------------------------------------------------------------------------------- 1 | import { HomeWrapper } from 'modules/home'; 2 | 3 | export default HomeWrapper; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { RedirectHome } from 'modules/redirect-home'; 2 | 3 | export default RedirectHome; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/integrations/index.tsx: -------------------------------------------------------------------------------- 1 | import { Integrations } from 'modules/integrations'; 2 | 3 | export default Integrations; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/onboarding/index.tsx: -------------------------------------------------------------------------------- 1 | import { Onboarding } from 'modules/onboarding'; 2 | 3 | export default Onboarding; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/quick/index.tsx: -------------------------------------------------------------------------------- 1 | import { Quick } from 'modules/quick'; 2 | 3 | export default Quick; 4 | -------------------------------------------------------------------------------- /apps/webapp/pages/settings/index.tsx: -------------------------------------------------------------------------------- 1 | import { Settings } from 'modules/settings'; 2 | 3 | export default Settings; 4 | -------------------------------------------------------------------------------- /apps/webapp/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/webapp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/webapp/public/favicon.ico -------------------------------------------------------------------------------- /apps/webapp/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/webapp/public/logo.png -------------------------------------------------------------------------------- /apps/webapp/remote-component.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Dependencies for Remote Components 3 | */ 4 | 5 | import * as React from 'react'; 6 | import * as ReactDOM from 'react-dom'; 7 | import * as TegonUI from '@redplanethq/ui'; 8 | import * as ReactQuery from 'react-query'; 9 | import axios from 'axios'; 10 | 11 | const resolve = { 12 | react: React, 13 | 'react-dom': ReactDOM, 14 | '@redplanethq/ui': TegonUI, 15 | axios, 16 | 'react-query': ReactQuery, 17 | }; 18 | 19 | export { resolve }; 20 | -------------------------------------------------------------------------------- /apps/webapp/services/automation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-automation'; 2 | export * from './delete-automation'; 3 | export * from './update-automation'; 4 | -------------------------------------------------------------------------------- /apps/webapp/services/conversations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-conversation'; 2 | export * from './get-conversation-history-action'; 3 | export * from './get-current-conversation'; 4 | export * from './read-conversation'; 5 | export * from './stop-conversation'; 6 | -------------------------------------------------------------------------------- /apps/webapp/services/integration-account/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-integration-account'; 2 | -------------------------------------------------------------------------------- /apps/webapp/services/integration-definition/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-integration-definitions'; 2 | export * from './get-integration-definition'; 3 | -------------------------------------------------------------------------------- /apps/webapp/services/lists/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-list'; 2 | export * from './update-list'; 3 | export * from './delete-list'; 4 | -------------------------------------------------------------------------------- /apps/webapp/services/oauth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './delete-oauth-account'; 2 | export * from './create-redirect-url'; 3 | -------------------------------------------------------------------------------- /apps/webapp/services/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-page'; 2 | export * from './update-page'; 3 | -------------------------------------------------------------------------------- /apps/webapp/services/sync/index.ts: -------------------------------------------------------------------------------- 1 | export * from './delta-sync'; 2 | export * from './bootstrap-sync'; 3 | -------------------------------------------------------------------------------- /apps/webapp/services/task-occurrence/index.ts: -------------------------------------------------------------------------------- 1 | export * from './delete-all-task-occurrences'; 2 | export * from './delete-task-occurrence'; 3 | export * from './update-task-occurrences'; 4 | export * from './create-task-occurrence'; 5 | export * from './update-single-task-occurrence'; 6 | -------------------------------------------------------------------------------- /apps/webapp/services/tasks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './add-task'; 2 | export * from './update-task'; 3 | export * from './get-task-schedule'; 4 | export * from './delete-task'; 5 | export * from './add-task-duedate'; 6 | -------------------------------------------------------------------------------- /apps/webapp/services/users/get-pats.ts: -------------------------------------------------------------------------------- 1 | import type { Pat } from '@sol/types'; 2 | 3 | import { getPats } from '@sol/services'; 4 | import { type UseQueryResult, useQuery } from 'react-query'; 5 | 6 | import { type XHRErrorResponse } from 'services/utils'; 7 | 8 | /** 9 | * Query Key for Get user. 10 | */ 11 | export const GetPats = 'getPats'; 12 | 13 | export function useGetPatsQuery(): UseQueryResult { 14 | return useQuery([GetPats], () => getPats(), { 15 | retry: 1, 16 | staleTime: 1, 17 | refetchOnWindowFocus: false, // Frequency of Change would be Low 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /apps/webapp/services/users/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-user'; 2 | export * from './update-user'; 3 | export * from './delete-pat'; 4 | export * from './authorize'; 5 | export * from './create-auth-code'; 6 | -------------------------------------------------------------------------------- /apps/webapp/services/utils/common.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks whether the function is being invoked in Server or Client. 3 | * @returns True if this function is beinvoked in Next Server, False if it is in browser. 4 | */ 5 | export function isServer() { 6 | return typeof window === 'undefined'; 7 | } 8 | 9 | /** 10 | * Checks whether the application is running in an Electron environment. 11 | * @returns True if running in Electron, False otherwise. 12 | */ 13 | export function isElectron() { 14 | if (typeof window === 'undefined') { 15 | return false; 16 | } 17 | 18 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 19 | return !!(window as any)?.electron; 20 | } 21 | -------------------------------------------------------------------------------- /apps/webapp/services/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common'; 2 | export * from './error'; 3 | -------------------------------------------------------------------------------- /apps/webapp/services/workspace/index.ts: -------------------------------------------------------------------------------- 1 | export * from './update-workspace'; 2 | export * from './create-initial-resources'; 3 | -------------------------------------------------------------------------------- /apps/webapp/store/activity/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/activity/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const Activity = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | 8 | text: types.string, 9 | sourceURL: types.union(types.undefined, types.null, types.string), 10 | taskId: types.union(types.undefined, types.null, types.string), 11 | integrationAccountId: types.union(types.undefined, types.null, types.string), 12 | rejectReason: types.union(types.undefined, types.null, types.string), 13 | conversationId: types.union(types.undefined, types.null, types.string), 14 | 15 | workspaceId: types.string, 16 | }); 17 | -------------------------------------------------------------------------------- /apps/webapp/store/agent-worklog/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/agent-worklog/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const AgentWorklog = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | 8 | modelName: types.string, 9 | modelId: types.string, 10 | state: types.string, 11 | type: types.string, 12 | workspaceId: types.string, 13 | }); 14 | -------------------------------------------------------------------------------- /apps/webapp/store/application/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /apps/webapp/store/automation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/automation/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const Automation = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | 8 | text: types.string, 9 | mcps: types.array(types.string), 10 | integrationAccountIds: types.array(types.string), 11 | usedCount: types.number, 12 | taskId: types.union(types.undefined, types.null, types.string), 13 | 14 | workspaceId: types.string, 15 | }); 16 | -------------------------------------------------------------------------------- /apps/webapp/store/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | -------------------------------------------------------------------------------- /apps/webapp/store/conversation-history/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/conversations/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/history/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | -------------------------------------------------------------------------------- /apps/webapp/store/integration-accounts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/integration-accounts/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const IntegrationAccount = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | accountId: types.string, 8 | settings: types.union(types.string, types.undefined), 9 | integratedById: types.string, 10 | integrationDefinitionId: types.string, 11 | workspaceId: types.string, 12 | }); 13 | -------------------------------------------------------------------------------- /apps/webapp/store/lists/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/lists/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const List = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | 8 | pageId: types.string, 9 | icon: types.union(types.undefined, types.null, types.string), 10 | 11 | // v2 12 | favourite: types.union(types.undefined, types.boolean), 13 | }); 14 | -------------------------------------------------------------------------------- /apps/webapp/store/models.ts: -------------------------------------------------------------------------------- 1 | export enum MODELS { 2 | Workspace = 'Workspace', 3 | 4 | IntegrationAccount = 'IntegrationAccount', 5 | Page = 'Page', 6 | Task = 'Task', 7 | Automation = 'Automation', 8 | TaskOccurrence = 'TaskOccurrence', 9 | Conversation = 'Conversation', 10 | ConversationHistory = 'ConversationHistory', 11 | List = 'List', 12 | 13 | AgentWorklog = 'AgentWorklog', 14 | Activity = 'Activity', 15 | } 16 | -------------------------------------------------------------------------------- /apps/webapp/store/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/pages/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const Page = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | archived: types.union(types.null, types.string), 8 | 9 | title: types.union(types.null, types.string), 10 | description: types.union(types.null, types.string), 11 | sortOrder: types.string, 12 | 13 | parentId: types.union(types.null, types.string), 14 | workspaceId: types.string, 15 | tags: types.array(types.string), 16 | type: types.enumeration(['Default', 'Daily', 'List', 'Context']), 17 | }); 18 | -------------------------------------------------------------------------------- /apps/webapp/store/tab-context.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const TabContext = React.createContext<{ tabId: string }>({ 4 | tabId: undefined, 5 | }); // Create TabContext 6 | -------------------------------------------------------------------------------- /apps/webapp/store/task-occurrences/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/task-occurrences/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const TaskOccurrence = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | 8 | startTime: types.union(types.null, types.string), 9 | endTime: types.union(types.null, types.string), 10 | status: types.union(types.null, types.string), 11 | 12 | taskId: types.string, 13 | workspaceId: types.string, 14 | }); 15 | 16 | export const TaskOccurrenceArray = types.array(TaskOccurrence); 17 | -------------------------------------------------------------------------------- /apps/webapp/store/tasks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/user-context.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import type { User } from 'common/types'; 4 | 5 | export const UserContext = React.createContext(undefined); 6 | -------------------------------------------------------------------------------- /apps/webapp/store/workspace/index.ts: -------------------------------------------------------------------------------- 1 | export * from './models'; 2 | export * from './store'; 3 | export * from './save-data'; 4 | -------------------------------------------------------------------------------- /apps/webapp/store/workspace/models.ts: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export const Workspace = types.model({ 4 | id: types.string, 5 | createdAt: types.string, 6 | updatedAt: types.string, 7 | name: types.string, 8 | slug: types.string, 9 | userId: types.string, 10 | }); 11 | -------------------------------------------------------------------------------- /apps/webapp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/next.json", 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "plugins": [ 6 | { 7 | "name": "next" 8 | } 9 | ] 10 | }, 11 | "include": [ 12 | "next-env.d.ts", 13 | "next.d.ts", 14 | "electron.d.ts", 15 | "**/*.ts", 16 | "**/*.tsx", 17 | ".next/types/**/*.ts", 18 | "build/types/**/*.ts", 19 | "remote-component.config.js", 20 | "next.config.js" 21 | ], 22 | "exclude": ["node_modules", "src/pages/api/**.js"] 23 | } 24 | -------------------------------------------------------------------------------- /apps/website/.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/.dockerignore -------------------------------------------------------------------------------- /apps/website/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@sol/eslint-config/next.js'], 4 | parserOptions: { 5 | project: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /apps/website/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | 25 | # local env files 26 | .env*.local 27 | 28 | # vercel 29 | .vercel 30 | 31 | # typescript 32 | *.tsbuildinfo 33 | next-env.d.ts 34 | 35 | # Sentry Config File 36 | .sentryclirc 37 | 38 | # next-video 39 | videos/* 40 | !videos/*.json 41 | !videos/*.js 42 | !videos/*.ts 43 | public/_next-video 44 | -------------------------------------------------------------------------------- /apps/website/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /apps/website/common/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeProvider as NextThemesProvider } from 'next-themes'; 2 | import { type ThemeProviderProps } from 'next-themes/dist/types'; 3 | 4 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 5 | return {children}; 6 | } 7 | -------------------------------------------------------------------------------- /apps/website/next.config.js: -------------------------------------------------------------------------------- 1 | const { withNextVideo } = require('next-video/process'); 2 | 3 | module.exports = withNextVideo({ 4 | reactStrictMode: false, 5 | experimental: { 6 | scrollRestoration: true, 7 | }, 8 | transpilePackages: ['geist', '@redplanethq/ui', 'react-tweet'], 9 | devIndicators: { 10 | buildActivityPosition: 'bottom-right', 11 | }, 12 | swcMinify: true, 13 | output: 'export', 14 | images: { 15 | unoptimized: true, 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /apps/website/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/website/public/busy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/busy.png -------------------------------------------------------------------------------- /apps/website/public/command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/command.png -------------------------------------------------------------------------------- /apps/website/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/favicon.ico -------------------------------------------------------------------------------- /apps/website/public/footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/footer.png -------------------------------------------------------------------------------- /apps/website/public/globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/globe.png -------------------------------------------------------------------------------- /apps/website/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/logo.png -------------------------------------------------------------------------------- /apps/website/public/logo_text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/website/public/logo_white_text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /apps/website/public/memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/memory.png -------------------------------------------------------------------------------- /apps/website/public/peer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/peer.png -------------------------------------------------------------------------------- /apps/website/public/sol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/sol.png -------------------------------------------------------------------------------- /apps/website/public/sol_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/apps/website/public/sol_logo.png -------------------------------------------------------------------------------- /apps/website/src/components/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './footer'; 2 | export * from './header'; 3 | export * from './hero'; 4 | export * from './utils'; 5 | -------------------------------------------------------------------------------- /apps/website/src/icons/index.ts: -------------------------------------------------------------------------------- 1 | export * from './gmail'; 2 | -------------------------------------------------------------------------------- /apps/website/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { GeistMono } from 'geist/font/mono'; 2 | import { GeistSans } from 'geist/font/sans'; 3 | import { Html, Head, Main, NextScript } from 'next/document'; 4 | 5 | export default function Document() { 6 | return ( 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /apps/website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/next.json", 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "plugins": [ 6 | { 7 | "name": "next" 8 | } 9 | ] 10 | }, 11 | "include": [ 12 | "video.d.ts", 13 | "next-env.d.ts", 14 | "next.d.ts", 15 | "electron.d.ts", 16 | "**/*.ts", 17 | "**/*.tsx", 18 | ".next/types/**/*.ts", 19 | "build/types/**/*.ts", 20 | "remote-component.config.js", 21 | "next.config.js" 22 | ], 23 | "exclude": ["node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /apps/website/video.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /docs/images/account-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/account-setup.png -------------------------------------------------------------------------------- /docs/images/actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/actions.png -------------------------------------------------------------------------------- /docs/images/checks-passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/checks-passed.png -------------------------------------------------------------------------------- /docs/images/copy-magic-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/copy-magic-link.png -------------------------------------------------------------------------------- /docs/images/default-workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/default-workspace.png -------------------------------------------------------------------------------- /docs/images/docker-running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/docker-running.png -------------------------------------------------------------------------------- /docs/images/enter-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/enter-email.png -------------------------------------------------------------------------------- /docs/images/kanban_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/kanban_view.png -------------------------------------------------------------------------------- /docs/images/list_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/list_view.png -------------------------------------------------------------------------------- /docs/images/sent-magic-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/sent-magic-link.png -------------------------------------------------------------------------------- /docs/images/terminal-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/terminal-view.png -------------------------------------------------------------------------------- /docs/images/views.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/images/views.png -------------------------------------------------------------------------------- /docs/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/docs/logo/logo.png -------------------------------------------------------------------------------- /docs/mcp/usage.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "MCP Usage" 3 | description: "Using MCP in SOL" 4 | --- 5 | 6 | ## Conversational Interactions 7 | 8 | The most common way to use MCP is through SOL's chat interface: 9 | 10 | ``` 11 | User: "Summarize the YouTube video at the link below." 12 | SOL: [Uses MCP to retrieve read, analyse transcript, and presents a brief 13 | summary of the video in a conversational format.] 14 | ``` 15 | 16 | ## Task-Based Interactions 17 | 18 | When working with tasks, MCP helps with: 19 | 20 | ``` 21 | User: "Create tasks from my meeting notes" 22 | SOL: [Uses MCP to analyze notes, identify action items, 23 | create appropriate tasks, and assign metadata] 24 | ``` 25 | -------------------------------------------------------------------------------- /integrations/github/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules -------------------------------------------------------------------------------- /integrations/github/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "bracketSpacing": true, 7 | "jsxBracketSameLine": false, 8 | "requirePragma": false, 9 | "proseWrap": "preserve", 10 | "singleQuote": true, 11 | "formatOnSave": true, 12 | "trailingComma": "all", 13 | "printWidth": 100, 14 | "overrides": [ 15 | { 16 | "files": ".prettierrc", 17 | "options": { 18 | "parser": "json" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /integrations/gmail/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules -------------------------------------------------------------------------------- /integrations/gmail/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "bracketSpacing": true, 7 | "jsxBracketSameLine": false, 8 | "requirePragma": false, 9 | "proseWrap": "preserve", 10 | "singleQuote": true, 11 | "formatOnSave": true, 12 | "trailingComma": "all", 13 | "printWidth": 100, 14 | "overrides": [ 15 | { 16 | "files": ".prettierrc", 17 | "options": { 18 | "parser": "json" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /integrations/hevy/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | 4 | context.json -------------------------------------------------------------------------------- /integrations/hevy/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "bracketSpacing": true, 7 | "jsxBracketSameLine": false, 8 | "requirePragma": false, 9 | "proseWrap": "preserve", 10 | "singleQuote": true, 11 | "formatOnSave": true, 12 | "trailingComma": "all", 13 | "printWidth": 100, 14 | "overrides": [ 15 | { 16 | "files": ".prettierrc", 17 | "options": { 18 | "parser": "json" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /integrations/linear/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "bracketSpacing": true, 7 | "jsxBracketSameLine": false, 8 | "requirePragma": false, 9 | "proseWrap": "preserve", 10 | "singleQuote": true, 11 | "formatOnSave": true, 12 | "trailingComma": "all", 13 | "printWidth": 100, 14 | "overrides": [ 15 | { 16 | "files": ".prettierrc", 17 | "options": { 18 | "parser": "json" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /integrations/linear/backend/index.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationPayloadEventType } from '@redplanethq/sol-sdk'; 2 | 3 | export interface IntegrationEventPayload { 4 | event: IntegrationPayloadEventType; 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 6 | [x: string]: any; 7 | } 8 | 9 | export async function run(eventPayload: IntegrationEventPayload) { 10 | switch (eventPayload.event) { 11 | case IntegrationPayloadEventType.INTEGRATION_ACCOUNT_CREATED: 12 | return {}; 13 | 14 | default: 15 | return { 16 | message: `The event payload type is ${eventPayload.event}`, 17 | }; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /integrations/linear/frontend/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | const components = { 4 | 'create-run': (): React.ReactNode => { 5 | return

asdf

; 6 | }, 7 | }; 8 | 9 | export default components; 10 | -------------------------------------------------------------------------------- /integrations/linear/spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Linear extension", 3 | "key": "linear", 4 | "description": "Plan, track, and manage your agile and software development projects in Linear. Customize your workflow, collaborate, and release great software.", 5 | "icon": "linear", 6 | "auth": { 7 | "OAuth2": { 8 | "token_url": "https://linear.app/oauth/token", 9 | "authorization_url": "https://linear.app/oauth/authorize", 10 | "scopes": [ 11 | "read", 12 | "write" 13 | ], 14 | "scope_separator": " " 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /integrations/slack/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules -------------------------------------------------------------------------------- /integrations/slack/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "bracketSpacing": true, 7 | "jsxBracketSameLine": false, 8 | "requirePragma": false, 9 | "proseWrap": "preserve", 10 | "singleQuote": true, 11 | "formatOnSave": true, 12 | "trailingComma": "all", 13 | "printWidth": 100, 14 | "overrides": [ 15 | { 16 | "files": ".prettierrc", 17 | "options": { 18 | "parser": "json" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /packages/editor-extensions/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ['@redplanethq/eslint-config/internal.js'], 5 | parser: '@typescript-eslint/parser', 6 | rules: { 7 | 'no-redeclare': 'off', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/editor-extensions/.gitignore: -------------------------------------------------------------------------------- 1 | dist -------------------------------------------------------------------------------- /packages/editor-extensions/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /packages/editor-extensions/src/context-mention.ts: -------------------------------------------------------------------------------- 1 | import Mention from '@tiptap/extension-mention'; 2 | import { mergeAttributes } from '@tiptap/react'; 3 | 4 | export const ContextMention = Mention.extend({ 5 | parseHTML() { 6 | return [ 7 | { 8 | tag: 'mention', 9 | }, 10 | ]; 11 | }, 12 | renderHTML({ HTMLAttributes }) { 13 | return [ 14 | 'mention', 15 | mergeAttributes(HTMLAttributes), 16 | HTMLAttributes['data-id'], 17 | HTMLAttributes['data-type'], 18 | ]; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /packages/editor-extensions/src/date-page-extension.ts: -------------------------------------------------------------------------------- 1 | import { mergeAttributes, Node } from '@tiptap/core'; 2 | 3 | export const datePageExtension = Node.create({ 4 | priority: 51, 5 | name: 'datePageExtension', 6 | group: 'inline', 7 | inline: true, 8 | 9 | addAttributes() { 10 | return { 11 | pageId: { 12 | default: undefined, 13 | }, 14 | }; 15 | }, 16 | 17 | parseHTML() { 18 | return [ 19 | { 20 | tag: 'date-page-extension', 21 | }, 22 | ]; 23 | }, 24 | 25 | renderHTML({ HTMLAttributes }) { 26 | return ['date-page-extension', mergeAttributes(HTMLAttributes)]; 27 | }, 28 | }); 29 | -------------------------------------------------------------------------------- /packages/editor-extensions/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './editor-extensions'; 2 | export * from './tiptap.utils'; 3 | -------------------------------------------------------------------------------- /packages/editor-extensions/src/skill-extension.ts: -------------------------------------------------------------------------------- 1 | import { mergeAttributes, Node } from '@tiptap/core'; 2 | 3 | export const skillExtension = Node.create({ 4 | name: 'skill', 5 | group: 'block', 6 | atom: true, 7 | 8 | addAttributes() { 9 | return { 10 | id: { 11 | default: undefined, 12 | }, 13 | name: { 14 | default: undefined, 15 | }, 16 | agent: { 17 | default: undefined, 18 | }, 19 | }; 20 | }, 21 | 22 | parseHTML() { 23 | return [ 24 | { 25 | tag: 'skill', 26 | }, 27 | ]; 28 | }, 29 | 30 | renderHTML({ HTMLAttributes }) { 31 | return ['skill', mergeAttributes(HTMLAttributes)]; 32 | }, 33 | }); 34 | -------------------------------------------------------------------------------- /packages/editor-extensions/src/tasks-extension.ts: -------------------------------------------------------------------------------- 1 | import { mergeAttributes, Node } from '@tiptap/core'; 2 | 3 | export const tasksExtension = Node.create({ 4 | name: 'tasksExtension', 5 | group: 'block', 6 | content: '(paragraph | bulletList | listItem | task)+', 7 | selectable: false, 8 | 9 | parseHTML() { 10 | return [ 11 | { 12 | tag: 'tasks-extension', 13 | }, 14 | ]; 15 | }, 16 | 17 | renderHTML({ HTMLAttributes }) { 18 | return ['tasks-extension', mergeAttributes(HTMLAttributes)]; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /packages/editor-extensions/src/tiptap.utils.ts: -------------------------------------------------------------------------------- 1 | import { generateHTML, generateJSON } from '@tiptap/html'; 2 | import { defaultExtensions } from './editor-extensions'; 3 | 4 | export function convertHtmlToTiptapJson(html: string) { 5 | const tiptapJson = generateJSON(html, defaultExtensions as any); 6 | return tiptapJson; 7 | } 8 | 9 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 10 | export function convertTiptapJsonToHtml(tiptapJson: Record) { 11 | return generateHTML(tiptapJson, defaultExtensions as any); 12 | } 13 | -------------------------------------------------------------------------------- /packages/editor-extensions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/node.json", 3 | "include": ["./src/**/*.ts"], 4 | "compilerOptions": { 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "lib": ["DOM", "DOM.Iterable"], 8 | "declaration": false, 9 | "declarationMap": false, 10 | "stripInternal": true 11 | }, 12 | "exclude": ["node_modules", "dist"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/editor-extensions/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { Options, defineConfig as defineConfigTSUP } from 'tsup'; 2 | 3 | const options: Options = { 4 | name: 'main', 5 | config: 'tsconfig.json', 6 | entry: ['./src/index.ts'], 7 | outDir: './dist', 8 | platform: 'node', 9 | format: ['cjs', 'esm'], 10 | legacyOutput: false, 11 | sourcemap: true, 12 | clean: true, 13 | bundle: true, 14 | splitting: false, 15 | dts: true, 16 | treeshake: { 17 | preset: 'recommended', 18 | }, 19 | }; 20 | 21 | export default defineConfigTSUP(options); 22 | -------------------------------------------------------------------------------- /packages/sdk/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ['@redplanethq/eslint-config/internal.js'], 5 | parser: '@typescript-eslint/parser', 6 | rules: { 7 | 'no-redeclare': 'off', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/sdk/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /packages/sdk/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@sol/services'; 2 | export * from '@sol/types'; 3 | -------------------------------------------------------------------------------- /packages/sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/node.json", 3 | "include": ["./src/**/*.ts", "tsup.config.ts"], 4 | "compilerOptions": { 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "lib": ["DOM", "DOM.Iterable"], 8 | "declaration": false, 9 | "declarationMap": false, 10 | "stripInternal": true 11 | }, 12 | "exclude": ["node_modules", "dist"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/sdk/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { Options, defineConfig as defineConfigTSUP } from 'tsup'; 2 | 3 | const options: Options = { 4 | name: 'main', 5 | config: 'tsconfig.json', 6 | entry: ['./src/index.ts'], 7 | outDir: './dist', 8 | platform: 'node', 9 | format: ['cjs', 'esm'], 10 | legacyOutput: false, 11 | sourcemap: true, 12 | clean: true, 13 | bundle: true, 14 | splitting: false, 15 | dts: true, 16 | treeshake: { 17 | preset: 'recommended', 18 | }, 19 | external: ['axios'], 20 | }; 21 | 22 | export default defineConfigTSUP(options); 23 | -------------------------------------------------------------------------------- /packages/services/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ['@sol/eslint-config/internal.js'], 5 | parser: '@typescript-eslint/parser', 6 | rules: { 7 | 'no-redeclare': 'off', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/services/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /packages/services/src/activity/create-activity.ts: -------------------------------------------------------------------------------- 1 | import { Activity, CreateActivityDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function createActivity( 5 | createActivityDto: CreateActivityDto, 6 | ): Promise { 7 | const response = await axios.post(`/api/v1/activity`, createActivityDto); 8 | 9 | return response.data; 10 | } 11 | -------------------------------------------------------------------------------- /packages/services/src/activity/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-activity'; 2 | -------------------------------------------------------------------------------- /packages/services/src/automation/create-automation.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export async function createAutomation(createAutomationDto: { 4 | text: string; 5 | mcps: string[]; 6 | }) { 7 | const response = await axios.post(`/api/v1/automations`, createAutomationDto); 8 | 9 | return response.data; 10 | } 11 | -------------------------------------------------------------------------------- /packages/services/src/automation/delete-automation.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export async function deleteAutomation(deleteAutomationDto: { 4 | automationId: string; 5 | }) { 6 | const response = await axios.delete( 7 | `/api/v1/automations/${deleteAutomationDto.automationId}`, 8 | ); 9 | 10 | return response.data; 11 | } 12 | -------------------------------------------------------------------------------- /packages/services/src/automation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-automation'; 2 | export * from './delete-automation'; 3 | export * from './update-automation'; 4 | -------------------------------------------------------------------------------- /packages/services/src/automation/update-automation.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export async function updateAutomation({ 4 | automationId, 5 | ...updateAutomationDto 6 | }: { 7 | automationId: string; 8 | text: string; 9 | mcps: string[]; 10 | }) { 11 | const response = await axios.post( 12 | `/api/v1/automations/${automationId}`, 13 | updateAutomationDto, 14 | ); 15 | 16 | return response.data; 17 | } 18 | -------------------------------------------------------------------------------- /packages/services/src/conversation/create-conversation.ts: -------------------------------------------------------------------------------- 1 | import { CreateConversationDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function createConversation( 5 | createComversationDto: CreateConversationDto, 6 | ) { 7 | const response = await axios.post( 8 | `/api/v1/conversation`, 9 | createComversationDto, 10 | ); 11 | 12 | return response.data; 13 | } 14 | -------------------------------------------------------------------------------- /packages/services/src/conversation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-conversation'; 2 | -------------------------------------------------------------------------------- /packages/services/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './conversation'; 2 | export * from './integration-account'; 3 | export * from './integration-definition'; 4 | export * from './oauth'; 5 | export * from './page'; 6 | export * from './task-occurrence'; 7 | export * from './tasks'; 8 | export * from './user'; 9 | export * from './lists'; 10 | export * from './activity'; 11 | export * from './automation'; 12 | -------------------------------------------------------------------------------- /packages/services/src/integration-account/create-integration-account-without-oauth.ts: -------------------------------------------------------------------------------- 1 | import { CreateIntegrationAccountDto, IntegrationAccount } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function createIntegrationAccountWithoutOAuth( 5 | createIntegrationAccountDto: Partial, 6 | ): Promise { 7 | const response = await axios.post( 8 | `/api/v1/integration_account/create/apikey`, 9 | createIntegrationAccountDto, 10 | ); 11 | 12 | return response.data; 13 | } 14 | -------------------------------------------------------------------------------- /packages/services/src/integration-account/create-integration-account.ts: -------------------------------------------------------------------------------- 1 | import { CreateIntegrationAccountDto, IntegrationAccount } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function createIntegrationAccount( 5 | createIntegrationAccountDto: CreateIntegrationAccountDto, 6 | ): Promise { 7 | const response = await axios.post( 8 | `/api/v1/integration_account`, 9 | createIntegrationAccountDto, 10 | ); 11 | 12 | return response.data; 13 | } 14 | -------------------------------------------------------------------------------- /packages/services/src/integration-account/get-integration-account-token.ts: -------------------------------------------------------------------------------- 1 | import { 2 | IntegrationAccountIdDto, 3 | IntegrationAccountWithToken, 4 | } from '@sol/types'; 5 | import axios from 'axios'; 6 | 7 | export async function getIntegrationAccountWithToken({ 8 | integrationAccountId, 9 | }: IntegrationAccountIdDto): Promise { 10 | const response = await axios.get( 11 | `/api/v1/integration_account/${integrationAccountId}/token`, 12 | ); 13 | 14 | return response.data; 15 | } 16 | -------------------------------------------------------------------------------- /packages/services/src/integration-account/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-integration-account-token'; 2 | export * from './update-integration-account'; 3 | export * from './create-integration-account'; 4 | export * from './create-integration-account-without-oauth'; 5 | -------------------------------------------------------------------------------- /packages/services/src/integration-account/update-integration-account.ts: -------------------------------------------------------------------------------- 1 | import { 2 | IntegrationAccount, 3 | IntegrationAccountIdDto, 4 | UpdateIntegrationAccountDto, 5 | } from '@sol/types'; 6 | import axios from 'axios'; 7 | 8 | export async function updateIntegrationAccount( 9 | { integrationAccountId }: IntegrationAccountIdDto, 10 | integrationAccountDto: UpdateIntegrationAccountDto, 11 | ): Promise { 12 | const response = await axios.post( 13 | `/api/v1/integration_account/${integrationAccountId}`, 14 | integrationAccountDto, 15 | ); 16 | 17 | return response.data; 18 | } 19 | -------------------------------------------------------------------------------- /packages/services/src/integration-definition/get-integration-definition.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinition, IntegrationDefinitionIdDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function getIntegrationDefinition({ 5 | integrationDefinitionId, 6 | }: IntegrationDefinitionIdDto): Promise { 7 | const response = await axios.get( 8 | `/api/v1/integration_definition/${integrationDefinitionId}`, 9 | ); 10 | 11 | return response.data; 12 | } 13 | -------------------------------------------------------------------------------- /packages/services/src/integration-definition/get-integration-definitions.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinition } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function getIntegrationDefinitions(): Promise< 5 | IntegrationDefinition[] 6 | > { 7 | const response = await axios.get(`/api/v1/integration_definition`); 8 | 9 | return response.data; 10 | } 11 | -------------------------------------------------------------------------------- /packages/services/src/integration-definition/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-integration-definitions'; 2 | export * from './get-integration-definition'; 3 | -------------------------------------------------------------------------------- /packages/services/src/lists/create-list.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export async function createList(favourite?: boolean) { 4 | const response = await axios.post(`/api/v1/lists`, { favourite }); 5 | 6 | return response.data; 7 | } 8 | -------------------------------------------------------------------------------- /packages/services/src/lists/delete-list.ts: -------------------------------------------------------------------------------- 1 | import { ListIdDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function deleteList({ listId }: ListIdDto) { 5 | const response = await axios.delete(`/api/v1/lists/${listId}`); 6 | 7 | return response.data; 8 | } 9 | -------------------------------------------------------------------------------- /packages/services/src/lists/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-list'; 2 | export * from './update-list'; 3 | export * from './delete-list'; 4 | -------------------------------------------------------------------------------- /packages/services/src/lists/update-list.ts: -------------------------------------------------------------------------------- 1 | import { UpdateListDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | interface UpdateListDtoWithId extends UpdateListDto { 5 | listId: string; 6 | } 7 | 8 | export async function updateList({ 9 | listId, 10 | ...updateListDto 11 | }: UpdateListDtoWithId) { 12 | const response = await axios.post(`/api/v1/lists/${listId}`, updateListDto); 13 | 14 | return response.data; 15 | } 16 | -------------------------------------------------------------------------------- /packages/services/src/oauth/create-redirect-url.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export interface CreateRedirectURLParams { 4 | integrationDefinitionId: string; 5 | redirectURL: string; 6 | } 7 | 8 | export interface RedirectURLResponse { 9 | status: number; 10 | redirectURL: string; 11 | } 12 | 13 | export async function createRedirectURL( 14 | params: CreateRedirectURLParams, 15 | ): Promise { 16 | const response = await axios.post('/api/v1/oauth', params); 17 | 18 | return response.data; 19 | } 20 | -------------------------------------------------------------------------------- /packages/services/src/oauth/delete-oauth.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationAccountIdDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function deleteIntegrationAccount( 5 | params: IntegrationAccountIdDto, 6 | ) { 7 | return await axios.delete( 8 | `/api/v1/integration_account/${params.integrationAccountId}`, 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/services/src/oauth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './delete-oauth'; 2 | export * from './create-redirect-url'; 3 | -------------------------------------------------------------------------------- /packages/services/src/page/create-page.ts: -------------------------------------------------------------------------------- 1 | import type { CreatePageDto } from '@sol/types'; 2 | 3 | import axios from 'axios'; 4 | 5 | export async function createPage(createPageDto: CreatePageDto) { 6 | const response = await axios.post(`/api/v1/pages`, createPageDto); 7 | 8 | return response.data; 9 | } 10 | -------------------------------------------------------------------------------- /packages/services/src/page/get-create-page.ts: -------------------------------------------------------------------------------- 1 | import { GetPageByTitleDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export const getOrCreatePageByTitle = async ( 5 | pageByTitleDto: GetPageByTitleDto, 6 | ) => { 7 | const response = await axios.post(`/api/v1/pages`, pageByTitleDto); 8 | 9 | return response.data; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/services/src/page/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-page'; 2 | export * from './update-page'; 3 | export * from './get-create-page'; 4 | -------------------------------------------------------------------------------- /packages/services/src/page/update-page.ts: -------------------------------------------------------------------------------- 1 | import type { UpdatePageDto } from '@sol/types'; 2 | 3 | import axios from 'axios'; 4 | 5 | interface UpdataPageParms extends UpdatePageDto { 6 | pageId: string; 7 | } 8 | 9 | export async function updatePage({ pageId, ...updateDto }: UpdataPageParms) { 10 | const response = await axios.post(`/api/v1/pages/${pageId}`, updateDto); 11 | 12 | return response.data; 13 | } 14 | -------------------------------------------------------------------------------- /packages/services/src/task-occurrence/create-task-occurrence.ts: -------------------------------------------------------------------------------- 1 | import { CreateTaskOccurrenceDTO } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function createTaskOccurrence( 5 | createTaskOccurrenceDto: CreateTaskOccurrenceDTO, 6 | ) { 7 | const response = await axios.post( 8 | `/api/v1/task-occurrence`, 9 | createTaskOccurrenceDto, 10 | ); 11 | 12 | return response.data; 13 | } 14 | -------------------------------------------------------------------------------- /packages/services/src/task-occurrence/delete-all-task-occurrences.ts: -------------------------------------------------------------------------------- 1 | import { TaskDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function deleteAllTaskOccurrences({ taskId }: TaskDto) { 5 | const response = await axios.delete(`/api/v1/task-occurrence/task/${taskId}`); 6 | 7 | return response.data; 8 | } 9 | -------------------------------------------------------------------------------- /packages/services/src/task-occurrence/delete-task-occurrence.ts: -------------------------------------------------------------------------------- 1 | import { TaskOccurrenceDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function deleteTaskOccurrence({ 5 | taskOccurrenceId, 6 | }: TaskOccurrenceDto) { 7 | const response = await axios.delete( 8 | `/api/v1/task-occurrence?taskOccurrenceIds=${taskOccurrenceId}`, 9 | ); 10 | 11 | return response.data; 12 | } 13 | -------------------------------------------------------------------------------- /packages/services/src/task-occurrence/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-task-occurrence'; 2 | export * from './delete-task-occurrence'; 3 | export * from './delete-all-task-occurrences'; 4 | export * from './update-task-occurrence'; 5 | export * from './create-task-occurrence'; 6 | export * from './update-single-task-occurrence'; 7 | -------------------------------------------------------------------------------- /packages/services/src/task-occurrence/update-single-task-occurrence.ts: -------------------------------------------------------------------------------- 1 | import { UpdateTaskOccurenceDTO } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | interface UpdateTaskOccurrenceWithId extends Partial { 5 | taskOccurrenceId: string; 6 | } 7 | 8 | export async function updateSingleTaskOccurrence({ 9 | taskOccurrenceId, 10 | ...updateTaskOccurrence 11 | }: UpdateTaskOccurrenceWithId) { 12 | const response = await axios.post( 13 | `/api/v1/task-occurrence/${taskOccurrenceId}`, 14 | updateTaskOccurrence, 15 | ); 16 | 17 | return response.data; 18 | } 19 | -------------------------------------------------------------------------------- /packages/services/src/task-occurrence/update-task-occurrence.ts: -------------------------------------------------------------------------------- 1 | import { UpdateTaskOccurenceDTO } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function updateTaskOccurrence( 5 | updateTaskOccurrenceDto: UpdateTaskOccurenceDTO, 6 | ) { 7 | const response = await axios.put( 8 | `/api/v1/task-occurrence`, 9 | updateTaskOccurrenceDto, 10 | ); 11 | 12 | return response.data; 13 | } 14 | -------------------------------------------------------------------------------- /packages/services/src/task/get-ai-tasks.ts: -------------------------------------------------------------------------------- 1 | import type { ReccurenceInput } from '@sol/types'; 2 | 3 | import axios from 'axios'; 4 | 5 | export async function getAiTaskRecurrence(reccurenceInput: ReccurenceInput) { 6 | const response = await axios.post( 7 | `/api/v1/tasks/ai/recurrence`, 8 | reccurenceInput, 9 | ); 10 | 11 | return response.data; 12 | } 13 | -------------------------------------------------------------------------------- /packages/services/src/task/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-ai-tasks'; 2 | -------------------------------------------------------------------------------- /packages/services/src/tasks/add-task-duedate.ts: -------------------------------------------------------------------------------- 1 | import { ReccurenceInput } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function addTaskDuedate(recurrenceInput: ReccurenceInput) { 5 | const response = await axios.post( 6 | `/api/v1/tasks/ai/duedate`, 7 | recurrenceInput, 8 | ); 9 | 10 | return response.data; 11 | } 12 | -------------------------------------------------------------------------------- /packages/services/src/tasks/create-task.ts: -------------------------------------------------------------------------------- 1 | import { CreateTaskDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function createTask(createTaskDto: CreateTaskDto) { 5 | const response = await axios.post(`/api/v1/tasks`, createTaskDto); 6 | 7 | return response.data; 8 | } 9 | 10 | export async function upsertTaskBySource(createTaskDto: CreateTaskDto) { 11 | const response = await axios.post(`/api/v1/tasks/source`, createTaskDto); 12 | 13 | return response.data; 14 | } 15 | 16 | export async function createBulkTasks(createTaskDto: CreateTaskDto[]) { 17 | const response = await axios.post(`/api/v1/tasks/bulk`, createTaskDto); 18 | 19 | return response.data; 20 | } 21 | -------------------------------------------------------------------------------- /packages/services/src/tasks/delete-task.ts: -------------------------------------------------------------------------------- 1 | import { TaskBySourceDto, TaskDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function deleteTask({ taskId }: TaskDto) { 5 | const response = await axios.delete(`/api/v1/tasks/${taskId}`); 6 | 7 | return response.data; 8 | } 9 | 10 | export async function deleteTaskBySourceURL({ sourceURL }: TaskBySourceDto) { 11 | const response = await axios.delete(`/api/v1/tasks/source/${sourceURL}`); 12 | 13 | return response.data; 14 | } 15 | -------------------------------------------------------------------------------- /packages/services/src/tasks/get-task.ts: -------------------------------------------------------------------------------- 1 | import { Task, TaskBySourceDto, TaskDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function getTaskById(taskDto: TaskDto): Promise { 5 | const response = await axios.get(`/api/v1/tasks/${taskDto.taskId}`); 6 | 7 | return response.data; 8 | } 9 | 10 | export async function getTaskBySourceURL( 11 | sourceDto: TaskBySourceDto, 12 | ): Promise { 13 | const response = await axios.get( 14 | `/api/v1/tasks/source/${sourceDto.sourceURL}`, 15 | ); 16 | 17 | return response.data; 18 | } 19 | -------------------------------------------------------------------------------- /packages/services/src/tasks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-task'; 2 | export * from './update-task'; 3 | export * from './get-task'; 4 | export * from './delete-task'; 5 | export * from './schedule-task'; 6 | export * from './add-task-duedate'; 7 | -------------------------------------------------------------------------------- /packages/services/src/tasks/schedule-task.ts: -------------------------------------------------------------------------------- 1 | import { ReccurenceInput } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function getTaskSchedule(recurrenceInput: ReccurenceInput) { 5 | const response = await axios.post( 6 | `/api/v1/tasks/ai/schedule`, 7 | recurrenceInput, 8 | ); 9 | 10 | return response.data; 11 | } 12 | -------------------------------------------------------------------------------- /packages/services/src/tasks/update-task.ts: -------------------------------------------------------------------------------- 1 | import { UpdateTaskDto } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export interface UpdateTaskDtoWithId extends UpdateTaskDto { 5 | taskId: string; 6 | } 7 | 8 | export async function updateTask({ 9 | taskId, 10 | ...updateTaskDto 11 | }: UpdateTaskDtoWithId) { 12 | const response = await axios.post(`/api/v1/tasks/${taskId}`, updateTaskDto); 13 | 14 | return response.data; 15 | } 16 | -------------------------------------------------------------------------------- /packages/services/src/transformer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedPlanetHQ/sol/94933d423070b49af99471f99fa48d4fe436eafc/packages/services/src/transformer.ts -------------------------------------------------------------------------------- /packages/services/src/user/authorize-code.ts: -------------------------------------------------------------------------------- 1 | import type { CodeDto } from '@sol/types'; 2 | 3 | import axios from 'axios'; 4 | 5 | export async function authorizeCode(codeBody: CodeDto) { 6 | const response = await axios.post(`/api/v1/users/authorization`, codeBody); 7 | 8 | return response.data; 9 | } 10 | -------------------------------------------------------------------------------- /packages/services/src/user/create-auth-code.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export async function createAuthCode() { 4 | const response = await axios.get('/api/v1/users/authorization'); 5 | 6 | const code = response.data.code; 7 | 8 | return { 9 | code, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/services/src/user/create-pat.ts: -------------------------------------------------------------------------------- 1 | import type { CreatePatDto } from '@sol/types'; 2 | 3 | import axios from 'axios'; 4 | 5 | export async function createPat(createPatDto: CreatePatDto) { 6 | const response = await axios.post(`/api/v1/users/pat`, createPatDto); 7 | 8 | return response.data; 9 | } 10 | -------------------------------------------------------------------------------- /packages/services/src/user/delete-pat.ts: -------------------------------------------------------------------------------- 1 | import type { PatIdDto } from '@sol/types'; 2 | 3 | import axios from 'axios'; 4 | 5 | export async function deletePat(patIdDto: PatIdDto) { 6 | const response = await axios.delete(`/api/v1/users/pats/${patIdDto.patId}`); 7 | 8 | return response.data; 9 | } 10 | -------------------------------------------------------------------------------- /packages/services/src/user/get-pats.ts: -------------------------------------------------------------------------------- 1 | import { Pat } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function getPats(): Promise { 5 | const response = await axios.get(`/api/v1/users/pats`); 6 | 7 | return response.data; 8 | } 9 | -------------------------------------------------------------------------------- /packages/services/src/user/get-user.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | export async function getUser() { 4 | const response = await axios.get(`/api/v1/users`); 5 | 6 | return response.data; 7 | } 8 | -------------------------------------------------------------------------------- /packages/services/src/user/get-users.ts: -------------------------------------------------------------------------------- 1 | import { GetUsersDto, PublicUser } from '@sol/types'; 2 | import axios from 'axios'; 3 | 4 | export async function getUsers(data: GetUsersDto): Promise { 5 | const response = await axios.post(`/api/v1/users`, data); 6 | 7 | return response.data; 8 | } 9 | -------------------------------------------------------------------------------- /packages/services/src/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-user'; 2 | export * from './get-users'; 3 | export * from './create-pat'; 4 | export * from './get-pats'; 5 | export * from './delete-pat'; 6 | export * from './authorize-code'; 7 | export * from './create-auth-code'; 8 | -------------------------------------------------------------------------------- /packages/services/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/node.json", 3 | "include": ["./src/**/*.ts"], 4 | "compilerOptions": { 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "paths": { 8 | "@sol/types": ["../types/src/index"] 9 | }, 10 | "lib": ["DOM", "DOM.Iterable"], 11 | "declaration": false, 12 | "declarationMap": false, 13 | "stripInternal": true 14 | }, 15 | "exclude": ["node_modules", "dist"] 16 | } 17 | -------------------------------------------------------------------------------- /packages/services/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { Options, defineConfig as defineConfigTSUP } from 'tsup'; 2 | 3 | const options: Options = { 4 | name: 'main', 5 | config: 'tsconfig.json', 6 | entry: ['./src/index.ts'], 7 | outDir: './dist', 8 | platform: 'node', 9 | format: ['cjs', 'esm'], 10 | legacyOutput: false, 11 | sourcemap: true, 12 | clean: true, 13 | bundle: true, 14 | splitting: false, 15 | dts: true, 16 | treeshake: { 17 | preset: 'recommended', 18 | }, 19 | }; 20 | 21 | export default defineConfigTSUP(options); 22 | -------------------------------------------------------------------------------- /packages/types/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ['@sol/eslint-config/internal.js'], 5 | parser: '@typescript-eslint/parser', 6 | rules: { 7 | 'no-redeclare': 'off', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/types/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /packages/types/src/activity/activity.dto.ts: -------------------------------------------------------------------------------- 1 | export class Activity { 2 | id: string; 3 | createdAt: Date; 4 | updatedAt: Date; 5 | deleted: Date | null; 6 | 7 | title: string; 8 | sourceId?: string; 9 | sourceURL?: string; 10 | taskId?: string; 11 | 12 | workspaceId: string; 13 | integrationAccountId?: string; 14 | } 15 | -------------------------------------------------------------------------------- /packages/types/src/activity/create-activity.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsOptional, IsString } from 'class-validator'; 2 | 3 | export class CreateActivityDto { 4 | @IsString() 5 | text: string; 6 | 7 | @IsOptional() 8 | @IsString() 9 | sourceId?: string; 10 | 11 | @IsOptional() 12 | @IsString() 13 | sourceURL?: string; 14 | 15 | @IsOptional() 16 | @IsString() 17 | taskId?: string; 18 | 19 | @IsString() 20 | integrationAccountId: string; 21 | } 22 | -------------------------------------------------------------------------------- /packages/types/src/activity/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-activity.dto'; 2 | export * from './activity.dto'; 3 | -------------------------------------------------------------------------------- /packages/types/src/agent-worklog/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agent-worklog.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/ai-request/ai-request.dto.ts: -------------------------------------------------------------------------------- 1 | export interface AIStreamResponse { 2 | textStream: AsyncIterable & ReadableStream; 3 | } 4 | -------------------------------------------------------------------------------- /packages/types/src/ai-request/ai-request.entity.ts: -------------------------------------------------------------------------------- 1 | import { LLMModelType } from '../prompt'; 2 | import { Workspace } from '../workspace'; 3 | 4 | export class AIRequest { 5 | id: string; 6 | createdAt: Date; 7 | updatedAt: Date; 8 | deleted: Date | null; 9 | modelName: string; 10 | data: string; 11 | response: string | null; 12 | llmModel: LLMModelType; 13 | workspace?: Workspace; 14 | workspaceId: string; 15 | successful: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /packages/types/src/ai-request/get-ai-request.dto.ts: -------------------------------------------------------------------------------- 1 | import { LLMModelEnum } from '../prompt'; 2 | 3 | export interface GetAIRequestDTO { 4 | messages: any[]; 5 | model: string; 6 | llmModel: LLMModelEnum; 7 | } 8 | -------------------------------------------------------------------------------- /packages/types/src/ai-request/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ai-request.entity'; 2 | export * from './get-ai-request.dto'; 3 | export * from './ai-request.dto'; 4 | -------------------------------------------------------------------------------- /packages/types/src/attachment/attachment.interface.ts: -------------------------------------------------------------------------------- 1 | export interface AttachmentResponse { 2 | publicURL: string; 3 | fileType: string; 4 | originalName: string; 5 | size: number; 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/src/attachment/index.ts: -------------------------------------------------------------------------------- 1 | export * from './attachment.entity'; 2 | export * from './attachment.interface'; 3 | -------------------------------------------------------------------------------- /packages/types/src/common/common.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 2 | export type PostRequestBody = Record; 3 | 4 | export type RequestHeaders = Record<'headers', Record>; 5 | 6 | export enum DateFilterEnum { 7 | EQ = 'eq', 8 | GTE = 'gte', 9 | LTE = 'lte', 10 | GT = 'gt', 11 | LT = 'lt', 12 | } 13 | 14 | export const DateFilterType = { 15 | EQ: 'eq', 16 | GTE: 'gte', 17 | LTE: 'lte', 18 | GT: 'gt', 19 | LT: 'lt', 20 | }; 21 | 22 | export type DateFilterType = 23 | (typeof DateFilterType)[keyof typeof DateFilterType]; 24 | -------------------------------------------------------------------------------- /packages/types/src/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './utility'; 2 | export * from './common'; 3 | export * from './integration'; 4 | -------------------------------------------------------------------------------- /packages/types/src/conversation-execution-step/index.ts: -------------------------------------------------------------------------------- 1 | export * from './conversation-execution.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/conversation-history/get-conversation-history-action.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class GetConversationHistoryActionDto { 4 | @IsString() 5 | conversationHistoryId: string; 6 | 7 | @IsString() 8 | actionId: string; 9 | } 10 | -------------------------------------------------------------------------------- /packages/types/src/conversation-history/index.ts: -------------------------------------------------------------------------------- 1 | export * from './conversation-history.entity'; 2 | export * from './conversation-history.dto'; 3 | export * from './update-conversation-history.dto'; 4 | export * from './get-conversation-history-action.dto'; 5 | -------------------------------------------------------------------------------- /packages/types/src/conversation-history/update-conversation-history.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString, IsObject, IsOptional, IsEnum } from 'class-validator'; 2 | 3 | import { UserTypeEnum } from '../index'; 4 | 5 | export class UpdateConversationHistoryDto { 6 | @IsString() 7 | @IsOptional() 8 | message?: string; 9 | 10 | @IsEnum(UserTypeEnum) 11 | @IsOptional() 12 | userType?: UserTypeEnum; 13 | 14 | @IsObject() 15 | @IsOptional() 16 | context?: Record; 17 | 18 | @IsObject() 19 | @IsOptional() 20 | thoughts?: Record; 21 | 22 | @IsString() 23 | @IsOptional() 24 | userId?: string; 25 | } 26 | -------------------------------------------------------------------------------- /packages/types/src/conversation/conversation.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class ConversationParamsDto { 4 | @IsString() 5 | conversationId: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/src/conversation/conversation.entity.ts: -------------------------------------------------------------------------------- 1 | import { ConversationHistory } from '../conversation-history'; 2 | import { Page } from '../page'; 3 | import { Task } from '../task'; 4 | import { User } from '../user'; 5 | import { Workspace } from '../workspace'; 6 | 7 | export class Conversation { 8 | id: string; 9 | createdAt: Date; 10 | updatedAt: Date; 11 | deleted: Date | null; 12 | 13 | user?: User | null; 14 | userId: string; 15 | 16 | workspace?: Workspace | null; 17 | workspaceId: string; 18 | 19 | page?: Page | null; 20 | pageId?: string; 21 | 22 | task?: Task | null; 23 | taskId?: string; 24 | 25 | conversationHistory?: ConversationHistory[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/types/src/conversation/create-conversation.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsObject, IsOptional, IsString } from 'class-validator'; 2 | 3 | export class CreateConversationDto { 4 | @IsString() 5 | message: string; 6 | 7 | @IsObject() 8 | @IsOptional() 9 | context?: Record; 10 | 11 | @IsString() 12 | @IsOptional() 13 | pageId?: string; 14 | 15 | @IsString() 16 | @IsOptional() 17 | title?: string; 18 | 19 | @IsString() 20 | @IsOptional() 21 | conversationId?: string; 22 | } 23 | -------------------------------------------------------------------------------- /packages/types/src/conversation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './conversation.entity'; 2 | export * from './conversation.dto'; 3 | export * from './create-conversation.dto'; 4 | -------------------------------------------------------------------------------- /packages/types/src/conversation/update-conversation.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsObject, IsOptional } from 'class-validator'; 2 | 3 | export class UpdateConversationDto { 4 | @IsOptional() 5 | @IsObject() 6 | context?: any; 7 | } 8 | -------------------------------------------------------------------------------- /packages/types/src/index-job/index-job.entity.ts: -------------------------------------------------------------------------------- 1 | import { JsonObject } from '../common'; 2 | import { IntegrationAccount } from '../integration-account'; 3 | import { Workspace } from '../workspace'; 4 | 5 | export class IndexJob { 6 | id: string; 7 | createdAt: Date; 8 | updatedAt: Date; 9 | deleted: Date | null; 10 | 11 | type: string; 12 | status: string; 13 | sourceId: string; 14 | metadata?: JsonObject; 15 | 16 | integrationAccount: IntegrationAccount; 17 | integrationAccountId: string; 18 | 19 | workspace?: Workspace; 20 | workspaceId: string; 21 | } 22 | -------------------------------------------------------------------------------- /packages/types/src/index-job/index.ts: -------------------------------------------------------------------------------- 1 | export * from './index-job.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/integration-account/create-integration-account.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsObject, IsOptional, IsString } from 'class-validator'; 2 | 3 | import { type JsonObject } from '../common'; 4 | 5 | export class CreateIntegrationAccountDto { 6 | @IsString() 7 | integrationDefinitionId: string; 8 | 9 | @IsObject() 10 | config: JsonObject; 11 | 12 | @IsString() 13 | @IsOptional() 14 | accountId?: string; 15 | 16 | @IsObject() 17 | @IsOptional() 18 | settings?: JsonObject; 19 | 20 | @IsString() 21 | @IsOptional() 22 | userId?: string; 23 | } 24 | -------------------------------------------------------------------------------- /packages/types/src/integration-account/get-integration-account.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsArray } from 'class-validator'; 2 | 3 | export class GetIntegrationAccountByNames { 4 | @IsArray() 5 | integrations: string[]; 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/src/integration-account/index.ts: -------------------------------------------------------------------------------- 1 | export * from './integration-account.entity'; 2 | export * from './integration-account.dto'; 3 | export * from './create-integration-account.dto'; 4 | export * from './update-integration-account.dto'; 5 | export * from './get-integration-account.dto'; 6 | -------------------------------------------------------------------------------- /packages/types/src/integration-account/integration-account.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class IntegrationAccountIdDto { 4 | @IsString() 5 | integrationAccountId: string; 6 | } 7 | 8 | export class AccountIdDto { 9 | @IsString() 10 | accountId: string; 11 | } 12 | -------------------------------------------------------------------------------- /packages/types/src/integration-account/update-integration-account.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsObject, IsOptional, IsString } from 'class-validator'; 2 | 3 | import { type JsonObject } from '../common'; 4 | 5 | export class UpdateIntegrationAccountDto { 6 | @IsOptional() 7 | @IsObject() 8 | integrationConfiguration?: JsonObject; 9 | 10 | @IsString() 11 | @IsOptional() 12 | accountIdentifier?: string; 13 | 14 | @IsString() 15 | @IsOptional() 16 | accountId?: string; 17 | 18 | @IsObject() 19 | @IsOptional() 20 | settings?: JsonObject; 21 | 22 | @IsString() 23 | @IsOptional() 24 | userId?: string; 25 | } 26 | -------------------------------------------------------------------------------- /packages/types/src/integration-definition/index.ts: -------------------------------------------------------------------------------- 1 | export * from './integration-definition.entity'; 2 | export * from './spec'; 3 | export * from './integration-definition.dto'; 4 | -------------------------------------------------------------------------------- /packages/types/src/integration-definition/integration-definition.dto.ts: -------------------------------------------------------------------------------- 1 | export class IntegrationDefinitionIdDto { 2 | integrationDefinitionId: string; 3 | } 4 | -------------------------------------------------------------------------------- /packages/types/src/integration-definition/spec.ts: -------------------------------------------------------------------------------- 1 | type AuthType = 'OAuth2' | 'APIKey' | 'BasicAuth'; 2 | 3 | export interface AuthSpecification { 4 | type: AuthType; 5 | token_url: string; 6 | authorization_url: string; 7 | scope: string[]; 8 | } 9 | 10 | export interface LinkRegex { 11 | type: string; 12 | regex: string; 13 | } 14 | 15 | export interface InputField { 16 | label: string; 17 | type: 'text' | 'number' | 'select' | 'multi-select'; 18 | placeholder?: string; 19 | options?: string[]; // For select or multi-select types 20 | } 21 | 22 | export interface IntegrationSpecification { 23 | authentication: AuthSpecification; 24 | link_regex?: LinkRegex[]; 25 | inputs?: Record; 26 | } 27 | -------------------------------------------------------------------------------- /packages/types/src/list/index.ts: -------------------------------------------------------------------------------- 1 | export * from './list.entity'; 2 | export * from './list.dto'; 3 | export * from './update-list.dto'; 4 | -------------------------------------------------------------------------------- /packages/types/src/list/list.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class ListIdDto { 4 | @IsString() 5 | listId: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/src/list/list.entity.ts: -------------------------------------------------------------------------------- 1 | export class List { 2 | id: string; 3 | createdAt: Date; 4 | updatedAt: Date; 5 | 6 | updatedBy: string; 7 | 8 | pageId: string; 9 | workspaceId: string; 10 | } 11 | -------------------------------------------------------------------------------- /packages/types/src/list/update-list.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsBoolean, IsOptional, IsString } from 'class-validator'; 2 | 3 | export class UpdateListDto { 4 | @IsString() 5 | @IsOptional() 6 | icon?: string; 7 | 8 | @IsBoolean() 9 | @IsOptional() 10 | favourite?: boolean; 11 | 12 | @IsString() 13 | @IsOptional() 14 | htmlDescription?: string; 15 | } 16 | -------------------------------------------------------------------------------- /packages/types/src/page/create-page.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsEnum, IsOptional, IsString } from 'class-validator'; 2 | 3 | import { PageTypeEnum } from './page.entity'; 4 | 5 | export class CreatePageDto { 6 | @IsString() 7 | @IsOptional() 8 | title?: string; 9 | 10 | @IsOptional() 11 | @IsString() 12 | description?: string; 13 | 14 | @IsOptional() 15 | @IsString() 16 | htmlDescription?: string; 17 | 18 | @IsOptional() 19 | @IsString() 20 | parentId?: string; 21 | 22 | @IsString() 23 | sortOrder: string; 24 | 25 | @IsString() 26 | @IsEnum(['Default', 'Daily']) 27 | type: PageTypeEnum; 28 | } 29 | -------------------------------------------------------------------------------- /packages/types/src/page/get-page.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsArray, IsEnum, IsOptional, IsString } from 'class-validator'; 2 | 3 | import { PageTypeEnum } from './page.entity'; 4 | 5 | export class GetPageByTitleDto { 6 | @IsString() 7 | title: string; 8 | 9 | @IsString() 10 | @IsEnum(PageTypeEnum) 11 | type: PageTypeEnum; 12 | 13 | @IsArray() 14 | @IsOptional() 15 | taskIds?: string[]; 16 | } 17 | -------------------------------------------------------------------------------- /packages/types/src/page/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-page.dto'; 2 | export * from './page.entity'; 3 | export * from './update-page.dto'; 4 | export * from './page.dto'; 5 | export * from './get-page.dto'; 6 | -------------------------------------------------------------------------------- /packages/types/src/page/page.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class PageRequestParamsDto { 4 | @IsString() 5 | pageId: string; 6 | } 7 | 8 | export class EnhancePageResponse { 9 | title: string; 10 | description: string; 11 | } 12 | 13 | export const PageSelect = { 14 | id: true, 15 | createdAt: true, 16 | updatedAt: true, 17 | deleted: true, 18 | archived: true, 19 | 20 | title: true, 21 | description: true, 22 | 23 | sortOrder: true, 24 | parentId: true, 25 | 26 | type: true, 27 | tags: true, 28 | 29 | workspaceId: true, 30 | }; 31 | -------------------------------------------------------------------------------- /packages/types/src/prompt/create-prompt.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsEnum, IsOptional, IsString } from 'class-validator'; 2 | 3 | import { LLMModelEnum, LLMModelType } from './prompt.entity'; 4 | 5 | export class PromptInput { 6 | @IsString() 7 | name: string; 8 | 9 | @IsString() 10 | prompt: string; 11 | 12 | @IsOptional() 13 | @IsEnum(LLMModelEnum) 14 | model: LLMModelType; 15 | } 16 | -------------------------------------------------------------------------------- /packages/types/src/prompt/index.ts: -------------------------------------------------------------------------------- 1 | export * from './prompt.entity'; 2 | export * from './prompt.interface'; 3 | export * from './create-prompt.dto'; 4 | -------------------------------------------------------------------------------- /packages/types/src/status/index.ts: -------------------------------------------------------------------------------- 1 | export * from './status.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/status/status.entity.ts: -------------------------------------------------------------------------------- 1 | export class Status { 2 | id: string; 3 | createdAt: Date; 4 | updatedAt: Date; 5 | 6 | name: string; 7 | description: string; 8 | position: number; 9 | color: string; 10 | 11 | workspaceId?: string; 12 | } 13 | -------------------------------------------------------------------------------- /packages/types/src/summary/create-summary.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsObject, IsString } from 'class-validator'; 2 | 3 | export class CreateSummaryDto { 4 | @IsString() 5 | content: string; 6 | 7 | @IsString() 8 | taskId: string; 9 | } 10 | 11 | export class GenerateSummaryDto { 12 | @IsObject() 13 | summaryData: Record; 14 | 15 | @IsString() 16 | taskId: string; 17 | } 18 | -------------------------------------------------------------------------------- /packages/types/src/summary/index.ts: -------------------------------------------------------------------------------- 1 | export * from './summary.entity'; 2 | export * from './create-summary.dto'; 3 | -------------------------------------------------------------------------------- /packages/types/src/summary/summary.entity.ts: -------------------------------------------------------------------------------- 1 | import { Task } from '../task'; 2 | 3 | export interface Summary { 4 | id: string; 5 | createdAt: Date; 6 | updatedAt: Date; 7 | deleted: Date | null; 8 | archived: Date | null; 9 | content: string; 10 | taskId: string; 11 | task: Task; 12 | } 13 | -------------------------------------------------------------------------------- /packages/types/src/sync-action/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sync-action.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/task-occurrence/create-task-occurrence.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsArray, IsDateString, IsOptional, IsString } from 'class-validator'; 2 | 3 | export class CreateTaskOccurrenceDTO { 4 | @IsArray() 5 | taskIds: string[]; 6 | 7 | @IsOptional() 8 | @IsDateString() 9 | startTime?: string; 10 | 11 | @IsOptional() 12 | @IsDateString() 13 | endTime?: string; 14 | 15 | @IsString() 16 | @IsOptional() 17 | pageId?: string; 18 | } 19 | -------------------------------------------------------------------------------- /packages/types/src/task-occurrence/index.ts: -------------------------------------------------------------------------------- 1 | export * from './task-occurrence.entity'; 2 | export * from './update-task-occurrence.dto'; 3 | export * from './get-task-occurrence.dto'; 4 | export * from './task-occurrence.dto'; 5 | export * from './create-task-occurrence.dto'; 6 | -------------------------------------------------------------------------------- /packages/types/src/task-occurrence/task-occurrence.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class TaskOccurrenceDto { 4 | @IsString() 5 | taskOccurrenceId: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/src/task-occurrence/update-task-occurrence.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString, IsOptional, IsEnum, IsArray } from 'class-validator'; 2 | 3 | import { 4 | TaskOccurrenceStatusEnum, 5 | TaskOccurrenceStatusType, 6 | } from './task-occurrence.entity'; 7 | 8 | export class UpdateTaskOccurenceDTO { 9 | @IsArray() 10 | taskOccurrenceIds: string[]; 11 | 12 | @IsString() 13 | startTime: string; 14 | 15 | @IsString() 16 | endTime: string; 17 | 18 | @IsOptional() 19 | @IsEnum(TaskOccurrenceStatusEnum) 20 | status?: TaskOccurrenceStatusType; 21 | } 22 | -------------------------------------------------------------------------------- /packages/types/src/task/get-task.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsArray, IsString } from 'class-validator'; 2 | 3 | export class TaskDto { 4 | @IsString() 5 | taskId: string; 6 | } 7 | 8 | export class TaskBySourceDto { 9 | @IsString() 10 | sourceURL: string; 11 | } 12 | 13 | export class ReccurenceInput { 14 | @IsString() 15 | text: string; 16 | 17 | @IsString() 18 | currentTime: string; 19 | 20 | @IsArray() 21 | taskIds: string[]; 22 | } 23 | -------------------------------------------------------------------------------- /packages/types/src/task/index.ts: -------------------------------------------------------------------------------- 1 | export * from './task.entity'; 2 | export * from './create-task.dto'; 3 | export * from './update-task.dto'; 4 | export * from './get-task.dto'; 5 | export * from './search-task.dto'; 6 | -------------------------------------------------------------------------------- /packages/types/src/task/search-task.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsOptional, IsString } from 'class-validator'; 2 | 3 | export class UnifiedSearchOptionsDto { 4 | @IsString() 5 | query: string; 6 | 7 | @IsOptional() 8 | @IsString() 9 | limit?: string; 10 | 11 | @IsOptional() 12 | @IsString() 13 | page?: string; 14 | } 15 | 16 | export interface ParsedQuery { 17 | textSearch: string; 18 | filters: { 19 | status?: string; 20 | listId?: string; 21 | parentId?: string; 22 | dueDate?: { before?: Date; after?: Date }; 23 | isSubtask?: boolean; 24 | number?: string; 25 | isUnplanned?: boolean; 26 | sourceURL?: string; 27 | assignee?: string; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /packages/types/src/template/index.ts: -------------------------------------------------------------------------------- 1 | export * from './template.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/template/template.entity.ts: -------------------------------------------------------------------------------- 1 | import { JsonValue } from '../common'; 2 | import { User } from '../user/user.entity'; 3 | import { Workspace } from '../workspace/workspace.entity'; 4 | 5 | export class Template { 6 | id: string; 7 | createdAt: Date; 8 | updatedAt: Date; 9 | deleted: Date | null; 10 | name: string; 11 | 12 | templateData: JsonValue; 13 | createdBy?: User; 14 | createdById: string; 15 | workspace?: Workspace; 16 | workspaceId: string; 17 | } 18 | -------------------------------------------------------------------------------- /packages/types/src/user/code.dto.ts: -------------------------------------------------------------------------------- 1 | export class CodeDto { 2 | code: string; 3 | } 4 | -------------------------------------------------------------------------------- /packages/types/src/user/create-pat.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreatePatDto { 2 | name: string; 3 | } 4 | -------------------------------------------------------------------------------- /packages/types/src/user/get-users.dto.ts: -------------------------------------------------------------------------------- 1 | export class GetUsersDto { 2 | userIds: string[]; 3 | workspaceId?: string; 4 | } 5 | -------------------------------------------------------------------------------- /packages/types/src/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.entity'; 2 | export * from './pat.entity'; 3 | export * from './create-pat.dto'; 4 | export * from './get-users.dto'; 5 | export * from './pat.dto'; 6 | export * from './code.dto'; 7 | -------------------------------------------------------------------------------- /packages/types/src/user/pat.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class PatIdDto { 4 | @IsString() 5 | patId: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/src/user/pat.entity.ts: -------------------------------------------------------------------------------- 1 | export class Pat { 2 | id: string; 3 | createdAt: Date; 4 | updatedAt: Date; 5 | name: string; 6 | jwt: string; 7 | token: string; 8 | userId: string; 9 | } 10 | -------------------------------------------------------------------------------- /packages/types/src/user/user.entity.ts: -------------------------------------------------------------------------------- 1 | import { Attachment } from '../attachment'; 2 | import { Workspace } from '../workspace'; 3 | 4 | class Preferences { 5 | mcp: any; 6 | } 7 | 8 | export class User { 9 | id: string; 10 | createdAt: Date; 11 | updatedAt: Date; 12 | email: string; 13 | fullname: string | null; 14 | username: string; 15 | initialSetupComplete: boolean; 16 | preferences: Preferences; 17 | workspace?: Workspace; 18 | anonymousDataCollection: boolean; 19 | attachment?: Attachment[]; 20 | } 21 | 22 | export class PublicUser { 23 | id: string; 24 | username: string; 25 | fullname: string; 26 | email: string; 27 | } 28 | -------------------------------------------------------------------------------- /packages/types/src/webhook/index.ts: -------------------------------------------------------------------------------- 1 | export * from './webhook.entity'; 2 | -------------------------------------------------------------------------------- /packages/types/src/webhook/webhook.entity.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationAccount } from '../integration-account'; 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 4 | export type EventBody = Record; 5 | 6 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 7 | export type EventHeaders = Record; 8 | 9 | export interface WebhookPayload { 10 | eventBody: EventBody; 11 | eventHeaders: EventHeaders; 12 | integrationAccounts: Record; 13 | userId: string; 14 | } 15 | -------------------------------------------------------------------------------- /packages/types/src/workspace/index.ts: -------------------------------------------------------------------------------- 1 | export * from './workspace.entity'; 2 | export * from './workspace.dto'; 3 | -------------------------------------------------------------------------------- /packages/types/src/workspace/workspace.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString } from 'class-validator'; 2 | 3 | export class WorkspaceRequestParamsDto { 4 | @IsString() 5 | workspaceId: string; 6 | } 7 | 8 | export class WorkspaceSlugParamsDTO { 9 | @IsString() 10 | slug: string; 11 | } 12 | -------------------------------------------------------------------------------- /packages/types/src/workspace/workspace.entity.ts: -------------------------------------------------------------------------------- 1 | import { Template } from '../template'; 2 | 3 | export class Preferences { 4 | timezone?: string; 5 | } 6 | 7 | export class Workspace { 8 | id: string; 9 | createdAt: Date; 10 | updatedAt: Date; 11 | deleted: Date | null; 12 | name: string; 13 | slug: string; 14 | icon: string | null; 15 | userId?: string | null; 16 | template?: Template[]; 17 | preferences?: any; 18 | } 19 | -------------------------------------------------------------------------------- /packages/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@sol/typescript-config/node.json", 3 | "include": ["./src/**/*.ts", "tsup.config.ts"], 4 | "compilerOptions": { 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "paths": { 8 | "@sol/tsup/*": ["../../tooling/tsup/src/*"] 9 | }, 10 | "lib": ["DOM", "DOM.Iterable"], 11 | "declaration": false, 12 | "declarationMap": false, 13 | "stripInternal": true 14 | }, 15 | "exclude": ["node_modules", "dist"] 16 | } 17 | -------------------------------------------------------------------------------- /packages/types/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { Options, defineConfig as defineConfigTSUP } from 'tsup'; 2 | 3 | const options: Options = { 4 | name: 'main', 5 | config: 'tsconfig.json', 6 | entry: ['./src/index.ts'], 7 | outDir: './dist', 8 | platform: 'node', 9 | format: ['cjs', 'esm'], 10 | legacyOutput: false, 11 | sourcemap: true, 12 | clean: true, 13 | bundle: true, 14 | splitting: false, 15 | dts: true, 16 | treeshake: { 17 | preset: 'recommended', 18 | }, 19 | }; 20 | 21 | export default defineConfigTSUP(options); 22 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/*" 3 | - "packages/*" 4 | - "tooling/*" 5 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | 10 | -------------------------------------------------------------------------------- /tooling/eslint-config/README: -------------------------------------------------------------------------------- 1 | # `@sol/eslint-config` 2 | 3 | Collection of internal eslint configurations. 4 | -------------------------------------------------------------------------------- /tooling/typescript-config/nest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "NestJS", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "forceConsistentCasingInFileNames": false, 7 | "module": "commonjs", 8 | "target": "ES2022", 9 | "strictBindCallApply": false, 10 | "incremental": true, 11 | "outDir": "./dist" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tooling/typescript-config/node.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Node 18", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "lib": [ "ES2022" ], 7 | "module": "commonjs", 8 | "target": "ES2022", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "skipLibCheck": true, 12 | "forceConsistentCasingInFileNames": true 13 | } 14 | } -------------------------------------------------------------------------------- /tooling/typescript-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sol/typescript-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "publishConfig": { 6 | "access": "public" 7 | }, 8 | "packageManager": "pnpm@10.3.0" 9 | } --------------------------------------------------------------------------------